summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2014-02-01 19:49:33 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2014-02-01 19:49:33 +0000
commit404ae0f284a3b2d41fcdb53826550e4dfec5c65c (patch)
treecc446af26234e4465b8cc168b720ec44816ff5ab
downloadcolm-tarball-404ae0f284a3b2d41fcdb53826550e4dfec5c65c.tar.gz
-rw-r--r--COPYING340
-rw-r--r--ChangeLog92
-rw-r--r--Makefile.am26
-rw-r--r--Makefile.in802
-rw-r--r--README43
-rw-r--r--aapl/COPYING502
-rw-r--r--aapl/Makefile.am10
-rw-r--r--aapl/Makefile.in423
-rw-r--r--aapl/README6
-rw-r--r--aapl/avlbasic.h65
-rw-r--r--aapl/avlcommon.h1630
-rw-r--r--aapl/avlibasic.h67
-rw-r--r--aapl/avlikeyless.h64
-rw-r--r--aapl/avlimap.h77
-rw-r--r--aapl/avlimel.h79
-rw-r--r--aapl/avlimelkey.h76
-rw-r--r--aapl/avliset.h75
-rw-r--r--aapl/avlitree.h78
-rw-r--r--aapl/avlkeyless.h58
-rw-r--r--aapl/avlmap.h74
-rw-r--r--aapl/avlmel.h74
-rw-r--r--aapl/avlmelkey.h71
-rw-r--r--aapl/avlset.h70
-rw-r--r--aapl/avltree.h73
-rw-r--r--aapl/bstcommon.h814
-rw-r--r--aapl/bstmap.h113
-rw-r--r--aapl/bstset.h86
-rw-r--r--aapl/bsttable.h84
-rw-r--r--aapl/bubblesort.h94
-rw-r--r--aapl/compare.h246
-rw-r--r--aapl/dlcommon.h790
-rw-r--r--aapl/dlist.h64
-rw-r--r--aapl/dlistmel.h71
-rw-r--r--aapl/dlistval.h71
-rw-r--r--aapl/insertsort.h94
-rw-r--r--aapl/mergesort.h140
-rw-r--r--aapl/quicksort.h185
-rw-r--r--aapl/resize.h344
-rw-r--r--aapl/sbstmap.h121
-rw-r--r--aapl/sbstset.h94
-rw-r--r--aapl/sbsttable.h93
-rw-r--r--aapl/svector.h1350
-rw-r--r--aapl/table.h252
-rw-r--r--aapl/vector.h1189
-rw-r--r--aclocal.m49577
-rw-r--r--colm.vim97
-rwxr-xr-xconfig.guess1530
-rwxr-xr-xconfig.sub1773
-rwxr-xr-xconfigure18544
-rw-r--r--configure.in73
-rwxr-xr-xdepcomp688
-rwxr-xr-xinstall-sh527
-rw-r--r--ltmain.sh9661
-rwxr-xr-xmissing331
-rw-r--r--src/Makefile.am116
-rw-r--r--src/Makefile.in1754
-rw-r--r--src/buffer.h55
-rw-r--r--src/bytecode.c3702
-rw-r--r--src/bytecode.h513
-rw-r--r--src/closure.cc458
-rw-r--r--src/codegen.cc49
-rw-r--r--src/codevect.c183
-rw-r--r--src/colm.h82
-rw-r--r--src/colm.lm765
-rw-r--r--src/compiler.cc1170
-rw-r--r--src/config.h72
-rw-r--r--src/config.h.in71
-rw-r--r--src/consinit.cc856
-rw-r--r--src/consinit.h103
-rw-r--r--src/cstring.h861
-rw-r--r--src/ctinput.cc497
-rw-r--r--src/debug.c78
-rw-r--r--src/debug.h59
-rw-r--r--src/declare.cc1255
-rw-r--r--src/defs.h31
-rw-r--r--src/defs.h.in30
-rw-r--r--src/dotgen.cc115
-rw-r--r--src/dotgen.h51
-rw-r--r--src/exports.cc316
-rw-r--r--src/fsmap.cc804
-rw-r--r--src/fsmattach.cc425
-rw-r--r--src/fsmbase.cc602
-rw-r--r--src/fsmcodegen.cc931
-rw-r--r--src/fsmcodegen.h206
-rw-r--r--src/fsmexec.cc223
-rw-r--r--src/fsmgraph.cc982
-rw-r--r--src/fsmgraph.h1317
-rw-r--r--src/fsmmin.cc732
-rw-r--r--src/fsmstate.cc437
-rw-r--r--src/global.h104
-rw-r--r--src/if1.cc101
-rw-r--r--src/if1.h1148
-rw-r--r--src/if2.cc1091
-rw-r--r--src/if2.h6965
-rw-r--r--src/input.c1005
-rw-r--r--src/input.h175
-rw-r--r--src/iter.c490
-rw-r--r--src/keyops.h196
-rw-r--r--src/list.c105
-rw-r--r--src/loadcolm.cc2341
-rw-r--r--src/loadcolm.h24
-rw-r--r--src/loadinit.cc386
-rw-r--r--src/loadinit.h68
-rw-r--r--src/lookup.cc243
-rw-r--r--src/main.cc670
-rw-r--r--src/map.c763
-rw-r--r--src/map.h97
-rw-r--r--src/parse1.c2329
-rw-r--r--src/parse2.c30258
-rw-r--r--src/parsedata.h1022
-rw-r--r--src/parser.cc947
-rw-r--r--src/parser.h150
-rw-r--r--src/parsetree.cc1491
-rw-r--r--src/parsetree.h3191
-rw-r--r--src/pcheck.cc154
-rw-r--r--src/pcheck.h48
-rw-r--r--src/pdabuild.cc2099
-rw-r--r--src/pdacodegen.cc642
-rw-r--r--src/pdacodegen.h105
-rw-r--r--src/pdagraph.cc533
-rw-r--r--src/pdagraph.h515
-rw-r--r--src/pdarun.c2201
-rw-r--r--src/pdarun.h467
-rw-r--r--src/pool.c307
-rw-r--r--src/pool.h83
-rw-r--r--src/program.c379
-rw-r--r--src/program.h148
-rw-r--r--src/redbuild.cc559
-rw-r--r--src/redbuild.h158
-rw-r--r--src/redfsm.cc1043
-rw-r--r--src/redfsm.h475
-rw-r--r--src/resolve.cc799
-rw-r--r--src/rtvector.h34
-rw-r--r--src/string.c246
-rw-r--r--src/synthesis.cc2687
-rw-r--r--src/tree.c2263
-rw-r--r--src/tree.h361
-rw-r--r--src/version.h2
-rw-r--r--test/Makefile.am121
-rw-r--r--test/Makefile.in579
-rw-r--r--test/accum1.lm36
-rw-r--r--test/accum2.lm38
-rw-r--r--test/accum3.lm36
-rw-r--r--test/accumbt1.lm41
-rw-r--r--test/accumbt2.lm54
-rw-r--r--test/accumbt3.lm106
-rw-r--r--test/argv1.lm8
-rw-r--r--test/argv2.lm91
-rw-r--r--test/backtrack1.lm29
-rw-r--r--test/backtrack2.lm29
-rw-r--r--test/backtrack3.lm34
-rw-r--r--test/binary1.inbin0 -> 21219 bytes
-rw-r--r--test/binary1.lm1902
-rw-r--r--test/btscan1.lm47
-rw-r--r--test/btscan2.lm42
-rw-r--r--test/call1.lm17
-rw-r--r--test/commitbt.lm109
-rw-r--r--test/concat1.lm100
-rw-r--r--test/concat2.lm98
-rw-r--r--test/construct1.lm19
-rw-r--r--test/construct2.lm14
-rw-r--r--test/construct3.lm19
-rw-r--r--test/constructex.lm44
-rw-r--r--test/context1.lm39
-rw-r--r--test/context2.lm124
-rw-r--r--test/context3.lm47
-rw-r--r--test/counting1.lm109
-rw-r--r--test/counting2.lm98
-rw-r--r--test/counting3.lm130
-rw-r--r--test/counting4.lm111
-rw-r--r--test/decl1.lm5
-rw-r--r--test/decl2.lm5
-rw-r--r--test/decl3.lm3
-rw-r--r--test/div.lm42
-rw-r--r--test/exit1.lm7
-rw-r--r--test/exit2.lm24
-rw-r--r--test/exit3.lm24
-rw-r--r--test/export1.lm16
-rw-r--r--test/factor1.lm4
-rw-r--r--test/factor2.lm4
-rw-r--r--test/factor3.lm3
-rw-r--r--test/factor4.lm3
-rw-r--r--test/factor5.lm6
-rw-r--r--test/factor6.lm12
-rw-r--r--test/forloop1.lm19
-rw-r--r--test/forloop2.lm19
-rw-r--r--test/forloop3.lm21
-rw-r--r--test/func1.lm9
-rw-r--r--test/func2.lm9
-rw-r--r--test/func3.lm40
-rw-r--r--test/generate1.lm759
-rw-r--r--test/generate2.lm214
-rw-r--r--test/heredoc.lm59
-rw-r--r--test/ifblock1.lm46
-rw-r--r--test/ignore1.lm59
-rw-r--r--test/ignore2.lm36
-rw-r--r--test/ignore3.lm53
-rw-r--r--test/ignore4.lm74
-rw-r--r--test/ignore5.lm51
-rw-r--r--test/include1.lm5
-rw-r--r--test/include1a.lmi2
-rw-r--r--test/inpush1.lm134
-rw-r--r--test/inpush1a.in2
-rw-r--r--test/inpush1b.in2
-rw-r--r--test/inpush1c.in2
-rw-r--r--test/island.lm85
-rw-r--r--test/lhs1.lm42
-rw-r--r--test/liftattrs.lm83
-rw-r--r--test/literal1.lm4
-rw-r--r--test/lookup1.lm2416
-rw-r--r--test/mailbox.lm106
-rw-r--r--test/matchex.lm41
-rw-r--r--test/maxlen.lm57
-rw-r--r--test/multiregion1.lm242
-rw-r--r--test/multiregion2.lm124
-rw-r--r--test/mutualrec.lm18
-rw-r--r--test/namespace1.lm24
-rw-r--r--test/nestedcomm.lm55
-rw-r--r--test/order1.lm115
-rw-r--r--test/order2.lm116
-rw-r--r--test/parse1.lm14
-rw-r--r--test/prints.lm17
-rw-r--r--test/pull1.lm7
-rw-r--r--test/pull2.lm8
-rw-r--r--test/ragelambig1.lm72
-rw-r--r--test/ragelambig2.lm72
-rw-r--r--test/ragelambig3.lm72
-rw-r--r--test/ragelambig4.lm76
-rw-r--r--test/rediv.lm99
-rw-r--r--test/reor1.lm27
-rw-r--r--test/reor2.lm24
-rw-r--r--test/reparse.lm26
-rw-r--r--test/repeat1.lm42
-rw-r--r--test/repeat2.lm7408
-rw-r--r--test/rhsref1.lm117
-rw-r--r--test/rubyhere.lm123
-rwxr-xr-xtest/runtests.sh244
-rw-r--r--test/scope1.lm36
-rw-r--r--test/sprintf.lm4
-rw-r--r--test/string.lm60
-rw-r--r--test/superid.lm76
-rw-r--r--test/tags1.lm93
-rw-r--r--test/tags2.lm4183
-rw-r--r--test/tags3.lm322
-rw-r--r--test/tags4.lm350
-rw-r--r--test/tcontext1.lm35
-rw-r--r--test/til.lm194
-rw-r--r--test/translate1.lm28
-rw-r--r--test/translate2.lm62
-rw-r--r--test/travs1.lm286
-rw-r--r--test/treecmp1.lm25
-rw-r--r--test/typeref1.lm33
-rw-r--r--test/typeref2.lm34
-rw-r--r--test/typeref3.lm27
-rw-r--r--test/undofrag1.lm67
-rw-r--r--test/undofrag2.lm50
-rw-r--r--test/undofrag3.lm56
-rw-r--r--test/while1.lm52
258 files changed, 169633 insertions, 0 deletions
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..ec0507b
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ 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.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..1479d2d
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,92 @@
+colm 0.12.0 - Feb 1, 2014
+-------------------------
+ * allow matching against reference types
+ * refcount fixes for setting references
+ * can use 'in' expr to search ref types
+ * can take refs of temps in expresssions
+ * error handling improvements
+ * fixed the colm input open check
+ * added a default capture name to all production definition rhs elements,
+ defaults to the type name
+ * allow var ref as the target of a send construct
+ * added the cast operator
+ * return nil from open if file open fails
+ * improvements to locals downrefs (large func offset overflow and iters)
+ * fixed the typeref for stdout and stderr, now working
+ * evaluate print arguments left to right
+ * improved separation of declare, resolve/lookup, and compile passes
+ * lookup of types in cons/pats uses the cons type or pattern tree namespace
+ * added the void type, useful for calling func in send expression
+ * can re-enter namespaces that already exist
+ * don't search parent scopes when qualifications are present
+ * added a new syntax for literal tokens; a single backtick is starts the
+ literal, ends at whitespace or ] in second or greater position
+ * removed comma as separator in literal statement
+ * single-quoted strings are now treated like double-quoted strings; they
+ may appear in expressions and are concatenated with the other string forms
+ * new syntax for collect-ignore tokens "token <id> -"
+ * added the system function, which calls C's system
+ * fixes for contiguous stack regions that fixes some segfaults
+ * don't use stack top offsets in print instructions
+ * allow make_tree anywhere
+ * don't use sp offset for make_tree, removes need for contiguous
+ * eliminated stack offset from make-token instruction
+ * print function names in call op debug stmts
+
+colm 0.11 - May 26, 2013
+------------------------
+ * Require <> around ref and ptr type declarations (eg: ptr<type_ref>)
+ * Added production labels, which follow a production with the form
+ :Label. Labels are exposed in the C++ interface using an enum. They
+ are prefixed with _ to avoid conflict with member access functions.
+ * It's now possible to access Tree::tokdata from the C++ interface.
+ * The print, stream print, stream push, and stream append operations all
+ no longer trim trees by default. This makes these functions
+ consistent with constructor, which refrains from trimming to avoid
+ extra work. A construct with a tree trim is accomplished with an
+ additional operator. The above print and stream operations now have
+ the same usage patterns.
+ * Fixes to prodNum preservation through tree copy, and to the parser
+
+colm 0.10 - Apr 18, 2013
+------------------------
+ * Implemented the colm parser in colm. Bootstrapping with a parse tree
+ construction in C++. Using that generated parser to to parse the colm
+ grammar, from which the primary parser is produced.
+ * Improved error reporting.
+ * Added some tracking of progress through a stream for better
+ backtracking over includes that are pushed onto a stream.
+ * Updated the vim syntax, no longer highlighting parser, list, etc
+ (types).
+ * Parse expressions are now returning trees again. Returning the parser
+ results in semantics inconsistent with many other areas of the
+ program.
+ * Can now put '.' or eos on the end of a send expression to terminate
+ the parse
+ * Removed the original send syntax (<<).
+ * Lowercased and otherwise improved the C interface.
+ * The default binary name no longer has .bin suffix.
+ * Fixed -o option, now using -c to mean compile on (library). The
+ export filename options are now -e and -x.
+
+colm 0.9 - Feb 19, 2013
+-----------------------
+ * The parse loop now scans data that is owned by the input stream. It
+ is copied into a contiguous block in the scanner when the token is
+ consumed.
+ * The syntax of lexical regions was altered to omit the name. The
+ curlies were replaced with lex ... end syntax.
+ * The syntax of namespaces were altered. Curlies were replaced with
+ namespace <ID> ... end.
+
+colm 0.8 - Dec 29, 2012
+-----------------------
+ * The parse statement now includes a call to the finish operation. It
+ returns a value of type parser<Type>. The result tree and any error
+ message can be retrieved from this object using 'tree' and 'error'
+ members.
+ * Dropped curly brackets and the name from the syntax of lexical region
+ defintition. Using "lex ... end"
+ * Dropped curly brackets from the syntax of namespaces and context blocks.
+ Using "namespace N ... end N" and "context N ... end N"
+ * Now have a growable stack instead of a large, fixed, pre-allocated stack.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..4201a24
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
+#
+
+# This file is part of Colm.
+#
+# Colm 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.
+#
+# Colm 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 Colm; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+SUBDIRS = src
+DIST_SUBDIRS = $(SUBDIRS) aapl test
+
+dist_doc_DATA = colm.vim
+EXTRA_DIST = colm.vim
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..3c6042d
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,802 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
+#
+
+# This file is part of Colm.
+#
+# Colm 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.
+#
+# Colm 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 Colm; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/configure COPYING ChangeLog config.guess \
+ config.sub depcomp install-sh ltmain.sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h \
+ $(top_builddir)/src/defs.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(docdir)"
+DATA = $(dist_doc_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PUBDATE = @PUBDATE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = src
+DIST_SUBDIRS = $(SUBDIRS) aapl test
+dist_doc_DATA = colm.vim
+EXTRA_DIST = colm.vim
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-dist_docDATA: $(dist_doc_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
+ @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+ done
+
+uninstall-dist_docDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(docdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-dist_docDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-dist_docDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+ dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
+ dist-zip distcheck distclean distclean-generic \
+ distclean-libtool distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_docDATA install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-dist_docDATA
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/README b/README
new file mode 100644
index 0000000..a4119ac
--- /dev/null
+++ b/README
@@ -0,0 +1,43 @@
+BUILDING
+========
+
+Colm is currently supported only on Unix-like systems. It depends on the mmap
+function and it must be able to find g++ on the path.
+
+Building Colm from the source repository requires that you have ragel and kelbt
+installed. Building these two packages is straightforward. The usual
+./configure && make should be all that's needed. Alternatively, you may find
+packages for your system.
+
+http://www.complang.org/ragel/
+http://www.complang.org/kelbt/
+
+SYNTAX HIGHLIGHTING
+===================
+
+There is a vim syntax definition file colm.vim
+
+RUNNING
+=======
+
+The colm executable takes a Colm program and generates a .cpp file from it. It
+then compiles this program using g++. The g++ compile phase depends on include
+directories in the colm distribution, as well as a runtime library. Colm finds
+these using argv[0]:
+
+ -I dirname(argv[0])"../aapl"
+ -I dirname(argv[0])"../colm"
+ dirname(argv[0])"../colm/runtime.a"
+
+Therefore it is easiest to just run colm from the place it was built. This is
+temporary. In the future a proper install scheme will be provided.
+
+$ ./colm prog.lm
+
+Will produce:
+ prog.cpp
+ prog.bin
+
+The prog.bin program can then be run on some input:
+
+$ ./prog.bin < inputfile
diff --git a/aapl/COPYING b/aapl/COPYING
new file mode 100644
index 0000000..c6ed510
--- /dev/null
+++ b/aapl/COPYING
@@ -0,0 +1,502 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 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.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+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 and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, 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 library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete 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 distribute a copy of this License along with the
+Library.
+
+ 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 Library or any portion
+of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+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 Library, 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 Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you 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.
+
+ If distribution of 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 satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be 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.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library 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.
+
+ 9. 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 Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+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 with
+this License.
+
+ 11. 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 Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library 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 Library.
+
+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.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library 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.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser 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 Library
+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 Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+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
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "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
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. 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 LIBRARY 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
+LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; 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.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/aapl/Makefile.am b/aapl/Makefile.am
new file mode 100644
index 0000000..b0e1175
--- /dev/null
+++ b/aapl/Makefile.am
@@ -0,0 +1,10 @@
+noinst_HEADERS = \
+ avlbasic.h avlcommon.h avlibasic.h avlikeyless.h avlimap.h \
+ avlimel.h avlimelkey.h avliset.h avlitree.h avlkeyless.h avlmap.h \
+ avlmel.h avlmelkey.h avlset.h avltree.h bstcommon.h bstmap.h bstset.h \
+ bsttable.h bubblesort.h compare.h dlcommon.h dlist.h dlistmel.h \
+ dlistval.h insertsort.h mergesort.h quicksort.h resize.h sbstmap.h \
+ sbstset.h sbsttable.h svector.h table.h vector.h
+
+EXTRA_DIST = README COPYING
+
diff --git a/aapl/Makefile.in b/aapl/Makefile.in
new file mode 100644
index 0000000..fe439f1
--- /dev/null
+++ b/aapl/Makefile.in
@@ -0,0 +1,423 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = aapl
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in COPYING
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h \
+ $(top_builddir)/src/defs.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PUBDATE = @PUBDATE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_HEADERS = \
+ avlbasic.h avlcommon.h avlibasic.h avlikeyless.h avlimap.h \
+ avlimel.h avlimelkey.h avliset.h avlitree.h avlkeyless.h avlmap.h \
+ avlmel.h avlmelkey.h avlset.h avltree.h bstcommon.h bstmap.h bstset.h \
+ bsttable.h bubblesort.h compare.h dlcommon.h dlist.h dlistmel.h \
+ dlistval.h insertsort.h mergesort.h quicksort.h resize.h sbstmap.h \
+ sbstset.h sbsttable.h svector.h table.h vector.h
+
+EXTRA_DIST = README COPYING
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign aapl/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign aapl/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool ctags distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/aapl/README b/aapl/README
new file mode 100644
index 0000000..a2fa5e6
--- /dev/null
+++ b/aapl/README
@@ -0,0 +1,6 @@
+This directory contains the Aapl source distribution. For the
+documentation, build scripts, test programs, ChangeLog, etc. get the
+aapldev package.
+
+AaplDev and other information about Aapl is available from
+http://www.elude.ca/aapl/
diff --git a/aapl/avlbasic.h b/aapl/avlbasic.h
new file mode 100644
index 0000000..ed826f3
--- /dev/null
+++ b/aapl/avlbasic.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLBASIC_H
+#define _AAPL_AVLBASIC_H
+
+#include "compare.h"
+
+/**
+ * \addtogroup avltree
+ * @{
+ */
+
+/**
+ * \class AvlBasic
+ * \brief AVL Tree in which the entire element structure is the key.
+ *
+ * AvlBasic is an AVL tree that does not distinguish between the element that
+ * it contains and the key. The entire element structure is the key that is
+ * used to compare the relative ordering of elements. This is similar to the
+ * BstSet structure.
+ *
+ * AvlBasic does not assume ownership of elements in the tree. Items must be
+ * explicitly de-allocated.
+ */
+
+/*@}*/
+
+#define BASE_EL(name) name
+#define BASEKEY(name) name
+#define AVLMEL_CLASSDEF class Element, class Compare
+#define AVLMEL_TEMPDEF class Element, class Compare
+#define AVLMEL_TEMPUSE Element, Compare
+#define AvlTree AvlBasic
+#define AVL_BASIC
+
+#include "avlcommon.h"
+
+#undef BASE_EL
+#undef BASEKEY
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef AVL_BASIC
+
+#endif /* _AAPL_AVLBASIC_H */
diff --git a/aapl/avlcommon.h b/aapl/avlcommon.h
new file mode 100644
index 0000000..a00455b
--- /dev/null
+++ b/aapl/avlcommon.h
@@ -0,0 +1,1630 @@
+/*
+ * Copyright 2001 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* This header is not wrapped in ifndef becuase it is not intended to
+ * be included by the user. */
+
+#include <assert.h>
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+#ifdef WALKABLE
+/* This is used by AvlTree, AvlMel and AvlMelKey so it
+ * must be protected by global ifdefs. */
+#ifndef __AAPL_AVLI_EL__
+#define __AAPL_AVLI_EL__
+
+/**
+ * \brief Tree element properties for linked AVL trees.
+ *
+ * AvliTreeEl needs to be inherited by classes that intend to be element in an
+ * AvliTree.
+ */
+template<class SubClassEl> struct AvliTreeEl
+{
+ /**
+ * \brief Tree pointers connecting element in a tree.
+ */
+ SubClassEl *left, *right, *parent;
+
+ /**
+ * \brief Linked list pointers.
+ */
+ SubClassEl *prev, *next;
+
+ /**
+ * \brief Height of the tree rooted at this element.
+ *
+ * Height is required by the AVL balancing algorithm.
+ */
+ long height;
+};
+#endif /* __AAPL_AVLI_EL__ */
+
+#else /* not WALKABLE */
+
+/* This is used by All the non walkable trees so it must be
+ * protected by a global ifdef. */
+#ifndef __AAPL_AVL_EL__
+#define __AAPL_AVL_EL__
+/**
+ * \brief Tree element properties for linked AVL trees.
+ *
+ * AvlTreeEl needs to be inherited by classes that intend to be element in an
+ * AvlTree.
+ */
+template<class SubClassEl> struct AvlTreeEl
+{
+ /**
+ * \brief Tree pointers connecting element in a tree.
+ */
+ SubClassEl *left, *right, *parent;
+
+ /**
+ * \brief Height of the tree rooted at this element.
+ *
+ * Height is required by the AVL balancing algorithm.
+ */
+ long height;
+};
+#endif /* __AAPL_AVL_EL__ */
+#endif /* def WALKABLE */
+
+
+#if defined( AVLTREE_MAP )
+
+#ifdef WALKABLE
+
+/**
+ * \brief Tree element for AvliMap
+ *
+ * Stores the key and value pair.
+ */
+template <class Key, class Value> struct AvliMapEl :
+ public AvliTreeEl< AvliMapEl<Key, Value> >
+{
+ AvliMapEl(const Key &key)
+ : key(key) { }
+ AvliMapEl(const Key &key, const Value &value)
+ : key(key), value(value) { }
+
+ const Key &getKey() const { return key; }
+
+ /** \brief The key. */
+ Key key;
+
+ /** \brief The value. */
+ Value value;
+};
+#else /* not WALKABLE */
+
+/**
+ * \brief Tree element for AvlMap
+ *
+ * Stores the key and value pair.
+ */
+template <class Key, class Value> struct AvlMapEl :
+ public AvlTreeEl< AvlMapEl<Key, Value> >
+{
+ AvlMapEl(const Key &key)
+ : key(key) { }
+ AvlMapEl(const Key &key, const Value &value)
+ : key(key), value(value) { }
+
+ const Key &getKey() const { return key; }
+
+ /** \brief The key. */
+ Key key;
+
+ /** \brief The value. */
+ Value value;
+};
+#endif /* def WALKABLE */
+
+#elif defined( AVLTREE_SET )
+
+#ifdef WALKABLE
+/**
+ * \brief Tree element for AvliSet
+ *
+ * Stores the key.
+ */
+template <class Key> struct AvliSetEl :
+ public AvliTreeEl< AvliSetEl<Key> >
+{
+ AvliSetEl(const Key &key) : key(key) { }
+
+ const Key &getKey() const { return key; }
+
+ /** \brief The key. */
+ Key key;
+};
+#else /* not WALKABLE */
+/**
+ * \brief Tree element for AvlSet
+ *
+ * Stores the key.
+ */
+template <class Key> struct AvlSetEl :
+ public AvlTreeEl< AvlSetEl<Key> >
+{
+ AvlSetEl(const Key &key) : key(key) { }
+
+ const Key &getKey() const { return key; }
+
+ /** \brief The key. */
+ Key key;
+};
+#endif /* def WALKABLE */
+
+#endif /* AVLTREE_SET */
+
+/* Common AvlTree Class */
+template < AVLMEL_CLASSDEF > class AvlTree
+#if !defined( AVL_KEYLESS ) && defined ( WALKABLE )
+ : public Compare, public BASELIST
+#elif !defined( AVL_KEYLESS )
+ : public Compare
+#elif defined( WALKABLE )
+ : public BASELIST
+#endif
+{
+public:
+ /**
+ * \brief Create an empty tree.
+ */
+#ifdef WALKABLE
+ AvlTree() : root(0), treeSize(0) { }
+#else
+ AvlTree() : root(0), head(0), tail(0), treeSize(0) { }
+#endif
+
+ /**
+ * \brief Perform a deep copy of the tree.
+ *
+ * Each element is duplicated for the new tree. Copy constructors are used
+ * to create the new elements.
+ */
+ AvlTree(const AvlTree &other);
+
+#if defined( AVLTREE_MAP ) || defined( AVLTREE_SET )
+ /**
+ * \brief Clear the contents of the tree.
+ *
+ * All element are deleted.
+ */
+ ~AvlTree() { empty(); }
+
+ /**
+ * \brief Perform a deep copy of the tree.
+ *
+ * Each element is duplicated for the new tree. Copy constructors are used
+ * to create the new element. If this tree contains items, they are first
+ * deleted.
+ *
+ * \returns A reference to this.
+ */
+ AvlTree &operator=( const AvlTree &tree );
+
+ /**
+ * \brief Transfer the elements of another tree into this.
+ *
+ * First deletes all elements in this tree.
+ */
+ void transfer( AvlTree &tree );
+#else
+ /**
+ * \brief Abandon all elements in the tree.
+ *
+ * Tree elements are not deleted.
+ */
+ ~AvlTree() {}
+
+ /**
+ * \brief Perform a deep copy of the tree.
+ *
+ * Each element is duplicated for the new tree. Copy constructors are used
+ * to create the new element. If this tree contains items, they are
+ * abandoned.
+ *
+ * \returns A reference to this.
+ */
+ AvlTree &operator=( const AvlTree &tree );
+
+ /**
+ * \brief Transfer the elements of another tree into this.
+ *
+ * All elements in this tree are abandoned first.
+ */
+ void transfer( AvlTree &tree );
+#endif
+
+#ifndef AVL_KEYLESS
+ /* Insert a element into the tree. */
+ Element *insert( Element *element, Element **lastFound = 0 );
+
+#ifdef AVL_BASIC
+ /* Find a element in the tree. Returns the element if
+ * element exists, false otherwise. */
+ Element *find( const Element *element ) const;
+
+#else
+ Element *insert( const Key &key, Element **lastFound = 0 );
+
+#ifdef AVLTREE_MAP
+ Element *insert( const Key &key, const Value &val,
+ Element **lastFound = 0 );
+#endif
+
+ /* Find a element in the tree. Returns the element if
+ * key exists, false otherwise. */
+ Element *find( const Key &key ) const;
+
+ /* Detach a element from the tree. */
+ Element *detach( const Key &key );
+
+ /* Detach and delete a element from the tree. */
+ bool remove( const Key &key );
+#endif /* AVL_BASIC */
+#endif /* AVL_KEYLESS */
+
+ /* Detach a element from the tree. */
+ Element *detach( Element *element );
+
+ /* Detach and delete a element from the tree. */
+ void remove( Element *element );
+
+ /* Free all memory used by tree. */
+ void empty();
+
+ /* Abandon all element in the tree. Does not delete element. */
+ void abandon();
+
+ /** Root element of the tree. */
+ Element *root;
+
+#ifndef WALKABLE
+ Element *head, *tail;
+#endif
+
+ /** The number of element in the tree. */
+ long treeSize;
+
+ /** \brief Return the number of elements in the tree. */
+ long length() const { return treeSize; }
+
+ /** \brief Return the number of elements in the tree. */
+ long size() const { return treeSize; }
+
+ /* Various classes for setting the iterator */
+ struct Iter;
+ struct IterFirst { IterFirst( const AvlTree &t ) : t(t) { } const AvlTree &t; };
+ struct IterLast { IterLast( const AvlTree &t ) : t(t) { } const AvlTree &t; };
+ struct IterNext { IterNext( const Iter &i ) : i(i) { } const Iter &i; };
+ struct IterPrev { IterPrev( const Iter &i ) : i(i) { } const Iter &i; };
+
+#ifdef WALKABLE
+ /**
+ * \brief Avl Tree Iterator.
+ * \ingroup iterators
+ */
+ struct Iter
+ {
+ /* Default construct. */
+ Iter() : ptr(0) { }
+
+ /* Construct from an avl tree and iterator-setting classes. */
+ Iter( const AvlTree &t ) : ptr(t.head) { }
+ Iter( const IterFirst &af ) : ptr(af.t.head) { }
+ Iter( const IterLast &al ) : ptr(al.t.tail) { }
+ Iter( const IterNext &an ) : ptr(findNext(an.i.ptr)) { }
+ Iter( const IterPrev &ap ) : ptr(findPrev(ap.i.ptr)) { }
+
+ /* Assign from a tree and iterator-setting classes. */
+ Iter &operator=( const AvlTree &tree ) { ptr = tree.head; return *this; }
+ Iter &operator=( const IterFirst &af ) { ptr = af.t.head; return *this; }
+ Iter &operator=( const IterLast &al ) { ptr = al.t.tail; return *this; }
+ Iter &operator=( const IterNext &an ) { ptr = findNext(an.i.ptr); return *this; }
+ Iter &operator=( const IterPrev &ap ) { ptr = findPrev(ap.i.ptr); return *this; }
+
+ /** \brief Less than end? */
+ bool lte() const { return ptr != 0; }
+
+ /** \brief At end? */
+ bool end() const { return ptr == 0; }
+
+ /** \brief Greater than beginning? */
+ bool gtb() const { return ptr != 0; }
+
+ /** \brief At beginning? */
+ bool beg() const { return ptr == 0; }
+
+ /** \brief At first element? */
+ bool first() const { return ptr && ptr->BASE_EL(prev) == 0; }
+
+ /** \brief At last element? */
+ bool last() const { return ptr && ptr->BASE_EL(next) == 0; }
+
+ /** \brief Implicit cast to Element*. */
+ operator Element*() const { return ptr; }
+
+ /** \brief Dereference operator returns Element&. */
+ Element &operator *() const { return *ptr; }
+
+ /** \brief Arrow operator returns Element*. */
+ Element *operator->() const { return ptr; }
+
+ /** \brief Move to next item. */
+ inline Element *operator++();
+
+ /** \brief Move to next item. */
+ inline Element *operator++(int);
+
+ /** \brief Move to next item. */
+ inline Element *increment();
+
+ /** \brief Move to previous item. */
+ inline Element *operator--();
+
+ /** \brief Move to previous item. */
+ inline Element *operator--(int);
+
+ /** \brief Move to previous item. */
+ inline Element *decrement();
+
+ /** \brief Return the next item. Does not modify this. */
+ IterNext next() const { return IterNext( *this ); }
+
+ /** \brief Return the previous item. Does not modify this. */
+ IterPrev prev() const { return IterPrev( *this ); }
+
+ private:
+ static Element *findPrev( Element *element ) { return element->BASE_EL(prev); }
+ static Element *findNext( Element *element ) { return element->BASE_EL(next); }
+
+ public:
+
+ /** \brief The iterator is simply a pointer. */
+ Element *ptr;
+ };
+
+#else
+
+ /**
+ * \brief Avl Tree Iterator.
+ * \ingroup iterators
+ */
+ struct Iter
+ {
+ /* Default construct. */
+ Iter() : ptr(0), tree(0) { }
+
+ /* Construct from a tree and iterator-setting classes. */
+ Iter( const AvlTree &t ) : ptr(t.head), tree(&t) { }
+ Iter( const IterFirst &af ) : ptr(af.t.head), tree(&af.t) { }
+ Iter( const IterLast &al ) : ptr(al.t.tail), tree(&al.t) { }
+ Iter( const IterNext &an ) : ptr(findNext(an.i.ptr)), tree(an.i.tree) { }
+ Iter( const IterPrev &ap ) : ptr(findPrev(ap.i.ptr)), tree(ap.i.tree) { }
+
+ /* Assign from a tree and iterator-setting classes. */
+ Iter &operator=( const AvlTree &t )
+ { ptr = t.head; tree = &t; return *this; }
+ Iter &operator=( const IterFirst &af )
+ { ptr = af.t.head; tree = &af.t; return *this; }
+ Iter &operator=( const IterLast &al )
+ { ptr = al.t.tail; tree = &al.t; return *this; }
+ Iter &operator=( const IterNext &an )
+ { ptr = findNext(an.i.ptr); tree = an.i.tree; return *this; }
+ Iter &operator=( const IterPrev &ap )
+ { ptr = findPrev(ap.i.ptr); tree = ap.i.tree; return *this; }
+
+ /** \brief Less than end? */
+ bool lte() const { return ptr != 0; }
+
+ /** \brief At end? */
+ bool end() const { return ptr == 0; }
+
+ /** \brief Greater than beginning? */
+ bool gtb() const { return ptr != 0; }
+
+ /** \brief At beginning? */
+ bool beg() const { return ptr == 0; }
+
+ /** \brief At first element? */
+ bool first() const { return ptr && ptr == tree->head; }
+
+ /** \brief At last element? */
+ bool last() const { return ptr && ptr == tree->tail; }
+
+ /** \brief Implicit cast to Element*. */
+ operator Element*() const { return ptr; }
+
+ /** \brief Dereference operator returns Element&. */
+ Element &operator *() const { return *ptr; }
+
+ /** \brief Arrow operator returns Element*. */
+ Element *operator->() const { return ptr; }
+
+ /** \brief Move to next item. */
+ inline Element *operator++();
+
+ /** \brief Move to next item. */
+ inline Element *operator++(int);
+
+ /** \brief Move to next item. */
+ inline Element *increment();
+
+ /** \brief Move to previous item. */
+ inline Element *operator--();
+
+ /** \brief Move to previous item. */
+ inline Element *operator--(int);
+
+ /** \brief Move to previous item. */
+ inline Element *decrement();
+
+ /** \brief Return the next item. Does not modify this. */
+ IterNext next() const { return IterNext( *this ); }
+
+ /** \brief Return the previous item. Does not modify this. */
+ IterPrev prev() const { return IterPrev( *this ); }
+
+ private:
+ static Element *findPrev( Element *element );
+ static Element *findNext( Element *element );
+
+ public:
+ /** \brief The iterator is simply a pointer. */
+ Element *ptr;
+
+ /* The list is not walkable so we need to keep a pointerto the tree
+ * so we can test against head and tail in O(1) time. */
+ const AvlTree *tree;
+ };
+#endif
+
+ /** \brief Return first element. */
+ IterFirst first() { return IterFirst( *this ); }
+
+ /** \brief Return last element. */
+ IterLast last() { return IterLast( *this ); }
+
+protected:
+ /* Recursive worker for the copy constructor. */
+ Element *copyBranch( Element *element );
+
+ /* Recursively delete element in the tree. */
+ void deleteChildrenOf(Element *n);
+
+ /* rebalance the tree beginning at the leaf whose
+ * grandparent is unbalanced. */
+ Element *rebalance(Element *start);
+
+ /* Move up the tree from a given element, recalculating the heights. */
+ void recalcHeights(Element *start);
+
+ /* Move up the tree and find the first element whose
+ * grand-parent is unbalanced. */
+ Element *findFirstUnbalGP(Element *start);
+
+ /* Move up the tree and find the first element which is unbalanced. */
+ Element *findFirstUnbalEl(Element *start);
+
+ /* Replace a element in the tree with another element not in the tree. */
+ void replaceEl(Element *element, Element *replacement);
+
+ /* Remove a element from the tree and put another (normally a child of element)
+ * in its place. */
+ void removeEl(Element *element, Element *filler);
+
+ /* Once an insertion point is found at a leaf then do the insert. */
+ void attachRebal( Element *element, Element *parentEl, Element *lastLess );
+};
+
+/* Copy constructor. New up each item. */
+template <AVLMEL_TEMPDEF> AvlTree<AVLMEL_TEMPUSE>::
+ AvlTree(const AvlTree<AVLMEL_TEMPUSE> &other)
+#if !defined( AVL_KEYLESS ) && defined ( WALKABLE )
+ /* BASELIST should be made empty. The copyBranch function
+ * will fill in the details for us. */
+ : Compare( other ), BASELIST()
+#elif !defined( AVL_KEYLESS )
+ : Compare( other )
+#elif defined( WALKABLE )
+ : BASELIST( )
+#endif
+{
+ treeSize = other.treeSize;
+ root = other.root;
+
+#ifndef WALKABLE
+ head = 0;
+ tail = 0;
+#endif
+
+ /* If there is a root, copy the tree. */
+ if ( other.root != 0 )
+ root = copyBranch( other.root );
+}
+
+#if defined( AVLTREE_MAP ) || defined( AVLTREE_SET )
+
+/* Assignment does deep copy. */
+template <AVLMEL_TEMPDEF> AvlTree<AVLMEL_TEMPUSE> &AvlTree<AVLMEL_TEMPUSE>::
+ operator=( const AvlTree &other )
+{
+ /* Clear the tree first. */
+ empty();
+
+ /* Reset the list pointers, the tree copy will fill in the list for us. */
+#ifdef WALKABLE
+ BASELIST::abandon();
+#else
+ head = 0;
+ tail = 0;
+#endif
+
+ /* Copy the entire tree. */
+ treeSize = other.treeSize;
+ root = other.root;
+ if ( other.root != 0 )
+ root = copyBranch( other.root );
+ return *this;
+}
+
+template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::
+ transfer(AvlTree<AVLMEL_TEMPUSE> &other)
+{
+ /* Clear the tree first. */
+ empty();
+
+ treeSize = other.treeSize;
+ root = other.root;
+
+#ifdef WALKABLE
+ BASELIST::head = other.BASELIST::head;
+ BASELIST::tail = other.BASELIST::tail;
+ BASELIST::listLen = other.BASELIST::listLen;
+#else
+ head = other.head;
+ tail = other.tail;
+#endif
+
+ other.abandon();
+}
+
+#else /* ! AVLTREE_MAP && ! AVLTREE_SET */
+
+/* Assignment does deep copy. This version does not clear the tree first. */
+template <AVLMEL_TEMPDEF> AvlTree<AVLMEL_TEMPUSE> &AvlTree<AVLMEL_TEMPUSE>::
+ operator=( const AvlTree &other )
+{
+ /* Reset the list pointers, the tree copy will fill in the list for us. */
+#ifdef WALKABLE
+ BASELIST::abandon();
+#else
+ head = 0;
+ tail = 0;
+#endif
+
+ /* Copy the entire tree. */
+ treeSize = other.treeSize;
+ root = other.root;
+ if ( other.root != 0 )
+ root = copyBranch( other.root );
+ return *this;
+}
+
+template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::
+ transfer(AvlTree<AVLMEL_TEMPUSE> &other)
+{
+ treeSize = other.treeSize;
+ root = other.root;
+
+#ifdef WALKABLE
+ BASELIST::head = other.BASELIST::head;
+ BASELIST::tail = other.BASELIST::tail;
+ BASELIST::listLen = other.BASELIST::listLen;
+#else
+ head = other.head;
+ tail = other.tail;
+#endif
+
+ other.abandon();
+}
+
+#endif
+
+/*
+ * Iterator operators.
+ */
+
+/* Prefix ++ */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::Iter::
+ operator++()
+{
+ return ptr = findNext( ptr );
+}
+
+/* Postfix ++ */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::Iter::
+ operator++(int)
+{
+ Element *rtn = ptr;
+ ptr = findNext( ptr );
+ return rtn;
+}
+
+/* increment */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::Iter::
+ increment()
+{
+ return ptr = findNext( ptr );
+}
+
+/* Prefix -- */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::Iter::
+ operator--()
+{
+ return ptr = findPrev( ptr );
+}
+
+/* Postfix -- */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::Iter::
+ operator--(int)
+{
+ Element *rtn = ptr;
+ ptr = findPrev( ptr );
+ return rtn;
+}
+
+/* decrement */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::Iter::
+ decrement()
+{
+ return ptr = findPrev( ptr );
+}
+
+#ifndef WALKABLE
+
+/* Move ahead one. */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::Iter::
+ findNext( Element *element )
+{
+ /* Try to go right once then infinite left. */
+ if ( element->BASE_EL(right) != 0 ) {
+ element = element->BASE_EL(right);
+ while ( element->BASE_EL(left) != 0 )
+ element = element->BASE_EL(left);
+ }
+ else {
+ /* Go up to parent until we were just a left child. */
+ while ( true ) {
+ Element *last = element;
+ element = element->BASE_EL(parent);
+ if ( element == 0 || element->BASE_EL(left) == last )
+ break;
+ }
+ }
+ return element;
+}
+
+/* Move back one. */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::Iter::
+ findPrev( Element *element )
+{
+ /* Try to go left once then infinite right. */
+ if ( element->BASE_EL(left) != 0 ) {
+ element = element->BASE_EL(left);
+ while ( element->BASE_EL(right) != 0 )
+ element = element->BASE_EL(right);
+ }
+ else {
+ /* Go up to parent until we were just a left child. */
+ while ( true ) {
+ Element *last = element;
+ element = element->BASE_EL(parent);
+ if ( element == 0 || element->BASE_EL(right) == last )
+ break;
+ }
+ }
+ return element;
+}
+
+#endif
+
+
+/* Recursive worker for tree copying. */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ copyBranch( Element *element )
+{
+ /* Duplicate element. Either the base element's copy constructor or defaul
+ * constructor will get called. Both will suffice for initting the
+ * pointers to null when they need to be. */
+ Element *retVal = new Element(*element);
+
+ /* If the left tree is there, copy it. */
+ if ( retVal->BASE_EL(left) ) {
+ retVal->BASE_EL(left) = copyBranch(retVal->BASE_EL(left));
+ retVal->BASE_EL(left)->BASE_EL(parent) = retVal;
+ }
+
+#ifdef WALKABLE
+ BASELIST::addAfter( BASELIST::tail, retVal );
+#else
+ if ( head == 0 )
+ head = retVal;
+ tail = retVal;
+#endif
+
+ /* If the right tree is there, copy it. */
+ if ( retVal->BASE_EL(right) ) {
+ retVal->BASE_EL(right) = copyBranch(retVal->BASE_EL(right));
+ retVal->BASE_EL(right)->BASE_EL(parent) = retVal;
+ }
+ return retVal;
+}
+
+/* Once an insertion position is found, attach a element to the tree. */
+template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::
+ attachRebal( Element *element, Element *parentEl, Element *lastLess )
+{
+ /* Increment the number of element in the tree. */
+ treeSize += 1;
+
+ /* Set element's parent. */
+ element->BASE_EL(parent) = parentEl;
+
+ /* New element always starts as a leaf with height 1. */
+ element->BASE_EL(left) = 0;
+ element->BASE_EL(right) = 0;
+ element->BASE_EL(height) = 1;
+
+ /* Are we inserting in the tree somewhere? */
+ if ( parentEl != 0 ) {
+ /* We have a parent so we are somewhere in the tree. If the parent
+ * equals lastLess, then the last traversal in the insertion went
+ * left, otherwise it went right. */
+ if ( lastLess == parentEl ) {
+ parentEl->BASE_EL(left) = element;
+#ifdef WALKABLE
+ BASELIST::addBefore( parentEl, element );
+#endif
+ }
+ else {
+ parentEl->BASE_EL(right) = element;
+#ifdef WALKABLE
+ BASELIST::addAfter( parentEl, element );
+#endif
+ }
+
+#ifndef WALKABLE
+ /* Maintain the first and last pointers. */
+ if ( head->BASE_EL(left) == element )
+ head = element;
+
+ /* Maintain the first and last pointers. */
+ if ( tail->BASE_EL(right) == element )
+ tail = element;
+#endif
+ }
+ else {
+ /* No parent element so we are inserting the root. */
+ root = element;
+#ifdef WALKABLE
+ BASELIST::addAfter( BASELIST::tail, element );
+#else
+ head = tail = element;
+#endif
+ }
+
+
+ /* Recalculate the heights. */
+ recalcHeights(parentEl);
+
+ /* Find the first unbalance. */
+ Element *ub = findFirstUnbalGP(element);
+
+ /* rebalance. */
+ if ( ub != 0 )
+ {
+ /* We assert that after this single rotation the
+ * tree is now properly balanced. */
+ rebalance(ub);
+ }
+}
+
+#ifndef AVL_KEYLESS
+
+/**
+ * \brief Insert an existing element into the tree.
+ *
+ * If the insert succeeds and lastFound is given then it is set to the element
+ * inserted. If the insert fails then lastFound is set to the existing element in
+ * the tree that has the same key as element. If the element's avl pointers are
+ * already in use then undefined behaviour results.
+ *
+ * \returns The element inserted upon success, null upon failure.
+ */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ insert( Element *element, Element **lastFound )
+{
+ long keyRelation;
+ Element *curEl = root, *parentEl = 0;
+ Element *lastLess = 0;
+
+ while (true) {
+ if ( curEl == 0 ) {
+ /* We are at an external element and did not find the key we were
+ * looking for. Attach underneath the leaf and rebalance. */
+ attachRebal( element, parentEl, lastLess );
+
+ if ( lastFound != 0 )
+ *lastFound = element;
+ return element;
+ }
+
+#ifdef AVL_BASIC
+ keyRelation = this->compare( *element, *curEl );
+#else
+ keyRelation = this->compare( element->BASEKEY(getKey()),
+ curEl->BASEKEY(getKey()) );
+#endif
+
+ /* Do we go left? */
+ if ( keyRelation < 0 ) {
+ parentEl = lastLess = curEl;
+ curEl = curEl->BASE_EL(left);
+ }
+ /* Do we go right? */
+ else if ( keyRelation > 0 ) {
+ parentEl = curEl;
+ curEl = curEl->BASE_EL(right);
+ }
+ /* We have hit the target. */
+ else {
+ if ( lastFound != 0 )
+ *lastFound = curEl;
+ return 0;
+ }
+ }
+}
+
+#ifdef AVL_BASIC
+
+/**
+ * \brief Find a element in the tree with the given key.
+ *
+ * \returns The element if key exists, null if the key does not exist.
+ */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ find( const Element *element ) const
+{
+ Element *curEl = root;
+ long keyRelation;
+
+ while (curEl) {
+ keyRelation = this->compare( *element, *curEl );
+
+ /* Do we go left? */
+ if ( keyRelation < 0 )
+ curEl = curEl->BASE_EL(left);
+ /* Do we go right? */
+ else if ( keyRelation > 0 )
+ curEl = curEl->BASE_EL(right);
+ /* We have hit the target. */
+ else {
+ return curEl;
+ }
+ }
+ return 0;
+}
+
+#else
+
+/**
+ * \brief Insert a new element into the tree with given key.
+ *
+ * If the key is not already in the tree then a new element is made using the
+ * Element(const Key &key) constructor and the insert succeeds. If lastFound is
+ * given then it is set to the element inserted. If the insert fails then
+ * lastFound is set to the existing element in the tree that has the same key as
+ * element.
+ *
+ * \returns The new element upon success, null upon failure.
+ */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ insert( const Key &key, Element **lastFound )
+{
+ long keyRelation;
+ Element *curEl = root, *parentEl = 0;
+ Element *lastLess = 0;
+
+ while (true) {
+ if ( curEl == 0 ) {
+ /* We are at an external element and did not find the key we were
+ * looking for. Create the new element, attach it underneath the leaf
+ * and rebalance. */
+ Element *element = new Element( key );
+ attachRebal( element, parentEl, lastLess );
+
+ if ( lastFound != 0 )
+ *lastFound = element;
+ return element;
+ }
+
+ keyRelation = this->compare( key, curEl->BASEKEY(getKey()) );
+
+ /* Do we go left? */
+ if ( keyRelation < 0 ) {
+ parentEl = lastLess = curEl;
+ curEl = curEl->BASE_EL(left);
+ }
+ /* Do we go right? */
+ else if ( keyRelation > 0 ) {
+ parentEl = curEl;
+ curEl = curEl->BASE_EL(right);
+ }
+ /* We have hit the target. */
+ else {
+ if ( lastFound != 0 )
+ *lastFound = curEl;
+ return 0;
+ }
+ }
+}
+
+#ifdef AVLTREE_MAP
+/**
+ * \brief Insert a new element into the tree with key and value.
+ *
+ * If the key is not already in the tree then a new element is constructed and
+ * the insert succeeds. If lastFound is given then it is set to the element
+ * inserted. If the insert fails then lastFound is set to the existing element in
+ * the tree that has the same key as element. This insert routine is only
+ * available in AvlMap because it is the only class that knows about a Value
+ * type.
+ *
+ * \returns The new element upon success, null upon failure.
+ */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ insert( const Key &key, const Value &val, Element **lastFound )
+{
+ long keyRelation;
+ Element *curEl = root, *parentEl = 0;
+ Element *lastLess = 0;
+
+ while (true) {
+ if ( curEl == 0 ) {
+ /* We are at an external element and did not find the key we were
+ * looking for. Create the new element, attach it underneath the leaf
+ * and rebalance. */
+ Element *element = new Element( key, val );
+ attachRebal( element, parentEl, lastLess );
+
+ if ( lastFound != 0 )
+ *lastFound = element;
+ return element;
+ }
+
+ keyRelation = this->compare(key, curEl->getKey());
+
+ /* Do we go left? */
+ if ( keyRelation < 0 ) {
+ parentEl = lastLess = curEl;
+ curEl = curEl->BASE_EL(left);
+ }
+ /* Do we go right? */
+ else if ( keyRelation > 0 ) {
+ parentEl = curEl;
+ curEl = curEl->BASE_EL(right);
+ }
+ /* We have hit the target. */
+ else {
+ if ( lastFound != 0 )
+ *lastFound = curEl;
+ return 0;
+ }
+ }
+}
+#endif /* AVLTREE_MAP */
+
+
+/**
+ * \brief Find a element in the tree with the given key.
+ *
+ * \returns The element if key exists, null if the key does not exist.
+ */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ find( const Key &key ) const
+{
+ Element *curEl = root;
+ long keyRelation;
+
+ while (curEl) {
+ keyRelation = this->compare( key, curEl->BASEKEY(getKey()) );
+
+ /* Do we go left? */
+ if ( keyRelation < 0 )
+ curEl = curEl->BASE_EL(left);
+ /* Do we go right? */
+ else if ( keyRelation > 0 )
+ curEl = curEl->BASE_EL(right);
+ /* We have hit the target. */
+ else {
+ return curEl;
+ }
+ }
+ return 0;
+}
+
+
+/**
+ * \brief Find a element, then detach it from the tree.
+ *
+ * The element is not deleted.
+ *
+ * \returns The element detached if the key is found, othewise returns null.
+ */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ detach(const Key &key)
+{
+ Element *element = find( key );
+ if ( element ) {
+ detach(element);
+ }
+
+ return element;
+}
+
+/**
+ * \brief Find, detach and delete a element from the tree.
+ *
+ * \returns True if the element was found and deleted, false otherwise.
+ */
+template <AVLMEL_TEMPDEF> bool AvlTree<AVLMEL_TEMPUSE>::
+ remove(const Key &key)
+{
+ /* Assume not found. */
+ bool retVal = false;
+
+ /* Look for the key. */
+ Element *element = find( key );
+ if ( element != 0 ) {
+ /* If found, detach the element and delete. */
+ detach( element );
+ delete element;
+ retVal = true;
+ }
+
+ return retVal;
+}
+
+#endif /* AVL_BASIC */
+#endif /* AVL_KEYLESS */
+
+
+/**
+ * \brief Detach and delete a element from the tree.
+ *
+ * If the element is not in the tree then undefined behaviour results.
+ */
+template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::
+ remove(Element *element)
+{
+ /* Detach and delete. */
+ detach(element);
+ delete element;
+}
+
+/**
+ * \brief Detach a element from the tree.
+ *
+ * If the element is not in the tree then undefined behaviour results.
+ *
+ * \returns The element given.
+ */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ detach(Element *element)
+{
+ Element *replacement, *fixfrom;
+ long lheight, rheight;
+
+#ifdef WALKABLE
+ /* Remove the element from the ordered list. */
+ BASELIST::detach( element );
+#endif
+
+ /* Update treeSize. */
+ treeSize--;
+
+ /* Find a replacement element. */
+ if (element->BASE_EL(right))
+ {
+ /* Find the leftmost element of the right subtree. */
+ replacement = element->BASE_EL(right);
+ while (replacement->BASE_EL(left))
+ replacement = replacement->BASE_EL(left);
+
+ /* If replacing the element the with its child then we need to start
+ * fixing at the replacement, otherwise we start fixing at the
+ * parent of the replacement. */
+ if (replacement->BASE_EL(parent) == element)
+ fixfrom = replacement;
+ else
+ fixfrom = replacement->BASE_EL(parent);
+
+#ifndef WALKABLE
+ if ( element == head )
+ head = replacement;
+#endif
+
+ removeEl(replacement, replacement->BASE_EL(right));
+ replaceEl(element, replacement);
+ }
+ else if (element->BASE_EL(left))
+ {
+ /* Find the rightmost element of the left subtree. */
+ replacement = element->BASE_EL(left);
+ while (replacement->BASE_EL(right))
+ replacement = replacement->BASE_EL(right);
+
+ /* If replacing the element the with its child then we need to start
+ * fixing at the replacement, otherwise we start fixing at the
+ * parent of the replacement. */
+ if (replacement->BASE_EL(parent) == element)
+ fixfrom = replacement;
+ else
+ fixfrom = replacement->BASE_EL(parent);
+
+#ifndef WALKABLE
+ if ( element == tail )
+ tail = replacement;
+#endif
+
+ removeEl(replacement, replacement->BASE_EL(left));
+ replaceEl(element, replacement);
+ }
+ else
+ {
+ /* We need to start fixing at the parent of the element. */
+ fixfrom = element->BASE_EL(parent);
+
+#ifndef WALKABLE
+ if ( element == head )
+ head = element->BASE_EL(parent);
+ if ( element == tail )
+ tail = element->BASE_EL(parent);
+#endif
+
+ /* The element we are deleting is a leaf element. */
+ removeEl(element, 0);
+ }
+
+ /* If fixfrom is null it means we just deleted
+ * the root of the tree. */
+ if ( fixfrom == 0 )
+ return element;
+
+ /* Fix the heights after the deletion. */
+ recalcHeights(fixfrom);
+
+ /* Fix every unbalanced element going up in the tree. */
+ Element *ub = findFirstUnbalEl(fixfrom);
+ while ( ub )
+ {
+ /* Find the element to rebalance by moving down from the first unbalanced
+ * element 2 levels in the direction of the greatest heights. On the
+ * second move down, the heights may be equal ( but not on the first ).
+ * In which case go in the direction of the first move. */
+ lheight = ub->BASE_EL(left) ? ub->BASE_EL(left)->BASE_EL(height) : 0;
+ rheight = ub->BASE_EL(right) ? ub->BASE_EL(right)->BASE_EL(height) : 0;
+ assert( lheight != rheight );
+ if (rheight > lheight)
+ {
+ ub = ub->BASE_EL(right);
+ lheight = ub->BASE_EL(left) ?
+ ub->BASE_EL(left)->BASE_EL(height) : 0;
+ rheight = ub->BASE_EL(right) ?
+ ub->BASE_EL(right)->BASE_EL(height) : 0;
+ if (rheight > lheight)
+ ub = ub->BASE_EL(right);
+ else if (rheight < lheight)
+ ub = ub->BASE_EL(left);
+ else
+ ub = ub->BASE_EL(right);
+ }
+ else
+ {
+ ub = ub->BASE_EL(left);
+ lheight = ub->BASE_EL(left) ?
+ ub->BASE_EL(left)->BASE_EL(height) : 0;
+ rheight = ub->BASE_EL(right) ?
+ ub->BASE_EL(right)->BASE_EL(height) : 0;
+ if (rheight > lheight)
+ ub = ub->BASE_EL(right);
+ else if (rheight < lheight)
+ ub = ub->BASE_EL(left);
+ else
+ ub = ub->BASE_EL(left);
+ }
+
+
+ /* rebalance returns the grandparant of the subtree formed
+ * by the element that were rebalanced.
+ * We must continue upward from there rebalancing. */
+ fixfrom = rebalance(ub);
+
+ /* Find the next unbalaced element. */
+ ub = findFirstUnbalEl(fixfrom);
+ }
+
+ return element;
+}
+
+
+/**
+ * \brief Empty the tree and delete all the element.
+ *
+ * Resets the tree to its initial state.
+ */
+template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::empty()
+{
+ if ( root ) {
+ /* Recursively delete from the tree structure. */
+ deleteChildrenOf(root);
+ delete root;
+ root = 0;
+ treeSize = 0;
+
+#ifdef WALKABLE
+ BASELIST::abandon();
+#endif
+ }
+}
+
+/**
+ * \brief Forget all element in the tree.
+ *
+ * Does not delete element. Resets the the tree to it's initial state.
+ */
+template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::abandon()
+{
+ root = 0;
+ treeSize = 0;
+
+#ifdef WALKABLE
+ BASELIST::abandon();
+#endif
+}
+
+/* Recursively delete all the children of a element. */
+template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::
+ deleteChildrenOf( Element *element )
+{
+ /* Recurse left. */
+ if (element->BASE_EL(left)) {
+ deleteChildrenOf(element->BASE_EL(left));
+
+ /* Delete left element. */
+ delete element->BASE_EL(left);
+ element->BASE_EL(left) = 0;
+ }
+
+ /* Recurse right. */
+ if (element->BASE_EL(right)) {
+ deleteChildrenOf(element->BASE_EL(right));
+
+ /* Delete right element. */
+ delete element->BASE_EL(right);
+ element->BASE_EL(left) = 0;
+ }
+}
+
+/* rebalance from a element whose gradparent is unbalanced. Only
+ * call on a element that has a grandparent. */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ rebalance(Element *n)
+{
+ long lheight, rheight;
+ Element *a, *b, *c;
+ Element *t1, *t2, *t3, *t4;
+
+ Element *p = n->BASE_EL(parent); /* parent (Non-NUL). L*/
+ Element *gp = p->BASE_EL(parent); /* Grand-parent (Non-NULL). */
+ Element *ggp = gp->BASE_EL(parent); /* Great grand-parent (may be NULL). */
+
+ if (gp->BASE_EL(right) == p)
+ {
+ /* gp
+ * \
+ * p
+ */
+ if (p->BASE_EL(right) == n)
+ {
+ /* gp
+ * \
+ * p
+ * \
+ * n
+ */
+ a = gp;
+ b = p;
+ c = n;
+ t1 = gp->BASE_EL(left);
+ t2 = p->BASE_EL(left);
+ t3 = n->BASE_EL(left);
+ t4 = n->BASE_EL(right);
+ }
+ else
+ {
+ /* gp
+ * \
+ * p
+ * /
+ * n
+ */
+ a = gp;
+ b = n;
+ c = p;
+ t1 = gp->BASE_EL(left);
+ t2 = n->BASE_EL(left);
+ t3 = n->BASE_EL(right);
+ t4 = p->BASE_EL(right);
+ }
+ }
+ else
+ {
+ /* gp
+ * /
+ * p
+ */
+ if (p->BASE_EL(right) == n)
+ {
+ /* gp
+ * /
+ * p
+ * \
+ * n
+ */
+ a = p;
+ b = n;
+ c = gp;
+ t1 = p->BASE_EL(left);
+ t2 = n->BASE_EL(left);
+ t3 = n->BASE_EL(right);
+ t4 = gp->BASE_EL(right);
+ }
+ else
+ {
+ /* gp
+ * /
+ * p
+ * /
+ * n
+ */
+ a = n;
+ b = p;
+ c = gp;
+ t1 = n->BASE_EL(left);
+ t2 = n->BASE_EL(right);
+ t3 = p->BASE_EL(right);
+ t4 = gp->BASE_EL(right);
+ }
+ }
+
+ /* Perform rotation.
+ */
+
+ /* Tie b to the great grandparent. */
+ if ( ggp == 0 )
+ root = b;
+ else if ( ggp->BASE_EL(left) == gp )
+ ggp->BASE_EL(left) = b;
+ else
+ ggp->BASE_EL(right) = b;
+ b->BASE_EL(parent) = ggp;
+
+ /* Tie a as a leftchild of b. */
+ b->BASE_EL(left) = a;
+ a->BASE_EL(parent) = b;
+
+ /* Tie c as a rightchild of b. */
+ b->BASE_EL(right) = c;
+ c->BASE_EL(parent) = b;
+
+ /* Tie t1 as a leftchild of a. */
+ a->BASE_EL(left) = t1;
+ if ( t1 != 0 ) t1->BASE_EL(parent) = a;
+
+ /* Tie t2 as a rightchild of a. */
+ a->BASE_EL(right) = t2;
+ if ( t2 != 0 ) t2->BASE_EL(parent) = a;
+
+ /* Tie t3 as a leftchild of c. */
+ c->BASE_EL(left) = t3;
+ if ( t3 != 0 ) t3->BASE_EL(parent) = c;
+
+ /* Tie t4 as a rightchild of c. */
+ c->BASE_EL(right) = t4;
+ if ( t4 != 0 ) t4->BASE_EL(parent) = c;
+
+ /* The heights are all recalculated manualy and the great
+ * grand-parent is passed to recalcHeights() to ensure
+ * the heights are correct up the tree.
+ *
+ * Note that recalcHeights() cuts out when it comes across
+ * a height that hasn't changed.
+ */
+
+ /* Fix height of a. */
+ lheight = a->BASE_EL(left) ? a->BASE_EL(left)->BASE_EL(height) : 0;
+ rheight = a->BASE_EL(right) ? a->BASE_EL(right)->BASE_EL(height) : 0;
+ a->BASE_EL(height) = (lheight > rheight ? lheight : rheight) + 1;
+
+ /* Fix height of c. */
+ lheight = c->BASE_EL(left) ? c->BASE_EL(left)->BASE_EL(height) : 0;
+ rheight = c->BASE_EL(right) ? c->BASE_EL(right)->BASE_EL(height) : 0;
+ c->BASE_EL(height) = (lheight > rheight ? lheight : rheight) + 1;
+
+ /* Fix height of b. */
+ lheight = a->BASE_EL(height);
+ rheight = c->BASE_EL(height);
+ b->BASE_EL(height) = (lheight > rheight ? lheight : rheight) + 1;
+
+ /* Fix height of b's parents. */
+ recalcHeights(ggp);
+ return ggp;
+}
+
+/* Recalculates the heights of all the ancestors of element. */
+template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::
+ recalcHeights(Element *element)
+{
+ long lheight, rheight, new_height;
+ while ( element != 0 )
+ {
+ lheight = element->BASE_EL(left) ? element->BASE_EL(left)->BASE_EL(height) : 0;
+ rheight = element->BASE_EL(right) ? element->BASE_EL(right)->BASE_EL(height) : 0;
+
+ new_height = (lheight > rheight ? lheight : rheight) + 1;
+
+ /* If there is no chage in the height, then there will be no
+ * change in any of the ancestor's height. We can stop going up.
+ * If there was a change, continue upward. */
+ if (new_height == element->BASE_EL(height))
+ return;
+ else
+ element->BASE_EL(height) = new_height;
+
+ element = element->BASE_EL(parent);
+ }
+}
+
+/* Finds the first element whose grandparent is unbalanced. */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ findFirstUnbalGP(Element *element)
+{
+ long lheight, rheight, balanceProp;
+ Element *gp;
+
+ if ( element == 0 || element->BASE_EL(parent) == 0 ||
+ element->BASE_EL(parent)->BASE_EL(parent) == 0 )
+ return 0;
+
+ /* Don't do anything if we we have no grandparent. */
+ gp = element->BASE_EL(parent)->BASE_EL(parent);
+ while ( gp != 0 )
+ {
+ lheight = gp->BASE_EL(left) ? gp->BASE_EL(left)->BASE_EL(height) : 0;
+ rheight = gp->BASE_EL(right) ? gp->BASE_EL(right)->BASE_EL(height) : 0;
+ balanceProp = lheight - rheight;
+
+ if ( balanceProp < -1 || balanceProp > 1 )
+ return element;
+
+ element = element->BASE_EL(parent);
+ gp = gp->BASE_EL(parent);
+ }
+ return 0;
+}
+
+
+/* Finds the first element that is unbalanced. */
+template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ findFirstUnbalEl(Element *element)
+{
+ if ( element == 0 )
+ return 0;
+
+ while ( element != 0 )
+ {
+ long lheight = element->BASE_EL(left) ?
+ element->BASE_EL(left)->BASE_EL(height) : 0;
+ long rheight = element->BASE_EL(right) ?
+ element->BASE_EL(right)->BASE_EL(height) : 0;
+ long balanceProp = lheight - rheight;
+
+ if ( balanceProp < -1 || balanceProp > 1 )
+ return element;
+
+ element = element->BASE_EL(parent);
+ }
+ return 0;
+}
+
+/* Replace a element in the tree with another element not in the tree. */
+template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::
+ replaceEl(Element *element, Element *replacement)
+{
+ Element *parent = element->BASE_EL(parent),
+ *left = element->BASE_EL(left),
+ *right = element->BASE_EL(right);
+
+ replacement->BASE_EL(left) = left;
+ if (left)
+ left->BASE_EL(parent) = replacement;
+ replacement->BASE_EL(right) = right;
+ if (right)
+ right->BASE_EL(parent) = replacement;
+
+ replacement->BASE_EL(parent) = parent;
+ if (parent)
+ {
+ if (parent->BASE_EL(left) == element)
+ parent->BASE_EL(left) = replacement;
+ else
+ parent->BASE_EL(right) = replacement;
+ }
+ else
+ root = replacement;
+
+ replacement->BASE_EL(height) = element->BASE_EL(height);
+}
+
+/* Removes a element from a tree and puts filler in it's place.
+ * Filler should be null or a child of element. */
+template <AVLMEL_TEMPDEF> void AvlTree<AVLMEL_TEMPUSE>::
+ removeEl(Element *element, Element *filler)
+{
+ Element *parent = element->BASE_EL(parent);
+
+ if (parent)
+ {
+ if (parent->BASE_EL(left) == element)
+ parent->BASE_EL(left) = filler;
+ else
+ parent->BASE_EL(right) = filler;
+ }
+ else
+ root = filler;
+
+ if (filler)
+ filler->BASE_EL(parent) = parent;
+
+ return;
+}
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
diff --git a/aapl/avlibasic.h b/aapl/avlibasic.h
new file mode 100644
index 0000000..b916f74
--- /dev/null
+++ b/aapl/avlibasic.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLIBASIC_H
+#define _AAPL_AVLIBASIC_H
+
+#include "compare.h"
+
+/**
+ * \addtogroup avlitree
+ * @{
+ */
+
+/**
+ * \class AvliBasic
+ * \brief Linked AVL Tree in which the entire element structure is the key.
+ *
+ * AvliBasic is a linked AVL tree that does not distinguish between the
+ * element that it contains and the key. The entire element structure is the
+ * key that is used to compare the relative ordering of elements. This is
+ * similar to the BstSet structure.
+ *
+ * AvliBasic does not assume ownership of elements in the tree. Items must be
+ * explicitly de-allocated.
+ */
+
+/*@}*/
+
+#define BASE_EL(name) name
+#define BASEKEY(name) name
+#define AVLMEL_CLASSDEF class Element, class Compare
+#define AVLMEL_TEMPDEF class Element, class Compare
+#define AVLMEL_TEMPUSE Element, Compare
+#define AvlTree AvliBasic
+#define AVL_BASIC
+#define WALKABLE
+
+#include "avlcommon.h"
+
+#undef BASE_EL
+#undef BASEKEY
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef AVL_BASIC
+#undef WALKABLE
+
+#endif /* _AAPL_AVLIBASIC_H */
diff --git a/aapl/avlikeyless.h b/aapl/avlikeyless.h
new file mode 100644
index 0000000..0c60608
--- /dev/null
+++ b/aapl/avlikeyless.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2002, 2003 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLIKEYLESS_H
+#define _AAPL_AVLIKEYLESS_H
+
+#include "compare.h"
+#include "dlistmel.h"
+
+/**
+ * \addtogroup avlitree
+ * @{
+ */
+
+/**
+ * \class AvliKeyless
+ * \brief Linked AVL tree that has no insert/find/remove functions that take a
+ * key.
+ *
+ * AvliKeyless is an implementation of the AVL tree rebalancing functionality
+ * only. It provides the common code for the tiny AVL tree implementations.
+ */
+
+/*@}*/
+
+#define BASE_EL(name) name
+#define BASELIST DListMel< Element, AvliTreeEl<Element> >
+#define AVLMEL_CLASSDEF class Element
+#define AVLMEL_TEMPDEF class Element
+#define AVLMEL_TEMPUSE Element
+#define AvlTree AvliKeyless
+#define WALKABLE
+#define AVL_KEYLESS
+
+#include "avlcommon.h"
+
+#undef BASE_EL
+#undef BASELIST
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef WALKABLE
+#undef AVL_KEYLESS
+
+#endif /* _AAPL_AVLIKEYLESS_H */
diff --git a/aapl/avlimap.h b/aapl/avlimap.h
new file mode 100644
index 0000000..c207dc5
--- /dev/null
+++ b/aapl/avlimap.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLIMAP_H
+#define _AAPL_AVLIMAP_H
+
+#include "compare.h"
+#include "dlist.h"
+
+/**
+ * \addtogroup avlitree
+ * @{
+ */
+
+/**
+ * \class AvliMap
+ * \brief Linked key and value oriented AVL tree.
+ *
+ * AvliMap stores key and value pairs in elements that managed by the tree. It
+ * is intendend to be similar to map template found in the STL. AvliMap
+ * requires that a Key type, a Value type, and a class containing a compare()
+ * routine for Key be given. Items can be inserted with just a key or with a
+ * key and value pair.
+ *
+ * AvliMap assumes all elements in the tree are allocated on the heap and are
+ * to be managed by the tree. This means that the class destructor will delete
+ * the contents of the tree. A deep copy will cause existing elements to be
+ * deleted first.
+ *
+ * \include ex_avlimap.cpp
+ */
+
+/*@}*/
+
+#define AVLTREE_MAP
+#define BASE_EL(name) name
+#define BASEKEY(name) name
+#define BASELIST DList< AvliMapEl<Key,Value> >
+#define AVLMEL_CLASSDEF class Key, class Value, class Compare = CmpOrd<Key>
+#define AVLMEL_TEMPDEF class Key, class Value, class Compare
+#define AVLMEL_TEMPUSE Key, Value, Compare
+#define AvlTree AvliMap
+#define Element AvliMapEl<Key,Value>
+#define WALKABLE
+
+#include "avlcommon.h"
+
+#undef AVLTREE_MAP
+#undef BASE_EL
+#undef BASEKEY
+#undef BASELIST
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef Element
+#undef WALKABLE
+
+#endif /* _AAPL_AVLIMAP_H */
diff --git a/aapl/avlimel.h b/aapl/avlimel.h
new file mode 100644
index 0000000..bceddcd
--- /dev/null
+++ b/aapl/avlimel.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLIMEL_H
+#define _AAPL_AVLIMEL_H
+
+#include "compare.h"
+#include "dlistmel.h"
+
+/**
+ * \addtogroup avlitree
+ * @{
+ */
+
+/**
+ * \class AvliMel
+ * \brief Linked AVL tree for element appearing in multiple trees.
+ *
+ * AvliMel allows for an element to simultaneously be in multiple trees without
+ * the trees interferring with one another. For each tree that the element is
+ * to appear in, there must be a distinct set of AVL Tree management data that
+ * can be unambiguously referenced with some base class name. This name
+ * is passed to the tree as a template parameter and is used in the tree
+ * algorithms.
+ *
+ * The element must use the same key type and value in each tree that it
+ * appears in. If distinct keys are required, the AvliMelKey structure is
+ * available.
+ *
+ * AvliMel does not assume ownership of elements in the tree. The destructor
+ * will not delete the elements. If the user wishes to explicitly deallocate
+ * all the items in the tree the empty() routine is available.
+ *
+ * \include ex_avlimel.cpp
+ */
+
+/*@}*/
+
+#define BASE_EL(name) BaseEl::name
+#define BASEKEY(name) name
+#define BASELIST DListMel< Element, BaseEl >
+#define AVLMEL_CLASSDEF class Element, class Key, \
+ class BaseEl, class Compare = CmpOrd<Key>
+#define AVLMEL_TEMPDEF class Element, class Key, \
+ class BaseEl, class Compare
+#define AVLMEL_TEMPUSE Element, Key, BaseEl, Compare
+#define AvlTree AvliMel
+#define WALKABLE
+
+#include "avlcommon.h"
+
+#undef BASE_EL
+#undef BASEKEY
+#undef BASELIST
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef WALKABLE
+
+#endif /* _AAPL_AVLIMEL_H */
diff --git a/aapl/avlimelkey.h b/aapl/avlimelkey.h
new file mode 100644
index 0000000..52d3a40
--- /dev/null
+++ b/aapl/avlimelkey.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLIMELKEY_H
+#define _AAPL_AVLIMELKEY_H
+
+#include "compare.h"
+#include "dlistmel.h"
+
+/**
+ * \addtogroup avlitree
+ * @{
+ */
+
+/**
+ * \class AvliMelKey
+ * \brief Linked AVL tree for element appearing in multiple trees with different keys.
+ *
+ * AvliMelKey is similar to AvliMel, except that an additional template
+ * parameter, BaseKey, is provided for resolving ambiguous references to
+ * getKey(). This means that if an element is stored in multiple trees, each
+ * tree can use a different key for ordering the elements in it. Using
+ * AvliMelKey an array of data structures can be indexed with an O(log(n))
+ * search on two or more of the values contained within it and without
+ * allocating any additional data.
+ *
+ * AvliMelKey does not assume ownership of elements in the tree. The destructor
+ * will not delete the elements. If the user wishes to explicitly deallocate
+ * all the items in the tree the empty() routine is available.
+ *
+ * \include ex_avlimelkey.cpp
+ */
+
+/*@}*/
+
+#define BASE_EL(name) BaseEl::name
+#define BASEKEY(name) BaseKey::name
+#define BASELIST DListMel< Element, BaseEl >
+#define AVLMEL_CLASSDEF class Element, class Key, class BaseEl, \
+ class BaseKey, class Compare = CmpOrd<Key>
+#define AVLMEL_TEMPDEF class Element, class Key, class BaseEl, \
+ class BaseKey, class Compare
+#define AVLMEL_TEMPUSE Element, Key, BaseEl, BaseKey, Compare
+#define AvlTree AvliMelKey
+#define WALKABLE
+
+#include "avlcommon.h"
+
+#undef BASE_EL
+#undef BASEKEY
+#undef BASELIST
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef WALKABLE
+
+#endif /* _AAPL_AVLIMELKEY_H */
diff --git a/aapl/avliset.h b/aapl/avliset.h
new file mode 100644
index 0000000..9594e7d
--- /dev/null
+++ b/aapl/avliset.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLISET_H
+#define _AAPL_AVLISET_H
+
+#include "compare.h"
+#include "dlist.h"
+
+/**
+ * \addtogroup avlitree
+ * @{
+ */
+
+/**
+ * \class AvliSet
+ * \brief Linked Key-only oriented tree.
+ *
+ * AvliSet stores only keys in elements that are managed by the tree. AvliSet
+ * requires that a Key type and a class containing a compare() routine
+ * for Key be given. Items are inserted with just a key value.
+ *
+ * AvliSet assumes all elements in the tree are allocated on the heap and are
+ * to be managed by the tree. This means that the class destructor will delete
+ * the contents of the tree. A deep copy will cause existing elements to be
+ * deleted first.
+ *
+ * \include ex_avliset.cpp
+ */
+
+/*@}*/
+
+#define AVLTREE_SET
+#define BASE_EL(name) name
+#define BASEKEY(name) name
+#define BASELIST DList< AvliSetEl<Key> >
+#define AVLMEL_CLASSDEF class Key, class Compare = CmpOrd<Key>
+#define AVLMEL_TEMPDEF class Key, class Compare
+#define AVLMEL_TEMPUSE Key, Compare
+#define AvlTree AvliSet
+#define Element AvliSetEl<Key>
+#define WALKABLE
+
+#include "avlcommon.h"
+
+#undef AVLTREE_SET
+#undef BASE_EL
+#undef BASEKEY
+#undef BASELIST
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef Element
+#undef WALKABLE
+
+#endif /* _AAPL_AVLISET_H */
diff --git a/aapl/avlitree.h b/aapl/avlitree.h
new file mode 100644
index 0000000..28394bb
--- /dev/null
+++ b/aapl/avlitree.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLITREE_H
+#define _AAPL_AVLITREE_H
+
+#include "compare.h"
+#include "dlistmel.h"
+
+/**
+ * \addtogroup avlitree
+ * @{
+ */
+
+/**
+ * \class AvliTree
+ * \brief Linked AVL tree.
+ *
+ * AvliTree is the standard linked by-structure AVL tree. To use this
+ * structure the user must define an element type and give it the necessary
+ * properties. At the very least it must have a getKey() function that will be
+ * used to compare the relative ordering of elements and tree management data
+ * necessary for the AVL algorithm. An element type can acquire the management
+ * data by inheriting the AvliTreeEl class.
+ *
+ * AvliTree does not presume to manage the allocation of elements in the tree.
+ * The destructor will not delete the items in the tree, instead the elements
+ * must be explicitly de-allocated by the user if necessary and when it is
+ * safe to do so. The empty() routine will traverse the tree and delete all
+ * items.
+ *
+ * Since the tree does not manage the elements, it can contain elements that
+ * are allocated statically or that are part of another data structure.
+ *
+ * \include ex_avlitree.cpp
+ */
+
+/*@}*/
+
+#define BASE_EL(name) name
+#define BASEKEY(name) name
+#define BASELIST DListMel< Element, AvliTreeEl<Element> >
+#define AVLMEL_CLASSDEF class Element, class Key, class Compare = CmpOrd<Key>
+#define AVLMEL_TEMPDEF class Element, class Key, class Compare
+#define AVLMEL_TEMPUSE Element, Key, Compare
+#define AvlTree AvliTree
+#define WALKABLE
+
+#include "avlcommon.h"
+
+#undef BASE_EL
+#undef BASEKEY
+#undef BASELIST
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef WALKABLE
+
+#endif /* _AAPL_AVLITREE_H */
diff --git a/aapl/avlkeyless.h b/aapl/avlkeyless.h
new file mode 100644
index 0000000..fecf8bd
--- /dev/null
+++ b/aapl/avlkeyless.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2002, 2003 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLKEYLESS_H
+#define _AAPL_AVLKEYLESS_H
+
+#include "compare.h"
+
+/**
+ * \addtogroup avltree
+ * @{
+ */
+
+/**
+ * \class AvlKeyless
+ * \brief AVL tree that has no insert/find/remove functions that take a key.
+ *
+ * AvlKeyless is an implementation of the AVL tree rebalancing functionality
+ * only. It provides the common code for the tiny AVL tree implementations.
+ */
+
+/*@}*/
+
+#define BASE_EL(name) name
+#define AVLMEL_CLASSDEF class Element
+#define AVLMEL_TEMPDEF class Element
+#define AVLMEL_TEMPUSE Element
+#define AvlTree AvlKeyless
+#define AVL_KEYLESS
+
+#include "avlcommon.h"
+
+#undef BASE_EL
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef AVL_KEYLESS
+
+#endif /* _AAPL_AVLKEYLESS_H */
diff --git a/aapl/avlmap.h b/aapl/avlmap.h
new file mode 100644
index 0000000..378613c
--- /dev/null
+++ b/aapl/avlmap.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLMAP_H
+#define _AAPL_AVLMAP_H
+
+#include "compare.h"
+
+/**
+ * \addtogroup avltree
+ * @{
+ */
+
+/**
+ * \class AvlMap
+ * \brief Key and value oriented AVL tree.
+ *
+ * AvlMap stores key and value pairs in elements that managed by the tree. It
+ * is intendend to be similar to map template found in the STL. AvlMap
+ * requires that a Key type, a Value type, and a class containing a compare()
+ * routine for Key be given. Items can be inserted with just a key or with a
+ * key and value pair.
+ *
+ * AvlMap assumes all elements in the tree are allocated on the heap and are
+ * to be managed by the tree. This means that the class destructor will delete
+ * the contents of the tree. A deep copy will cause existing elements to be
+ * deleted first.
+ *
+ * \include ex_avlmap.cpp
+ */
+
+/*@}*/
+
+#define AVLTREE_MAP
+#define BASE_EL(name) name
+#define BASEKEY(name) name
+#define AVLMEL_CLASSDEF class Key, class Value, class Compare = CmpOrd<Key>
+#define AVLMEL_TEMPDEF class Key, class Value, class Compare
+#define AVLMEL_TEMPUSE Key, Value, Compare
+#define AvlTree AvlMap
+#define Element AvlMapEl<Key,Value>
+
+#include "avlcommon.h"
+
+#undef AVLTREE_MAP
+#undef BASE_EL
+#undef BASEKEY
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef Element
+
+
+
+#endif /* _AAPL_AVLMAP_H */
diff --git a/aapl/avlmel.h b/aapl/avlmel.h
new file mode 100644
index 0000000..6d0deb7
--- /dev/null
+++ b/aapl/avlmel.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLMEL_H
+#define _AAPL_AVLMEL_H
+
+#include "compare.h"
+
+/**
+ * \addtogroup avltree
+ * @{
+ */
+
+/**
+ * \class AvlMel
+ * \brief AVL tree for elements appearing in multiple trees.
+ *
+ * AvlMel allows for an element to simultaneously be in multiple trees without
+ * the trees interferring with one another. For each tree that the element is
+ * to appear in, there must be a distinct set of AVL Tree management data that
+ * can be unambiguously referenced with some base class name. This name
+ * is passed to the tree as a template parameter and is used in the tree
+ * algorithms.
+ *
+ * The element must use the same key type and value in each tree that it
+ * appears in. If distinct keys are required, the AvlMelKey structure is
+ * available.
+ *
+ * AvlMel does not assume ownership of elements in the tree. The destructor
+ * will not delete the elements. If the user wishes to explicitly deallocate
+ * all the items in the tree the empty() routine is available.
+ *
+ * \include ex_avlmel.cpp
+ */
+
+/*@}*/
+
+#define BASE_EL(name) BaseEl::name
+#define BASEKEY(name) name
+#define AVLMEL_CLASSDEF class Element, class Key, \
+ class BaseEl, class Compare = CmpOrd<Key>
+#define AVLMEL_TEMPDEF class Element, class Key, \
+ class BaseEl, class Compare
+#define AVLMEL_TEMPUSE Element, Key, BaseEl, Compare
+#define AvlTree AvlMel
+
+#include "avlcommon.h"
+
+#undef BASE_EL
+#undef BASEKEY
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+
+#endif /* _AAPL_AVLMEL_H */
diff --git a/aapl/avlmelkey.h b/aapl/avlmelkey.h
new file mode 100644
index 0000000..5a66c9c
--- /dev/null
+++ b/aapl/avlmelkey.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLMELKEY_H
+#define _AAPL_AVLMELKEY_H
+
+#include "compare.h"
+
+/**
+ * \addtogroup avltree
+ * @{
+ */
+
+/**
+ * \class AvlMelKey
+ * \brief AVL tree for elements appearing in multiple trees with different keys.
+ *
+ * AvlMelKey is similar to AvlMel, except that an additional template
+ * parameter, BaseKey, is provided for resolving ambiguous references to
+ * getKey(). This means that if an element is stored in multiple trees, each
+ * tree can use a different key for ordering the elements in it. Using
+ * AvlMelKey an array of data structures can be indexed with an O(log(n))
+ * search on two or more of the values contained within it and without
+ * allocating any additional data.
+ *
+ * AvlMelKey does not assume ownership of elements in the tree. The destructor
+ * will not delete the elements. If the user wishes to explicitly deallocate
+ * all the items in the tree the empty() routine is available.
+ *
+ * \include ex_avlmelkey.cpp
+ */
+
+/*@}*/
+
+#define BASE_EL(name) BaseEl::name
+#define BASEKEY(name) BaseKey::name
+#define AVLMEL_CLASSDEF class Element, class Key, class BaseEl, \
+ class BaseKey, class Compare = CmpOrd<Key>
+#define AVLMEL_TEMPDEF class Element, class Key, class BaseEl, \
+ class BaseKey, class Compare
+#define AVLMEL_TEMPUSE Element, Key, BaseEl, BaseKey, Compare
+#define AvlTree AvlMelKey
+
+#include "avlcommon.h"
+
+#undef BASE_EL
+#undef BASEKEY
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+
+#endif /* _AAPL_AVLMELKEY_H */
diff --git a/aapl/avlset.h b/aapl/avlset.h
new file mode 100644
index 0000000..579378a
--- /dev/null
+++ b/aapl/avlset.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLSET_H
+#define _AAPL_AVLSET_H
+
+#include "compare.h"
+
+/**
+ * \addtogroup avltree
+ * @{
+ */
+
+/**
+ * \class AvlSet
+ * \brief Key-only oriented tree.
+ *
+ * AvlSet stores only keys in elements that are managed by the tree. AvlSet
+ * requires that a Key type and a class containing a compare() routine
+ * for Key be given. Items are inserted with just a key value.
+ *
+ * AvlSet assumes all elements in the tree are allocated on the heap and are
+ * to be managed by the tree. This means that the class destructor will delete
+ * the contents of the tree. A deep copy will cause existing elements to be
+ * deleted first.
+ *
+ * \include ex_avlset.cpp
+ */
+
+/*@}*/
+
+#define AVLTREE_SET
+#define BASE_EL(name) name
+#define BASEKEY(name) name
+#define AVLMEL_CLASSDEF class Key, class Compare = CmpOrd<Key>
+#define AVLMEL_TEMPDEF class Key, class Compare
+#define AVLMEL_TEMPUSE Key, Compare
+#define AvlTree AvlSet
+#define Element AvlSetEl<Key>
+
+#include "avlcommon.h"
+
+#undef AVLTREE_SET
+#undef BASE_EL
+#undef BASEKEY
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+#undef Element
+
+#endif /* _AAPL_AVLSET_H */
diff --git a/aapl/avltree.h b/aapl/avltree.h
new file mode 100644
index 0000000..2aa8e15
--- /dev/null
+++ b/aapl/avltree.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_AVLTREE_H
+#define _AAPL_AVLTREE_H
+
+#include "compare.h"
+
+/**
+ * \addtogroup avltree
+ * @{
+ */
+
+/**
+ * \class AvlTree
+ * \brief Basic AVL tree.
+ *
+ * AvlTree is the standard by-structure AVL tree. To use this structure the
+ * user must define an element type and give it the necessary properties. At
+ * the very least it must have a getKey() function that will be used to
+ * compare the relative ordering of elements and tree management data
+ * necessary for the AVL algorithm. An element type can acquire the management
+ * data by inheriting the AvlTreeEl class.
+ *
+ * AvlTree does not presume to manage the allocation of elements in the tree.
+ * The destructor will not delete the items in the tree, instead the elements
+ * must be explicitly de-allocated by the user if necessary and when it is
+ * safe to do so. The empty() routine will traverse the tree and delete all
+ * items.
+ *
+ * Since the tree does not manage the elements, it can contain elements that
+ * are allocated statically or that are part of another data structure.
+ *
+ * \include ex_avltree.cpp
+ */
+
+/*@}*/
+
+#define BASE_EL(name) name
+#define BASEKEY(name) name
+#define AVLMEL_CLASSDEF class Element, class Key, class Compare = CmpOrd<Key>
+#define AVLMEL_TEMPDEF class Element, class Key, class Compare
+#define AVLMEL_TEMPUSE Element, Key, Compare
+#define AvlTree AvlTree
+
+#include "avlcommon.h"
+
+#undef BASE_EL
+#undef BASEKEY
+#undef AVLMEL_CLASSDEF
+#undef AVLMEL_TEMPDEF
+#undef AVLMEL_TEMPUSE
+#undef AvlTree
+
+#endif /* _AAPL_AVLTREE_H */
diff --git a/aapl/bstcommon.h b/aapl/bstcommon.h
new file mode 100644
index 0000000..16a2a3b
--- /dev/null
+++ b/aapl/bstcommon.h
@@ -0,0 +1,814 @@
+/*
+ * Copyright 2001 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* This header is not wrapped in ifndefs because it is
+ * not intended to be included by users directly. */
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/* Binary Search Table */
+template < BST_TEMPL_DECLARE > class BstTable :
+ public Compare,
+ public Vector< Element, Resize >
+{
+ typedef Vector<Element, Resize> BaseVector;
+ typedef Table<Element> BaseTable;
+
+public:
+ /**
+ * \brief Default constructor.
+ *
+ * Create an empty binary search table.
+ */
+ BstTable() { }
+
+ /**
+ * \brief Construct with initial value.
+ *
+ * Constructs a binary search table with an initial item. Uses the default
+ * constructor for initializing Value.
+ */
+ BstTable(const Key &key)
+ { insert(key); }
+
+#if defined( BSTMAP )
+ /**
+ * \brief Construct with initial value.
+ *
+ * Constructs a binary search table with an initial key/value pair.
+ */
+ BstTable(const Key &key, const Value &val)
+ { insert(key, val); }
+#endif
+
+#if ! defined( BSTSET )
+ /**
+ * \brief Construct with initial value.
+ *
+ * Constructs a binary search table with an initial Element.
+ */
+ BstTable(const Element &el)
+ { insert(el); }
+#endif
+
+ Element *insert(const Key &key, Element **lastFound = 0);
+ Element *insertMulti(const Key &key);
+
+ bool insert(const BstTable &other);
+ void insertMulti(const BstTable &other);
+
+#if defined( BSTMAP )
+ Element *insert(const Key &key, const Value &val,
+ Element **lastFound = 0);
+ Element *insertMulti(const Key &key, const Value &val );
+#endif
+
+#if ! defined( BSTSET )
+ Element *insert(const Element &el, Element **lastFound = 0);
+ Element *insertMulti(const Element &el);
+#endif
+
+ Element *find(const Key &key, Element **lastFound = 0) const;
+ bool findMulti( const Key &key, Element *&lower,
+ Element *&upper ) const;
+
+ bool remove(const Key &key);
+ bool remove(Element *item);
+ long removeMulti(const Key &key);
+ long removeMulti(Element *lower, Element *upper);
+
+ /* The following provide access to the underlying insert and remove
+ * functions that my be hidden by the BST insert and remove. The insertDup
+ * and insertNew functions will never be hidden. They are provided for
+ * consistency. The difference between the non-shared and the shared
+ * tables is the documentation reference to the invoked function. */
+
+#if !defined( SHARED_BST )
+ /*@{*/
+
+ /** \brief Call the insert of the underlying vector.
+ *
+ * Provides to access to the vector insert, which may become hidden. Care
+ * should be taken to ensure that after the insert the ordering of
+ * elements is preserved.
+ * Invokes Vector::insert( long pos, const T &val ).
+ */
+ void vinsert(long pos, const Element &val)
+ { Vector< Element, Resize >::insert( pos, &val, 1 ); }
+
+ /** \brief Call the insert of the underlying vector.
+ *
+ * Provides to access to the vector insert, which may become hidden. Care
+ * should be taken to ensure that after the insert the ordering of
+ * elements is preserved.
+ * Invokes Vector::insert( long pos, const T *val, long len ).
+ */
+ void vinsert(long pos, const Element *val, long len)
+ { Vector< Element, Resize >::insert( pos, val, len ); }
+
+ /** \brief Call the insert of the underlying vector.
+ *
+ * Provides to access to the vector insert, which may become hidden. Care
+ * should be taken to ensure that after the insert the ordering of
+ * elements is preserved.
+ * Invokes Vector::insert( long pos, const Vector &v ).
+ */
+ void vinsert(long pos, const BstTable &v)
+ { Vector< Element, Resize >::insert( pos, v.data, v.tabLen ); }
+
+ /*@}*/
+
+ /*@{*/
+
+ /** \brief Call the remove of the underlying vector.
+ *
+ * Provides access to the vector remove, which may become hidden.
+ * Invokes Vector::remove( long pos ).
+ */
+ void vremove(long pos)
+ { Vector< Element, Resize >::remove( pos, 1 ); }
+
+ /** \brief Call the remove of the underlying vector.
+ *
+ * Proves access to the vector remove, which may become hidden.
+ * Invokes Vector::remove( long pos, long len ).
+ */
+ void vremove(long pos, long len)
+ { Vector< Element, Resize >::remove( pos, len ); }
+
+ /*@}*/
+#else /* SHARED_BST */
+ /*@{*/
+
+ /** \brief Call the insert of the underlying vector.
+ *
+ * Provides to access to the vector insert, which may become hidden. Care
+ * should be taken to ensure that after the insert the ordering of
+ * elements is preserved.
+ * Invokes SVector::insert( long pos, const T &val ).
+ */
+ void vinsert(long pos, const Element &val)
+ { Vector< Element, Resize >::insert( pos, &val, 1 ); }
+
+ /** \brief Call the insert of the underlying vector.
+ *
+ * Provides to access to the vector insert, which may become hidden. Care
+ * should be taken to ensure that after the insert the ordering of
+ * elements is preserved.
+ * Invokes SVector::insert( long pos, const T *val, long len ).
+ */
+ void vinsert(long pos, const Element *val, long len)
+ { Vector< Element, Resize >::insert( pos, val, len ); }
+
+ /** \brief Call the insert of the underlying vector.
+ *
+ * Provides to access to the vector insert, which may become hidden. Care
+ * should be taken to ensure that after the insert the ordering of
+ * elements is preserved.
+ * Invokes SVector::insert( long pos, const SVector &v ).
+ */
+ void vinsert(long pos, const BstTable &v)
+ { Vector< Element, Resize >::insert( pos, v.data, v.length() ); }
+
+ /*@}*/
+
+ /*@{*/
+
+ /** \brief Call the remove of the underlying vector.
+ *
+ * Provides access to the vector remove, which may become hidden.
+ * Invokes SVector::remove( long pos ).
+ */
+ void vremove(long pos)
+ { Vector< Element, Resize >::remove( pos, 1 ); }
+
+ /** \brief Call the remove of the underlying vector.
+ *
+ * Proves access to the vector remove, which may become hidden.
+ * Invokes SVector::remove( long pos, long len ).
+ */
+ void vremove(long pos, long len)
+ { Vector< Element, Resize >::remove( pos, len ); }
+
+ /*@}*/
+
+#endif /* SHARED_BST */
+};
+
+
+#if 0
+#if defined( SHARED_BST )
+/**
+ * \brief Construct a binary search table with an initial amount of
+ * allocation.
+ *
+ * The table is initialized to have room for allocLength elements. The
+ * table starts empty.
+ */
+template <BST_TEMPL_DEF> BstTable<BST_TEMPL_USE>::
+ BstTable( long allocLen )
+{
+ /* Allocate the space if we are given a positive allocLen. */
+ if ( allocLen > 0 ) {
+ /* Allocate the data needed. */
+ STabHead *head = (STabHead*)
+ malloc( sizeof(STabHead) + sizeof(Element) * allocLen );
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ /* Set up the header and save the data pointer. */
+ head->refCount = 1;
+ head->allocLen = allocLen;
+ head->tabLen = 0;
+ BaseTable::data = (Element*) (head + 1);
+ }
+}
+#else
+/**
+ * \brief Construct a binary search table with an initial amount of
+ * allocation.
+ *
+ * The table is initialized to have room for allocLength elements. The
+ * table starts empty.
+ */
+template <BST_TEMPL_DEF> BstTable<BST_TEMPL_USE>::
+ BstTable( long allocLen )
+{
+ /* Allocate the space if we are given a positive allocLen. */
+ BaseTable::allocLen = allocLen;
+ if ( BaseTable::allocLen > 0 ) {
+ BaseTable::data = (Element*) malloc(sizeof(Element) * BaseTable::allocLen);
+ if ( BaseTable::data == NULL )
+ throw std::bad_alloc();
+ }
+}
+
+#endif
+#endif
+
+/**
+ * \brief Find the element with the given key and remove it.
+ *
+ * If multiple elements with the given key exist, then it is unspecified which
+ * element will be removed.
+ *
+ * \returns True if an element is found and consequently removed, false
+ * otherwise.
+ */
+template <BST_TEMPL_DEF> bool BstTable<BST_TEMPL_USE>::
+ remove(const Key &key)
+{
+ Element *el = find(key);
+ if ( el != 0 ) {
+ Vector< Element >::remove(el - BaseTable::data);
+ return true;
+ }
+ return false;
+}
+
+/**
+ * \brief Remove the element pointed to by item.
+ *
+ * If item does not point to an element in the tree, then undefined behaviour
+ * results. If item is null, then remove has no effect.
+ *
+ * \returns True if item is not null, false otherwise.
+ */
+template <BST_TEMPL_DEF> bool BstTable<BST_TEMPL_USE>::
+ remove( Element *item )
+{
+ if ( item != 0 ) {
+ Vector< Element >::remove(item - BaseTable::data);
+ return true;
+ }
+ return false;
+}
+
+/**
+ * \brief Find and remove the entire range of elements with the given key.
+ *
+ * \returns The number of elements removed.
+ */
+template <BST_TEMPL_DEF> long BstTable<BST_TEMPL_USE>::
+ removeMulti(const Key &key)
+{
+ Element *low, *high;
+ if ( findMulti(key, low, high) ) {
+ /* Get the length of the range. */
+ long num = high - low + 1;
+ Vector< Element >::remove(low - BaseTable::data, num);
+ return num;
+ }
+
+ return 0;
+}
+
+template <BST_TEMPL_DEF> long BstTable<BST_TEMPL_USE>::
+ removeMulti(Element *lower, Element *upper)
+{
+ /* Get the length of the range. */
+ long num = upper - lower + 1;
+ Vector< Element >::remove(lower - BaseTable::data, num);
+ return num;
+}
+
+
+/**
+ * \brief Find a range of elements with the given key.
+ *
+ * If any elements with the given key exist then lower and upper are set to
+ * the low and high ends of the continous range of elements with the key.
+ * Lower and upper will point to the first and last elements with the key.
+ *
+ * \returns True if any elements are found, false otherwise.
+ */
+template <BST_TEMPL_DEF> bool BstTable<BST_TEMPL_USE>::
+ findMulti(const Key &key, Element *&low, Element *&high ) const
+{
+ const Element *lower, *mid, *upper;
+ long keyRelation;
+ const long tblLen = BaseTable::length();
+
+ if ( BaseTable::data == 0 )
+ return false;
+
+ lower = BaseTable::data;
+ upper = BaseTable::data + tblLen - 1;
+ while ( true ) {
+ if ( upper < lower ) {
+ /* Did not find the fd in the array. */
+ return false;
+ }
+
+ mid = lower + ((upper-lower)>>1);
+ keyRelation = this->compare(key, GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+ else if ( keyRelation > 0 )
+ lower = mid + 1;
+ else {
+ Element *lowEnd = BaseTable::data - 1;
+ Element *highEnd = BaseTable::data + tblLen;
+
+ lower = mid - 1;
+ while ( lower != lowEnd &&
+ this->compare(key, GET_KEY(*lower)) == 0 )
+ lower--;
+
+ upper = mid + 1;
+ while ( upper != highEnd &&
+ this->compare(key, GET_KEY(*upper)) == 0 )
+ upper++;
+
+ low = (Element*)lower + 1;
+ high = (Element*)upper - 1;
+ return true;
+ }
+ }
+}
+
+/**
+ * \brief Find an element with the given key.
+ *
+ * If the find succeeds then lastFound is set to the element found. If the
+ * find fails then lastFound is set the location where the key would be
+ * inserted. If there is more than one element in the tree with the given key,
+ * then it is unspecified which element is returned as the match.
+ *
+ * \returns The element found on success, null on failure.
+ */
+template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ find( const Key &key, Element **lastFound ) const
+{
+ const Element *lower, *mid, *upper;
+ long keyRelation;
+ const long tblLen = BaseTable::length();
+
+ if ( BaseTable::data == 0 )
+ return 0;
+
+ lower = BaseTable::data;
+ upper = BaseTable::data + tblLen - 1;
+ while ( true ) {
+ if ( upper < lower ) {
+ /* Did not find the key. Last found gets the insert location. */
+ if ( lastFound != 0 )
+ *lastFound = (Element*)lower;
+ return 0;
+ }
+
+ mid = lower + ((upper-lower)>>1);
+ keyRelation = this->compare(key, GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+ else if ( keyRelation > 0 )
+ lower = mid + 1;
+ else {
+ /* Key is found. Last found gets the found record. */
+ if ( lastFound != 0 )
+ *lastFound = (Element*)mid;
+ return (Element*)mid;
+ }
+ }
+}
+
+template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ insert(const Key &key, Element **lastFound)
+{
+ const Element *lower, *mid, *upper;
+ long keyRelation, insertPos;
+ const long tblLen = BaseTable::length();
+
+ if ( tblLen == 0 ) {
+ /* If the table is empty then go straight to insert. */
+ lower = BaseTable::data;
+ goto insert;
+ }
+
+ lower = BaseTable::data;
+ upper = BaseTable::data + tblLen - 1;
+ while ( true ) {
+ if ( upper < lower ) {
+ /* Did not find the key in the array.
+ * Place to insert at is lower. */
+ goto insert;
+ }
+
+ mid = lower + ((upper-lower)>>1);
+ keyRelation = this->compare(key, GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+ else if ( keyRelation > 0 )
+ lower = mid + 1;
+ else {
+ if ( lastFound != 0 )
+ *lastFound = (Element*)mid;
+ return 0;
+ }
+ }
+
+insert:
+ /* Get the insert pos. */
+ insertPos = lower - BaseTable::data;
+
+ /* Do the insert. After makeRawSpaceFor, lower pointer is no good. */
+ BaseVector::makeRawSpaceFor(insertPos, 1);
+ new(BaseTable::data + insertPos) Element(key);
+
+ /* Set lastFound */
+ if ( lastFound != 0 )
+ *lastFound = BaseTable::data + insertPos;
+ return BaseTable::data + insertPos;
+}
+
+
+template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ insertMulti(const Key &key)
+{
+ const Element *lower, *mid, *upper;
+ long keyRelation, insertPos;
+ const long tblLen = BaseTable::length();
+
+ if ( tblLen == 0 ) {
+ /* If the table is empty then go straight to insert. */
+ lower = BaseTable::data;
+ goto insert;
+ }
+
+ lower = BaseTable::data;
+ upper = BaseTable::data + tblLen - 1;
+ while ( true ) {
+ if ( upper < lower ) {
+ /* Did not find the key in the array.
+ * Place to insert at is lower. */
+ goto insert;
+ }
+
+ mid = lower + ((upper-lower)>>1);
+ keyRelation = compare(key, GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+ else if ( keyRelation > 0 )
+ lower = mid + 1;
+ else {
+ lower = mid;
+ goto insert;
+ }
+ }
+
+insert:
+ /* Get the insert pos. */
+ insertPos = lower - BaseTable::data;
+
+ /* Do the insert. */
+ BaseVector::makeRawSpaceFor(insertPos, 1);
+ new(BaseTable::data + insertPos) Element(key);
+
+ /* Return the element inserted. */
+ return BaseTable::data + insertPos;
+}
+
+/**
+ * \brief Insert each element from other.
+ *
+ * Always attempts to insert all elements even if the insert of some item from
+ * other fails.
+ *
+ * \returns True if all items inserted successfully, false if any insert
+ * failed.
+ */
+template <BST_TEMPL_DEF> bool BstTable<BST_TEMPL_USE>::
+ insert(const BstTable &other)
+{
+ bool allSuccess = true;
+ long otherLen = other.length();
+ for ( long i = 0; i < otherLen; i++ ) {
+ Element *el = insert( other.data[i] );
+ if ( el == 0 )
+ allSuccess = false;
+ }
+ return allSuccess;
+}
+
+/**
+ * \brief Insert each element from other even if the elements exist already.
+ *
+ * No individual insertMulti can fail.
+ */
+template <BST_TEMPL_DEF> void BstTable<BST_TEMPL_USE>::
+ insertMulti(const BstTable &other)
+{
+ long otherLen = other.length();
+ for ( long i = 0; i < otherLen; i++ )
+ insertMulti( other.data[i] );
+}
+
+#if ! defined( BSTSET )
+
+/**
+ * \brief Insert the given element.
+ *
+ * If the key in the given element does not already exist in the table then a
+ * new element is inserted. They element copy constructor is used to place the
+ * element into the table. If lastFound is given, it is set to the new element
+ * created. If the insert fails then lastFound is set to the existing element
+ * of the same key.
+ *
+ * \returns The new element created upon success, null upon failure.
+ */
+template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ insert(const Element &el, Element **lastFound )
+{
+ const Element *lower, *mid, *upper;
+ long keyRelation, insertPos;
+ const long tblLen = BaseTable::length();
+
+ if ( tblLen == 0 ) {
+ /* If the table is empty then go straight to insert. */
+ lower = BaseTable::data;
+ goto insert;
+ }
+
+ lower = BaseTable::data;
+ upper = BaseTable::data + tblLen - 1;
+ while ( true ) {
+ if ( upper < lower ) {
+ /* Did not find the key in the array.
+ * Place to insert at is lower. */
+ goto insert;
+ }
+
+ mid = lower + ((upper-lower)>>1);
+ keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+ else if ( keyRelation > 0 )
+ lower = mid + 1;
+ else {
+ if ( lastFound != 0 )
+ *lastFound = (Element*)mid;
+ return 0;
+ }
+ }
+
+insert:
+ /* Get the insert pos. */
+ insertPos = lower - BaseTable::data;
+
+ /* Do the insert. After makeRawSpaceFor, lower pointer is no good. */
+ BaseVector::makeRawSpaceFor(insertPos, 1);
+ new(BaseTable::data + insertPos) Element(el);
+
+ /* Set lastFound */
+ if ( lastFound != 0 )
+ *lastFound = BaseTable::data + insertPos;
+ return BaseTable::data + insertPos;
+}
+
+/**
+ * \brief Insert the given element even if it exists already.
+ *
+ * If the key in the given element exists already then the new element is
+ * placed next to some other element of the same key. InsertMulti cannot fail.
+ * The element copy constructor is used to place the element in the table.
+ *
+ * \returns The new element created.
+ */
+template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ insertMulti(const Element &el)
+{
+ const Element *lower, *mid, *upper;
+ long keyRelation, insertPos;
+ const long tblLen = BaseTable::length();
+
+ if ( tblLen == 0 ) {
+ /* If the table is empty then go straight to insert. */
+ lower = BaseTable::data;
+ goto insert;
+ }
+
+ lower = BaseTable::data;
+ upper = BaseTable::data + tblLen - 1;
+ while ( true ) {
+ if ( upper < lower ) {
+ /* Did not find the fd in the array.
+ * Place to insert at is lower. */
+ goto insert;
+ }
+
+ mid = lower + ((upper-lower)>>1);
+ keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+ else if ( keyRelation > 0 )
+ lower = mid + 1;
+ else {
+ lower = mid;
+ goto insert;
+ }
+ }
+
+insert:
+ /* Get the insert pos. */
+ insertPos = lower - BaseTable::data;
+
+ /* Do the insert. */
+ BaseVector::makeRawSpaceFor(insertPos, 1);
+ new(BaseTable::data + insertPos) Element(el);
+
+ /* Return the element inserted. */
+ return BaseTable::data + insertPos;
+}
+#endif
+
+
+#if defined( BSTMAP )
+
+/**
+ * \brief Insert the given key-value pair.
+ *
+ * If the given key does not already exist in the table then the key-value
+ * pair is inserted. Copy constructors are used to place the pair in the
+ * table. If lastFound is given, it is set to the new entry created. If the
+ * insert fails then lastFound is set to the existing pair of the same key.
+ *
+ * \returns The new element created upon success, null upon failure.
+ */
+template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ insert(const Key &key, const Value &val, Element **lastFound)
+{
+ const Element *lower, *mid, *upper;
+ long keyRelation, insertPos;
+ const long tblLen = BaseTable::length();
+
+ if ( tblLen == 0 ) {
+ /* If the table is empty then go straight to insert. */
+ lower = BaseTable::data;
+ goto insert;
+ }
+
+ lower = BaseTable::data;
+ upper = BaseTable::data + tblLen - 1;
+ while ( true ) {
+ if ( upper < lower ) {
+ /* Did not find the fd in the array.
+ * Place to insert at is lower. */
+ goto insert;
+ }
+
+ mid = lower + ((upper-lower)>>1);
+ keyRelation = Compare::compare(key, mid->key);
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+ else if ( keyRelation > 0 )
+ lower = mid + 1;
+ else {
+ if ( lastFound != NULL )
+ *lastFound = (Element*)mid;
+ return 0;
+ }
+ }
+
+insert:
+ /* Get the insert pos. */
+ insertPos = lower - BaseTable::data;
+
+ /* Do the insert. */
+ BaseVector::makeRawSpaceFor(insertPos, 1);
+ new(BaseTable::data + insertPos) Element(key, val);
+
+ /* Set lastFound */
+ if ( lastFound != NULL )
+ *lastFound = BaseTable::data + insertPos;
+ return BaseTable::data + insertPos;
+}
+
+
+/**
+ * \brief Insert the given key-value pair even if the key exists already.
+ *
+ * If the key exists already then the key-value pair is placed next to some
+ * other pair of the same key. InsertMulti cannot fail. Copy constructors are
+ * used to place the pair in the table.
+ *
+ * \returns The new element created.
+ */
+template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ insertMulti(const Key &key, const Value &val)
+{
+ const Element *lower, *mid, *upper;
+ long keyRelation, insertPos;
+ const long tblLen = BaseTable::length();
+
+ if ( tblLen == 0 ) {
+ /* If the table is empty then go straight to insert. */
+ lower = BaseTable::data;
+ goto insert;
+ }
+
+ lower = BaseTable::data;
+ upper = BaseTable::data + tblLen - 1;
+ while ( true ) {
+ if ( upper < lower ) {
+ /* Did not find the key in the array.
+ * Place to insert at is lower. */
+ goto insert;
+ }
+
+ mid = lower + ((upper-lower)>>1);
+ keyRelation = Compare::compare(key, mid->key);
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+ else if ( keyRelation > 0 )
+ lower = mid + 1;
+ else {
+ lower = mid;
+ goto insert;
+ }
+ }
+
+insert:
+ /* Get the insert pos. */
+ insertPos = lower - BaseTable::data;
+
+ /* Do the insert. */
+ BaseVector::makeRawSpaceFor(insertPos, 1);
+ new(BaseTable::data + insertPos) Element(key, val);
+
+ /* Return the element inserted. */
+ return BaseTable::data + insertPos;
+}
+
+#endif
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
diff --git a/aapl/bstmap.h b/aapl/bstmap.h
new file mode 100644
index 0000000..30c8e3c
--- /dev/null
+++ b/aapl/bstmap.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_BSTMAP_H
+#define _AAPL_BSTMAP_H
+
+#include "compare.h"
+#include "vector.h"
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/**
+ * \brief Element for BstMap.
+ *
+ * Stores the key and value pair.
+ */
+template <class Key, class Value> struct BstMapEl
+{
+ BstMapEl() {}
+ BstMapEl(const Key &key) : key(key) {}
+ BstMapEl(const Key &key, const Value &val) : key(key), value(val) {}
+
+ /** \brief The key */
+ Key key;
+
+ /** \brief The value. */
+ Value value;
+};
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+/**
+ * \addtogroup bst
+ * @{
+ */
+
+/**
+ * \class BstMap
+ * \brief Binary search table for key and value pairs.
+ *
+ * BstMap stores key and value pairs in each element. The key and value can be
+ * any type. A compare class for the key must be supplied.
+ */
+
+/*@}*/
+
+#define BST_TEMPL_DECLARE class Key, class Value, \
+ class Compare = CmpOrd<Key>, class Resize = ResizeExpn
+#define BST_TEMPL_DEF class Key, class Value, class Compare, class Resize
+#define BST_TEMPL_USE Key, Value, Compare, Resize
+#define GET_KEY(el) ((el).key)
+#define BstTable BstMap
+#define Element BstMapEl<Key, Value>
+#define BSTMAP
+
+#include "bstcommon.h"
+
+#undef BST_TEMPL_DECLARE
+#undef BST_TEMPL_DEF
+#undef BST_TEMPL_USE
+#undef GET_KEY
+#undef BstTable
+#undef Element
+#undef BSTMAP
+
+/**
+ * \fn BstMap::insert(const Key &key, BstMapEl<Key, Value> **lastFound)
+ * \brief Insert the given key.
+ *
+ * If the given key does not already exist in the table then a new element
+ * having key is inserted. They key copy constructor and value default
+ * constructor are used to place the pair in the table. If lastFound is given,
+ * it is set to the new entry created. If the insert fails then lastFound is
+ * set to the existing pair of the same key.
+ *
+ * \returns The new element created upon success, null upon failure.
+ */
+
+/**
+ * \fn BstMap::insertMulti(const Key &key)
+ * \brief Insert the given key even if it exists already.
+ *
+ * If the key exists already then the new element having key is placed next
+ * to some other pair of the same key. InsertMulti cannot fail. The key copy
+ * constructor and the value default constructor are used to place the pair in
+ * the table.
+ *
+ * \returns The new element created.
+ */
+
+#endif /* _AAPL_BSTMAP_H */
diff --git a/aapl/bstset.h b/aapl/bstset.h
new file mode 100644
index 0000000..4a0f88e
--- /dev/null
+++ b/aapl/bstset.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_BSTSET_H
+#define _AAPL_BSTSET_H
+
+/**
+ * \addtogroup bst
+ * @{
+ */
+
+/**
+ * \class BstSet
+ * \brief Binary search table for types that are the key.
+ *
+ * BstSet is suitable for types that comprise the entire key. Rather than look
+ * into the element to retrieve the key, the element is the key. A class that
+ * contains a comparison routine for the key must be given.
+ */
+
+/*@}*/
+
+#include "compare.h"
+#include "vector.h"
+
+#define BST_TEMPL_DECLARE class Key, class Compare = CmpOrd<Key>, \
+ class Resize = ResizeExpn
+#define BST_TEMPL_DEF class Key, class Compare, class Resize
+#define BST_TEMPL_USE Key, Compare, Resize
+#define GET_KEY(el) (el)
+#define BstTable BstSet
+#define Element Key
+#define BSTSET
+
+#include "bstcommon.h"
+
+#undef BST_TEMPL_DECLARE
+#undef BST_TEMPL_DEF
+#undef BST_TEMPL_USE
+#undef GET_KEY
+#undef BstTable
+#undef Element
+#undef BSTSET
+
+/**
+ * \fn BstSet::insert(const Key &key, Key **lastFound)
+ * \brief Insert the given key.
+ *
+ * If the given key does not already exist in the table then it is inserted.
+ * The key's copy constructor is used to place the item in the table. If
+ * lastFound is given, it is set to the new entry created. If the insert fails
+ * then lastFound is set to the existing key of the same value.
+ *
+ * \returns The new element created upon success, null upon failure.
+ */
+
+/**
+ * \fn BstSet::insertMulti(const Key &key)
+ * \brief Insert the given key even if it exists already.
+ *
+ * If the key exists already then it is placed next to some other key of the
+ * same value. InsertMulti cannot fail. The key's copy constructor is used to
+ * place the item in the table.
+ *
+ * \returns The new element created.
+ */
+
+#endif /* _AAPL_BSTSET_H */
diff --git a/aapl/bsttable.h b/aapl/bsttable.h
new file mode 100644
index 0000000..4e4babc
--- /dev/null
+++ b/aapl/bsttable.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_BSTTABLE_H
+#define _AAPL_BSTTABLE_H
+
+#include "compare.h"
+#include "vector.h"
+
+/**
+ * \addtogroup bst
+ * @{
+ */
+
+/**
+ * \class BstTable
+ * \brief Binary search table for structures that contain a key.
+ *
+ * This is the basic binary search table. It can be used to contain a
+ * structure that has a key and possibly some data. The key should be a member
+ * of the element class and accessible with getKey(). A class containing the
+ * compare routine must be supplied.
+ */
+
+/*@}*/
+
+#define BST_TEMPL_DECLARE class Element, class Key, \
+ class Compare = CmpOrd<Key>, class Resize = ResizeExpn
+#define BST_TEMPL_DEF class Element, class Key, class Compare, class Resize
+#define BST_TEMPL_USE Element, Key, Compare, Resize
+#define GET_KEY(el) ((el).getKey())
+#define BSTTABLE
+
+#include "bstcommon.h"
+
+#undef BST_TEMPL_DECLARE
+#undef BST_TEMPL_DEF
+#undef BST_TEMPL_USE
+#undef GET_KEY
+#undef BSTTABLE
+
+/**
+ * \fn BstTable::insert(const Key &key, Element **lastFound)
+ * \brief Insert a new element with the given key.
+ *
+ * If the given key does not already exist in the table a new element is
+ * inserted with the given key. A constructor taking only const Key& is used
+ * to initialize the new element. If lastFound is given, it is set to the new
+ * element created. If the insert fails then lastFound is set to the existing
+ * element with the same key.
+ *
+ * \returns The new element created upon success, null upon failure.
+ */
+
+/**
+ * \fn BstTable::insertMulti(const Key &key)
+ * \brief Insert a new element even if the key exists already.
+ *
+ * If the key exists already then the new element is placed next to some
+ * element with the same key. InsertMulti cannot fail. A constructor taking
+ * only const Key& is used to initialize the new element.
+ *
+ * \returns The new element created.
+ */
+
+#endif /* _AAPL_BSTTABLE_H */
diff --git a/aapl/bubblesort.h b/aapl/bubblesort.h
new file mode 100644
index 0000000..f0f4ce5
--- /dev/null
+++ b/aapl/bubblesort.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_BUBBLESORT_H
+#define _AAPL_BUBBLESORT_H
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/**
+ * \addtogroup sort
+ * @{
+ */
+
+/**
+ * \class BubbleSort
+ * \brief Bubble sort an array of data.
+ *
+ * BubbleSort can be used to sort any array of objects of type T provided a
+ * compare class is given. BubbleSort is in-place. It does not require any
+ * temporary storage.
+ *
+ * Objects are not made aware that they are being moved around in memory.
+ * Assignment operators, constructors and destructors are never invoked by the
+ * sort.
+ *
+ * BubbleSort runs in O(n^2) time. It is most useful when sorting arrays that
+ * are nearly sorted. It is best when neighbouring pairs are out of place.
+ * BubbleSort is a stable sort, meaning that objects with the same key have
+ * their relative ordering preserved.
+ */
+
+/*@}*/
+
+/* BubbleSort. */
+template <class T, class Compare> class BubbleSort
+ : public Compare
+{
+public:
+ /* Sorting interface routine. */
+ void sort(T *data, long len);
+};
+
+
+/**
+ * \brief Bubble sort an array of data.
+ */
+template <class T, class Compare> void BubbleSort<T,Compare>::
+ sort(T *data, long len)
+{
+ bool changed = true;
+ for ( long pass = 1; changed && pass < len; pass ++ ) {
+ changed = false;
+ for ( long i = 0; i < len-pass; i++ ) {
+ /* Do we swap pos with the next one? */
+ if ( this->compare( data[i], data[i+1] ) > 0 ) {
+ char tmp[sizeof(T)];
+
+ /* Swap the two items. */
+ memcpy( tmp, data+i, sizeof(T) );
+ memcpy( data+i, data+i+1, sizeof(T) );
+ memcpy( data+i+1, tmp, sizeof(T) );
+
+ /* Note that we made a change. */
+ changed = true;
+ }
+ }
+ }
+}
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+#endif /* _AAPL_BUBBLESORT_H */
diff --git a/aapl/compare.h b/aapl/compare.h
new file mode 100644
index 0000000..707e642
--- /dev/null
+++ b/aapl/compare.h
@@ -0,0 +1,246 @@
+/*
+ * Copyright 2001 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_COMPARE_H
+#define _AAPL_COMPARE_H
+
+#include <string.h>
+#include "table.h"
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/**
+ * \defgroup compare Compare
+ * \brief Basic compare clases.
+ *
+ * Compare classes are used by data structures that need to know the relative
+ * ordering of elemets. To become a compare class, a class must imlement a
+ * routine long compare(const T &key1, const T &key2) that behaves just like
+ * strcmp.
+ *
+ * Compare classes are passed to the template data structure as a template
+ * parameter and are inherited. In most cases the compare routine will base
+ * the key comparision only on the two keys and the compare routine can
+ * therefore be static. Though sometimes it is useful to include data in the
+ * compare class and use this data in the comparison. For example the compare
+ * class may contain a pointer to some other data structure to which the
+ * comparison is delegated.
+ *
+ * @{
+ */
+
+/**
+ * \brief Compare a type for which < and > are implemented.
+ *
+ * CmpOrd is suitable for simple types such as integers and pointers that by
+ * default have the less-than and greater-than operators defined.
+ */
+template <class T> struct CmpOrd
+{
+ /**
+ * \brief Compare two ordinal types.
+ *
+ * This compare routine copies its arguements in by value.
+ */
+ static inline long compare(const T k1, const T k2)
+ {
+ if (k1 < k2)
+ return -1;
+ else if (k1 > k2)
+ return 1;
+ else
+ return 0;
+ }
+};
+
+/**
+ * \brief Compare two tables of type T
+ *
+ * Table comparison is useful for keying a data structure on a vector or
+ * binary search table. T is the element type stored in the table.
+ * CompareT is the comparison structure used to compare the individual values
+ * in the table.
+ */
+template < class T, class CompareT = CmpOrd<T> > struct CmpTable
+ : public CompareT
+{
+ /**
+ * \brief Compare two tables storing type T.
+ */
+ static inline long compare(const Table<T> &t1, const Table<T> &t2)
+ {
+ if ( t1.tabLen < t2.tabLen )
+ return -1;
+ else if ( t1.tabLen > t2.tabLen )
+ return 1;
+ else
+ {
+ T *i1 = t1.data, *i2 = t2.data;
+ long len = t1.tabLen, cmpResult;
+ for ( long pos = 0; pos < len;
+ pos += 1, i1 += 1, i2 += 1 )
+ {
+ cmpResult = CompareT::compare(*i1, *i2);
+ if ( cmpResult != 0 )
+ return cmpResult;
+ }
+ return 0;
+ }
+ }
+};
+
+/**
+ * \brief Compare two tables of type T -- non-static version.
+ *
+ * CmpTableNs is identical to CmpTable, however the compare routine is
+ * non-static. If the CompareT class contains a non-static compare, then this
+ * version must be used because a static member cannot invoke a non-static
+ * member.
+ *
+ * Table comparison is useful for keying a data structure on a vector or binary
+ * search table. T is the element type stored in the table. CompareT
+ * is the comparison structure used to compare the individual values in the
+ * table.
+ */
+template < class T, class CompareT = CmpOrd<T> > struct CmpTableNs
+ : public CompareT
+{
+ /**
+ * \brief Compare two tables storing type T.
+ */
+ inline long compare(const Table<T> &t1, const Table<T> &t2)
+ {
+ if ( t1.tabLen < t2.tabLen )
+ return -1;
+ else if ( t1.tabLen > t2.tabLen )
+ return 1;
+ else
+ {
+ T *i1 = t1.data, *i2 = t2.data;
+ long len = t1.tabLen, cmpResult;
+ for ( long pos = 0; pos < len;
+ pos += 1, i1 += 1, i2 += 1 )
+ {
+ cmpResult = CompareT::compare(*i1, *i2);
+ if ( cmpResult != 0 )
+ return cmpResult;
+ }
+ return 0;
+ }
+ }
+};
+
+/**
+ * \brief Compare two implicitly shared tables of type T
+ *
+ * This table comparison is for data structures based on implicitly
+ * shared tables.
+ *
+ * Table comparison is useful for keying a data structure on a vector or
+ * binary search table. T is the element type stored in the table.
+ * CompareT is the comparison structure used to compare the individual values
+ * in the table.
+ */
+template < class T, class CompareT = CmpOrd<T> > struct CmpSTable : public CompareT
+{
+ /**
+ * \brief Compare two tables storing type T.
+ */
+ static inline long compare(const STable<T> &t1, const STable<T> &t2)
+ {
+ long t1Length = t1.length();
+ long t2Length = t2.length();
+
+ /* Compare lengths. */
+ if ( t1Length < t2Length )
+ return -1;
+ else if ( t1Length > t2Length )
+ return 1;
+ else {
+ /* Compare the table data. */
+ T *i1 = t1.data, *i2 = t2.data;
+ for ( long pos = 0; pos < t1Length;
+ pos += 1, i1 += 1, i2 += 1 )
+ {
+ long cmpResult = CompareT::compare(*i1, *i2);
+ if ( cmpResult != 0 )
+ return cmpResult;
+ }
+ return 0;
+ }
+ }
+};
+
+/**
+ * \brief Compare two implicitly shared tables of type T -- non-static
+ * version.
+ *
+ * This is a non-static table comparison for data structures based on
+ * implicitly shared tables. If the CompareT class contains a non-static
+ * compare, then this version must be used because a static member cannot
+ * invoke a non-static member.
+ *
+ * Table comparison is useful for keying a data structure on a vector or
+ * binary search table. T is the element type stored in the table.
+ * CompareT is the comparison structure used to compare the individual values
+ * in the table.
+ */
+template < class T, class CompareT = CmpOrd<T> > struct CmpSTableNs
+ : public CompareT
+{
+ /**
+ * \brief Compare two tables storing type T.
+ */
+ inline long compare(const STable<T> &t1, const STable<T> &t2)
+ {
+ long t1Length = t1.length();
+ long t2Length = t2.length();
+
+ /* Compare lengths. */
+ if ( t1Length < t2Length )
+ return -1;
+ else if ( t1Length > t2Length )
+ return 1;
+ else {
+ /* Compare the table data. */
+ T *i1 = t1.data, *i2 = t2.data;
+ for ( long pos = 0; pos < t1Length;
+ pos += 1, i1 += 1, i2 += 1 )
+ {
+ long cmpResult = CompareT::compare(*i1, *i2);
+ if ( cmpResult != 0 )
+ return cmpResult;
+ }
+ return 0;
+ }
+ }
+};
+
+
+/*@}*/
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+#endif /* _AAPL_COMPARE_H */
diff --git a/aapl/dlcommon.h b/aapl/dlcommon.h
new file mode 100644
index 0000000..91dff25
--- /dev/null
+++ b/aapl/dlcommon.h
@@ -0,0 +1,790 @@
+/*
+ * Copyright 2001 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* This header is not wrapped in ifndef becuase it is not intended to
+ * be included by the user. */
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+#if defined( DOUBLELIST_VALUE )
+/**
+ * \brief Double list element for DListVal.
+ *
+ * DListValEl stores the type T of DListVal by value.
+ */
+template <class T> struct DListValEl
+{
+ /**
+ * \brief Construct a DListValEl with a given value.
+ *
+ * The only constructor available initializes the value element. This
+ * enforces that DListVal elements are never created without having their
+ * value intialzed by the user. T's copy constructor is used to copy the
+ * value in.
+ */
+ DListValEl( const T &val ) : value(val) { }
+
+ /**
+ * \brief Value stored by the list element.
+ *
+ * Value is always copied into new list elements using the copy
+ * constructor.
+ */
+ T value;
+
+ /**
+ * \brief List previous pointer.
+ *
+ * Points to the previous item in the list. If this is the first item in
+ * the list, then prev is NULL. If this element is not in a list then
+ * prev is undefined.
+ */
+ DListValEl<T> *prev;
+
+ /**
+ * \brief List next pointer.
+ *
+ * Points to the next item in the list. If this is the list item in the
+ * list, then next is NULL. If this element is not in a list then next is
+ * undefined.
+ */
+ DListValEl<T> *next;
+};
+#else
+
+#ifndef __AAPL_DOUBLE_LIST_EL
+#define __AAPL_DOUBLE_LIST_EL
+/**
+ * \brief Double list element properties.
+ *
+ * This class can be inherited to make a class suitable to be a double list
+ * element. It simply provides the next and previous pointers. An alternative
+ * is to put the next and previous pointers in the class directly.
+ */
+template <class Element> struct DListEl
+{
+ /**
+ * \brief List previous pointer.
+ *
+ * Points to the previous item in the list. If this is the first item in
+ * the list, then prev is NULL. If this element is not in a list then
+ * prev is undefined.
+ */
+ Element *prev;
+
+ /**
+ * \brief List next pointer.
+ *
+ * Points to the next item in the list. If this is the list item in the
+ * list, then next is NULL. If this element is not in a list then next is
+ * undefined.
+ */
+ Element *next;
+};
+#endif /* __AAPL_DOUBLE_LIST_EL */
+
+#endif
+
+/* Doubly Linked List */
+template <DLMEL_TEMPDEF> class DList
+{
+public:
+ /** \brief Initialize an empty list. */
+ DList() : head(0), tail(0), listLen(0) {}
+
+ /**
+ * \brief Perform a deep copy of the list.
+ *
+ * The elements of the other list are duplicated and put into this list.
+ * Elements are copied using the copy constructor.
+ */
+ DList(const DList &other);
+
+#ifdef DOUBLELIST_VALUE
+ /**
+ * \brief Clear the double list contents.
+ *
+ * All elements are deleted.
+ */
+ ~DList() { empty(); }
+
+ /**
+ * \brief Assign another list into this list using a deep copy.
+ *
+ * The elements of the other list are duplicated and put into this list.
+ * Each list item is created using the copy constructor. If this list
+ * contains any elements before the copy, they are deleted first.
+ *
+ * \returns A reference to this.
+ */
+ DList &operator=(const DList &other);
+
+ /**
+ * \brief Transfer the contents of another list into this list.
+ *
+ * The elements of the other list moved in. The other list will be empty
+ * afterwards. If this list contains any elements before the copy, then
+ * they are deleted.
+ */
+ void transfer(DList &other);
+#else
+ /**
+ * \brief Abandon all elements in the list.
+ *
+ * List elements are not deleted.
+ */
+ ~DList() {}
+
+ /**
+ * \brief Perform a deep copy of the list.
+ *
+ * The elements of the other list are duplicated and put into this list.
+ * Each list item is created using the copy constructor. If this list
+ * contains any elements before the copy, they are abandoned.
+ *
+ * \returns A reference to this.
+ */
+ DList &operator=(const DList &other);
+
+ /**
+ * \brief Transfer the contents of another list into this list.
+ *
+ * The elements of the other list moved in. The other list will be empty
+ * afterwards. If this list contains any elements before the copy, they
+ * are abandoned.
+ */
+ void transfer(DList &other);
+#endif
+
+
+#ifdef DOUBLELIST_VALUE
+ /**
+ * \brief Make a new element and prepend it to the front of the list.
+ *
+ * The item is copied into the new element using the copy constructor.
+ * Equivalent to list.addBefore(list.head, item).
+ */
+ void prepend(const T &item);
+
+ /**
+ * \brief Make a new element and append it to the end of the list.
+ *
+ * The item is copied into the new element using the copy constructor.
+ * Equivalent to list.addAfter(list.tail, item).
+ */
+ void append(const T &item);
+
+ /**
+ * \brief Make a new element and insert it immediately after an element in
+ * the list.
+ *
+ * The item is copied into the new element using the copy constructor. If
+ * prev_el is NULL then the new element is prepended to the front of the
+ * list. If prev_el is not already in the list then undefined behaviour
+ * results. Equivalent to list.addAfter(prev_el, new DListValEl(item)).
+ */
+ void addAfter(Element *prev_el, const T &item);
+
+ /**
+ * \brief Make a new element and insert it immediately before an element
+ * in the list.
+ *
+ * The item is copied into the new element using the copy construcotor. If
+ * next_el is NULL then the new element is appended to the end of the
+ * list. If next_el is not already in the list then undefined behaviour
+ * results. Equivalent to list.addBefore(next_el, new DListValEl(item)).
+ */
+ void addBefore(Element *next_el, const T &item);
+#endif
+
+ /**
+ * \brief Prepend a single element to the front of the list.
+ *
+ * If new_el is already an element of some list, then undefined behaviour
+ * results. Equivalent to list.addBefore(list.head, new_el).
+ */
+ void prepend(Element *new_el) { addBefore(head, new_el); }
+
+ /**
+ * \brief Append a single element to the end of the list.
+ *
+ * If new_el is alreay an element of some list, then undefined behaviour
+ * results. Equivalent to list.addAfter(list.tail, new_el).
+ */
+ void append(Element *new_el) { addAfter(tail, new_el); }
+
+ /**
+ * \brief Prepend an entire list to the beginning of this list.
+ *
+ * All items are moved, not copied. Afterwards, the other list is emtpy.
+ * All items are prepended at once, so this is an O(1) operation.
+ * Equivalent to list.addBefore(list.head, dl).
+ */
+ void prepend(DList &dl) { addBefore(head, dl); }
+
+ /**
+ * \brief Append an entire list to the end of the list.
+ *
+ * All items are moved, not copied. Afterwards, the other list is empty.
+ * All items are appened at once, so this is an O(1) operation.
+ * Equivalent to list.addAfter(list.tail, dl).
+ */
+ void append(DList &dl) { addAfter(tail, dl); }
+
+ void addAfter(Element *prev_el, Element *new_el);
+ void addBefore(Element *next_el, Element *new_el);
+
+ void addAfter(Element *prev_el, DList &dl);
+ void addBefore(Element *next_el, DList &dl);
+
+ /**
+ * \brief Detach the head of the list
+ *
+ * The element detached is not deleted. If there is no head of the list
+ * (the list is empty) then undefined behaviour results. Equivalent to
+ * list.detach(list.head).
+ *
+ * \returns The element detached.
+ */
+ Element *detachFirst() { return detach(head); }
+
+ /**
+ * \brief Detach the tail of the list
+ *
+ * The element detached is not deleted. If there is no tail of the list
+ * (the list is empty) then undefined behaviour results. Equivalent to
+ * list.detach(list.tail).
+ *
+ * \returns The element detached.
+ */
+ Element *detachLast() { return detach(tail); }
+
+ /* Detaches an element from the list. Does not free any memory. */
+ Element *detach(Element *el);
+
+ /**
+ * \brief Detach and delete the first element in the list.
+ *
+ * If there is no first element (the list is empty) then undefined
+ * behaviour results. Equivalent to delete list.detach(list.head);
+ */
+ void removeFirst() { delete detach( head ); }
+
+ /**
+ * \brief Detach and delete the last element in the list.
+ *
+ * If there is no last element (the list is emtpy) then undefined
+ * behaviour results. Equivalent to delete list.detach(list.tail);
+ */
+ void removeLast() { delete detach( tail ); }
+
+ /**
+ * \brief Detach and delete an element from the list.
+ *
+ * If the element is not in the list, then undefined behaviour results.
+ * Equivalent to delete list.detach(el);
+ */
+ void remove(Element *el) { delete detach( el ); }
+
+ void empty();
+ void abandon();
+
+ /** \brief The number of elements in the list. */
+ long length() const { return listLen; }
+
+ /** \brief Head and tail of the linked list. */
+ Element *head, *tail;
+
+ /** \brief The number of element in the list. */
+ long listLen;
+
+ /* Convenience access. */
+ long size() const { return listLen; }
+
+ /* Forward this so a ref can be used. */
+ struct Iter;
+
+ /* Class for setting the iterator. */
+ struct IterFirst { IterFirst( const DList &l ) : l(l) { } const DList &l; };
+ struct IterLast { IterLast( const DList &l ) : l(l) { } const DList &l; };
+ struct IterNext { IterNext( const Iter &i ) : i(i) { } const Iter &i; };
+ struct IterPrev { IterPrev( const Iter &i ) : i(i) { } const Iter &i; };
+
+ /**
+ * \brief Double List Iterator.
+ * \ingroup iterators
+ */
+ struct Iter
+ {
+ /* Default construct. */
+ Iter() : ptr(0) { }
+
+ /* Construct from a double list. */
+ Iter( const DList &dl ) : ptr(dl.head) { }
+ Iter( Element *el ) : ptr(el) { }
+ Iter( const IterFirst &dlf ) : ptr(dlf.l.head) { }
+ Iter( const IterLast &dll ) : ptr(dll.l.tail) { }
+ Iter( const IterNext &dln ) : ptr(dln.i.ptr->BASE_EL(next)) { }
+ Iter( const IterPrev &dlp ) : ptr(dlp.i.ptr->BASE_EL(prev)) { }
+
+ /* Assign from a double list. */
+ Iter &operator=( const DList &dl ) { ptr = dl.head; return *this; }
+ Iter &operator=( Element *el ) { ptr = el; return *this; }
+ Iter &operator=( const IterFirst &af ) { ptr = af.l.head; return *this; }
+ Iter &operator=( const IterLast &al ) { ptr = al.l.tail; return *this; }
+ Iter &operator=( const IterNext &an ) { ptr = an.i.ptr->BASE_EL(next); return *this; }
+ Iter &operator=( const IterPrev &ap ) { ptr = ap.i.ptr->BASE_EL(prev); return *this; }
+
+ /** \brief Less than end? */
+ bool lte() const { return ptr != 0; }
+
+ /** \brief At end? */
+ bool end() const { return ptr == 0; }
+
+ /** \brief Greater than beginning? */
+ bool gtb() const { return ptr != 0; }
+
+ /** \brief At beginning? */
+ bool beg() const { return ptr == 0; }
+
+ /** \brief At first element? */
+ bool first() const { return ptr && ptr->BASE_EL(prev) == 0; }
+
+ /** \brief At last element? */
+ bool last() const { return ptr && ptr->BASE_EL(next) == 0; }
+
+ /** \brief Implicit cast to Element*. */
+ operator Element*() const { return ptr; }
+
+ /** \brief Dereference operator returns Element&. */
+ Element &operator *() const { return *ptr; }
+
+ /** \brief Arrow operator returns Element*. */
+ Element *operator->() const { return ptr; }
+
+ /** \brief Move to next item. */
+ inline Element *operator++() { return ptr = ptr->BASE_EL(next); }
+
+ /** \brief Move to next item. */
+ inline Element *increment() { return ptr = ptr->BASE_EL(next); }
+
+ /** \brief Move to next item. */
+ inline Element *operator++(int);
+
+ /** \brief Move to previous item. */
+ inline Element *operator--() { return ptr = ptr->BASE_EL(prev); }
+
+ /** \brief Move to previous item. */
+ inline Element *decrement() { return ptr = ptr->BASE_EL(prev); }
+
+ /** \brief Move to previous item. */
+ inline Element *operator--(int);
+
+ /** \brief Return the next item. Does not modify this. */
+ inline IterNext next() const { return IterNext(*this); }
+
+ /** \brief Return the prev item. Does not modify this. */
+ inline IterPrev prev() const { return IterPrev(*this); }
+
+ /** \brief The iterator is simply a pointer. */
+ Element *ptr;
+ };
+
+ /** \brief Return first element. */
+ IterFirst first() { return IterFirst(*this); }
+
+ /** \brief Return last element. */
+ IterLast last() { return IterLast(*this); }
+};
+
+/* Copy constructor, does a deep copy of other. */
+template <DLMEL_TEMPDEF> DList<DLMEL_TEMPUSE>::
+ DList(const DList<DLMEL_TEMPUSE> &other) :
+ head(0), tail(0), listLen(0)
+{
+ Element *el = other.head;
+ while( el != 0 ) {
+ append( new Element(*el) );
+ el = el->BASE_EL(next);
+ }
+}
+
+#ifdef DOUBLELIST_VALUE
+
+/* Assignement operator does deep copy. */
+template <DLMEL_TEMPDEF> DList<DLMEL_TEMPUSE> &DList<DLMEL_TEMPUSE>::
+ operator=(const DList &other)
+{
+ /* Free the old list. The value list assumes items were allocated on the
+ * heap by itself. */
+ empty();
+
+ Element *el = other.head;
+ while( el != 0 ) {
+ append( new Element(*el) );
+ el = el->BASE_EL(next);
+ }
+ return *this;
+}
+
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::
+ transfer(DList &other)
+{
+ /* Free the old list. The value list assumes items were allocated on the
+ * heap by itself. */
+ empty();
+
+ head = other.head;
+ tail = other.tail;
+ listLen = other.listLen;
+
+ other.abandon();
+}
+
+#else
+
+/* Assignement operator does deep copy. */
+template <DLMEL_TEMPDEF> DList<DLMEL_TEMPUSE> &DList<DLMEL_TEMPUSE>::
+ operator=(const DList &other)
+{
+ Element *el = other.head;
+ while( el != 0 ) {
+ append( new Element(*el) );
+ el = el->BASE_EL(next);
+ }
+ return *this;
+}
+
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::
+ transfer(DList &other)
+{
+ head = other.head;
+ tail = other.tail;
+ listLen = other.listLen;
+
+ other.abandon();
+}
+
+#endif
+
+#ifdef DOUBLELIST_VALUE
+
+/* Prepend a new item. Inlining this bloats the caller with new overhead. */
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::
+ prepend(const T &item)
+{
+ addBefore(head, new Element(item));
+}
+
+/* Append a new item. Inlining this bloats the caller with the new overhead. */
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::
+ append(const T &item)
+{
+ addAfter(tail, new Element(item));
+}
+
+/* Add a new item after a prev element. Inlining this bloats the caller with
+ * the new overhead. */
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::
+ addAfter(Element *prev_el, const T &item)
+{
+ addAfter(prev_el, new Element(item));
+}
+
+/* Add a new item before a next element. Inlining this bloats the caller with
+ * the new overhead. */
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::
+ addBefore(Element *next_el, const T &item)
+{
+ addBefore(next_el, new Element(item));
+}
+
+#endif
+
+/*
+ * The larger iterator operators.
+ */
+
+/* Postfix ++ */
+template <DLMEL_TEMPDEF> Element *DList<DLMEL_TEMPUSE>::Iter::
+ operator++(int)
+{
+ Element *rtn = ptr;
+ ptr = ptr->BASE_EL(next);
+ return rtn;
+}
+
+/* Postfix -- */
+template <DLMEL_TEMPDEF> Element *DList<DLMEL_TEMPUSE>::Iter::
+ operator--(int)
+{
+ Element *rtn = ptr;
+ ptr = ptr->BASE_EL(prev);
+ return rtn;
+}
+
+/**
+ * \brief Insert an element immediately after an element in the list.
+ *
+ * If prev_el is NULL then new_el is prepended to the front of the list. If
+ * prev_el is not in the list or if new_el is already in a list, then
+ * undefined behaviour results.
+ */
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::
+ addAfter(Element *prev_el, Element *new_el)
+{
+ /* Set the previous pointer of new_el to prev_el. We do
+ * this regardless of the state of the list. */
+ new_el->BASE_EL(prev) = prev_el;
+
+ /* Set forward pointers. */
+ if (prev_el == 0) {
+ /* There was no prev_el, we are inserting at the head. */
+ new_el->BASE_EL(next) = head;
+ head = new_el;
+ }
+ else {
+ /* There was a prev_el, we can access previous next. */
+ new_el->BASE_EL(next) = prev_el->BASE_EL(next);
+ prev_el->BASE_EL(next) = new_el;
+ }
+
+ /* Set reverse pointers. */
+ if (new_el->BASE_EL(next) == 0) {
+ /* There is no next element. Set the tail pointer. */
+ tail = new_el;
+ }
+ else {
+ /* There is a next element. Set it's prev pointer. */
+ new_el->BASE_EL(next)->BASE_EL(prev) = new_el;
+ }
+
+ /* Update list length. */
+ listLen++;
+}
+
+/**
+ * \brief Insert an element immediatly before an element in the list.
+ *
+ * If next_el is NULL then new_el is appended to the end of the list. If
+ * next_el is not in the list or if new_el is already in a list, then
+ * undefined behaviour results.
+ */
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::
+ addBefore(Element *next_el, Element *new_el)
+{
+ /* Set the next pointer of the new element to next_el. We do
+ * this regardless of the state of the list. */
+ new_el->BASE_EL(next) = next_el;
+
+ /* Set reverse pointers. */
+ if (next_el == 0) {
+ /* There is no next elememnt. We are inserting at the tail. */
+ new_el->BASE_EL(prev) = tail;
+ tail = new_el;
+ }
+ else {
+ /* There is a next element and we can access next's previous. */
+ new_el->BASE_EL(prev) = next_el->BASE_EL(prev);
+ next_el->BASE_EL(prev) = new_el;
+ }
+
+ /* Set forward pointers. */
+ if (new_el->BASE_EL(prev) == 0) {
+ /* There is no previous element. Set the head pointer.*/
+ head = new_el;
+ }
+ else {
+ /* There is a previous element, set it's next pointer to new_el. */
+ new_el->BASE_EL(prev)->BASE_EL(next) = new_el;
+ }
+
+ /* Update list length. */
+ listLen++;
+}
+
+/**
+ * \brief Insert an entire list immediatly after an element in this list.
+ *
+ * Elements are moved, not copied. Afterwards, the other list is empty. If
+ * prev_el is NULL then the elements are prepended to the front of the list.
+ * If prev_el is not in the list then undefined behaviour results. All
+ * elements are inserted into the list at once, so this is an O(1) operation.
+ */
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::
+ addAfter( Element *prev_el, DList<DLMEL_TEMPUSE> &dl )
+{
+ /* Do not bother if dl has no elements. */
+ if ( dl.listLen == 0 )
+ return;
+
+ /* Set the previous pointer of dl.head to prev_el. We do
+ * this regardless of the state of the list. */
+ dl.head->BASE_EL(prev) = prev_el;
+
+ /* Set forward pointers. */
+ if (prev_el == 0) {
+ /* There was no prev_el, we are inserting at the head. */
+ dl.tail->BASE_EL(next) = head;
+ head = dl.head;
+ }
+ else {
+ /* There was a prev_el, we can access previous next. */
+ dl.tail->BASE_EL(next) = prev_el->BASE_EL(next);
+ prev_el->BASE_EL(next) = dl.head;
+ }
+
+ /* Set reverse pointers. */
+ if (dl.tail->BASE_EL(next) == 0) {
+ /* There is no next element. Set the tail pointer. */
+ tail = dl.tail;
+ }
+ else {
+ /* There is a next element. Set it's prev pointer. */
+ dl.tail->BASE_EL(next)->BASE_EL(prev) = dl.tail;
+ }
+
+ /* Update the list length. */
+ listLen += dl.listLen;
+
+ /* Empty out dl. */
+ dl.head = dl.tail = 0;
+ dl.listLen = 0;
+}
+
+/**
+ * \brief Insert an entire list immediately before an element in this list.
+ *
+ * Elements are moved, not copied. Afterwards, the other list is empty. If
+ * next_el is NULL then the elements are appended to the end of the list. If
+ * next_el is not in the list then undefined behaviour results. All elements
+ * are inserted at once, so this is an O(1) operation.
+ */
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::
+ addBefore( Element *next_el, DList<DLMEL_TEMPUSE> &dl )
+{
+ /* Do not bother if dl has no elements. */
+ if ( dl.listLen == 0 )
+ return;
+
+ /* Set the next pointer of dl.tail to next_el. We do
+ * this regardless of the state of the list. */
+ dl.tail->BASE_EL(next) = next_el;
+
+ /* Set reverse pointers. */
+ if (next_el == 0) {
+ /* There is no next elememnt. We are inserting at the tail. */
+ dl.head->BASE_EL(prev) = tail;
+ tail = dl.tail;
+ }
+ else {
+ /* There is a next element and we can access next's previous. */
+ dl.head->BASE_EL(prev) = next_el->BASE_EL(prev);
+ next_el->BASE_EL(prev) = dl.tail;
+ }
+
+ /* Set forward pointers. */
+ if (dl.head->BASE_EL(prev) == 0) {
+ /* There is no previous element. Set the head pointer.*/
+ head = dl.head;
+ }
+ else {
+ /* There is a previous element, set it's next pointer to new_el. */
+ dl.head->BASE_EL(prev)->BASE_EL(next) = dl.head;
+ }
+
+ /* Update list length. */
+ listLen += dl.listLen;
+
+ /* Empty out dl. */
+ dl.head = dl.tail = 0;
+ dl.listLen = 0;
+}
+
+
+/**
+ * \brief Detach an element from the list.
+ *
+ * The element is not deleted. If the element is not in the list, then
+ * undefined behaviour results.
+ *
+ * \returns The element detached.
+ */
+template <DLMEL_TEMPDEF> Element *DList<DLMEL_TEMPUSE>::
+ detach(Element *el)
+{
+ /* Set forward pointers to skip over el. */
+ if (el->BASE_EL(prev) == 0)
+ head = el->BASE_EL(next);
+ else {
+ el->BASE_EL(prev)->BASE_EL(next) =
+ el->BASE_EL(next);
+ }
+
+ /* Set reverse pointers to skip over el. */
+ if (el->BASE_EL(next) == 0)
+ tail = el->BASE_EL(prev);
+ else {
+ el->BASE_EL(next)->BASE_EL(prev) =
+ el->BASE_EL(prev);
+ }
+
+ /* Update List length and return element we detached. */
+ listLen--;
+ return el;
+}
+
+/**
+ * \brief Clear the list by deleting all elements.
+ *
+ * Each item in the list is deleted. The list is reset to its initial state.
+ */
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::empty()
+{
+ Element *nextToGo = 0, *cur = head;
+
+ while (cur != 0)
+ {
+ nextToGo = cur->BASE_EL(next);
+ delete cur;
+ cur = nextToGo;
+ }
+ head = tail = 0;
+ listLen = 0;
+}
+
+/**
+ * \brief Clear the list by forgetting all elements.
+ *
+ * All elements are abandoned, not deleted. The list is reset to it's initial
+ * state.
+ */
+template <DLMEL_TEMPDEF> void DList<DLMEL_TEMPUSE>::abandon()
+{
+ head = tail = 0;
+ listLen = 0;
+}
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
diff --git a/aapl/dlist.h b/aapl/dlist.h
new file mode 100644
index 0000000..e34c8da
--- /dev/null
+++ b/aapl/dlist.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2001 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_DLIST_H
+#define _AAPL_DLIST_H
+
+#define BASE_EL(name) name
+#define DLMEL_TEMPDEF class Element
+#define DLMEL_TEMPUSE Element
+#define DList DList
+
+/**
+ * \addtogroup dlist
+ * @{
+ */
+
+/**
+ * \class DList
+ * \brief Basic doubly linked list.
+ *
+ * DList is the standard by-structure list type. This class requires the
+ * programmer to declare a list element type that has the necessary next and
+ * previous pointers in it. This can be achieved by inheriting from the
+ * DListEl class or by simply adding next and previous pointers directly into
+ * the list element class.
+ *
+ * DList does not assume ownership of elements in the list. If the elements
+ * are known to reside on the heap, the provided empty() routine can be used to
+ * delete all elements, however the destructor will not call this routine, it
+ * will simply abandon all the elements. It is up to the programmer to
+ * explicitly de-allocate items when necessary.
+ *
+ * \include ex_dlist.cpp
+ */
+
+/*@}*/
+
+#include "dlcommon.h"
+
+#undef BASE_EL
+#undef DLMEL_TEMPDEF
+#undef DLMEL_TEMPUSE
+#undef DList
+
+#endif /* _AAPL_DLIST_H */
+
diff --git a/aapl/dlistmel.h b/aapl/dlistmel.h
new file mode 100644
index 0000000..17de543
--- /dev/null
+++ b/aapl/dlistmel.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2001 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_DLISTMEL_H
+#define _AAPL_DLISTMEL_H
+
+/**
+ * \addtogroup dlist
+ * @{
+ */
+
+/**
+ * \class DListMel
+ * \brief Doubly linked list for elements that may appear in multiple lists.
+ *
+ * This class is similar to DList, except that the user defined list element
+ * can inherit from multple DListEl classes and consequently be an element in
+ * multiple lists. In other words, DListMel allows a single instance of a data
+ * structure to be an element in multiple lists without the lists interfereing
+ * with one another.
+ *
+ * For each list that an element class is to appear in, the element must have
+ * unique next and previous pointers that can be unambiguously refered to with
+ * some base class name. This name is given to DListMel as a template argument
+ * so it can use the correct next and previous pointers in its list
+ * operations.
+ *
+ * DListMel does not assume ownership of elements in the list. If the elements
+ * are known to reside on the heap and are not contained in any other list or
+ * data structure, the provided empty() routine can be used to delete all
+ * elements, however the destructor will not call this routine, it will simply
+ * abandon all the elements. It is up to the programmer to explicitly
+ * de-allocate items when it is safe to do so.
+ *
+ * \include ex_dlistmel.cpp
+ */
+
+/*@}*/
+
+#define BASE_EL(name) BaseEl::name
+#define DLMEL_TEMPDEF class Element, class BaseEl
+#define DLMEL_TEMPUSE Element, BaseEl
+#define DList DListMel
+
+#include "dlcommon.h"
+
+#undef BASE_EL
+#undef DLMEL_TEMPDEF
+#undef DLMEL_TEMPUSE
+#undef DList
+
+#endif /* _AAPL_DLISTMEL_H */
+
diff --git a/aapl/dlistval.h b/aapl/dlistval.h
new file mode 100644
index 0000000..4fcf33f
--- /dev/null
+++ b/aapl/dlistval.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_DLISTVAL_H
+#define _AAPL_DLISTVAL_H
+
+/**
+ * \addtogroup dlist
+ * @{
+ */
+
+/**
+ * \class DListVal
+ * \brief By-value doubly linked list.
+ *
+ * This class is a doubly linked list that does not require a list element
+ * type to be declared. The user instead gives a type that is to be stored in
+ * the list element. When inserting a new data item, the value is copied into
+ * a newly allocated element. This list is inteded to behave and be utilized
+ * like the list template found in the STL.
+ *
+ * DListVal is different from the other lists in that it allocates elements
+ * itself. The raw element insert interface is still exposed for convenience,
+ * however, the list assumes all elements in the list are allocated on the
+ * heap and are to be managed by the list. The destructor WILL delete the
+ * contents of the list. If the list is ever copied in from another list, the
+ * existing contents are deleted first. This is in contrast to DList and
+ * DListMel, which will never delete their contents to allow for statically
+ * allocated elements.
+ *
+ * \include ex_dlistval.cpp
+ */
+
+/*@}*/
+
+#define BASE_EL(name) name
+#define DLMEL_TEMPDEF class T
+#define DLMEL_TEMPUSE T
+#define DList DListVal
+#define Element DListValEl<T>
+#define DOUBLELIST_VALUE
+
+#include "dlcommon.h"
+
+#undef BASE_EL
+#undef DLMEL_TEMPDEF
+#undef DLMEL_TEMPUSE
+#undef DList
+#undef Element
+#undef DOUBLELIST_VALUE
+
+#endif /* _AAPL_DLISTVAL_H */
+
diff --git a/aapl/insertsort.h b/aapl/insertsort.h
new file mode 100644
index 0000000..94aef7b
--- /dev/null
+++ b/aapl/insertsort.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_INSERTSORT_H
+#define _AAPL_INSERTSORT_H
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/**
+ * \addtogroup sort
+ * @{
+ */
+
+/**
+ * \class InsertSort
+ * \brief Insertion sort an array of data.
+ *
+ * InsertSort can be used to sort any array of objects of type T provided a
+ * compare class is given. InsertSort is in-place. It does not require any
+ * temporary storage.
+ *
+ * Objects are not made aware that they are being moved around in memory.
+ * Assignment operators, constructors and destructors are never invoked by the
+ * sort.
+ *
+ * InsertSort runs in O(n^2) time. It is most useful when sorting small arrays.
+ * where it can outperform the O(n*log(n)) sorters due to its simplicity.
+ * InsertSort is a not a stable sort. Elements with the same key will not have
+ * their relative ordering preserved.
+ */
+
+/*@}*/
+
+/* InsertSort. */
+template <class T, class Compare> class InsertSort
+ : public Compare
+{
+public:
+ /* Sorting interface routine. */
+ void sort(T *data, long len);
+};
+
+
+/**
+ * \brief Insertion sort an array of data.
+ */
+template <class T, class Compare>
+ void InsertSort<T,Compare>::sort(T *data, long len)
+{
+ /* For each next largest spot in the sorted array... */
+ for ( T *dest = data; dest < data+len-1; dest++ ) {
+ /* Find the next smallest element in the unsorted array. */
+ T *smallest = dest;
+ for ( T *src = dest+1; src < data+len; src++ ) {
+ /* If src is smaller than the current src, then use it. */
+ if ( compare( *src, *smallest ) < 0 )
+ smallest = src;
+ }
+
+ if ( smallest != dest ) {
+ /* Swap dest, smallest. */
+ char tmp[sizeof(T)];
+ memcpy( tmp, dest, sizeof(T) );
+ memcpy( dest, smallest, sizeof(T) );
+ memcpy( smallest, tmp, sizeof(T) );
+ }
+ }
+}
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+#endif /* _AAPL_INSERTSORT_H */
diff --git a/aapl/mergesort.h b/aapl/mergesort.h
new file mode 100644
index 0000000..8cefa73
--- /dev/null
+++ b/aapl/mergesort.h
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2001, 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_MERGESORT_H
+#define _AAPL_MERGESORT_H
+
+#include "bubblesort.h"
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/**
+ * \addtogroup sort
+ * @{
+ */
+
+/**
+ * \class MergeSort
+ * \brief Merge sort an array of data.
+ *
+ * MergeSort can be used to sort any array of objects of type T provided a
+ * compare class is given. MergeSort is not in-place, it requires temporary
+ * storage equal to the size of the array. The temporary storage is allocated
+ * on the heap.
+ *
+ * Objects are not made aware that they are being moved around in memory.
+ * Assignment operators, constructors and destructors are never invoked by the
+ * sort.
+ *
+ * MergeSort runs in worst case O(n*log(n)) time. In most cases it is slower
+ * than QuickSort because more copying is neccessary. But on the other hand,
+ * it is a stable sort, meaning that objects with the same key have their
+ * relative ordering preserved. Also, its worst case is better. MergeSort
+ * switches to a BubbleSort when the size of the array being sorted is small.
+ * This happens when directly sorting a small array or when MergeSort calls
+ * itself recursively on a small portion of a larger array.
+ */
+
+/*@}*/
+
+
+/* MergeSort. */
+template <class T, class Compare> class MergeSort
+ : public BubbleSort<T, Compare>
+{
+public:
+ /* Sorting interface routine. */
+ void sort(T *data, long len);
+
+private:
+ /* Recursive worker. */
+ void doSort(T *tmpStor, T *data, long len);
+};
+
+#define _MS_BUBBLE_THRESH 16
+
+/* Recursive mergesort worker. Split data, make recursive calls, merge
+ * results. */
+template< class T, class Compare> void MergeSort<T,Compare>::
+ doSort(T *tmpStor, T *data, long len)
+{
+ if ( len <= 1 )
+ return;
+
+ if ( len <= _MS_BUBBLE_THRESH ) {
+ BubbleSort<T, Compare>::sort( data, len );
+ return;
+ }
+
+ long mid = len / 2;
+
+ doSort( tmpStor, data, mid );
+ doSort( tmpStor + mid, data + mid, len - mid );
+
+ /* Merge the data. */
+ T *endLower = data + mid, *lower = data;
+ T *endUpper = data + len, *upper = data + mid;
+ T *dest = tmpStor;
+ while ( true ) {
+ if ( lower == endLower ) {
+ /* Possibly upper left. */
+ if ( upper != endUpper )
+ memcpy( dest, upper, (endUpper - upper) * sizeof(T) );
+ break;
+ }
+ else if ( upper == endUpper ) {
+ /* Only lower left. */
+ if ( lower != endLower )
+ memcpy( dest, lower, (endLower - lower) * sizeof(T) );
+ break;
+ }
+ else {
+ /* Both upper and lower left. */
+ if ( this->compare(*lower, *upper) <= 0 )
+ memcpy( dest++, lower++, sizeof(T) );
+ else
+ memcpy( dest++, upper++, sizeof(T) );
+ }
+ }
+
+ /* Copy back from the tmpStor array. */
+ memcpy( data, tmpStor, sizeof( T ) * len );
+}
+
+/**
+ * \brief Merge sort an array of data.
+ */
+template< class T, class Compare>
+ void MergeSort<T,Compare>::sort(T *data, long len)
+{
+ /* Allocate the tmp space needed by merge sort, sort and free. */
+ T *tmpStor = (T*) new char[sizeof(T) * len];
+ doSort( tmpStor, data, len );
+ delete[] (char*) tmpStor;
+}
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+#endif /* _AAPL_MERGESORT_H */
diff --git a/aapl/quicksort.h b/aapl/quicksort.h
new file mode 100644
index 0000000..bb6941e
--- /dev/null
+++ b/aapl/quicksort.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_QUICKSORT_H
+#define _AAPL_QUICKSORT_H
+
+#include "insertsort.h"
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/**
+ * \addtogroup sort
+ * @{
+ */
+
+/**
+ * \class QuickSort
+ * \brief Quick sort an array of data.
+ *
+ * QuickSort can be used to sort any array of objects of type T provided a
+ * compare class is given. QuickSort is in-place. It does not require any
+ * temporary storage.
+ *
+ * Objects are not made aware that they are being moved around in memory.
+ * Assignment operators, constructors and destructors are never invoked by the
+ * sort.
+ *
+ * QuickSort runs in O(n*log(n)) time in the average case. It is faster than
+ * mergsort in the average case because it does less moving of data. The
+ * performance of quicksort depends mostly on the choice of pivot. This
+ * implementation picks the pivot as the median of first, middle, last. This
+ * choice of pivot avoids the O(n^2) worst case for input already sorted, but
+ * it is still possible to encounter the O(n^2) worst case. For example an
+ * array of identical elements will run in O(n^2)
+ *
+ * QuickSort is not a stable sort. Elements with the same key will not have
+ * their relative ordering preserved. QuickSort switches to an InsertSort
+ * when the size of the array being sorted is small. This happens when
+ * directly sorting a small array or when QuickSort calls iteself recursively
+ * on a small portion of a larger array.
+ */
+
+/*@}*/
+
+/* QuickSort. */
+template <class T, class Compare> class QuickSort :
+ public InsertSort<T, Compare>
+{
+public:
+ /* Sorting interface routine. */
+ void sort(T *data, long len);
+
+private:
+ /* Recursive worker. */
+ void doSort(T *start, T *end);
+ T *partition(T *start, T *end);
+ inline T *median(T *start, T *end);
+};
+
+#define _QS_INSERTION_THRESH 16
+
+/* Finds the median of start, middle, end. */
+template <class T, class Compare> T *QuickSort<T,Compare>::
+ median(T *start, T *end)
+{
+ T *pivot, *mid = start + (end-start)/2;
+
+ /* CChoose the pivot. */
+ if ( compare(*start, *mid) < 0 ) {
+ if ( compare(*mid, *end) < 0 )
+ pivot = mid;
+ else if ( compare(*start, *end) < 0 )
+ pivot = end;
+ else
+ pivot = start;
+ }
+ else if ( compare(*start, *end) < 0 )
+ pivot = start;
+ else if ( compare(*mid, *end) < 0 )
+ pivot = end;
+ else
+ pivot = mid;
+
+ return pivot;
+}
+
+template <class T, class Compare> T *QuickSort<T,Compare>::
+ partition(T *start, T *end)
+{
+ /* Use the median of start, middle, end as the pivot. First save
+ * it off then move the last element to the free spot. */
+ char pcPivot[sizeof(T)];
+ T *pivot = median(start, end);
+
+ memcpy( pcPivot, pivot, sizeof(T) );
+ if ( pivot != end )
+ memcpy( pivot, end, sizeof(T) );
+
+ T *first = start-1;
+ T *last = end;
+ pivot = (T*) pcPivot;
+
+ /* Shuffle element to the correct side of the pivot, ending
+ * up with the free spot where the pivot will go. */
+ while ( true ) {
+ /* Throw one element ahead to the free spot at last. */
+ while ( true ) {
+ first += 1;
+ if ( first == last )
+ goto done;
+ if ( compare( *first, *pivot ) > 0 ) {
+ memcpy(last, first, sizeof(T));
+ break;
+ }
+ }
+
+ /* Throw one element back to the free spot at first. */
+ while ( true ) {
+ last -= 1;
+ if ( last == first )
+ goto done;
+ if ( compare( *last, *pivot ) < 0 ) {
+ memcpy(first, last, sizeof(T));
+ break;
+ }
+ }
+ }
+done:
+ /* Put the pivot into the middle spot for it. */
+ memcpy( first, pivot, sizeof(T) );
+ return first;
+}
+
+
+template< class T, class Compare> void QuickSort<T,Compare>::
+ doSort(T *start, T *end)
+{
+ long len = end - start + 1;
+ if ( len > _QS_INSERTION_THRESH ) {
+ /* Use quicksort. */
+ T *pivot = partition( start, end );
+ doSort(start, pivot-1);
+ doSort(pivot+1, end);
+ }
+ else if ( len > 1 ) {
+ /* Array is small, use insertion sort. */
+ InsertSort<T, Compare>::sort( start, len );
+ }
+}
+
+/**
+ * \brief Quick sort an array of data.
+ */
+template< class T, class Compare>
+ void QuickSort<T,Compare>::sort(T *data, long len)
+{
+ /* Call recursive worker. */
+ doSort(data, data+len-1);
+}
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+#endif /* _AAPL_QUICKSORT_H */
diff --git a/aapl/resize.h b/aapl/resize.h
new file mode 100644
index 0000000..9e8491a
--- /dev/null
+++ b/aapl/resize.h
@@ -0,0 +1,344 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_RESIZE_H
+#define _AAPL_RESIZE_H
+
+#include <assert.h>
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/* This step is expressed in units of T. Changing this requires changes to
+ * docs in ResizeLin constructor. */
+#define LIN_DEFAULT_STEP 256
+
+/*
+ * Resizing macros giving different resize methods.
+ */
+
+/* If needed is greater than existing, give twice needed. */
+#define EXPN_UP( existing, needed ) \
+ needed > existing ? (needed<<1) : existing
+
+/* If needed is less than 1 quarter existing, give twice needed. */
+#define EXPN_DOWN( existing, needed ) \
+ needed < (existing>>2) ? (needed<<1) : existing
+
+/* If needed is greater than existing, give needed plus step. */
+#define LIN_UP( existing, needed ) \
+ needed > existing ? (needed+step) : existing
+
+/* If needed is less than existing - 2 * step then give needed plus step. */
+#define LIN_DOWN( existing, needed ) \
+ needed < (existing-(step<<1)) ? (needed+step) : existing
+
+/* Return existing. */
+#define CONST_UP( existing, needed ) existing
+
+/* Return existing. */
+#define CONST_DOWN( existing, needed ) existing
+
+/**
+ * \addtogroup vector
+ * @{
+ */
+
+/** \class ResizeLin
+ * \brief Linear table resizer.
+ *
+ * When an up resize or a down resize is needed, ResizeLin allocates the space
+ * needed plus some user defined step. The result is that when growing the
+ * vector in a linear fashion, the number of resizes is also linear.
+ *
+ * If only up resizing is done, then there will never be more than step unused
+ * spaces in the vector. If down resizing is done as well, there will never be
+ * more than 2*step unused spaces in the vector. The up resizing and down
+ * resizing policies are offset to improve performance when repeatedly
+ * inserting and removing a small number of elements relative to the step.
+ * This scheme guarantees that repetitive inserting and removing of a small
+ * number of elements will never result in repetative reallocation.
+ *
+ * The vectors pass sizes to the resizer in units of T, so the step gets
+ * interpreted as units of T.
+ */
+
+/*@}*/
+
+/* Linear resizing. */
+class ResizeLin
+{
+protected:
+ /**
+ * \brief Default constructor.
+ *
+ * Intializes resize step to 256 units of the table type T.
+ */
+ ResizeLin() : step(LIN_DEFAULT_STEP) { }
+
+ /**
+ * \brief Determine the new table size when up resizing.
+ *
+ * If the existing size is insufficient for the space needed, then allocate
+ * the space needed plus the step. The step is in units of T.
+ */
+ inline long upResize( long existing, long needed )
+ { return LIN_UP(existing, needed); }
+
+ /**
+ * \brief Determine the new table size when down resizing.
+ *
+ * If space needed is less than the existing - 2*step, then allocate the
+ * space needed space plus the step. The step is in units of T.
+ */
+ inline long downResize( long existing, long needed )
+ { return LIN_DOWN(existing, needed); }
+
+public:
+ /**
+ * \brief Step for linear resize.
+ *
+ * Amount of extra space in units of T added each time a resize must take
+ * place. This may be changed at any time. The step should be >= 0.
+ */
+ long step;
+};
+
+/**
+ * \addtogroup vector
+ * @{
+ */
+
+/** \class ResizeCtLin
+ * \brief Linear table resizer with compile time step.
+ *
+ * When an up resize or a down resize is needed, ResizeCtLin allocates the
+ * space needed plus some compile time defined step. The result is that when
+ * growing the vector in a linear fashion, the number of resizes is also
+ * linear.
+ *
+ * If only up resizing is done, then there will never be more than step unused
+ * spaces in the vector. If down resizing is done as well, there will never be
+ * more than 2*step unused spaces in the vector. The up resizing and down
+ * resizing policies are offset to improve performance when repeatedly
+ * inserting and removing a small number of elements relative to the step.
+ * This scheme guarantees that repetitive inserting and removing of a small
+ * number of elements will never result in repetative reallocation.
+ *
+ * The vectors pass sizes to the resizer in units of T, so the step gets
+ * interpreted as units of T.
+ */
+
+/*@}*/
+
+/* Linear resizing. */
+template <long step> class ResizeCtLin
+{
+protected:
+ /**
+ * \brief Determine the new table size when up resizing.
+ *
+ * If the existing size is insufficient for the space needed, then allocate
+ * the space needed plus the step. The step is in units of T.
+ */
+ inline long upResize( long existing, long needed )
+ { return LIN_UP(existing, needed); }
+
+ /**
+ * \brief Determine the new table size when down resizing.
+ *
+ * If space needed is less than the existing - 2*step, then allocate the
+ * space needed space plus the step. The step is in units of T.
+ */
+ inline long downResize( long existing, long needed )
+ { return LIN_DOWN(existing, needed); }
+};
+
+/**
+ * \addtogroup vector
+ * @{
+ */
+
+/** \class ResizeConst
+ * \brief Constant table resizer.
+ *
+ * When an up resize is needed the existing size is always used. ResizeConst
+ * does not allow dynamic resizing. To use ResizeConst, the vector needs to be
+ * constructed with and initial allocation amount otherwise it will be
+ * unusable.
+ */
+
+/*@}*/
+
+/* Constant table resizing. */
+class ResizeConst
+{
+protected:
+ /* Assert don't need more than exists. Return existing. */
+ static inline long upResize( long existing, long needed );
+
+ /**
+ * \brief Determine the new table size when down resizing.
+ *
+ * Always returns the existing table size.
+ */
+ static inline long downResize( long existing, long needed )
+ { return CONST_DOWN(existing, needed); }
+};
+
+/**
+ * \brief Determine the new table size when up resizing.
+ *
+ * If the existing size is insufficient for the space needed, then an assertion
+ * will fail. Otherwise returns the existing size.
+ */
+inline long ResizeConst::upResize( long existing, long needed )
+{
+ assert( needed <= existing );
+ return CONST_UP(existing, needed);
+}
+
+/**
+ * \addtogroup vector
+ * @{
+ */
+
+/** \class ResizeRunTime
+ * \brief Run time settable table resizer.
+ *
+ * ResizeRunTime can have it's up and down resizing policies set at run time.
+ * Both up and down policies can be set independently to one of Exponential,
+ * Linear, or Constant. See the documentation for ResizeExpn, ResizeLin, and
+ * ResizeConst for the details of the resizing policies.
+ *
+ * The policies may be changed at any time. The default policies are
+ * both Exponential.
+ */
+
+/*@}*/
+
+/* Run time resizing. */
+class ResizeRunTime
+{
+protected:
+ /**
+ * \brief Default constuctor.
+ *
+ * The up and down resizing it initialized to Exponetial. The step
+ * defaults to 256 units of T.
+ */
+ inline ResizeRunTime();
+
+ /**
+ * \brief Resizing policies.
+ */
+ enum ResizeType {
+ Exponential, /*!< Exponential resizing. */
+ Linear, /*!< Linear resizing. */
+ Constant /*!< Constant table size. */
+ };
+
+ inline long upResize( long existing, long needed );
+ inline long downResize( long existing, long needed );
+
+public:
+ /**
+ * \brief Step for linear resize.
+ *
+ * Amount of extra space in units of T added each time a resize must take
+ * place. This may be changed at any time. The step should be >= 0.
+ */
+ long step;
+
+ /**
+ * \brief Up resizing policy.
+ */
+ ResizeType upResizeType;
+
+ /**
+ * \brief Down resizing policy.
+ */
+ ResizeType downResizeType;
+};
+
+inline ResizeRunTime::ResizeRunTime()
+:
+ step( LIN_DEFAULT_STEP ),
+ upResizeType( Exponential ),
+ downResizeType( Exponential )
+{
+}
+
+/**
+ * \brief Determine the new table size when up resizing.
+ *
+ * Type of up resizing is determined by upResizeType. Exponential, Linear and
+ * Constant resizing is the same as that of ResizeExpn, ResizeLin and
+ * ResizeConst.
+ */
+inline long ResizeRunTime::upResize( long existing, long needed )
+{
+ switch ( upResizeType ) {
+ case Exponential:
+ return EXPN_UP(existing, needed);
+ case Linear:
+ return LIN_UP(existing, needed);
+ case Constant:
+ assert( needed <= existing );
+ return CONST_UP(existing, needed);
+ }
+ return 0;
+};
+
+/**
+ * \brief Determine the new table size when down resizing.
+ *
+ * Type of down resizing is determined by downResiizeType. Exponential, Linear
+ * and Constant resizing is the same as that of ResizeExpn, ResizeLin and
+ * ResizeConst.
+ */
+inline long ResizeRunTime::downResize( long existing, long needed )
+{
+ switch ( downResizeType ) {
+ case Exponential:
+ return EXPN_DOWN(existing, needed);
+ case Linear:
+ return LIN_DOWN(existing, needed);
+ case Constant:
+ return CONST_DOWN(existing, needed);
+ }
+ return 0;
+}
+
+/* Don't need these anymore. */
+#undef EXPN_UP
+#undef EXPN_DOWN
+#undef LIN_UP
+#undef LIN_DOWN
+#undef CONST_UP
+#undef CONST_DOWN
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+#endif /* _AAPL_RESIZE_H */
diff --git a/aapl/sbstmap.h b/aapl/sbstmap.h
new file mode 100644
index 0000000..e3975a1
--- /dev/null
+++ b/aapl/sbstmap.h
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_SBSTMAP_H
+#define _AAPL_SBSTMAP_H
+
+#include "compare.h"
+#include "svector.h"
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/**
+ * \brief Element for BstMap.
+ *
+ * Stores the key and value pair.
+ */
+template <class Key, class Value> struct SBstMapEl
+{
+ SBstMapEl() {}
+ SBstMapEl(const Key &key) : key(key) {}
+ SBstMapEl(const Key &key, const Value &val) : key(key), value(val) {}
+
+ /** \brief The key */
+ Key key;
+
+ /** \brief The value. */
+ Value value;
+};
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+/**
+ * \addtogroup bst
+ * @{
+ */
+
+/**
+ * \class SBstMap
+ * \brief Copy-on-write binary search table for key and value pairs.
+ *
+ * This is a map style binary search table that employs the copy-on-write
+ * mechanism for table data. BstMap stores key and value pairs in each
+ * element. The key and value can be any type. A compare class for the key
+ * must be supplied.
+ */
+
+/*@}*/
+
+#define BST_TEMPL_DECLARE class Key, class Value, \
+ class Compare = CmpOrd<Key>, class Resize = ResizeExpn
+#define BST_TEMPL_DEF class Key, class Value, class Compare, class Resize
+#define BST_TEMPL_USE Key, Value, Compare, Resize
+#define GET_KEY(el) ((el).key)
+#define BstTable SBstMap
+#define Vector SVector
+#define Table STable
+#define Element SBstMapEl<Key, Value>
+#define BSTMAP
+#define SHARED_BST
+
+#include "bstcommon.h"
+
+#undef BST_TEMPL_DECLARE
+#undef BST_TEMPL_DEF
+#undef BST_TEMPL_USE
+#undef GET_KEY
+#undef BstTable
+#undef Vector
+#undef Table
+#undef Element
+#undef BSTMAP
+#undef SHARED_BST
+
+/**
+ * \fn SBstMap::insert(const Key &key, BstMapEl<Key, Value> **lastFound)
+ * \brief Insert the given key.
+ *
+ * If the given key does not already exist in the table then a new element
+ * having key is inserted. They key copy constructor and value default
+ * constructor are used to place the pair in the table. If lastFound is given,
+ * it is set to the new entry created. If the insert fails then lastFound is
+ * set to the existing pair of the same key.
+ *
+ * \returns The new element created upon success, null upon failure.
+ */
+
+/**
+ * \fn SBstMap::insertMulti(const Key &key)
+ * \brief Insert the given key even if it exists already.
+ *
+ * If the key exists already then the new element having key is placed next
+ * to some other pair of the same key. InsertMulti cannot fail. The key copy
+ * constructor and the value default constructor are used to place the pair in
+ * the table.
+ *
+ * \returns The new element created.
+ */
+
+#endif /* _AAPL_SBSTMAP_H */
diff --git a/aapl/sbstset.h b/aapl/sbstset.h
new file mode 100644
index 0000000..3487ee7
--- /dev/null
+++ b/aapl/sbstset.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_SBSTSET_H
+#define _AAPL_SBSTSET_H
+
+/**
+ * \addtogroup bst
+ * @{
+ */
+
+/**
+ * \class SBstSet
+ * \brief Copy-on-write binary search table for types that are the key.
+ *
+ * This is a set style binary search table that employs the copy-on-write
+ * mechanism for storing table data. BstSet is suitable for types that
+ * comprise the entire key. Rather than look into the element to retrieve the
+ * key, the element is the key. A class that contains a comparison routine
+ * for the key must be given.
+ */
+
+/*@}*/
+
+#include "compare.h"
+#include "svector.h"
+
+#define BST_TEMPL_DECLARE class Key, class Compare = CmpOrd<Key>, \
+ class Resize = ResizeExpn
+#define BST_TEMPL_DEF class Key, class Compare, class Resize
+#define BST_TEMPL_USE Key, Compare, Resize
+#define GET_KEY(el) (el)
+#define BstTable SBstSet
+#define Vector SVector
+#define Table STable
+#define Element Key
+#define BSTSET
+#define SHARED_BST
+
+#include "bstcommon.h"
+
+#undef BST_TEMPL_DECLARE
+#undef BST_TEMPL_DEF
+#undef BST_TEMPL_USE
+#undef GET_KEY
+#undef BstTable
+#undef Vector
+#undef Table
+#undef Element
+#undef BSTSET
+#undef SHARED_BST
+
+/**
+ * \fn SBstSet::insert(const Key &key, Key **lastFound)
+ * \brief Insert the given key.
+ *
+ * If the given key does not already exist in the table then it is inserted.
+ * The key's copy constructor is used to place the item in the table. If
+ * lastFound is given, it is set to the new entry created. If the insert fails
+ * then lastFound is set to the existing key of the same value.
+ *
+ * \returns The new element created upon success, null upon failure.
+ */
+
+/**
+ * \fn SBstSet::insertMulti(const Key &key)
+ * \brief Insert the given key even if it exists already.
+ *
+ * If the key exists already then it is placed next to some other key of the
+ * same value. InsertMulti cannot fail. The key's copy constructor is used to
+ * place the item in the table.
+ *
+ * \returns The new element created.
+ */
+
+#endif /* _AAPL_SBSTSET_H */
diff --git a/aapl/sbsttable.h b/aapl/sbsttable.h
new file mode 100644
index 0000000..348f1fd
--- /dev/null
+++ b/aapl/sbsttable.h
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_SBSTTABLE_H
+#define _AAPL_SBSTTABLE_H
+
+#include "compare.h"
+#include "svector.h"
+
+/**
+ * \addtogroup bst
+ * @{
+ */
+
+/**
+ * \class SBstTable
+ * \brief Copy-on-write binary search table for structures that contain a key.
+ *
+ * This is a basic binary search table that employs a copy-on-write data
+ * storage mechanism. It can be used to contain a structure that has a key and
+ * possibly some data. The key should be a member of the element class and
+ * accessible with getKey(). A class containing the compare routine must be
+ * supplied.
+ */
+
+/*@}*/
+
+#define BST_TEMPL_DECLARE class Element, class Key, \
+ class Compare = CmpOrd<Key>, class Resize = ResizeExpn
+#define BST_TEMPL_DEF class Element, class Key, class Compare, class Resize
+#define BST_TEMPL_USE Element, Key, Compare, Resize
+#define GET_KEY(el) ((el).getKey())
+#define BstTable SBstTable
+#define Vector SVector
+#define Table STable
+#define BSTTABLE
+#define SHARED_BST
+
+#include "bstcommon.h"
+
+#undef BST_TEMPL_DECLARE
+#undef BST_TEMPL_DEF
+#undef BST_TEMPL_USE
+#undef GET_KEY
+#undef BstTable
+#undef Vector
+#undef Table
+#undef BSTTABLE
+#undef SHARED_BST
+
+/**
+ * \fn SBstTable::insert(const Key &key, Element **lastFound)
+ * \brief Insert a new element with the given key.
+ *
+ * If the given key does not already exist in the table a new element is
+ * inserted with the given key. A constructor taking only const Key& is used
+ * to initialize the new element. If lastFound is given, it is set to the new
+ * element created. If the insert fails then lastFound is set to the existing
+ * element with the same key.
+ *
+ * \returns The new element created upon success, null upon failure.
+ */
+
+/**
+ * \fn SBstTable::insertMulti(const Key &key)
+ * \brief Insert a new element even if the key exists already.
+ *
+ * If the key exists already then the new element is placed next to some
+ * element with the same key. InsertMulti cannot fail. A constructor taking
+ * only const Key& is used to initialize the new element.
+ *
+ * \returns The new element created.
+ */
+
+#endif /* _AAPL_SBSTTABLE_H */
diff --git a/aapl/svector.h b/aapl/svector.h
new file mode 100644
index 0000000..7dcae62
--- /dev/null
+++ b/aapl/svector.h
@@ -0,0 +1,1350 @@
+/*
+ * Copyright 2002, 2006 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_SVECTOR_H
+#define _AAPL_SVECTOR_H
+
+#include <new>
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "table.h"
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/**
+ * \addtogroup vector
+ * @{
+ */
+
+/** \class SVector
+ * \brief Copy-on-write dynamic array.
+ *
+ * SVector is a variant of Vector that employs copy-on-write behaviour. The
+ * SVector copy constructor and = operator make shallow copies. If a vector
+ * that references shared data is modified with insert, replace, append,
+ * prepend, setAs or remove, a new copy is made so as not to interfere with
+ * the shared data. However, shared individual elements may be modified by
+ * bypassing the SVector interface.
+ *
+ * SVector is a dynamic array that can be used to contain complex data
+ * structures that have constructors and destructors as well as simple types
+ * such as integers and pointers.
+ *
+ * SVector supports inserting, overwriting, and removing single or multiple
+ * elements at once. Constructors and destructors are called wherever
+ * appropriate. For example, before an element is overwritten, it's
+ * destructor is called.
+ *
+ * SVector provides automatic resizing of allocated memory as needed and
+ * offers different allocation schemes for controlling how the automatic
+ * allocation is done. Two senses of the the length of the data is
+ * maintained: the amount of raw memory allocated to the vector and the number
+ * of actual elements in the vector. The various allocation schemes control
+ * how the allocated space is changed in relation to the number of elements in
+ * the vector.
+ */
+
+/*@}*/
+
+/* SVector */
+template < class T, class Resize = ResizeExpn > class SVector :
+ public STable<T>, public Resize
+{
+private:
+ typedef STable<T> BaseTable;
+
+public:
+ /**
+ * \brief Initialize an empty vector with no space allocated.
+ *
+ * If a linear resizer is used, the step defaults to 256 units of T. For a
+ * runtime vector both up and down allocation schemes default to
+ * Exponential.
+ */
+ SVector() { }
+
+ /**
+ * \brief Create a vector that contains an initial element.
+ *
+ * The vector becomes one element in length. The element's copy
+ * constructor is used to place the value in the vector.
+ */
+ SVector(const T &val) { setAs(&val, 1); }
+
+ /**
+ * \brief Create a vector that contains an array of elements.
+ *
+ * The vector becomes len elements in length. Copy constructors are used
+ * to place the new elements in the vector.
+ */
+ SVector(const T *val, long len) { setAs(val, len); }
+
+ /* Shallow copy. */
+ SVector( const SVector &v );
+
+ /**
+ * \brief Free all memory used by the vector.
+ *
+ * The vector is reset to zero elements. Destructors are called on all
+ * elements in the vector. The space allocated for the vector is freed.
+ */
+ ~SVector() { empty(); }
+
+ /* Delete all items. */
+ void empty();
+
+ /**
+ * \brief Deep copy another vector into this vector.
+ *
+ * Copies the entire contents of the other vector into this vector. Any
+ * existing contents are first deleted. Equivalent to setAs.
+ */
+ void deepCopy( const SVector &v ) { setAs(v.data, v.length()); }
+
+ /* Perform a shallow copy of another vector. */
+ SVector &operator=( const SVector &v );
+
+
+ /*@{*/
+ /**
+ * \brief Insert one element at position pos.
+ *
+ * Elements in the vector from pos onward are shifted one space to the
+ * right. The copy constructor is used to place the element into this
+ * vector. If pos is greater than the length of the vector then undefined
+ * behaviour results. If pos is negative then it is treated as an offset
+ * relative to the length of the vector.
+ */
+ void insert(long pos, const T &val) { insert(pos, &val, 1); }
+
+ /* Insert an array of values. */
+ void insert(long pos, const T *val, long len);
+
+ /**
+ * \brief Insert all the elements from another vector at position pos.
+ *
+ * Elements in this vector from pos onward are shifted v.length() spaces
+ * to the right. The element's copy constructor is used to copy the items
+ * into this vector. The other vector is left unchanged. If pos is off the
+ * end of the vector, then undefined behaviour results. If pos is negative
+ * then it is treated as an offset relative to the length of the vector.
+ * Equivalent to vector.insert(pos, other.data, other.length()).
+ */
+ void insert(long pos, const SVector &v) { insert(pos, v.data, v.length()); }
+
+ /* Insert len copies of val into the vector. */
+ void insertDup(long pos, const T &val, long len);
+
+ /**
+ * \brief Insert one new element using the default constrcutor.
+ *
+ * Elements in the vector from pos onward are shifted one space to the right.
+ * The default constructor is used to init the new element. If pos is greater
+ * than the length of the vector then undefined behaviour results. If pos is
+ * negative then it is treated as an offset relative to the length of the
+ * vector.
+ */
+ void insertNew(long pos) { insertNew(pos, 1); }
+
+ /* Insert len new items using default constructor. */
+ void insertNew(long pos, long len);
+ /*@}*/
+
+ /*@{*/
+ /**
+ * \brief Remove one element at position pos.
+ *
+ * The element's destructor is called. Elements to the right of pos are
+ * shifted one space to the left to take up the free space. If pos is greater
+ * than or equal to the length of the vector then undefined behavior results.
+ * If pos is negative then it is treated as an offset relative to the length
+ * of the vector.
+ */
+ void remove(long pos) { remove(pos, 1); }
+
+ /* Delete a number of elements. */
+ void remove(long pos, long len);
+ /*@}*/
+
+ /*@{*/
+ /**
+ * \brief Replace one element at position pos.
+ *
+ * If there is an existing element at position pos (if pos is less than the
+ * length of the vector) then its destructor is called before the space is
+ * used. The copy constructor is used to place the element into the vector.
+ * If pos is greater than the length of the vector then undefined behaviour
+ * results. If pos is negative then it is treated as an offset relative to
+ * the length of the vector.
+ */
+ void replace(long pos, const T &val) { replace(pos, &val, 1); }
+
+ /* Replace with an array of values. */
+ void replace(long pos, const T *val, long len);
+
+ /**
+ * \brief Replace at position pos with all the elements of another vector.
+ *
+ * Replace at position pos with all the elements of another vector. The other
+ * vector is left unchanged. If there are existing elements at the positions
+ * to be replaced, then destructors are called before the space is used. Copy
+ * constructors are used to place the elements into this vector. It is
+ * allowable for the pos and length of the other vector to specify a
+ * replacement that overwrites existing elements and creates new ones. If pos
+ * is greater than the length of the vector then undefined behaviour results.
+ * If pos is negative, then it is treated as an offset relative to the length
+ * of the vector.
+ */
+ void replace(long pos, const SVector &v) { replace(pos, v.data, v.length()); }
+
+ /* Replace len items with len copies of val. */
+ void replaceDup(long pos, const T &val, long len);
+
+ /**
+ * \brief Replace at position pos with one new element.
+ *
+ * If there is an existing element at the position to be replaced (pos is
+ * less than the length of the vector) then the element's destructor is
+ * called before the space is used. The default constructor is used to
+ * initialize the new element. If pos is greater than the length of the
+ * vector then undefined behaviour results. If pos is negative, then it is
+ * treated as an offset relative to the length of the vector.
+ */
+ void replaceNew(long pos) { replaceNew(pos, 1); }
+
+ /* Replace len items at pos with newly constructed objects. */
+ void replaceNew(long pos, long len);
+ /*@}*/
+
+ /*@{*/
+
+ /**
+ * \brief Set the contents of the vector to be val exactly.
+ *
+ * The vector becomes one element in length. Destructors are called on any
+ * existing elements in the vector. The element's copy constructor is used to
+ * place the val in the vector.
+ */
+ void setAs(const T &val) { setAs(&val, 1); }
+
+ /* Set to the contents of an array. */
+ void setAs(const T *val, long len);
+
+ /**
+ * \brief Set the vector to exactly the contents of another vector.
+ *
+ * The vector becomes v.length() elements in length. Destructors are called
+ * on any existing elements. Copy constructors are used to place the new
+ * elements in the vector.
+ */
+ void setAs(const SVector &v) { setAs(v.data, v.length()); }
+
+ /* Set as len copies of item. */
+ void setAsDup(const T &item, long len);
+
+ /**
+ * \brief Set the vector to exactly one new item.
+ *
+ * The vector becomes one element in length. Destructors are called on any
+ * existing elements in the vector. The default constructor is used to
+ * init the new item.
+ */
+ void setAsNew() { setAsNew(1); }
+
+ /* Set as newly constructed objects using the default constructor. */
+ void setAsNew(long len);
+ /*@}*/
+
+ /*@{*/
+ /**
+ * \brief Append one elment to the end of the vector.
+ *
+ * Copy constructor is used to place the element in the vector.
+ */
+ void append(const T &val) { replace(BaseTable::length(), &val, 1); }
+
+ /**
+ * \brief Append len elements to the end of the vector.
+ *
+ * Copy constructors are used to place the elements in the vector.
+ */
+ void append(const T *val, long len) { replace(BaseTable::length(), val, len); }
+
+ /**
+ * \brief Append the contents of another vector.
+ *
+ * The other vector is left unchanged. Copy constructors are used to place
+ * the elements in the vector.
+ */
+ void append(const SVector &v)
+ { replace(BaseTable::length(), v.data, v.length()); }
+
+ /**
+ * \brief Append len copies of item.
+ *
+ * The copy constructor is used to place the item in the vector.
+ */
+ void appendDup(const T &item, long len) { replaceDup(BaseTable::length(), item, len); }
+
+ /**
+ * \brief Append a single newly created item.
+ *
+ * The new element is initialized with the default constructor.
+ */
+ void appendNew() { replaceNew(BaseTable::length(), 1); }
+
+ /**
+ * \brief Append len newly created items.
+ *
+ * The new elements are initialized with the default constructor.
+ */
+ void appendNew(long len) { replaceNew(BaseTable::length(), len); }
+ /*@}*/
+
+
+ /*@{*/
+ /**
+ * \brief Prepend one elment to the front of the vector.
+ *
+ * Copy constructor is used to place the element in the vector.
+ */
+ void prepend(const T &val) { insert(0, &val, 1); }
+
+ /**
+ * \brief Prepend len elements to the front of the vector.
+ *
+ * Copy constructors are used to place the elements in the vector.
+ */
+ void prepend(const T *val, long len) { insert(0, val, len); }
+
+ /**
+ * \brief Prepend the contents of another vector.
+ *
+ * The other vector is left unchanged. Copy constructors are used to place
+ * the elements in the vector.
+ */
+ void prepend(const SVector &v) { insert(0, v.data, v.length()); }
+
+ /**
+ * \brief Prepend len copies of item.
+ *
+ * The copy constructor is used to place the item in the vector.
+ */
+ void prependDup(const T &item, long len) { insertDup(0, item, len); }
+
+ /**
+ * \brief Prepend a single newly created item.
+ *
+ * The new element is initialized with the default constructor.
+ */
+ void prependNew() { insertNew(0, 1); }
+
+ /**
+ * \brief Prepend len newly created items.
+ *
+ * The new elements are initialized with the default constructor.
+ */
+ void prependNew(long len) { insertNew(0, len); }
+ /*@}*/
+
+ /* Convenience access. */
+ T &operator[](int i) const { return BaseTable::data[i]; }
+ long size() const { return BaseTable::length(); }
+
+ /* Various classes for setting the iterator */
+ struct Iter;
+ struct IterFirst { IterFirst( const SVector &v ) : v(v) { } const SVector &v; };
+ struct IterLast { IterLast( const SVector &v ) : v(v) { } const SVector &v; };
+ struct IterNext { IterNext( const Iter &i ) : i(i) { } const Iter &i; };
+ struct IterPrev { IterPrev( const Iter &i ) : i(i) { } const Iter &i; };
+
+ /**
+ * \brief Shared Vector Iterator.
+ * \ingroup iterators
+ */
+ struct Iter
+ {
+ /* Construct, assign. */
+ Iter() : ptr(0), ptrBeg(0), ptrEnd(0) { }
+
+ /* Construct. */
+ Iter( const SVector &v );
+ Iter( const IterFirst &vf );
+ Iter( const IterLast &vl );
+ inline Iter( const IterNext &vn );
+ inline Iter( const IterPrev &vp );
+
+ /* Assign. */
+ Iter &operator=( const SVector &v );
+ Iter &operator=( const IterFirst &vf );
+ Iter &operator=( const IterLast &vl );
+ inline Iter &operator=( const IterNext &vf );
+ inline Iter &operator=( const IterPrev &vl );
+
+ /** \brief Less than end? */
+ bool lte() const { return ptr != ptrEnd; }
+
+ /** \brief At end? */
+ bool end() const { return ptr == ptrEnd; }
+
+ /** \brief Greater than beginning? */
+ bool gtb() const { return ptr != ptrBeg; }
+
+ /** \brief At beginning? */
+ bool beg() const { return ptr == ptrBeg; }
+
+ /** \brief At first element? */
+ bool first() const { return ptr == ptrBeg+1; }
+
+ /** \brief At last element? */
+ bool last() const { return ptr == ptrEnd-1; }
+
+ /* Return the position. */
+ long pos() const { return ptr - ptrBeg - 1; }
+ T &operator[](int i) const { return ptr[i]; }
+
+ /** \brief Implicit cast to T*. */
+ operator T*() const { return ptr; }
+
+ /** \brief Dereference operator returns T&. */
+ T &operator *() const { return *ptr; }
+
+ /** \brief Arrow operator returns T*. */
+ T *operator->() const { return ptr; }
+
+ /** \brief Move to next item. */
+ T *operator++() { return ++ptr; }
+
+ /** \brief Move to next item. */
+ T *operator++(int) { return ptr++; }
+
+ /** \brief Move to next item. */
+ T *increment() { return ++ptr; }
+
+ /** \brief Move to previous item. */
+ T *operator--() { return --ptr; }
+
+ /** \brief Move to previous item. */
+ T *operator--(int) { return ptr--; }
+
+ /** \brief Move to previous item. */
+ T *decrement() { return --ptr; }
+
+ /** \brief Return the next item. Does not modify this. */
+ inline IterNext next() const { return IterNext(*this); }
+
+ /** \brief Return the previous item. Does not modify this. */
+ inline IterPrev prev() const { return IterPrev(*this); }
+
+ /** \brief The iterator is simply a pointer. */
+ T *ptr;
+
+ /* For testing endpoints. */
+ T *ptrBeg, *ptrEnd;
+ };
+
+ /** \brief Return first element. */
+ IterFirst first() { return IterFirst( *this ); }
+
+ /** \brief Return last element. */
+ IterLast last() { return IterLast( *this ); }
+
+protected:
+ void makeRawSpaceFor(long pos, long len);
+
+ void setAsCommon(long len);
+ long replaceCommon(long pos, long len);
+ long insertCommon(long pos, long len);
+
+ void upResize(long len);
+ void upResizeDup(long len);
+ void upResizeFromEmpty(long len);
+ void downResize(long len);
+ void downResizeDup(long len);
+};
+
+/**
+ * \brief Perform a shallow copy of the vector.
+ *
+ * Takes a reference to the contents of the other vector.
+ */
+template <class T, class Resize> SVector<T, Resize>::
+ SVector(const SVector<T, Resize> &v)
+{
+ /* Take a reference to other, if any data is allocated. */
+ if ( v.data == 0 )
+ BaseTable::data = 0;
+ else {
+ /* Get the source header, up the refcount and ref it. */
+ STabHead *srcHead = ((STabHead*) v.data) - 1;
+ srcHead->refCount += 1;
+ BaseTable::data = (T*) (srcHead + 1);
+ }
+}
+
+/**
+ * \brief Shallow copy another vector into this vector.
+ *
+ * Takes a reference to the other vector. The contents of this vector are
+ * first emptied.
+ *
+ * \returns A reference to this.
+ */
+template <class T, class Resize> SVector<T, Resize> &
+ SVector<T, Resize>:: operator=( const SVector &v )
+{
+ /* First clean out the current contents. */
+ empty();
+
+ /* Take a reference to other, if any data is allocated. */
+ if ( v.data == 0 )
+ BaseTable::data = 0;
+ else {
+ /* Get the source header, up the refcount and ref it. */
+ STabHead *srcHead = ((STabHead*) v.data) - 1;
+ srcHead->refCount += 1;
+ BaseTable::data = (T*) (srcHead + 1);
+ }
+ return *this;
+}
+
+/* Init a vector iterator with just a vector. */
+template <class T, class Resize> SVector<T, Resize>::
+ Iter::Iter( const SVector &v )
+{
+ long length;
+ if ( v.data == 0 || (length=(((STabHead*)v.data)-1)->tabLen) == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = v.data;
+ ptrBeg = v.data-1;
+ ptrEnd = v.data+length;
+ }
+}
+
+/* Init a vector iterator with the first of a vector. */
+template <class T, class Resize> SVector<T, Resize>::
+ Iter::Iter( const IterFirst &vf )
+{
+ long length;
+ if ( vf.v.data == 0 || (length=(((STabHead*)vf.v.data)-1)->tabLen) == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = vf.v.data;
+ ptrBeg = vf.v.data-1;
+ ptrEnd = vf.v.data+length;
+ }
+}
+
+/* Init a vector iterator with the last of a vector. */
+template <class T, class Resize> SVector<T, Resize>::
+ Iter::Iter( const IterLast &vl )
+{
+ long length;
+ if ( vl.v.data == 0 || (length=(((STabHead*)vl.v.data)-1)->tabLen) == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = vl.v.data+length-1;
+ ptrBeg = vl.v.data-1;
+ ptrEnd = vl.v.data+length;
+ }
+}
+
+/* Init a vector iterator with the next of some other iterator. */
+template <class T, class Resize> SVector<T, Resize>::
+ Iter::Iter( const IterNext &vn )
+:
+ ptr(vn.i.ptr+1),
+ ptrBeg(vn.i.ptrBeg),
+ ptrEnd(vn.i.ptrEnd)
+{
+}
+
+/* Init a vector iterator with the prev of some other iterator. */
+template <class T, class Resize> SVector<T, Resize>::
+ Iter::Iter( const IterPrev &vp )
+:
+ ptr(vp.i.ptr-1),
+ ptrBeg(vp.i.ptrBeg),
+ ptrEnd(vp.i.ptrEnd)
+{
+}
+
+/* Set a vector iterator with some vector. */
+template <class T, class Resize> typename SVector<T, Resize>::Iter &
+ SVector<T, Resize>::Iter::operator=( const SVector &v )
+{
+ long length;
+ if ( v.data == 0 || (length=(((STabHead*)v.data)-1)->tabLen) == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = v.data;
+ ptrBeg = v.data-1;
+ ptrEnd = v.data+length;
+ }
+ return *this;
+}
+
+/* Set a vector iterator with the first element in a vector. */
+template <class T, class Resize> typename SVector<T, Resize>::Iter &
+ SVector<T, Resize>::Iter::operator=( const IterFirst &vf )
+{
+ long length;
+ if ( vf.v.data == 0 || (length=(((STabHead*)vf.v.data)-1)->tabLen) == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = vf.v.data;
+ ptrBeg = vf.v.data-1;
+ ptrEnd = vf.v.data+length;
+ }
+ return *this;
+}
+
+/* Set a vector iterator with the last element in a vector. */
+template <class T, class Resize> typename SVector<T, Resize>::Iter &
+ SVector<T, Resize>::Iter::operator=( const IterLast &vl )
+{
+ long length;
+ if ( vl.v.data == 0 || (length=(((STabHead*)vl.v.data)-1)->tabLen) == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = vl.v.data+length-1;
+ ptrBeg = vl.v.data-1;
+ ptrEnd = vl.v.data+length;
+ }
+ return *this;
+}
+
+/* Set a vector iterator with the next of some other iterator. */
+template <class T, class Resize> typename SVector<T, Resize>::Iter &
+ SVector<T, Resize>::Iter::operator=( const IterNext &vn )
+{
+ ptr = vn.i.ptr+1;
+ ptrBeg = vn.i.ptrBeg;
+ ptrEnd = vn.i.ptrEnd;
+ return *this;
+}
+
+/* Set a vector iterator with the prev of some other iterator. */
+template <class T, class Resize> typename SVector<T, Resize>::Iter &
+ SVector<T, Resize>::Iter::operator=( const IterPrev &vp )
+{
+ ptr = vp.i.ptr-1;
+ ptrBeg = vp.i.ptrBeg;
+ ptrEnd = vp.i.ptrEnd;
+ return *this;
+}
+
+/* Up resize the data for len elements using Resize::upResize to tell us the
+ * new length. Reads and writes allocLen. Does not read or write length.
+ * Assumes that there is some data allocated already. */
+template <class T, class Resize> void SVector<T, Resize>::
+ upResize(long len)
+{
+ /* Get the current header. */
+ STabHead *head = ((STabHead*)BaseTable::data) - 1;
+
+ /* Ask the resizer what the new length will be. */
+ long newLen = Resize::upResize(head->allocLen, len);
+
+ /* Did the data grow? */
+ if ( newLen > head->allocLen ) {
+ head->allocLen = newLen;
+
+ /* Table exists already, resize it up. */
+ head = (STabHead*) realloc( head, sizeof(STabHead) +
+ sizeof(T) * newLen );
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ /* Save the data pointer. */
+ BaseTable::data = (T*) (head + 1);
+ }
+}
+
+/* Allocates a new buffer for an up resize that requires a duplication of the
+ * data. Uses Resize::upResize to get the allocation length. Reads and writes
+ * allocLen. This upResize does write the new length. Assumes that there is
+ * some data allocated already. */
+template <class T, class Resize> void SVector<T, Resize>::
+ upResizeDup(long len)
+{
+ /* Get the current header. */
+ STabHead *head = ((STabHead*)BaseTable::data) - 1;
+
+ /* Ask the resizer what the new length will be. */
+ long newLen = Resize::upResize(head->allocLen, len);
+
+ /* Dereferencing the existing data, decrement the refcount. */
+ head->refCount -= 1;
+
+ /* Table exists already, resize it up. */
+ head = (STabHead*) malloc( sizeof(STabHead) + sizeof(T) * newLen );
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ head->refCount = 1;
+ head->allocLen = newLen;
+ head->tabLen = len;
+
+ /* Save the data pointer. */
+ BaseTable::data = (T*) (head + 1);
+}
+
+/* Up resize the data for len elements using Resize::upResize to tell us the
+ * new length. Reads and writes allocLen. This upresize DOES write length.
+ * Assumes that no data is allocated. */
+template <class T, class Resize> void SVector<T, Resize>::
+ upResizeFromEmpty(long len)
+{
+ /* There is no table yet. If the len is zero, then there is no need to
+ * create a table. */
+ if ( len > 0 ) {
+ /* Ask the resizer what the new length will be. */
+ long newLen = Resize::upResize(0, len);
+
+ /* If len is greater than zero then we are always allocating the table. */
+ STabHead *head = (STabHead*) malloc( sizeof(STabHead) +
+ sizeof(T) * newLen );
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ /* Set up the header and save the data pointer. Note that we set the
+ * length here. This differs from the other upResizes. */
+ head->refCount = 1;
+ head->allocLen = newLen;
+ head->tabLen = len;
+ BaseTable::data = (T*) (head + 1);
+ }
+}
+
+/* Down resize the data for len elements using Resize::downResize to determine
+ * the new length. Reads and writes allocLen. Does not read or write length. */
+template <class T, class Resize> void SVector<T, Resize>::
+ downResize(long len)
+{
+ /* If there is already no length, then there is nothing we can do. */
+ if ( BaseTable::data != 0 ) {
+ /* Get the current header. */
+ STabHead *head = ((STabHead*)BaseTable::data) - 1;
+
+ /* Ask the resizer what the new length will be. */
+ long newLen = Resize::downResize( head->allocLen, len );
+
+ /* Did the data shrink? */
+ if ( newLen < head->allocLen ) {
+ if ( newLen == 0 ) {
+ /* Simply free the data. */
+ free( head );
+ BaseTable::data = 0;
+ }
+ else {
+ /* Save the new allocated length. */
+ head->allocLen = newLen;
+
+ /* Not shrinking to size zero, realloc it to the smaller size. */
+ head = (STabHead*) realloc( head, sizeof(STabHead) +
+ sizeof(T) * newLen );
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ /* Save the new data ptr. */
+ BaseTable::data = (T*) (head + 1);
+ }
+ }
+ }
+}
+
+/* Allocate a new buffer for a down resize and duplication of the array. The
+ * new array will be len long and allocation size will be determined using
+ * Resize::downResize with the old array's allocLen. Does not actually copy
+ * any data. Reads and writes allocLen and writes the new len. */
+template <class T, class Resize> void SVector<T, Resize>::
+ downResizeDup(long len)
+{
+ /* If there is already no length, then there is nothing we can do. */
+ if ( BaseTable::data != 0 ) {
+ /* Get the current header. */
+ STabHead *head = ((STabHead*)BaseTable::data) - 1;
+
+ /* Ask the resizer what the new length will be. */
+ long newLen = Resize::downResize( head->allocLen, len );
+
+ /* Detaching from the existing head, decrement the refcount. */
+ head->refCount -= 1;
+
+ /* Not shrinking to size zero, malloc it to the smaller size. */
+ head = (STabHead*) malloc( sizeof(STabHead) + sizeof(T) * newLen );
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ /* Save the new allocated length. */
+ head->refCount = 1;
+ head->allocLen = newLen;
+ head->tabLen = len;
+
+ /* Save the data pointer. */
+ BaseTable::data = (T*) (head + 1);
+ }
+}
+
+/**
+ * \brief Free all memory used by the vector.
+ *
+ * The vector is reset to zero elements. Destructors are called on all
+ * elements in the vector. The space allocated for the vector is freed.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ empty()
+{
+ if ( BaseTable::data != 0 ) {
+ /* Get the header and drop the refcount on the data. */
+ STabHead *head = ((STabHead*) BaseTable::data) - 1;
+ head->refCount -= 1;
+
+ /* If the refcount just went down to zero nobody else is referencing
+ * the data. */
+ if ( head->refCount == 0 ) {
+ /* Call All destructors. */
+ T *pos = BaseTable::data;
+ for ( long i = 0; i < head->tabLen; pos++, i++ )
+ pos->~T();
+
+ /* Free the data space. */
+ free( head );
+ }
+
+ /* Clear the pointer. */
+ BaseTable::data = 0;
+ }
+}
+
+/* Prepare for setting the contents of the vector to some array len long.
+ * Handles reusing the existing space, detaching from a common space or
+ * growing from zero length automatically. */
+template <class T, class Resize> void SVector<T, Resize>::
+ setAsCommon(long len)
+{
+ if ( BaseTable::data != 0 ) {
+ /* Get the header. */
+ STabHead *head = ((STabHead*)BaseTable::data) - 1;
+
+ /* If the refCount is one, then we can reuse the space. Otherwise we
+ * must detach from the referenced data create new space. */
+ if ( head->refCount == 1 ) {
+ /* Call All destructors. */
+ T *pos = BaseTable::data;
+ for ( long i = 0; i < head->tabLen; pos++, i++ )
+ pos->~T();
+
+ /* Adjust the allocated length. */
+ if ( len < head->tabLen )
+ downResize( len );
+ else if ( len > head->tabLen )
+ upResize( len );
+
+ if ( BaseTable::data != 0 ) {
+ /* Get the header again and set the length. */
+ head = ((STabHead*)BaseTable::data) - 1;
+ head->tabLen = len;
+ }
+ }
+ else {
+ /* Just detach from the data. */
+ head->refCount -= 1;
+ BaseTable::data = 0;
+
+ /* Make enough space. This will set the length. */
+ upResizeFromEmpty( len );
+ }
+ }
+ else {
+ /* The table is currently empty. Make enough space. This will set the
+ * length. */
+ upResizeFromEmpty( len );
+ }
+}
+
+/**
+ * \brief Set the contents of the vector to be len elements exactly.
+ *
+ * The vector becomes len elements in length. Destructors are called on any
+ * existing elements in the vector. Copy constructors are used to place the
+ * new elements in the vector.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ setAs(const T *val, long len)
+{
+ /* Common stuff for setting the array to len long. */
+ setAsCommon( len );
+
+ /* Copy data in. */
+ T *dst = BaseTable::data;
+ const T *src = val;
+ for ( long i = 0; i < len; i++, dst++, src++ )
+ new(dst) T(*src);
+}
+
+
+/**
+ * \brief Set the vector to len copies of item.
+ *
+ * The vector becomes len elements in length. Destructors are called on any
+ * existing elements in the vector. The element's copy constructor is used to
+ * copy the item into the vector.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ setAsDup(const T &item, long len)
+{
+ /* Do the common stuff for setting the array to len long. */
+ setAsCommon( len );
+
+ /* Copy item in one spot at a time. */
+ T *dst = BaseTable::data;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T(item);
+}
+
+/**
+ * \brief Set the vector to exactly len new items.
+ *
+ * The vector becomes len elements in length. Destructors are called on any
+ * existing elements in the vector. Default constructors are used to init the
+ * new items.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ setAsNew(long len)
+{
+ /* Do the common stuff for setting the array to len long. */
+ setAsCommon( len );
+
+ /* Create items using default constructor. */
+ T *dst = BaseTable::data;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T();
+}
+
+/* Make space in vector for a replacement at pos of len items. Handles reusing
+ * existing space, detaching or growing from zero space. */
+template <class T, class Resize> long SVector<T, Resize>::
+ replaceCommon(long pos, long len)
+{
+ if ( BaseTable::data != 0 ) {
+ /* Get the header. */
+ STabHead *head = ((STabHead*)BaseTable::data) - 1;
+
+ /* If we are given a negative position to replace at then treat it as
+ * a position relative to the length. This doesn't have any meaning
+ * unless the length is at least one. */
+ if ( pos < 0 )
+ pos = head->tabLen + pos;
+
+ /* The end is the one past the last item that we want to write to. */
+ long i, endPos = pos + len;
+
+ if ( head->refCount == 1 ) {
+ /* We can reuse the space. Make sure we have enough space. */
+ if ( endPos > head->tabLen ) {
+ upResize( endPos );
+
+ /* Get the header again, whose addr may have changed after
+ * resizing. */
+ head = ((STabHead*)BaseTable::data) - 1;
+
+ /* Delete any objects we need to delete. */
+ T *item = BaseTable::data + pos;
+ for ( i = pos; i < head->tabLen; i++, item++ )
+ item->~T();
+
+ /* We are extending the vector, set the new data length. */
+ head->tabLen = endPos;
+ }
+ else {
+ /* Delete any objects we need to delete. */
+ T *item = BaseTable::data + pos;
+ for ( i = pos; i < endPos; i++, item++ )
+ item->~T();
+ }
+ }
+ else {
+ /* Use endPos to calc the end of the vector. */
+ long newLen = endPos;
+ if ( newLen < head->tabLen )
+ newLen = head->tabLen;
+
+ /* Duplicate and grow up to endPos. This will set the length. */
+ upResizeDup( newLen );
+
+ /* Copy from src up to pos. */
+ const T *src = (T*) (head + 1);
+ T *dst = BaseTable::data;
+ for ( i = 0; i < pos; i++, dst++, src++)
+ new(dst) T(*src);
+
+ /* Copy any items after the replace range. */
+ for ( i += len, src += len, dst += len;
+ i < head->tabLen; i++, dst++, src++ )
+ new(dst) T(*src);
+ }
+ }
+ else {
+ /* There is no data initially, must grow from zero. This will set the
+ * new length. */
+ upResizeFromEmpty( len );
+ }
+
+ return pos;
+}
+
+
+/**
+ * \brief Replace len elements at position pos.
+ *
+ * If there are existing elements at the positions to be replaced, then
+ * destructors are called before the space is used. Copy constructors are used
+ * to place the elements into the vector. It is allowable for the pos and
+ * length to specify a replacement that overwrites existing elements and
+ * creates new ones. If pos is greater than the length of the vector then
+ * undefined behaviour results. If pos is negative, then it is treated as an
+ * offset relative to the length of the vector.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ replace(long pos, const T *val, long len)
+{
+ /* Common work for replacing in the vector. */
+ pos = replaceCommon( pos, len );
+
+ /* Copy data in using copy constructor. */
+ T *dst = BaseTable::data + pos;
+ const T *src = val;
+ for ( long i = 0; i < len; i++, dst++, src++ )
+ new(dst) T(*src);
+}
+
+/**
+ * \brief Replace at position pos with len copies of an item.
+ *
+ * If there are existing elements at the positions to be replaced, then
+ * destructors are called before the space is used. The copy constructor is
+ * used to place the element into this vector. It is allowable for the pos and
+ * length to specify a replacement that overwrites existing elements and
+ * creates new ones. If pos is greater than the length of the vector then
+ * undefined behaviour results. If pos is negative, then it is treated as an
+ * offset relative to the length of the vector.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ replaceDup(long pos, const T &val, long len)
+{
+ /* Common replacement stuff. */
+ pos = replaceCommon( pos, len );
+
+ /* Copy data in using copy constructor. */
+ T *dst = BaseTable::data + pos;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T(val);
+}
+
+/**
+ * \brief Replace at position pos with len new elements.
+ *
+ * If there are existing elements at the positions to be replaced, then
+ * destructors are called before the space is used. The default constructor is
+ * used to initialize the new elements. It is allowable for the pos and length
+ * to specify a replacement that overwrites existing elements and creates new
+ * ones. If pos is greater than the length of the vector then undefined
+ * behaviour results. If pos is negative, then it is treated as an offset
+ * relative to the length of the vector.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ replaceNew(long pos, long len)
+{
+ /* Do the common replacement stuff. */
+ pos = replaceCommon( pos, len );
+
+ /* Copy data in using copy constructor. */
+ T *dst = BaseTable::data + pos;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T();
+}
+
+/**
+ * \brief Remove len elements at position pos.
+ *
+ * Destructor is called on all elements removed. Elements to the right of pos
+ * are shifted len spaces to the left to take up the free space. If pos is
+ * greater than or equal to the length of the vector then undefined behavior
+ * results. If pos is negative then it is treated as an offset relative to the
+ * length of the vector.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ remove(long pos, long len)
+{
+ /* If there is no data, we can't delete anything anyways. */
+ if ( BaseTable::data != 0 ) {
+ /* Get the header. */
+ STabHead *head = ((STabHead*)BaseTable::data) - 1;
+
+ /* If we are given a negative position to remove at then
+ * treat it as a position relative to the length. */
+ if ( pos < 0 )
+ pos = head->tabLen + pos;
+
+ /* The first position after the last item deleted. */
+ long endPos = pos + len;
+
+ /* The New data length. */
+ long i, newLen = head->tabLen - len;
+
+ if ( head->refCount == 1 ) {
+ /* We are the only ones using the data. We can reuse
+ * the existing space. */
+
+ /* The place in the data we are deleting at. */
+ T *dst = BaseTable::data + pos;
+
+ /* Call Destructors. */
+ T *item = BaseTable::data + pos;
+ for ( i = 0; i < len; i += 1, item += 1 )
+ item->~T();
+
+ /* Shift data over if necessary. */
+ long lenToSlideOver = head->tabLen - endPos;
+ if ( len > 0 && lenToSlideOver > 0 )
+ memmove(BaseTable::data + pos, dst + len, sizeof(T)*lenToSlideOver);
+
+ /* Shrink the data if necessary. */
+ downResize( newLen );
+
+ if ( BaseTable::data != 0 ) {
+ /* Get the header again (because of the resize) and set the
+ * new data length. */
+ head = ((STabHead*)BaseTable::data) - 1;
+ head->tabLen = newLen;
+ }
+ }
+ else {
+ /* Must detach from the common data. Just copy the non-deleted
+ * items from the common data. */
+
+ /* Duplicate and grow down to newLen. This will set the length. */
+ downResizeDup( newLen );
+
+ /* Copy over just the non-deleted parts. */
+ const T *src = (T*) (head + 1);
+ T *dst = BaseTable::data;
+ for ( i = 0; i < pos; i++, dst++, src++ )
+ new(dst) T(*src);
+
+ /* ... and the second half. */
+ for ( i += len, src += len; i < head->tabLen; i++, src++, dst++ )
+ new(dst) T(*src);
+ }
+ }
+}
+
+/* Shift over existing data. Handles reusing existing space, detaching or
+ * growing from zero space. */
+template <class T, class Resize> long SVector<T, Resize>::
+ insertCommon(long pos, long len)
+{
+ if ( BaseTable::data != 0 ) {
+ /* Get the header. */
+ STabHead *head = ((STabHead*)BaseTable::data) - 1;
+
+ /* If we are given a negative position to insert at then treat it as a
+ * position relative to the length. This only has meaning if there is
+ * existing data. */
+ if ( pos < 0 )
+ pos = head->tabLen + pos;
+
+ /* Calculate the new length. */
+ long i, newLen = head->tabLen + len;
+
+ if ( head->refCount == 1 ) {
+ /* Up resize, we are growing. */
+ upResize( newLen );
+
+ /* Get the header again, (the addr may have changed after
+ * resizing). */
+ head = ((STabHead*)BaseTable::data) - 1;
+
+ /* Shift over data at insert spot if needed. */
+ if ( len > 0 && pos < head->tabLen ) {
+ memmove( BaseTable::data + pos + len, BaseTable::data + pos,
+ sizeof(T)*(head->tabLen - pos) );
+ }
+
+ /* Grow the length by the len inserted. */
+ head->tabLen += len;
+ }
+ else {
+ /* Need to detach from the existing array. Copy over the other
+ * parts. This will set the length. */
+ upResizeDup( newLen );
+
+ /* Copy over the parts around the insert. */
+ const T *src = (T*) (head + 1);
+ T *dst = BaseTable::data;
+ for ( i = 0; i < pos; i++, dst++, src++ )
+ new(dst) T(*src);
+
+ /* ... and the second half. */
+ for ( dst += len; i < head->tabLen; i++, src++, dst++ )
+ new(dst) T(*src);
+ }
+ }
+ else {
+ /* There is no existing data. Start from zero. This will set the
+ * length. */
+ upResizeFromEmpty( len );
+ }
+
+ return pos;
+}
+
+
+/**
+ * \brief Insert len elements at position pos.
+ *
+ * Elements in the vector from pos onward are shifted len spaces to the right.
+ * The copy constructor is used to place the elements into this vector. If pos
+ * is greater than the length of the vector then undefined behaviour results.
+ * If pos is negative then it is treated as an offset relative to the length
+ * of the vector.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ insert(long pos, const T *val, long len)
+{
+ /* Do the common insertion stuff. */
+ pos = insertCommon( pos, len );
+
+ /* Copy data in element by element. */
+ T *dst = BaseTable::data + pos;
+ const T *src = val;
+ for ( long i = 0; i < len; i++, dst++, src++ )
+ new(dst) T(*src);
+}
+
+/**
+ * \brief Insert len copies of item at position pos.
+ *
+ * Elements in the vector from pos onward are shifted len spaces to the right.
+ * The copy constructor is used to place the element into this vector. If pos
+ * is greater than the length of the vector then undefined behaviour results.
+ * If pos is negative then it is treated as an offset relative to the length
+ * of the vector.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ insertDup(long pos, const T &item, long len)
+{
+ /* Do the common insertion stuff. */
+ pos = insertCommon( pos, len );
+
+ /* Copy the data item in one at a time. */
+ T *dst = BaseTable::data + pos;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T(item);
+}
+
+
+/**
+ * \brief Insert len new elements using the default constructor.
+ *
+ * Elements in the vector from pos onward are shifted len spaces to the right.
+ * Default constructors are used to init the new elements. If pos is off the
+ * end of the vector then undefined behaviour results. If pos is negative then
+ * it is treated as an offset relative to the length of the vector.
+ */
+template <class T, class Resize> void SVector<T, Resize>::
+ insertNew(long pos, long len)
+{
+ /* Do the common insertion stuff. */
+ pos = insertCommon( pos, len );
+
+ /* Init new data with default constructors. */
+ T *dst = BaseTable::data + pos;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T();
+}
+
+/* Makes space for len items, Does not init the items in any way. If pos is
+ * greater than the length of the vector then undefined behaviour results.
+ * Updates the length of the vector. */
+template <class T, class Resize> void SVector<T, Resize>::
+ makeRawSpaceFor(long pos, long len)
+{
+ if ( BaseTable::data != 0 ) {
+ /* Get the header. */
+ STabHead *head = ((STabHead*)BaseTable::data) - 1;
+
+ /* Calculate the new length. */
+ long i, newLen = head->tabLen + len;
+
+ if ( head->refCount == 1 ) {
+ /* Up resize, we are growing. */
+ upResize( newLen );
+
+ /* Get the header again, (the addr may have changed after
+ * resizing). */
+ head = ((STabHead*)BaseTable::data) - 1;
+
+ /* Shift over data at insert spot if needed. */
+ if ( len > 0 && pos < head->tabLen ) {
+ memmove( BaseTable::data + pos + len, BaseTable::data + pos,
+ sizeof(T)*(head->tabLen - pos) );
+ }
+
+ /* Grow the length by the len inserted. */
+ head->tabLen += len;
+ }
+ else {
+ /* Need to detach from the existing array. Copy over the other
+ * parts. This will set the length. */
+ upResizeDup( newLen );
+
+ /* Copy over the parts around the insert. */
+ const T *src = (T*) (head + 1);
+ T *dst = BaseTable::data;
+ for ( i = 0; i < pos; i++, dst++, src++ )
+ new(dst) T(*src);
+
+ /* ... and the second half. */
+ for ( dst += len; i < head->tabLen; i++, src++, dst++ )
+ new(dst) T(*src);
+ }
+ }
+ else {
+ /* There is no existing data. Start from zero. This will set the
+ * length. */
+ upResizeFromEmpty( len );
+ }
+}
+
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+
+#endif /* _AAPL_SVECTOR_H */
diff --git a/aapl/table.h b/aapl/table.h
new file mode 100644
index 0000000..c218281
--- /dev/null
+++ b/aapl/table.h
@@ -0,0 +1,252 @@
+/*
+ * Copyright 2001, 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_TABLE_H
+#define _AAPL_TABLE_H
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/**
+ * \addtogroup vector
+ * @{
+ */
+
+/** \class Table
+ * \brief Base class for dynamic arrays.
+ *
+ * Table is used as the common data storage class for vectors. It does not
+ * provide any methods to operate on the data and as such it is not intended
+ * to be used directly. It exists so that algorithms that operatate on dynamic
+ * arrays can be written without knowing about the various vector classes that
+ * my exist.
+ */
+
+/*@}*/
+
+/* Table class. */
+template <class T> class Table
+{
+public:
+ /* Default Constructor. */
+ inline Table();
+
+ /**
+ * \brief Get the length of the vector.
+ *
+ * \returns the length of the vector.
+ */
+ long length() const
+ { return tabLen; }
+
+ /**
+ * \brief Table data.
+ *
+ * The pointer to the elements in the vector. Modifying the vector may
+ * cause this pointer to change.
+ */
+ T *data;
+
+ /**
+ * \brief Table length.
+ *
+ * The number of items of type T in the table.
+ */
+ long tabLen;
+
+ /**
+ * \brief Allocated length.
+ *
+ * The number of items for which there is room in the current allocation.
+ */
+ long allocLen;
+};
+
+/**
+ * \brief Default constructor
+ *
+ * Initialize table data to empty.
+ */
+template <class T> inline Table<T>::Table()
+:
+ data(0),
+ tabLen(0),
+ allocLen(0)
+{
+}
+
+/* Default shared table header class. */
+struct STabHead
+{
+ /**
+ * \brief Table length.
+ *
+ * The number of items of type T in the table.
+ */
+ long tabLen;
+
+ /**
+ * \brief Allocated length.
+ *
+ * The number of items for which there is room in the current allocation.
+ */
+ long allocLen;
+
+ /**
+ * \brief Ref Count.
+ *
+ * The number of shared vectors referencing this data.
+ */
+ long refCount;
+};
+
+/**
+ * \addtogroup vector
+ * @{
+ */
+
+/** \class STable
+ * \brief Base class for implicitly shared dynamic arrays.
+ *
+ * STable is used as the common data storage class for shared vectors. It does
+ * not provide any methods to operate on the data and as such it is not
+ * intended to be used directly. It exists so that algorithms that operatate
+ * on dynamic arrays can be written without knowing about the various shared
+ * vector classes that my exist.
+ */
+
+/*@}*/
+
+/* STable class. */
+template <class T> class STable
+{
+public:
+ /* Default Constructor. */
+ inline STable();
+
+ /**
+ * \brief Get the length of the shared vector.
+ *
+ * \returns the length of the shared vector.
+ */
+ long length() const
+ { return data == 0 ? 0 : (((STabHead*)data) - 1)->tabLen; }
+
+ /**
+ * \brief Get header of the shared vector.
+ *
+ * \returns the header of the shared vector.
+ */
+ STabHead *header() const
+ { return data == 0 ? 0 : (((STabHead*)data) - 1); }
+
+ /**
+ * \brief Table data.
+ *
+ * The pointer to the elements in the vector. The shared table header is
+ * located just behind the data. Modifying the vector may cause this
+ * pointer to change.
+ */
+ T *data;
+};
+
+/**
+ * \brief Default constructor
+ *
+ * Initialize shared table data to empty.
+ */
+template <class T> inline STable<T>::STable()
+:
+ data(0)
+{
+}
+
+/* If needed is greater than existing, give twice needed. */
+#define EXPN_UP( existing, needed ) \
+ needed > existing ? (needed<<1) : existing
+
+/* If needed is less than 1 quarter existing, give twice needed. */
+#define EXPN_DOWN( existing, needed ) \
+ needed < (existing>>2) ? (needed<<1) : existing
+
+/**
+ * \addtogroup vector
+ * @{
+ */
+
+/** \class ResizeExpn
+ * \brief Exponential table resizer.
+ *
+ * ResizeExpn is the default table resizer. When an up resize is needed, space
+ * is doubled. When a down resize is needed, space is halved. The result is
+ * that when growing the vector in a linear fashion, the number of resizes of
+ * the allocated space behaves logarithmically.
+ *
+ * If only up resizes are done, there will never be more than 2 times the
+ * needed space allocated. If down resizes are done as well, there will never
+ * be more than 4 times the needed space allocated. ResizeExpn uses this 50%
+ * usage policy on up resizing and 25% usage policy on down resizing to
+ * improve performance when repeatedly inserting and removing a small number
+ * of elements relative to the size of the array. This scheme guarantees that
+ * repetitive inserting and removing of a small number of elements will never
+ * result in repetative reallocation.
+ *
+ * The sizes passed to the resizer from the vectors are in units of T.
+ */
+
+/*@}*/
+
+/* Exponential resizer. */
+class ResizeExpn
+{
+protected:
+ /**
+ * \brief Determine the new table size when up resizing.
+ *
+ * If the existing size is insufficient for the space needed then allocate
+ * twice the space needed. Otherwise use the existing size.
+ *
+ * \returns The new table size.
+ */
+ static inline long upResize( long existing, long needed )
+ { return EXPN_UP( existing, needed ); }
+
+ /**
+ * \brief Determine the new table size when down resizing.
+ *
+ * If the space needed is less than one quarter of the existing size then
+ * allocate twice the space needed. Otherwise use the exitsing size.
+ *
+ * \returns The new table size.
+ */
+ static inline long downResize( long existing, long needed )
+ { return EXPN_DOWN( existing, needed ); }
+};
+
+#undef EXPN_UP
+#undef EXPN_DOWN
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+#endif /* _AAPL_TABLE_H */
diff --git a/aapl/vector.h b/aapl/vector.h
new file mode 100644
index 0000000..5e7f9e5
--- /dev/null
+++ b/aapl/vector.h
@@ -0,0 +1,1189 @@
+/*
+ * Copyright 2002, 2006 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_VECTOR_H
+#define _AAPL_VECTOR_H
+
+#include <new>
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "table.h"
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+/**
+ * \addtogroup vector
+ * @{
+ */
+
+/** \class Vector
+ * \brief Dynamic array.
+ *
+ * This is typical vector implementation. It is a dynamic array that can be
+ * used to contain complex data structures that have constructors and
+ * destructors as well as simple types such as integers and pointers.
+ *
+ * Vector supports inserting, overwriting, and removing single or multiple
+ * elements at once. Constructors and destructors are called wherever
+ * appropriate. For example, before an element is overwritten, it's
+ * destructor is called.
+ *
+ * Vector provides automatic resizing of allocated memory as needed and offers
+ * different allocation schemes for controlling how the automatic allocation
+ * is done. Two senses of the the length of the data is maintained: the
+ * amount of raw memory allocated to the vector and the number of actual
+ * elements in the vector. The various allocation schemes control how the
+ * allocated space is changed in relation to the number of elements in the
+ * vector.
+ *
+ * \include ex_vector.cpp
+ */
+
+/*@}*/
+
+template < class T, class Resize = ResizeExpn > class Vector
+ : public Table<T>, public Resize
+{
+private:
+ typedef Table<T> BaseTable;
+
+public:
+ /**
+ * \brief Initialize an empty vector with no space allocated.
+ *
+ * If a linear resizer is used, the step defaults to 256 units of T. For a
+ * runtime vector both up and down allocation schemes default to
+ * Exponential.
+ */
+ Vector() { }
+
+ /**
+ * \brief Create a vector that contains an initial element.
+ *
+ * The vector becomes one element in length. The element's copy
+ * constructor is used to place the value in the vector.
+ */
+ Vector(const T &val) { setAs(&val, 1); }
+
+ /**
+ * \brief Create a vector that contains an array of elements.
+ *
+ * The vector becomes len elements in length. Copy constructors are used
+ * to place the new elements in the vector.
+ */
+ Vector(const T *val, long len) { setAs(val, len); }
+
+ /* Deep copy. */
+ Vector( const Vector &v );
+
+ /* Free all mem used by the vector. */
+ ~Vector() { empty(); }
+
+ /* Delete all items. */
+ void empty();
+
+ /* Abandon the contents of the vector without deleteing. */
+ void abandon();
+
+ /* Transfers the elements of another vector into this vector. First emptys
+ * the current vector. */
+ void transfer( Vector &v );
+
+ /* Perform a deep copy of another vector into this vector. */
+ Vector &operator=( const Vector &v );
+
+ /* Stack operations. */
+ void push( const T &t ) { append( t ); }
+ void pop() { remove( BaseTable::tabLen - 1 ); }
+ T &top() { return BaseTable::data[BaseTable::tabLen - 1]; }
+
+ /*@{*/
+ /**
+ * \brief Insert one element at position pos.
+ *
+ * Elements in the vector from pos onward are shifted one space to the
+ * right. The copy constructor is used to place the element into this
+ * vector. If pos is greater than the length of the vector then undefined
+ * behaviour results. If pos is negative then it is treated as an offset
+ * relative to the length of the vector.
+ */
+ void insert(long pos, const T &val) { insert(pos, &val, 1); }
+
+ /* Insert an array of values. */
+ void insert(long pos, const T *val, long len);
+
+ /**
+ * \brief Insert all the elements from another vector at position pos.
+ *
+ * Elements in this vector from pos onward are shifted v.tabLen spaces to
+ * the right. The element's copy constructor is used to copy the items
+ * into this vector. The other vector is left unchanged. If pos is off the
+ * end of the vector, then undefined behaviour results. If pos is negative
+ * then it is treated as an offset relative to the length of the vector.
+ * Equivalent to vector.insert(pos, other.data, other.tabLen).
+ */
+ void insert(long pos, const Vector &v) { insert(pos, v.data, v.tabLen); }
+
+ /* Insert len copies of val into the vector. */
+ void insertDup(long pos, const T &val, long len);
+
+ /**
+ * \brief Insert one new element using the default constrcutor.
+ *
+ * Elements in the vector from pos onward are shifted one space to the
+ * right. The default constructor is used to init the new element. If pos
+ * is greater than the length of the vector then undefined behaviour
+ * results. If pos is negative then it is treated as an offset relative to
+ * the length of the vector.
+ */
+ void insertNew(long pos) { insertNew(pos, 1); }
+
+ /* Insert len new items using default constructor. */
+ void insertNew(long pos, long len);
+ /*@}*/
+
+ /*@{*/
+ /**
+ * \brief Remove one element at position pos.
+ *
+ * The element's destructor is called. Elements to the right of pos are
+ * shifted one space to the left to take up the free space. If pos is greater
+ * than or equal to the length of the vector then undefined behavior results.
+ * If pos is negative then it is treated as an offset relative to the length
+ * of the vector.
+ */
+ void remove(long pos) { remove(pos, 1); }
+
+ /* Delete a number of elements. */
+ void remove(long pos, long len);
+ /*@}*/
+
+ /*@{*/
+ /**
+ * \brief Replace one element at position pos.
+ *
+ * If there is an existing element at position pos (if pos is less than
+ * the length of the vector) then its destructor is called before the
+ * space is used. The copy constructor is used to place the element into
+ * the vector. If pos is greater than the length of the vector then
+ * undefined behaviour results. If pos is negative then it is treated as
+ * an offset relative to the length of the vector.
+ */
+ void replace(long pos, const T &val) { replace(pos, &val, 1); }
+
+ /* Replace with an array of values. */
+ void replace(long pos, const T *val, long len);
+
+ /**
+ * \brief Replace at position pos with all the elements of another vector.
+ *
+ * Replace at position pos with all the elements of another vector. The
+ * other vector is left unchanged. If there are existing elements at the
+ * positions to be replaced, then destructors are called before the space
+ * is used. Copy constructors are used to place the elements into this
+ * vector. It is allowable for the pos and length of the other vector to
+ * specify a replacement that overwrites existing elements and creates new
+ * ones. If pos is greater than the length of the vector then undefined
+ * behaviour results. If pos is negative, then it is treated as an offset
+ * relative to the length of the vector.
+ */
+ void replace(long pos, const Vector &v) { replace(pos, v.data, v.tabLen); }
+
+ /* Replace len items with len copies of val. */
+ void replaceDup(long pos, const T &val, long len);
+
+ /**
+ * \brief Replace at position pos with one new element.
+ *
+ * If there is an existing element at the position to be replaced (pos is
+ * less than the length of the vector) then the element's destructor is
+ * called before the space is used. The default constructor is used to
+ * initialize the new element. If pos is greater than the length of the
+ * vector then undefined behaviour results. If pos is negative, then it is
+ * treated as an offset relative to the length of the vector.
+ */
+ void replaceNew(long pos) { replaceNew(pos, 1); }
+
+ /* Replace len items at pos with newly constructed objects. */
+ void replaceNew(long pos, long len);
+ /*@}*/
+
+ /*@{*/
+ /**
+ * \brief Set the contents of the vector to be val exactly.
+ *
+ * The vector becomes one element in length. Destructors are called on any
+ * existing elements in the vector. The element's copy constructor is used
+ * to place the val in the vector.
+ */
+ void setAs(const T &val) { setAs(&val, 1); }
+
+ /* Set to the contents of an array. */
+ void setAs(const T *val, long len);
+
+ /**
+ * \brief Set the vector to exactly the contents of another vector.
+ *
+ * The vector becomes v.tabLen elements in length. Destructors are called
+ * on any existing elements. Copy constructors are used to place the new
+ * elements in the vector.
+ */
+ void setAs(const Vector &v) { setAs(v.data, v.tabLen); }
+
+ /* Set as len copies of item. */
+ void setAsDup(const T &item, long len);
+
+ /**
+ * \brief Set the vector to exactly one new item.
+ *
+ * The vector becomes one element in length. Destructors are called on any
+ * existing elements in the vector. The default constructor is used to
+ * init the new item.
+ */
+ void setAsNew() { setAsNew(1); }
+
+ /* Set as newly constructed objects using the default constructor. */
+ void setAsNew(long len);
+ /*@}*/
+
+ /*@{*/
+ /**
+ * \brief Append one elment to the end of the vector.
+ *
+ * Copy constructor is used to place the element in the vector.
+ */
+ void append(const T &val) { replace(BaseTable::tabLen, &val, 1); }
+
+ /**
+ * \brief Append len elements to the end of the vector.
+ *
+ * Copy constructors are used to place the elements in the vector.
+ */
+ void append(const T *val, long len) { replace(BaseTable::tabLen, val, len); }
+
+ /**
+ * \brief Append the contents of another vector.
+ *
+ * The other vector is left unchanged. Copy constructors are used to place the
+ * elements in the vector.
+ */
+ void append(const Vector &v) { replace(BaseTable::tabLen, v.data, v.tabLen); }
+
+ /**
+ * \brief Append len copies of item.
+ *
+ * The copy constructor is used to place the item in the vector.
+ */
+ void appendDup(const T &item, long len) { replaceDup(BaseTable::tabLen, item, len); }
+
+ /**
+ * \brief Append a single newly created item.
+ *
+ * The new element is initialized with the default constructor.
+ */
+ void appendNew() { replaceNew(BaseTable::tabLen, 1); }
+
+ /**
+ * \brief Append len newly created items.
+ *
+ * The new elements are initialized with the default constructor.
+ */
+ void appendNew(long len) { replaceNew(BaseTable::tabLen, len); }
+ /*@}*/
+
+ /*@{*/
+ /** \fn Vector::prepend(const T &val)
+ * \brief Prepend one elment to the front of the vector.
+ *
+ * Copy constructor is used to place the element in the vector.
+ */
+ void prepend(const T &val) { insert(0, &val, 1); }
+
+ /**
+ * \brief Prepend len elements to the front of the vector.
+ *
+ * Copy constructors are used to place the elements in the vector.
+ */
+ void prepend(const T *val, long len) { insert(0, val, len); }
+
+ /**
+ * \brief Prepend the contents of another vector.
+ *
+ * The other vector is left unchanged. Copy constructors are used to place the
+ * elements in the vector.
+ */
+ void prepend(const Vector &v) { insert(0, v.data, v.tabLen); }
+
+ /**
+ * \brief Prepend len copies of item.
+ *
+ * The copy constructor is used to place the item in the vector.
+ */
+ void prependDup(const T &item, long len) { insertDup(0, item, len); }
+
+ /**
+ * \brief Prepend a single newly created item.
+ *
+ * The new element is initialized with the default constructor.
+ */
+ void prependNew() { insertNew(0, 1); }
+
+ /**
+ * \brief Prepend len newly created items.
+ *
+ * The new elements are initialized with the default constructor.
+ */
+ void prependNew(long len) { insertNew(0, len); }
+ /*@}*/
+
+ /* Convenience access. */
+ T &operator[](int i) const { return BaseTable::data[i]; }
+ long size() const { return BaseTable::tabLen; }
+
+ /* Forward this so a ref can be used. */
+ struct Iter;
+
+ /* Various classes for setting the iterator */
+ struct IterFirst { IterFirst( const Vector &v ) : v(v) { } const Vector &v; };
+ struct IterLast { IterLast( const Vector &v ) : v(v) { } const Vector &v; };
+ struct IterNext { IterNext( const Iter &i ) : i(i) { } const Iter &i; };
+ struct IterPrev { IterPrev( const Iter &i ) : i(i) { } const Iter &i; };
+
+ /**
+ * \brief Vector Iterator.
+ * \ingroup iterators
+ */
+ struct Iter
+ {
+ /* Construct, assign. */
+ Iter() : ptr(0), ptrBeg(0), ptrEnd(0) { }
+
+ /* Construct. */
+ Iter( const Vector &v );
+ Iter( const IterFirst &vf );
+ Iter( const IterLast &vl );
+ inline Iter( const IterNext &vn );
+ inline Iter( const IterPrev &vp );
+
+ /* Assign. */
+ Iter &operator=( const Vector &v );
+ Iter &operator=( const IterFirst &vf );
+ Iter &operator=( const IterLast &vl );
+ inline Iter &operator=( const IterNext &vf );
+ inline Iter &operator=( const IterPrev &vl );
+
+ /** \brief Less than end? */
+ bool lte() const { return ptr != ptrEnd; }
+
+ /** \brief At end? */
+ bool end() const { return ptr == ptrEnd; }
+
+ /** \brief Greater than beginning? */
+ bool gtb() const { return ptr != ptrBeg; }
+
+ /** \brief At beginning? */
+ bool beg() const { return ptr == ptrBeg; }
+
+ /** \brief At first element? */
+ bool first() const { return ptr == ptrBeg+1; }
+
+ /** \brief At last element? */
+ bool last() const { return ptr == ptrEnd-1; }
+
+ /* Return the position. */
+ long pos() const { return ptr - ptrBeg - 1; }
+ T &operator[](int i) const { return ptr[i]; }
+
+ /** \brief Implicit cast to T*. */
+ operator T*() const { return ptr; }
+
+ /** \brief Dereference operator returns T&. */
+ T &operator *() const { return *ptr; }
+
+ /** \brief Arrow operator returns T*. */
+ T *operator->() const { return ptr; }
+
+ /** \brief Move to next item. */
+ T *operator++() { return ++ptr; }
+
+ /** \brief Move to next item. */
+ T *operator++(int) { return ptr++; }
+
+ /** \brief Move to next item. */
+ T *increment() { return ++ptr; }
+
+ /** \brief Move n items forward. */
+ T *operator+=(long n) { return ptr+=n; }
+
+ /** \brief Move to previous item. */
+ T *operator--() { return --ptr; }
+
+ /** \brief Move to previous item. */
+ T *operator--(int) { return ptr--; }
+
+ /** \brief Move to previous item. */
+ T *decrement() { return --ptr; }
+
+ /** \brief Move n items back. */
+ T *operator-=(long n) { return ptr-=n; }
+
+ /** \brief Return the next item. Does not modify this. */
+ inline IterNext next() const { return IterNext(*this); }
+
+ /** \brief Return the previous item. Does not modify this. */
+ inline IterPrev prev() const { return IterPrev(*this); }
+
+ /** \brief The iterator is simply a pointer. */
+ T *ptr;
+
+ /* For testing endpoints. */
+ T *ptrBeg, *ptrEnd;
+ };
+
+ /** \brief Return first element. */
+ IterFirst first() { return IterFirst( *this ); }
+
+ /** \brief Return last element. */
+ IterLast last() { return IterLast( *this ); }
+
+protected:
+ void makeRawSpaceFor(long pos, long len);
+
+ void upResize(long len);
+ void downResize(long len);
+};
+
+/* Init a vector iterator with just a vector. */
+template <class T, class Resize> Vector<T, Resize>::Iter::Iter( const Vector &v )
+{
+ if ( v.tabLen == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = v.data;
+ ptrBeg = v.data-1;
+ ptrEnd = v.data+v.tabLen;
+ }
+}
+
+/* Init a vector iterator with the first of a vector. */
+template <class T, class Resize> Vector<T, Resize>::Iter::Iter(
+ const IterFirst &vf )
+{
+ if ( vf.v.tabLen == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = vf.v.data;
+ ptrBeg = vf.v.data-1;
+ ptrEnd = vf.v.data+vf.v.tabLen;
+ }
+}
+
+/* Init a vector iterator with the last of a vector. */
+template <class T, class Resize> Vector<T, Resize>::Iter::Iter(
+ const IterLast &vl )
+{
+ if ( vl.v.tabLen == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = vl.v.data+vl.v.tabLen-1;
+ ptrBeg = vl.v.data-1;
+ ptrEnd = vl.v.data+vl.v.tabLen;
+ }
+}
+
+/* Init a vector iterator with the next of some other iterator. */
+template <class T, class Resize> Vector<T, Resize>::Iter::Iter(
+ const IterNext &vn )
+:
+ ptr(vn.i.ptr+1),
+ ptrBeg(vn.i.ptrBeg),
+ ptrEnd(vn.i.ptrEnd)
+{
+}
+
+/* Init a vector iterator with the prev of some other iterator. */
+template <class T, class Resize> Vector<T, Resize>::Iter::Iter(
+ const IterPrev &vp )
+:
+ ptr(vp.i.ptr-1),
+ ptrBeg(vp.i.ptrBeg),
+ ptrEnd(vp.i.ptrEnd)
+{
+}
+
+/* Set a vector iterator with some vector. */
+template <class T, class Resize> typename Vector<T, Resize>::Iter &
+ Vector<T, Resize>::Iter::operator=( const Vector &v )
+{
+ if ( v.tabLen == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = v.data;
+ ptrBeg = v.data-1;
+ ptrEnd = v.data+v.tabLen;
+ }
+ return *this;
+}
+
+/* Set a vector iterator with the first element in a vector. */
+template <class T, class Resize> typename Vector<T, Resize>::Iter &
+ Vector<T, Resize>::Iter::operator=( const IterFirst &vf )
+{
+ if ( vf.v.tabLen == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = vf.v.data;
+ ptrBeg = vf.v.data-1;
+ ptrEnd = vf.v.data+vf.v.tabLen;
+ }
+ return *this;
+}
+
+/* Set a vector iterator with the last element in a vector. */
+template <class T, class Resize> typename Vector<T, Resize>::Iter &
+ Vector<T, Resize>::Iter::operator=( const IterLast &vl )
+{
+ if ( vl.v.tabLen == 0 )
+ ptr = ptrBeg = ptrEnd = 0;
+ else {
+ ptr = vl.v.data+vl.v.tabLen-1;
+ ptrBeg = vl.v.data-1;
+ ptrEnd = vl.v.data+vl.v.tabLen;
+ }
+ return *this;
+}
+
+/* Set a vector iterator with the next of some other iterator. */
+template <class T, class Resize> typename Vector<T, Resize>::Iter &
+ Vector<T, Resize>::Iter::operator=( const IterNext &vn )
+{
+ ptr = vn.i.ptr+1;
+ ptrBeg = vn.i.ptrBeg;
+ ptrEnd = vn.i.ptrEnd;
+ return *this;
+}
+
+/* Set a vector iterator with the prev of some other iterator. */
+template <class T, class Resize> typename Vector<T, Resize>::Iter &
+ Vector<T, Resize>::Iter::operator=( const IterPrev &vp )
+{
+ ptr = vp.i.ptr-1;
+ ptrBeg = vp.i.ptrBeg;
+ ptrEnd = vp.i.ptrEnd;
+ return *this;
+}
+
+/**
+ * \brief Forget all elements in the vector.
+ *
+ * The contents of the vector are reset to null without without the space
+ * being freed.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ abandon()
+{
+ BaseTable::data = 0;
+ BaseTable::tabLen = 0;
+ BaseTable::allocLen = 0;
+}
+
+/**
+ * \brief Transfer the contents of another vector into this vector.
+ *
+ * The dynamic array of the other vector is moved into this vector by
+ * reference. If this vector is non-empty then its contents are first deleted.
+ * Afterward the other vector will be empty.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ transfer( Vector &v )
+{
+ empty();
+
+ BaseTable::data = v.data;
+ BaseTable::tabLen = v.tabLen;
+ BaseTable::allocLen = v.allocLen;
+
+ v.abandon();
+}
+
+/**
+ * \brief Deep copy another vector into this vector.
+ *
+ * Copies the entire contents of the other vector into this vector. Any
+ * existing contents are first deleted. Equivalent to setAs.
+ *
+ * \returns A reference to this.
+ */
+template<class T, class Resize> Vector<T, Resize> &Vector<T, Resize>::
+ operator=( const Vector &v )
+{
+ setAs(v.data, v.tabLen);
+ return *this;
+}
+
+/* Up resize the data for len elements using Resize::upResize to tell us the
+ * new tabLen. Reads and writes allocLen. Does not read or write tabLen. */
+template<class T, class Resize> void Vector<T, Resize>::
+ upResize(long len)
+{
+ /* Ask the resizer what the new tabLen will be. */
+ long newLen = Resize::upResize(BaseTable::allocLen, len);
+
+ /* Did the data grow? */
+ if ( newLen > BaseTable::allocLen ) {
+ BaseTable::allocLen = newLen;
+ if ( BaseTable::data != 0 ) {
+ /* Table exists already, resize it up. */
+ BaseTable::data = (T*) realloc( BaseTable::data, sizeof(T) * newLen );
+ if ( BaseTable::data == 0 )
+ throw std::bad_alloc();
+ }
+ else {
+ /* Create the data. */
+ BaseTable::data = (T*) malloc( sizeof(T) * newLen );
+ if ( BaseTable::data == 0 )
+ throw std::bad_alloc();
+ }
+ }
+}
+
+/* Down resize the data for len elements using Resize::downResize to determine
+ * the new tabLen. Reads and writes allocLen. Does not read or write tabLen. */
+template<class T, class Resize> void Vector<T, Resize>::
+ downResize(long len)
+{
+ /* Ask the resizer what the new tabLen will be. */
+ long newLen = Resize::downResize( BaseTable::allocLen, len );
+
+ /* Did the data shrink? */
+ if ( newLen < BaseTable::allocLen ) {
+ BaseTable::allocLen = newLen;
+ if ( newLen == 0 ) {
+ /* Simply free the data. */
+ free( BaseTable::data );
+ BaseTable::data = 0;
+ }
+ else {
+ /* Not shrinking to size zero, realloc it to the smaller size. */
+ BaseTable::data = (T*) realloc( BaseTable::data, sizeof(T) * newLen );
+ if ( BaseTable::data == 0 )
+ throw std::bad_alloc();
+ }
+ }
+}
+
+/**
+ * \brief Perform a deep copy of the vector.
+ *
+ * The contents of the other vector are copied into this vector. This vector
+ * gets the same allocation size as the other vector. All items are copied
+ * using the element's copy constructor.
+ */
+template<class T, class Resize> Vector<T, Resize>::
+ Vector(const Vector<T, Resize> &v)
+{
+ BaseTable::tabLen = v.tabLen;
+ BaseTable::allocLen = v.allocLen;
+
+ if ( BaseTable::allocLen > 0 ) {
+ /* Allocate needed space. */
+ BaseTable::data = (T*) malloc(sizeof(T) * BaseTable::allocLen);
+ if ( BaseTable::data == 0 )
+ throw std::bad_alloc();
+
+ /* If there are any items in the src data, copy them in. */
+ T *dst = BaseTable::data, *src = v.data;
+ for (long pos = 0; pos < BaseTable::tabLen; pos++, dst++, src++ )
+ new(dst) T(*src);
+ }
+ else {
+ /* Nothing allocated. */
+ BaseTable::data = 0;
+ }
+}
+
+/** \fn Vector::~Vector()
+ * \brief Free all memory used by the vector.
+ *
+ * The vector is reset to zero elements. Destructors are called on all
+ * elements in the vector. The space allocated for the vector is freed.
+ */
+
+
+/**
+ * \brief Free all memory used by the vector.
+ *
+ * The vector is reset to zero elements. Destructors are called on all
+ * elements in the vector. The space allocated for the vector is freed.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ empty()
+{
+ if ( BaseTable::data != 0 ) {
+ /* Call All destructors. */
+ T *pos = BaseTable::data;
+ for ( long i = 0; i < BaseTable::tabLen; pos++, i++ )
+ pos->~T();
+
+ /* Free the data space. */
+ free( BaseTable::data );
+ BaseTable::data = 0;
+ BaseTable::tabLen = BaseTable::allocLen = 0;
+ }
+}
+
+/**
+ * \brief Set the contents of the vector to be len elements exactly.
+ *
+ * The vector becomes len elements in length. Destructors are called on any
+ * existing elements in the vector. Copy constructors are used to place the
+ * new elements in the vector.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ setAs(const T *val, long len)
+{
+ /* Call All destructors. */
+ long i;
+ T *pos = BaseTable::data;
+ for ( i = 0; i < BaseTable::tabLen; pos++, i++ )
+ pos->~T();
+
+ /* Adjust the allocated length. */
+ if ( len < BaseTable::tabLen )
+ downResize( len );
+ else if ( len > BaseTable::tabLen )
+ upResize( len );
+
+ /* Set the new data length to exactly len. */
+ BaseTable::tabLen = len;
+
+ /* Copy data in. */
+ T *dst = BaseTable::data;
+ const T *src = val;
+ for ( i = 0; i < len; i++, dst++, src++ )
+ new(dst) T(*src);
+}
+
+/**
+ * \brief Set the vector to len copies of item.
+ *
+ * The vector becomes len elements in length. Destructors are called on any
+ * existing elements in the vector. The element's copy constructor is used to
+ * copy the item into the vector.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ setAsDup(const T &item, long len)
+{
+ /* Call All destructors. */
+ T *pos = BaseTable::data;
+ for ( long i = 0; i < BaseTable::tabLen; pos++, i++ )
+ pos->~T();
+
+ /* Adjust the allocated length. */
+ if ( len < BaseTable::tabLen )
+ downResize( len );
+ else if ( len > BaseTable::tabLen )
+ upResize( len );
+
+ /* Set the new data length to exactly len. */
+ BaseTable::tabLen = len;
+
+ /* Copy item in one spot at a time. */
+ T *dst = BaseTable::data;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T(item);
+}
+
+/**
+ * \brief Set the vector to exactly len new items.
+ *
+ * The vector becomes len elements in length. Destructors are called on any
+ * existing elements in the vector. Default constructors are used to init the
+ * new items.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ setAsNew(long len)
+{
+ /* Call All destructors. */
+ T *pos = BaseTable::data;
+ for ( long i = 0; i < BaseTable::tabLen; pos++, i++ )
+ pos->~T();
+
+ /* Adjust the allocated length. */
+ if ( len < BaseTable::tabLen )
+ downResize( len );
+ else if ( len > BaseTable::tabLen )
+ upResize( len );
+
+ /* Set the new data length to exactly len. */
+ BaseTable::tabLen = len;
+
+ /* Create items using default constructor. */
+ T *dst = BaseTable::data;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T();
+}
+
+
+/**
+ * \brief Replace len elements at position pos.
+ *
+ * If there are existing elements at the positions to be replaced, then
+ * destructors are called before the space is used. Copy constructors are used
+ * to place the elements into the vector. It is allowable for the pos and
+ * length to specify a replacement that overwrites existing elements and
+ * creates new ones. If pos is greater than the length of the vector then
+ * undefined behaviour results. If pos is negative, then it is treated as an
+ * offset relative to the length of the vector.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ replace(long pos, const T *val, long len)
+{
+ long endPos, i;
+ T *item;
+
+ /* If we are given a negative position to replace at then
+ * treat it as a position relative to the length. */
+ if ( pos < 0 )
+ pos = BaseTable::tabLen + pos;
+
+ /* The end is the one past the last item that we want
+ * to write to. */
+ endPos = pos + len;
+
+ /* Make sure we have enough space. */
+ if ( endPos > BaseTable::tabLen ) {
+ upResize( endPos );
+
+ /* Delete any objects we need to delete. */
+ item = BaseTable::data + pos;
+ for ( i = pos; i < BaseTable::tabLen; i++, item++ )
+ item->~T();
+
+ /* We are extending the vector, set the new data length. */
+ BaseTable::tabLen = endPos;
+ }
+ else {
+ /* Delete any objects we need to delete. */
+ item = BaseTable::data + pos;
+ for ( i = pos; i < endPos; i++, item++ )
+ item->~T();
+ }
+
+ /* Copy data in using copy constructor. */
+ T *dst = BaseTable::data + pos;
+ const T *src = val;
+ for ( i = 0; i < len; i++, dst++, src++ )
+ new(dst) T(*src);
+}
+
+/**
+ * \brief Replace at position pos with len copies of an item.
+ *
+ * If there are existing elements at the positions to be replaced, then
+ * destructors are called before the space is used. The copy constructor is
+ * used to place the element into this vector. It is allowable for the pos and
+ * length to specify a replacement that overwrites existing elements and
+ * creates new ones. If pos is greater than the length of the vector then
+ * undefined behaviour results. If pos is negative, then it is treated as an
+ * offset relative to the length of the vector.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ replaceDup(long pos, const T &val, long len)
+{
+ long endPos, i;
+ T *item;
+
+ /* If we are given a negative position to replace at then
+ * treat it as a position relative to the length. */
+ if ( pos < 0 )
+ pos = BaseTable::tabLen + pos;
+
+ /* The end is the one past the last item that we want
+ * to write to. */
+ endPos = pos + len;
+
+ /* Make sure we have enough space. */
+ if ( endPos > BaseTable::tabLen ) {
+ upResize( endPos );
+
+ /* Delete any objects we need to delete. */
+ item = BaseTable::data + pos;
+ for ( i = pos; i < BaseTable::tabLen; i++, item++ )
+ item->~T();
+
+ /* We are extending the vector, set the new data length. */
+ BaseTable::tabLen = endPos;
+ }
+ else {
+ /* Delete any objects we need to delete. */
+ item = BaseTable::data + pos;
+ for ( i = pos; i < endPos; i++, item++ )
+ item->~T();
+ }
+
+ /* Copy data in using copy constructor. */
+ T *dst = BaseTable::data + pos;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T(val);
+}
+
+/**
+ * \brief Replace at position pos with len new elements.
+ *
+ * If there are existing elements at the positions to be replaced, then
+ * destructors are called before the space is used. The default constructor is
+ * used to initialize the new elements. It is allowable for the pos and length
+ * to specify a replacement that overwrites existing elements and creates new
+ * ones. If pos is greater than the length of the vector then undefined
+ * behaviour results. If pos is negative, then it is treated as an offset
+ * relative to the length of the vector.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ replaceNew(long pos, long len)
+{
+ long endPos, i;
+ T *item;
+
+ /* If we are given a negative position to replace at then
+ * treat it as a position relative to the length. */
+ if ( pos < 0 )
+ pos = BaseTable::tabLen + pos;
+
+ /* The end is the one past the last item that we want
+ * to write to. */
+ endPos = pos + len;
+
+ /* Make sure we have enough space. */
+ if ( endPos > BaseTable::tabLen ) {
+ upResize( endPos );
+
+ /* Delete any objects we need to delete. */
+ item = BaseTable::data + pos;
+ for ( i = pos; i < BaseTable::tabLen; i++, item++ )
+ item->~T();
+
+ /* We are extending the vector, set the new data length. */
+ BaseTable::tabLen = endPos;
+ }
+ else {
+ /* Delete any objects we need to delete. */
+ item = BaseTable::data + pos;
+ for ( i = pos; i < endPos; i++, item++ )
+ item->~T();
+ }
+
+ /* Copy data in using copy constructor. */
+ T *dst = BaseTable::data + pos;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T();
+}
+
+/**
+ * \brief Remove len elements at position pos.
+ *
+ * Destructor is called on all elements removed. Elements to the right of pos
+ * are shifted len spaces to the left to take up the free space. If pos is
+ * greater than or equal to the length of the vector then undefined behavior
+ * results. If pos is negative then it is treated as an offset relative to the
+ * length of the vector.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ remove(long pos, long len)
+{
+ long newLen, lenToSlideOver, endPos;
+ T *dst, *item;
+
+ /* If we are given a negative position to remove at then
+ * treat it as a position relative to the length. */
+ if ( pos < 0 )
+ pos = BaseTable::tabLen + pos;
+
+ /* The first position after the last item deleted. */
+ endPos = pos + len;
+
+ /* The new data length. */
+ newLen = BaseTable::tabLen - len;
+
+ /* The place in the data we are deleting at. */
+ dst = BaseTable::data + pos;
+
+ /* Call Destructors. */
+ item = dst;
+ for ( long i = 0; i < len; i += 1, item += 1 )
+ item->~T();
+
+ /* Shift data over if necessary. */
+ lenToSlideOver = BaseTable::tabLen - endPos;
+ if ( len > 0 && lenToSlideOver > 0 )
+ memmove(dst, dst + len, sizeof(T)*lenToSlideOver);
+
+ /* Shrink the data if necessary. */
+ downResize( newLen );
+
+ /* Set the new data length. */
+ BaseTable::tabLen = newLen;
+}
+
+/**
+ * \brief Insert len elements at position pos.
+ *
+ * Elements in the vector from pos onward are shifted len spaces to the right.
+ * The copy constructor is used to place the elements into this vector. If pos
+ * is greater than the length of the vector then undefined behaviour results.
+ * If pos is negative then it is treated as an offset relative to the length
+ * of the vector.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ insert(long pos, const T *val, long len)
+{
+ /* If we are given a negative position to insert at then
+ * treat it as a position relative to the length. */
+ if ( pos < 0 )
+ pos = BaseTable::tabLen + pos;
+
+ /* Calculate the new length. */
+ long newLen = BaseTable::tabLen + len;
+
+ /* Up resize, we are growing. */
+ upResize( newLen );
+
+ /* Shift over data at insert spot if needed. */
+ if ( len > 0 && pos < BaseTable::tabLen ) {
+ memmove(BaseTable::data + pos + len, BaseTable::data + pos,
+ sizeof(T)*(BaseTable::tabLen-pos));
+ }
+
+ /* Copy data in element by element. */
+ T *dst = BaseTable::data + pos;
+ const T *src = val;
+ for ( long i = 0; i < len; i++, dst++, src++ )
+ new(dst) T(*src);
+
+ /* Set the new length. */
+ BaseTable::tabLen = newLen;
+}
+
+/**
+ * \brief Insert len copies of item at position pos.
+ *
+ * Elements in the vector from pos onward are shifted len spaces to the right.
+ * The copy constructor is used to place the element into this vector. If pos
+ * is greater than the length of the vector then undefined behaviour results.
+ * If pos is negative then it is treated as an offset relative to the length
+ * of the vector.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ insertDup(long pos, const T &item, long len)
+{
+ /* If we are given a negative position to insert at then
+ * treat it as a position relative to the length. */
+ if ( pos < 0 )
+ pos = BaseTable::tabLen + pos;
+
+ /* Calculate the new length. */
+ long newLen = BaseTable::tabLen + len;
+
+ /* Up resize, we are growing. */
+ upResize( newLen );
+
+ /* Shift over data at insert spot if needed. */
+ if ( len > 0 && pos < BaseTable::tabLen ) {
+ memmove(BaseTable::data + pos + len, BaseTable::data + pos,
+ sizeof(T)*(BaseTable::tabLen-pos));
+ }
+
+ /* Copy the data item in one at a time. */
+ T *dst = BaseTable::data + pos;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T(item);
+
+ /* Set the new length. */
+ BaseTable::tabLen = newLen;
+}
+
+/**
+ * \brief Insert len new elements using the default constructor.
+ *
+ * Elements in the vector from pos onward are shifted len spaces to the right.
+ * Default constructors are used to init the new elements. If pos is off the
+ * end of the vector then undefined behaviour results. If pos is negative then
+ * it is treated as an offset relative to the length of the vector.
+ */
+template<class T, class Resize> void Vector<T, Resize>::
+ insertNew(long pos, long len)
+{
+ /* If we are given a negative position to insert at then
+ * treat it as a position relative to the length. */
+ if ( pos < 0 )
+ pos = BaseTable::tabLen + pos;
+
+ /* Calculate the new length. */
+ long newLen = BaseTable::tabLen + len;
+
+ /* Up resize, we are growing. */
+ upResize( newLen );
+
+ /* Shift over data at insert spot if needed. */
+ if ( len > 0 && pos < BaseTable::tabLen ) {
+ memmove(BaseTable::data + pos + len, BaseTable::data + pos,
+ sizeof(T)*(BaseTable::tabLen-pos));
+ }
+
+ /* Init new data with default constructors. */
+ T *dst = BaseTable::data + pos;
+ for ( long i = 0; i < len; i++, dst++ )
+ new(dst) T();
+
+ /* Set the new length. */
+ BaseTable::tabLen = newLen;
+}
+
+/* Makes space for len items, Does not init the items in any way. If pos is
+ * greater than the length of the vector then undefined behaviour results.
+ * Updates the length of the vector. */
+template<class T, class Resize> void Vector<T, Resize>::
+ makeRawSpaceFor(long pos, long len)
+{
+ /* Calculate the new length. */
+ long newLen = BaseTable::tabLen + len;
+
+ /* Up resize, we are growing. */
+ upResize( newLen );
+
+ /* Shift over data at insert spot if needed. */
+ if ( len > 0 && pos < BaseTable::tabLen ) {
+ memmove(BaseTable::data + pos + len, BaseTable::data + pos,
+ sizeof(T)*(BaseTable::tabLen-pos));
+ }
+
+ /* Save the new length. */
+ BaseTable::tabLen = newLen;
+}
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+#endif /* _AAPL_VECTOR_H */
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..a8e16e4
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,9577 @@
+# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 57 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable. If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins. After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script. The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_REPLACE_SHELLFNS
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Go], [_LT_LANG(GO)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+m4_ifndef([AC_PROG_GO], [
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_GO. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC], [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+ fi
+fi
+if test -z "$GOC"; then
+ AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+ [LT_LANG(GO)],
+ [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+
+ AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+ [lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+ [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+ lt_aix_libpath_sed='[
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }]'
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi],[])
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+ fi
+ ])
+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+case "$ECHO" in
+ printf*) AC_MSG_RESULT([printf]) ;;
+ print*) AC_MSG_RESULT([print -r]) ;;
+ *) AC_MSG_RESULT([cat]) ;;
+esac
+
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test "X`printf %s $ECHO`" = "X$ECHO" \
+ || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[ --with-sysroot[=DIR] Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted. We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+ if test "$GCC" = yes; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ AC_MSG_RESULT([${with_sysroot}])
+ AC_MSG_ERROR([The sysroot must be an absolute path.])
+ ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD="${LD-ld}_sol2"
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+ [lt_cv_ar_at_file=no
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+ [echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([lt_ar_try])
+ if test "$ac_status" -eq 0; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ AC_TRY_EVAL([lt_ar_try])
+ if test "$ac_status" -ne 0; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+ ])
+ ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+ [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+ [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+ *) lt_sed_strip_eq="s,=/,/,g" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[23]].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+ [lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [lt_cv_shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+ ])
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+ [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+ [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+ case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh
+ # decide which to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+ [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+ [lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+ MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ case $cc_basename in
+ nvcc*)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+ esac
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT@&t@_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+ [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+ if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Intel*\ [[CF]]*Compiler*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ *Portland\ Group*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*)
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test "$with_gnu_ld" = yes; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+ *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test "$lt_use_gnu_ld_interface" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ m4_if($1, [], [
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ _LT_LINKER_OPTION([if $CC understands -b],
+ _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+ [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+ [lt_cv_irix_exported_symbol],
+ [save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+ [C++], [[int foo (void) { return 0; }]],
+ [Fortran 77], [[
+ subroutine foo
+ end]],
+ [Fortran], [[
+ subroutine foo
+ end]])])],
+ [lt_cv_irix_exported_symbol=yes],
+ [lt_cv_irix_exported_symbol=no])
+ LDFLAGS="$save_LDFLAGS"])
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ fi
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+ [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+ [$RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ ])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+ [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+ '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+ '"$_LT_TAGVAR(reload_cmds, $1)"
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case ${prev}${p} in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test "$pre_test_object_deps_done" = no; then
+ case ${prev} in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${F77-"f77"}
+ CFLAGS=$FFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+ CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${FC-"f95"}
+ CFLAGS=$FCFLAGS
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+ func_split_long_opt_name=${1%%=*}
+ func_split_long_opt_arg=${1#*=}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
+
+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
+
+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+ func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+ [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+ [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
+
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 7 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for lt_pkg in $withval; do
+ IFS="$lt_save_ifs"
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# @configure_input@
+
+# serial 3337 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.2'
+macro_revision='1.3337'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.3], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.3])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/colm.vim b/colm.vim
new file mode 100644
index 0000000..ee59d89
--- /dev/null
+++ b/colm.vim
@@ -0,0 +1,97 @@
+" Vim syntax file
+"
+" Language: Colm
+" Author: Adrian Thurston
+
+syntax clear
+
+"
+" Regular Language Types
+"
+
+" Identifiers
+syntax match rlId "[a-zA-Z_][a-zA-Z_0-9]*" contained
+
+" Literals
+syntax match rlLiteral "'\(\\.\|[^'\\]\)*'[i]*" contained
+syntax match rlLiteral "\"\(\\.\|[^\"\\]\)*\"[i]*" contained
+syntax match rlLiteral "\[\(\\.\|[^\]\\]\)*\]" contained
+
+" Numbers
+syntax match rlNumber "[0-9][0-9]*" contained
+syntax match rlNumber "0x[0-9a-fA-F][0-9a-fA-F]*" contained
+
+" Operators
+syntax match rlOtherOps ":>" contained
+syntax match rlOtherOps ":>>" contained
+syntax match rlOtherOps "<:" contained
+
+syntax cluster rlTypes contains=rlId,rlLiteral,rlNumber,rlOtherOps
+syntax region rlTypeRegion matchgroup=regionDelimiter start="/" end="/"
+ \ contains=@rlTypes
+
+syntax region cflTypeRegion matchgroup=regionDelimiter start="\[" end="\]"
+ \ contains=cflTypeRegion,patRegion,otLit,typeKeywords,varCapture,qual
+syntax region patRegion matchgroup=String start="\"" end="\"" end="\n"
+ \ contains=char,cflTypeRegion
+
+syntax match char "[^\"\[]" contained
+syntax match char "\\." contained
+
+syntax match otLit "\~.*$"
+syntax match otLit "'\(\\.\|[^'\\]\)*\('[i]*\)\?"
+syntax match otLit "`[^ \t\r\]]\+"
+syntax match otLit "`\]"
+
+"
+" Other stuff
+"
+
+syntax match tlComment "#.*$"
+syntax match tlIdentifier "[a-zA-Z_][a-zA-Z_0-9]*"
+syntax match tlNumber "[0-9][0-9]*"
+syntax match tlNumber "nil"
+syntax match tlNumber "true"
+syntax match tlNumber "false"
+
+syntax keyword Type
+ \ commit include literal iter
+ \ namespace lex reducefirst global include export
+ \ construct cons parse parse_stop match require send
+ \ preeof left right nonassoc prec context alias
+ \ end
+
+syntax keyword typeKeywords
+ \ int str bool any ref ptr void
+
+syntax keyword Keyword
+ \ reject else elsif return yield for while if
+ \ typeid in break
+ \ new deref ni cast
+
+syntax match tokenName "[a-zA-Z_][a-zA-Z_0-9]*" contained
+syntax match varCapture "[a-zA-Z_][a-zA-Z_0-9]*:"
+syntax match qual "[a-zA-Z_][a-zA-Z_0-9]*::"
+
+syntax region defTypes matchgroup=defKeywords
+ \ start="\<rl\>" start="\<def\>" start="\<token\>" start="\<ignore\>"
+ \ matchgroup=Function end="[a-zA-Z_][a-zA-Z0-9_]*" end="/"me=e-1
+
+syntax sync match colmSyncPat grouphere NONE "([{}]|\<token\>|\<ignore\>|\<def\>)"
+
+"
+" Specifying Groups
+"
+hi link tlComment Comment
+hi link tlNumber Number
+hi link otLit String
+hi link rlNumber Number
+hi link rlLiteral String
+hi link defKeywords Type
+hi link typeKeywords Type
+hi link regionDelimiter Type
+hi link char String
+hi link tokenName Function
+hi link varCapture Identifier
+
+let b:current_syntax = "colm"
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..d622a44
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1530 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-02-10'
+
+# This file 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, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..c894da4
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1773 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-02-10'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file 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, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | open8 \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..d7dc7f7
--- /dev/null
+++ b/configure
@@ -0,0 +1,18544 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for colm 0.12.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1
+
+ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='colm'
+PACKAGE_TARNAME='colm'
+PACKAGE_VERSION='0.12.0'
+PACKAGE_STRING='colm 0.12.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+CXXCPP
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+DLLTOOL
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+BUILD_MANUAL_FALSE
+BUILD_MANUAL_TRUE
+PUBDATE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_pool_malloc
+enable_debug
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures colm 0.12.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/colm]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of colm 0.12.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-pool-malloc allocate pool objects with malloc
+ --enable-debug enable debug statements
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot=DIR Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ CXXCPP C++ preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+colm configure 0.12.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid; break
+else
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=$ac_mid; break
+else
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid
+else
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+ ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+ fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by colm $as_me 0.12.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+PUBDATE="Jan 2014"
+
+am__api_version='1.11'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='colm'
+ VERSION='0.12.0'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+
+ac_config_headers="$ac_config_headers src/config.h src/defs.h"
+
+
+as_ac_File=`$as_echo "ac_cv_file_$srcdir/DIST" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $srcdir/DIST" >&5
+$as_echo_n "checking for $srcdir/DIST... " >&6; }
+if eval \${$as_ac_File+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ test "$cross_compiling" = yes &&
+ as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "$srcdir/DIST"; then
+ eval "$as_ac_File=yes"
+else
+ eval "$as_ac_File=no"
+fi
+fi
+eval ac_res=\$$as_ac_File
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$srcdir/DIST" | $as_tr_cpp` 1
+_ACEOF
+. $srcdir/DIST;
+else
+ build_manual=yes;
+fi
+
+
+ if test "x$build_manual" = "xyes"; then
+ BUILD_MANUAL_TRUE=
+ BUILD_MANUAL_FALSE='#'
+else
+ BUILD_MANUAL_TRUE='#'
+ BUILD_MANUAL_FALSE=
+fi
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+CFLAGS="$CFLAGS -Wall"
+CXXFLAGS="$CFLAGS -Wall"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.2'
+macro_revision='1.3337'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO ""
+}
+
+case "$ECHO" in
+ printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+ print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if ${lt_cv_path_NM+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in dumpbin "link -dump"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in dumpbin "link -dump"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+ case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if ${lt_cv_nm_interface+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if ${lt_cv_sys_max_cmd_len+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if ${lt_cv_deplibs_check_method+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh
+ # decide which to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -ne 0; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+ withval=$with_sysroot;
+else
+ with_sysroot=no
+fi
+
+
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+ if test "$GCC" = yes; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if ${lt_cv_cc_needs_belf+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD="${LD-ld}_sol2"
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
+ MANIFEST_TOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+ fi
+else
+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&5
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+ MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if ${lt_cv_apple_cc_single_mod+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&5
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+ echo "$AR cru libconftest.a conftest.o" >&5
+ $AR cru libconftest.a conftest.o 2>&5
+ echo "$RANLIB libconftest.a" >&5
+ $RANLIB libconftest.a 2>&5
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&5
+ elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+func_stripname_cnf ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname_cnf
+
+
+
+
+
+# Set options
+
+
+
+ enable_dlopen=no
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for lt_pkg in $withval; do
+ IFS="$lt_save_ifs"
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ case $cc_basename in
+ nvcc*)
+ lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+ *)
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ link_all_deplibs=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test "$with_gnu_ld" = yes; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+ *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test "$lt_use_gnu_ld_interface" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ export_dynamic_flag_spec='${wl}--export-all-symbols'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ haiku*)
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ link_all_deplibs=yes
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ link_all_deplibs=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_="/usr/lib:/lib"
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_="/usr/lib:/lib"
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ fi
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ file_list_spec='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+ enable_shared_with_static_runtimes=yes
+ exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds='chmod 644 $oldlib'
+ postlink_cmds='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ enable_shared_with_static_runtimes=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+ else
+ whole_archive_flag_spec=''
+ fi
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler__b=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -b"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler__b=yes
+ fi
+ else
+ lt_cv_prog_compiler__b=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test x"$lt_cv_prog_compiler__b" = xyes; then
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_irix_exported_symbol=yes
+else
+ lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ fi
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc=no
+ else
+ lt_cv_archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+ archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
+ *) lt_sed_strip_eq="s,=/,/,g" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
+ lt_cv_dlopen="shl_load"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if ${ac_cv_lib_svld_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if ${ac_cv_lib_dld_dld_link+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+ if ${ac_cv_prog_CXXCPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+else
+ _lt_caught_CXX_error=yes
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+reload_flag_CXX=$reload_flag
+reload_cmds_CXX=$reload_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ compiler_CXX=$CC
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+ else
+ lt_prog_compiler_no_builtin_flag_CXX=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_CXX=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+ ld_shlibs_CXX=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds_CXX=''
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ file_list_spec_CXX='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct_CXX=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L_CXX=yes
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_libdir_separator_CXX=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec_CXX='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ always_export_symbols_CXX=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag_CXX='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath__CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_CXX="-z nodefs"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath__CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag_CXX=' ${wl}-bernotok'
+ allow_undefined_flag_CXX=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_CXX='$convenience'
+ fi
+ archive_cmds_need_lc_CXX=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_CXX=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX=' '
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=yes
+ file_list_spec_CXX='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
+ enable_shared_with_static_runtimes_CXX=yes
+ # Don't use ranlib
+ old_postinstall_cmds_CXX='chmod 644 $oldlib'
+ postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=no
+ enable_shared_with_static_runtimes_CXX=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc_CXX=no
+ hardcode_direct_CXX=no
+ hardcode_automatic_CXX=yes
+ hardcode_shlibpath_var_CXX=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+ else
+ whole_archive_flag_spec_CXX=''
+ fi
+ link_all_deplibs_CXX=yes
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+
+ else
+ ld_shlibs_CXX=no
+ fi
+
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+ ;;
+
+ freebsd-elf*)
+ archive_cmds_need_lc_CXX=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ ld_shlibs_CXX=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ haiku*)
+ archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ link_all_deplibs_CXX=yes
+ ;;
+
+ hpux9*)
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ hardcode_direct_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ ;;
+ *)
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ fi
+ fi
+ link_all_deplibs_CXX=yes
+ ;;
+ esac
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ inherit_rpath_CXX=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
+ prelink_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ old_archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object_CXX=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ ld_shlibs_CXX=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ ld_shlibs_CXX=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ hardcode_direct_absolute_CXX=yes
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ allow_undefined_flag_CXX=' -expect_unresolved \*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ ;;
+ esac
+
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ archive_cmds_need_lc_CXX=yes
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_shlibpath_var_CXX=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ link_all_deplibs_CXX=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag_CXX='${wl}-z,text'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag_CXX='${wl}-z,text'
+ allow_undefined_flag_CXX='${wl}-z,nodefs'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ export_dynamic_flag_spec_CXX='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
+ '"$old_archive_cmds_CXX"
+ reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
+ '"$reload_cmds_CXX"
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+ GCC_CXX="$GXX"
+ LD_CXX="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case ${prev}${p} in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test "$pre_test_object_deps_done" = no; then
+ case ${prev} in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$compiler_lib_search_path_CXX"; then
+ compiler_lib_search_path_CXX="${prev}${p}"
+ else
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$postdeps_CXX"; then
+ postdeps_CXX="${prev}${p}"
+ else
+ postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$predep_objects_CXX"; then
+ predep_objects_CXX="$p"
+ else
+ predep_objects_CXX="$predep_objects_CXX $p"
+ fi
+ else
+ if test -z "$postdep_objects_CXX"; then
+ postdep_objects_CXX="$p"
+ else
+ postdep_objects_CXX="$postdep_objects_CXX $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ predep_objects_CXX=
+ postdep_objects_CXX=
+ postdeps_CXX=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_CXX='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static_CXX=
+ ;;
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[4-9]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ else
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ lt_prog_compiler_pic_CXX='+Z'
+ fi
+ ;;
+ aCC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-qpic'
+ lt_prog_compiler_static_CXX='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ lt_prog_compiler_pic_CXX='-pic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_CXX=
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+ esac
+else
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+ :
+else
+ lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ case $host_os in
+ aix[4-9]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ export_symbols_cmds_CXX="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*)
+ exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ link_all_deplibs_CXX=no
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_CXX=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds_CXX in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_CXX
+ pic_flag=$lt_prog_compiler_pic_CXX
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+ allow_undefined_flag_CXX=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc_CXX=no
+ else
+ lt_cv_archive_cmds_need_lc_CXX=yes
+ fi
+ allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
+ archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+ test -n "$runpath_var_CXX" ||
+ test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct_CXX" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+ test "$hardcode_minus_L_CXX" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action_CXX=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action_CXX=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink ||
+ test "$inherit_rpath_CXX" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+# Check whether --enable-pool-malloc was given.
+if test "${enable_pool_malloc+set}" = set; then :
+ enableval=$enable_pool_malloc;
+$as_echo "#define POOL_MALLOC 1" >>confdefs.h
+
+fi
+
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+ enableval=$enable_debug;
+$as_echo "#define DEBUG 1" >>confdefs.h
+
+fi
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile aapl/Makefile test/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${BUILD_MANUAL_TRUE}" && test -z "${BUILD_MANUAL_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_MANUAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by colm $as_me 0.12.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+colm config.status 0.12.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
+predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
+postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
+reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
+reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+reload_flag_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_separator_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec \
+reload_cmds_CXX \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX \
+postlink_cmds_CXX; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
+ "src/defs.h") CONFIG_HEADERS="$CONFIG_HEADERS src/defs.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "aapl/Makefile") CONFIG_FILES="$CONFIG_FILES aapl/Makefile" ;;
+ "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\ # positional parameters, so assign one to ordinary parameter first.\
+\ func_stripname_result=${3}\
+\ func_stripname_result=${func_stripname_result#"${1}"}\
+\ func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\ func_split_long_opt_name=${1%%=*}\
+\ func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\ func_split_short_opt_arg=${1#??}\
+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\ case ${1} in\
+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\ *) func_lo2o_result=${1} ;;\
+\ esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+ func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+ func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+ func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+ eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\ func_quote_for_eval "${2}"\
+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+
+ cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_CXX
+reload_cmds=$lt_reload_cmds_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+echo "configuration of colm complete"
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..e057f94
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,73 @@
+dnl
+dnl Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+dnl
+
+dnl This file is part of Colm.
+dnl
+dnl Colm is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl Colm is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with Colm; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+AC_INIT(colm, 0.12.0)
+PUBDATE="Jan 2014"
+
+AM_INIT_AUTOMAKE([foreign])
+
+AC_SUBST(PUBDATE)
+AC_CONFIG_HEADER([src/config.h src/defs.h])
+
+dnl Choose a default for the build_manual var. If the dist file is present in
+dnl the root then default to no, otherwise go for it.
+AC_CHECK_FILES( [$srcdir/DIST],
+ [. $srcdir/DIST;],
+ [build_manual=yes; ] )
+
+dnl Set to true if the manual should be built.
+AM_CONDITIONAL(BUILD_MANUAL, [test "x$build_manual" = "xyes"])
+
+AC_CHECK_SIZEOF([long])
+
+CFLAGS="$CFLAGS -Wall"
+CXXFLAGS="$CFLAGS -Wall"
+
+dnl Set to true if build system should generate parsers from ragel, kelbt, and
+dnl gperf sources. Set to false if generated files are included and not to be
+dnl built (production).
+dnl AC_SUBST(BUILD_PARSERS,true)
+
+dnl Checks for programs.
+AC_PROG_CC
+
+dnl Checks for programs.
+AC_PROG_CXX
+
+AC_PROG_LIBTOOL
+
+dnl Set test on c++ compiler.
+AC_LANG_CPLUSPLUS
+
+dnl Check for definition of MAKE.
+AC_PROG_MAKE_SET
+
+AC_ARG_ENABLE(pool-malloc,
+ AC_HELP_STRING([--enable-pool-malloc], [allocate pool objects with malloc]),
+ AC_DEFINE([POOL_MALLOC], [1], [allocate pool objects with malloc]))
+
+AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--enable-debug], [enable debug statements]),
+ AC_DEFINE([DEBUG], [1], [enable debug statements]))
+
+dnl write output files
+AC_OUTPUT(Makefile src/Makefile aapl/Makefile test/Makefile)
+
+echo "configuration of colm complete"
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..bd0ac08
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,688 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2011-12-04.11; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
+
+# 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, 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, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> "$depfile"
+ echo >> "$depfile"
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test "$stat" = 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/ \1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/ /
+ G
+ p
+}' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..a9244eb
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-01-19.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for `test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100644
index 0000000..c2852d8
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,9661 @@
+
+# libtool (GNU libtool) 2.4.2
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --no-quiet, --no-silent
+# print informational messages (default)
+# --no-warn don't display warning messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print more informational messages than default
+# --no-verbose don't print the extra informational messages
+# --version print version information
+# -h, --help, --help-all print short, long, or detailed help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE. When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION="2.4.2 Debian-2.4.2-1ubuntu1"
+TIMESTAMP=""
+package_revision=1.3337
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+ s@/\./@/@g
+ t dotsl
+ s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+# value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test "$func_normal_abspath_tpath" = / ; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result" ; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+# value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=${func_dirname_result}
+ if test "x$func_relative_path_tlibdir" = x ; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test "x$func_stripname_result" != x ; then
+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+ fi
+
+ # Normalisation. If bindir is libdir, return empty string,
+ # else relative path ending with a slash; either way, target
+ # file name can be directly appended.
+ if test ! -z "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result/"
+ func_relative_path_result=$func_stripname_result
+ fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=${PATH_SEPARATOR-:}
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "$my_tmpdir"
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "$1" | $SED \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $opt_debug
+
+ $SED -n '/(C)/!b go
+ :more
+ /\./!{
+ N
+ s/\n# / /
+ b more
+ }
+ :go
+ /^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/^# *.*--help/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ echo
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ :print
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
+ p
+ d
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
+ ret=$?
+ if test -z "$1"; then
+ exit $ret
+ fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $opt_debug
+
+ func_error "missing argument for $1."
+ exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+ my_sed_long_arg='1s/^--[^=]*=//'
+
+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+ func_quote_for_eval "${2}"
+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_warning=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly. This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+ # this just eases exit handling
+ while test $# -gt 0; do
+ opt="$1"
+ shift
+ case $opt in
+ --debug|-x) opt_debug='set -x'
+ func_echo "enabling shell trace mode"
+ $opt_debug
+ ;;
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+ --config)
+ opt_config=:
+func_config
+ ;;
+ --dlopen|-dlopen)
+ optarg="$1"
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+ shift
+ ;;
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=:
+ ;;
+ --features)
+ opt_features=:
+func_features
+ ;;
+ --finish)
+ opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ --help)
+ opt_help=:
+ ;;
+ --help-all)
+ opt_help_all=:
+opt_help=': help-all'
+ ;;
+ --mode)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_mode="$optarg"
+case $optarg in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+esac
+ shift
+ ;;
+ --no-silent|--no-quiet)
+ opt_silent=false
+func_append preserve_args " $opt"
+ ;;
+ --no-warning|--no-warn)
+ opt_warning=false
+func_append preserve_args " $opt"
+ ;;
+ --no-verbose)
+ opt_verbose=false
+func_append preserve_args " $opt"
+ ;;
+ --silent|--quiet)
+ opt_silent=:
+func_append preserve_args " $opt"
+ opt_verbose=false
+ ;;
+ --verbose|-v)
+ opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+ ;;
+ --tag)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+ --version) func_version ;;
+
+ # Separate optargs to long options:
+ --*=*)
+ func_split_long_opt "$opt"
+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-n*|-v*)
+ func_split_short_opt "$opt"
+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # Validate options:
+
+ # save first non-option argument
+ if test "$#" -gt 0; then
+ nonopt="$opt"
+ shift
+ fi
+
+ # preserve --debug
+ test "$opt_debug" = : || func_append preserve_args " --debug"
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$opt_mode' for more information."
+ }
+
+
+ # Bail if the options were screwed
+ $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case "$lt_sysroot:$1" in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result="=$func_stripname_result"
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $opt_debug
+ func_convert_core_file_wine_to_w32_result="$1"
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $opt_debug
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=""
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $opt_debug
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $opt_debug
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $opt_debug
+ if test -z "$2" && test -n "$1" ; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " \`$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result="$1"
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $opt_debug
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " \`$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result="$3"
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $opt_debug
+ case $4 in
+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $opt_debug
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $opt_debug
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $opt_debug
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $opt_debug
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_append_quoted lastarg "$arg"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try \`$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test "$opt_help" = :; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ sed '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "\`$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument \`$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test "x$prev" = x-m && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=""
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname" ; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename="$func_basename_result"
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename" ; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $opt_debug
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $opt_debug
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive which possess that section. Heuristic: eliminate
+ # all those which have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $opt_debug
+ if func_cygming_gnu_implib_p "$1" ; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1" ; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=""
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ if test "$lock_old_archive_extraction" = yes; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test "$lock_old_archive_extraction" = yes; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+# define _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (strcmp (argv[i], debug_opt) == 0)
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $opt_debug
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir="$arg"
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps ; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test "$prefer_static_libs" = yes ||
+ test "$prefer_static_libs,$installed" = "built,no"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$lt_sysroot$libdir"
+ absdir="$lt_sysroot$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ case "$host" in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ echo
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$opt_mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$absdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$opt_mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ # correct linux to gnu/linux during the next big refactor
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|qnx|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux) # correct to gnu/linux during the next big refactor
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ func_append libobjs " $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$opt_mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test "$want_nocaseglob" = yes; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ # Remove ${wl} instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd1 in $cmds; do
+ IFS="$save_ifs"
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test "$try_normal_branch" = yes \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=${output_objdir}/${output_la}.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " ${wl}-bind_at_load"
+ func_append finalize_command " ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ func_append oldobjs " $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ func_resolve_sysroot "$deplib"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test "x$bindir" != x ;
+ then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=yes ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ odir="$objdir"
+ else
+ odir="$dir/$objdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$opt_mode" = uninstall && odir="$dir"
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test "$opt_mode" = clean; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case "$opt_mode" in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$opt_mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ func_append rmfiles " $odir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$opt_mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/missing b/missing
new file mode 100755
index 0000000..86a8fc3
--- /dev/null
+++ b/missing
@@ -0,0 +1,331 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2012-01-06.13; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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, 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, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te*)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison*|yacc*)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if test $# -ne 1; then
+ eval LASTARG=\${$#}
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex*|flex*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if test $# -ne 1; then
+ eval LASTARG=\${$#}
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit $?
+ fi
+ ;;
+
+ makeinfo*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..c39371b
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,116 @@
+#
+# Copyright 2007-2013 Adrian Thurston <thurston@complang.org>
+#
+
+# This file is part of Colm.
+#
+# Colm 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.
+#
+# Colm 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 Colm; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+INCLUDES = -I$(top_srcdir)/aapl
+
+bin_PROGRAMS = colm
+noinst_PROGRAMS = bootstrap0 bootstrap1
+
+RUNTIME_SRC = \
+ map.c pdarun.c list.c input.c debug.c \
+ codevect.c pool.c string.c tree.c iter.c \
+ bytecode.c program.c
+
+RUNTIME_HDR = \
+ bytecode.h config.h defs.h debug.h pool.h input.h \
+ pdarun.h map.h tree.h program.h colm.h
+
+lib_LIBRARIES = libcolmp.a libcolmd.a
+
+noinst_LIBRARIES = libprog.a
+
+libcolmp_a_SOURCES = $(RUNTIME_SRC)
+libcolmp_a_CFLAGS = -Iinclude
+
+libcolmd_a_SOURCES = $(RUNTIME_SRC)
+libcolmd_a_CFLAGS = -Iinclude
+
+common_CFLAGS = \
+ -Wall \
+ -DPREFIX='"$(prefix)"' \
+ -Iinclude
+
+libprog_a_SOURCES = \
+ buffer.h bytecode.h colm.h debug.h dotgen.h fsmcodegen.h fsmgraph.h \
+ input.h keyops.h map.h parsedata.h \
+ parsetree.h pcheck.h pdacodegen.h pdagraph.h pdarun.h pool.h redbuild.h \
+ redfsm.h rtvector.h tree.h version.h global.h colm.h parser.h cstring.h \
+ \
+ resolve.cc lookup.cc synthesis.cc parsetree.cc \
+ fsmstate.cc fsmbase.cc fsmattach.cc fsmmin.cc \
+ fsmgraph.cc pdagraph.cc pdabuild.cc pdacodegen.cc fsmcodegen.cc \
+ redfsm.cc fsmexec.cc redbuild.cc closure.cc fsmap.cc \
+ dotgen.cc pcheck.cc ctinput.cc declare.cc codegen.cc \
+ exports.cc compiler.cc parser.cc
+
+libprog_a_CXXFLAGS = $(common_CFLAGS)
+
+bootstrap0_CXXFLAGS = $(common_CFLAGS) -DCONS_INIT
+bootstrap0_SOURCES = consinit.cc consinit.h main.cc
+bootstrap0_LDADD = libprog.a libcolmd.a
+
+bootstrap1_CXXFLAGS = $(common_CFLAGS) -DLOAD_INIT
+bootstrap1_CFLAGS = $(common_CFLAGS)
+bootstrap1_SOURCES = \
+ loadinit.h loadinit.cc \
+ if1.h if1.cc parse1.c \
+ main.cc
+bootstrap1_LDADD = libprog.a libcolmd.a
+
+colm_CXXFLAGS = $(common_CFLAGS) -DLOAD_COLM
+colm_CFLAGS = $(common_CFLAGS)
+colm_SOURCES = \
+ loadcolm.h loadcolm.cc \
+ if2.h if2.cc parse2.c \
+ main.cc
+colm_LDADD = libprog.a libcolmd.a
+
+colmincdir = $(includedir)/colm
+
+colminc_HEADERS = $(RUNTIME_HDR)
+
+parse1.c: bootstrap0
+ $(builddir)/bootstrap0 -c -o parse1.c -e if1.h -x if1.cc
+if1.h: parse1.c
+if1.cc: parse1.c
+
+parse2.c: bootstrap1 colm.lm
+ $(builddir)/bootstrap1 -c -o parse2.c -e if2.h -x if2.cc colm.lm
+if2.h: parse2.c
+if2.cc: parse2.c
+
+bootstrap1-if1.$(OBJEXT): if1.h if1.cc parse1.c
+bootstrap1-loadinit.$(OBJEXT): if1.h if1.cc parse1.c
+
+colm-if2.$(OBJEXT): if2.h if2.cc parse2.c
+colm-loadcolm.$(OBJEXT): if2.h if2.cc parse2.c
+
+BUILT_SOURCES = version.h include/colm
+
+include/colm:
+ mkdir -p include
+ ln -s .. include/colm
+
+version.h: Makefile
+ echo '#define VERSION "$(PACKAGE_VERSION)"' > version.h
+ echo '#define PUBDATE "$(PUBDATE)"' >> version.h
+
+CLEANFILES = $(BUILT_SOURCES)
+EXTRA_DIST = colm.lm
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..3c932d7
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,1754 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# Copyright 2007-2013 Adrian Thurston <thurston@complang.org>
+#
+
+# This file is part of Colm.
+#
+# Colm 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.
+#
+# Colm 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 Colm; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = colm$(EXEEXT)
+noinst_PROGRAMS = bootstrap0$(EXEEXT) bootstrap1$(EXEEXT)
+subdir = src
+DIST_COMMON = $(colminc_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(srcdir)/defs.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h defs.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
+ "$(DESTDIR)$(colmincdir)"
+LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES)
+ARFLAGS = cru
+libcolmd_a_AR = $(AR) $(ARFLAGS)
+libcolmd_a_LIBADD =
+am__objects_1 = libcolmd_a-map.$(OBJEXT) libcolmd_a-pdarun.$(OBJEXT) \
+ libcolmd_a-list.$(OBJEXT) libcolmd_a-input.$(OBJEXT) \
+ libcolmd_a-debug.$(OBJEXT) libcolmd_a-codevect.$(OBJEXT) \
+ libcolmd_a-pool.$(OBJEXT) libcolmd_a-string.$(OBJEXT) \
+ libcolmd_a-tree.$(OBJEXT) libcolmd_a-iter.$(OBJEXT) \
+ libcolmd_a-bytecode.$(OBJEXT) libcolmd_a-program.$(OBJEXT)
+am_libcolmd_a_OBJECTS = $(am__objects_1)
+libcolmd_a_OBJECTS = $(am_libcolmd_a_OBJECTS)
+libcolmp_a_AR = $(AR) $(ARFLAGS)
+libcolmp_a_LIBADD =
+am__objects_2 = libcolmp_a-map.$(OBJEXT) libcolmp_a-pdarun.$(OBJEXT) \
+ libcolmp_a-list.$(OBJEXT) libcolmp_a-input.$(OBJEXT) \
+ libcolmp_a-debug.$(OBJEXT) libcolmp_a-codevect.$(OBJEXT) \
+ libcolmp_a-pool.$(OBJEXT) libcolmp_a-string.$(OBJEXT) \
+ libcolmp_a-tree.$(OBJEXT) libcolmp_a-iter.$(OBJEXT) \
+ libcolmp_a-bytecode.$(OBJEXT) libcolmp_a-program.$(OBJEXT)
+am_libcolmp_a_OBJECTS = $(am__objects_2)
+libcolmp_a_OBJECTS = $(am_libcolmp_a_OBJECTS)
+libprog_a_AR = $(AR) $(ARFLAGS)
+libprog_a_LIBADD =
+am_libprog_a_OBJECTS = libprog_a-resolve.$(OBJEXT) \
+ libprog_a-lookup.$(OBJEXT) libprog_a-synthesis.$(OBJEXT) \
+ libprog_a-parsetree.$(OBJEXT) libprog_a-fsmstate.$(OBJEXT) \
+ libprog_a-fsmbase.$(OBJEXT) libprog_a-fsmattach.$(OBJEXT) \
+ libprog_a-fsmmin.$(OBJEXT) libprog_a-fsmgraph.$(OBJEXT) \
+ libprog_a-pdagraph.$(OBJEXT) libprog_a-pdabuild.$(OBJEXT) \
+ libprog_a-pdacodegen.$(OBJEXT) libprog_a-fsmcodegen.$(OBJEXT) \
+ libprog_a-redfsm.$(OBJEXT) libprog_a-fsmexec.$(OBJEXT) \
+ libprog_a-redbuild.$(OBJEXT) libprog_a-closure.$(OBJEXT) \
+ libprog_a-fsmap.$(OBJEXT) libprog_a-dotgen.$(OBJEXT) \
+ libprog_a-pcheck.$(OBJEXT) libprog_a-ctinput.$(OBJEXT) \
+ libprog_a-declare.$(OBJEXT) libprog_a-codegen.$(OBJEXT) \
+ libprog_a-exports.$(OBJEXT) libprog_a-compiler.$(OBJEXT) \
+ libprog_a-parser.$(OBJEXT)
+libprog_a_OBJECTS = $(am_libprog_a_OBJECTS)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am_bootstrap0_OBJECTS = bootstrap0-consinit.$(OBJEXT) \
+ bootstrap0-main.$(OBJEXT)
+bootstrap0_OBJECTS = $(am_bootstrap0_OBJECTS)
+bootstrap0_DEPENDENCIES = libprog.a libcolmd.a
+bootstrap0_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(bootstrap0_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_bootstrap1_OBJECTS = bootstrap1-loadinit.$(OBJEXT) \
+ bootstrap1-if1.$(OBJEXT) bootstrap1-parse1.$(OBJEXT) \
+ bootstrap1-main.$(OBJEXT)
+bootstrap1_OBJECTS = $(am_bootstrap1_OBJECTS)
+bootstrap1_DEPENDENCIES = libprog.a libcolmd.a
+bootstrap1_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(bootstrap1_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_colm_OBJECTS = colm-loadcolm.$(OBJEXT) colm-if2.$(OBJEXT) \
+ colm-parse2.$(OBJEXT) colm-main.$(OBJEXT)
+colm_OBJECTS = $(am_colm_OBJECTS)
+colm_DEPENDENCIES = libprog.a libcolmd.a
+colm_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(colm_CXXFLAGS) $(CXXFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libcolmd_a_SOURCES) $(libcolmp_a_SOURCES) \
+ $(libprog_a_SOURCES) $(bootstrap0_SOURCES) \
+ $(bootstrap1_SOURCES) $(colm_SOURCES)
+DIST_SOURCES = $(libcolmd_a_SOURCES) $(libcolmp_a_SOURCES) \
+ $(libprog_a_SOURCES) $(bootstrap0_SOURCES) \
+ $(bootstrap1_SOURCES) $(colm_SOURCES)
+HEADERS = $(colminc_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PUBDATE = @PUBDATE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = -I$(top_srcdir)/aapl
+RUNTIME_SRC = \
+ map.c pdarun.c list.c input.c debug.c \
+ codevect.c pool.c string.c tree.c iter.c \
+ bytecode.c program.c
+
+RUNTIME_HDR = \
+ bytecode.h config.h defs.h debug.h pool.h input.h \
+ pdarun.h map.h tree.h program.h colm.h
+
+lib_LIBRARIES = libcolmp.a libcolmd.a
+noinst_LIBRARIES = libprog.a
+libcolmp_a_SOURCES = $(RUNTIME_SRC)
+libcolmp_a_CFLAGS = -Iinclude
+libcolmd_a_SOURCES = $(RUNTIME_SRC)
+libcolmd_a_CFLAGS = -Iinclude
+common_CFLAGS = \
+ -Wall \
+ -DPREFIX='"$(prefix)"' \
+ -Iinclude
+
+libprog_a_SOURCES = \
+ buffer.h bytecode.h colm.h debug.h dotgen.h fsmcodegen.h fsmgraph.h \
+ input.h keyops.h map.h parsedata.h \
+ parsetree.h pcheck.h pdacodegen.h pdagraph.h pdarun.h pool.h redbuild.h \
+ redfsm.h rtvector.h tree.h version.h global.h colm.h parser.h cstring.h \
+ \
+ resolve.cc lookup.cc synthesis.cc parsetree.cc \
+ fsmstate.cc fsmbase.cc fsmattach.cc fsmmin.cc \
+ fsmgraph.cc pdagraph.cc pdabuild.cc pdacodegen.cc fsmcodegen.cc \
+ redfsm.cc fsmexec.cc redbuild.cc closure.cc fsmap.cc \
+ dotgen.cc pcheck.cc ctinput.cc declare.cc codegen.cc \
+ exports.cc compiler.cc parser.cc
+
+libprog_a_CXXFLAGS = $(common_CFLAGS)
+bootstrap0_CXXFLAGS = $(common_CFLAGS) -DCONS_INIT
+bootstrap0_SOURCES = consinit.cc consinit.h main.cc
+bootstrap0_LDADD = libprog.a libcolmd.a
+bootstrap1_CXXFLAGS = $(common_CFLAGS) -DLOAD_INIT
+bootstrap1_CFLAGS = $(common_CFLAGS)
+bootstrap1_SOURCES = \
+ loadinit.h loadinit.cc \
+ if1.h if1.cc parse1.c \
+ main.cc
+
+bootstrap1_LDADD = libprog.a libcolmd.a
+colm_CXXFLAGS = $(common_CFLAGS) -DLOAD_COLM
+colm_CFLAGS = $(common_CFLAGS)
+colm_SOURCES = \
+ loadcolm.h loadcolm.cc \
+ if2.h if2.cc parse2.c \
+ main.cc
+
+colm_LDADD = libprog.a libcolmd.a
+colmincdir = $(includedir)/colm
+colminc_HEADERS = $(RUNTIME_HDR)
+BUILT_SOURCES = version.h include/colm
+CLEANFILES = $(BUILT_SOURCES)
+EXTRA_DIST = colm.lm
+all: $(BUILT_SOURCES) config.h defs.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @if test ! -f $@; then rm -f stamp-h1; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status src/config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+defs.h: stamp-h2
+ @if test ! -f $@; then rm -f stamp-h2; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi
+
+stamp-h2: $(srcdir)/defs.h.in $(top_builddir)/config.status
+ @rm -f stamp-h2
+ cd $(top_builddir) && $(SHELL) ./config.status src/defs.h
+
+distclean-hdr:
+ -rm -f config.h stamp-h1 defs.h stamp-h2
+install-libLIBRARIES: $(lib_LIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
+ @$(POST_INSTALL)
+ @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ if test -f $$p; then \
+ $(am__strip_dir) \
+ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
+ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
+ else :; fi; \
+ done
+
+uninstall-libLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir)
+
+clean-libLIBRARIES:
+ -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libcolmd.a: $(libcolmd_a_OBJECTS) $(libcolmd_a_DEPENDENCIES) $(EXTRA_libcolmd_a_DEPENDENCIES)
+ -rm -f libcolmd.a
+ $(libcolmd_a_AR) libcolmd.a $(libcolmd_a_OBJECTS) $(libcolmd_a_LIBADD)
+ $(RANLIB) libcolmd.a
+libcolmp.a: $(libcolmp_a_OBJECTS) $(libcolmp_a_DEPENDENCIES) $(EXTRA_libcolmp_a_DEPENDENCIES)
+ -rm -f libcolmp.a
+ $(libcolmp_a_AR) libcolmp.a $(libcolmp_a_OBJECTS) $(libcolmp_a_LIBADD)
+ $(RANLIB) libcolmp.a
+libprog.a: $(libprog_a_OBJECTS) $(libprog_a_DEPENDENCIES) $(EXTRA_libprog_a_DEPENDENCIES)
+ -rm -f libprog.a
+ $(libprog_a_AR) libprog.a $(libprog_a_OBJECTS) $(libprog_a_LIBADD)
+ $(RANLIB) libprog.a
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+bootstrap0$(EXEEXT): $(bootstrap0_OBJECTS) $(bootstrap0_DEPENDENCIES) $(EXTRA_bootstrap0_DEPENDENCIES)
+ @rm -f bootstrap0$(EXEEXT)
+ $(bootstrap0_LINK) $(bootstrap0_OBJECTS) $(bootstrap0_LDADD) $(LIBS)
+bootstrap1$(EXEEXT): $(bootstrap1_OBJECTS) $(bootstrap1_DEPENDENCIES) $(EXTRA_bootstrap1_DEPENDENCIES)
+ @rm -f bootstrap1$(EXEEXT)
+ $(bootstrap1_LINK) $(bootstrap1_OBJECTS) $(bootstrap1_LDADD) $(LIBS)
+colm$(EXEEXT): $(colm_OBJECTS) $(colm_DEPENDENCIES) $(EXTRA_colm_DEPENDENCIES)
+ @rm -f colm$(EXEEXT)
+ $(colm_LINK) $(colm_OBJECTS) $(colm_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap0-consinit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap0-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap1-if1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap1-loadinit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap1-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bootstrap1-parse1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colm-if2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colm-loadcolm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colm-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colm-parse2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-bytecode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-codevect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-debug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-input.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-iter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-map.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-pdarun.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-pool.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-program.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-string.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmd_a-tree.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-bytecode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-codevect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-debug.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-input.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-iter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-map.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-pdarun.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-pool.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-program.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-string.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcolmp_a-tree.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-closure.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-codegen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-compiler.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-ctinput.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-declare.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-dotgen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-exports.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmattach.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmbase.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmcodegen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmexec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmgraph.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmmin.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-fsmstate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-lookup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-parsetree.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-pcheck.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-pdabuild.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-pdacodegen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-pdagraph.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-redbuild.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-redfsm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-resolve.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libprog_a-synthesis.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libcolmd_a-map.o: map.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-map.o -MD -MP -MF $(DEPDIR)/libcolmd_a-map.Tpo -c -o libcolmd_a-map.o `test -f 'map.c' || echo '$(srcdir)/'`map.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-map.Tpo $(DEPDIR)/libcolmd_a-map.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='map.c' object='libcolmd_a-map.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-map.o `test -f 'map.c' || echo '$(srcdir)/'`map.c
+
+libcolmd_a-map.obj: map.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-map.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-map.Tpo -c -o libcolmd_a-map.obj `if test -f 'map.c'; then $(CYGPATH_W) 'map.c'; else $(CYGPATH_W) '$(srcdir)/map.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-map.Tpo $(DEPDIR)/libcolmd_a-map.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='map.c' object='libcolmd_a-map.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-map.obj `if test -f 'map.c'; then $(CYGPATH_W) 'map.c'; else $(CYGPATH_W) '$(srcdir)/map.c'; fi`
+
+libcolmd_a-pdarun.o: pdarun.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-pdarun.o -MD -MP -MF $(DEPDIR)/libcolmd_a-pdarun.Tpo -c -o libcolmd_a-pdarun.o `test -f 'pdarun.c' || echo '$(srcdir)/'`pdarun.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-pdarun.Tpo $(DEPDIR)/libcolmd_a-pdarun.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdarun.c' object='libcolmd_a-pdarun.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-pdarun.o `test -f 'pdarun.c' || echo '$(srcdir)/'`pdarun.c
+
+libcolmd_a-pdarun.obj: pdarun.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-pdarun.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-pdarun.Tpo -c -o libcolmd_a-pdarun.obj `if test -f 'pdarun.c'; then $(CYGPATH_W) 'pdarun.c'; else $(CYGPATH_W) '$(srcdir)/pdarun.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-pdarun.Tpo $(DEPDIR)/libcolmd_a-pdarun.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdarun.c' object='libcolmd_a-pdarun.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-pdarun.obj `if test -f 'pdarun.c'; then $(CYGPATH_W) 'pdarun.c'; else $(CYGPATH_W) '$(srcdir)/pdarun.c'; fi`
+
+libcolmd_a-list.o: list.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-list.o -MD -MP -MF $(DEPDIR)/libcolmd_a-list.Tpo -c -o libcolmd_a-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-list.Tpo $(DEPDIR)/libcolmd_a-list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libcolmd_a-list.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+
+libcolmd_a-list.obj: list.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-list.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-list.Tpo -c -o libcolmd_a-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-list.Tpo $(DEPDIR)/libcolmd_a-list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libcolmd_a-list.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
+
+libcolmd_a-input.o: input.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-input.o -MD -MP -MF $(DEPDIR)/libcolmd_a-input.Tpo -c -o libcolmd_a-input.o `test -f 'input.c' || echo '$(srcdir)/'`input.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-input.Tpo $(DEPDIR)/libcolmd_a-input.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='input.c' object='libcolmd_a-input.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-input.o `test -f 'input.c' || echo '$(srcdir)/'`input.c
+
+libcolmd_a-input.obj: input.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-input.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-input.Tpo -c -o libcolmd_a-input.obj `if test -f 'input.c'; then $(CYGPATH_W) 'input.c'; else $(CYGPATH_W) '$(srcdir)/input.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-input.Tpo $(DEPDIR)/libcolmd_a-input.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='input.c' object='libcolmd_a-input.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-input.obj `if test -f 'input.c'; then $(CYGPATH_W) 'input.c'; else $(CYGPATH_W) '$(srcdir)/input.c'; fi`
+
+libcolmd_a-debug.o: debug.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-debug.o -MD -MP -MF $(DEPDIR)/libcolmd_a-debug.Tpo -c -o libcolmd_a-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-debug.Tpo $(DEPDIR)/libcolmd_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debug.c' object='libcolmd_a-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c
+
+libcolmd_a-debug.obj: debug.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-debug.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-debug.Tpo -c -o libcolmd_a-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-debug.Tpo $(DEPDIR)/libcolmd_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debug.c' object='libcolmd_a-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi`
+
+libcolmd_a-codevect.o: codevect.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-codevect.o -MD -MP -MF $(DEPDIR)/libcolmd_a-codevect.Tpo -c -o libcolmd_a-codevect.o `test -f 'codevect.c' || echo '$(srcdir)/'`codevect.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-codevect.Tpo $(DEPDIR)/libcolmd_a-codevect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codevect.c' object='libcolmd_a-codevect.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-codevect.o `test -f 'codevect.c' || echo '$(srcdir)/'`codevect.c
+
+libcolmd_a-codevect.obj: codevect.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-codevect.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-codevect.Tpo -c -o libcolmd_a-codevect.obj `if test -f 'codevect.c'; then $(CYGPATH_W) 'codevect.c'; else $(CYGPATH_W) '$(srcdir)/codevect.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-codevect.Tpo $(DEPDIR)/libcolmd_a-codevect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codevect.c' object='libcolmd_a-codevect.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-codevect.obj `if test -f 'codevect.c'; then $(CYGPATH_W) 'codevect.c'; else $(CYGPATH_W) '$(srcdir)/codevect.c'; fi`
+
+libcolmd_a-pool.o: pool.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-pool.o -MD -MP -MF $(DEPDIR)/libcolmd_a-pool.Tpo -c -o libcolmd_a-pool.o `test -f 'pool.c' || echo '$(srcdir)/'`pool.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-pool.Tpo $(DEPDIR)/libcolmd_a-pool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pool.c' object='libcolmd_a-pool.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-pool.o `test -f 'pool.c' || echo '$(srcdir)/'`pool.c
+
+libcolmd_a-pool.obj: pool.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-pool.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-pool.Tpo -c -o libcolmd_a-pool.obj `if test -f 'pool.c'; then $(CYGPATH_W) 'pool.c'; else $(CYGPATH_W) '$(srcdir)/pool.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-pool.Tpo $(DEPDIR)/libcolmd_a-pool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pool.c' object='libcolmd_a-pool.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-pool.obj `if test -f 'pool.c'; then $(CYGPATH_W) 'pool.c'; else $(CYGPATH_W) '$(srcdir)/pool.c'; fi`
+
+libcolmd_a-string.o: string.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-string.o -MD -MP -MF $(DEPDIR)/libcolmd_a-string.Tpo -c -o libcolmd_a-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-string.Tpo $(DEPDIR)/libcolmd_a-string.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='libcolmd_a-string.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c
+
+libcolmd_a-string.obj: string.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-string.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-string.Tpo -c -o libcolmd_a-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-string.Tpo $(DEPDIR)/libcolmd_a-string.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='libcolmd_a-string.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi`
+
+libcolmd_a-tree.o: tree.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-tree.o -MD -MP -MF $(DEPDIR)/libcolmd_a-tree.Tpo -c -o libcolmd_a-tree.o `test -f 'tree.c' || echo '$(srcdir)/'`tree.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-tree.Tpo $(DEPDIR)/libcolmd_a-tree.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tree.c' object='libcolmd_a-tree.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-tree.o `test -f 'tree.c' || echo '$(srcdir)/'`tree.c
+
+libcolmd_a-tree.obj: tree.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-tree.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-tree.Tpo -c -o libcolmd_a-tree.obj `if test -f 'tree.c'; then $(CYGPATH_W) 'tree.c'; else $(CYGPATH_W) '$(srcdir)/tree.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-tree.Tpo $(DEPDIR)/libcolmd_a-tree.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tree.c' object='libcolmd_a-tree.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-tree.obj `if test -f 'tree.c'; then $(CYGPATH_W) 'tree.c'; else $(CYGPATH_W) '$(srcdir)/tree.c'; fi`
+
+libcolmd_a-iter.o: iter.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-iter.o -MD -MP -MF $(DEPDIR)/libcolmd_a-iter.Tpo -c -o libcolmd_a-iter.o `test -f 'iter.c' || echo '$(srcdir)/'`iter.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-iter.Tpo $(DEPDIR)/libcolmd_a-iter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iter.c' object='libcolmd_a-iter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-iter.o `test -f 'iter.c' || echo '$(srcdir)/'`iter.c
+
+libcolmd_a-iter.obj: iter.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-iter.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-iter.Tpo -c -o libcolmd_a-iter.obj `if test -f 'iter.c'; then $(CYGPATH_W) 'iter.c'; else $(CYGPATH_W) '$(srcdir)/iter.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-iter.Tpo $(DEPDIR)/libcolmd_a-iter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iter.c' object='libcolmd_a-iter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-iter.obj `if test -f 'iter.c'; then $(CYGPATH_W) 'iter.c'; else $(CYGPATH_W) '$(srcdir)/iter.c'; fi`
+
+libcolmd_a-bytecode.o: bytecode.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-bytecode.o -MD -MP -MF $(DEPDIR)/libcolmd_a-bytecode.Tpo -c -o libcolmd_a-bytecode.o `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-bytecode.Tpo $(DEPDIR)/libcolmd_a-bytecode.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bytecode.c' object='libcolmd_a-bytecode.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-bytecode.o `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c
+
+libcolmd_a-bytecode.obj: bytecode.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-bytecode.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-bytecode.Tpo -c -o libcolmd_a-bytecode.obj `if test -f 'bytecode.c'; then $(CYGPATH_W) 'bytecode.c'; else $(CYGPATH_W) '$(srcdir)/bytecode.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-bytecode.Tpo $(DEPDIR)/libcolmd_a-bytecode.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bytecode.c' object='libcolmd_a-bytecode.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-bytecode.obj `if test -f 'bytecode.c'; then $(CYGPATH_W) 'bytecode.c'; else $(CYGPATH_W) '$(srcdir)/bytecode.c'; fi`
+
+libcolmd_a-program.o: program.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-program.o -MD -MP -MF $(DEPDIR)/libcolmd_a-program.Tpo -c -o libcolmd_a-program.o `test -f 'program.c' || echo '$(srcdir)/'`program.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-program.Tpo $(DEPDIR)/libcolmd_a-program.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='program.c' object='libcolmd_a-program.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-program.o `test -f 'program.c' || echo '$(srcdir)/'`program.c
+
+libcolmd_a-program.obj: program.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -MT libcolmd_a-program.obj -MD -MP -MF $(DEPDIR)/libcolmd_a-program.Tpo -c -o libcolmd_a-program.obj `if test -f 'program.c'; then $(CYGPATH_W) 'program.c'; else $(CYGPATH_W) '$(srcdir)/program.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmd_a-program.Tpo $(DEPDIR)/libcolmd_a-program.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='program.c' object='libcolmd_a-program.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmd_a_CFLAGS) $(CFLAGS) -c -o libcolmd_a-program.obj `if test -f 'program.c'; then $(CYGPATH_W) 'program.c'; else $(CYGPATH_W) '$(srcdir)/program.c'; fi`
+
+libcolmp_a-map.o: map.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-map.o -MD -MP -MF $(DEPDIR)/libcolmp_a-map.Tpo -c -o libcolmp_a-map.o `test -f 'map.c' || echo '$(srcdir)/'`map.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-map.Tpo $(DEPDIR)/libcolmp_a-map.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='map.c' object='libcolmp_a-map.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-map.o `test -f 'map.c' || echo '$(srcdir)/'`map.c
+
+libcolmp_a-map.obj: map.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-map.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-map.Tpo -c -o libcolmp_a-map.obj `if test -f 'map.c'; then $(CYGPATH_W) 'map.c'; else $(CYGPATH_W) '$(srcdir)/map.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-map.Tpo $(DEPDIR)/libcolmp_a-map.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='map.c' object='libcolmp_a-map.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-map.obj `if test -f 'map.c'; then $(CYGPATH_W) 'map.c'; else $(CYGPATH_W) '$(srcdir)/map.c'; fi`
+
+libcolmp_a-pdarun.o: pdarun.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-pdarun.o -MD -MP -MF $(DEPDIR)/libcolmp_a-pdarun.Tpo -c -o libcolmp_a-pdarun.o `test -f 'pdarun.c' || echo '$(srcdir)/'`pdarun.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-pdarun.Tpo $(DEPDIR)/libcolmp_a-pdarun.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdarun.c' object='libcolmp_a-pdarun.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-pdarun.o `test -f 'pdarun.c' || echo '$(srcdir)/'`pdarun.c
+
+libcolmp_a-pdarun.obj: pdarun.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-pdarun.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-pdarun.Tpo -c -o libcolmp_a-pdarun.obj `if test -f 'pdarun.c'; then $(CYGPATH_W) 'pdarun.c'; else $(CYGPATH_W) '$(srcdir)/pdarun.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-pdarun.Tpo $(DEPDIR)/libcolmp_a-pdarun.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pdarun.c' object='libcolmp_a-pdarun.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-pdarun.obj `if test -f 'pdarun.c'; then $(CYGPATH_W) 'pdarun.c'; else $(CYGPATH_W) '$(srcdir)/pdarun.c'; fi`
+
+libcolmp_a-list.o: list.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-list.o -MD -MP -MF $(DEPDIR)/libcolmp_a-list.Tpo -c -o libcolmp_a-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-list.Tpo $(DEPDIR)/libcolmp_a-list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libcolmp_a-list.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+
+libcolmp_a-list.obj: list.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-list.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-list.Tpo -c -o libcolmp_a-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-list.Tpo $(DEPDIR)/libcolmp_a-list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='libcolmp_a-list.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
+
+libcolmp_a-input.o: input.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-input.o -MD -MP -MF $(DEPDIR)/libcolmp_a-input.Tpo -c -o libcolmp_a-input.o `test -f 'input.c' || echo '$(srcdir)/'`input.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-input.Tpo $(DEPDIR)/libcolmp_a-input.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='input.c' object='libcolmp_a-input.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-input.o `test -f 'input.c' || echo '$(srcdir)/'`input.c
+
+libcolmp_a-input.obj: input.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-input.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-input.Tpo -c -o libcolmp_a-input.obj `if test -f 'input.c'; then $(CYGPATH_W) 'input.c'; else $(CYGPATH_W) '$(srcdir)/input.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-input.Tpo $(DEPDIR)/libcolmp_a-input.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='input.c' object='libcolmp_a-input.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-input.obj `if test -f 'input.c'; then $(CYGPATH_W) 'input.c'; else $(CYGPATH_W) '$(srcdir)/input.c'; fi`
+
+libcolmp_a-debug.o: debug.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-debug.o -MD -MP -MF $(DEPDIR)/libcolmp_a-debug.Tpo -c -o libcolmp_a-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-debug.Tpo $(DEPDIR)/libcolmp_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debug.c' object='libcolmp_a-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c
+
+libcolmp_a-debug.obj: debug.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-debug.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-debug.Tpo -c -o libcolmp_a-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-debug.Tpo $(DEPDIR)/libcolmp_a-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debug.c' object='libcolmp_a-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi`
+
+libcolmp_a-codevect.o: codevect.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-codevect.o -MD -MP -MF $(DEPDIR)/libcolmp_a-codevect.Tpo -c -o libcolmp_a-codevect.o `test -f 'codevect.c' || echo '$(srcdir)/'`codevect.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-codevect.Tpo $(DEPDIR)/libcolmp_a-codevect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codevect.c' object='libcolmp_a-codevect.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-codevect.o `test -f 'codevect.c' || echo '$(srcdir)/'`codevect.c
+
+libcolmp_a-codevect.obj: codevect.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-codevect.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-codevect.Tpo -c -o libcolmp_a-codevect.obj `if test -f 'codevect.c'; then $(CYGPATH_W) 'codevect.c'; else $(CYGPATH_W) '$(srcdir)/codevect.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-codevect.Tpo $(DEPDIR)/libcolmp_a-codevect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codevect.c' object='libcolmp_a-codevect.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-codevect.obj `if test -f 'codevect.c'; then $(CYGPATH_W) 'codevect.c'; else $(CYGPATH_W) '$(srcdir)/codevect.c'; fi`
+
+libcolmp_a-pool.o: pool.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-pool.o -MD -MP -MF $(DEPDIR)/libcolmp_a-pool.Tpo -c -o libcolmp_a-pool.o `test -f 'pool.c' || echo '$(srcdir)/'`pool.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-pool.Tpo $(DEPDIR)/libcolmp_a-pool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pool.c' object='libcolmp_a-pool.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-pool.o `test -f 'pool.c' || echo '$(srcdir)/'`pool.c
+
+libcolmp_a-pool.obj: pool.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-pool.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-pool.Tpo -c -o libcolmp_a-pool.obj `if test -f 'pool.c'; then $(CYGPATH_W) 'pool.c'; else $(CYGPATH_W) '$(srcdir)/pool.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-pool.Tpo $(DEPDIR)/libcolmp_a-pool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pool.c' object='libcolmp_a-pool.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-pool.obj `if test -f 'pool.c'; then $(CYGPATH_W) 'pool.c'; else $(CYGPATH_W) '$(srcdir)/pool.c'; fi`
+
+libcolmp_a-string.o: string.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-string.o -MD -MP -MF $(DEPDIR)/libcolmp_a-string.Tpo -c -o libcolmp_a-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-string.Tpo $(DEPDIR)/libcolmp_a-string.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='libcolmp_a-string.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c
+
+libcolmp_a-string.obj: string.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-string.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-string.Tpo -c -o libcolmp_a-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-string.Tpo $(DEPDIR)/libcolmp_a-string.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='string.c' object='libcolmp_a-string.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi`
+
+libcolmp_a-tree.o: tree.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-tree.o -MD -MP -MF $(DEPDIR)/libcolmp_a-tree.Tpo -c -o libcolmp_a-tree.o `test -f 'tree.c' || echo '$(srcdir)/'`tree.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-tree.Tpo $(DEPDIR)/libcolmp_a-tree.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tree.c' object='libcolmp_a-tree.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-tree.o `test -f 'tree.c' || echo '$(srcdir)/'`tree.c
+
+libcolmp_a-tree.obj: tree.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-tree.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-tree.Tpo -c -o libcolmp_a-tree.obj `if test -f 'tree.c'; then $(CYGPATH_W) 'tree.c'; else $(CYGPATH_W) '$(srcdir)/tree.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-tree.Tpo $(DEPDIR)/libcolmp_a-tree.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tree.c' object='libcolmp_a-tree.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-tree.obj `if test -f 'tree.c'; then $(CYGPATH_W) 'tree.c'; else $(CYGPATH_W) '$(srcdir)/tree.c'; fi`
+
+libcolmp_a-iter.o: iter.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-iter.o -MD -MP -MF $(DEPDIR)/libcolmp_a-iter.Tpo -c -o libcolmp_a-iter.o `test -f 'iter.c' || echo '$(srcdir)/'`iter.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-iter.Tpo $(DEPDIR)/libcolmp_a-iter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iter.c' object='libcolmp_a-iter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-iter.o `test -f 'iter.c' || echo '$(srcdir)/'`iter.c
+
+libcolmp_a-iter.obj: iter.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-iter.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-iter.Tpo -c -o libcolmp_a-iter.obj `if test -f 'iter.c'; then $(CYGPATH_W) 'iter.c'; else $(CYGPATH_W) '$(srcdir)/iter.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-iter.Tpo $(DEPDIR)/libcolmp_a-iter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='iter.c' object='libcolmp_a-iter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-iter.obj `if test -f 'iter.c'; then $(CYGPATH_W) 'iter.c'; else $(CYGPATH_W) '$(srcdir)/iter.c'; fi`
+
+libcolmp_a-bytecode.o: bytecode.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-bytecode.o -MD -MP -MF $(DEPDIR)/libcolmp_a-bytecode.Tpo -c -o libcolmp_a-bytecode.o `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-bytecode.Tpo $(DEPDIR)/libcolmp_a-bytecode.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bytecode.c' object='libcolmp_a-bytecode.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-bytecode.o `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c
+
+libcolmp_a-bytecode.obj: bytecode.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-bytecode.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-bytecode.Tpo -c -o libcolmp_a-bytecode.obj `if test -f 'bytecode.c'; then $(CYGPATH_W) 'bytecode.c'; else $(CYGPATH_W) '$(srcdir)/bytecode.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-bytecode.Tpo $(DEPDIR)/libcolmp_a-bytecode.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bytecode.c' object='libcolmp_a-bytecode.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-bytecode.obj `if test -f 'bytecode.c'; then $(CYGPATH_W) 'bytecode.c'; else $(CYGPATH_W) '$(srcdir)/bytecode.c'; fi`
+
+libcolmp_a-program.o: program.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-program.o -MD -MP -MF $(DEPDIR)/libcolmp_a-program.Tpo -c -o libcolmp_a-program.o `test -f 'program.c' || echo '$(srcdir)/'`program.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-program.Tpo $(DEPDIR)/libcolmp_a-program.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='program.c' object='libcolmp_a-program.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-program.o `test -f 'program.c' || echo '$(srcdir)/'`program.c
+
+libcolmp_a-program.obj: program.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -MT libcolmp_a-program.obj -MD -MP -MF $(DEPDIR)/libcolmp_a-program.Tpo -c -o libcolmp_a-program.obj `if test -f 'program.c'; then $(CYGPATH_W) 'program.c'; else $(CYGPATH_W) '$(srcdir)/program.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcolmp_a-program.Tpo $(DEPDIR)/libcolmp_a-program.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='program.c' object='libcolmp_a-program.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcolmp_a_CFLAGS) $(CFLAGS) -c -o libcolmp_a-program.obj `if test -f 'program.c'; then $(CYGPATH_W) 'program.c'; else $(CYGPATH_W) '$(srcdir)/program.c'; fi`
+
+bootstrap1-parse1.o: parse1.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CFLAGS) $(CFLAGS) -MT bootstrap1-parse1.o -MD -MP -MF $(DEPDIR)/bootstrap1-parse1.Tpo -c -o bootstrap1-parse1.o `test -f 'parse1.c' || echo '$(srcdir)/'`parse1.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-parse1.Tpo $(DEPDIR)/bootstrap1-parse1.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse1.c' object='bootstrap1-parse1.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CFLAGS) $(CFLAGS) -c -o bootstrap1-parse1.o `test -f 'parse1.c' || echo '$(srcdir)/'`parse1.c
+
+bootstrap1-parse1.obj: parse1.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CFLAGS) $(CFLAGS) -MT bootstrap1-parse1.obj -MD -MP -MF $(DEPDIR)/bootstrap1-parse1.Tpo -c -o bootstrap1-parse1.obj `if test -f 'parse1.c'; then $(CYGPATH_W) 'parse1.c'; else $(CYGPATH_W) '$(srcdir)/parse1.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-parse1.Tpo $(DEPDIR)/bootstrap1-parse1.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse1.c' object='bootstrap1-parse1.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CFLAGS) $(CFLAGS) -c -o bootstrap1-parse1.obj `if test -f 'parse1.c'; then $(CYGPATH_W) 'parse1.c'; else $(CYGPATH_W) '$(srcdir)/parse1.c'; fi`
+
+colm-parse2.o: parse2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CFLAGS) $(CFLAGS) -MT colm-parse2.o -MD -MP -MF $(DEPDIR)/colm-parse2.Tpo -c -o colm-parse2.o `test -f 'parse2.c' || echo '$(srcdir)/'`parse2.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/colm-parse2.Tpo $(DEPDIR)/colm-parse2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse2.c' object='colm-parse2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CFLAGS) $(CFLAGS) -c -o colm-parse2.o `test -f 'parse2.c' || echo '$(srcdir)/'`parse2.c
+
+colm-parse2.obj: parse2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CFLAGS) $(CFLAGS) -MT colm-parse2.obj -MD -MP -MF $(DEPDIR)/colm-parse2.Tpo -c -o colm-parse2.obj `if test -f 'parse2.c'; then $(CYGPATH_W) 'parse2.c'; else $(CYGPATH_W) '$(srcdir)/parse2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/colm-parse2.Tpo $(DEPDIR)/colm-parse2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse2.c' object='colm-parse2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CFLAGS) $(CFLAGS) -c -o colm-parse2.obj `if test -f 'parse2.c'; then $(CYGPATH_W) 'parse2.c'; else $(CYGPATH_W) '$(srcdir)/parse2.c'; fi`
+
+.cc.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+libprog_a-resolve.o: resolve.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-resolve.o -MD -MP -MF $(DEPDIR)/libprog_a-resolve.Tpo -c -o libprog_a-resolve.o `test -f 'resolve.cc' || echo '$(srcdir)/'`resolve.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-resolve.Tpo $(DEPDIR)/libprog_a-resolve.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='resolve.cc' object='libprog_a-resolve.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-resolve.o `test -f 'resolve.cc' || echo '$(srcdir)/'`resolve.cc
+
+libprog_a-resolve.obj: resolve.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-resolve.obj -MD -MP -MF $(DEPDIR)/libprog_a-resolve.Tpo -c -o libprog_a-resolve.obj `if test -f 'resolve.cc'; then $(CYGPATH_W) 'resolve.cc'; else $(CYGPATH_W) '$(srcdir)/resolve.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-resolve.Tpo $(DEPDIR)/libprog_a-resolve.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='resolve.cc' object='libprog_a-resolve.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-resolve.obj `if test -f 'resolve.cc'; then $(CYGPATH_W) 'resolve.cc'; else $(CYGPATH_W) '$(srcdir)/resolve.cc'; fi`
+
+libprog_a-lookup.o: lookup.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-lookup.o -MD -MP -MF $(DEPDIR)/libprog_a-lookup.Tpo -c -o libprog_a-lookup.o `test -f 'lookup.cc' || echo '$(srcdir)/'`lookup.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-lookup.Tpo $(DEPDIR)/libprog_a-lookup.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lookup.cc' object='libprog_a-lookup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-lookup.o `test -f 'lookup.cc' || echo '$(srcdir)/'`lookup.cc
+
+libprog_a-lookup.obj: lookup.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-lookup.obj -MD -MP -MF $(DEPDIR)/libprog_a-lookup.Tpo -c -o libprog_a-lookup.obj `if test -f 'lookup.cc'; then $(CYGPATH_W) 'lookup.cc'; else $(CYGPATH_W) '$(srcdir)/lookup.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-lookup.Tpo $(DEPDIR)/libprog_a-lookup.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lookup.cc' object='libprog_a-lookup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-lookup.obj `if test -f 'lookup.cc'; then $(CYGPATH_W) 'lookup.cc'; else $(CYGPATH_W) '$(srcdir)/lookup.cc'; fi`
+
+libprog_a-synthesis.o: synthesis.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-synthesis.o -MD -MP -MF $(DEPDIR)/libprog_a-synthesis.Tpo -c -o libprog_a-synthesis.o `test -f 'synthesis.cc' || echo '$(srcdir)/'`synthesis.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-synthesis.Tpo $(DEPDIR)/libprog_a-synthesis.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='synthesis.cc' object='libprog_a-synthesis.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-synthesis.o `test -f 'synthesis.cc' || echo '$(srcdir)/'`synthesis.cc
+
+libprog_a-synthesis.obj: synthesis.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-synthesis.obj -MD -MP -MF $(DEPDIR)/libprog_a-synthesis.Tpo -c -o libprog_a-synthesis.obj `if test -f 'synthesis.cc'; then $(CYGPATH_W) 'synthesis.cc'; else $(CYGPATH_W) '$(srcdir)/synthesis.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-synthesis.Tpo $(DEPDIR)/libprog_a-synthesis.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='synthesis.cc' object='libprog_a-synthesis.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-synthesis.obj `if test -f 'synthesis.cc'; then $(CYGPATH_W) 'synthesis.cc'; else $(CYGPATH_W) '$(srcdir)/synthesis.cc'; fi`
+
+libprog_a-parsetree.o: parsetree.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-parsetree.o -MD -MP -MF $(DEPDIR)/libprog_a-parsetree.Tpo -c -o libprog_a-parsetree.o `test -f 'parsetree.cc' || echo '$(srcdir)/'`parsetree.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-parsetree.Tpo $(DEPDIR)/libprog_a-parsetree.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parsetree.cc' object='libprog_a-parsetree.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-parsetree.o `test -f 'parsetree.cc' || echo '$(srcdir)/'`parsetree.cc
+
+libprog_a-parsetree.obj: parsetree.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-parsetree.obj -MD -MP -MF $(DEPDIR)/libprog_a-parsetree.Tpo -c -o libprog_a-parsetree.obj `if test -f 'parsetree.cc'; then $(CYGPATH_W) 'parsetree.cc'; else $(CYGPATH_W) '$(srcdir)/parsetree.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-parsetree.Tpo $(DEPDIR)/libprog_a-parsetree.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parsetree.cc' object='libprog_a-parsetree.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-parsetree.obj `if test -f 'parsetree.cc'; then $(CYGPATH_W) 'parsetree.cc'; else $(CYGPATH_W) '$(srcdir)/parsetree.cc'; fi`
+
+libprog_a-fsmstate.o: fsmstate.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmstate.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmstate.Tpo -c -o libprog_a-fsmstate.o `test -f 'fsmstate.cc' || echo '$(srcdir)/'`fsmstate.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmstate.Tpo $(DEPDIR)/libprog_a-fsmstate.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmstate.cc' object='libprog_a-fsmstate.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmstate.o `test -f 'fsmstate.cc' || echo '$(srcdir)/'`fsmstate.cc
+
+libprog_a-fsmstate.obj: fsmstate.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmstate.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmstate.Tpo -c -o libprog_a-fsmstate.obj `if test -f 'fsmstate.cc'; then $(CYGPATH_W) 'fsmstate.cc'; else $(CYGPATH_W) '$(srcdir)/fsmstate.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmstate.Tpo $(DEPDIR)/libprog_a-fsmstate.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmstate.cc' object='libprog_a-fsmstate.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmstate.obj `if test -f 'fsmstate.cc'; then $(CYGPATH_W) 'fsmstate.cc'; else $(CYGPATH_W) '$(srcdir)/fsmstate.cc'; fi`
+
+libprog_a-fsmbase.o: fsmbase.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmbase.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmbase.Tpo -c -o libprog_a-fsmbase.o `test -f 'fsmbase.cc' || echo '$(srcdir)/'`fsmbase.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmbase.Tpo $(DEPDIR)/libprog_a-fsmbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmbase.cc' object='libprog_a-fsmbase.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmbase.o `test -f 'fsmbase.cc' || echo '$(srcdir)/'`fsmbase.cc
+
+libprog_a-fsmbase.obj: fsmbase.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmbase.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmbase.Tpo -c -o libprog_a-fsmbase.obj `if test -f 'fsmbase.cc'; then $(CYGPATH_W) 'fsmbase.cc'; else $(CYGPATH_W) '$(srcdir)/fsmbase.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmbase.Tpo $(DEPDIR)/libprog_a-fsmbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmbase.cc' object='libprog_a-fsmbase.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmbase.obj `if test -f 'fsmbase.cc'; then $(CYGPATH_W) 'fsmbase.cc'; else $(CYGPATH_W) '$(srcdir)/fsmbase.cc'; fi`
+
+libprog_a-fsmattach.o: fsmattach.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmattach.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmattach.Tpo -c -o libprog_a-fsmattach.o `test -f 'fsmattach.cc' || echo '$(srcdir)/'`fsmattach.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmattach.Tpo $(DEPDIR)/libprog_a-fsmattach.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmattach.cc' object='libprog_a-fsmattach.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmattach.o `test -f 'fsmattach.cc' || echo '$(srcdir)/'`fsmattach.cc
+
+libprog_a-fsmattach.obj: fsmattach.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmattach.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmattach.Tpo -c -o libprog_a-fsmattach.obj `if test -f 'fsmattach.cc'; then $(CYGPATH_W) 'fsmattach.cc'; else $(CYGPATH_W) '$(srcdir)/fsmattach.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmattach.Tpo $(DEPDIR)/libprog_a-fsmattach.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmattach.cc' object='libprog_a-fsmattach.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmattach.obj `if test -f 'fsmattach.cc'; then $(CYGPATH_W) 'fsmattach.cc'; else $(CYGPATH_W) '$(srcdir)/fsmattach.cc'; fi`
+
+libprog_a-fsmmin.o: fsmmin.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmmin.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmmin.Tpo -c -o libprog_a-fsmmin.o `test -f 'fsmmin.cc' || echo '$(srcdir)/'`fsmmin.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmmin.Tpo $(DEPDIR)/libprog_a-fsmmin.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmmin.cc' object='libprog_a-fsmmin.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmmin.o `test -f 'fsmmin.cc' || echo '$(srcdir)/'`fsmmin.cc
+
+libprog_a-fsmmin.obj: fsmmin.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmmin.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmmin.Tpo -c -o libprog_a-fsmmin.obj `if test -f 'fsmmin.cc'; then $(CYGPATH_W) 'fsmmin.cc'; else $(CYGPATH_W) '$(srcdir)/fsmmin.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmmin.Tpo $(DEPDIR)/libprog_a-fsmmin.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmmin.cc' object='libprog_a-fsmmin.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmmin.obj `if test -f 'fsmmin.cc'; then $(CYGPATH_W) 'fsmmin.cc'; else $(CYGPATH_W) '$(srcdir)/fsmmin.cc'; fi`
+
+libprog_a-fsmgraph.o: fsmgraph.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmgraph.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmgraph.Tpo -c -o libprog_a-fsmgraph.o `test -f 'fsmgraph.cc' || echo '$(srcdir)/'`fsmgraph.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmgraph.Tpo $(DEPDIR)/libprog_a-fsmgraph.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmgraph.cc' object='libprog_a-fsmgraph.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmgraph.o `test -f 'fsmgraph.cc' || echo '$(srcdir)/'`fsmgraph.cc
+
+libprog_a-fsmgraph.obj: fsmgraph.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmgraph.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmgraph.Tpo -c -o libprog_a-fsmgraph.obj `if test -f 'fsmgraph.cc'; then $(CYGPATH_W) 'fsmgraph.cc'; else $(CYGPATH_W) '$(srcdir)/fsmgraph.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmgraph.Tpo $(DEPDIR)/libprog_a-fsmgraph.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmgraph.cc' object='libprog_a-fsmgraph.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmgraph.obj `if test -f 'fsmgraph.cc'; then $(CYGPATH_W) 'fsmgraph.cc'; else $(CYGPATH_W) '$(srcdir)/fsmgraph.cc'; fi`
+
+libprog_a-pdagraph.o: pdagraph.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdagraph.o -MD -MP -MF $(DEPDIR)/libprog_a-pdagraph.Tpo -c -o libprog_a-pdagraph.o `test -f 'pdagraph.cc' || echo '$(srcdir)/'`pdagraph.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdagraph.Tpo $(DEPDIR)/libprog_a-pdagraph.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdagraph.cc' object='libprog_a-pdagraph.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdagraph.o `test -f 'pdagraph.cc' || echo '$(srcdir)/'`pdagraph.cc
+
+libprog_a-pdagraph.obj: pdagraph.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdagraph.obj -MD -MP -MF $(DEPDIR)/libprog_a-pdagraph.Tpo -c -o libprog_a-pdagraph.obj `if test -f 'pdagraph.cc'; then $(CYGPATH_W) 'pdagraph.cc'; else $(CYGPATH_W) '$(srcdir)/pdagraph.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdagraph.Tpo $(DEPDIR)/libprog_a-pdagraph.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdagraph.cc' object='libprog_a-pdagraph.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdagraph.obj `if test -f 'pdagraph.cc'; then $(CYGPATH_W) 'pdagraph.cc'; else $(CYGPATH_W) '$(srcdir)/pdagraph.cc'; fi`
+
+libprog_a-pdabuild.o: pdabuild.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdabuild.o -MD -MP -MF $(DEPDIR)/libprog_a-pdabuild.Tpo -c -o libprog_a-pdabuild.o `test -f 'pdabuild.cc' || echo '$(srcdir)/'`pdabuild.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdabuild.Tpo $(DEPDIR)/libprog_a-pdabuild.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdabuild.cc' object='libprog_a-pdabuild.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdabuild.o `test -f 'pdabuild.cc' || echo '$(srcdir)/'`pdabuild.cc
+
+libprog_a-pdabuild.obj: pdabuild.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdabuild.obj -MD -MP -MF $(DEPDIR)/libprog_a-pdabuild.Tpo -c -o libprog_a-pdabuild.obj `if test -f 'pdabuild.cc'; then $(CYGPATH_W) 'pdabuild.cc'; else $(CYGPATH_W) '$(srcdir)/pdabuild.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdabuild.Tpo $(DEPDIR)/libprog_a-pdabuild.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdabuild.cc' object='libprog_a-pdabuild.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdabuild.obj `if test -f 'pdabuild.cc'; then $(CYGPATH_W) 'pdabuild.cc'; else $(CYGPATH_W) '$(srcdir)/pdabuild.cc'; fi`
+
+libprog_a-pdacodegen.o: pdacodegen.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdacodegen.o -MD -MP -MF $(DEPDIR)/libprog_a-pdacodegen.Tpo -c -o libprog_a-pdacodegen.o `test -f 'pdacodegen.cc' || echo '$(srcdir)/'`pdacodegen.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdacodegen.Tpo $(DEPDIR)/libprog_a-pdacodegen.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdacodegen.cc' object='libprog_a-pdacodegen.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdacodegen.o `test -f 'pdacodegen.cc' || echo '$(srcdir)/'`pdacodegen.cc
+
+libprog_a-pdacodegen.obj: pdacodegen.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pdacodegen.obj -MD -MP -MF $(DEPDIR)/libprog_a-pdacodegen.Tpo -c -o libprog_a-pdacodegen.obj `if test -f 'pdacodegen.cc'; then $(CYGPATH_W) 'pdacodegen.cc'; else $(CYGPATH_W) '$(srcdir)/pdacodegen.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pdacodegen.Tpo $(DEPDIR)/libprog_a-pdacodegen.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pdacodegen.cc' object='libprog_a-pdacodegen.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pdacodegen.obj `if test -f 'pdacodegen.cc'; then $(CYGPATH_W) 'pdacodegen.cc'; else $(CYGPATH_W) '$(srcdir)/pdacodegen.cc'; fi`
+
+libprog_a-fsmcodegen.o: fsmcodegen.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmcodegen.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmcodegen.Tpo -c -o libprog_a-fsmcodegen.o `test -f 'fsmcodegen.cc' || echo '$(srcdir)/'`fsmcodegen.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmcodegen.Tpo $(DEPDIR)/libprog_a-fsmcodegen.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmcodegen.cc' object='libprog_a-fsmcodegen.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmcodegen.o `test -f 'fsmcodegen.cc' || echo '$(srcdir)/'`fsmcodegen.cc
+
+libprog_a-fsmcodegen.obj: fsmcodegen.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmcodegen.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmcodegen.Tpo -c -o libprog_a-fsmcodegen.obj `if test -f 'fsmcodegen.cc'; then $(CYGPATH_W) 'fsmcodegen.cc'; else $(CYGPATH_W) '$(srcdir)/fsmcodegen.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmcodegen.Tpo $(DEPDIR)/libprog_a-fsmcodegen.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmcodegen.cc' object='libprog_a-fsmcodegen.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmcodegen.obj `if test -f 'fsmcodegen.cc'; then $(CYGPATH_W) 'fsmcodegen.cc'; else $(CYGPATH_W) '$(srcdir)/fsmcodegen.cc'; fi`
+
+libprog_a-redfsm.o: redfsm.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-redfsm.o -MD -MP -MF $(DEPDIR)/libprog_a-redfsm.Tpo -c -o libprog_a-redfsm.o `test -f 'redfsm.cc' || echo '$(srcdir)/'`redfsm.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-redfsm.Tpo $(DEPDIR)/libprog_a-redfsm.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redfsm.cc' object='libprog_a-redfsm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-redfsm.o `test -f 'redfsm.cc' || echo '$(srcdir)/'`redfsm.cc
+
+libprog_a-redfsm.obj: redfsm.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-redfsm.obj -MD -MP -MF $(DEPDIR)/libprog_a-redfsm.Tpo -c -o libprog_a-redfsm.obj `if test -f 'redfsm.cc'; then $(CYGPATH_W) 'redfsm.cc'; else $(CYGPATH_W) '$(srcdir)/redfsm.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-redfsm.Tpo $(DEPDIR)/libprog_a-redfsm.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redfsm.cc' object='libprog_a-redfsm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-redfsm.obj `if test -f 'redfsm.cc'; then $(CYGPATH_W) 'redfsm.cc'; else $(CYGPATH_W) '$(srcdir)/redfsm.cc'; fi`
+
+libprog_a-fsmexec.o: fsmexec.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmexec.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmexec.Tpo -c -o libprog_a-fsmexec.o `test -f 'fsmexec.cc' || echo '$(srcdir)/'`fsmexec.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmexec.Tpo $(DEPDIR)/libprog_a-fsmexec.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmexec.cc' object='libprog_a-fsmexec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmexec.o `test -f 'fsmexec.cc' || echo '$(srcdir)/'`fsmexec.cc
+
+libprog_a-fsmexec.obj: fsmexec.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmexec.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmexec.Tpo -c -o libprog_a-fsmexec.obj `if test -f 'fsmexec.cc'; then $(CYGPATH_W) 'fsmexec.cc'; else $(CYGPATH_W) '$(srcdir)/fsmexec.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmexec.Tpo $(DEPDIR)/libprog_a-fsmexec.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmexec.cc' object='libprog_a-fsmexec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmexec.obj `if test -f 'fsmexec.cc'; then $(CYGPATH_W) 'fsmexec.cc'; else $(CYGPATH_W) '$(srcdir)/fsmexec.cc'; fi`
+
+libprog_a-redbuild.o: redbuild.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-redbuild.o -MD -MP -MF $(DEPDIR)/libprog_a-redbuild.Tpo -c -o libprog_a-redbuild.o `test -f 'redbuild.cc' || echo '$(srcdir)/'`redbuild.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-redbuild.Tpo $(DEPDIR)/libprog_a-redbuild.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redbuild.cc' object='libprog_a-redbuild.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-redbuild.o `test -f 'redbuild.cc' || echo '$(srcdir)/'`redbuild.cc
+
+libprog_a-redbuild.obj: redbuild.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-redbuild.obj -MD -MP -MF $(DEPDIR)/libprog_a-redbuild.Tpo -c -o libprog_a-redbuild.obj `if test -f 'redbuild.cc'; then $(CYGPATH_W) 'redbuild.cc'; else $(CYGPATH_W) '$(srcdir)/redbuild.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-redbuild.Tpo $(DEPDIR)/libprog_a-redbuild.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='redbuild.cc' object='libprog_a-redbuild.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-redbuild.obj `if test -f 'redbuild.cc'; then $(CYGPATH_W) 'redbuild.cc'; else $(CYGPATH_W) '$(srcdir)/redbuild.cc'; fi`
+
+libprog_a-closure.o: closure.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-closure.o -MD -MP -MF $(DEPDIR)/libprog_a-closure.Tpo -c -o libprog_a-closure.o `test -f 'closure.cc' || echo '$(srcdir)/'`closure.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-closure.Tpo $(DEPDIR)/libprog_a-closure.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='closure.cc' object='libprog_a-closure.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-closure.o `test -f 'closure.cc' || echo '$(srcdir)/'`closure.cc
+
+libprog_a-closure.obj: closure.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-closure.obj -MD -MP -MF $(DEPDIR)/libprog_a-closure.Tpo -c -o libprog_a-closure.obj `if test -f 'closure.cc'; then $(CYGPATH_W) 'closure.cc'; else $(CYGPATH_W) '$(srcdir)/closure.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-closure.Tpo $(DEPDIR)/libprog_a-closure.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='closure.cc' object='libprog_a-closure.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-closure.obj `if test -f 'closure.cc'; then $(CYGPATH_W) 'closure.cc'; else $(CYGPATH_W) '$(srcdir)/closure.cc'; fi`
+
+libprog_a-fsmap.o: fsmap.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmap.o -MD -MP -MF $(DEPDIR)/libprog_a-fsmap.Tpo -c -o libprog_a-fsmap.o `test -f 'fsmap.cc' || echo '$(srcdir)/'`fsmap.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmap.Tpo $(DEPDIR)/libprog_a-fsmap.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmap.cc' object='libprog_a-fsmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmap.o `test -f 'fsmap.cc' || echo '$(srcdir)/'`fsmap.cc
+
+libprog_a-fsmap.obj: fsmap.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-fsmap.obj -MD -MP -MF $(DEPDIR)/libprog_a-fsmap.Tpo -c -o libprog_a-fsmap.obj `if test -f 'fsmap.cc'; then $(CYGPATH_W) 'fsmap.cc'; else $(CYGPATH_W) '$(srcdir)/fsmap.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-fsmap.Tpo $(DEPDIR)/libprog_a-fsmap.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fsmap.cc' object='libprog_a-fsmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-fsmap.obj `if test -f 'fsmap.cc'; then $(CYGPATH_W) 'fsmap.cc'; else $(CYGPATH_W) '$(srcdir)/fsmap.cc'; fi`
+
+libprog_a-dotgen.o: dotgen.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-dotgen.o -MD -MP -MF $(DEPDIR)/libprog_a-dotgen.Tpo -c -o libprog_a-dotgen.o `test -f 'dotgen.cc' || echo '$(srcdir)/'`dotgen.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-dotgen.Tpo $(DEPDIR)/libprog_a-dotgen.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dotgen.cc' object='libprog_a-dotgen.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-dotgen.o `test -f 'dotgen.cc' || echo '$(srcdir)/'`dotgen.cc
+
+libprog_a-dotgen.obj: dotgen.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-dotgen.obj -MD -MP -MF $(DEPDIR)/libprog_a-dotgen.Tpo -c -o libprog_a-dotgen.obj `if test -f 'dotgen.cc'; then $(CYGPATH_W) 'dotgen.cc'; else $(CYGPATH_W) '$(srcdir)/dotgen.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-dotgen.Tpo $(DEPDIR)/libprog_a-dotgen.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dotgen.cc' object='libprog_a-dotgen.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-dotgen.obj `if test -f 'dotgen.cc'; then $(CYGPATH_W) 'dotgen.cc'; else $(CYGPATH_W) '$(srcdir)/dotgen.cc'; fi`
+
+libprog_a-pcheck.o: pcheck.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pcheck.o -MD -MP -MF $(DEPDIR)/libprog_a-pcheck.Tpo -c -o libprog_a-pcheck.o `test -f 'pcheck.cc' || echo '$(srcdir)/'`pcheck.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pcheck.Tpo $(DEPDIR)/libprog_a-pcheck.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pcheck.cc' object='libprog_a-pcheck.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pcheck.o `test -f 'pcheck.cc' || echo '$(srcdir)/'`pcheck.cc
+
+libprog_a-pcheck.obj: pcheck.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-pcheck.obj -MD -MP -MF $(DEPDIR)/libprog_a-pcheck.Tpo -c -o libprog_a-pcheck.obj `if test -f 'pcheck.cc'; then $(CYGPATH_W) 'pcheck.cc'; else $(CYGPATH_W) '$(srcdir)/pcheck.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-pcheck.Tpo $(DEPDIR)/libprog_a-pcheck.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pcheck.cc' object='libprog_a-pcheck.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-pcheck.obj `if test -f 'pcheck.cc'; then $(CYGPATH_W) 'pcheck.cc'; else $(CYGPATH_W) '$(srcdir)/pcheck.cc'; fi`
+
+libprog_a-ctinput.o: ctinput.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-ctinput.o -MD -MP -MF $(DEPDIR)/libprog_a-ctinput.Tpo -c -o libprog_a-ctinput.o `test -f 'ctinput.cc' || echo '$(srcdir)/'`ctinput.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-ctinput.Tpo $(DEPDIR)/libprog_a-ctinput.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ctinput.cc' object='libprog_a-ctinput.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-ctinput.o `test -f 'ctinput.cc' || echo '$(srcdir)/'`ctinput.cc
+
+libprog_a-ctinput.obj: ctinput.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-ctinput.obj -MD -MP -MF $(DEPDIR)/libprog_a-ctinput.Tpo -c -o libprog_a-ctinput.obj `if test -f 'ctinput.cc'; then $(CYGPATH_W) 'ctinput.cc'; else $(CYGPATH_W) '$(srcdir)/ctinput.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-ctinput.Tpo $(DEPDIR)/libprog_a-ctinput.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ctinput.cc' object='libprog_a-ctinput.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-ctinput.obj `if test -f 'ctinput.cc'; then $(CYGPATH_W) 'ctinput.cc'; else $(CYGPATH_W) '$(srcdir)/ctinput.cc'; fi`
+
+libprog_a-declare.o: declare.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-declare.o -MD -MP -MF $(DEPDIR)/libprog_a-declare.Tpo -c -o libprog_a-declare.o `test -f 'declare.cc' || echo '$(srcdir)/'`declare.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-declare.Tpo $(DEPDIR)/libprog_a-declare.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='declare.cc' object='libprog_a-declare.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-declare.o `test -f 'declare.cc' || echo '$(srcdir)/'`declare.cc
+
+libprog_a-declare.obj: declare.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-declare.obj -MD -MP -MF $(DEPDIR)/libprog_a-declare.Tpo -c -o libprog_a-declare.obj `if test -f 'declare.cc'; then $(CYGPATH_W) 'declare.cc'; else $(CYGPATH_W) '$(srcdir)/declare.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-declare.Tpo $(DEPDIR)/libprog_a-declare.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='declare.cc' object='libprog_a-declare.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-declare.obj `if test -f 'declare.cc'; then $(CYGPATH_W) 'declare.cc'; else $(CYGPATH_W) '$(srcdir)/declare.cc'; fi`
+
+libprog_a-codegen.o: codegen.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-codegen.o -MD -MP -MF $(DEPDIR)/libprog_a-codegen.Tpo -c -o libprog_a-codegen.o `test -f 'codegen.cc' || echo '$(srcdir)/'`codegen.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-codegen.Tpo $(DEPDIR)/libprog_a-codegen.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='codegen.cc' object='libprog_a-codegen.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-codegen.o `test -f 'codegen.cc' || echo '$(srcdir)/'`codegen.cc
+
+libprog_a-codegen.obj: codegen.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-codegen.obj -MD -MP -MF $(DEPDIR)/libprog_a-codegen.Tpo -c -o libprog_a-codegen.obj `if test -f 'codegen.cc'; then $(CYGPATH_W) 'codegen.cc'; else $(CYGPATH_W) '$(srcdir)/codegen.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-codegen.Tpo $(DEPDIR)/libprog_a-codegen.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='codegen.cc' object='libprog_a-codegen.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-codegen.obj `if test -f 'codegen.cc'; then $(CYGPATH_W) 'codegen.cc'; else $(CYGPATH_W) '$(srcdir)/codegen.cc'; fi`
+
+libprog_a-exports.o: exports.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-exports.o -MD -MP -MF $(DEPDIR)/libprog_a-exports.Tpo -c -o libprog_a-exports.o `test -f 'exports.cc' || echo '$(srcdir)/'`exports.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-exports.Tpo $(DEPDIR)/libprog_a-exports.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='exports.cc' object='libprog_a-exports.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-exports.o `test -f 'exports.cc' || echo '$(srcdir)/'`exports.cc
+
+libprog_a-exports.obj: exports.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-exports.obj -MD -MP -MF $(DEPDIR)/libprog_a-exports.Tpo -c -o libprog_a-exports.obj `if test -f 'exports.cc'; then $(CYGPATH_W) 'exports.cc'; else $(CYGPATH_W) '$(srcdir)/exports.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-exports.Tpo $(DEPDIR)/libprog_a-exports.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='exports.cc' object='libprog_a-exports.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-exports.obj `if test -f 'exports.cc'; then $(CYGPATH_W) 'exports.cc'; else $(CYGPATH_W) '$(srcdir)/exports.cc'; fi`
+
+libprog_a-compiler.o: compiler.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-compiler.o -MD -MP -MF $(DEPDIR)/libprog_a-compiler.Tpo -c -o libprog_a-compiler.o `test -f 'compiler.cc' || echo '$(srcdir)/'`compiler.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-compiler.Tpo $(DEPDIR)/libprog_a-compiler.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='compiler.cc' object='libprog_a-compiler.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-compiler.o `test -f 'compiler.cc' || echo '$(srcdir)/'`compiler.cc
+
+libprog_a-compiler.obj: compiler.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-compiler.obj -MD -MP -MF $(DEPDIR)/libprog_a-compiler.Tpo -c -o libprog_a-compiler.obj `if test -f 'compiler.cc'; then $(CYGPATH_W) 'compiler.cc'; else $(CYGPATH_W) '$(srcdir)/compiler.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-compiler.Tpo $(DEPDIR)/libprog_a-compiler.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='compiler.cc' object='libprog_a-compiler.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-compiler.obj `if test -f 'compiler.cc'; then $(CYGPATH_W) 'compiler.cc'; else $(CYGPATH_W) '$(srcdir)/compiler.cc'; fi`
+
+libprog_a-parser.o: parser.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-parser.o -MD -MP -MF $(DEPDIR)/libprog_a-parser.Tpo -c -o libprog_a-parser.o `test -f 'parser.cc' || echo '$(srcdir)/'`parser.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-parser.Tpo $(DEPDIR)/libprog_a-parser.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parser.cc' object='libprog_a-parser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-parser.o `test -f 'parser.cc' || echo '$(srcdir)/'`parser.cc
+
+libprog_a-parser.obj: parser.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -MT libprog_a-parser.obj -MD -MP -MF $(DEPDIR)/libprog_a-parser.Tpo -c -o libprog_a-parser.obj `if test -f 'parser.cc'; then $(CYGPATH_W) 'parser.cc'; else $(CYGPATH_W) '$(srcdir)/parser.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libprog_a-parser.Tpo $(DEPDIR)/libprog_a-parser.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='parser.cc' object='libprog_a-parser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprog_a_CXXFLAGS) $(CXXFLAGS) -c -o libprog_a-parser.obj `if test -f 'parser.cc'; then $(CYGPATH_W) 'parser.cc'; else $(CYGPATH_W) '$(srcdir)/parser.cc'; fi`
+
+bootstrap0-consinit.o: consinit.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -MT bootstrap0-consinit.o -MD -MP -MF $(DEPDIR)/bootstrap0-consinit.Tpo -c -o bootstrap0-consinit.o `test -f 'consinit.cc' || echo '$(srcdir)/'`consinit.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap0-consinit.Tpo $(DEPDIR)/bootstrap0-consinit.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='consinit.cc' object='bootstrap0-consinit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap0-consinit.o `test -f 'consinit.cc' || echo '$(srcdir)/'`consinit.cc
+
+bootstrap0-consinit.obj: consinit.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -MT bootstrap0-consinit.obj -MD -MP -MF $(DEPDIR)/bootstrap0-consinit.Tpo -c -o bootstrap0-consinit.obj `if test -f 'consinit.cc'; then $(CYGPATH_W) 'consinit.cc'; else $(CYGPATH_W) '$(srcdir)/consinit.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap0-consinit.Tpo $(DEPDIR)/bootstrap0-consinit.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='consinit.cc' object='bootstrap0-consinit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap0-consinit.obj `if test -f 'consinit.cc'; then $(CYGPATH_W) 'consinit.cc'; else $(CYGPATH_W) '$(srcdir)/consinit.cc'; fi`
+
+bootstrap0-main.o: main.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -MT bootstrap0-main.o -MD -MP -MF $(DEPDIR)/bootstrap0-main.Tpo -c -o bootstrap0-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap0-main.Tpo $(DEPDIR)/bootstrap0-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='bootstrap0-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap0-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+bootstrap0-main.obj: main.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -MT bootstrap0-main.obj -MD -MP -MF $(DEPDIR)/bootstrap0-main.Tpo -c -o bootstrap0-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap0-main.Tpo $(DEPDIR)/bootstrap0-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='bootstrap0-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap0_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap0-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+bootstrap1-loadinit.o: loadinit.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-loadinit.o -MD -MP -MF $(DEPDIR)/bootstrap1-loadinit.Tpo -c -o bootstrap1-loadinit.o `test -f 'loadinit.cc' || echo '$(srcdir)/'`loadinit.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-loadinit.Tpo $(DEPDIR)/bootstrap1-loadinit.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loadinit.cc' object='bootstrap1-loadinit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-loadinit.o `test -f 'loadinit.cc' || echo '$(srcdir)/'`loadinit.cc
+
+bootstrap1-loadinit.obj: loadinit.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-loadinit.obj -MD -MP -MF $(DEPDIR)/bootstrap1-loadinit.Tpo -c -o bootstrap1-loadinit.obj `if test -f 'loadinit.cc'; then $(CYGPATH_W) 'loadinit.cc'; else $(CYGPATH_W) '$(srcdir)/loadinit.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-loadinit.Tpo $(DEPDIR)/bootstrap1-loadinit.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loadinit.cc' object='bootstrap1-loadinit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-loadinit.obj `if test -f 'loadinit.cc'; then $(CYGPATH_W) 'loadinit.cc'; else $(CYGPATH_W) '$(srcdir)/loadinit.cc'; fi`
+
+bootstrap1-if1.o: if1.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-if1.o -MD -MP -MF $(DEPDIR)/bootstrap1-if1.Tpo -c -o bootstrap1-if1.o `test -f 'if1.cc' || echo '$(srcdir)/'`if1.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-if1.Tpo $(DEPDIR)/bootstrap1-if1.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='if1.cc' object='bootstrap1-if1.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-if1.o `test -f 'if1.cc' || echo '$(srcdir)/'`if1.cc
+
+bootstrap1-if1.obj: if1.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-if1.obj -MD -MP -MF $(DEPDIR)/bootstrap1-if1.Tpo -c -o bootstrap1-if1.obj `if test -f 'if1.cc'; then $(CYGPATH_W) 'if1.cc'; else $(CYGPATH_W) '$(srcdir)/if1.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-if1.Tpo $(DEPDIR)/bootstrap1-if1.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='if1.cc' object='bootstrap1-if1.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-if1.obj `if test -f 'if1.cc'; then $(CYGPATH_W) 'if1.cc'; else $(CYGPATH_W) '$(srcdir)/if1.cc'; fi`
+
+bootstrap1-main.o: main.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-main.o -MD -MP -MF $(DEPDIR)/bootstrap1-main.Tpo -c -o bootstrap1-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-main.Tpo $(DEPDIR)/bootstrap1-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='bootstrap1-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+bootstrap1-main.obj: main.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -MT bootstrap1-main.obj -MD -MP -MF $(DEPDIR)/bootstrap1-main.Tpo -c -o bootstrap1-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/bootstrap1-main.Tpo $(DEPDIR)/bootstrap1-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='bootstrap1-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bootstrap1_CXXFLAGS) $(CXXFLAGS) -c -o bootstrap1-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+colm-loadcolm.o: loadcolm.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-loadcolm.o -MD -MP -MF $(DEPDIR)/colm-loadcolm.Tpo -c -o colm-loadcolm.o `test -f 'loadcolm.cc' || echo '$(srcdir)/'`loadcolm.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-loadcolm.Tpo $(DEPDIR)/colm-loadcolm.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loadcolm.cc' object='colm-loadcolm.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-loadcolm.o `test -f 'loadcolm.cc' || echo '$(srcdir)/'`loadcolm.cc
+
+colm-loadcolm.obj: loadcolm.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-loadcolm.obj -MD -MP -MF $(DEPDIR)/colm-loadcolm.Tpo -c -o colm-loadcolm.obj `if test -f 'loadcolm.cc'; then $(CYGPATH_W) 'loadcolm.cc'; else $(CYGPATH_W) '$(srcdir)/loadcolm.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-loadcolm.Tpo $(DEPDIR)/colm-loadcolm.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='loadcolm.cc' object='colm-loadcolm.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-loadcolm.obj `if test -f 'loadcolm.cc'; then $(CYGPATH_W) 'loadcolm.cc'; else $(CYGPATH_W) '$(srcdir)/loadcolm.cc'; fi`
+
+colm-if2.o: if2.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-if2.o -MD -MP -MF $(DEPDIR)/colm-if2.Tpo -c -o colm-if2.o `test -f 'if2.cc' || echo '$(srcdir)/'`if2.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-if2.Tpo $(DEPDIR)/colm-if2.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='if2.cc' object='colm-if2.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-if2.o `test -f 'if2.cc' || echo '$(srcdir)/'`if2.cc
+
+colm-if2.obj: if2.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-if2.obj -MD -MP -MF $(DEPDIR)/colm-if2.Tpo -c -o colm-if2.obj `if test -f 'if2.cc'; then $(CYGPATH_W) 'if2.cc'; else $(CYGPATH_W) '$(srcdir)/if2.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-if2.Tpo $(DEPDIR)/colm-if2.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='if2.cc' object='colm-if2.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-if2.obj `if test -f 'if2.cc'; then $(CYGPATH_W) 'if2.cc'; else $(CYGPATH_W) '$(srcdir)/if2.cc'; fi`
+
+colm-main.o: main.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-main.o -MD -MP -MF $(DEPDIR)/colm-main.Tpo -c -o colm-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-main.Tpo $(DEPDIR)/colm-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='colm-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+colm-main.obj: main.cc
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -MT colm-main.obj -MD -MP -MF $(DEPDIR)/colm-main.Tpo -c -o colm-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/colm-main.Tpo $(DEPDIR)/colm-main.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='main.cc' object='colm-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(colm_CXXFLAGS) $(CXXFLAGS) -c -o colm-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-colmincHEADERS: $(colminc_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(colmincdir)" || $(MKDIR_P) "$(DESTDIR)$(colmincdir)"
+ @list='$(colminc_HEADERS)'; test -n "$(colmincdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(colmincdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(colmincdir)" || exit $$?; \
+ done
+
+uninstall-colmincHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(colminc_HEADERS)'; test -n "$(colmincdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(colmincdir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) config.h.in defs.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.h.in defs.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) config.h.in defs.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) config.h.in defs.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) config.h defs.h
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(colmincdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libLIBRARIES \
+ clean-libtool clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-colmincHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-libLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-colmincHEADERS \
+ uninstall-libLIBRARIES
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libLIBRARIES clean-libtool \
+ clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-colmincHEADERS install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-libLIBRARIES install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-colmincHEADERS uninstall-libLIBRARIES
+
+
+parse1.c: bootstrap0
+ $(builddir)/bootstrap0 -c -o parse1.c -e if1.h -x if1.cc
+if1.h: parse1.c
+if1.cc: parse1.c
+
+parse2.c: bootstrap1 colm.lm
+ $(builddir)/bootstrap1 -c -o parse2.c -e if2.h -x if2.cc colm.lm
+if2.h: parse2.c
+if2.cc: parse2.c
+
+bootstrap1-if1.$(OBJEXT): if1.h if1.cc parse1.c
+bootstrap1-loadinit.$(OBJEXT): if1.h if1.cc parse1.c
+
+colm-if2.$(OBJEXT): if2.h if2.cc parse2.c
+colm-loadcolm.$(OBJEXT): if2.h if2.cc parse2.c
+
+include/colm:
+ mkdir -p include
+ ln -s .. include/colm
+
+version.h: Makefile
+ echo '#define VERSION "$(PACKAGE_VERSION)"' > version.h
+ echo '#define PUBDATE "$(PUBDATE)"' >> version.h
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/buffer.h b/src/buffer.h
new file mode 100644
index 0000000..9039ad4
--- /dev/null
+++ b/src/buffer.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2003 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _BUFFER_H
+#define _BUFFER_H
+
+#define BUFFER_INITIAL_SIZE 4096
+
+/* An automatically grown buffer for collecting tokens. Always reuses space;
+ * never down resizes. */
+struct Buffer
+{
+ Buffer()
+ {
+ data = (char*) malloc( BUFFER_INITIAL_SIZE );
+ allocated = BUFFER_INITIAL_SIZE;
+ length = 0;
+ }
+ ~Buffer() { free(data); }
+
+ void append( char p )
+ {
+ if ( length == allocated ) {
+ allocated *= 2;
+ data = (char*) realloc( data, allocated );
+ }
+ data[length++] = p;
+ }
+
+ void clear() { length = 0; }
+
+ char *data;
+ int allocated;
+ int length;
+};
+
+#endif /* _BUFFER_H */
diff --git a/src/bytecode.c b/src/bytecode.c
new file mode 100644
index 0000000..4aa5b10
--- /dev/null
+++ b/src/bytecode.c
@@ -0,0 +1,3702 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <colm/pdarun.h>
+#include <colm/tree.h>
+#include <colm/bytecode.h>
+#include <colm/pool.h>
+#include <colm/debug.h>
+#include <colm/config.h>
+
+#include <alloca.h>
+#include <sys/mman.h>
+#include <string.h>
+#include <assert.h>
+#include <stdlib.h>
+
+#if SIZEOF_LONG != 4 && SIZEOF_LONG != 8
+ #error "SIZEOF_LONG contained an unexpected value"
+#endif
+
+#define true 1
+#define false 0
+
+#define read_byte( i ) do { \
+ i = ((uchar) *instr++); \
+} while(0)
+
+#define consume_byte( ) do { \
+ instr += 1; \
+} while(0)
+
+
+#define read_word_p( i, p ) do { \
+ i = ((Word) p[0]); \
+ i |= ((Word) p[1]) << 8; \
+ i |= ((Word) p[2]) << 16; \
+ i |= ((Word) p[3]) << 24; \
+} while(0)
+
+/* There are better ways. */
+#if SIZEOF_LONG == 4
+ #define read_word( i ) do { \
+ i = ((Word) *instr++); \
+ i |= ((Word) *instr++) << 8; \
+ i |= ((Word) *instr++) << 16; \
+ i |= ((Word) *instr++) << 24; \
+ } while(0)
+#else
+ #define read_word( i ) do { \
+ i = ((Word) *instr++); \
+ i |= ((Word) *instr++) << 8; \
+ i |= ((Word) *instr++) << 16; \
+ i |= ((Word) *instr++) << 24; \
+ i |= ((Word) *instr++) << 32; \
+ i |= ((Word) *instr++) << 40; \
+ i |= ((Word) *instr++) << 48; \
+ i |= ((Word) *instr++) << 56; \
+ } while(0)
+#endif
+
+/* There are better ways. */
+#if SIZEOF_LONG == 4
+ #define read_tree( i ) do { \
+ Word w; \
+ w = ((Word) *instr++); \
+ w |= ((Word) *instr++) << 8; \
+ w |= ((Word) *instr++) << 16; \
+ w |= ((Word) *instr++) << 24; \
+ i = (Tree*) w; \
+ } while(0)
+
+ #define read_word_type( Type, i ) do { \
+ Word w; \
+ w = ((Word) *instr++); \
+ w |= ((Word) *instr++) << 8; \
+ w |= ((Word) *instr++) << 16; \
+ w |= ((Word) *instr++) << 24; \
+ i = (Type) w; \
+ } while(0)
+
+ #define consume_word( ) do { \
+ instr += 4; \
+ } while(0)
+#else
+ #define read_tree( i ) do { \
+ Word w; \
+ w = ((Word) *instr++); \
+ w |= ((Word) *instr++) << 8; \
+ w |= ((Word) *instr++) << 16; \
+ w |= ((Word) *instr++) << 24; \
+ w |= ((Word) *instr++) << 32; \
+ w |= ((Word) *instr++) << 40; \
+ w |= ((Word) *instr++) << 48; \
+ w |= ((Word) *instr++) << 56; \
+ i = (Tree*) w; \
+ } while(0)
+
+ #define read_word_type( Type, i ) do { \
+ Word w; \
+ w = ((Word) *instr++); \
+ w |= ((Word) *instr++) << 8; \
+ w |= ((Word) *instr++) << 16; \
+ w |= ((Word) *instr++) << 24; \
+ w |= ((Word) *instr++) << 32; \
+ w |= ((Word) *instr++) << 40; \
+ w |= ((Word) *instr++) << 48; \
+ w |= ((Word) *instr++) << 56; \
+ i = (Type) w; \
+ } while(0)
+
+ #define consume_word( ) do { \
+ instr += 8; \
+ } while(0)
+#endif
+
+#define read_half( i ) do { \
+ i = ((Word) *instr++); \
+ i |= ((Word) *instr++) << 8; \
+} while(0)
+
+void parserSetContext( Program *prg, Tree **sp, Parser *parser, Tree *val )
+{
+ parser->pdaRun->context = splitTree( prg, val );
+}
+
+static Head *treeToStr( Program *prg, Tree **sp, Tree *tree, int trim )
+{
+ /* Collect the tree data. */
+ StrCollect collect;
+ initStrCollect( &collect );
+
+ printTreeCollect( prg, sp, &collect, tree, trim );
+
+ /* Set up the input stream. */
+ Head *ret = stringAllocFull( prg, collect.data, collect.length );
+
+ strCollectDestroy( &collect );
+
+ return ret;
+}
+
+Word streamAppend( Program *prg, Tree **sp, Tree *input, StreamImpl *is )
+{
+ long length = 0;
+
+ if ( input->id == LEL_ID_STR ) {
+ /* Collect the tree data. */
+ StrCollect collect;
+ initStrCollect( &collect );
+ printTreeCollect( prg, sp, &collect, input, false );
+
+ /* Load it into the input. */
+ is->funcs->appendData( is, collect.data, collect.length );
+ length = collect.length;
+ strCollectDestroy( &collect );
+ }
+ else if ( input->id == LEL_ID_STREAM ) {
+ treeUpref( input );
+ is->funcs->appendStream( is, input );
+ }
+ else {
+ treeUpref( input );
+ is->funcs->appendTree( is, input );
+ }
+
+ return length;
+}
+
+long parseFrag( Program *prg, Tree **sp, Parser *parser, long stopId, long entry )
+{
+switch ( entry ) {
+case PcrStart:
+
+ if ( ! parser->pdaRun->parseError ) {
+ parser->pdaRun->stopTarget = stopId;
+
+ long pcr = parseLoop( prg, sp, parser->pdaRun, parser->input->in, entry );
+
+ while ( pcr != PcrDone ) {
+
+return pcr;
+case PcrReduction:
+case PcrGeneration:
+case PcrPreEof:
+case PcrReverse:
+
+ pcr = parseLoop( prg, sp, parser->pdaRun, parser->input->in, entry );
+ }
+ }
+
+case PcrDone:
+break; }
+
+ return PcrDone;
+}
+
+long parseFinish( Tree **result, Program *prg, Tree **sp,
+ Parser *parser, int revertOn, long entry )
+{
+switch ( entry ) {
+case PcrStart:
+
+ if ( parser->pdaRun->stopTarget <= 0 ) {
+ parser->input->in->funcs->setEof( parser->input->in );
+
+ if ( ! parser->pdaRun->parseError ) {
+ long pcr = parseLoop( prg, sp, parser->pdaRun, parser->input->in, entry );
+
+ while ( pcr != PcrDone ) {
+
+return pcr;
+case PcrReduction:
+case PcrGeneration:
+case PcrPreEof:
+case PcrReverse:
+
+ pcr = parseLoop( prg, sp, parser->pdaRun, parser->input->in, entry );
+ }
+ }
+ }
+
+ /* FIXME: need something here to check that we are not stopped waiting for
+ * more data when we are actually expected to finish. This check doesn't
+ * work (at time of writing). */
+ //assert( (parser->pdaRun->stopTarget > 0 && parser->pdaRun->stopParsing) || parser->input->in->eofSent );
+
+ if ( !revertOn )
+ commitFull( prg, sp, parser->pdaRun, 0 );
+
+ Tree *tree = getParsedRoot( parser->pdaRun, parser->pdaRun->stopTarget > 0 );
+ treeUpref( tree );
+
+ *result = tree;
+
+case PcrDone:
+break; }
+
+ return PcrDone;
+}
+
+long undoParseFrag( Program *prg, Tree **sp, Parser *parser, long steps, long entry )
+{
+ StreamImpl *is = parser->input->in;
+ PdaRun *pdaRun = parser->pdaRun;
+
+ debug( prg, REALM_PARSE, "undo parse frag, target steps: %ld, pdarun steps: %ld\n", steps, pdaRun->steps );
+
+ resetToken( pdaRun );
+
+switch ( entry ) {
+case PcrStart:
+
+ if ( steps < pdaRun->steps ) {
+ /* Setup environment for going backwards until we reduced steps to
+ * what we want. */
+ pdaRun->numRetry += 1;
+ pdaRun->targetSteps = steps;
+ pdaRun->triggerUndo = 1;
+
+ /* The parse loop will recognise the situation. */
+ long pcr = parseLoop( prg, sp, pdaRun, is, entry );
+ while ( pcr != PcrDone ) {
+
+return pcr;
+case PcrReduction:
+case PcrGeneration:
+case PcrPreEof:
+case PcrReverse:
+
+ pcr = parseLoop( prg, sp, pdaRun, is, entry );
+ }
+
+ /* Reset environment. */
+ pdaRun->triggerUndo = 0;
+ pdaRun->targetSteps = -1;
+ pdaRun->numRetry -= 1;
+ }
+
+case PcrDone:
+break; }
+
+ return PcrDone;
+}
+
+Tree *streamPullBc( Program *prg, PdaRun *pdaRun, StreamImpl *in, Tree *length )
+{
+ long len = ((Int*)length)->value;
+ Head *tokdata = streamPull( prg, pdaRun, in, len );
+ return constructString( prg, tokdata );
+}
+
+void undoPull( Program *prg, StreamImpl *in, Tree *str )
+{
+ const char *data = stringData( ( (Str*)str )->value );
+ long length = stringLength( ( (Str*)str )->value );
+ undoStreamPull( in, data, length );
+}
+
+static long streamPush( Program *prg, Tree **sp, StreamImpl *in, Tree *tree, int ignore )
+{
+ if ( tree->id == LEL_ID_STR ) {
+ /* This should become a compile error. If it's text, it's up to the
+ * scanner to decide. Want to force it then send a token. */
+ assert( !ignore );
+
+ /* Collect the tree data. */
+ StrCollect collect;
+ initStrCollect( &collect );
+ printTreeCollect( prg, sp, &collect, tree, false );
+
+ streamPushText( in, collect.data, collect.length );
+ long length = collect.length;
+ strCollectDestroy( &collect );
+
+ return length;
+ }
+ else if ( tree->id == LEL_ID_STREAM ) {
+ treeUpref( tree );
+ streamPushStream( in, tree );
+ return -1;
+ }
+ else {
+ treeUpref( tree );
+ streamPushTree( in, tree, ignore );
+ return -1;
+ }
+}
+
+void setLocal( Tree **frame, long field, Tree *tree )
+{
+ if ( tree != 0 )
+ assert( tree->refs >= 1 );
+ frame[field] = tree;
+}
+
+Tree *getLocalSplit( Program *prg, Tree **frame, long field )
+{
+ Tree *val = frame[field];
+ Tree *split = splitTree( prg, val );
+ frame[field] = split;
+ return split;
+}
+
+static void downrefLocalTrees( Program *prg, Tree **sp, Tree **frame, LocalInfo *locals, long localsLen )
+{
+ long i;
+ for ( i = localsLen-1; i >= 0; i-- ) {
+ if ( locals[i].type == LI_Tree ) {
+ debug( prg, REALM_BYTECODE, "local tree downref: %ld\n", (long)locals[i].offset );
+
+ Tree *tree = (Tree*) frame[(long)locals[i].offset];
+ treeDownref( prg, sp, tree );
+ }
+ }
+}
+
+static void downrefLocals( Program *prg, Tree ***psp, Tree **frame, LocalInfo *locals, long localsLen )
+{
+ long i;
+ for ( i = localsLen-1; i >= 0; i-- ) {
+ switch ( locals[i].type ) {
+ case LI_Tree: {
+ debug( prg, REALM_BYTECODE, "local tree downref: %ld\n", (long)locals[i].offset );
+ Tree *tree = (Tree*) frame[(long)locals[i].offset];
+ treeDownref( prg, *psp, tree );
+ break;
+ }
+ case LI_Iter: {
+ debug( prg, REALM_BYTECODE, "local iter downref: %ld\n", (long)locals[i].offset );
+ TreeIter *iter = (TreeIter*) &frame[(long)locals[i].offset];
+ treeIterDestroy( prg, psp, iter );
+ break;
+ }
+ case LI_RevIter: {
+ debug( prg, REALM_BYTECODE, "local rev iter downref: %ld\n", (long)locals[i].offset );
+ RevTreeIter *riter = (RevTreeIter*) &frame[(long)locals[i].offset];
+ revTreeIterDestroy( prg, psp, riter );
+ break;
+ }
+ case LI_UserIter: {
+ debug( prg, REALM_BYTECODE, "local user iter downref: %ld\n", (long)locals[i].offset );
+ UserIter *uiter = (UserIter*) frame[locals[i].offset];
+ userIterDestroy2( prg, psp, uiter );
+ break;
+ }
+ }
+ }
+}
+
+Tree *constructArgv( Program *prg, int argc, const char **argv )
+{
+ Tree *list = createGeneric( prg, prg->rtd->argvGenericId );
+ treeUpref( list );
+ int i;
+ for ( i = 0; i < argc; i++ ) {
+ Head *head = stringAllocPointer( prg, argv[i], strlen(argv[i]) );
+ Tree *arg = constructString( prg, head );
+ treeUpref( arg );
+ listAppend2( prg, (List*)list, arg );
+ }
+ return list;
+}
+
+/*
+ * Execution environment
+ */
+
+void rcodeDownrefAll( Program *prg, Tree **sp, RtCodeVect *rev )
+{
+ while ( rev->tabLen > 0 ) {
+ /* Read the length */
+ Code *prcode = rev->data + rev->tabLen - SIZEOF_WORD;
+ Word len;
+ read_word_p( len, prcode );
+
+ /* Find the start of block. */
+ long start = rev->tabLen - len - SIZEOF_WORD;
+ prcode = rev->data + start;
+
+ /* Execute it. */
+ rcodeDownref( prg, sp, prcode );
+
+ /* Backup over it. */
+ rev->tabLen -= len + SIZEOF_WORD;
+ }
+}
+
+void rcodeDownref( Program *prg, Tree **sp, Code *instr )
+{
+again:
+ switch ( *instr++ ) {
+ case IN_PARSE_SAVE_STEPS: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_SAVE_STEPS\n" );
+ break;
+ }
+ case IN_PARSE_INIT_BKT: {
+ Tree *parser;
+ Word pcr;
+ Word steps;
+
+ debug( prg, REALM_BYTECODE, "IN_PARSE_INIT_BKT\n" );
+
+ read_tree( parser );
+ read_word( pcr );
+ read_word( steps );
+
+ treeDownref( prg, sp, (Tree*)parser );
+ break;
+ }
+
+ case IN_LOAD_TREE: {
+ Word w;
+ read_word( w );
+ debug( prg, REALM_BYTECODE, "IN_LOAD_TREE %p\n", (Tree*)w );
+ treeDownref( prg, sp, (Tree*)w );
+ break;
+ }
+ case IN_LOAD_WORD: {
+ Word w;
+ read_word( w );
+ debug( prg, REALM_BYTECODE, "IN_LOAD_WORD\n" );
+ break;
+ }
+ case IN_RESTORE_LHS: {
+ Tree *restore;
+ read_tree( restore );
+ debug( prg, REALM_BYTECODE, "IN_RESTORE_LHS\n" );
+ treeDownref( prg, sp, restore );
+ break;
+ }
+
+ case IN_PARSE_FRAG_BKT: {
+ Half stopId;
+ read_half( stopId );
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_BKT\n" );
+ break;
+ }
+ case IN_PARSE_FRAG_EXIT_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_EXIT_BKT\n" );
+ break;
+ }
+ case IN_PARSE_FINISH_BKT: {
+ Half stopId;
+ read_half( stopId );
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_BKT\n" );
+ break;
+ }
+ case IN_PARSE_FINISH_EXIT_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_EXIT_BKT\n" );
+ break;
+ }
+ case IN_PCR_CALL: {
+ debug( prg, REALM_BYTECODE, "IN_PCR_CALL\n" );
+ break;
+ }
+ case IN_PCR_RET: {
+ debug( prg, REALM_BYTECODE, "IN_PCR_RET\n" );
+ return;
+ }
+ case IN_PCR_END_DECK: {
+ debug( prg, REALM_BYTECODE, "IN_PCR_END_DECK\n" );
+ return;
+ }
+ case IN_INPUT_APPEND_BKT: {
+ Tree *parser;
+ Tree *input;
+ Word len;
+ read_tree( parser );
+ read_tree( input );
+ read_word( len );
+
+ debug( prg, REALM_BYTECODE, "IN_INPUT_APPEND_BKT\n" );
+
+ treeDownref( prg, sp, parser );
+ treeDownref( prg, sp, input );
+ break;
+ }
+ case IN_INPUT_PULL_BKT: {
+ Tree *string;
+ read_tree( string );
+
+ debug( prg, REALM_BYTECODE, "IN_INPUT_PULL_BKT\n" );
+
+ treeDownref( prg, sp, string );
+ break;
+ }
+ case IN_INPUT_PUSH_BKT: {
+ Word len;
+ read_word( len );
+
+ debug( prg, REALM_BYTECODE, "IN_INPUT_PUSH_BKT\n" );
+ break;
+ }
+ case IN_LOAD_GLOBAL_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_GLOBAL_BKT\n" );
+ break;
+ }
+ case IN_LOAD_CONTEXT_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_CONTEXT_BKT\n" );
+ break;
+ }
+ case IN_LOAD_PARSER_BKT: {
+ /* Tree *parser; */
+ consume_word();
+ debug( prg, REALM_BYTECODE, "IN_LOAD_PARSER_BKT\n" );
+ break;
+ }
+ case IN_LOAD_INPUT_BKT: {
+ /* Tree *input; */
+ consume_word();
+ debug( prg, REALM_BYTECODE, "IN_LOAD_INPUT_BKT\n" );
+ break;
+ }
+ case IN_GET_FIELD_BKT: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_FIELD_BKT %hd\n", field );
+ break;
+ }
+ case IN_SET_FIELD_BKT: {
+ short field;
+ Tree *val;
+ read_half( field );
+ read_tree( val );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_FIELD_BKT %hd\n", field );
+
+ treeDownref( prg, sp, val );
+ break;
+ }
+ case IN_PTR_DEREF_BKT: {
+ Tree *ptr;
+ read_tree( ptr );
+
+ debug( prg, REALM_BYTECODE, "IN_PTR_DEREF_BKT\n" );
+
+ treeDownref( prg, sp, ptr );
+ break;
+ }
+ case IN_SET_TOKEN_DATA_BKT: {
+ Word oldval;
+ read_word( oldval );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_TOKEN_DATA_BKT\n" );
+
+ Head *head = (Head*)oldval;
+ stringFree( prg, head );
+ break;
+ }
+ case IN_LIST_APPEND_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_LIST_APPEND_BKT\n" );
+ break;
+ }
+ case IN_LIST_REMOVE_END_BKT: {
+ Tree *val;
+ read_tree( val );
+
+ debug( prg, REALM_BYTECODE, "IN_LIST_REMOVE_END_BKT\n" );
+
+ treeDownref( prg, sp, val );
+ break;
+ }
+ case IN_GET_LIST_MEM_BKT: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_LIST_MEM_BKT %hd\n", field );
+ break;
+ }
+ case IN_SET_LIST_MEM_BKT: {
+ Half field;
+ Tree *val;
+ read_half( field );
+ read_tree( val );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_LIST_MEM_BKT %hd\n", field );
+
+ treeDownref( prg, sp, val );
+ break;
+ }
+ case IN_MAP_INSERT_BKT: {
+ /* uchar inserted; */
+ Tree *key;
+ consume_byte();
+ read_tree( key );
+
+ debug( prg, REALM_BYTECODE, "IN_MAP_INSERT_BKT\n" );
+
+ treeDownref( prg, sp, key );
+ break;
+ }
+ case IN_MAP_STORE_BKT: {
+ Tree *key, *val;
+ read_tree( key );
+ read_tree( val );
+
+ debug( prg, REALM_BYTECODE,"IN_MAP_STORE_BKT\n" );
+
+ treeDownref( prg, sp, key );
+ treeDownref( prg, sp, val );
+ break;
+ }
+ case IN_MAP_REMOVE_BKT: {
+ Tree *key, *val;
+ read_tree( key );
+ read_tree( val );
+
+ debug( prg, REALM_BYTECODE, "IN_MAP_REMOVE_BKT\n" );
+
+ treeDownref( prg, sp, key );
+ treeDownref( prg, sp, val );
+ break;
+ }
+ case IN_STOP: {
+ return;
+ }
+ default: {
+ fatal( "UNKNOWN INSTRUCTION 0x%2x: -- reverse code downref\n", *(instr-1));
+ assert(false);
+ break;
+ }
+ }
+ goto again;
+}
+
+void mainExecution( Program *prg, Execution *exec, Code *code )
+{
+ Tree **sp = prg->stackRoot;
+
+ FrameInfo *fi = &prg->rtd->frameInfo[prg->rtd->rootFrameId];
+ long stretch = fi->argSize + 4 + fi->frameSize;
+ vm_contiguous( stretch );
+
+ /* Set up the stack as if we have called. We allow a return value. */
+ vm_push( 0 );
+ vm_push( 0 );
+ vm_push( 0 );
+ vm_push( 0 );
+
+ /* Execution loop. */
+ executeCode( prg, exec, sp, code );
+
+ vm_pop_ignore();
+ vm_pop_ignore();
+ treeDownref( prg, sp, prg->returnVal );
+ prg->returnVal = vm_pop();
+ vm_pop_ignore();
+
+ prg->stackRoot = sp;
+}
+
+int makeReverseCode( PdaRun *pdaRun )
+{
+ RtCodeVect *reverseCode = &pdaRun->reverseCode;
+ RtCodeVect *rcodeCollect = &pdaRun->rcodeCollect;
+
+ /* Do we need to revert the left hand side? */
+
+ /* Check if there was anything generated. */
+ if ( rcodeCollect->tabLen == 0 )
+ return false;
+
+ if ( pdaRun->rcBlockCount == 0 ) {
+ /* One reverse code run for the DECK terminator. */
+ appendCode( reverseCode, IN_PCR_END_DECK );
+ appendCode( reverseCode, IN_PCR_RET );
+ appendWord( reverseCode, 2 );
+ pdaRun->rcBlockCount += 1;
+ incrementSteps( pdaRun );
+ }
+
+ long startLength = reverseCode->tabLen;
+
+ /* Go backwards, group by group, through the reverse code. Push each group
+ * to the global reverse code stack. */
+ Code *p = rcodeCollect->data + rcodeCollect->tabLen;
+ while ( p != rcodeCollect->data ) {
+ p--;
+ long len = *p;
+ p = p - len;
+ appendCode2( reverseCode, p, len );
+ }
+
+ /* Stop, then place a total length in the global stack. */
+ appendCode( reverseCode, IN_PCR_RET );
+ long length = reverseCode->tabLen - startLength;
+ appendWord( reverseCode, length );
+
+ /* Clear the revere code buffer. */
+ rcodeCollect->tabLen = 0;
+
+ pdaRun->rcBlockCount += 1;
+ incrementSteps( pdaRun );
+
+ return true;
+}
+
+void transferReverseCode( PdaRun *pdaRun, ParseTree *parseTree )
+{
+ if ( pdaRun->rcBlockCount > 0 ) {
+ //debug( REALM_PARSE, "attaching reverse code to token\n" );
+ parseTree->flags |= PF_HAS_RCODE;
+ pdaRun->rcBlockCount = 0;
+ }
+}
+
+void rcodeUnitTerm( Execution *exec )
+{
+ appendCode( &exec->parser->pdaRun->rcodeCollect, exec->rcodeUnitLen );
+ exec->rcodeUnitLen = 0;
+}
+
+void rcodeUnitStart( Execution *exec )
+{
+ exec->rcodeUnitLen = 0;
+}
+
+void rcodeCode( Execution *exec, const Code code )
+{
+ appendCode( &exec->parser->pdaRun->rcodeCollect, code );
+ exec->rcodeUnitLen += SIZEOF_CODE;
+}
+
+void rcodeHalf( Execution *exec, const Half half )
+{
+ appendHalf( &exec->parser->pdaRun->rcodeCollect, half );
+ exec->rcodeUnitLen += SIZEOF_HALF;
+}
+
+void rcodeWord( Execution *exec, const Word word )
+{
+ appendWord( &exec->parser->pdaRun->rcodeCollect, word );
+ exec->rcodeUnitLen += SIZEOF_WORD;
+}
+
+Code *popReverseCode( RtCodeVect *allRev )
+{
+ /* Read the length */
+ Code *prcode = allRev->data + allRev->tabLen - SIZEOF_WORD;
+ Word len;
+ read_word_p( len, prcode );
+
+ /* Find the start of block. */
+ long start = allRev->tabLen - len - SIZEOF_WORD;
+ prcode = allRev->data + start;
+
+ /* Backup over it. */
+ allRev->tabLen -= len + SIZEOF_WORD;
+ return prcode;
+}
+
+Tree **executeCode( Program *prg, Execution *exec, Tree **sp, Code *instr )
+{
+ /* When we exit we are going to verify that we did not eat up any stack
+ * space. */
+ Tree **root = sp;
+ Code c;
+
+again:
+ c = *instr++;
+ //debug( REALM_BYTECODE, "--in 0x%x\n", c );
+
+ switch ( c ) {
+ case IN_RESTORE_LHS: {
+ Tree *restore;
+ read_tree( restore );
+
+ debug( prg, REALM_BYTECODE, "IN_RESTORE_LHS\n" );
+ treeDownref( prg, sp, exec->parser->pdaRun->parseInput->shadow->tree );
+ exec->parser->pdaRun->parseInput->shadow->tree = restore;
+ break;
+ }
+ case IN_LOAD_NIL: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_NIL\n" );
+ vm_push( 0 );
+ break;
+ }
+ case IN_LOAD_TREE: {
+ Tree *tree;
+ read_tree( tree );
+ vm_push( tree );
+ debug( prg, REALM_BYTECODE, "IN_LOAD_TREE %p id: %d refs: %d\n", tree, tree->id, tree->refs );
+ break;
+ }
+ case IN_LOAD_WORD: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_WORD\n" );
+ Word w;
+ read_word( w );
+ vm_push( (SW)w );
+ break;
+ }
+ case IN_LOAD_TRUE: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_TRUE\n" );
+ treeUpref( prg->trueVal );
+ vm_push( prg->trueVal );
+ break;
+ }
+ case IN_LOAD_FALSE: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_FALSE\n" );
+ treeUpref( prg->falseVal );
+ vm_push( prg->falseVal );
+ break;
+ }
+ case IN_LOAD_INT: {
+ Word i;
+ read_word( i );
+
+ debug( prg, REALM_BYTECODE, "IN_LOAD_INT %d\n", i );
+
+ Tree *tree = constructInteger( prg, i );
+ treeUpref( tree );
+ vm_push( tree );
+ break;
+ }
+ case IN_LOAD_STR: {
+ Word offset;
+ read_word( offset );
+
+ debug( prg, REALM_BYTECODE, "IN_LOAD_STR %d\n", offset );
+
+ Head *lit = makeLiteral( prg, offset );
+ Tree *tree = constructString( prg, lit );
+ treeUpref( tree );
+ vm_push( tree );
+ break;
+ }
+ case IN_PRINT: {
+ int n, i;
+ read_byte( n );
+ debug( prg, REALM_BYTECODE, "IN_PRINT %d\n", n );
+
+ Tree *arg[n];
+ for ( i = n-1; i >= 0; i-- )
+ arg[i] = vm_pop();
+
+ for ( i = 0; i < n; i++ )
+ printTreeFile( prg, sp, stdout, arg[i], false );
+
+ for ( i = 0; i < n; i++ )
+ treeDownref( prg, sp, arg[i] );
+ break;
+ }
+ case IN_PRINT_STREAM: {
+ int n, i;
+ read_byte( n );
+ debug( prg, REALM_BYTECODE, "IN_PRINT_STREAM\n" );
+
+ Tree *arg[n];
+ for ( i = n-1; i >= 0; i-- )
+ arg[i] = vm_pop();
+ Stream *stream = (Stream*)vm_pop();
+
+ for ( i = 0; i < n; i++ ) {
+ if ( stream->in->file != 0 )
+ printTreeFile( prg, sp, stream->in->file, arg[i], false );
+ else
+ printTreeFd( prg, sp, stream->in->fd, arg[i], false );
+ }
+
+ for ( i = 0; i < n; i++ )
+ treeDownref( prg, sp, arg[i] );
+ treeDownref( prg, sp, (Tree*)stream );
+ break;
+ }
+ case IN_PRINT_XML_AC: {
+ int n, i;
+ read_byte( n );
+
+ debug( prg, REALM_BYTECODE, "IN_PRINT_XML_AC %d\n", n );
+
+ Tree *arg[n];
+ for ( i = n-1; i >= 0; i-- )
+ arg[i] = vm_pop();
+
+ for ( i = 0; i < n; i++ )
+ printXmlStdout( prg, sp, arg[i], true, true );
+
+ for ( i = 0; i < n; i++ )
+ treeDownref( prg, sp, arg[i] );
+ break;
+ }
+ case IN_PRINT_XML: {
+ int n, i;
+ read_byte( n );
+ debug( prg, REALM_BYTECODE, "IN_PRINT_XML %d", n );
+
+ Tree *arg[n];
+ for ( i = n-1; i >= 0; i-- )
+ arg[i] = vm_pop();
+
+ for ( i = 0; i < n; i++ )
+ printXmlStdout( prg, sp, arg[i], false, true );
+
+ for ( i = 0; i < n; i++ )
+ treeDownref( prg, sp, arg[i] );
+ break;
+ }
+ case IN_LOAD_CONTEXT_R: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_CONTEXT_R\n" );
+
+ treeUpref( exec->parser->pdaRun->context );
+ vm_push( exec->parser->pdaRun->context );
+ break;
+ }
+ case IN_LOAD_CONTEXT_WV: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_CONTEXT_WV\n" );
+
+ treeUpref( exec->parser->pdaRun->context );
+ vm_push( exec->parser->pdaRun->context );
+
+ /* Set up the reverse instruction. */
+ rcodeUnitStart( exec );
+ rcodeCode( exec, IN_LOAD_CONTEXT_BKT );
+ break;
+ }
+ case IN_LOAD_CONTEXT_WC: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_CONTEXT_WC\n" );
+
+ /* This is identical to the _R version, but using it for writing
+ * would be confusing. */
+ treeUpref( exec->parser->pdaRun->context );
+ vm_push( exec->parser->pdaRun->context );
+ break;
+ }
+ case IN_LOAD_CONTEXT_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_CONTEXT_BKT\n" );
+
+ treeUpref( exec->parser->pdaRun->context );
+ vm_push( exec->parser->pdaRun->context );
+ break;
+ }
+ case IN_LOAD_GLOBAL_R: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_GLOBAL_R\n" );
+
+ treeUpref( prg->global );
+ vm_push( prg->global );
+ break;
+ }
+ case IN_LOAD_GLOBAL_WV: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_GLOBAL_WV\n" );
+
+ treeUpref( prg->global );
+ vm_push( prg->global );
+
+ /* Set up the reverse instruction. */
+ rcodeUnitStart( exec );
+ rcodeCode( exec, IN_LOAD_GLOBAL_BKT );
+ break;
+ }
+ case IN_LOAD_GLOBAL_WC: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_GLOBAL_WC\n" );
+
+ /* This is identical to the _R version, but using it for writing
+ * would be confusing. */
+ treeUpref( prg->global );
+ vm_push( prg->global );
+ break;
+ }
+ case IN_LOAD_GLOBAL_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_GLOBAL_BKT\n" );
+
+ treeUpref( prg->global );
+ vm_push( prg->global );
+ break;
+ }
+ case IN_LOAD_PARSER_R: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_PARSER_R\n" );
+
+ treeUpref( (Tree*)exec->parser );
+ vm_push( (Tree*)exec->parser );
+ assert( exec->parser != 0 );
+ break;
+ }
+ case IN_LOAD_PARSER_WV: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_PARSER_WV\n" );
+
+ treeUpref( (Tree*)exec->parser );
+ vm_push( (Tree*)exec->parser );
+ assert( exec->parser != 0 );
+
+ /* Set up the reverse instruction. */
+ rcodeUnitStart( exec );
+ rcodeCode( exec, IN_LOAD_PARSER_BKT );
+ rcodeWord( exec, (Word)exec->parser );
+ break;
+ }
+ case IN_LOAD_PARSER_WC: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_PARSER_WC\n" );
+
+ /* This is identical to the _R version, but using it for writing
+ * would be confusing. */
+ treeUpref( (Tree*)exec->parser );
+ vm_push( (Tree*)exec->parser );
+ assert( exec->parser != 0 );
+ break;
+ }
+ case IN_LOAD_PARSER_BKT: {
+ Tree *parser;
+ read_tree( parser );
+
+ debug( prg, REALM_BYTECODE, "IN_LOAD_PARSER_BKT\n" );
+
+ treeUpref( parser );
+ vm_push( parser );
+ break;
+ }
+ case IN_LOAD_INPUT_R: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_INPUT_R\n" );
+
+ assert( exec->parser != 0 );
+ treeUpref( (Tree*)exec->parser->input );
+ vm_push( (Tree*)exec->parser->input );
+ break;
+ }
+ case IN_LOAD_INPUT_WV: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_INPUT_WV\n" );
+
+ assert( exec->parser != 0 );
+ treeUpref( (Tree*)exec->parser->input );
+ vm_push( (Tree*)exec->parser->input );
+
+ /* Set up the reverse instruction. */
+ rcodeUnitStart( exec );
+ rcodeCode( exec, IN_LOAD_INPUT_BKT );
+ rcodeWord( exec, (Word)exec->parser->input );
+ break;
+ }
+ case IN_LOAD_INPUT_WC: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_INPUT_WC\n" );
+
+ /* This is identical to the _R version, but using it for writing
+ * would be confusing. */
+ assert( exec->parser != 0 );
+ treeUpref( (Tree*)exec->parser->input );
+ vm_push( (Tree*)exec->parser->input );
+ break;
+ }
+ case IN_LOAD_INPUT_BKT: {
+ Tree *accumStream;
+ read_tree( accumStream );
+
+ debug( prg, REALM_BYTECODE, "IN_LOAD_INPUT_BKT\n" );
+
+ treeUpref( accumStream );
+ vm_push( accumStream );
+ break;
+ }
+ case IN_LOAD_CTX_R: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_CTX_R\n" );
+
+ treeUpref( exec->parser->pdaRun->context );
+ vm_push( exec->parser->pdaRun->context );
+ break;
+ }
+ case IN_LOAD_CTX_WV: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_CTX_WV\n" );
+
+ treeUpref( exec->parser->pdaRun->context );
+ vm_push( exec->parser->pdaRun->context );
+
+ /* Set up the reverse instruction. */
+ rcodeUnitStart( exec );
+ rcodeCode( exec, IN_LOAD_PARSER_BKT );
+ rcodeWord( exec, (Word)exec->parser );
+ break;
+ }
+ case IN_LOAD_CTX_WC: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_CTX_WC\n" );
+
+ /* This is identical to the _R version, but using it for writing
+ * would be confusing. */
+ treeUpref( exec->parser->pdaRun->context );
+ vm_push( exec->parser->pdaRun->context );
+ break;
+ }
+ case IN_LOAD_CTX_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_LOAD_CTX_BKT\n" );
+
+ treeUpref( exec->parser->pdaRun->context );
+ vm_push( exec->parser->pdaRun->context );
+ break;
+ }
+ case IN_INIT_CAPTURES: {
+ /* uchar ncaps; */
+ consume_byte();
+
+ debug( prg, REALM_BYTECODE, "IN_INIT_CAPTURES\n" );
+
+ /* If there are captures (this is a translate block) then copy them into
+ * the local frame now. */
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+ char **mark = exec->parser->pdaRun->fsmRun->mark;
+
+ int i;
+ for ( i = 0; i < lelInfo[exec->parser->pdaRun->tokenId].numCaptureAttr; i++ ) {
+ CaptureAttr *ca = &prg->rtd->captureAttr[lelInfo[exec->parser->pdaRun->tokenId].captureAttr + i];
+ Head *data = stringAllocFull( prg,
+ mark[ca->mark_enter], mark[ca->mark_leave] - mark[ca->mark_enter] );
+ Tree *string = constructString( prg, data );
+ treeUpref( string );
+ setLocal( exec->framePtr, -1 - i, string );
+ }
+ break;
+ }
+ case IN_INIT_RHS_EL: {
+ Half position;
+ short field;
+ read_half( position );
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_INIT_RHS_EL %hd\n", field );
+
+ Tree *val = getRhsEl( prg, exec->parser->pdaRun->redLel->shadow->tree, position );
+ treeUpref( val );
+ vm_local(field) = val;
+ break;
+ }
+
+ case IN_INIT_LHS_EL: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_INIT_LHS_EL %hd\n", field );
+
+ /* We transfer it to to the local field. Possibly take a copy. */
+ Tree *val = exec->parser->pdaRun->redLel->shadow->tree;
+
+ /* Save it. */
+ treeUpref( val );
+ exec->parser->pdaRun->parsed = val;
+
+ exec->parser->pdaRun->redLel->shadow->tree = 0;
+ vm_local(field) = val;
+ break;
+ }
+ case IN_STORE_LHS_EL: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_STORE_LHS_EL %hd\n", field );
+
+ Tree *val = vm_local(field);
+ vm_local(field) = 0;
+ exec->parser->pdaRun->redLel->shadow->tree = val;
+ break;
+ }
+ case IN_UITER_ADVANCE: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_UITER_ADVANCE\n" );
+
+ /* Get the iterator. */
+ UserIter *uiter = (UserIter*) vm_local(field);
+
+ long yieldSize = vm_ssize() - uiter->rootSize;
+ assert( uiter->yieldSize == yieldSize );
+
+ /* Fix the return instruction pointer. */
+ uiter->stackRoot[-IFR_AA + IFR_RIN] = (SW)instr;
+
+ instr = uiter->resume;
+ exec->framePtr = uiter->frame;
+ exec->iframePtr = &uiter->stackRoot[-IFR_AA];
+ break;
+ }
+ case IN_UITER_GET_CUR_R: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_UITER_GET_CUR_R\n" );
+
+ UserIter *uiter = (UserIter*) vm_local(field);
+ Tree *val = uiter->ref.kid->tree;
+ treeUpref( val );
+ vm_push( val );
+ break;
+ }
+ case IN_UITER_GET_CUR_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_UITER_GET_CUR_WC\n" );
+
+ UserIter *uiter = (UserIter*) vm_local(field);
+ splitRef( prg, &sp, &uiter->ref );
+ Tree *split = uiter->ref.kid->tree;
+ treeUpref( split );
+ vm_push( split );
+ break;
+ }
+ case IN_UITER_SET_CUR_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_UITER_SET_CUR_WC\n" );
+
+ Tree *t = vm_pop();
+ UserIter *uiter = (UserIter*) vm_local(field);
+ splitRef( prg, &sp, &uiter->ref );
+ Tree *old = uiter->ref.kid->tree;
+ setUiterCur( prg, uiter, t );
+ treeDownref( prg, sp, old );
+ break;
+ }
+ case IN_GET_LOCAL_R: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_LOCAL_R %hd\n", field );
+
+ Tree *val = vm_local(field);
+ treeUpref( val );
+ vm_push( val );
+ break;
+ }
+ case IN_GET_LOCAL_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_LOCAL_WC %hd\n", field );
+
+ Tree *split = getLocalSplit( prg, exec->framePtr, field );
+ treeUpref( split );
+ vm_push( split );
+ break;
+ }
+ case IN_SET_LOCAL_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_LOCAL_WC %hd\n", field );
+
+ Tree *val = vm_pop();
+ treeDownref( prg, sp, vm_local(field) );
+ setLocal( exec->framePtr, field, val );
+ break;
+ }
+ case IN_SAVE_RET: {
+ debug( prg, REALM_BYTECODE, "IN_SAVE_RET\n" );
+
+ Tree *val = vm_pop();
+ vm_local(FR_RV) = val;
+ break;
+ }
+ case IN_GET_LOCAL_REF_R: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_LOCAL_REF_R\n" );
+
+ Ref *ref = (Ref*) vm_plocal(field);
+ Tree *val = ref->kid->tree;
+ treeUpref( val );
+ vm_push( val );
+ break;
+ }
+ case IN_GET_LOCAL_REF_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_LOCAL_REF_WC\n" );
+
+ Ref *ref = (Ref*) vm_plocal(field);
+ splitRef( prg, &sp, ref );
+ Tree *val = ref->kid->tree;
+ treeUpref( val );
+ vm_push( val );
+ break;
+ }
+ case IN_SET_LOCAL_REF_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_LOCAL_REF_WC\n" );
+
+ Tree *val = vm_pop();
+ Ref *ref = (Ref*) vm_plocal(field);
+ splitRef( prg, &sp, ref );
+ refSetValue( prg, sp, ref, val );
+ break;
+ }
+ case IN_GET_FIELD_R: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_FIELD_R %d\n", field );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *val = getField( obj, field );
+ treeUpref( val );
+ vm_push( val );
+ break;
+ }
+ case IN_GET_FIELD_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_FIELD_WC %d\n", field );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *split = getFieldSplit( prg, obj, field );
+ treeUpref( split );
+ vm_push( split );
+ break;
+ }
+ case IN_GET_FIELD_WV: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_FIELD_WV\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *split = getFieldSplit( prg, obj, field );
+ treeUpref( split );
+ vm_push( split );
+
+ /* Set up the reverse instruction. */
+ rcodeCode( exec, IN_GET_FIELD_BKT );
+ rcodeHalf( exec, field );
+ break;
+ }
+ case IN_GET_FIELD_BKT: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_FIELD_BKT\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *split = getFieldSplit( prg, obj, field );
+ treeUpref( split );
+ vm_push( split );
+ break;
+ }
+ case IN_SET_FIELD_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_FIELD_WC %d\n", field );
+
+ Tree *obj = vm_pop();
+ Tree *val = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ /* Downref the old value. */
+ Tree *prev = getField( obj, field );
+ treeDownref( prg, sp, prev );
+
+ setField( prg, obj, field, val );
+ break;
+ }
+ case IN_SET_FIELD_WV: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_FIELD_WV %d\n", field );
+
+ Tree *obj = vm_pop();
+ Tree *val = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ /* Save the old value, then set the field. */
+ Tree *prev = getField( obj, field );
+ setField( prg, obj, field, val );
+
+ /* Set up the reverse instruction. */
+ rcodeCode( exec, IN_SET_FIELD_BKT );
+ rcodeHalf( exec, field );
+ rcodeWord( exec, (Word)prev );
+ rcodeUnitTerm( exec );
+ break;
+ }
+ case IN_SET_FIELD_BKT: {
+ short field;
+ Tree *val;
+ read_half( field );
+ read_tree( val );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_FIELD_BKT\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ /* Downref the old value. */
+ Tree *prev = getField( obj, field );
+ treeDownref( prg, sp, prev );
+
+ setField( prg, obj, field, val );
+ break;
+ }
+ case IN_SET_FIELD_LEAVE_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_FIELD_LEAVE_WC\n" );
+
+ /* Note that we don't downref the object here because we are
+ * leaving it on the stack. */
+ Tree *obj = vm_pop();
+ Tree *val = vm_pop();
+
+ /* Downref the old value. */
+ Tree *prev = getField( obj, field );
+ treeDownref( prg, sp, prev );
+
+ /* Set the field. */
+ setField( prg, obj, field, val );
+
+ /* Leave the object on the top of the stack. */
+ vm_push( obj );
+ break;
+ }
+ case IN_GET_RHS_VAL_R: {
+ debug( prg, REALM_BYTECODE, "IN_GET_RHS_VAL_R\n" );
+ int i, done = 0;
+ uchar len;
+
+ Tree *obj = vm_pop(), *val = 0;
+ treeDownref( prg, sp, obj );
+
+ read_byte( len );
+ for ( i = 0; i < len; i++ ) {
+ uchar prodNum, childNum;
+ read_byte( prodNum );
+ read_byte( childNum );
+ if ( !done && obj->prodNum == prodNum ) {
+ val = getRhsEl( prg, obj, childNum );
+ done = 1;
+ }
+ }
+
+ treeUpref( val );
+ vm_push( val );
+ break;
+ }
+ case IN_POP: {
+ debug( prg, REALM_BYTECODE, "IN_POP\n" );
+
+ Tree *val = vm_pop();
+ treeDownref( prg, sp, val );
+ break;
+ }
+ case IN_POP_N_WORDS: {
+ short n;
+ read_half( n );
+
+ debug( prg, REALM_BYTECODE, "IN_POP_N_WORDS %hd\n", n );
+
+ vm_popn( n );
+ break;
+ }
+ case IN_SPRINTF: {
+ debug( prg, REALM_BYTECODE, "IN_SPRINTF\n" );
+
+ Tree *f = vm_pop();
+ f++;
+ Tree *integer = vm_pop();
+ Tree *format = vm_pop();
+ Head *res = stringSprintf( prg, (Str*)format, (Int*)integer );
+ Tree *str = constructString( prg, res );
+ treeUpref( str );
+ vm_push( str );
+ treeDownref( prg, sp, integer );
+ treeDownref( prg, sp, format );
+ break;
+ }
+ case IN_STR_ATOI: {
+ debug( prg, REALM_BYTECODE, "IN_STR_ATOI\n" );
+
+ Str *str = (Str*)vm_pop();
+ Word res = strAtoi( str->value );
+ Tree *integer = constructInteger( prg, res );
+ treeUpref( integer );
+ vm_push( integer );
+ treeDownref( prg, sp, (Tree*)str );
+ break;
+ }
+ case IN_INT_TO_STR: {
+ debug( prg, REALM_BYTECODE, "IN_INT_TO_STR\n" );
+
+ Int *i = (Int*)vm_pop();
+ Head *res = intToStr( prg, i->value );
+ Tree *str = constructString( prg, res );
+ treeUpref( str );
+ vm_push( str );
+ treeDownref( prg, sp, (Tree*) i );
+ break;
+ }
+ case IN_TREE_TO_STR: {
+ debug( prg, REALM_BYTECODE, "IN_TREE_TO_STR\n" );
+
+ Tree *tree = vm_pop();
+ Head *res = treeToStr( prg, sp, tree, false );
+ Tree *str = constructString( prg, res );
+ treeUpref( str );
+ vm_push( str );
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_TREE_TO_STR_TRIM: {
+ debug( prg, REALM_BYTECODE, "IN_TREE_TO_STR_TRIM\n" );
+
+ Tree *tree = vm_pop();
+ Head *res = treeToStr( prg, sp, tree, true );
+ Tree *str = constructString( prg, res );
+ treeUpref( str );
+ vm_push( str );
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_TREE_TRIM: {
+ debug( prg, REALM_BYTECODE, "IN_TREE_TRIM\n" );
+
+ Tree *tree = vm_pop();
+ Tree *trimmed = treeTrim( prg, sp, tree );
+ vm_push( trimmed );
+ break;
+ }
+ case IN_CONCAT_STR: {
+ debug( prg, REALM_BYTECODE, "IN_CONCAT_STR\n" );
+
+ Str *s2 = (Str*)vm_pop();
+ Str *s1 = (Str*)vm_pop();
+ Head *res = concatStr( s1->value, s2->value );
+ Tree *str = constructString( prg, res );
+ treeUpref( str );
+ treeDownref( prg, sp, (Tree*)s1 );
+ treeDownref( prg, sp, (Tree*)s2 );
+ vm_push( str );
+ break;
+ }
+ case IN_STR_UORD8: {
+ debug( prg, REALM_BYTECODE, "IN_STR_UORD8\n" );
+
+ Str *str = (Str*)vm_pop();
+ Word res = strUord8( str->value );
+ Tree *tree = constructInteger( prg, res );
+ treeUpref( tree );
+ vm_push( tree );
+ treeDownref( prg, sp, (Tree*)str );
+ break;
+ }
+ case IN_STR_UORD16: {
+ debug( prg, REALM_BYTECODE, "IN_STR_UORD16\n" );
+
+ Str *str = (Str*)vm_pop();
+ Word res = strUord16( str->value );
+ Tree *tree = constructInteger( prg, res );
+ treeUpref( tree );
+ vm_push( tree );
+ treeDownref( prg, sp, (Tree*)str );
+ break;
+ }
+
+ case IN_STR_LENGTH: {
+ debug( prg, REALM_BYTECODE, "IN_STR_LENGTH\n" );
+
+ Str *str = (Str*)vm_pop();
+ long len = stringLength( str->value );
+ Tree *res = constructInteger( prg, len );
+ treeUpref( res );
+ vm_push( res );
+ treeDownref( prg, sp, (Tree*)str );
+ break;
+ }
+ case IN_JMP_FALSE: {
+ short dist;
+ read_half( dist );
+
+ debug( prg, REALM_BYTECODE, "IN_JMP_FALSE %d\n", dist );
+
+ Tree *tree = vm_pop();
+ if ( testFalse( prg, tree ) )
+ instr += dist;
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_JMP_TRUE: {
+ short dist;
+ read_half( dist );
+
+ debug( prg, REALM_BYTECODE, "IN_JMP_TRUE %d\n", dist );
+
+ Tree *tree = vm_pop();
+ if ( !testFalse( prg, tree ) )
+ instr += dist;
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_JMP: {
+ short dist;
+ read_half( dist );
+
+ debug( prg, REALM_BYTECODE, "IN_JMP\n" );
+
+ instr += dist;
+ break;
+ }
+ case IN_REJECT: {
+ debug( prg, REALM_BYTECODE, "IN_REJECT\n" );
+ exec->parser->pdaRun->reject = true;
+ break;
+ }
+
+ /*
+ * Binary comparison operators.
+ */
+ case IN_TST_EQL: {
+ debug( prg, REALM_BYTECODE, "IN_TST_EQL\n" );
+
+ Tree *o2 = vm_pop();
+ Tree *o1 = vm_pop();
+ long r = cmpTree( prg, o1, o2 );
+ Tree *val = r ? prg->falseVal : prg->trueVal;
+ treeUpref( val );
+ vm_push( val );
+ treeDownref( prg, sp, o1 );
+ treeDownref( prg, sp, o2 );
+ break;
+ }
+ case IN_TST_NOT_EQL: {
+ debug( prg, REALM_BYTECODE, "IN_TST_NOT_EQL\n" );
+
+ Tree *o2 = vm_pop();
+ Tree *o1 = vm_pop();
+ long r = cmpTree( prg, o1, o2 );
+ Tree *val = r ? prg->trueVal : prg->falseVal;
+ treeUpref( val );
+ vm_push( val );
+ treeDownref( prg, sp, o1 );
+ treeDownref( prg, sp, o2 );
+ break;
+ }
+ case IN_TST_LESS: {
+ debug( prg, REALM_BYTECODE, "IN_TST_LESS\n" );
+
+ Tree *o2 = vm_pop();
+ Tree *o1 = vm_pop();
+ long r = cmpTree( prg, o1, o2 );
+ Tree *val = r < 0 ? prg->trueVal : prg->falseVal;
+ treeUpref( val );
+ vm_push( val );
+ treeDownref( prg, sp, o1 );
+ treeDownref( prg, sp, o2 );
+ break;
+ }
+ case IN_TST_LESS_EQL: {
+ debug( prg, REALM_BYTECODE, "IN_TST_LESS_EQL\n" );
+
+ Tree *o2 = vm_pop();
+ Tree *o1 = vm_pop();
+ long r = cmpTree( prg, o1, o2 );
+ Tree *val = r <= 0 ? prg->trueVal : prg->falseVal;
+ treeUpref( val );
+ vm_push( val );
+ treeDownref( prg, sp, o1 );
+ treeDownref( prg, sp, o2 );
+ }
+ case IN_TST_GRTR: {
+ debug( prg, REALM_BYTECODE, "IN_TST_GRTR\n" );
+
+ Tree *o2 = vm_pop();
+ Tree *o1 = vm_pop();
+ long r = cmpTree( prg, o1, o2 );
+ Tree *val = r > 0 ? prg->trueVal : prg->falseVal;
+ treeUpref( val );
+ vm_push( val );
+ treeDownref( prg, sp, o1 );
+ treeDownref( prg, sp, o2 );
+ break;
+ }
+ case IN_TST_GRTR_EQL: {
+ debug( prg, REALM_BYTECODE, "IN_TST_GRTR_EQL\n" );
+
+ Tree *o2 = (Tree*)vm_pop();
+ Tree *o1 = (Tree*)vm_pop();
+ long r = cmpTree( prg, o1, o2 );
+ Tree *val = r >= 0 ? prg->trueVal : prg->falseVal;
+ treeUpref( val );
+ vm_push( val );
+ treeDownref( prg, sp, o1 );
+ treeDownref( prg, sp, o2 );
+ break;
+ }
+ case IN_TST_LOGICAL_AND: {
+ debug( prg, REALM_BYTECODE, "IN_TST_LOGICAL_AND\n" );
+
+ Tree *o2 = vm_pop();
+ Tree *o1 = vm_pop();
+ long v2 = !testFalse( prg, o2 );
+ long v1 = !testFalse( prg, o1 );
+ Word r = v1 && v2;
+ Tree *val = r ? prg->trueVal : prg->falseVal;
+ treeUpref( val );
+ vm_push( val );
+ treeDownref( prg, sp, o1 );
+ treeDownref( prg, sp, o2 );
+ break;
+ }
+ case IN_TST_LOGICAL_OR: {
+ debug( prg, REALM_BYTECODE, "IN_TST_LOGICAL_OR\n" );
+
+ Tree *o2 = vm_pop();
+ Tree *o1 = vm_pop();
+ long v2 = !testFalse( prg, o2 );
+ long v1 = !testFalse( prg, o1 );
+ Word r = v1 || v2;
+ Tree *val = r ? prg->trueVal : prg->falseVal;
+ treeUpref( val );
+ vm_push( val );
+ treeDownref( prg, sp, o1 );
+ treeDownref( prg, sp, o2 );
+ break;
+ }
+ case IN_NOT: {
+ debug( prg, REALM_BYTECODE, "IN_NOT\n" );
+
+ Tree *tree = (Tree*)vm_pop();
+ long r = testFalse( prg, tree );
+ Tree *val = r ? prg->trueVal : prg->falseVal;
+ treeUpref( val );
+ vm_push( val );
+ treeDownref( prg, sp, tree );
+ break;
+ }
+
+ case IN_ADD_INT: {
+ debug( prg, REALM_BYTECODE, "IN_ADD_INT\n" );
+
+ Int *o2 = (Int*)vm_pop();
+ Int *o1 = (Int*)vm_pop();
+ long r = o1->value + o2->value;
+ Tree *tree = constructInteger( prg, r );
+ treeUpref( tree );
+ vm_push( tree );
+ treeDownref( prg, sp, (Tree*)o1 );
+ treeDownref( prg, sp, (Tree*)o2 );
+ break;
+ }
+ case IN_MULT_INT: {
+ debug( prg, REALM_BYTECODE, "IN_MULT_INT\n" );
+
+ Int *o2 = (Int*)vm_pop();
+ Int *o1 = (Int*)vm_pop();
+ long r = o1->value * o2->value;
+ Tree *tree = constructInteger( prg, r );
+ treeUpref( tree );
+ vm_push( tree );
+ treeDownref( prg, sp, (Tree*)o1 );
+ treeDownref( prg, sp, (Tree*)o2 );
+ break;
+ }
+ case IN_DIV_INT: {
+ debug( prg, REALM_BYTECODE, "IN_DIV_INT\n" );
+
+ Int *o2 = (Int*)vm_pop();
+ Int *o1 = (Int*)vm_pop();
+ long r = o1->value / o2->value;
+ Tree *tree = constructInteger( prg, r );
+ treeUpref( tree );
+ vm_push( tree );
+ treeDownref( prg, sp, (Tree*)o1 );
+ treeDownref( prg, sp, (Tree*)o2 );
+ break;
+ }
+ case IN_SUB_INT: {
+ debug( prg, REALM_BYTECODE, "IN_SUB_INT\n" );
+
+ Int *o2 = (Int*)vm_pop();
+ Int *o1 = (Int*)vm_pop();
+ long r = o1->value - o2->value;
+ Tree *tree = constructInteger( prg, r );
+ treeUpref( tree );
+ vm_push( tree );
+ treeDownref( prg, sp, (Tree*)o1 );
+ treeDownref( prg, sp, (Tree*)o2 );
+ break;
+ }
+ case IN_TOP_SWAP: {
+ debug( prg, REALM_BYTECODE, "IN_TOP_SWAP\n" );
+
+ Tree *v1 = vm_pop();
+ Tree *v2 = vm_pop();
+ vm_push( v1 );
+ vm_push( v2 );
+ break;
+ }
+ case IN_DUP_TOP: {
+ debug( prg, REALM_BYTECODE, "IN_DUP_TOP\n" );
+
+ Tree *val = vm_top();
+ treeUpref( val );
+ vm_push( val );
+ break;
+ }
+ case IN_TRITER_FROM_REF: {
+ short field;
+ Half searchTypeId;
+ read_half( field );
+ read_half( searchTypeId );
+
+ debug( prg, REALM_BYTECODE, "IN_TRITER_FROM_REF\n" );
+
+ Ref rootRef;
+ rootRef.kid = (Kid*)vm_pop();
+ rootRef.next = (Ref*)vm_pop();
+ void *mem = vm_plocal(field);
+
+ Tree **stackRoot = vm_ptop();
+ long rootSize = vm_ssize();
+
+ initTreeIter( (TreeIter*)mem, stackRoot, rootSize, &rootRef, searchTypeId );
+ break;
+ }
+ case IN_TRITER_DESTROY: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_TRITER_DESTROY\n" );
+
+ TreeIter *iter = (TreeIter*) vm_plocal(field);
+ treeIterDestroy( prg, &sp, iter );
+ break;
+ }
+ case IN_REV_TRITER_FROM_REF: {
+ short field;
+ Half searchTypeId;
+ read_half( field );
+ read_half( searchTypeId );
+
+ debug( prg, REALM_BYTECODE, "IN_REV_TRITER_FROM_REF\n" );
+
+ Ref rootRef;
+ rootRef.kid = (Kid*)vm_pop();
+ rootRef.next = (Ref*)vm_pop();
+
+ Tree **stackRoot = vm_ptop();
+ long rootSize = vm_ssize();
+
+ int children = 0;
+ Kid *kid = treeChild( prg, rootRef.kid->tree );
+ while ( kid != 0 ) {
+ vm_push( (SW)kid );
+ kid = kid->next;
+ children++;
+ }
+
+ void *mem = vm_plocal(field);
+ initRevTreeIter( (RevTreeIter*)mem, stackRoot, rootSize, &rootRef, searchTypeId, children );
+ break;
+ }
+ case IN_REV_TRITER_DESTROY: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_REV_TRITER_DESTROY\n" );
+
+ RevTreeIter *iter = (RevTreeIter*) vm_plocal(field);
+ revTreeIterDestroy( prg, &sp, iter );
+ break;
+ }
+ case IN_TREE_SEARCH: {
+ Word id;
+ read_word( id );
+
+ debug( prg, REALM_BYTECODE, "IN_TREE_SEARCH\n" );
+
+ Tree *tree = vm_pop();
+ Tree *res = treeSearch( prg, tree, id );
+ treeUpref( res );
+ vm_push( res );
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_TRITER_ADVANCE: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_TRITER_ADVANCE\n" );
+
+ TreeIter *iter = (TreeIter*) vm_plocal(field);
+ Tree *res = treeIterAdvance( prg, &sp, iter );
+ treeUpref( res );
+ vm_push( res );
+ break;
+ }
+ case IN_TRITER_NEXT_CHILD: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_TRITER_NEXT_CHILD\n" );
+
+ TreeIter *iter = (TreeIter*) vm_plocal(field);
+ Tree *res = treeIterNextChild( prg, &sp, iter );
+ treeUpref( res );
+ vm_push( res );
+ break;
+ }
+ case IN_REV_TRITER_PREV_CHILD: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_REV_TRITER_PREV_CHILD\n" );
+
+ RevTreeIter *iter = (RevTreeIter*) vm_plocal(field);
+ Tree *res = treeRevIterPrevChild( prg, &sp, iter );
+ treeUpref( res );
+ vm_push( res );
+ break;
+ }
+ case IN_TRITER_NEXT_REPEAT: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_TRITER_NEXT_REPEAT\n" );
+
+ TreeIter *iter = (TreeIter*) vm_plocal(field);
+ Tree *res = treeIterNextRepeat( prg, &sp, iter );
+ treeUpref( res );
+ vm_push( res );
+ break;
+ }
+ case IN_TRITER_PREV_REPEAT: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_TRITER_PREV_REPEAT\n" );
+
+ TreeIter *iter = (TreeIter*) vm_plocal(field);
+ Tree *res = treeIterPrevRepeat( prg, &sp, iter );
+ treeUpref( res );
+ vm_push( res );
+ break;
+ }
+ case IN_TRITER_GET_CUR_R: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_TRITER_GET_CUR_R\n" );
+
+ TreeIter *iter = (TreeIter*) vm_plocal(field);
+ Tree *tree = treeIterDerefCur( iter );
+ treeUpref( tree );
+ vm_push( tree );
+ break;
+ }
+ case IN_TRITER_GET_CUR_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_TRITER_GET_CUR_WC\n" );
+
+ TreeIter *iter = (TreeIter*) vm_plocal(field);
+ splitIterCur( prg, &sp, iter );
+ Tree *tree = treeIterDerefCur( iter );
+ treeUpref( tree );
+ vm_push( tree );
+ break;
+ }
+ case IN_TRITER_SET_CUR_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_TRITER_SET_CUR_WC\n" );
+
+ Tree *tree = vm_pop();
+ TreeIter *iter = (TreeIter*) vm_plocal(field);
+ splitIterCur( prg, &sp, iter );
+ Tree *old = treeIterDerefCur( iter );
+ setTriterCur( prg, iter, tree );
+ treeDownref( prg, sp, old );
+ break;
+ }
+ case IN_MATCH: {
+ Half patternId;
+ read_half( patternId );
+
+ debug( prg, REALM_BYTECODE, "IN_MATCH\n" );
+
+ Tree *tree = vm_pop();
+
+ /* Run the match, push the result. */
+ int rootNode = prg->rtd->patReplInfo[patternId].offset;
+
+ /* Bindings are indexed starting at 1. Zero bindId to represent no
+ * binding. We make a space for it here rather than do math at
+ * access them. */
+ long numBindings = prg->rtd->patReplInfo[patternId].numBindings;
+ Tree *bindings[1+numBindings];
+ memset( bindings, 0, sizeof(Tree*)*(1+numBindings) );
+
+ Kid kid;
+ kid.tree = tree;
+ kid.next = 0;
+ int matched = matchPattern( bindings, prg, rootNode, &kid, false );
+
+ if ( !matched )
+ memset( bindings, 0, sizeof(Tree*)*(1+numBindings) );
+ else {
+ int b;
+ for ( b = 1; b <= numBindings; b++ )
+ assert( bindings[b] != 0 );
+ }
+
+ Tree *result = matched ? tree : 0;
+ treeUpref( result );
+ vm_push( result ? tree : 0 );
+ int b;
+ for ( b = 1; b <= numBindings; b++ ) {
+ treeUpref( bindings[b] );
+ vm_push( bindings[b] );
+ }
+
+ treeDownref( prg, sp, tree );
+ break;
+ }
+
+ case IN_GET_PARSER_CTX_R: {
+ debug( prg, REALM_BYTECODE, "IN_GET_PARSER_CTX_R\n" );
+
+ Tree *obj = vm_pop();
+ Tree *ctx = ((Parser*)obj)->pdaRun->context;
+ treeUpref( ctx );
+ vm_push( ctx );
+ treeDownref( prg, sp, obj );
+ break;
+ }
+
+ case IN_SET_PARSER_CTX_WC: {
+ debug( prg, REALM_BYTECODE, "IN_SET_PARSER_CTX_WC\n" );
+
+ Tree *parser = vm_pop();
+ Tree *val = vm_pop();
+ parserSetContext( prg, sp, (Parser*)parser, val );
+ treeDownref( prg, sp, parser );
+ break;
+ }
+
+// case IN_GET_PARSER_CTX_WC:
+// case IN_GET_PARSER_CTX_WV:
+// case IN_SET_PARSER_CTX_WC:
+// case IN_SET_PARSER_CTX_WV:
+// break;
+
+ case IN_INPUT_APPEND_WC: {
+ debug( prg, REALM_BYTECODE, "IN_INPUT_APPEND_WC \n" );
+
+ Stream *accumStream = (Stream*)vm_pop();
+ Tree *input = vm_pop();
+ streamAppend( prg, sp, input, accumStream->in );
+
+ vm_push( (Tree*)accumStream );
+ treeDownref( prg, sp, input );
+ break;
+ }
+ case IN_INPUT_APPEND_WV: {
+ debug( prg, REALM_BYTECODE, "IN_INPUT_APPEND_WV \n" );
+
+ Stream *accumStream = (Stream*)vm_pop();
+ Tree *input = vm_pop();
+ Word len = streamAppend( prg, sp, input, accumStream->in );
+
+ treeUpref( (Tree*)accumStream );
+ vm_push( (Tree*)accumStream );
+
+ rcodeUnitStart( exec );
+ rcodeCode( exec, IN_INPUT_APPEND_BKT );
+ rcodeWord( exec, (Word) accumStream );
+ rcodeWord( exec, (Word) input );
+ rcodeWord( exec, (Word) len );
+ rcodeUnitTerm( exec );
+ break;
+ }
+
+ case IN_INPUT_APPEND_BKT: {
+ Tree *accumStream;
+ Tree *input;
+ Word len;
+ read_tree( accumStream );
+ read_tree( input );
+ read_word( len );
+
+ debug( prg, REALM_BYTECODE, "IN_INPUT_APPEND_BKT\n" );
+
+ undoStreamAppend( prg, sp, ((Stream*)accumStream)->in, input, len );
+ treeDownref( prg, sp, accumStream );
+ treeDownref( prg, sp, input );
+ break;
+ }
+
+ case IN_SET_ERROR: {
+ debug( prg, REALM_BYTECODE, "IN_SET_ERROR\n" );
+
+ Tree *error = vm_pop();
+ treeDownref( prg, sp, prg->error );
+ prg->error = error;
+ break;
+ }
+
+ case IN_GET_ERROR: {
+ debug( prg, REALM_BYTECODE, "IN_GET_ERROR\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ treeUpref( (Tree*)prg->error );
+ vm_push( (Tree*)prg->error );
+ break;
+ }
+
+ case IN_PARSE_SAVE_STEPS: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_SAVE_STEPS\n" );
+
+ Parser *parser = (Parser*)vm_pop();
+ long steps = parser->pdaRun->steps;
+
+ vm_push( (SW)exec->parser );
+ vm_push( (SW)exec->pcr );
+ vm_push( (SW)exec->steps );
+
+ exec->parser = parser;
+ exec->steps = steps;
+ exec->pcr = PcrStart;
+ break;
+ }
+
+ case IN_PARSE_INIT_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_INIT_BKT\n" );
+
+ Tree *parser;
+ Word pcr;
+ Word steps;
+
+ read_tree( parser );
+ read_word( pcr );
+ read_word( steps );
+
+ vm_push( (SW)exec->parser );
+ vm_push( (SW)exec->pcr );
+ vm_push( (SW)exec->steps );
+
+ exec->parser = (Parser*)parser;
+ exec->steps = steps;
+ exec->pcr = pcr;
+ break;
+ }
+
+ case IN_PCR_CALL: {
+ debug( prg, REALM_BYTECODE, "IN_PCR_CALL\n" );
+
+ FrameInfo *fi = &prg->rtd->frameInfo[exec->parser->pdaRun->frameId];
+ long stretch = fi->argSize + 4 + fi->frameSize;
+ vm_contiguous( stretch );
+
+ vm_push( (SW)exec->framePtr );
+ vm_push( (SW)exec->iframePtr );
+ vm_push( (SW)exec->frameId );
+
+ /* Return location one instruction back. Depends on the size of of the frag/finish. */
+ Code *returnTo = instr - ( SIZEOF_CODE + SIZEOF_CODE + SIZEOF_HALF );
+ vm_push( (SW)returnTo );
+
+ exec->framePtr = 0;
+ exec->iframePtr = 0;
+ exec->frameId = 0;
+
+ exec->frameId = exec->parser->pdaRun->frameId;
+
+ instr = exec->parser->pdaRun->code;
+ break;
+ }
+
+ case IN_PCR_RET: {
+ debug( prg, REALM_BYTECODE, "IN_PCR_RET\n" );
+
+ FrameInfo *fi = &prg->rtd->frameInfo[exec->frameId];
+ downrefLocalTrees( prg, sp, exec->framePtr, fi->locals, fi->localsLen );
+ debug( prg, REALM_BYTECODE, "RET: %d\n", fi->frameSize );
+ vm_popn( fi->frameSize );
+
+ instr = (Code*) vm_pop();
+ exec->frameId = ( long ) vm_pop();
+ exec->iframePtr = ( Tree ** ) vm_pop();
+ exec->framePtr = ( Tree ** ) vm_pop();
+
+ if ( instr == 0 ) {
+ fflush( stdout );
+ goto out;
+ }
+ break;
+ }
+
+ case IN_PCR_END_DECK: {
+ debug( prg, REALM_BYTECODE, "IN_PCR_END_DECK\n" );
+ exec->parser->pdaRun->onDeck = false;
+ break;
+ }
+
+ case IN_PARSE_FRAG_WC: {
+ Half stopId;
+ read_half( stopId );
+
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_WC %hd\n", stopId );
+
+ exec->pcr = parseFrag( prg, sp, exec->parser, stopId, exec->pcr );
+
+ /* If done, jump to the terminating instruction, otherwise fall
+ * through to call some code, then jump back here. */
+ if ( exec->pcr == PcrDone )
+ instr += SIZEOF_CODE;
+ break;
+ }
+
+ case IN_PARSE_FRAG_EXIT_WC: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_EXIT_WC\n" );
+
+ Parser *parser = exec->parser;
+
+ exec->steps = (long)vm_pop();
+ exec->pcr = (long)vm_pop();
+ exec->parser = (Parser*) vm_pop();
+
+ treeDownref( prg, sp, (Tree*)parser );
+
+ if ( prg->induceExit )
+ goto out;
+
+ break;
+ }
+
+ case IN_PARSE_FRAG_WV: {
+ Half stopId;
+ read_half( stopId );
+
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_WV %hd\n", stopId );
+
+ exec->pcr = parseFrag( prg, sp, exec->parser, stopId, exec->pcr );
+
+ /* If done, jump to the terminating instruction, otherwise fall
+ * through to call some code, then jump back here. */
+ if ( exec->pcr == PcrDone )
+ instr += SIZEOF_CODE;
+ break;
+ }
+
+ case IN_PARSE_FRAG_EXIT_WV: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_EXIT_WV \n" );
+
+ Parser *parser = exec->parser;
+ long steps = exec->steps;
+
+ exec->steps = (long)vm_pop();
+ exec->pcr = (long)vm_pop();
+ exec->parser = (Parser*)vm_pop();
+
+ rcodeUnitStart( exec );
+ rcodeCode( exec, IN_PARSE_INIT_BKT );
+ rcodeWord( exec, (Word)parser );
+ rcodeWord( exec, (Word)PcrStart );
+ rcodeWord( exec, steps );
+ rcodeCode( exec, IN_PARSE_FRAG_BKT );
+ rcodeHalf( exec, 0 );
+ rcodeCode( exec, IN_PCR_CALL );
+ rcodeCode( exec, IN_PARSE_FRAG_EXIT_BKT );
+ rcodeUnitTerm( exec );
+
+ if ( prg->induceExit )
+ goto out;
+ break;
+ }
+
+ case IN_PARSE_FRAG_BKT: {
+ Half stopId;
+ read_half( stopId );
+
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_BKT %hd\n", stopId );
+
+ exec->pcr = undoParseFrag( prg, sp, exec->parser, exec->steps, exec->pcr );
+
+ if ( exec->pcr == PcrDone )
+ instr += SIZEOF_CODE;
+ break;
+ }
+
+ case IN_PARSE_FRAG_EXIT_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FRAG_EXIT_BKT\n" );
+
+ Parser *parser = exec->parser;
+
+ exec->steps = (long)vm_pop();
+ exec->pcr = (long)vm_pop();
+ exec->parser = (Parser*)vm_pop();
+
+ treeDownref( prg, sp, (Tree*)parser );
+ break;
+ }
+
+ case IN_PARSE_FINISH_WC: {
+ Half stopId;
+ read_half( stopId );
+
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_WC %hd\n", stopId );
+
+ exec->parser->result = 0;
+ exec->pcr = parseFinish( &exec->parser->result, prg, sp, exec->parser, false, exec->pcr );
+
+ /* If done, jump to the terminating instruction, otherwise fall
+ * through to call some code, then jump back here. */
+ if ( exec->pcr == PcrDone )
+ instr += SIZEOF_CODE;
+ break;
+ }
+
+ case IN_PARSE_FINISH_EXIT_WC: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_EXIT_WC\n" );
+
+ Parser *parser = exec->parser;
+
+ exec->steps = (long)vm_pop();
+ exec->pcr = (long)vm_pop();
+ exec->parser = (Parser*)vm_pop();
+
+ vm_push( parser->result );
+ treeDownref( prg, sp, (Tree*)parser );
+ if ( prg->induceExit )
+ goto out;
+
+ break;
+ }
+
+ case IN_PARSE_FINISH_WV: {
+ Half stopId;
+ read_half( stopId );
+
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_WV %hd\n", stopId );
+
+ exec->parser->result = 0;
+ exec->pcr = parseFinish( &exec->parser->result, prg, sp, exec->parser, true, exec->pcr );
+
+ if ( exec->pcr == PcrDone )
+ instr += SIZEOF_CODE;
+ break;
+ }
+
+ case IN_PARSE_FINISH_EXIT_WV: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_EXIT_WV\n" );
+
+ Parser *parser = exec->parser;
+ long steps = exec->steps;
+
+ exec->steps = (long)vm_pop();
+ exec->pcr = (long)vm_pop();
+ exec->parser = (Parser *) vm_pop();
+
+ vm_push( parser->result );
+
+ rcodeUnitStart( exec );
+ rcodeCode( exec, IN_PARSE_INIT_BKT );
+ rcodeWord( exec, (Word)parser );
+ rcodeWord( exec, (Word)PcrStart );
+ rcodeWord( exec, steps );
+ rcodeCode( exec, IN_PARSE_FINISH_BKT );
+ rcodeHalf( exec, 0 );
+ rcodeCode( exec, IN_PCR_CALL );
+ rcodeCode( exec, IN_PARSE_FINISH_EXIT_BKT );
+ rcodeUnitTerm( exec );
+
+ if ( prg->induceExit )
+ goto out;
+
+ break;
+ }
+
+ case IN_PARSE_FINISH_BKT: {
+ Half stopId;
+ read_half( stopId );
+
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_BKT %hd\n", stopId );
+
+ exec->pcr = undoParseFrag( prg, sp, exec->parser, exec->steps, exec->pcr );
+
+ if ( exec->pcr == PcrDone )
+ instr += SIZEOF_CODE;
+ break;
+ }
+
+ case IN_PARSE_FINISH_EXIT_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_PARSE_FINISH_EXIT_BKT\n" );
+
+ Parser *parser = exec->parser;
+
+ exec->steps = (long)vm_pop();
+ exec->pcr = (long)vm_pop();
+ exec->parser = (Parser*)vm_pop();
+
+ parser->input->in->funcs->unsetEof( parser->input->in );
+ treeDownref( prg, sp, (Tree*)parser );
+ break;
+ }
+
+ case IN_INPUT_PULL_WV: {
+ debug( prg, REALM_BYTECODE, "IN_INPUT_PULL_WV\n" );
+
+ Stream *accumStream = (Stream*)vm_pop();
+ Tree *len = vm_pop();
+ PdaRun *pdaRun = exec->parser != 0 ? exec->parser->pdaRun : 0;
+ Tree *string = streamPullBc( prg, pdaRun, accumStream->in, len );
+ treeUpref( string );
+ vm_push( string );
+
+ /* Single unit. */
+ treeUpref( string );
+ rcodeCode( exec, IN_INPUT_PULL_BKT );
+ rcodeWord( exec, (Word) string );
+ rcodeUnitTerm( exec );
+
+ treeDownref( prg, sp, (Tree*)accumStream );
+ treeDownref( prg, sp, len );
+ break;
+ }
+
+ case IN_INPUT_PULL_WC: {
+ debug( prg, REALM_BYTECODE, "IN_INPUT_PULL_WC\n" );
+
+ Stream *accumStream = (Stream*)vm_pop();
+ Tree *len = vm_pop();
+ PdaRun *pdaRun = exec->parser != 0 ? exec->parser->pdaRun : 0;
+ Tree *string = streamPullBc( prg, pdaRun, accumStream->in, len );
+ treeUpref( string );
+ vm_push( string );
+
+ treeDownref( prg, sp, (Tree*)accumStream );
+ treeDownref( prg, sp, len );
+ break;
+ }
+ case IN_INPUT_PULL_BKT: {
+ Tree *string;
+ read_tree( string );
+
+ Tree *accumStream = vm_pop();
+
+ debug( prg, REALM_BYTECODE, "IN_INPUT_PULL_BKT\n" );
+
+ undoPull( prg, ((Stream*)accumStream)->in, string );
+ treeDownref( prg, sp, accumStream );
+ treeDownref( prg, sp, string );
+ break;
+ }
+ case IN_INPUT_PUSH_WV: {
+ debug( prg, REALM_BYTECODE, "IN_INPUT_PUSH_WV\n" );
+
+ Stream *input = (Stream*)vm_pop();
+ Tree *tree = vm_pop();
+ long len = streamPush( prg, sp, input->in, tree, false );
+ vm_push( 0 );
+
+ /* Single unit. */
+ rcodeCode( exec, IN_INPUT_PUSH_BKT );
+ rcodeWord( exec, len );
+ rcodeUnitTerm( exec );
+
+ treeDownref( prg, sp, (Tree*)input );
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_INPUT_PUSH_IGNORE_WV: {
+ debug( prg, REALM_BYTECODE, "IN_INPUT_PUSH_IGNORE_WV\n" );
+
+ Stream *input = (Stream*)vm_pop();
+ Tree *tree = vm_pop();
+ long len = streamPush( prg, sp, input->in, tree, true );
+ vm_push( 0 );
+
+ /* Single unit. */
+ rcodeCode( exec, IN_INPUT_PUSH_BKT );
+ rcodeWord( exec, len );
+ rcodeUnitTerm( exec );
+
+ treeDownref( prg, sp, (Tree*)input );
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_INPUT_PUSH_BKT: {
+ Word len;
+ read_word( len );
+
+ Stream *input = (Stream*)vm_pop();
+
+ debug( prg, REALM_BYTECODE, "IN_INPUT_PUSH_BKT\n" );
+
+ undoStreamPush( prg, sp, input->in, len );
+ treeDownref( prg, sp, (Tree*)input );
+ break;
+ }
+ case IN_CONSTRUCT: {
+ Half patternId;
+ read_half( patternId );
+
+ debug( prg, REALM_BYTECODE, "IN_CONSTRUCT\n" );
+
+ int rootNode = prg->rtd->patReplInfo[patternId].offset;
+
+ /* Note that bindIds are indexed at one. Add one spot for them. */
+ int numBindings = prg->rtd->patReplInfo[patternId].numBindings;
+ Tree *bindings[1+numBindings];
+
+ int b;
+ for ( b = 1; b <= numBindings; b++ ) {
+ bindings[b] = vm_pop();
+ assert( bindings[b] != 0 );
+ }
+
+ Tree *replTree = 0;
+ PatConsNode *nodes = prg->rtd->patReplNodes;
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+ long genericId = lelInfo[nodes[rootNode].id].genericId;
+ if ( genericId > 0 ) {
+ replTree = createGeneric( prg, genericId );
+ treeUpref( replTree );
+ }
+ else {
+ replTree = constructReplacementTree( 0, bindings,
+ prg, rootNode );
+ }
+
+ vm_push( replTree );
+ break;
+ }
+ case IN_CONSTRUCT_INPUT: {
+ debug( prg, REALM_BYTECODE, "IN_CONSTRUCT_INPUT\n" );
+
+ Tree *input = constructStream( prg );
+ treeUpref( input );
+ vm_push( input );
+ break;
+ }
+ case IN_GET_INPUT: {
+ debug( prg, REALM_BYTECODE, "IN_GET_INPUT\n" );
+
+ Parser *parser = (Parser*)vm_pop();
+ treeUpref( (Tree*)parser->input );
+ vm_push( (Tree*)parser->input );
+ treeDownref( prg, sp, (Tree*)parser );
+ break;
+ }
+ case IN_SET_INPUT: {
+ debug( prg, REALM_BYTECODE, "IN_SET_INPUT\n" );
+
+ Parser *parser = (Parser*)vm_pop();
+ Stream *accumStream = (Stream*)vm_pop();
+ parser->input = accumStream;
+ treeUpref( (Tree*)accumStream );
+ treeDownref( prg, sp, (Tree*)parser );
+ treeDownref( prg, sp, (Tree*)accumStream );
+ break;
+ }
+ case IN_CONSTRUCT_TERM: {
+ Half tokenId;
+ read_half( tokenId );
+
+ debug( prg, REALM_BYTECODE, "IN_CONSTRUCT_TERM\n" );
+
+ /* Pop the string we are constructing the token from. */
+ Str *str = (Str*)vm_pop();
+ Tree *res = constructTerm( prg, tokenId, str->value );
+ treeUpref( res );
+ vm_push( res );
+ break;
+ }
+ case IN_MAKE_TOKEN: {
+ uchar nargs;
+ int i;
+ read_byte( nargs );
+
+ debug( prg, REALM_BYTECODE, "IN_MAKE_TOKEN\n" );
+
+ Tree *arg[nargs];
+ for ( i = nargs-1; i >= 0; i-- )
+ arg[i] = vm_pop();
+
+ Tree *result = constructToken( prg, arg, nargs );
+ for ( i = 0; i < nargs; i++ )
+ treeDownref( prg, sp, arg[i] );
+ vm_push( result );
+ break;
+ }
+ case IN_MAKE_TREE: {
+ uchar nargs;
+ int i;
+ read_byte( nargs );
+
+ debug( prg, REALM_BYTECODE, "IN_MAKE_TREE\n" );
+
+ Tree *arg[nargs];
+ for ( i = nargs-1; i >= 0; i-- )
+ arg[i] = vm_pop();
+
+ Tree *result = makeTree( prg, arg, nargs );
+ for ( i = 0; i < nargs; i++ )
+ treeDownref( prg, sp, arg[i] );
+
+ vm_push( result );
+ break;
+ }
+ case IN_TREE_CAST: {
+ Half langElId;
+ read_half( langElId );
+
+ debug( prg, REALM_BYTECODE, "IN_TREE_CAST %hd\n", langElId );
+
+ Tree *tree = vm_pop();
+ Tree *res = castTree( prg, langElId, tree );
+ treeUpref( res );
+ treeDownref( prg, sp, tree );
+ vm_push( res );
+ break;
+ }
+ case IN_TREE_NEW: {
+ debug( prg, REALM_BYTECODE, "IN_TREE_NEW \n" );
+
+ Tree *tree = vm_pop();
+ Tree *res = constructPointer( prg, tree );
+ treeUpref( res );
+ vm_push( res );
+ break;
+ }
+ case IN_PTR_DEREF_R: {
+ debug( prg, REALM_BYTECODE, "IN_PTR_DEREF_R\n" );
+
+ Pointer *ptr = (Pointer*)vm_pop();
+ treeDownref( prg, sp, (Tree*)ptr );
+
+ Tree *dval = getPtrVal( ptr );
+ treeUpref( dval );
+ vm_push( dval );
+ break;
+ }
+ case IN_PTR_DEREF_WC: {
+ debug( prg, REALM_BYTECODE, "IN_PTR_DEREF_WC\n" );
+
+ Pointer *ptr = (Pointer*)vm_pop();
+ treeDownref( prg, sp, (Tree*)ptr );
+
+ Tree *dval = getPtrValSplit( prg, ptr );
+ treeUpref( dval );
+ vm_push( dval );
+ break;
+ }
+ case IN_PTR_DEREF_WV: {
+ debug( prg, REALM_BYTECODE, "IN_PTR_DEREF_WV\n" );
+
+ Pointer *ptr = (Pointer*)vm_pop();
+ /* Don't downref the pointer since it is going into the reverse
+ * instruction. */
+
+ Tree *dval = getPtrValSplit( prg, ptr );
+ treeUpref( dval );
+ vm_push( dval );
+
+ /* This is an initial global load. Need to reverse execute it. */
+ rcodeUnitStart( exec );
+ rcodeCode( exec, IN_PTR_DEREF_BKT );
+ rcodeWord( exec, (Word) ptr );
+ break;
+ }
+ case IN_PTR_DEREF_BKT: {
+ Word p;
+ read_word( p );
+
+ debug( prg, REALM_BYTECODE, "IN_PTR_DEREF_BKT\n" );
+
+ Pointer *ptr = (Pointer*)p;
+
+ Tree *dval = getPtrValSplit( prg, ptr );
+ treeUpref( dval );
+ vm_push( dval );
+
+ treeDownref( prg, sp, (Tree*)ptr );
+ break;
+ }
+ case IN_REF_FROM_LOCAL: {
+ short int field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_REF_FROM_LOCAL %hd\n", field );
+
+ /* First push the null next pointer, then the kid pointer. */
+ Tree **ptr = vm_plocal(field);
+ vm_contiguous( 2 );
+ vm_push( 0 );
+ vm_push( (SW)ptr );
+ break;
+ }
+ case IN_REF_FROM_REF: {
+ short int field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_REF_FROM_REF\n" );
+
+ Ref *ref = (Ref*)vm_plocal(field);
+ vm_contiguous( 2 );
+ vm_push( (SW)ref );
+ vm_push( (SW)ref->kid );
+ break;
+ }
+ case IN_REF_FROM_QUAL_REF: {
+ short int back;
+ short int field;
+ read_half( back );
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_REF_FROM_QUAL_REF\n" );
+
+ Ref *ref = (Ref*)(sp + back);
+
+ Tree *obj = ref->kid->tree;
+ Kid *attr_kid = getFieldKid( obj, field );
+
+ vm_contiguous( 2 );
+ vm_push( (SW)ref );
+ vm_push( (SW)attr_kid );
+ break;
+ }
+ case IN_REF_FROM_BACK: {
+ short int back;
+ read_half( back );
+
+ debug( prg, REALM_BYTECODE, "IN_REF_FROM_BACK %hd\n", back );
+
+ Tree **ptr = (Tree**)(sp + back);
+
+ vm_contiguous( 2 );
+ vm_push( 0 );
+ vm_push( (SW)ptr );
+ break;
+ }
+ case IN_TRITER_REF_FROM_CUR: {
+ short int field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_TRITER_REF_FROM_CUR\n" );
+
+ /* Push the next pointer first, then the kid. */
+ TreeIter *iter = (TreeIter*) vm_plocal(field);
+ Ref *ref = &iter->ref;
+ vm_contiguous( 2 );
+ vm_push( (SW)ref );
+ vm_push( (SW)iter->ref.kid );
+ break;
+ }
+ case IN_UITER_REF_FROM_CUR: {
+ short int field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_UITER_REF_FROM_CUR\n" );
+
+ /* Push the next pointer first, then the kid. */
+ UserIter *uiter = (UserIter*) vm_local(field);
+ vm_contiguous( 2 );
+ vm_push( (SW)uiter->ref.next );
+ vm_push( (SW)uiter->ref.kid );
+ break;
+ }
+ case IN_GET_TOKEN_DATA_R: {
+ debug( prg, REALM_BYTECODE, "IN_GET_TOKEN_DATA_R\n" );
+
+ Tree *tree = (Tree*) vm_pop();
+ Head *data = stringCopy( prg, tree->tokdata );
+ Tree *str = constructString( prg, data );
+ treeUpref( str );
+ vm_push( str );
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_SET_TOKEN_DATA_WC: {
+ debug( prg, REALM_BYTECODE, "IN_SET_TOKEN_DATA_WC\n" );
+
+ Tree *tree = vm_pop();
+ Tree *val = vm_pop();
+ Head *head = stringCopy( prg, ((Str*)val)->value );
+ stringFree( prg, tree->tokdata );
+ tree->tokdata = head;
+
+ treeDownref( prg, sp, tree );
+ treeDownref( prg, sp, val );
+ break;
+ }
+ case IN_SET_TOKEN_DATA_WV: {
+ debug( prg, REALM_BYTECODE, "IN_SET_TOKEN_DATA_WV\n" );
+
+ Tree *tree = vm_pop();
+ Tree *val = vm_pop();
+
+ Head *oldval = tree->tokdata;
+ Head *head = stringCopy( prg, ((Str*)val)->value );
+ tree->tokdata = head;
+
+ /* Set up reverse code. Needs no args. */
+ rcodeCode( exec, IN_SET_TOKEN_DATA_BKT );
+ rcodeWord( exec, (Word)oldval );
+ rcodeUnitTerm( exec );
+
+ treeDownref( prg, sp, tree );
+ treeDownref( prg, sp, val );
+ break;
+ }
+ case IN_SET_TOKEN_DATA_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_SET_TOKEN_DATA_BKT \n" );
+
+ Word oldval;
+ read_word( oldval );
+
+ Tree *tree = vm_pop();
+ Head *head = (Head*)oldval;
+ stringFree( prg, tree->tokdata );
+ tree->tokdata = head;
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_GET_TOKEN_POS_R: {
+ debug( prg, REALM_BYTECODE, "IN_GET_TOKEN_POS_R\n" );
+
+ Tree *tree = (Tree*) vm_pop();
+ Tree *integer = 0;
+ if ( tree->tokdata->location ) {
+ integer = constructInteger( prg, tree->tokdata->location->byte );
+ treeUpref( integer );
+ }
+ vm_push( integer );
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_GET_TOKEN_LINE_R: {
+ debug( prg, REALM_BYTECODE, "IN_GET_TOKEN_LINE_R\n" );
+
+ Tree *tree = (Tree*) vm_pop();
+ Tree *integer = 0;
+ if ( tree->tokdata->location ) {
+ integer = constructInteger( prg, tree->tokdata->location->line );
+ treeUpref( integer );
+ }
+ vm_push( integer );
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_GET_MATCH_LENGTH_R: {
+ debug( prg, REALM_BYTECODE, "IN_GET_MATCH_LENGTH_R\n" );
+
+ Tree *integer = constructInteger( prg, stringLength(exec->parser->pdaRun->tokdata) );
+ treeUpref( integer );
+ vm_push( integer );
+ break;
+ }
+ case IN_GET_MATCH_TEXT_R: {
+ debug( prg, REALM_BYTECODE, "IN_GET_MATCH_TEXT_R\n" );
+
+ Head *s = stringCopy( prg, exec->parser->pdaRun->tokdata );
+ Tree *tree = constructString( prg, s );
+ treeUpref( tree );
+ vm_push( tree );
+ break;
+ }
+ case IN_LIST_LENGTH: {
+ debug( prg, REALM_BYTECODE, "IN_LIST_LENGTH\n" );
+
+ List *list = (List*) vm_pop();
+ long len = listLength( list );
+ Tree *res = constructInteger( prg, len );
+ treeDownref( prg, sp, (Tree*)list );
+ treeUpref( res );
+ vm_push( res );
+ break;
+ }
+ case IN_LIST_APPEND_WV: {
+ debug( prg, REALM_BYTECODE, "IN_LIST_APPEND_WV\n" );
+
+ Tree *obj = vm_pop();
+ Tree *val = vm_pop();
+
+ treeDownref( prg, sp, obj );
+
+ listAppend2( prg, (List*)obj, val );
+ treeUpref( prg->trueVal );
+ vm_push( prg->trueVal );
+
+ /* Set up reverse code. Needs no args. */
+ rcodeCode( exec, IN_LIST_APPEND_BKT );
+ rcodeUnitTerm( exec );
+ break;
+ }
+ case IN_LIST_APPEND_WC: {
+ debug( prg, REALM_BYTECODE, "IN_LIST_APPEND_WC\n" );
+
+ Tree *obj = vm_pop();
+ Tree *val = vm_pop();
+
+ treeDownref( prg, sp, obj );
+
+ listAppend2( prg, (List*)obj, val );
+ treeUpref( prg->trueVal );
+ vm_push( prg->trueVal );
+ break;
+ }
+ case IN_LIST_APPEND_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_LIST_APPEND_BKT\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *tree = listRemoveEnd( prg, (List*)obj );
+ treeDownref( prg, sp, tree );
+ break;
+ }
+ case IN_LIST_REMOVE_END_WC: {
+ debug( prg, REALM_BYTECODE, "IN_LIST_REMOVE_END_WC\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *end = listRemoveEnd( prg, (List*)obj );
+ vm_push( end );
+ break;
+ }
+ case IN_LIST_REMOVE_END_WV: {
+ debug( prg, REALM_BYTECODE, "IN_LIST_REMOVE_END_WV\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *end = listRemoveEnd( prg, (List*)obj );
+ vm_push( end );
+
+ /* Set up reverse. The result comes off the list downrefed.
+ * Need it up referenced for the reverse code too. */
+ treeUpref( end );
+ rcodeCode( exec, IN_LIST_REMOVE_END_BKT );
+ rcodeWord( exec, (Word)end );
+ rcodeUnitTerm( exec );
+ break;
+ }
+ case IN_LIST_REMOVE_END_BKT: {
+ debug( prg, REALM_BYTECODE, "IN_LIST_REMOVE_END_BKT\n" );
+
+ Tree *val;
+ read_tree( val );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ listAppend2( prg, (List*)obj, val );
+ break;
+ }
+ case IN_GET_LIST_MEM_R: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_LIST_MEM_R\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *val = getListMem( (List*)obj, field );
+ treeUpref( val );
+ vm_push( val );
+ break;
+ }
+ case IN_GET_LIST_MEM_WC: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_LIST_MEM_WC\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *val = getListMemSplit( prg, (List*)obj, field );
+ treeUpref( val );
+ vm_push( val );
+ break;
+ }
+ case IN_GET_LIST_MEM_WV: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_LIST_MEM_WV\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *val = getListMemSplit( prg, (List*)obj, field );
+ treeUpref( val );
+ vm_push( val );
+
+ /* Set up the reverse instruction. */
+ rcodeCode( exec, IN_GET_LIST_MEM_BKT );
+ rcodeHalf( exec, field );
+ break;
+ }
+ case IN_GET_LIST_MEM_BKT: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_LIST_MEM_BKT\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *res = getListMemSplit( prg, (List*)obj, field );
+ treeUpref( res );
+ vm_push( res );
+ break;
+ }
+ case IN_SET_LIST_MEM_WC: {
+ Half field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_LIST_MEM_WC\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *val = vm_pop();
+ Tree *existing = setListMem( (List*)obj, field, val );
+ treeDownref( prg, sp, existing );
+ break;
+ }
+ case IN_SET_LIST_MEM_WV: {
+ Half field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_LIST_MEM_WV\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *val = vm_pop();
+ Tree *existing = setListMem( (List*)obj, field, val );
+
+ /* Set up the reverse instruction. */
+ rcodeCode( exec, IN_SET_LIST_MEM_BKT );
+ rcodeHalf( exec, field );
+ rcodeWord( exec, (Word)existing );
+ rcodeUnitTerm( exec );
+ break;
+ }
+ case IN_SET_LIST_MEM_BKT: {
+ Half field;
+ Tree *val;
+ read_half( field );
+ read_tree( val );
+
+ debug( prg, REALM_BYTECODE, "IN_SET_LIST_MEM_BKT\n" );
+
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+
+ Tree *undid = setListMem( (List*)obj, field, val );
+ treeDownref( prg, sp, undid );
+ break;
+ }
+ case IN_GET_PARSER_MEM_R: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_GET_PARSER_MEM_R %hd\n", field );
+
+ Tree *obj = vm_pop();
+ Tree *val = getParserMem( (Parser*)obj, field );
+ treeUpref( val );
+
+ /* In at least one case we extract the result on a parser with ref
+ * one. Do it after. */
+ treeDownref( prg, sp, obj );
+ vm_push( val );
+ break;
+ }
+ case IN_MAP_INSERT_WV: {
+ debug( prg, REALM_BYTECODE, "IN_MAP_INSERT_WV\n" );
+
+ Tree *obj = vm_pop();
+ Tree *val = vm_pop();
+ Tree *key = vm_pop();
+
+ treeDownref( prg, sp, obj );
+
+ int inserted = mapInsert( prg, (Map*)obj, key, val );
+ Tree *result = inserted ? prg->trueVal : prg->falseVal;
+ treeUpref( result );
+ vm_push( result );
+
+ /* Set up the reverse instruction. If the insert fails still need
+ * to pop the loaded map object. Just use the reverse instruction
+ * since it's nice to see it in the logs. */
+
+ /* Need to upref key for storage in reverse code. */
+ treeUpref( key );
+ rcodeCode( exec, IN_MAP_INSERT_BKT );
+ rcodeCode( exec, inserted );
+ rcodeWord( exec, (Word)key );
+ rcodeUnitTerm( exec );
+
+ if ( ! inserted ) {
+ treeDownref( prg, sp, key );
+ treeDownref( prg, sp, val );
+ }
+ break;
+ }
+ case IN_MAP_INSERT_WC: {
+ debug( prg, REALM_BYTECODE, "IN_MAP_INSERT_WC\n" );
+
+ Tree *obj = vm_pop();
+ Tree *val = vm_pop();
+ Tree *key = vm_pop();
+
+ treeDownref( prg, sp, obj );
+
+ int inserted = mapInsert( prg, (Map*)obj, key, val );
+ Tree *result = inserted ? prg->trueVal : prg->falseVal;
+ treeUpref( result );
+ vm_push( result );
+
+ if ( ! inserted ) {
+ treeDownref( prg, sp, key );
+ treeDownref( prg, sp, val );
+ }
+ break;
+ }
+ case IN_MAP_INSERT_BKT: {
+ uchar inserted;
+ Tree *key;
+ read_byte( inserted );
+ read_tree( key );
+
+ debug( prg, REALM_BYTECODE, "IN_MAP_INSERT_BKT\n" );
+
+ Tree *obj = vm_pop();
+ if ( inserted ) {
+ Tree *val = mapUninsert( prg, (Map*)obj, key );
+ treeDownref( prg, sp, key );
+ treeDownref( prg, sp, val );
+ }
+
+ treeDownref( prg, sp, obj );
+ treeDownref( prg, sp, key );
+ break;
+ }
+ case IN_MAP_STORE_WC: {
+ debug( prg, REALM_BYTECODE, "IN_MAP_STORE_WC\n" );
+
+ Tree *obj = vm_pop();
+ Tree *element = vm_pop();
+ Tree *key = vm_pop();
+
+ Tree *existing = mapStore( prg, (Map*)obj, key, element );
+ Tree *result = existing == 0 ? prg->trueVal : prg->falseVal;
+ treeUpref( result );
+ vm_push( result );
+
+ treeDownref( prg, sp, obj );
+ if ( existing != 0 ) {
+ treeDownref( prg, sp, key );
+ treeDownref( prg, sp, existing );
+ }
+ break;
+ }
+ case IN_MAP_STORE_WV: {
+ debug( prg, REALM_BYTECODE, "IN_MAP_STORE_WV\n" );
+
+ Tree *obj = vm_pop();
+ Tree *element = vm_pop();
+ Tree *key = vm_pop();
+
+ Tree *existing = mapStore( prg, (Map*)obj, key, element );
+ Tree *result = existing == 0 ? prg->trueVal : prg->falseVal;
+ treeUpref( result );
+ vm_push( result );
+
+ /* Set up the reverse instruction. */
+ treeUpref( key );
+ treeUpref( existing );
+ rcodeCode( exec, IN_MAP_STORE_BKT );
+ rcodeWord( exec, (Word)key );
+ rcodeWord( exec, (Word)existing );
+ rcodeUnitTerm( exec );
+
+ treeDownref( prg, sp, obj );
+ if ( existing != 0 ) {
+ treeDownref( prg, sp, key );
+ treeDownref( prg, sp, existing );
+ }
+ break;
+ }
+ case IN_MAP_STORE_BKT: {
+ Tree *key, *val;
+ read_tree( key );
+ read_tree( val );
+
+ debug( prg, REALM_BYTECODE, "IN_MAP_STORE_BKT\n" );
+
+ Tree *obj = vm_pop();
+ Tree *stored = mapUnstore( prg, (Map*)obj, key, val );
+
+ treeDownref( prg, sp, stored );
+ if ( val == 0 )
+ treeDownref( prg, sp, key );
+
+ treeDownref( prg, sp, obj );
+ treeDownref( prg, sp, key );
+ break;
+ }
+ case IN_MAP_REMOVE_WC: {
+ debug( prg, REALM_BYTECODE, "IN_MAP_REMOVE_WC\n" );
+
+ Tree *obj = vm_pop();
+ Tree *key = vm_pop();
+ TreePair pair = mapRemove( prg, (Map*)obj, key );
+
+ vm_push( pair.val );
+
+ treeDownref( prg, sp, obj );
+ treeDownref( prg, sp, key );
+ treeDownref( prg, sp, pair.key );
+ break;
+ }
+ case IN_MAP_REMOVE_WV: {
+ debug( prg, REALM_BYTECODE, "IN_MAP_REMOVE_WV\n" );
+
+ Tree *obj = vm_pop();
+ Tree *key = vm_pop();
+ TreePair pair = mapRemove( prg, (Map*)obj, key );
+
+ treeUpref( pair.val );
+ vm_push( pair.val );
+
+ /* Reverse instruction. */
+ rcodeCode( exec, IN_MAP_REMOVE_BKT );
+ rcodeWord( exec, (Word)pair.key );
+ rcodeWord( exec, (Word)pair.val );
+ rcodeUnitTerm( exec );
+
+ treeDownref( prg, sp, obj );
+ treeDownref( prg, sp, key );
+ break;
+ }
+ case IN_MAP_REMOVE_BKT: {
+ Tree *key, *val;
+ read_tree( key );
+ read_tree( val );
+
+ debug( prg, REALM_BYTECODE, "IN_MAP_REMOVE_BKT\n" );
+
+ /* Either both or neither. */
+ assert( ( key == 0 ) ^ ( val != 0 ) );
+
+ Tree *obj = vm_pop();
+ if ( key != 0 )
+ mapUnremove( prg, (Map*)obj, key, val );
+
+ treeDownref( prg, sp, obj );
+ break;
+ }
+ case IN_MAP_LENGTH: {
+ debug( prg, REALM_BYTECODE, "IN_MAP_LENGTH\n" );
+
+ Tree *obj = vm_pop();
+ long len = mapLength( (Map*)obj );
+ Tree *res = constructInteger( prg, len );
+ treeUpref( res );
+ vm_push( res );
+
+ treeDownref( prg, sp, obj );
+ break;
+ }
+ case IN_MAP_FIND: {
+ debug( prg, REALM_BYTECODE, "IN_MAP_FIND\n" );
+
+ Tree *obj = vm_pop();
+ Tree *key = vm_pop();
+ Tree *result = mapFind( prg, (Map*)obj, key );
+ treeUpref( result );
+ vm_push( result );
+
+ treeDownref( prg, sp, obj );
+ treeDownref( prg, sp, key );
+ break;
+ }
+ case IN_CONTIGUOUS: {
+ Half size;
+ read_half( size );
+ debug( prg, REALM_BYTECODE, "IN_CONTIGUOUS %hd\n", size );
+ vm_contiguous( size );
+ vm_push( 0 );
+ break;
+ }
+ case IN_INIT_LOCALS: {
+ Half size;
+ read_half( size );
+
+ debug( prg, REALM_BYTECODE, "IN_INIT_LOCALS %hd\n", size );
+
+ exec->framePtr = vm_ptop();
+ vm_pushn( size );
+ memset( vm_ptop(), 0, sizeof(Word) * size );
+ break;
+ }
+ case IN_CALL_WV: {
+ Half funcId;
+ read_half( funcId );
+
+ FunctionInfo *fi = &prg->rtd->functionInfo[funcId];
+
+ debug( prg, REALM_BYTECODE, "IN_CALL_WV %s\n", fi->name );
+
+ vm_push( 0 ); /* Return value. */
+ vm_push( (SW)instr );
+ vm_push( (SW)exec->framePtr );
+ vm_push( (SW)exec->frameId );
+
+ instr = prg->rtd->frameInfo[fi->frameId].codeWV;
+ exec->framePtr = vm_ptop();
+ exec->frameId = fi->frameId;
+ break;
+ }
+ case IN_CALL_WC: {
+ Half funcId;
+ read_half( funcId );
+
+ FunctionInfo *fi = &prg->rtd->functionInfo[funcId];
+
+ debug( prg, REALM_BYTECODE, "IN_CALL_WC %s\n", fi->name );
+
+ vm_push( 0 ); /* Return value. */
+ vm_push( (SW)instr );
+ vm_push( (SW)exec->framePtr );
+ vm_push( (SW)exec->frameId );
+
+ instr = prg->rtd->frameInfo[fi->frameId].codeWC;
+ exec->framePtr = vm_ptop();
+ exec->frameId = fi->frameId;
+ break;
+ }
+ case IN_YIELD: {
+ debug( prg, REALM_BYTECODE, "IN_YIELD\n" );
+
+ Kid *kid = (Kid*)vm_pop();
+ Ref *next = (Ref*)vm_pop();
+ UserIter *uiter = (UserIter*) vm_plocal_iframe( IFR_AA );
+
+ if ( kid == 0 || kid->tree == 0 ||
+ kid->tree->id == uiter->searchId ||
+ uiter->searchId == prg->rtd->anyId )
+ {
+ /* Store the yeilded value. */
+ uiter->ref.kid = kid;
+ uiter->ref.next = next;
+ uiter->yieldSize = vm_ssize() - uiter->rootSize;
+ uiter->resume = instr;
+ uiter->frame = exec->framePtr;
+
+ /* Restore the instruction and frame pointer. */
+ instr = (Code*) vm_local_iframe(IFR_RIN);
+ exec->framePtr = (Tree**) vm_local_iframe(IFR_RFR);
+ exec->iframePtr = (Tree**) vm_local_iframe(IFR_RIF);
+
+ /* Return the yield result on the top of the stack. */
+ Tree *result = uiter->ref.kid != 0 ? prg->trueVal : prg->falseVal;
+ treeUpref( result );
+ vm_push( result );
+ }
+ break;
+ }
+ case IN_UITER_CREATE_WV: {
+ short field;
+ Half funcId, searchId;
+ read_half( field );
+ read_half( funcId );
+ read_half( searchId );
+
+ debug( prg, REALM_BYTECODE, "IN_UITER_CREATE_WV\n" );
+
+ FunctionInfo *fi = prg->rtd->functionInfo + funcId;
+ UserIter *uiter = uiterCreate( prg, &sp, fi, searchId );
+ vm_local(field) = (SW) uiter;
+
+ /* This is a setup similar to as a call, only the frame structure
+ * is slightly different for user iterators. We aren't going to do
+ * the call. We don't need to set up the return ip because the
+ * uiter advance will set it. The frame we need to do because it
+ * is set once for the lifetime of the iterator. */
+ vm_push( 0 ); /* Return instruction pointer, */
+ vm_push( (SW)exec->iframePtr ); /* Return iframe. */
+ vm_push( (SW)exec->framePtr ); /* Return frame. */
+
+ uiterInit( prg, sp, uiter, fi, true );
+ break;
+ }
+ case IN_UITER_CREATE_WC: {
+ short field;
+ Half funcId, searchId;
+ read_half( field );
+ read_half( funcId );
+ read_half( searchId );
+
+ debug( prg, REALM_BYTECODE, "IN_UITER_CREATE_WC\n" );
+
+ FunctionInfo *fi = prg->rtd->functionInfo + funcId;
+ UserIter *uiter = uiterCreate( prg, &sp, fi, searchId );
+ vm_local(field) = (SW) uiter;
+
+ /* This is a setup similar to as a call, only the frame structure
+ * is slightly different for user iterators. We aren't going to do
+ * the call. We don't need to set up the return ip because the
+ * uiter advance will set it. The frame we need to do because it
+ * is set once for the lifetime of the iterator. */
+ vm_push( 0 ); /* Return instruction pointer, */
+ vm_push( (SW)exec->iframePtr ); /* Return iframe. */
+ vm_push( (SW)exec->framePtr ); /* Return frame. */
+
+ uiterInit( prg, sp, uiter, fi, false );
+ break;
+ }
+ case IN_UITER_DESTROY: {
+ short field;
+ read_half( field );
+
+ debug( prg, REALM_BYTECODE, "IN_UITER_DESTROY\n" );
+
+ UserIter *uiter = (UserIter*) vm_local(field);
+ userIterDestroy( prg, &sp, uiter );
+ break;
+ }
+ case IN_RET: {
+ debug( prg, REALM_BYTECODE, "IN_RET\n" );
+
+ FrameInfo *fi = &prg->rtd->frameInfo[exec->frameId];
+ downrefLocalTrees( prg, sp, exec->framePtr, fi->locals, fi->localsLen );
+ vm_popn( fi->frameSize );
+
+ exec->frameId = (long) vm_pop();
+ exec->framePtr = (Tree**) vm_pop();
+ instr = (Code*) vm_pop();
+ Tree *retVal = vm_pop();
+ vm_popn( fi->argSize );
+ vm_push( retVal );
+
+ /* This if for direct calls of functions. */
+ if ( instr == 0 ){
+ //assert( sp == root );
+ return sp;
+ }
+
+ break;
+ }
+ case IN_TO_UPPER: {
+ debug( prg, REALM_BYTECODE, "IN_TO_UPPER\n" );
+
+ Tree *in = vm_pop();
+ Head *head = stringToUpper( in->tokdata );
+ Tree *upper = constructString( prg, head );
+ treeUpref( upper );
+ vm_push( upper );
+ treeDownref( prg, sp, in );
+ break;
+ }
+ case IN_TO_LOWER: {
+ debug( prg, REALM_BYTECODE, "IN_TO_LOWER\n" );
+
+ Tree *in = vm_pop();
+ Head *head = stringToLower( in->tokdata );
+ Tree *lower = constructString( prg, head );
+ treeUpref( lower );
+ vm_push( lower );
+ treeDownref( prg, sp, in );
+ break;
+ }
+ case IN_OPEN_FILE: {
+ debug( prg, REALM_BYTECODE, "IN_OPEN_FILE\n" );
+
+ Tree *mode = vm_pop();
+ Tree *name = vm_pop();
+ Tree *res = (Tree*)openFile( prg, name, mode );
+ treeUpref( res );
+ vm_push( res );
+ treeDownref( prg, sp, name );
+ treeDownref( prg, sp, mode );
+ break;
+ }
+ case IN_GET_STDIN: {
+ debug( prg, REALM_BYTECODE, "IN_GET_STDIN\n" );
+
+ /* Pop the root object. */
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+ if ( prg->stdinVal == 0 ) {
+ prg->stdinVal = openStreamFd( prg, "<stdin>", 0 );
+ treeUpref( (Tree*)prg->stdinVal );
+ }
+
+ treeUpref( (Tree*)prg->stdinVal );
+ vm_push( (Tree*)prg->stdinVal );
+ break;
+ }
+ case IN_GET_STDOUT: {
+ debug( prg, REALM_BYTECODE, "IN_GET_STDOUT\n" );
+
+ /* Pop the root object. */
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+ if ( prg->stdoutVal == 0 ) {
+ prg->stdoutVal = openStreamFd( prg, "<stdout>", 1 );
+ treeUpref( (Tree*)prg->stdoutVal );
+ }
+
+ treeUpref( (Tree*)prg->stdoutVal );
+ vm_push( (Tree*)prg->stdoutVal );
+ break;
+ }
+ case IN_GET_STDERR: {
+ debug( prg, REALM_BYTECODE, "IN_GET_STDERR\n" );
+
+ /* Pop the root object. */
+ Tree *obj = vm_pop();
+ treeDownref( prg, sp, obj );
+ if ( prg->stderrVal == 0 ) {
+ prg->stderrVal = openStreamFd( prg, "<stderr>", 2 );
+ treeUpref( (Tree*)prg->stderrVal );
+ }
+
+ treeUpref( (Tree*)prg->stderrVal );
+ vm_push( (Tree*)prg->stderrVal );
+ break;
+ }
+ case IN_LOAD_ARGV: {
+ Half field;
+ read_half( field );
+ debug( prg, REALM_BYTECODE, "IN_LOAD_ARGV %lu\n", field );
+
+ /* Tree comes back upreffed. */
+ Tree *tree = constructArgv( prg, prg->argc, prg->argv );
+ setField( prg, prg->global, field, tree );
+ break;
+ }
+
+ case IN_SYSTEM: {
+ debug( prg, REALM_BYTECODE, "IN_SYSTEM\n" );
+
+ Tree *global = vm_pop();
+ Str *cmd = (Str*)vm_pop();
+
+ char *cmd0 = malloc( cmd->value->length + 1 );
+ memcpy( cmd0, cmd->value->data, cmd->value->length );
+ cmd0[cmd->value->length] = 0;
+
+ int r = system( cmd0 );
+
+ treeDownref( prg, sp, global );
+ treeDownref( prg, sp, (Tree*)cmd );
+
+ Tree *result = constructInteger( prg, r );
+ treeUpref( result );
+ vm_push( result );
+ break;
+ }
+
+ case IN_EXIT: {
+ debug( prg, REALM_BYTECODE, "IN_EXIT\n" );
+
+ Tree *global = vm_pop();
+ Int *status = (Int*)vm_pop();
+ prg->exitStatus = status->value;
+ prg->induceExit = 1;
+ treeDownref( prg, sp, global );
+ treeDownref( prg, sp, (Tree*)status );
+
+ while ( true ) {
+ FrameInfo *fi = &prg->rtd->frameInfo[exec->frameId];
+ int frameId = exec->frameId;
+
+ downrefLocals( prg, &sp, exec->framePtr, fi->locals, fi->localsLen );
+
+ vm_popn( fi->frameSize );
+
+ /* We stop on the root, leaving the psuedo-call setup on the
+ * stack. Note we exclude the local data. */
+ if ( frameId == prg->rtd->rootFrameId )
+ break;
+
+ /* Call layout. */
+ exec->frameId = (long) vm_pop();
+ exec->framePtr = (Tree**) vm_pop();
+ instr = (Code*) vm_pop();
+ Tree *retVal = vm_pop();
+ vm_popn( fi->argSize );
+ vm_pop();
+
+ treeDownref( prg, sp, retVal );
+ }
+
+ goto out;
+ }
+
+ case IN_STOP: {
+ debug( prg, REALM_BYTECODE, "IN_STOP\n" );
+
+ FrameInfo *fi = &prg->rtd->frameInfo[exec->frameId];
+ downrefLocalTrees( prg, sp, exec->framePtr, fi->locals, fi->localsLen );
+ vm_popn( fi->frameSize );
+
+ fflush( stdout );
+ goto out;
+ }
+
+ /* Halt is a default instruction given by the compiler when it is
+ * asked to generate and instruction it doesn't have. It is deliberate
+ * and can represent "not implemented" or "compiler error" because a
+ * variable holding instructions was not properly initialize. */
+ case IN_HALT: {
+ fatal( "IN_HALT -- compiler did something wrong\n" );
+ exit(1);
+ break;
+ }
+ default: {
+ fatal( "UNKNOWN INSTRUCTION: 0x%2x -- something is wrong\n", *(instr-1) );
+ assert(false);
+ break;
+ }
+ }
+ goto again;
+
+out:
+ if ( ! prg->induceExit )
+ assert( sp == root );
+ return sp;
+}
+
diff --git a/src/bytecode.h b/src/bytecode.h
new file mode 100644
index 0000000..bfc7eb4
--- /dev/null
+++ b/src/bytecode.h
@@ -0,0 +1,513 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _BYTECODE_H
+#define _BYTECODE_H
+
+#include <colm/pdarun.h>
+#include <colm/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if SIZEOF_LONG != 4 && SIZEOF_LONG != 8
+ #error "SIZEOF_LONG contained an unexpected value"
+#endif
+
+typedef unsigned long ulong;
+typedef unsigned char uchar;
+
+#define IN_LOAD_INT 0x01
+#define IN_LOAD_STR 0x02
+#define IN_LOAD_NIL 0x03
+#define IN_LOAD_TRUE 0x04
+#define IN_LOAD_FALSE 0x05
+#define IN_LOAD_TREE 0x06
+#define IN_LOAD_WORD 0x07
+
+#define IN_ADD_INT 0x08
+#define IN_SUB_INT 0x09
+#define IN_MULT_INT 0x0a
+#define IN_DIV_INT 0x0b
+
+#define IN_TST_EQL 0x0c
+#define IN_TST_NOT_EQL 0x0d
+#define IN_TST_LESS 0x0e
+#define IN_TST_GRTR 0x0f
+#define IN_TST_LESS_EQL 0x10
+#define IN_TST_GRTR_EQL 0x11
+#define IN_TST_LOGICAL_AND 0x12
+#define IN_TST_LOGICAL_OR 0x13
+
+#define IN_NOT 0x14
+
+#define IN_JMP 0x15
+#define IN_JMP_FALSE 0x16
+#define IN_JMP_TRUE 0x17
+
+#define IN_STR_ATOI 0x18
+#define IN_STR_LENGTH 0x19
+#define IN_CONCAT_STR 0x1a
+#define IN_TREE_TRIM 0x1b
+
+#define IN_INIT_LOCALS 0x1c
+#define IN_POP 0x1d
+#define IN_POP_N_WORDS 0x1e
+#define IN_DUP_TOP 0x1f
+#define IN_TOP_SWAP 0x20
+
+#define IN_REJECT 0x21
+#define IN_MATCH 0x22
+#define IN_CONSTRUCT 0x23
+#define IN_TREE_NEW 0x24
+#define IN_TREE_CAST 0xe4
+
+#define IN_GET_LOCAL_R 0x25
+#define IN_GET_LOCAL_WC 0x26
+#define IN_SET_LOCAL_WC 0x27
+
+#define IN_GET_LOCAL_REF_R 0x28
+#define IN_GET_LOCAL_REF_WC 0x29
+#define IN_SET_LOCAL_REF_WC 0x2a
+
+#define IN_SAVE_RET 0x2b
+
+#define IN_GET_FIELD_R 0x2c
+#define IN_GET_FIELD_WC 0x2d
+#define IN_GET_FIELD_WV 0x2e
+#define IN_GET_FIELD_BKT 0x2f
+
+#define IN_SET_FIELD_WV 0x30
+#define IN_SET_FIELD_WC 0x31
+#define IN_SET_FIELD_BKT 0x32
+#define IN_SET_FIELD_LEAVE_WC 0x33
+
+#define IN_GET_MATCH_LENGTH_R 0x34
+#define IN_GET_MATCH_TEXT_R 0x35
+
+#define IN_GET_TOKEN_DATA_R 0x36
+#define IN_SET_TOKEN_DATA_WC 0x37
+#define IN_SET_TOKEN_DATA_WV 0x38
+#define IN_SET_TOKEN_DATA_BKT 0x39
+
+#define IN_GET_TOKEN_POS_R 0x3a
+#define IN_GET_TOKEN_LINE_R 0x3b
+
+#define IN_INIT_RHS_EL 0x3c
+#define IN_INIT_LHS_EL 0x3d
+#define IN_INIT_CAPTURES 0x3e
+#define IN_STORE_LHS_EL 0x3f
+#define IN_RESTORE_LHS 0x40
+
+#define IN_TRITER_FROM_REF 0x41
+#define IN_TRITER_ADVANCE 0x42
+#define IN_TRITER_NEXT_CHILD 0x43
+#define IN_TRITER_GET_CUR_R 0x44
+#define IN_TRITER_GET_CUR_WC 0x45
+#define IN_TRITER_SET_CUR_WC 0x46
+#define IN_TRITER_DESTROY 0x47
+#define IN_TRITER_NEXT_REPEAT 0x48
+#define IN_TRITER_PREV_REPEAT 0x49
+
+#define IN_REV_TRITER_FROM_REF 0x4a
+#define IN_REV_TRITER_DESTROY 0x4b
+#define IN_REV_TRITER_PREV_CHILD 0x4c
+
+#define IN_UITER_DESTROY 0x4d
+#define IN_UITER_CREATE_WV 0x4e
+#define IN_UITER_CREATE_WC 0x4f
+#define IN_UITER_ADVANCE 0x50
+#define IN_UITER_GET_CUR_R 0x51
+#define IN_UITER_GET_CUR_WC 0x52
+#define IN_UITER_SET_CUR_WC 0x53
+
+#define IN_TREE_SEARCH 0x54
+
+#define IN_LOAD_GLOBAL_R 0x55
+#define IN_LOAD_GLOBAL_WV 0x56
+#define IN_LOAD_GLOBAL_WC 0x57
+#define IN_LOAD_GLOBAL_BKT 0x58
+
+#define IN_PTR_DEREF_R 0x59
+#define IN_PTR_DEREF_WV 0x5a
+#define IN_PTR_DEREF_WC 0x60
+#define IN_PTR_DEREF_BKT 0x61
+
+#define IN_REF_FROM_LOCAL 0x62
+#define IN_REF_FROM_REF 0x63
+#define IN_REF_FROM_QUAL_REF 0x64
+#define IN_REF_FROM_BACK 0xe3
+#define IN_TRITER_REF_FROM_CUR 0x65
+#define IN_UITER_REF_FROM_CUR 0x66
+
+#define IN_MAP_LENGTH 0x67
+#define IN_MAP_FIND 0x68
+#define IN_MAP_INSERT_WV 0x69
+#define IN_MAP_INSERT_WC 0x6a
+#define IN_MAP_INSERT_BKT 0x6b
+#define IN_MAP_STORE_WV 0x6c
+#define IN_MAP_STORE_WC 0x6d
+#define IN_MAP_STORE_BKT 0x6e
+#define IN_MAP_REMOVE_WV 0x6f
+#define IN_MAP_REMOVE_WC 0x70
+#define IN_MAP_REMOVE_BKT 0x71
+
+#define IN_LIST_LENGTH 0x72
+#define IN_LIST_APPEND_WV 0x73
+#define IN_LIST_APPEND_WC 0x74
+#define IN_LIST_APPEND_BKT 0x75
+#define IN_LIST_REMOVE_END_WV 0x76
+#define IN_LIST_REMOVE_END_WC 0x77
+#define IN_LIST_REMOVE_END_BKT 0x78
+
+#define IN_GET_LIST_MEM_R 0x79
+#define IN_GET_LIST_MEM_WC 0x7a
+#define IN_GET_LIST_MEM_WV 0x7b
+#define IN_GET_LIST_MEM_BKT 0x7c
+#define IN_SET_LIST_MEM_WV 0x7d
+#define IN_SET_LIST_MEM_WC 0x7e
+#define IN_SET_LIST_MEM_BKT 0x7f
+
+#define IN_VECTOR_LENGTH 0x80
+#define IN_VECTOR_APPEND_WV 0x81
+#define IN_VECTOR_APPEND_WC 0x82
+#define IN_VECTOR_APPEND_BKT 0x83
+#define IN_VECTOR_INSERT_WV 0x84
+#define IN_VECTOR_INSERT_WC 0x85
+#define IN_VECTOR_INSERT_BKT 0x86
+
+#define IN_PRINT 0x87
+#define IN_PRINT_XML_AC 0x88
+#define IN_PRINT_XML 0x89
+#define IN_PRINT_STREAM 0x8a
+
+#define IN_HALT 0x8b
+
+#define IN_CALL_WC 0x8c
+#define IN_CALL_WV 0x8d
+#define IN_RET 0x8e
+#define IN_YIELD 0x8f
+#define IN_STOP 0x90
+
+#define IN_STR_UORD8 0x91
+#define IN_STR_SORD8 0x92
+#define IN_STR_UORD16 0x93
+#define IN_STR_SORD16 0x94
+#define IN_STR_UORD32 0x95
+#define IN_STR_SORD32 0x96
+
+#define IN_INT_TO_STR 0x97
+#define IN_TREE_TO_STR 0x98
+#define IN_TREE_TO_STR_TRIM 0x99
+
+#define IN_CREATE_TOKEN 0x9a
+#define IN_MAKE_TOKEN 0x9b
+#define IN_MAKE_TREE 0x9c
+#define IN_CONSTRUCT_TERM 0x9d
+
+#define IN_INPUT_PULL_WV 0x9e
+#define IN_INPUT_PULL_WC 0xe1
+#define IN_INPUT_PULL_BKT 0x9f
+
+#define IN_PARSE_SAVE_STEPS 0xa0
+#define IN_PARSE_INIT_BKT 0xa1
+
+#define IN_PARSE_FRAG_WC 0xa2
+#define IN_PARSE_FRAG_EXIT_WC 0xa3
+
+#define IN_PARSE_FRAG_WV 0xa4
+#define IN_PARSE_FRAG_EXIT_WV 0xa5
+
+#define IN_PARSE_FRAG_BKT 0xa6
+#define IN_PARSE_FRAG_EXIT_BKT 0xa7
+
+#define IN_INPUT_APPEND_WC 0xa8
+#define IN_INPUT_APPEND_WV 0xa9
+#define IN_INPUT_APPEND_BKT 0xaa
+
+#define IN_PARSE_FINISH_WC 0xab
+#define IN_PARSE_FINISH_EXIT_WC 0xac
+
+#define IN_PARSE_FINISH_WV 0xad
+#define IN_PARSE_FINISH_EXIT_WV 0xae
+
+#define IN_PARSE_FINISH_BKT 0xaf
+#define IN_PARSE_FINISH_EXIT_BKT 0xb0
+
+#define IN_PCR_CALL 0xb1
+#define IN_PCR_RET 0xb2
+#define IN_PCR_END_DECK 0xb3
+#define IN_CONTIGUOUS 0x5c
+
+#define IN_OPEN_FILE 0xb4
+#define IN_GET_STDIN 0xb5
+#define IN_GET_STDOUT 0xb6
+#define IN_GET_STDERR 0xb7
+#define IN_LOAD_ARGV 0xb8
+#define IN_TO_UPPER 0xb9
+#define IN_TO_LOWER 0xba
+#define IN_EXIT 0xbb
+
+#define IN_LOAD_PARSER_R 0xbd
+#define IN_LOAD_PARSER_WV 0xbe
+#define IN_LOAD_PARSER_WC 0xbf
+#define IN_LOAD_PARSER_BKT 0xc0
+
+#define IN_LOAD_INPUT_R 0xc1
+#define IN_LOAD_INPUT_WV 0xc2
+#define IN_LOAD_INPUT_WC 0xc3
+#define IN_LOAD_INPUT_BKT 0xc4
+
+#define IN_INPUT_PUSH_WV 0xc5
+#define IN_INPUT_PUSH_BKT 0xc6
+#define IN_INPUT_PUSH_IGNORE_WV 0xc7
+
+#define IN_LOAD_CONTEXT_R 0xc8
+#define IN_LOAD_CONTEXT_WV 0xc9
+#define IN_LOAD_CONTEXT_WC 0xca
+#define IN_LOAD_CONTEXT_BKT 0xcb
+
+#define IN_GET_PARSER_CTX_R 0xcd
+#define IN_GET_PARSER_CTX_WC 0xce
+#define IN_GET_PARSER_CTX_WV 0xcf
+#define IN_SET_PARSER_CTX_WC 0xd0
+#define IN_SET_PARSER_CTX_WV 0xd1
+
+#define IN_LOAD_CTX_R 0xd2
+#define IN_LOAD_CTX_WC 0xd3
+#define IN_LOAD_CTX_WV 0xd4
+#define IN_LOAD_CTX_BKT 0xd5
+
+#define IN_SPRINTF 0xd6
+
+#define IN_GET_RHS_VAL_R 0xd7
+#define IN_GET_RHS_VAL_WC 0xd8
+#define IN_GET_RHS_VAL_WV 0xd9
+#define IN_GET_RHS_VAL_BKT 0xda
+#define IN_SET_RHS_VAL_WC 0xdb
+#define IN_SET_RHS_VAL_WV 0xdc
+#define IN_SET_RHS_VAL_BKT 0xdd
+
+#define IN_CONSTRUCT_INPUT 0xde
+#define IN_SET_INPUT 0xdf
+#define IN_GET_INPUT 0xe0
+
+#define IN_GET_PARSER_MEM_R 0x5b
+#define IN_GET_PARSER_MEM_WC 0x00
+#define IN_GET_PARSER_MEM_WV 0x00
+#define IN_GET_PARSER_MEM_BKT 0x00
+#define IN_SET_PARSER_MEM_WC 0x00
+#define IN_SET_PARSER_MEM_WV 0x00
+#define IN_SET_PARSER_MEM_BKT 0x00
+
+#define IN_GET_ERROR 0xcc
+#define IN_SET_ERROR 0xe2
+
+#define IN_SYSTEM 0xe5
+
+
+/* Types */
+#define TYPE_NIL 0x01
+#define TYPE_TREE 0x02
+#define TYPE_REF 0x03
+#define TYPE_PTR 0x04
+#define TYPE_ITER 0x05
+#define TYPE_IGNORE_LIST 0x06
+
+/* Types of Generics. */
+#define GEN_LIST 0x10
+#define GEN_MAP 0x11
+#define GEN_VECTOR 0x12
+#define GEN_PARSER 0x13
+
+/* Known language element ids. */
+#define LEL_ID_PTR 1
+#define LEL_ID_VOID 2
+#define LEL_ID_BOOL 3
+#define LEL_ID_INT 4
+#define LEL_ID_STR 5
+#define LEL_ID_STREAM 6
+#define LEL_ID_IGNORE 7
+
+/*
+ * Flags
+ */
+
+/* A tree that has been generated by a termDup. */
+#define PF_TERM_DUP 0x0001
+
+/* Has been processed by the commit function. All children have also been
+ * processed. */
+#define PF_COMMITTED 0x0002
+
+/* Created by a token generation action, not made from the input. */
+#define PF_ARTIFICIAL 0x0004
+
+/* Named node from a pattern or constructor. */
+#define PF_NAMED 0x0008
+
+/* There is reverse code associated with this tree node. */
+#define PF_HAS_RCODE 0x0010
+
+#define PF_RIGHT_IGNORE 0x0020
+
+#define PF_LEFT_IL_ATTACHED 0x0400
+#define PF_RIGHT_IL_ATTACHED 0x0800
+
+#define AF_LEFT_IGNORE 0x0100
+#define AF_RIGHT_IGNORE 0x0200
+
+#define AF_SUPPRESS_LEFT 0x4000
+#define AF_SUPPRESS_RIGHT 0x8000
+
+/*
+ * Call stack.
+ */
+
+/* Number of spots in the frame, after the args. */
+#define FR_AA 4
+
+/* Positions relative to the frame pointer. */
+#define FR_RV 3 /* return value */
+#define FR_RI 2 /* return instruction */
+#define FR_RFP 1 /* return frame pointer */
+#define FR_RFD 0 /* return frame id. */
+
+/*
+ * Calling Convention:
+ * a1
+ * a2
+ * a3
+ * ...
+ * return value FR_RV
+ * return instr FR_RI
+ * return frame ptr FR_RFP
+ * return frame id FR_RFD
+ */
+
+/*
+ * User iterator call stack.
+ * Adds an iframe pointer, removes the return value.
+ */
+
+/* Number of spots in the frame, after the args. */
+#define IFR_AA 3
+
+/* Positions relative to the frame pointer. */
+#define IFR_RIN 2 /* return instruction */
+#define IFR_RIF 1 /* return iframe pointer */
+#define IFR_RFR 0 /* return frame pointer */
+
+/* Exported to modules other than bytecode.c */
+#define vm_push(i) ( ( sp == prg->sb_beg ? (sp = vm_bs_add(prg, sp, 1)) : 0 ), (*(--sp) = (i)) )
+#define vm_pushn(n) ( ( (sp-(n)) < prg->sb_beg ? (sp = vm_bs_add(prg, sp, n)) : 0 ), (sp -= (n)) )
+
+#define vm_pop() ({ SW r = *sp; (sp+1) >= prg->sb_end ? (sp = vm_bs_pop(prg, sp, 1)) : (sp += 1); r; })
+#define vm_pop_ignore() ({ (sp+1) >= prg->sb_end ? (sp = vm_bs_pop(prg, sp, 1)) : (sp += 1); })
+#define vm_popn(n) ({ (sp+(n)) >= prg->sb_end ? (sp = vm_bs_pop(prg, sp, n)) : (sp += (n)); })
+
+#define vm_contiguous(n) ( ( (sp-(n)) < prg->sb_beg ? (sp = vm_bs_add(prg, sp, n)) : 0 ) )
+
+#define vm_top() (*sp)
+#define vm_ptop() (sp)
+
+#define vm_ssize() ( prg->sb_total + (prg->sb_end - sp) )
+
+#define vm_local(o) (exec->framePtr[o])
+#define vm_plocal(o) (&exec->framePtr[o])
+#define vm_local_iframe(o) (exec->iframePtr[o])
+#define vm_plocal_iframe(o) (&exec->iframePtr[o])
+
+void vm_init( struct colm_program * );
+Tree** vm_bs_add( struct colm_program *, Tree **, int );
+Tree** vm_bs_pop( struct colm_program *, Tree **, int );
+void vm_clear( struct colm_program * );
+
+typedef Tree *SW;
+typedef Tree **StackPtr;
+
+/* Can't use sizeof() because we have used types that are bigger than the
+ * serial representation. */
+#define SIZEOF_CODE 1
+#define SIZEOF_HALF 2
+#define SIZEOF_WORD sizeof(Word)
+
+typedef struct _Execution
+{
+ Tree **framePtr;
+ Tree **iframePtr;
+ long frameId;
+
+ long rcodeUnitLen;
+
+ Parser *parser;
+ long steps;
+ long pcr;
+} Execution;
+
+long stringLength( Head *str );
+const char *stringData( Head *str );
+Head *stringAllocFull( struct colm_program *prg, const char *data, long length );
+Head *initStrSpace( long length );
+Head *stringCopy( struct colm_program *prg, Head *head );
+void stringFree( struct colm_program *prg, Head *head );
+void stringShorten( Head *tokdata, long newlen );
+Head *concatStr( Head *s1, Head *s2 );
+Word strAtoi( Head *str );
+Word strUord16( Head *head );
+Word strUord8( Head *head );
+Word cmpString( Head *s1, Head *s2 );
+Head *stringToUpper( Head *s );
+Head *stringToLower( Head *s );
+Head *stringSprintf( struct colm_program *prg, Str *format, Int *integer );
+
+Head *makeLiteral( struct colm_program *prg, long litoffset );
+Head *intToStr( struct colm_program *prg, Word i );
+
+Tree *constructString( struct colm_program *prg, Head *s );
+
+void mainExecution( struct colm_program *prg, Execution *exec, Code *code );
+void reductionExecution( Execution *exec, Tree **sp );
+void generationExecution( Execution *exec, Tree **sp );
+void reverseExecution( Execution *exec, Tree **sp, RtCodeVect *allRev );
+
+Kid *allocAttrs( struct colm_program *prg, long length );
+void freeAttrs( struct colm_program *prg, Kid *attrs );
+void setAttr( Tree *tree, long pos, Tree *val );
+Kid *getAttrKid( Tree *tree, long pos );
+
+Tree *splitTree( struct colm_program *prg, Tree *t );
+void rcodeDownrefAll( struct colm_program *prg, Tree **sp, RtCodeVect *cv );
+void commitFull( struct colm_program *prg, Tree **sp, PdaRun *pdaRun, long commitReduce );
+Tree *getParsedRoot( PdaRun *pdaRun, int stop );
+void splitRef( struct colm_program *prg, Tree ***sp, Ref *fromRef );
+
+void allocGlobal( struct colm_program *prg );
+Tree **executeCode( struct colm_program *prg, Execution *exec, Tree **sp, Code *instr );
+void rcodeDownref( struct colm_program *prg, Tree **sp, Code *instr );
+Code *popReverseCode( RtCodeVect *allRev );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/closure.cc b/src/closure.cc
new file mode 100644
index 0000000..f587ea0
--- /dev/null
+++ b/src/closure.cc
@@ -0,0 +1,458 @@
+/*
+ * Copyright 2005-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "global.h"
+#include "parsedata.h"
+
+#include "vector.h"
+#include <assert.h>
+#include <string.h>
+#include <iostream>
+
+using std::endl;
+using std::cerr;
+
+void Compiler::lr0BringInItem( PdaGraph *pdaGraph, PdaState *dest, PdaState *prodState,
+ PdaTrans *expandFrom, Production *prod )
+{
+ /* We use dot sets for finding unique states. In the future, should merge
+ * dots sets with the stateSet pointer (only need one of these). */
+ assert( dest != prodState );
+ dest->dotSet.insert( prodState->dotSet );
+
+ /* Get the epsilons, context, out priorities. */
+ dest->pendingCommits.insert( prodState->pendingCommits );
+ //if ( prodState->pendingCommits.length() > 0 )
+ // cerr << "THERE ARE PENDING COMMITS DRAWN IN" << endl;
+
+ if ( prodState->transMap.length() > 0 ) {
+ assert( prodState->transMap.length() == 1 );
+ PdaTrans *srcTrans = prodState->transMap[0].value;
+
+ /* Look for the source in the destination. */
+ TransMapEl *destTel = dest->transMap.find( srcTrans->lowKey );
+ if ( destTel == 0 ) {
+ /* Make a new state and transition to it. */
+ PdaState *newState = pdaGraph->addState();
+ PdaTrans *newTrans = new PdaTrans();
+
+ /* Attach the new transition to the new state. */
+ newTrans->lowKey = srcTrans->lowKey;
+ pdaGraph->attachTrans( dest, newState, newTrans );
+ pdaGraph->addInTrans( newTrans, srcTrans );
+
+ /* The transitions we make during lr0 closure are all shifts. */
+ assert( newTrans->isShift );
+ assert( srcTrans->isShift );
+
+ /* The new state must have its state set setup. */
+ newState->stateSet = new PdaStateSet;
+ newState->stateSet->insert( srcTrans->toState );
+
+ /* Insert the transition into the map. Be sure to set destTel, it
+ * is needed below. */
+ dest->transMap.insert( srcTrans->lowKey, newTrans, &destTel );
+
+ /* If the item is a non-term, queue it for closure. */
+ LangEl *langEl = langElIndex[srcTrans->lowKey];
+ if ( langEl != 0 && langEl->type == LangEl::NonTerm ) {
+ pdaGraph->transClosureQueue.append( newTrans );
+ //cerr << "put to trans closure queue" << endl;
+ }
+ }
+ else {
+ //cerr << "merging transitions" << endl;
+ destTel->value->toState->stateSet->insert( srcTrans->toState );
+ pdaGraph->addInTrans( destTel->value, srcTrans );
+ }
+
+ /* If this is an expansion then we may need to bring in commits. */
+ if ( expandFrom != 0 && expandFrom->commits.length() > 0 ) {
+ //cerr << "SETTING COMMIT ON CLOSURE ROUND" << endl;
+ destTel->value->commits.insert( expandFrom->commits );
+
+ expandFrom->commits.empty();
+ }
+ }
+ else {
+ /* ProdState does not have any transitions out. It is at the end of a
+ * production. */
+ if ( expandFrom != 0 && expandFrom->commits.length() > 0 ) {
+ //cerr << "SETTING COMMIT IN PENDING LOOKAHEAD" << endl;
+ for ( LongSet::Iter len = expandFrom->commits; len.lte(); len++ )
+ dest->pendingCommits.insert( ProdIdPair( prod->prodId, *len ) );
+
+ expandFrom->commits.empty();
+ }
+ }
+}
+
+void Compiler::lr0InvokeClosure( PdaGraph *pdaGraph, PdaState *state )
+{
+ /* State should not already be closed. */
+ assert( !state->inClosedMap );
+
+ /* This is used each time we invoke closure, it must be cleared. */
+ pdaGraph->transClosureQueue.abandon();
+
+ /* Drag in the core items. */
+ for ( PdaStateSet::Iter ssi = *state->stateSet; ssi.lte(); ssi++ )
+ lr0BringInItem( pdaGraph, state, *ssi, 0, 0 );
+
+ /* Now bring in the derived items. */
+ while ( pdaGraph->transClosureQueue.length() > 0 ) {
+ PdaTrans *toClose = pdaGraph->transClosureQueue.detachFirst();
+ //cerr << "have a transition to derive" << endl;
+
+ /* Get the langEl. */
+ LangEl *langEl = langElIndex[toClose->lowKey];
+
+ /* Make graphs for all of the productions that the non
+ * terminal goes to that are not already in the state's dotSet. */
+ for ( LelDefList::Iter prod = langEl->defList; prod.lte(); prod++ ) {
+ /* Bring in the start state of the production. */
+ lr0BringInItem( pdaGraph, state, prod->fsm->startState, toClose, prod );
+ }
+ }
+
+ /* Try and insert into the closed dict. */
+ DotSetMapEl *lastFound;
+ if ( pdaGraph->closedMap.insert( state, &lastFound ) ) {
+ /* Insertion into closed dict succeeded. There is no state with the
+ * same dot set. The state is now closed. It is guaranteed a spot in
+ * the closed dict and it will never go away (states never deleted
+ * during closure). */
+ pdaGraph->stateClosedList.append( state );
+ state->inClosedMap = true;
+
+ /* Add all of the states in the out transitions to the closure queue.
+ * This will give us a depth first search of the graph. */
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ /* Get the state the transEl goes to. */
+ PdaState *targ = trans->value->toState;
+
+ /* If the state on this tranisition has not already been slated
+ * for closure, then add it to the queue. */
+ if ( !targ->onClosureQueue && !targ->inClosedMap ) {
+ pdaGraph->stateClosureQueue.append( targ );
+ targ->onClosureQueue = true;
+ }
+ }
+ }
+ else {
+ /* Insertion into closed dict failed. There is an existing state
+ * with the same dot set. Get the existing state. */
+ pdaGraph->inTransMove( lastFound, state );
+ for ( TransMap::Iter tel = state->transMap; tel.lte(); tel++ ) {
+ pdaGraph->stateList.detach( tel->value->toState );
+ delete tel->value->toState;
+ delete tel->value;
+ }
+ pdaGraph->stateList.detach( state );
+ delete state;
+ }
+}
+
+/* Invoke cloure on the graph. We use a queue here to achieve a breadth
+ * first search of the tree we build. Note, there are back edges in this
+ * tree. They are the edges made when upon closure, a dot set exists
+ * already. */
+void Compiler::lr0CloseAllStates( PdaGraph *pdaGraph )
+{
+ /* While there are items on the closure queue. */
+ while ( pdaGraph->stateClosureQueue.length() > 0 ) {
+ /* Pop the first item off. */
+ PdaState *state = pdaGraph->stateClosureQueue.detachFirst();
+ state->onClosureQueue = false;
+
+ /* Invoke closure upon the state. */
+ lr0InvokeClosure( pdaGraph, state );
+ }
+}
+
+void Compiler::transferCommits( PdaGraph *pdaGraph, PdaTrans *trans,
+ PdaState *state, long prodId )
+{
+ ProdIdPairSet &pendingCommits = state->pendingCommits;
+ for ( ProdIdPairSet::Iter pi = pendingCommits; pi.lte(); pi++ ) {
+ if ( pi->onReduce == prodId )
+ trans->commits.insert( pi->length );
+ }
+}
+
+void Compiler::lalr1AddFollow2( PdaGraph *pdaGraph, PdaTrans *trans, FollowToAdd &followKeys )
+{
+ for ( ExpandToSet::Iter ets = trans->expandTo; ets.lte(); ets++ ) {
+ int prodId = ets->prodId;
+ PdaState *expandTo = ets->state;
+
+ for ( FollowToAdd::Iter fkey = followKeys; fkey.lte(); fkey++ ) {
+ TransMapEl *transEl = expandTo->transMap.find( fkey->key );
+
+ if ( transEl != 0 ) {
+ /* Set up the follow transition. */
+ PdaTrans *destTrans = transEl->value;
+
+ transferCommits( pdaGraph, destTrans, expandTo, prodId );
+
+ pdaGraph->addInReduction( destTrans, prodId, fkey->value );
+ }
+ else {
+ /* Set up the follow transition. */
+ PdaTrans *followTrans = new PdaTrans;
+ followTrans->lowKey = fkey->key;
+ followTrans->isShift = false;
+ followTrans->reductions.insert( prodId, fkey->value );
+
+ transferCommits( pdaGraph, followTrans, expandTo, prodId );
+
+ pdaGraph->attachTrans( expandTo, actionDestState, followTrans );
+ expandTo->transMap.insert( followTrans->lowKey, followTrans );
+ pdaGraph->transClosureQueue.append( followTrans );
+ }
+ }
+ }
+}
+
+long PdaTrans::maxPrior()
+{
+ long prior = LONG_MIN;
+ if ( isShift && shiftPrior > prior )
+ prior = shiftPrior;
+ for ( ReductionMap::Iter red = reductions; red.lte(); red++ ) {
+ if ( red->value > prior )
+ prior = red->value;
+ }
+ return prior;
+}
+
+void Compiler::lalr1AddFollow1( PdaGraph *pdaGraph, PdaState *state )
+{
+ /* Finding non-terminals into the state. */
+ for ( PdaTransInList::Iter in = state->inRange; in.lte(); in++ ) {
+ long key = in->lowKey;
+ LangEl *langEl = langElIndex[key];
+ if ( langEl != 0 && langEl->type == LangEl::NonTerm ) {
+ /* Finding the following transitions. */
+ FollowToAdd followKeys;
+ for ( TransMap::Iter fout = state->transMap; fout.lte(); fout++ ) {
+ int fkey = fout->key;
+ LangEl *flel = langElIndex[fkey];
+ if ( flel == 0 || flel->type == LangEl::Term ) {
+ long prior = fout->value->maxPrior();
+ followKeys.insert( fkey, prior );
+ }
+ }
+
+ if ( followKeys.length() > 0 )
+ lalr1AddFollow2( pdaGraph, in, followKeys );
+ }
+ }
+}
+
+void Compiler::lalr1AddFollow2( PdaGraph *pdaGraph, PdaTrans *trans,
+ long followKey, long prior )
+{
+ for ( ExpandToSet::Iter ets = trans->expandTo; ets.lte(); ets++ ) {
+ int prodId = ets->prodId;
+ PdaState *expandTo = ets->state;
+
+ TransMapEl *transEl = expandTo->transMap.find( followKey );
+ if ( transEl != 0 ) {
+ /* Add in the reductions, or in the shift. */
+ PdaTrans *destTrans = transEl->value;
+
+ transferCommits( pdaGraph, destTrans, expandTo, prodId );
+
+ pdaGraph->addInReduction( destTrans, prodId, prior );
+ }
+ else {
+ /* Set up the follow transition. */
+ PdaTrans *followTrans = new PdaTrans;
+ followTrans->lowKey = followKey;
+ followTrans->isShift = false;
+ followTrans->reductions.insert( prodId, prior );
+
+ transferCommits( pdaGraph, followTrans, expandTo, prodId );
+
+ pdaGraph->attachTrans( expandTo, actionDestState, followTrans );
+ expandTo->transMap.insert( followTrans->lowKey, followTrans );
+ pdaGraph->transClosureQueue.append( followTrans );
+ }
+ }
+}
+
+void Compiler::lalr1AddFollow1( PdaGraph *pdaGraph, PdaTrans *trans )
+{
+ PdaState *state = trans->fromState;
+ int fkey = trans->lowKey;
+ LangEl *flel = langElIndex[fkey];
+ if ( flel == 0 || flel->type == LangEl::Term ) {
+ /* Finding non-terminals into the state. */
+ for ( PdaTransInList::Iter in = state->inRange; in.lte(); in++ ) {
+ long key = in->lowKey;
+ LangEl *langEl = langElIndex[key];
+ if ( langEl != 0 && langEl->type == LangEl::NonTerm ) {
+ //cerr << "FOLLOW PRIOR TRANSFER 2: " << prior << endl;
+ long prior = trans->maxPrior();
+ lalr1AddFollow2( pdaGraph, in, fkey, prior );
+ }
+ }
+ }
+}
+
+/* Add follow sets to an LR(0) graph to make it LALR(1). */
+void Compiler::lalr1AddFollowSets( PdaGraph *pdaGraph, LangElSet &parserEls )
+{
+ /* Make the state that all reduction actions go to. Since a reduction pops
+ * states of the stack and sets the new target state, this state is
+ * actually never reached. Just here to link the trans to. */
+ actionDestState = pdaGraph->addState();
+ pdaGraph->setFinState( actionDestState );
+
+ for ( LangElSet::Iter pe = parserEls; pe.lte(); pe++ ) {
+ /* Get the entry into the graph and traverse over start. */
+ PdaState *overStart = pdaGraph->followFsm( (*pe)->startState, (*pe)->rootDef->fsm );
+
+ /* Add _eof after the initial _start. */
+ PdaTrans *eofTrans = pdaGraph->insertNewTrans( overStart, actionDestState,
+ (*pe)->eofLel->id, (*pe)->eofLel->id );
+ eofTrans->isShift = true;
+ }
+
+ /* This was used during lr0 table construction. */
+ pdaGraph->transClosureQueue.abandon();
+
+ /* Need to pass over every state initially. */
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ )
+ lalr1AddFollow1( pdaGraph, state );
+
+ /* While the closure queue has items, pop them off and add follow
+ * characters. */
+ while ( pdaGraph->transClosureQueue.length() > 0 ) {
+ /* Pop the first item off and add Follow for it . */
+ PdaTrans *trans = pdaGraph->transClosureQueue.detachFirst();
+ lalr1AddFollow1( pdaGraph, trans );
+ }
+}
+
+void Compiler::linkExpansions( PdaGraph *pdaGraph )
+{
+ pdaGraph->setStateNumbers();
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ /* Find transitions out on non terminals. */
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ long key = trans->key;
+ LangEl *langEl = langElIndex[key];
+ if ( langEl != 0 && langEl->type == LangEl::NonTerm ) {
+ /* For each production that the non terminal expand to ... */
+ for ( LelDefList::Iter prod = langEl->defList; prod.lte(); prod++ ) {
+ /* Follow the production and add to the trans's expand to set. */
+ PdaState *followRes = pdaGraph->followFsm( state, prod->fsm );
+
+ //LangEl *lel = langElIndex[key];
+ //cerr << state->stateNum << ", ";
+ //if ( lel != 0 )
+ // cerr << lel->data;
+ //else
+ // cerr << (char)key;
+ //cerr << " -> " << (*fto)->stateNum << " on " <<
+ // prod->data << " (fss = " << fin.pos() << ")" << endl;
+ trans->value->expandTo.insert( ExpandToEl( followRes, prod->prodId ) );
+ }
+ }
+ }
+ }
+}
+
+/* Add terminal versions of all nonterminal transitions. */
+void Compiler::addDupTerms( PdaGraph *pdaGraph )
+{
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ PdaTransList newTranitions;
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ LangEl *lel = langElIndex[trans->value->lowKey];
+ if ( lel->type == LangEl::NonTerm ) {
+ PdaTrans *dupTrans = new PdaTrans;
+ dupTrans->lowKey = lel->termDup->id;
+ dupTrans->isShift = true;
+
+ /* Save the target state in to state. In the next loop when we
+ * attach the transition we must clear this because the
+ * attaching code requires the transition to be unattached. */
+ dupTrans->toState = trans->value->toState;
+ newTranitions.append( dupTrans );
+
+ /* Commit code used? */
+ //transferCommits( pdaGraph, followTrans, expandTo, prodId );
+ }
+ }
+
+ for ( PdaTrans *dup = newTranitions.head; dup != 0; ) {
+ PdaTrans *next = dup->next;
+ PdaState *toState = dup->toState;
+ dup->toState = 0;
+ pdaGraph->attachTrans( state, toState, dup );
+ state->transMap.insert( dup->lowKey, dup );
+ dup = next;
+ }
+ }
+}
+
+/* Generate a LALR(1) graph. */
+void Compiler::lalr1GenerateParser( PdaGraph *pdaGraph, LangElSet &parserEls )
+{
+ /* Make the intial graph. */
+ pdaGraph->langElIndex = langElIndex;
+
+ for ( Vector<LangEl*>::Iter r = parserEls; r.lte(); r++ ) {
+ /* Create the entry point. */
+ PdaState *rs = pdaGraph->addState();
+ pdaGraph->entryStateSet.insert( rs );
+
+ /* State set of just one state. */
+ rs->stateSet = new PdaStateSet;
+ rs->stateSet->insert( (*r)->rootDef->fsm->startState );
+
+ /* Queue the start state for closure. */
+ rs->onClosureQueue = true;
+ pdaGraph->stateClosureQueue.append( rs );
+
+ (*r)->startState = rs;
+ }
+
+ /* Run the lr0 closure. */
+ lr0CloseAllStates( pdaGraph );
+
+ /* Add terminal versions of all nonterminal transitions. */
+ addDupTerms( pdaGraph );
+
+ /* Link production expansions to the place they expand to. */
+ linkExpansions( pdaGraph );
+
+ /* Walk the graph adding follow sets to the LR(0) graph. */
+ lalr1AddFollowSets( pdaGraph, parserEls );
+
+// /* Set the commit on the final eof shift. */
+// PdaTrans *overStart = pdaGraph->startState->findTrans( rootEl->id );
+// PdaTrans *eofTrans = overStart->toState->findTrans( eofLangEl->id );
+// eofTrans->afterShiftCommits.insert( 2 );
+}
diff --git a/src/codegen.cc b/src/codegen.cc
new file mode 100644
index 0000000..b48ebbb
--- /dev/null
+++ b/src/codegen.cc
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "parsedata.h"
+#include "fsmcodegen.h"
+#include "redfsm.h"
+#include "bstmap.h"
+#include "debug.h"
+#include <sstream>
+#include <string>
+
+
+void FsmCodeGen::writeMain( long activeRealm )
+{
+ out <<
+ "int main( int argc, const char **argv )\n"
+ "{\n"
+ " struct colm_program *prg;\n"
+ " int exitStatus;\n"
+ " prg = colm_new_program( &colm_object );\n"
+ " colm_set_debug( prg, " << activeRealm << " );\n"
+ " colm_run_program( prg, argc, argv );\n"
+ " exitStatus = colm_delete_program( prg );\n"
+ " return exitStatus;\n"
+ "}\n"
+ "\n";
+
+ out.flush();
+}
+
+
diff --git a/src/codevect.c b/src/codevect.c
new file mode 100644
index 0000000..a05c7ea
--- /dev/null
+++ b/src/codevect.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <colm/rtvector.h>
+#include <colm/pdarun.h>
+
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+
+
+void initRtCodeVect( RtCodeVect *vect )
+{
+ vect->data = 0;
+ vect->tabLen = 0;
+ vect->allocLen = 0;
+}
+
+static long newSizeUp( long existing, long needed )
+{
+ return needed > existing ? (needed<<1) : existing;
+}
+
+static long newSizeDown( long existing, long needed )
+{
+ return needed < (existing>>2) ? (needed<<1) : existing;
+}
+
+/* Up resize the data for len elements using Resize::upResize to tell us the
+ * new tabLen. Reads and writes allocLen. Does not read or write tabLen. */
+static void upResize( RtCodeVect *vect, long len )
+{
+ /* Ask the resizer what the new tabLen will be. */
+ long newLen = newSizeUp(vect->allocLen, len);
+
+ /* Did the data grow? */
+ if ( newLen > vect->allocLen ) {
+ vect->allocLen = newLen;
+ if ( vect->data != 0 ) {
+ /* Table exists already, resize it up. */
+ vect->data = (Code*) realloc( vect->data, sizeof(Code) * newLen );
+ //if ( vect->data == 0 )
+ // throw std::bad_alloc();
+ }
+ else {
+ /* Create the data. */
+ vect->data = (Code*) malloc( sizeof(Code) * newLen );
+ //if ( vect->data == 0 )
+ // throw std::bad_alloc();
+ }
+ }
+}
+
+/* Down resize the data for len elements using Resize::downResize to determine
+ * the new tabLen. Reads and writes allocLen. Does not read or write tabLen. */
+static void downResize( RtCodeVect *vect, long len)
+{
+ /* Ask the resizer what the new tabLen will be. */
+ long newLen = newSizeDown( vect->allocLen, len );
+
+ /* Did the data shrink? */
+ if ( newLen < vect->allocLen ) {
+ vect->allocLen = newLen;
+ if ( newLen == 0 ) {
+ /* Simply free the data. */
+ free( vect->data );
+ vect->data = 0;
+ }
+ else {
+ /* Not shrinking to size zero, realloc it to the smaller size. */
+ vect->data = (Code*) realloc( vect->data, sizeof(Code) * newLen );
+ //if ( vect->data == 0 )
+ // throw std::bad_alloc();
+ }
+ }
+}
+
+
+void rtCodeVectEmpty( RtCodeVect *vect )
+{
+ if ( vect->data != 0 ) {
+ /* Free the data space. */
+ free( vect->data );
+ vect->data = 0;
+ vect->tabLen = vect->allocLen = 0;
+ }
+}
+
+void rtCodeVectReplace( RtCodeVect *vect, long pos, const Code *val, long len )
+{
+ long endPos, i;
+ //Code *item;
+
+ /* If we are given a negative position to replace at then
+ * treat it as a position relative to the length. */
+ if ( pos < 0 )
+ pos = vect->tabLen + pos;
+
+ /* The end is the one past the last item that we want
+ * to write to. */
+ endPos = pos + len;
+
+ /* Make sure we have enough space. */
+ if ( endPos > vect->tabLen ) {
+ upResize( vect, endPos );
+
+ /* Delete any objects we need to delete. */
+ //item = vect->data + pos;
+ //for ( i = pos; i < vect->tabLen; i++, item++ )
+ // item->~Code();
+
+ /* We are extending the vector, set the new data length. */
+ vect->tabLen = endPos;
+ }
+ else {
+ /* Delete any objects we need to delete. */
+ //item = vect->data + pos;
+ //for ( i = pos; i < endPos; i++, item++ )
+ // item->~Code();
+ }
+
+ /* Copy data in using copy constructor. */
+ Code *dst = vect->data + pos;
+ const Code *src = val;
+ for ( i = 0; i < len; i++, dst++, src++ )
+ *dst = *src;
+}
+
+void rtCodeVectRemove( RtCodeVect *vect, long pos, long len )
+{
+ long newLen, lenToSlideOver, endPos;
+ Code *dst;//, *item;
+
+ /* If we are given a negative position to remove at then
+ * treat it as a position relative to the length. */
+ if ( pos < 0 )
+ pos = vect->tabLen + pos;
+
+ /* The first position after the last item deleted. */
+ endPos = pos + len;
+
+ /* The new data length. */
+ newLen = vect->tabLen - len;
+
+ /* The place in the data we are deleting at. */
+ dst = vect->data + pos;
+
+ /* Call Destructors. */
+ //item = dst;
+ //for ( long i = 0; i < len; i += 1, item += 1 )
+ // item->~Code();
+
+ /* Shift data over if necessary. */
+ lenToSlideOver = vect->tabLen - endPos;
+ if ( len > 0 && lenToSlideOver > 0 )
+ memmove(dst, dst + len, sizeof(Code)*lenToSlideOver);
+
+ /* Shrink the data if necessary. */
+ downResize( vect, newLen );
+
+ /* Set the new data length. */
+ vect->tabLen = newLen;
+}
+
+
diff --git a/src/colm.h b/src/colm.h
new file mode 100644
index 0000000..8bfdb94
--- /dev/null
+++ b/src/colm.h
@@ -0,0 +1,82 @@
+#ifndef __COLM_COLM_H
+#define __COLM_COLM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct colm_data;
+struct colm_tree;
+struct colm_kid;
+struct colm_program;
+struct colm_sections;
+struct colm_tree;
+struct colm_location;
+
+struct colm_tree
+{
+ /* First four will be overlaid in other structures. */
+ short id;
+ unsigned short flags;
+ long refs;
+ struct colm_kid *child;
+
+ struct colm_data *tokdata;
+
+ /* FIXME: this needs to go somewhere else. Will do for now. */
+ unsigned short prodNum;
+};
+
+/*
+ * Interface
+ */
+
+struct colm_print_args
+{
+ void *arg;
+ int comm;
+ int attr;
+ int trim;
+ void (*out)( struct colm_print_args *args, const char *data, int length );
+ void (*open_tree)( struct colm_program *prg, struct colm_tree **sp,
+ struct colm_print_args *args, struct colm_kid *parent, struct colm_kid *kid );
+ void (*print_term)( struct colm_program *prg, struct colm_tree **sp,
+ struct colm_print_args *args, struct colm_kid *kid );
+ void (*close_tree)( struct colm_program *prg, struct colm_tree **sp,
+ struct colm_print_args *args, struct colm_kid *parent, struct colm_kid *kid );
+};
+
+void colm_print_null( struct colm_program *prg, struct colm_tree **sp,
+ struct colm_print_args *args, struct colm_kid *parent, struct colm_kid *kid );
+void colm_print_term_tree( struct colm_program *prg, struct colm_tree **sp,
+ struct colm_print_args *print_args, struct colm_kid *kid );
+
+struct colm_tree **colm_vm_root( struct colm_program *prg );
+struct colm_tree *colm_return_val( struct colm_program *prg );
+void colm_print_tree_args( struct colm_program *prg, struct colm_tree **sp,
+ struct colm_print_args *print_args, struct colm_tree *tree );
+
+int colm_repeat_end( struct colm_tree *tree );
+int colm_list_last( struct colm_tree *tree );
+struct colm_tree *colm_get_rhs_val( struct colm_program *prg, struct colm_tree *tree, int *a );
+struct colm_tree *colm_get_attr( struct colm_tree *tree, long pos );
+struct colm_tree *colm_get_global( struct colm_program *prg, long pos );
+struct colm_tree *colm_get_repeat_next( struct colm_tree *tree );
+struct colm_tree *colm_get_repeat_val( struct colm_tree *tree );
+struct colm_location *colm_find_location( struct colm_program *prg, struct colm_tree *tree );
+
+/*
+ * Primary interface.
+ */
+
+struct colm_program *colm_new_program( struct colm_sections *rtd );
+void colm_set_debug( struct colm_program *prg, long active_realm );
+void colm_run_program( struct colm_program *prg, int argc, const char **argv );
+struct colm_tree *colm_run_func( struct colm_program *prg, int frame_id, const char **params, int param_count );
+int colm_delete_program( struct colm_program *prg );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/colm.lm b/src/colm.lm
new file mode 100644
index 0000000..e0ba8c7
--- /dev/null
+++ b/src/colm.lm
@@ -0,0 +1,765 @@
+# Main region.
+lex
+ token DEF / 'def' /
+ token LEX / 'lex' /
+ token END / 'end' /
+ token TOKEN / 'token' /
+ token RL / 'rl' /
+ token IGNORE / 'ignore' /
+ token PRINT / 'print' /
+ token PRINTS / 'prints' /
+ token PRINT_XML / 'print_xml' /
+ token PRINT_XML_AC / 'print_xml_ac' /
+ token PARSE / 'parse' /
+ token PARSE_STOP / 'parse_stop' /
+ token CONS / 'construct' | 'cons' /
+ token MATCH / 'match' /
+ token REQUIRE / 'require' /
+ token SEND / 'send' /
+ token NAMESPACE / 'namespace' /
+ token FOR / 'for' /
+ token IF / 'if' /
+ token YIELD / 'yield' /
+ token WHILE / 'while' /
+ token ELSIF / 'elsif' /
+ token ELSE / 'else' /
+ token IN / 'in' /
+ token PARSER / 'parser' | 'accum' /
+ token LIST / 'list' /
+ token VECTOR / 'vector' /
+ token MAP / 'map' /
+ token PTR / 'ptr' /
+ token ITER / 'iter' /
+ token REF / 'ref' /
+ token EXPORT / 'export' /
+ token RETURN / 'return' /
+ token BREAK / 'break' /
+ token REJECT / 'reject' /
+ token REDUCEFIRST / 'reducefirst' /
+ token ALIAS / 'alias' /
+ token COMMIT / 'commit' /
+ token NEW / 'new' /
+ token PREEOF / 'preeof' /
+ token GLOBAL / 'global' /
+ token EOS / 'eos' /
+ token CAST / 'cast' /
+
+ token MAKE_TOKEN / 'make_token' /
+ token MAKE_TREE / 'make_tree' /
+
+ token TYPEID / 'typeid' /
+
+ token LITERAL /'literal'/
+ token CONTEXT /'context'/
+ token NI /'ni'/
+
+ token NIL / 'nil' /
+ token TRUE / 'true' /
+ token FALSE / 'false' /
+
+ token LEFT /'left'/
+ token RIGHT /'right'/
+ token NONASSOC /'nonassoc'/
+
+ token INCLUDE /'include'/
+
+ token id /
+ ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) .
+ ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' ) *
+ /
+
+ token number
+ / ( '0' .. '9' ) + /
+
+ token backtick_lit
+ / '`' . ^( ' ' | '\n' | '\t' | ']' )+ | '`]' /
+
+ token DQ / '\"' / ni
+ token SQ / '\'' / ni
+ token TILDE / '~' / ni
+
+ token SQOPEN /'['/
+ token SQCLOSE /']'/
+ token BAR /'|'/
+ token FSLASH /'/'/
+ token COLON /':'/
+ token DOUBLE_COLON /'::'/
+ token DOT /'.'/
+ token ARROW /'->'/
+ token POPEN /'('/
+ token PCLOSE /')'/
+ token COPEN /'{'/
+ token CCLOSE /'}'/
+ token STAR /'*'/
+ token QUESTION /'?'/
+ token EQUALS /'='/
+ token EQEQ /'=='/
+ token NEQ /'!='/
+ token COMMA /','/
+ token LT /'<'/
+ token GT /'>'/
+ token LTEQ /'<='/
+ token GTEQ /'>='/
+ token BANG /'!'/
+ token DOLLAR /'$'/
+ token CARET /'^'/
+ token PERCENT /'%'/
+ token PLUS /'+'/
+ token MINUS /'-'/
+ token AMPAMP /'&&'/
+ token BARBAR /'||'/
+
+ ignore / ( '\n' | '\t' | ' ' )+ /
+ ignore / '#' . ( ^'\n' )* . '\n' /
+end
+
+lex
+ token CONS_DQ / '\"' /
+ token CONS_DQ_NL / '\n' /
+ token CONS_SQOPEN / '[' /
+ token CONS_SQCLOSE / ']' /
+
+ token dq_cons_data
+ / ( ^( '\n' | '\"' | '[' | ']' | '\\' ) | '\\' . any )+ /
+end
+
+lex
+ token CONS_SQ / '\'' /
+ token CONS_SQ_NL / '\n' /
+
+ token sq_cons_data
+ / ( ^( '\n' | '\'' | '\\' ) | '\\' . any )+ /
+end
+
+lex
+ token TILDE_NL / '\n' /
+ token tilde_data
+ / ( ^'\n' )+ /
+end
+
+lex
+ token lex_id /
+ ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) .
+ ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' ) *
+ /
+
+ token lex_uint
+ / ( '0' .. '9' )+ /
+
+ token lex_hex
+ / '0x' . ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )+ /
+
+ token lex_lit /
+ '\'' . ( ^( '\'' | '\\' ) | '\\' . any )* . ( '\'' | '\'i' ) |
+ '\"' . ( ^( '\"' | '\\' ) | '\\' . any )* . ( '\"' | '\"i' )
+ /
+
+ token LEX_DOT /'.'/
+ token LEX_BAR /'|'/
+ token LEX_AMP /'&'/
+ token LEX_DASH /'-'/
+ token LEX_POPEN /'('/
+ token LEX_PCLOSE /')'/
+ token LEX_STAR /'*'/
+ token LEX_STARSTAR /'**'/
+ token LEX_QUESTION /'?'/
+ token LEX_PLUS /'+'/
+ token LEX_CARET /'^'/
+ token LEX_DOTDOT /'..'/
+ token LEX_SQOPEN_POS /'['/ ni
+ token LEX_SQOPEN_NEG /'[^'/ ni
+ token LEX_FSLASH /'/'/
+
+ token LEX_DASHDASH /'--'/
+ token LEX_COLON_GT /':>'/
+ token LEX_COLON_GTGT /':>>'/
+ token LEX_LT_COLON /'<:'/
+
+ ignore /
+ ( '\n' | '\t' | ' ' ) .
+ ( '\n' | '\t' | ' ' )*
+ /
+
+ ignore / '#' . ( ^'\n' )* . '\n' /
+end
+
+lex
+ token RE_DASH / '-' /
+ token RE_CHAR / ^( '\\' | '-' | ']' ) | '\\' . any /
+ token RE_SQCLOSE / ']' /
+end
+
+def start
+ [RootItemList: root_item*]
+
+def root_item
+ [rl_def] :Rl commit
+| [literal_def] :Literal commit
+| [token_def] :Token commit
+| [ic_def] :IgnoreCollector commit
+| [ignore_def] :Ignore commit
+| [cfl_def] :Cfl commit
+| [region_def] :Region commit
+| [context_def] :Context commit
+| [namespace_def] :Namespace commit
+| [function_def] :Function commit
+| [iter_def] :Iter commit
+| [statement] :Statement commit
+| [global_def] :Global commit
+| [export_def] :Export commit
+| [pre_eof_def] :PreEof commit
+| [precedence_def] :Precedence commit
+| [alias_def] :Alias commit
+| [include] :Include commit
+
+def include
+ [INCLUDE SQ SqConsDataList: sq_cons_data* sq_lit_term]
+
+def precedence_def
+ [pred_type pred_token_list]
+
+def pred_type
+ [LEFT] :Left
+| [RIGHT] :Right
+| [NONASSOC] :NonAssoc
+
+def pred_token_list
+ [pred_token_list COMMA pred_token] :List
+| [pred_token] :Base
+
+def pred_token
+ [region_qual id] :Id
+| [region_qual backtick_lit] :Lit
+
+def pre_eof_def
+ [PREEOF COPEN lang_stmt_list CCLOSE]
+
+def alias_def
+ [ALIAS id type_ref]
+
+def context_item
+ [context_var_def] :ContextVar commit
+| [literal_def] :Literal commit
+| [rl_def] :Rl commit
+| [token_def] :Token commit
+| [ic_def] :IgnoreCollector commit
+| [ignore_def] :Ignore commit
+| [cfl_def] :Cfl commit
+| [region_def] :Region commit
+| [context_def] :Context commit
+| [function_def] :Function commit
+| [iter_def] :Iter commit
+| [export_def] :Export commit
+| [pre_eof_def] :PreEof commit
+| [precedence_def] :Precedence commit
+
+def export_def
+ [EXPORT var_def opt_def_init]
+
+def global_def
+ [GLOBAL var_def opt_def_init]
+
+def iter_def
+ [ITER id POPEN ParamVarDefList: param_var_def_list PCLOSE
+ COPEN lang_stmt_list CCLOSE]
+
+def reference_type_ref
+ [REF LT type_ref GT]
+
+def param_var_def_list
+ [param_var_def param_var_def_list]
+| []
+
+def param_var_def
+ [id COLON type_ref] :Type
+| [id COLON reference_type_ref] :Ref
+
+def opt_export
+ [EXPORT] :Export
+| []
+
+def function_def
+ [opt_export type_ref id
+ POPEN ParamVarDefList: param_var_def_list PCLOSE
+ COPEN lang_stmt_list CCLOSE]
+
+def context_var_def
+ [var_def]
+
+def context_def
+ [CONTEXT id ContextItemList: context_item* END]
+
+def literal_def
+ [LITERAL literal_list]
+
+def literal_list
+ [literal_list literal_item] :Item
+| [literal_item] :Base
+
+def literal_item
+ [no_ignore_left backtick_lit no_ignore_right]
+
+def no_ignore_left
+ [NI MINUS] :Ni
+| []
+
+def no_ignore_right
+ [MINUS NI] :Ni
+| []
+
+def namespace_def
+ [NAMESPACE id ItemList: namespace_item* END]
+
+def namespace_item
+ [rl_def] :Rl commit
+| [literal_def] :Literal commit
+| [token_def] :Token commit
+| [ic_def] :IgnoreCollector commit
+| [ignore_def] :Ignore commit
+| [cfl_def] :Cfl commit
+| [region_def] :Region commit
+| [context_def] :Context commit
+| [namespace_def] :Namespace commit
+| [function_def] :Function commit
+| [iter_def] :Iter commit
+| [pre_eof_def] :PreEof commit
+| [precedence_def] :Precedence commit
+| [alias_def] :Alias commit
+| [include] :Include commit
+
+def obj_var_list
+ []
+
+def opt_reduce_first
+ [REDUCEFIRST]
+| []
+
+def cfl_def
+ [DEF id
+ VarDefList: var_def*
+ opt_reduce_first
+ prod_list]
+
+def region_def
+ [LEX RootItemList: root_item* END]
+
+def rl_def
+ [RL id LEX_FSLASH lex_expr LEX_FSLASH]
+
+def opt_lex_expr
+ [lex_expr]
+| []
+
+def token_def
+ [TOKEN id VarDefList: var_def*
+ no_ignore_left
+ LEX_FSLASH opt_lex_expr LEX_FSLASH
+ no_ignore_right
+ opt_translate]
+
+def ic_def
+ [TOKEN id MINUS]
+
+def opt_translate
+ [COPEN lang_stmt_list CCLOSE] :Translate
+| []
+
+def opt_id
+ [id] :Id
+| []
+
+def ignore_def
+ [IGNORE opt_id LEX_FSLASH opt_lex_expr LEX_FSLASH]
+
+def prod_el
+ [opt_prod_el_name region_qual id opt_repeat] :Id
+| [opt_prod_el_name region_qual backtick_lit opt_repeat] :Lit
+
+def opt_prod_el_name
+ [id COLON] :Name
+| []
+
+def prod_el_list
+ [prod_el_list prod_el] :List
+| []
+
+def opt_commit
+ [COMMIT] :Commit
+| []
+
+def opt_prod_name
+ [COLON id] :Name
+| []
+
+def prod
+ [SQOPEN prod_el_list SQCLOSE
+ opt_prod_name
+ opt_commit
+ opt_reduce]
+
+def opt_reduce
+ [COPEN lang_stmt_list CCLOSE] :Reduce
+| []
+
+def prod_list
+ [prod_list BAR prod] :List
+| [prod] :Base
+
+def statement
+ [print_stmt] :Print
+| [expr_stmt] :Expr
+| [var_def opt_def_init] :VarDef
+| [FOR id COLON type_ref IN iter_call block_or_single] :For
+| [IF code_expr block_or_single elsif_list] :If
+| [WHILE code_expr block_or_single] :While
+| [var_ref EQUALS code_expr] :LhsVarRef
+| [YIELD var_ref] :Yield
+| [RETURN code_expr] :Return
+| [BREAK] :Break
+| [REJECT] :Reject
+
+def elsif_list
+ [elsif_clause elsif_list] :Clause
+| [optional_else] :OptElse
+
+def elsif_clause
+ [ELSIF code_expr block_or_single]
+
+def optional_else
+ [ELSE block_or_single] :Else
+| []
+
+def call_arg_list
+ [code_expr call_arg_list]
+| []
+
+def iter_call
+ [E1 var_ref POPEN call_arg_list PCLOSE] :Call
+| [E2 id] :Id
+| [E3 code_expr] :Expr
+
+def block_or_single
+ [COPEN lang_stmt_list CCLOSE] :Block
+| [statement] :Single
+
+def require_pattern
+ [REQUIRE var_ref pattern]
+
+def opt_require_stmt
+ [require_pattern lang_stmt_list] :Require
+| [] :Base
+
+def lang_stmt_list
+ [StmtList: statement* opt_require_stmt]
+
+def opt_def_init
+ [EQUALS code_expr] :Init
+| [] :Base
+
+def var_def
+ [id COLON type_ref]
+
+def print_stmt
+ [PRINT POPEN call_arg_list PCLOSE] :Tree
+| [PRINTS POPEN call_arg_list PCLOSE] :PrintStream
+| [PRINT_XML POPEN call_arg_list PCLOSE] :Xml
+| [PRINT_XML_AC POPEN call_arg_list PCLOSE] :XmlAc
+
+def expr_stmt
+ [code_expr]
+
+def code_expr
+ [code_expr AMPAMP code_relational] :AmpAmp
+| [code_expr BARBAR code_relational] :BarBar
+| [code_relational] :Base
+
+def code_relational
+ [code_relational EQEQ code_additive] :EqEq
+| [code_relational NEQ code_additive] :Neq
+| [code_relational LT code_additive] :Lt
+| [code_relational GT code_additive] :Gt
+| [code_relational LTEQ code_additive] :LtEq
+| [code_relational GTEQ code_additive] :GtEq
+| [code_additive] :Base
+
+def code_additive
+ [code_additive PLUS code_multiplicitive] :Plus
+| [code_additive MINUS code_multiplicitive] :Minus
+| [code_multiplicitive] :Base
+
+def code_multiplicitive
+ [code_multiplicitive STAR code_unary] :Star
+| [code_multiplicitive FSLASH code_unary] :Fslash
+| [code_unary] :Base
+
+def code_unary
+ [BANG code_factor] :Bang
+| [DOLLAR code_factor] :Dollar
+| [CARET code_factor] :Caret
+| [PERCENT code_factor] :Percent
+| [code_factor] :Base
+
+def opt_eos
+ [DOT] :Dot
+| [EOS] :Eos
+| []
+
+def code_factor
+ [number] :Number
+| [var_ref POPEN call_arg_list PCLOSE] :Call
+| [var_ref] :VarRef
+| [NIL] :Nil
+| [TRUE] :True
+| [FALSE] :False
+| [POPEN code_expr PCLOSE] :Paren
+| [SEND var_ref accumulate opt_eos] :Send
+| [PARSE opt_capture type_ref opt_field_init accumulate] :Parse
+| [PARSE_STOP opt_capture type_ref opt_field_init accumulate] :ParseStop
+| [CONS opt_capture type_ref opt_field_init constructor] :Cons
+| [MATCH var_ref pattern] :Match
+| [string] :String
+| [type_ref IN var_ref] :In
+| [MAKE_TREE POPEN call_arg_list PCLOSE] :MakeTree
+| [MAKE_TOKEN POPEN call_arg_list PCLOSE] :MakeToken
+| [TYPEID LT type_ref GT] :TypeId
+| [NEW code_factor] :New
+| [CAST LT type_ref GT code_factor] :Cast
+
+def type_ref
+ [region_qual id opt_repeat] :Id
+| [PTR LT region_qual id opt_repeat GT] :Ptr
+| [MAP LT MapKeyType: type_ref MapValueType: type_ref GT] :Map
+| [LIST LT type_ref GT] :List
+| [VECTOR LT type_ref GT] :Vector
+| [PARSER LT type_ref GT] :Parser
+
+def region_qual
+ [region_qual id DOUBLE_COLON] :Qual
+| [] :Base
+
+def opt_repeat
+ [STAR] :Star
+| [PLUS] :Plus
+| [QUESTION] :Question
+| []
+
+def opt_capture
+ [id COLON] :Id
+| []
+
+def opt_field_init
+ [POPEN FieldInitList: field_init* PCLOSE] :Init
+| [] :Base
+
+def field_init
+ [code_expr]
+
+
+#
+# Pattern
+#
+
+def opt_label
+ [id COLON] :Id
+| []
+
+def dq_lit_term
+ [CONS_DQ] | [CONS_DQ_NL]
+
+def sq_lit_term
+ [CONS_SQ] | [CONS_SQ_NL]
+
+def opt_tilde_data
+ [tilde_data]
+| []
+
+def pattern_el_lel
+ [region_qual id opt_repeat] :Id
+| [region_qual backtick_lit opt_repeat] :Lit
+
+def pattern_el
+ [opt_label pattern_el_lel] :PatternEl
+| [DQ LitpatElList: litpat_el* dq_lit_term] :Dq
+| [SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq
+| [TILDE opt_tilde_data TILDE_NL] :Tilde
+
+def litpat_el
+ [dq_cons_data] :ConsData
+| [CONS_SQOPEN PatternElList: pattern_el* CONS_SQCLOSE] :SubList
+
+def pattern_top_el
+ [DQ LitpatElList: litpat_el* dq_lit_term] :Dq
+| [SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq
+| [TILDE opt_tilde_data TILDE_NL] :Tilde
+| [SQOPEN PatternElList: pattern_el* SQCLOSE] :SubList
+
+def pattern_list
+ [pattern_list pattern_top_el] :List
+| [pattern_top_el] :Base
+
+def pattern
+ [pattern_list]
+
+#
+# Constructor List
+#
+
+def E1 []
+def E2 []
+def E3 []
+def E4 []
+
+def cons_el
+ [E1 region_qual backtick_lit] :Lit
+| [E1 DQ LitConsElList: lit_cons_el* dq_lit_term] :Dq
+| [E1 SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq
+| [E1 TILDE opt_tilde_data TILDE_NL] :Tilde
+| [E2 code_expr] :CodeExpr
+
+def lit_cons_el
+ [dq_cons_data] :ConsData
+| [CONS_SQOPEN ConsElList: cons_el* CONS_SQCLOSE] :SubList
+
+def cons_top_el
+ [DQ LitConsElList: lit_cons_el* dq_lit_term] :Dq
+| [SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq
+| [TILDE opt_tilde_data TILDE_NL] :Tilde
+| [SQOPEN ConsElList: cons_el* SQCLOSE] :SubList
+
+def cons_list
+ [cons_top_el cons_list] :List
+| [cons_top_el] :Base
+
+def constructor
+ [cons_list]
+
+#
+# Accumulate
+#
+
+def accum_el
+ [E1 DQ LitAccumElList: lit_accum_el* dq_lit_term] :Dq
+| [E1 SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq
+| [E1 TILDE opt_tilde_data TILDE_NL] :Tilde
+| [E2 code_expr] :CodeExpr
+
+def lit_accum_el
+ [dq_cons_data] :ConsData
+| [CONS_SQOPEN AccumElList: accum_el* CONS_SQCLOSE] :SubList
+
+def accum_top_el
+ [DQ LitAccumElList: lit_accum_el* dq_lit_term] :Dq
+| [SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq
+| [TILDE opt_tilde_data TILDE_NL] :Tilde
+| [SQOPEN AccumElList: accum_el* SQCLOSE] :SubList
+
+def accum_list
+ [accum_top_el accum_list] :List
+| [accum_top_el] :Base
+
+def accumulate
+ [accum_list]
+
+#
+# String List
+#
+
+def string_el
+ [E1 DQ LitStringElList: lit_string_el* dq_lit_term] :Dq
+| [E1 SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq
+| [E1 TILDE opt_tilde_data TILDE_NL] :Tilde
+| [E2 code_expr] :CodeExpr
+
+def lit_string_el
+ [dq_cons_data] :ConsData
+| [CONS_SQOPEN StringElList: string_el* CONS_SQCLOSE] :SubList
+
+def string_top_el
+ [DQ LitStringElList: lit_string_el* dq_lit_term] :Dq
+| [SQ SqConsDataList: sq_cons_data* sq_lit_term] :Sq
+| [TILDE opt_tilde_data TILDE_NL] :Tilde
+| [SQOPEN StringElList: string_el* SQCLOSE] :SubList
+
+def string_list
+ [string_top_el string_list] :List
+| [string_top_el] :Base
+
+def string
+ [string_list]
+
+#
+# Variable References
+#
+
+def var_ref
+ [qual id]
+
+def qual
+ [qual id DOT] :Dot
+| [qual id ARROW] :Arrow
+| [] :Base
+
+#
+# Lexical analysis.
+#
+
+def lex_expr
+ [lex_expr LEX_BAR lex_term] :Bar
+| [lex_expr LEX_AMP lex_term] :Amp
+| [lex_expr LEX_DASH lex_term] :Dash
+| [lex_expr LEX_DASHDASH lex_term] :DashDash
+| [lex_term] :Base
+
+def opt_lex_dot
+ [LEX_DOT]
+| []
+
+def lex_term
+ [lex_term opt_lex_dot lex_factor_rep] :Dot
+| [lex_term LEX_COLON_GT lex_factor_rep] :ColonGt
+| [lex_term LEX_COLON_GTGT lex_factor_rep] :ColonGtGt
+| [lex_term LEX_LT_COLON lex_factor_rep] :LtColon
+| [lex_factor_rep] :Base
+
+def lex_factor_rep
+ [lex_factor_rep LEX_STAR] :Star
+| [lex_factor_rep LEX_STARSTAR] :StarStar
+| [lex_factor_rep LEX_PLUS] :Plus
+| [lex_factor_rep LEX_QUESTION] :Question
+| [lex_factor_rep COPEN lex_uint CCLOSE ] :Exact
+| [lex_factor_rep COPEN COMMA lex_uint CCLOSE ] :Max
+| [lex_factor_rep COPEN lex_uint COMMA CCLOSE ] :Min
+| [lex_factor_rep COPEN Low: lex_uint COMMA High: lex_uint CCLOSE ] :Range
+| [lex_factor_neg] :Base
+
+def lex_factor_neg
+ [LEX_CARET lex_factor_neg] :Caret
+| [lex_factor] :Base
+
+def lex_range_lit
+ [lex_lit] :Lit
+| [lex_num] :Number
+
+def lex_num
+ [lex_uint]
+| [lex_hex]
+
+#| [LEX_DASH num]
+
+def lex_factor
+ [lex_lit] :Literal
+| [lex_id] :Id
+| [lex_uint] :Number
+| [lex_hex] :Hex
+| [Low: lex_range_lit LEX_DOTDOT High: lex_range_lit] :Range
+| [LEX_SQOPEN_POS reg_or_data RE_SQCLOSE] :PosOrBlock
+| [LEX_SQOPEN_NEG reg_or_data RE_SQCLOSE] :NegOrBlock
+| [LEX_POPEN lex_expr LEX_PCLOSE] :Paren
+
+def reg_or_data
+ [reg_or_data reg_or_char] :Data
+| [] :Base
+
+def reg_or_char
+ [RE_CHAR] :Char
+| [Low: RE_CHAR RE_DASH High: RE_CHAR] :Range
diff --git a/src/compiler.cc b/src/compiler.cc
new file mode 100644
index 0000000..d60519e
--- /dev/null
+++ b/src/compiler.cc
@@ -0,0 +1,1170 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <iostream>
+#include <iomanip>
+#include <errno.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <sstream>
+
+#include "global.h"
+#include "avltree.h"
+#include "parsedata.h"
+#include "parser.h"
+#include "parsedata.h"
+#include "parsetree.h"
+#include "mergesort.h"
+#include "redbuild.h"
+#include "pdacodegen.h"
+#include "fsmcodegen.h"
+#include "pdarun.h"
+#include "colm.h"
+#include "pool.h"
+
+using std::ostringstream;
+using std::cout;
+using std::cerr;
+using std::endl;
+
+char machineMain[] = "main";
+exit_object endp;
+void operator<<( ostream &out, exit_object & )
+{
+ out << endl;
+ exit(1);
+}
+
+/* Perform minimization after an operation according
+ * to the command line args. */
+void afterOpMinimize( FsmGraph *fsm, bool lastInSeq )
+{
+ /* Switch on the prefered minimization algorithm. */
+ if ( lastInSeq ) {
+ /* First clean up the graph. FsmGraph operations may leave these
+ * lying around. There should be no dead end states. The subtract
+ * intersection operators are the only places where they may be
+ * created and those operators clean them up. */
+ fsm->removeUnreachableStates();
+ fsm->minimizePartition2();
+ }
+}
+
+/* Count the transitions in the fsm by walking the state list. */
+int countTransitions( FsmGraph *fsm )
+{
+ int numTrans = 0;
+ FsmState *state = fsm->stateList.head;
+ while ( state != 0 ) {
+ numTrans += state->outList.length();
+ state = state->next;
+ }
+ return numTrans;
+}
+
+Key makeFsmKeyHex( char *str, const InputLoc &loc, Compiler *pd )
+{
+ /* Reset errno so we can check for overflow or underflow. In the event of
+ * an error, sets the return val to the upper or lower bound being tested
+ * against. */
+ errno = 0;
+ unsigned int size = keyOps->alphType->size;
+ bool unusedBits = size < sizeof(unsigned long);
+
+ unsigned long ul = strtoul( str, 0, 16 );
+
+ if ( errno == ERANGE || (unusedBits && ul >> (size * 8)) ) {
+ error(loc) << "literal " << str << " overflows the alphabet type" << endl;
+ ul = 1 << (size * 8);
+ }
+
+ if ( unusedBits && ul >> (size * 8 - 1) )
+ ul |= (ULONG_MAX >> (size*8 ) ) << (size*8);
+
+ return Key( (long)ul );
+}
+
+Key makeFsmKeyDec( char *str, const InputLoc &loc, Compiler *pd )
+{
+ /* Convert the number to a decimal. First reset errno so we can check
+ * for overflow or underflow. */
+ errno = 0;
+ long long minVal = keyOps->alphType->minVal;
+ long long maxVal = keyOps->alphType->maxVal;
+
+ long long ll = strtoll( str, 0, 10 );
+
+ /* Check for underflow. */
+ if ( (errno == ERANGE && ll < 0) || ll < minVal) {
+ error(loc) << "literal " << str << " underflows the alphabet type" << endl;
+ ll = minVal;
+ }
+ /* Check for overflow. */
+ else if ( (errno == ERANGE && ll > 0) || ll > maxVal ) {
+ error(loc) << "literal " << str << " overflows the alphabet type" << endl;
+ ll = maxVal;
+ }
+
+ return Key( (long)ll );
+}
+
+/* Make an fsm key in int format (what the fsm graph uses) from an alphabet
+ * number returned by the parser. Validates that the number doesn't overflow
+ * the alphabet type. */
+Key makeFsmKeyNum( char *str, const InputLoc &loc, Compiler *pd )
+{
+ /* Switch on hex/decimal format. */
+ if ( str[0] == '0' && str[1] == 'x' )
+ return makeFsmKeyHex( str, loc, pd );
+ else
+ return makeFsmKeyDec( str, loc, pd );
+}
+
+/* Make an fsm int format (what the fsm graph uses) from a single character.
+ * Performs proper conversion depending on signed/unsigned property of the
+ * alphabet. */
+Key makeFsmKeyChar( char c, Compiler *pd )
+{
+ /* Copy from a char type. */
+ return Key( c );
+}
+
+/* Make an fsm key array in int format (what the fsm graph uses) from a string
+ * of characters. Performs proper conversion depending on signed/unsigned
+ * property of the alphabet. */
+void makeFsmKeyArray( Key *result, char *data, int len, Compiler *pd )
+{
+ /* Copy from a char star type. */
+ char *src = data;
+ for ( int i = 0; i < len; i++ )
+ result[i] = Key(src[i]);
+}
+
+/* Like makeFsmKeyArray except the result has only unique keys. They ordering
+ * will be changed. */
+void makeFsmUniqueKeyArray( KeySet &result, char *data, int len,
+ bool caseInsensitive, Compiler *pd )
+{
+ /* Copy from a char star type. */
+ char *src = data;
+ for ( int si = 0; si < len; si++ ) {
+ Key key( src[si] );
+ result.insert( key );
+ if ( caseInsensitive ) {
+ if ( key.isLower() )
+ result.insert( key.toUpper() );
+ else if ( key.isUpper() )
+ result.insert( key.toLower() );
+ }
+ }
+}
+
+FsmGraph *dotFsm( Compiler *pd )
+{
+ FsmGraph *retFsm = new FsmGraph();
+ retFsm->rangeFsm( keyOps->minKey, keyOps->maxKey );
+ return retFsm;
+}
+
+FsmGraph *dotStarFsm( Compiler *pd )
+{
+ FsmGraph *retFsm = new FsmGraph();
+ retFsm->rangeStarFsm( keyOps->minKey, keyOps->maxKey );
+ return retFsm;
+}
+
+/* Make a builtin type. Depends on the signed nature of the alphabet type. */
+FsmGraph *makeBuiltin( BuiltinMachine builtin, Compiler *pd )
+{
+ /* FsmGraph created to return. */
+ FsmGraph *retFsm = 0;
+
+ switch ( builtin ) {
+ case BT_Any: {
+ /* All characters. */
+ retFsm = dotFsm( pd );
+ break;
+ }
+ case BT_Ascii: {
+ /* Ascii characters 0 to 127. */
+ retFsm = new FsmGraph();
+ retFsm->rangeFsm( 0, 127 );
+ break;
+ }
+ case BT_Extend: {
+ /* Ascii extended characters. This is the full byte range. Dependent
+ * on signed, vs no signed. If the alphabet is one byte then just use
+ * dot fsm. */
+ retFsm = new FsmGraph();
+ retFsm->rangeFsm( -128, 127 );
+ break;
+ }
+ case BT_Alpha: {
+ /* Alpha [A-Za-z]. */
+ FsmGraph *upper = new FsmGraph(), *lower = new FsmGraph();
+ upper->rangeFsm( 'A', 'Z' );
+ lower->rangeFsm( 'a', 'z' );
+ upper->unionOp( lower );
+ upper->minimizePartition2();
+ retFsm = upper;
+ break;
+ }
+ case BT_Digit: {
+ /* Digits [0-9]. */
+ retFsm = new FsmGraph();
+ retFsm->rangeFsm( '0', '9' );
+ break;
+ }
+ case BT_Alnum: {
+ /* Alpha numerics [0-9A-Za-z]. */
+ FsmGraph *digit = new FsmGraph(), *lower = new FsmGraph();
+ FsmGraph *upper = new FsmGraph();
+ digit->rangeFsm( '0', '9' );
+ upper->rangeFsm( 'A', 'Z' );
+ lower->rangeFsm( 'a', 'z' );
+ digit->unionOp( upper );
+ digit->unionOp( lower );
+ digit->minimizePartition2();
+ retFsm = digit;
+ break;
+ }
+ case BT_Lower: {
+ /* Lower case characters. */
+ retFsm = new FsmGraph();
+ retFsm->rangeFsm( 'a', 'z' );
+ break;
+ }
+ case BT_Upper: {
+ /* Upper case characters. */
+ retFsm = new FsmGraph();
+ retFsm->rangeFsm( 'A', 'Z' );
+ break;
+ }
+ case BT_Cntrl: {
+ /* Control characters. */
+ FsmGraph *cntrl = new FsmGraph();
+ FsmGraph *highChar = new FsmGraph();
+ cntrl->rangeFsm( 0, 31 );
+ highChar->concatFsm( 127 );
+ cntrl->unionOp( highChar );
+ cntrl->minimizePartition2();
+ retFsm = cntrl;
+ break;
+ }
+ case BT_Graph: {
+ /* Graphical ascii characters [!-~]. */
+ retFsm = new FsmGraph();
+ retFsm->rangeFsm( '!', '~' );
+ break;
+ }
+ case BT_Print: {
+ /* Printable characters. Same as graph except includes space. */
+ retFsm = new FsmGraph();
+ retFsm->rangeFsm( ' ', '~' );
+ break;
+ }
+ case BT_Punct: {
+ /* Punctuation. */
+ FsmGraph *range1 = new FsmGraph();
+ FsmGraph *range2 = new FsmGraph();
+ FsmGraph *range3 = new FsmGraph();
+ FsmGraph *range4 = new FsmGraph();
+ range1->rangeFsm( '!', '/' );
+ range2->rangeFsm( ':', '@' );
+ range3->rangeFsm( '[', '`' );
+ range4->rangeFsm( '{', '~' );
+ range1->unionOp( range2 );
+ range1->unionOp( range3 );
+ range1->unionOp( range4 );
+ range1->minimizePartition2();
+ retFsm = range1;
+ break;
+ }
+ case BT_Space: {
+ /* Whitespace: [\t\v\f\n\r ]. */
+ FsmGraph *cntrl = new FsmGraph();
+ FsmGraph *space = new FsmGraph();
+ cntrl->rangeFsm( '\t', '\r' );
+ space->concatFsm( ' ' );
+ cntrl->unionOp( space );
+ cntrl->minimizePartition2();
+ retFsm = cntrl;
+ break;
+ }
+ case BT_Xdigit: {
+ /* Hex digits [0-9A-Fa-f]. */
+ FsmGraph *digit = new FsmGraph();
+ FsmGraph *upper = new FsmGraph();
+ FsmGraph *lower = new FsmGraph();
+ digit->rangeFsm( '0', '9' );
+ upper->rangeFsm( 'A', 'F' );
+ lower->rangeFsm( 'a', 'f' );
+ digit->unionOp( upper );
+ digit->unionOp( lower );
+ digit->minimizePartition2();
+ retFsm = digit;
+ break;
+ }
+ case BT_Lambda: {
+ retFsm = new FsmGraph();
+ retFsm->lambdaFsm();
+ break;
+ }
+ case BT_Empty: {
+ retFsm = new FsmGraph();
+ retFsm->emptyFsm();
+ break;
+ }}
+
+ return retFsm;
+}
+
+/*
+ * Compiler
+ */
+
+/* Initialize the structure that will collect info during the parse of a
+ * machine. */
+Compiler::Compiler( )
+:
+ nextPriorKey(0),
+ nextNameId(0),
+ alphTypeSet(false),
+ getKeyExpr(0),
+ accessExpr(0),
+ curStateExpr(0),
+ lowerNum(0),
+ upperNum(0),
+ errorCount(0),
+ curActionOrd(0),
+ curPriorOrd(0),
+ nextEpsilonResolvedLink(0),
+ nextTokenId(1),
+ rootCodeBlock(0),
+ mainReturnUT(0),
+ //access(0),
+ //tokenStruct(0),
+
+ ptrLangEl(0),
+ boolLangEl(0),
+ intLangEl(0),
+ strLangEl(0),
+ streamLangEl(0),
+ anyLangEl(0),
+ rootLangEl(0),
+ noTokenLangEl(0),
+ eofLangEl(0),
+ errorLangEl(0),
+ ignoreLangEl(0),
+
+ firstNonTermId(0),
+ prodIdIndex(0),
+
+ uniqueTypeNil(0),
+ uniqueTypePtr(0),
+ uniqueTypeBool(0),
+ uniqueTypeInt(0),
+ uniqueTypeStr(0),
+ uniqueTypeStream(0),
+ uniqueTypeIgnore(0),
+ uniqueTypeAny(0),
+ nextPatConsId(0),
+ nextGenericId(1),
+ nextFuncId(0),
+ loopCleanup(0),
+ nextObjectId(1), /* 0 is reserved for no object. */
+ nextFrameId(0),
+ nextParserId(0),
+ revertOn(true),
+ predValue(0),
+ nextMatchEndNum(0),
+ argvTypeRef(0),
+ inContiguous(false),
+ contiguousOffset(0),
+ contiguousStretch(0)
+{
+}
+
+/* Clean up the data collected during a parse. */
+Compiler::~Compiler()
+{
+ /* Delete all the nodes in the action list. Will cause all the
+ * string data that represents the actions to be deallocated. */
+ actionList.empty();
+}
+
+ostream &operator<<( ostream &out, const Token &token )
+{
+ out << token.data;
+ return out;
+}
+
+/* Write out a name reference. */
+ostream &operator<<( ostream &out, const NameRef &nameRef )
+{
+ int pos = 0;
+ if ( nameRef[pos] == 0 ) {
+ out << "::";
+ pos += 1;
+ }
+ out << nameRef[pos++];
+ for ( ; pos < nameRef.length(); pos++ )
+ out << "::" << nameRef[pos];
+ return out;
+}
+
+NameInst **Compiler::makeNameIndex()
+{
+ /* The number of nodes in the tree can now be given by nextNameId. Put a
+ * null pointer on the end of the list to terminate it. */
+ NameInst **nameIndex = new NameInst*[nextNameId+1];
+ memset( nameIndex, 0, sizeof(NameInst*)*(nextNameId+1) );
+
+ for ( NameInstList::Iter ni = nameInstList; ni.lte(); ni++ )
+ nameIndex[ni->id] = ni;
+
+ return nameIndex;
+}
+
+void Compiler::createBuiltin( const char *name, BuiltinMachine builtin )
+{
+ LexExpression *expression = LexExpression::cons( builtin );
+ LexJoin *join = LexJoin::cons( expression );
+ LexDefinition *varDef = new LexDefinition( name, join );
+ GraphDictEl *graphDictEl = new GraphDictEl( name, varDef );
+ rootNamespace->rlMap.insert( graphDictEl );
+}
+
+/* Initialize the graph dict with builtin types. */
+void Compiler::initGraphDict( )
+{
+ createBuiltin( "any", BT_Any );
+ createBuiltin( "ascii", BT_Ascii );
+ createBuiltin( "extend", BT_Extend );
+ createBuiltin( "alpha", BT_Alpha );
+ createBuiltin( "digit", BT_Digit );
+ createBuiltin( "alnum", BT_Alnum );
+ createBuiltin( "lower", BT_Lower );
+ createBuiltin( "upper", BT_Upper );
+ createBuiltin( "cntrl", BT_Cntrl );
+ createBuiltin( "graph", BT_Graph );
+ createBuiltin( "print", BT_Print );
+ createBuiltin( "punct", BT_Punct );
+ createBuiltin( "space", BT_Space );
+ createBuiltin( "xdigit", BT_Xdigit );
+ createBuiltin( "null", BT_Lambda );
+ createBuiltin( "zlen", BT_Lambda );
+ createBuiltin( "empty", BT_Empty );
+}
+
+/* Initialize the key operators object that will be referenced by all fsms
+ * created. */
+void Compiler::initKeyOps( )
+{
+ /* Signedness and bounds. */
+ HostType *alphType = alphTypeSet ? userAlphType : hostLang->defaultAlphType;
+ thisKeyOps.setAlphType( alphType );
+
+ if ( lowerNum != 0 ) {
+ /* If ranges are given then interpret the alphabet type. */
+ thisKeyOps.minKey = makeFsmKeyNum( lowerNum, rangeLowLoc, this );
+ thisKeyOps.maxKey = makeFsmKeyNum( upperNum, rangeHighLoc, this );
+ }
+}
+
+/* Remove duplicates of unique actions from an action table. */
+void Compiler::removeDups( ActionTable &table )
+{
+ /* Scan through the table looking for unique actions to
+ * remove duplicates of. */
+ for ( int i = 0; i < table.length(); i++ ) {
+ /* Remove any duplicates ahead of i. */
+ for ( int r = i+1; r < table.length(); ) {
+ if ( table[r].value == table[i].value )
+ table.vremove(r);
+ else
+ r += 1;
+ }
+ }
+}
+
+/* Remove duplicates from action lists. This operates only on transition and
+ * eof action lists and so should be called once all actions have been
+ * transfered to their final resting place. */
+void Compiler::removeActionDups( FsmGraph *graph )
+{
+ /* Loop all states. */
+ for ( StateList::Iter state = graph->stateList; state.lte(); state++ ) {
+ /* Loop all transitions. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ )
+ removeDups( trans->actionTable );
+ removeDups( state->toStateActionTable );
+ removeDups( state->fromStateActionTable );
+ removeDups( state->eofActionTable );
+ }
+}
+
+Action *Compiler::newAction( const String &name, InlineList *inlineList )
+{
+ InputLoc loc;
+ loc.line = 1;
+ loc.col = 1;
+ loc.fileName = 0;
+
+ Action *action = Action::cons( loc, name, inlineList );
+ actionList.append( action );
+ return action;
+}
+
+void Compiler::initLongestMatchData()
+{
+ if ( regionSetList.length() > 0 ) {
+ /* The initActId action gives act a default value. */
+ InlineList *il4 = InlineList::cons();
+ il4->append( InlineItem::cons( InputLoc(), InlineItem::LmInitAct ) );
+ initActId = newAction( "initact", il4 );
+ initActId->isLmAction = true;
+
+ /* The setTokStart action sets tokstart. */
+ InlineList *il5 = InlineList::cons();
+ il5->append( InlineItem::cons( InputLoc(), InlineItem::LmSetTokStart ) );
+ setTokStart = newAction( "tokstart", il5 );
+ setTokStart->isLmAction = true;
+
+ /* The setTokEnd action sets tokend. */
+ InlineList *il3 = InlineList::cons();
+ il3->append( InlineItem::cons( InputLoc(), InlineItem::LmSetTokEnd ) );
+ setTokEnd = newAction( "tokend", il3 );
+ setTokEnd->isLmAction = true;
+
+ /* The action will also need an ordering: ahead of all user action
+ * embeddings. */
+ initActIdOrd = curActionOrd++;
+ setTokStartOrd = curActionOrd++;
+ setTokEndOrd = curActionOrd++;
+ }
+}
+
+void Compiler::finishGraphBuild( FsmGraph *graph )
+{
+ /* Resolve any labels that point to multiple states. Any labels that are
+ * still around are referenced only by gotos and calls and they need to be
+ * made into deterministic entry points. */
+ graph->deterministicEntry();
+
+ /*
+ * All state construction is now complete.
+ */
+
+ /* Transfer global error actions. */
+ for ( StateList::Iter state = graph->stateList; state.lte(); state++ )
+ graph->transferErrorActions( state, 0 );
+
+ removeActionDups( graph );
+
+ /* Remove unreachable states. There should be no dead end states. The
+ * subtract and intersection operators are the only places where they may
+ * be created and those operators clean them up. */
+ graph->removeUnreachableStates();
+
+ /* No more fsm operations are to be done. Action ordering numbers are
+ * no longer of use and will just hinder minimization. Clear them. */
+ graph->nullActionKeys();
+
+ /* Transition priorities are no longer of use. We can clear them
+ * because they will just hinder minimization as well. Clear them. */
+ graph->clearAllPriorities();
+
+ /* Minimize here even if we minimized at every op. Now that function
+ * keys have been cleared we may get a more minimal fsm. */
+ graph->minimizePartition2();
+ graph->compressTransitions();
+}
+
+/* Build the name tree and supporting data structures. */
+NameInst *Compiler::makeNameTree()
+{
+ /* Create the root name. */
+ nextNameId = 1;
+
+ /* First make the name tree. */
+ for ( RegionImplList::Iter rel = regionImplList; rel.lte(); rel++ ) {
+ /* Recurse on the instance. */
+ rel->makeNameTree( rel->loc, this );
+ }
+
+ return 0;
+}
+
+FsmGraph *Compiler::makeAllRegions()
+{
+ /* Build the name tree and supporting data structures. */
+ makeNameTree();
+ NameInst **nameIndex = makeNameIndex();
+
+ int numGraphs = 0;
+ FsmGraph **graphs = new FsmGraph*[regionImplList.length()];
+
+ /* Make all the instantiations, we know that main exists in this list. */
+ for ( RegionImplList::Iter rel = regionImplList; rel.lte(); rel++ ) {
+ /* Build the graph from a walk of the parse tree. */
+ FsmGraph *newGraph = rel->walk( this );
+
+ /* Wrap up the construction. */
+ finishGraphBuild( newGraph );
+
+ /* Save off the new graph. */
+ graphs[numGraphs++] = newGraph;
+ }
+
+ /* NOTE: If putting in minimization here we need to include eofTarget
+ * into the minimization algorithm. It is currently set by the longest
+ * match operator and not considered anywhere else. */
+
+ FsmGraph *all;
+ if ( numGraphs == 0 ) {
+ all = new FsmGraph;
+ all->lambdaFsm();
+ }
+ else {
+ /* Add all the other graphs into the first. */
+ all = graphs[0];
+ all->globOp( graphs+1, numGraphs-1 );
+ delete[] graphs;
+ }
+
+ /* Go through all the token regions and check for lmRequiresErrorState. */
+ for ( RegionImplList::Iter reg = regionImplList; reg.lte(); reg++ ) {
+ if ( reg->lmSwitchHandlesError )
+ all->lmRequiresErrorState = true;
+ }
+
+ all->nameIndex = nameIndex;
+
+ return all;
+}
+
+void Compiler::analyzeAction( Action *action, InlineList *inlineList )
+{
+ /* FIXME: Actions used as conditions should be very constrained. */
+ for ( InlineList::Iter item = *inlineList; item.lte(); item++ ) {
+ //if ( item->type == InlineItem::Call || item->type == InlineItem::CallExpr )
+ // action->anyCall = true;
+
+ /* Need to recurse into longest match items. */
+ if ( item->type == InlineItem::LmSwitch ) {
+ RegionImpl *lm = item->tokenRegion;
+ for ( TokenInstanceListReg::Iter lmi = lm->tokenInstanceList; lmi.lte(); lmi++ ) {
+ if ( lmi->action != 0 )
+ analyzeAction( action, lmi->action->inlineList );
+ }
+ }
+
+ if ( item->type == InlineItem::LmOnLast ||
+ item->type == InlineItem::LmOnNext ||
+ item->type == InlineItem::LmOnLagBehind )
+ {
+ TokenInstance *lmi = item->longestMatchPart;
+ if ( lmi->action != 0 )
+ analyzeAction( action, lmi->action->inlineList );
+ }
+
+ if ( item->children != 0 )
+ analyzeAction( action, item->children );
+ }
+}
+
+void Compiler::analyzeGraph( FsmGraph *graph )
+{
+ for ( ActionList::Iter act = actionList; act.lte(); act++ )
+ analyzeAction( act, act->inlineList );
+
+ for ( StateList::Iter st = graph->stateList; st.lte(); st++ ) {
+ /* The transition list. */
+ for ( TransList::Iter trans = st->outList; trans.lte(); trans++ ) {
+ for ( ActionTable::Iter at = trans->actionTable; at.lte(); at++ )
+ at->value->numTransRefs += 1;
+ }
+
+ for ( ActionTable::Iter at = st->toStateActionTable; at.lte(); at++ )
+ at->value->numToStateRefs += 1;
+
+ for ( ActionTable::Iter at = st->fromStateActionTable; at.lte(); at++ )
+ at->value->numFromStateRefs += 1;
+
+ for ( ActionTable::Iter at = st->eofActionTable; at.lte(); at++ )
+ at->value->numEofRefs += 1;
+ }
+}
+
+FsmGraph *Compiler::makeScanner()
+{
+ /* Make the graph, do minimization. */
+ FsmGraph *fsmGraph = makeAllRegions();
+
+ /* If any errors have occured in the input file then don't write anything. */
+ if ( gblErrorCount > 0 )
+ return 0;
+
+ analyzeGraph( fsmGraph );
+
+ /* Decide if an error state is necessary.
+ * 1. There is an error transition
+ * 2. There is a gap in the transitions
+ * 3. The longest match operator requires it. */
+ if ( fsmGraph->lmRequiresErrorState || fsmGraph->hasErrorTrans() )
+ fsmGraph->errState = fsmGraph->addState();
+
+ /* State numbers need to be assigned such that all final states have a
+ * larger state id number than all non-final states. This enables the
+ * first_final mechanism to function correctly. We also want states to be
+ * ordered in a predictable fashion. So we first apply a depth-first
+ * search, then do a stable sort by final state status, then assign
+ * numbers. */
+
+ fsmGraph->depthFirstOrdering();
+ fsmGraph->sortStatesByFinal();
+ fsmGraph->setStateNumbers( 0 );
+
+ return fsmGraph;
+}
+
+LangEl *Compiler::makeRepeatProd( const InputLoc &loc, Namespace *nspace,
+ const String &repeatName, UniqueType *ut )
+{
+ LangEl *prodName = addLangEl( this, nspace, repeatName, LangEl::NonTerm );
+ prodName->isRepeat = true;
+
+ ProdElList *prodElList1 = new ProdElList;
+
+ /* Build the first production of the repeat. */
+ TypeRef *typeRef1 = TypeRef::cons( loc, ut );
+ ProdEl *factor1 = new ProdEl( ProdEl::ReferenceType, InputLoc(), 0, false, typeRef1, 0 );
+
+ UniqueType *prodNameUT = findUniqueType( TYPE_TREE, prodName );
+ TypeRef *typeRef2 = TypeRef::cons( loc, prodNameUT );
+ ProdEl *factor2 = new ProdEl( ProdEl::ReferenceType, InputLoc(), 0, false, typeRef2, 0 );
+
+ prodElList1->append( factor1 );
+ prodElList1->append( factor2 );
+
+ Production *newDef1 = Production::cons( InputLoc(),
+ prodName, prodElList1, String(), false, 0,
+ prodList.length(), prodName->defList.length() );
+
+ prodName->defList.append( newDef1 );
+ prodList.append( newDef1 );
+
+ /* Build the second production of the repeat. */
+ ProdElList *prodElList2 = new ProdElList;
+
+ Production *newDef2 = Production::cons( InputLoc(),
+ prodName, prodElList2, String(), false, 0,
+ prodList.length(), prodName->defList.length() );
+
+ prodName->defList.append( newDef2 );
+ prodList.append( newDef2 );
+
+ return prodName;
+}
+
+LangEl *Compiler::makeListProd( const InputLoc &loc, Namespace *nspace,
+ const String &listName, UniqueType *ut )
+{
+ LangEl *prodName = addLangEl( this, nspace, listName, LangEl::NonTerm );
+ prodName->isList = true;
+
+ /* Build the first production of the list. */
+ TypeRef *typeRef1 = TypeRef::cons( loc, ut );
+ ProdEl *factor1 = new ProdEl( ProdEl::ReferenceType, InputLoc(), 0, false, typeRef1, 0 );
+
+ UniqueType *prodNameUT = findUniqueType( TYPE_TREE, prodName );
+ TypeRef *typeRef2 = TypeRef::cons( loc, prodNameUT );
+ ProdEl *factor2 = new ProdEl( ProdEl::ReferenceType, loc, 0, false, typeRef2, 0 );
+
+ ProdElList *prodElList1 = new ProdElList;
+ prodElList1->append( factor1 );
+ prodElList1->append( factor2 );
+
+ Production *newDef1 = Production::cons( loc,
+ prodName, prodElList1, String(), false, 0,
+ prodList.length(), prodName->defList.length() );
+
+ prodName->defList.append( newDef1 );
+ prodList.append( newDef1 );
+
+ /* Build the second production of the list. */
+ TypeRef *typeRef3 = TypeRef::cons( loc, ut );
+ ProdEl *factor3 = new ProdEl( ProdEl::ReferenceType, loc, 0, false, typeRef3, 0 );
+
+ ProdElList *prodElList2 = new ProdElList;
+ prodElList2->append( factor3 );
+
+ Production *newDef2 = Production::cons( loc,
+ prodName, prodElList2, String(), false, 0,
+ prodList.length(), prodName->defList.length() );
+
+ prodName->defList.append( newDef2 );
+ prodList.append( newDef2 );
+
+ return prodName;
+}
+
+LangEl *Compiler::makeOptProd( const InputLoc &loc, Namespace *nspace,
+ const String &optName, UniqueType *ut )
+{
+ LangEl *prodName = addLangEl( this, nspace, optName, LangEl::NonTerm );
+ prodName->isOpt = true;
+
+ ProdElList *prodElList1 = new ProdElList;
+
+ /* Build the first production of the repeat. */
+ TypeRef *typeRef1 = TypeRef::cons( loc, ut );
+ ProdEl *factor1 = new ProdEl( ProdEl::ReferenceType, loc, 0, false, typeRef1, 0 );
+ prodElList1->append( factor1 );
+
+ Production *newDef1 = Production::cons( loc,
+ prodName, prodElList1, String(), false, 0,
+ prodList.length(), prodName->defList.length() );
+
+ prodName->defList.append( newDef1 );
+ prodList.append( newDef1 );
+
+ /* Build the second production of the repeat. */
+ ProdElList *prodElList2 = new ProdElList;
+
+ Production *newDef2 = Production::cons( loc,
+ prodName, prodElList2, String(), false, 0,
+ prodList.length(), prodName->defList.length() );
+
+ prodName->defList.append( newDef2 );
+ prodList.append( newDef2 );
+
+ return prodName;
+}
+
+Namespace *Namespace::findNamespace( const String &name )
+{
+ for ( NamespaceVect::Iter c = childNamespaces; c.lte(); c++ ) {
+ if ( strcmp( name, (*c)->name ) == 0 )
+ return *c;
+ }
+ return 0;
+}
+
+/* Search from a previously resolved qualification. (name 1+ in a qual list). */
+Namespace *NamespaceQual::searchFrom( Namespace *from, StringVect::Iter &qualPart )
+{
+ /* While there are still parts in the qualification. */
+ while ( qualPart.lte() ) {
+ Namespace *child = from->findNamespace( *qualPart );
+ if ( child == 0 )
+ return 0;
+
+ from = child;
+ qualPart.increment();
+ }
+
+ return from;
+}
+
+Namespace *NamespaceQual::getQual( Compiler *pd )
+{
+ /* Do the search only once. */
+ if ( cachedNspaceQual != 0 )
+ return cachedNspaceQual;
+
+ if ( qualNames.length() == 0 ) {
+ /* No qualification, use the region the qualification was
+ * declared in. */
+ cachedNspaceQual = declInNspace;
+ }
+ else if ( strcmp( qualNames[0], "root" ) == 0 ) {
+ /* First item is "root." Start the downward search from there. */
+ StringVect::Iter qualPart = qualNames;
+ qualPart.increment();
+ cachedNspaceQual = searchFrom( pd->rootNamespace, qualPart );
+ return cachedNspaceQual;
+ }
+ else {
+ /* Have a qualification. Move upwards through the declared
+ * regions looking for the first part. */
+ StringVect::Iter qualPart = qualNames;
+ Namespace *parentNamespace = declInNspace;
+ while ( parentNamespace != 0 ) {
+ /* Search for the first part underneath the current parent. */
+ Namespace *child = parentNamespace->findNamespace( *qualPart );
+
+ if ( child != 0 ) {
+ /* Found the first part. Start going below the result. */
+ qualPart.increment();
+ cachedNspaceQual = searchFrom( child, qualPart );
+ return cachedNspaceQual;
+ }
+
+ /* Not found, move up to the parent. */
+ parentNamespace = parentNamespace->parentNamespace;
+ }
+
+ /* Failed to find the place to start from. */
+ cachedNspaceQual = 0;
+ }
+
+ return cachedNspaceQual;
+}
+
+void Compiler::initEmptyScanner( RegionSet *regionSet, TokenRegion *reg )
+{
+ if ( reg != 0 && reg->impl->tokenInstanceList.length() == 0 ) {
+ reg->impl->wasEmpty = true;
+
+ static int def = 1;
+ String name( 64, "__%p_DEF_PAT_%d", reg, def++ );
+
+ LexJoin *join = LexJoin::cons( LexExpression::cons( BT_Any ) );
+
+ TokenDef *tokenDef = TokenDef::cons( name, String(), false, false,
+ join, 0, internal, nextTokenId++, rootNamespace,
+ regionSet, 0, 0 );
+
+ TokenInstance *tokenInstance = TokenInstance::cons( tokenDef,
+ join, internal, nextTokenId++,
+ rootNamespace, reg );
+
+ reg->impl->tokenInstanceList.append( tokenInstance );
+
+ /* These do not go in the namespace so so they cannot get declared
+ * in the declare pass. */
+ LangEl *lel = addLangEl( this, rootNamespace, name, LangEl::Term );
+
+ tokenInstance->tokenDef->tdLangEl = lel;
+ lel->tokenDef = tokenDef;
+ }
+}
+
+void Compiler::initEmptyScanners()
+{
+ for ( RegionSetList::Iter regionSet = regionSetList; regionSet.lte(); regionSet++ ) {
+ initEmptyScanner( regionSet, regionSet->tokenIgnore );
+ initEmptyScanner( regionSet, regionSet->tokenOnly );
+ initEmptyScanner( regionSet, regionSet->ignoreOnly );
+ initEmptyScanner( regionSet, regionSet->collectIgnore );
+ }
+}
+
+PdaRun *Compiler::parsePattern( Program *prg, Tree **sp, const InputLoc &loc,
+ int parserId, StreamImpl *sourceStream )
+{
+ StreamImpl *in = newSourceStreamGeneric( "<internal>" );
+
+ PdaRun *pdaRun = new PdaRun;
+ initPdaRun( prg, pdaRun, pdaTables, parserId, 0, false, 0 );
+
+ Stream *res = streamAllocate( prg );
+ res->id = LEL_ID_STREAM;
+ res->in = sourceStream;
+ in->funcs->appendStream( in, (Tree*)res );
+ in->funcs->setEof( in );
+
+ long pcr = parseLoop( prg, sp, pdaRun, in, PcrStart );
+ assert( pcr == PcrDone );
+ if ( pdaRun->parseError ) {
+ cerr << ( loc.fileName != 0 ? loc.fileName : "<input>" ) <<
+ ":" << loc.line << ":" << loc.col;
+
+ if ( pdaRun->parseErrorText != 0 ) {
+ cerr << ": relative error: " <<
+ pdaRun->parseErrorText->tokdata->data;
+ }
+ else {
+ cerr << ": parse error";
+ }
+
+ cerr << endl;
+ gblErrorCount += 1;
+ }
+
+ return pdaRun;
+}
+
+
+void Compiler::parsePatterns()
+{
+ Program *prg = colm_new_program( runtimeData );
+
+ /* Turn off context-dependent parsing. */
+ prg->ctxDepParsing = 0;
+
+ Tree **sp = prg->stackRoot;
+
+ for ( ConsList::Iter cons = replList; cons.lte(); cons++ ) {
+ StreamImpl *in = newSourceStreamCons( "<internal>", cons );
+ cons->pdaRun = parsePattern( prg, sp, cons->loc, cons->langEl->parserId, in );
+ }
+
+ for ( PatList::Iter pat = patternList; pat.lte(); pat++ ) {
+ StreamImpl *in = newSourceStreamPat( "<internal>", pat );
+ pat->pdaRun = parsePattern( prg, sp, pat->loc, pat->langEl->parserId, in );
+ }
+
+ /* Bail on above errors. */
+ if ( gblErrorCount > 0 )
+ exit(1);
+
+ fillInPatterns( prg );
+}
+
+void Compiler::collectParserEls( BstSet<LangEl*> &parserEls )
+{
+ for ( PatList::Iter pat = patternList; pat.lte(); pat++ ) {
+ /* We assume the reduction action compilation phase was run before
+ * pattern parsing and it decorated the pattern with the target type. */
+ assert( pat->langEl != 0 );
+ if ( pat->langEl->type != LangEl::NonTerm )
+ error(pat->loc) << "pattern type is not a non-terminal" << endp;
+
+ if ( pat->langEl->parserId < 0 ) {
+ /* Make a parser for the language element. */
+ parserEls.insert( pat->langEl );
+ pat->langEl->parserId = nextParserId++;
+ }
+ }
+
+ for ( ConsList::Iter repl = replList; repl.lte(); repl++ ) {
+ /* We assume the reduction action compilation phase was run before
+ * replacement parsing decorated the replacement with the target type. */
+ assert( repl->langEl != 0 );
+
+ if ( repl->langEl->parserId < 0 ) {
+ /* Make a parser for the language element. */
+ parserEls.insert( repl->langEl );
+ repl->langEl->parserId = nextParserId++;
+ }
+ }
+
+ /* Make parsers that we need. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->parserId >= 0 )
+ parserEls.insert( lel );
+ }
+}
+
+void Compiler::generateOutput( long activeRealm )
+{
+ FsmCodeGen *fsmGen = new FsmCodeGen( *outStream, redFsm, fsmTables );
+
+ PdaCodeGen *pdaGen = new PdaCodeGen( *outStream );
+
+ fsmGen->writeIncludes();
+ pdaGen->defineRuntime();
+ fsmGen->writeCode();
+
+ /* Make parsers that we need. */
+ pdaGen->writeParserData( 0, pdaTables );
+
+ /* Write the runtime data. */
+ pdaGen->writeRuntimeData( runtimeData, pdaTables );
+
+ if ( !gblLibrary )
+ fsmGen->writeMain( activeRealm );
+
+ outStream->flush();
+}
+
+
+void Compiler::prepGrammar()
+{
+ /* This will create language elements. */
+ wrapNonTerminals();
+
+ makeLangElIds();
+ makeLangElNames();
+ makeDefinitionNames();
+ noUndefindLangEls();
+
+ /* Put the language elements in an index by language element id. */
+ langElIndex = new LangEl*[nextSymbolId+1];
+ memset( langElIndex, 0, sizeof(LangEl*)*(nextSymbolId+1) );
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ )
+ langElIndex[lel->id] = lel;
+
+ makeProdFsms();
+
+ /* Allocate the Runtime data now. Every PdaTable that we make
+ * will reference it, but it will be filled in after all the tables are
+ * built. */
+ runtimeData = new RuntimeData;
+}
+
+void Compiler::compile()
+{
+ beginProcessing();
+ initKeyOps();
+
+ declarePass();
+
+ resolvePass();
+
+ makeTerminalWrappers();
+ makeEofElements();
+
+ /*
+ * Parsers
+ */
+
+ /* Init the longest match data */
+ initLongestMatchData();
+ FsmGraph *fsmGraph = makeScanner();
+
+ prepGrammar();
+
+ initAllLanguageObjects();
+ initAllFrameObjects();
+
+ for ( FunctionList::Iter f = functionList; f.lte(); f++ )
+ initUserFunctions( f, f->isUserIter );
+
+ /* Compile bytecode. */
+ compileByteCode();
+
+ /* Make the reduced fsm. */
+ RedFsmBuild reduce( this, fsmGraph );
+ redFsm = reduce.reduceMachine();
+
+ BstSet<LangEl*> parserEls;
+ collectParserEls( parserEls );
+
+ makeParser( parserEls );
+
+ /* Make the scanner tables. */
+ fsmTables = redFsm->makeFsmTables();
+
+ /* Now that all parsers are built, make the global runtimeData. */
+ makeRuntimeData();
+
+ /*
+ * All compilation is now complete.
+ */
+
+ /* Parse constructors and patterns. */
+ parsePatterns();
+}
+
diff --git a/src/config.h b/src/config.h
new file mode 100644
index 0000000..bedb903
--- /dev/null
+++ b/src/config.h
@@ -0,0 +1,72 @@
+/* src/config.h. Generated from config.h.in by configure. */
+/* src/config.h.in. Generated from configure.in by autoheader. */
+
+/* enable debug statements */
+#define DEBUG 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+#define PACKAGE "colm"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "colm"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "colm 0.12.0"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "colm"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.12.0"
+
+/* allocate pool objects with malloc */
+/* #undef POOL_MALLOC */
+
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 8
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "0.12.0"
diff --git a/src/config.h.in b/src/config.h.in
new file mode 100644
index 0000000..a41b8a7
--- /dev/null
+++ b/src/config.h.in
@@ -0,0 +1,71 @@
+/* src/config.h.in. Generated from configure.in by autoheader. */
+
+/* enable debug statements */
+#undef DEBUG
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* allocate pool objects with malloc */
+#undef POOL_MALLOC
+
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/src/consinit.cc b/src/consinit.cc
new file mode 100644
index 0000000..81d06e2
--- /dev/null
+++ b/src/consinit.cc
@@ -0,0 +1,856 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <iostream>
+#include <errno.h>
+
+#include "parser.h"
+#include "config.h"
+#include "avltree.h"
+#include "parsedata.h"
+#include "parser.h"
+#include "global.h"
+#include "input.h"
+#include "consinit.h"
+
+using std::cout;
+using std::cerr;
+using std::endl;
+
+LexTerm *rangeTerm( const char *low, const char *high )
+{
+ Literal *lowLit = Literal::cons( internal, String( low ), Literal::LitString );
+ Literal *highLit = Literal::cons( internal, String( high ), Literal::LitString );
+ Range *range = Range::cons( lowLit, highLit );
+ LexFactor *factor = LexFactor::cons( range );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ LexFactorRep *factorRep = LexFactorRep::cons( factorNeg );
+ LexFactorAug *factorAug = LexFactorAug::cons( factorRep );
+ LexTerm *term = LexTerm::cons( factorAug );
+ return term;
+}
+
+LexFactorNeg *litFactorNeg( const char *str )
+{
+ Literal *lit = Literal::cons( internal, String( str ), Literal::LitString );
+ LexFactor *factor = LexFactor::cons( lit );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ return factorNeg;
+}
+
+LexFactorAug *litFactorAug( const char *str )
+{
+ Literal *lit = Literal::cons( internal, String( str ), Literal::LitString );
+ LexFactor *factor = LexFactor::cons( lit );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ LexFactorRep *factorRep = LexFactorRep::cons( factorNeg );
+ LexFactorAug *factorAug = LexFactorAug::cons( factorRep );
+ return factorAug;
+}
+
+LexTerm *litTerm( const char *str )
+{
+ Literal *lit = Literal::cons( internal, String( str ), Literal::LitString );
+ LexFactor *factor = LexFactor::cons( lit );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ LexFactorRep *factorRep = LexFactorRep::cons( factorNeg );
+ LexFactorAug *factorAug = LexFactorAug::cons( factorRep );
+ LexTerm *term = LexTerm::cons( factorAug );
+ return term;
+}
+
+LexExpression *litExpr( const char *str )
+{
+ LexTerm *term = litTerm( str );
+ LexExpression *expr = LexExpression::cons( term );
+ return expr;
+}
+
+LexExpression *orExpr( LexTerm *term1, LexTerm *term2 )
+{
+ LexExpression *expr1 = LexExpression::cons( term1 );
+ return LexExpression::cons( expr1, term2, LexExpression::OrType );
+}
+
+LexExpression *orExpr( LexTerm *term1, LexTerm *term2, LexTerm *term3 )
+{
+ LexExpression *expr1 = LexExpression::cons( term1 );
+ LexExpression *expr2 = LexExpression::cons( expr1, term2, LexExpression::OrType );
+ LexExpression *expr3 = LexExpression::cons( expr2, term3, LexExpression::OrType );
+ return expr3;
+}
+
+LexExpression *orExpr( LexTerm *term1, LexTerm *term2, LexTerm *term3, LexTerm *term4 )
+{
+ LexExpression *expr1 = LexExpression::cons( term1 );
+ LexExpression *expr2 = LexExpression::cons( expr1, term2, LexExpression::OrType );
+ LexExpression *expr3 = LexExpression::cons( expr2, term3, LexExpression::OrType );
+ LexExpression *expr4 = LexExpression::cons( expr3, term4, LexExpression::OrType );
+ return expr4;
+}
+
+LexExpression *orExpr( LexTerm *term1, LexTerm *term2, LexTerm *term3,
+ LexTerm *term4, LexTerm *term5, LexTerm *term6 )
+{
+ LexExpression *expr1 = LexExpression::cons( term1 );
+ LexExpression *expr2 = LexExpression::cons( expr1, term2, LexExpression::OrType );
+ LexExpression *expr3 = LexExpression::cons( expr2, term3, LexExpression::OrType );
+ LexExpression *expr4 = LexExpression::cons( expr3, term4, LexExpression::OrType );
+ return expr4;
+}
+
+LexFactorAug *starFactorAug( LexExpression *expr )
+{
+ LexJoin *join = LexJoin::cons( expr );
+ LexFactor *factor = LexFactor::cons( join );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ LexFactorRep *factorRep = LexFactorRep::cons( factorNeg );
+ LexFactorRep *staredRep = LexFactorRep::cons( internal, factorRep, 0, 0, LexFactorRep::StarType );
+ LexFactorAug *factorAug = LexFactorAug::cons( staredRep );
+ return factorAug;
+}
+
+LexFactorAug *starFactorAug( LexTerm *term )
+{
+ LexExpression *expr = LexExpression::cons( term );
+ return starFactorAug( expr );
+}
+
+LexFactorAug *starFactorAug( LexFactorAug *factorAug )
+{
+ LexTerm *term = LexTerm::cons( factorAug );
+ return starFactorAug( term );
+}
+
+LexFactorAug *plusFactorAug( LexExpression *expr )
+{
+ LexJoin *join = LexJoin::cons( expr );
+ LexFactor *factor = LexFactor::cons( join );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ LexFactorRep *factorRep = LexFactorRep::cons( factorNeg );
+ LexFactorRep *staredRep = LexFactorRep::cons( internal, factorRep, 0, 0, LexFactorRep::PlusType );
+ LexFactorAug *factorAug = LexFactorAug::cons( staredRep );
+ return factorAug;
+}
+
+LexTerm *concatTerm( LexFactorAug *fa1, LexFactorAug *fa2 )
+{
+ LexTerm *term1 = LexTerm::cons( fa1 );
+ LexTerm *term2 = LexTerm::cons( term1, fa2, LexTerm::ConcatType );
+ return term2;
+}
+
+LexTerm *concatTerm( LexFactorAug *fa1, LexFactorAug *fa2, LexFactorAug *fa3 )
+{
+ LexTerm *term1 = LexTerm::cons( fa1 );
+ LexTerm *term2 = LexTerm::cons( term1, fa2, LexTerm::ConcatType );
+ LexTerm *term3 = LexTerm::cons( term2, fa3, LexTerm::ConcatType );
+ return term3;
+}
+
+LexFactorAug *parensFactorAug( LexExpression *expr )
+{
+ LexJoin *join = LexJoin::cons( expr );
+ LexFactor *factor = LexFactor::cons( join );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ LexFactorRep *factorRep = LexFactorRep::cons( factorNeg );
+ LexFactorAug *factorAug = LexFactorAug::cons( factorRep );
+ return factorAug;
+}
+
+LexFactorNeg *parensFactorNeg( LexExpression *expr )
+{
+ LexJoin *join = LexJoin::cons( expr );
+ LexFactor *factor = LexFactor::cons( join );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ return factorNeg;
+}
+
+LexFactorAug *parensFactorAug( LexTerm *term )
+{
+ LexExpression *expr = LexExpression::cons( term );
+ LexJoin *join = LexJoin::cons( expr );
+ LexFactor *factor = LexFactor::cons( join );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ LexFactorRep *factorRep = LexFactorRep::cons( factorNeg );
+ LexFactorAug *factorAug = LexFactorAug::cons( factorRep );
+ return factorAug;
+}
+
+LexFactorAug *charNegFactorAug( LexExpression *expr )
+{
+ LexFactorNeg *factorNeg = parensFactorNeg( expr );
+ LexFactorNeg *charNeg = LexFactorNeg::cons( factorNeg, LexFactorNeg::CharNegateType );
+ LexFactorRep *factorRep = LexFactorRep::cons( charNeg );
+ LexFactorAug *factorAug = LexFactorAug::cons( factorRep );
+ return factorAug;
+}
+
+LexTerm *charNegTerm( LexExpression *expr )
+{
+ LexFactorAug *factorAug = charNegFactorAug( expr );
+ LexTerm *term = LexTerm::cons( factorAug );
+ return term;
+}
+
+LexTerm *parensTerm( LexExpression *expr )
+{
+ LexFactorAug *factorAug = parensFactorAug( expr );
+ return LexTerm::cons( factorAug );
+}
+
+void ConsInit::wsIgnore()
+{
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, String(), pd->nextObjectId++ );
+
+ LexTerm *r1 = litTerm( "' '" );
+ LexTerm *r2 = litTerm( "'\t'" );
+ LexTerm *r3 = litTerm( "'\v'" );
+ LexTerm *r4 = litTerm( "'\n'" );
+ LexTerm *r5 = litTerm( "'\r'" );
+ LexTerm *r6 = litTerm( "'\f'" );
+
+ LexExpression *whitespace = orExpr( r1, r2, r3, r4, r5, r6 );
+ LexFactorAug *whitespaceRep = plusFactorAug( whitespace );
+
+ LexTerm *term = LexTerm::cons( whitespaceRep );
+ LexExpression *expr = LexExpression::cons( term );
+ LexJoin *join = LexJoin::cons( expr );
+
+ defineToken( internal, String(), join, objectDef, 0, true, false, false );
+}
+
+void ConsInit::commentIgnore()
+{
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, String(), pd->nextObjectId++ );
+
+ LexFactorAug *pound = litFactorAug( "'#'" );
+ LexExpression *newline = litExpr( "'\\n'" );
+
+ LexFactorAug *commChars = charNegFactorAug( newline );
+ LexFactorAug *restOfLine = starFactorAug( commChars );
+
+ LexFactorAug *termNewline = litFactorAug( "'\\n'" );
+
+ LexTerm *concat = concatTerm( pound, restOfLine, termNewline );
+ LexExpression *expr = LexExpression::cons( concat );
+
+ LexJoin *join = LexJoin::cons( expr );
+
+ defineToken( internal, String(), join, objectDef, 0, true, false, false );
+}
+
+void ConsInit::idToken()
+{
+ String hello( "id" );
+
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, hello, pd->nextObjectId++ );
+
+ LexTerm *r1 = rangeTerm( "'a'", "'z'" );
+ LexTerm *r2 = rangeTerm( "'A'", "'Z'" );
+ LexTerm *r3 = litTerm( "'_'" );
+ LexFactorAug *first = parensFactorAug( orExpr( r1, r2, r3 ) );
+
+ LexTerm *r4 = rangeTerm( "'a'", "'z'" );
+ LexTerm *r5 = rangeTerm( "'A'", "'Z'" );
+ LexTerm *r6 = litTerm( "'_'" );
+ LexTerm *r7 = rangeTerm( "'0'", "'9'" );
+ LexExpression *second = orExpr( r4, r5, r6, r7 );
+ LexFactorAug *secondStar = starFactorAug( second );
+
+ LexTerm *concat = concatTerm( first, secondStar );
+
+ LexExpression *expr = LexExpression::cons( concat );
+ LexJoin *join = LexJoin::cons( expr );
+
+ defineToken( internal, hello, join, objectDef, 0, false, false, false );
+}
+
+void ConsInit::literalToken()
+{
+ String hello( "literal" );
+
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, hello, pd->nextObjectId++ );
+
+ LexFactorAug *r1 = litFactorAug( "'\\''" );
+
+ /* [^'\\] */
+ LexExpression *singleQuoteBackSlash = orExpr(
+ litTerm( "'\\''" ),
+ litTerm( "'\\\\'" ) );
+
+ LexTerm *freeChars = charNegTerm( singleQuoteBackSlash );
+
+ /* '\\' any */
+ LexFactorAug *backSlash = litFactorAug( "'\\\\'" );
+ LexExpression *any = LexExpression::cons( BT_Any );
+ LexTerm *escape = concatTerm( backSlash, parensFactorAug( any ) );
+
+ /* Union and repeat. */
+ LexExpression *charOrEscape = orExpr( freeChars, escape );
+ LexFactorAug *r2 = starFactorAug( charOrEscape );
+
+ LexFactorAug *r3 = litFactorAug( "'\''" );
+
+ LexTerm *concat = concatTerm( r1, r2, r3 );
+ LexExpression *expr = LexExpression::cons( concat );
+ LexJoin *join = LexJoin::cons( expr );
+
+ defineToken( internal, hello, join, objectDef, 0, false, false, false );
+}
+
+void ConsInit::keyword( const String &name, const String &lit )
+{
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ );
+ LexTerm *term = litTerm( lit );
+ LexExpression *expr = LexExpression::cons( term );
+ LexJoin *join = LexJoin::cons( expr );
+ defineToken( internal, name, join, objectDef, 0, false, false, false );
+}
+
+void ConsInit::keyword( const String &kw )
+{
+ literalDef( internal, kw, false, false );
+}
+
+ProdEl *ConsInit::prodRefName( const String &name )
+{
+ ProdEl *prodEl = prodElName( internal, name,
+ NamespaceQual::cons( curNspace() ), 0,
+ RepeatNone, false );
+ return prodEl;
+}
+
+ProdEl *ConsInit::prodRefName( const String &capture, const String &name )
+{
+ ObjectField *captureField = ObjectField::cons( internal, 0, capture );
+ ProdEl *prodEl = prodElName( internal, name,
+ NamespaceQual::cons( curNspace() ), captureField,
+ RepeatNone, false );
+ return prodEl;
+}
+
+ProdEl *ConsInit::prodRefNameRepeat( const String &name )
+{
+ ProdEl *prodEl = prodElName( internal, name,
+ NamespaceQual::cons( curNspace() ), 0,
+ RepeatRepeat, false );
+ return prodEl;
+}
+
+ProdEl *ConsInit::prodRefNameRepeat( const String &capture, const String &name )
+{
+ ObjectField *captureField = ObjectField::cons( internal, 0, capture );
+ ProdEl *prodEl = prodElName( internal, name,
+ NamespaceQual::cons( curNspace() ), captureField,
+ RepeatRepeat, false );
+ return prodEl;
+}
+
+ProdEl *ConsInit::prodRefLit( const String &lit )
+{
+ ProdEl *prodEl = prodElLiteral( internal, lit,
+ NamespaceQual::cons( curNspace() ), 0,
+ RepeatNone, false );
+ return prodEl;
+}
+
+Production *ConsInit::production()
+{
+ ProdElList *prodElList = new ProdElList;
+ return BaseParser::production( internal, prodElList, String(), false, 0, 0 );
+}
+
+Production *ConsInit::production( ProdEl *prodEl1 )
+{
+ ProdElList *prodElList = new ProdElList;
+ appendProdEl( prodElList, prodEl1 );
+ return BaseParser::production( internal, prodElList, String(), false, 0, 0 );
+}
+
+Production *ConsInit::production( ProdEl *prodEl1, ProdEl *prodEl2 )
+{
+ ProdElList *prodElList = new ProdElList;
+ appendProdEl( prodElList, prodEl1 );
+ appendProdEl( prodElList, prodEl2 );
+ return BaseParser::production( internal, prodElList, String(), false, 0, 0 );
+}
+
+Production *ConsInit::production( ProdEl *prodEl1, ProdEl *prodEl2,
+ ProdEl *prodEl3 )
+{
+ ProdElList *prodElList = new ProdElList;
+ appendProdEl( prodElList, prodEl1 );
+ appendProdEl( prodElList, prodEl2 );
+ appendProdEl( prodElList, prodEl3 );
+ return BaseParser::production( internal, prodElList, String(), false, 0, 0 );
+}
+
+Production *ConsInit::production( ProdEl *prodEl1, ProdEl *prodEl2,
+ ProdEl *prodEl3, ProdEl *prodEl4 )
+{
+ ProdElList *prodElList = new ProdElList;
+ appendProdEl( prodElList, prodEl1 );
+ appendProdEl( prodElList, prodEl2 );
+ appendProdEl( prodElList, prodEl3 );
+ appendProdEl( prodElList, prodEl4 );
+ return BaseParser::production( internal, prodElList, String(), false, 0, 0 );
+}
+
+Production *ConsInit::production( ProdEl *prodEl1, ProdEl *prodEl2,
+ ProdEl *prodEl3, ProdEl *prodEl4, ProdEl *prodEl5 )
+{
+ ProdElList *prodElList = new ProdElList;
+ appendProdEl( prodElList, prodEl1 );
+ appendProdEl( prodElList, prodEl2 );
+ appendProdEl( prodElList, prodEl3 );
+ appendProdEl( prodElList, prodEl4 );
+ appendProdEl( prodElList, prodEl5 );
+ return BaseParser::production( internal, prodElList, String(), false, 0, 0 );
+}
+
+Production *ConsInit::production( ProdEl *prodEl1, ProdEl *prodEl2,
+ ProdEl *prodEl3, ProdEl *prodEl4, ProdEl *prodEl5,
+ ProdEl *prodEl6, ProdEl *prodEl7 )
+{
+ ProdElList *prodElList = new ProdElList;
+ appendProdEl( prodElList, prodEl1 );
+ appendProdEl( prodElList, prodEl2 );
+ appendProdEl( prodElList, prodEl3 );
+ appendProdEl( prodElList, prodEl4 );
+ appendProdEl( prodElList, prodEl5 );
+ appendProdEl( prodElList, prodEl6 );
+ appendProdEl( prodElList, prodEl7 );
+ return BaseParser::production( internal, prodElList, String(), false, 0, 0 );
+}
+
+void ConsInit::definition( const String &name, Production *prod1, Production *prod2,
+ Production *prod3, Production *prod4 )
+{
+ LelDefList *defList = new LelDefList;
+ prodAppend( defList, prod1 );
+ prodAppend( defList, prod2 );
+ prodAppend( defList, prod3 );
+ prodAppend( defList, prod4 );
+
+ NtDef *ntDef = NtDef::cons( name, curNspace(), curContext(), false );
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ );
+ cflDef( ntDef, objectDef, defList );
+}
+
+void ConsInit::definition( const String &name, Production *prod1, Production *prod2, Production *prod3 )
+{
+ LelDefList *defList = new LelDefList;
+ prodAppend( defList, prod1 );
+ prodAppend( defList, prod2 );
+ prodAppend( defList, prod3 );
+
+ NtDef *ntDef = NtDef::cons( name, curNspace(), curContext(), false );
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ );
+ cflDef( ntDef, objectDef, defList );
+}
+
+void ConsInit::definition( const String &name, Production *prod1, Production *prod2 )
+{
+ LelDefList *defList = new LelDefList;
+ prodAppend( defList, prod1 );
+ prodAppend( defList, prod2 );
+
+ NtDef *ntDef = NtDef::cons( name, curNspace(), curContext(), false );
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ );
+ cflDef( ntDef, objectDef, defList );
+}
+
+void ConsInit::definition( const String &name, Production *prod )
+{
+ LelDefList *defList = new LelDefList;
+ prodAppend( defList, prod );
+
+ NtDef *ntDef = NtDef::cons( name, curNspace(), curContext(), false );
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ );
+ cflDef( ntDef, objectDef, defList );
+}
+
+void ConsInit::lexFactor()
+{
+ ProdEl *prodEl1 = prodRefName( "Literal", "literal" );
+ Production *prod1 = production( prodEl1 );
+
+ ProdEl *prodEl8 = prodRefName( "Id", "id" );
+ Production *prod4 = production( prodEl8 );
+
+ ProdEl *prodEl2 = prodRefLit( "'('" );
+ ProdEl *prodEl3 = prodRefName( "Expr", "lex_expr" );
+ ProdEl *prodEl4 = prodRefLit( "')'" );
+ Production *prod2 = production( prodEl2, prodEl3, prodEl4 );
+
+ ProdEl *prodEl5 = prodRefName( "Low", "literal" );
+ ProdEl *prodEl6 = prodRefLit( "'..'" );
+ ProdEl *prodEl7 = prodRefName( "High", "literal" );
+ Production *prod3 = production( prodEl5, prodEl6, prodEl7 );
+
+ definition( "lex_factor", prod1, prod2, prod3, prod4 );
+}
+
+void ConsInit::lexFactorNeg()
+{
+ ProdEl *prodEl1 = prodRefLit( "'^'" );
+ ProdEl *prodEl2 = prodRefName( "FactorNeg", "lex_factor_neg" );
+ Production *prod1 = production( prodEl1, prodEl2 );
+
+ ProdEl *prodEl3 = prodRefName( "Factor", "lex_factor" );
+ Production *prod2 = production( prodEl3 );
+
+ definition( "lex_factor_neg", prod1, prod2 );
+}
+
+void ConsInit::lexFactorRep()
+{
+ ProdEl *prodEl1 = prodRefName( "FactorRep", "lex_factor_rep" );
+ ProdEl *prodEl2 = prodRefName( "Star", "STAR" );
+ Production *prod1 = production( prodEl1, prodEl2 );
+
+ ProdEl *prodEl3 = prodRefName( "FactorRep", "lex_factor_rep" );
+ ProdEl *prodEl4 = prodRefName( "Plus", "PLUS" );
+ Production *prod2 = production( prodEl3, prodEl4 );
+
+ ProdEl *prodEl5 = prodRefName( "FactorNeg", "lex_factor_neg" );
+ Production *prod3 = production( prodEl5 );
+
+ definition( "lex_factor_rep", prod1, prod2, prod3 );
+}
+
+void ConsInit::lexTerm()
+{
+ ProdEl *prodEl1 = prodRefName( "Term", "lex_term" );
+ ProdEl *prodEl2 = prodRefLit( "'.'" );
+ ProdEl *prodEl3 = prodRefName( "FactorRep", "lex_factor_rep" );
+ Production *prod1 = production( prodEl1, prodEl2, prodEl3 );
+
+ ProdEl *prodEl4 = prodRefName( "FactorRep", "lex_factor_rep" );
+ Production *prod2 = production( prodEl4 );
+
+ definition( "lex_term", prod1, prod2 );
+}
+
+void ConsInit::lexExpr()
+{
+ ProdEl *prodEl1 = prodRefName( "Expr", "lex_expr" );
+ ProdEl *prodEl2 = prodRefLit( "'|'" );
+ ProdEl *prodEl3 = prodRefName( "Term", "lex_term" );
+ Production *prod1 = production( prodEl1, prodEl2, prodEl3 );
+
+ ProdEl *prodEl4 = prodRefName( "Term", "lex_term" );
+ Production *prod2 = production( prodEl4 );
+
+ definition( "lex_expr", prod1, prod2 );
+}
+
+void ConsInit::token()
+{
+ ProdEl *prodEl1 = prodRefLit( "'token'" );
+ ProdEl *prodEl2 = prodRefName( "Id", "id" );
+ ProdEl *prodEl3 = prodRefName( "LeftNi", "opt_ni" );
+ ProdEl *prodEl4 = prodRefLit( "'/'" );
+ ProdEl *prodEl5 = prodRefName( "Expr", "lex_expr" );
+ ProdEl *prodEl6 = prodRefLit( "'/'" );
+ ProdEl *prodEl7 = prodRefName( "RightNi", "opt_ni" );
+ Production *prod1 = production( prodEl1, prodEl2, prodEl3,
+ prodEl4, prodEl5, prodEl6, prodEl7 );
+ definition( "token_def", prod1 );
+}
+
+void ConsInit::ignore()
+{
+ ProdEl *prodEl1 = prodRefLit( "'ignore'" );
+ ProdEl *prodEl2 = prodRefLit( "'/'" );
+ ProdEl *prodEl3 = prodRefName( "Expr", "lex_expr" );
+ ProdEl *prodEl4 = prodRefLit( "'/'" );
+ Production *prod1 = production( prodEl1, prodEl2, prodEl3, prodEl4 );
+ definition( "ignore_def", prod1 );
+}
+
+void ConsInit::tokenList()
+{
+ ProdEl *prodEl1 = prodRefName( "TokenList", "token_list" );
+ ProdEl *prodEl2 = prodRefName( "TokenDef", "token_def" );
+ Production *prod1 = production( prodEl1, prodEl2 );
+
+ ProdEl *prodEl3 = prodRefName( "TokenList", "token_list" );
+ ProdEl *prodEl4 = prodRefName( "IgnoreDef", "ignore_def" );
+ Production *prod2 = production( prodEl3, prodEl4 );
+
+ Production *prod3 = production();
+
+ definition( "token_list", prod1, prod2, prod3 );
+}
+
+Production *ConsInit::prodLex()
+{
+ ProdEl *prodEl1 = prodRefLit( "'lex'" );
+ ProdEl *prodEl2 = prodRefName( "TokenList", "token_list" );
+ ProdEl *prodEl3 = prodRefLit( "'end'" );
+
+ return production( prodEl1, prodEl2, prodEl3 );
+}
+
+void ConsInit::optProdElName()
+{
+ ProdEl *prodEl1 = prodRefName( "Name", "id" );
+ ProdEl *prodEl2 = prodRefLit( "':'" );
+ Production *prod1 = production( prodEl1, prodEl2 );
+
+ Production *prod2 = production();
+
+ definition( "opt_prod_el_name", prod1, prod2 );
+}
+
+void ConsInit::optNi()
+{
+ ProdEl *prodEl1 = prodRefName( "Ni", "NI" );
+ Production *prod1 = production( prodEl1 );
+
+ Production *prod2 = production();
+
+ definition( "opt_ni", prod1, prod2 );
+}
+
+void ConsInit::optRepeat()
+{
+ ProdEl *prodEl1 = prodRefName( "Star", "STAR" );
+ Production *prod1 = production( prodEl1 );
+
+ Production *prod2 = production();
+
+ definition( "opt_prod_repeat", prod1, prod2 );
+}
+
+void ConsInit::prodEl()
+{
+ ProdEl *prodEl1 = prodRefName( "OptName", "opt_prod_el_name" );
+ ProdEl *prodEl2 = prodRefName( "Id", "id" );
+ ProdEl *prodEl3 = prodRefName( "OptRepeat", "opt_prod_repeat" );
+ Production *prod1 = production( prodEl1, prodEl2, prodEl3 );
+
+ definition( "prod_el", prod1 );
+}
+
+void ConsInit::prodElList()
+{
+ ProdEl *prodEl1 = prodRefName( "ProdElList", "prod_el_list" );
+ ProdEl *prodEl2 = prodRefName( "ProdEl", "prod_el" );
+ Production *prod1 = production( prodEl1, prodEl2 );
+
+ Production *prod2 = production();
+
+ definition( "prod_el_list", prod1, prod2 );
+}
+
+void ConsInit::optCommit()
+{
+ ProdEl *prodEl1 = prodRefName( "Commit", "COMMIT" );
+ Production *prod1 = production( prodEl1 );
+
+ Production *prod2 = production();
+
+ definition( "opt_commit", prod1, prod2 );
+}
+
+void ConsInit::optProdName()
+{
+ ProdEl *prodEl1 = prodRefLit( "':'" );
+ ProdEl *prodEl2 = prodRefName( "Name", "id" );
+ Production *prod1 = production( prodEl1, prodEl2 );
+
+ Production *prod2 = production();
+
+ definition( "opt_prod_name", prod1, prod2 );
+}
+
+void ConsInit::prod()
+{
+ ProdEl *prodEl1 = prodRefLit( "'['" );
+ ProdEl *prodEl2 = prodRefName( "ProdElList", "prod_el_list" );
+ ProdEl *prodEl3 = prodRefLit( "']'" );
+ ProdEl *prodEl4 = prodRefName( "OptName", "opt_prod_name" );
+ ProdEl *prodEl5 = prodRefName( "OptCommit", "opt_commit" );
+ Production *prod1 = production( prodEl1, prodEl2, prodEl3, prodEl4, prodEl5 );
+
+ definition( "prod", prod1 );
+}
+
+void ConsInit::prodList()
+{
+ ProdEl *prodEl1 = prodRefName( "ProdList", "prod_list" );
+ ProdEl *prodEl2 = prodRefLit( "'|'" );
+ ProdEl *prodEl3 = prodRefName( "Prod", "prod" );
+ Production *prod1 = production( prodEl1, prodEl2, prodEl3 );
+
+ ProdEl *prodEl4 = prodRefName( "Prod", "prod" );
+ Production *prod2 = production( prodEl4 );
+
+ definition( "prod_list", prod1, prod2 );
+}
+
+Production *ConsInit::prodProd()
+{
+ ProdEl *prodEl1 = prodRefLit( "'def'" );
+ ProdEl *prodEl2 = prodRefName( "DefId", "id" );
+ ProdEl *prodEl3 = prodRefName( "ProdList", "prod_list" );
+
+ return production( prodEl1, prodEl2, prodEl3 );
+}
+
+void ConsInit::item()
+{
+ Production *prod1 = prodLex();
+ Production *prod2 = prodProd();
+ definition( "item", prod1, prod2 );
+}
+
+void ConsInit::startProd()
+{
+ ProdEl *prodEl1 = prodRefNameRepeat( "ItemList", "item" );
+ Production *prod1 = production( prodEl1 );
+
+ definition( "start", prod1 );
+}
+
+void ConsInit::parseInput( StmtList *stmtList )
+{
+ /* Parse the "start" def. */
+ NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() );
+ TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, String("start"), RepeatNone );
+
+ /* Pop argv, this yields the file name . */
+ CallArgVect *popArgs = new CallArgVect;
+ QualItemVect *popQual = new QualItemVect;
+ popQual->append( QualItem( QualItem::Dot, internal, String( "argv" ) ) );
+
+ LangVarRef *popRef = LangVarRef::cons( internal,
+ 0, curLocalFrame->rootScope, popQual, String("pop") );
+ LangExpr *pop = LangExpr::cons( LangTerm::cons( InputLoc(), popRef, popArgs ) );
+
+ /* Construct a literal string 'r', for second arg to open. */
+ ConsItem *modeConsItem = ConsItem::cons( internal, ConsItem::InputText, String("r") );
+ ConsItemList *modeCons = new ConsItemList;
+ modeCons->append( modeConsItem );
+ LangExpr *modeExpr = LangExpr::cons( LangTerm::cons( internal, modeCons ) );
+
+ /* Call open. */
+ QualItemVect *openQual = new QualItemVect;
+ LangVarRef *openRef = LangVarRef::cons( internal,
+ 0, curLocalFrame->rootScope, openQual, String("open") );
+ CallArgVect *openArgs = new CallArgVect;
+ openArgs->append( new CallArg(pop) );
+ openArgs->append( new CallArg(modeExpr) );
+ LangExpr *open = LangExpr::cons( LangTerm::cons( InputLoc(), openRef, openArgs ) );
+
+ /* Construct a list containing the open stream. */
+ ConsItem *consItem = ConsItem::cons( internal, ConsItem::ExprType, open );
+ ConsItemList *list = ConsItemList::cons( consItem );
+
+ /* Will capture the parser to "P" */
+ ObjectField *objField = ObjectField::cons( internal, 0, String("P") );
+
+ /* Parse the above list. */
+ LangExpr *parseExpr = parseCmd( internal, false, objField, typeRef, 0, list );
+ LangStmt *parseStmt = LangStmt::cons( internal, LangStmt::ExprType, parseExpr );
+ stmtList->append( parseStmt );
+}
+
+void ConsInit::exportTree( StmtList *stmtList )
+{
+ QualItemVect *qual = new QualItemVect;
+ LangVarRef *varRef = LangVarRef::cons( internal, 0, curLocalFrame->rootScope, qual, String("P") );
+ LangExpr *expr = LangExpr::cons( LangTerm::cons( internal, LangTerm::VarRefType, varRef ) );
+
+ NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() );
+ TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, String("start"), RepeatNone );
+ ObjectField *program = ObjectField::cons( internal, typeRef, String("ColmTree") );
+ LangStmt *programExport = exportStmt( program, LangStmt::AssignType, expr );
+ stmtList->append( programExport );
+}
+
+void ConsInit::go( long activeRealm )
+{
+ ConsInit::init();
+
+ StmtList *stmtList = new StmtList;
+
+ /* The token region */
+ pushRegionSet( internal );
+
+ wsIgnore();
+ commentIgnore();
+
+ keyword( "'def'" );
+ keyword( "'lex'" );
+ keyword( "'end'" );
+ keyword( "'token'" );
+ keyword( "'ignore'" );
+ keyword( "NI", "'ni'" );
+ keyword( "COMMIT", "'commit'" );
+
+ idToken();
+ literalToken();
+
+ keyword( "STAR", "'*'");
+ keyword( "PLUS", "'+'");
+ keyword( "'['" );
+ keyword( "']'" );
+ keyword( "'|'" );
+ keyword( "'/'" );
+ keyword( "':'" );
+ keyword( "'.'" );
+ keyword( "'('" );
+ keyword( "')'" );
+ keyword( "'..'" );
+ keyword( "'^'" );
+
+ popRegionSet();
+
+ lexFactor();
+ lexFactorNeg();
+ lexFactorRep();
+ lexTerm();
+ lexExpr();
+
+ optNi();
+ optRepeat();
+ optProdElName();
+ prodEl();
+ prodElList();
+ optCommit();
+ optProdName();
+ prod();
+ prodList();
+ ignore();
+ token();
+ tokenList();
+ item();
+ startProd();
+
+ parseInput( stmtList );
+ exportTree( stmtList );
+
+ pd->rootCodeBlock = CodeBlock::cons( stmtList, 0 );
+}
diff --git a/src/consinit.h b/src/consinit.h
new file mode 100644
index 0000000..093f75a
--- /dev/null
+++ b/src/consinit.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2013 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <iostream>
+#include "avltree.h"
+#include "parsedata.h"
+#include "parser.h"
+
+struct ConsInit
+:
+ public BaseParser
+{
+ ConsInit( Compiler *pd )
+ :
+ BaseParser(pd)
+ {}
+
+ ProdEl *prodRefName( const String &name );
+ ProdEl *prodRefName( const String &capture, const String &name );
+ ProdEl *prodRefNameRepeat( const String &name );
+ ProdEl *prodRefNameRepeat( const String &capture, const String &name );
+ ProdEl *prodRefLit( const String &lit );
+
+ Production *production();
+ Production *production( ProdEl *prodEl1 );
+ Production *production( ProdEl *prodEl1, ProdEl *prodEl2 );
+ Production *production( ProdEl *prodEl1, ProdEl *prodEl2,
+ ProdEl *prodEl3 );
+ Production *production( ProdEl *prodEl1, ProdEl *prodEl2,
+ ProdEl *prodEl3, ProdEl *prodEl4 );
+ Production *production( ProdEl *prodEl1, ProdEl *prodEl2,
+ ProdEl *prodEl3, ProdEl *prodEl4, ProdEl *prodEl5 );
+ Production *production( ProdEl *prodEl1, ProdEl *prodEl2,
+ ProdEl *prodEl3, ProdEl *prodEl4, ProdEl *prodEl5,
+ ProdEl *prodEl6, ProdEl *prodEl7 );
+
+ void definition( const String &name, Production *prod );
+ void definition( const String &name, Production *prod1, Production *prod2 );
+ void definition( const String &name, Production *prod1, Production *prod2, Production *prod3 );
+ void definition( const String &name, Production *prod1, Production *prod2,
+ Production *prod3, Production *prod4 );
+
+ void keyword( const String &name, const String &lit );
+ void keyword( const String &kw );
+
+ void printParseTree( StmtList *stmtList );
+ void printParseTree();
+
+ void literalToken();
+ void commentIgnore();
+ void wsIgnore();
+ void idToken();
+
+ void token();
+ void ignore();
+ void tokenList();
+
+ void lexFactor();
+ void lexFactorNeg();
+ void lexFactorRep();
+ void lexExpr();
+ void lexTerm();
+
+ Production *prodProd();
+ Production *prodLex();
+
+ void optNi();
+ void optRepeat();
+ void optProdElName();
+ void prodEl();
+ void prodElList();
+ void item();
+ void prodList();
+ void optProdName();
+ void prod();
+ void startProd();
+ void optCommit();
+
+ void parseInput( StmtList *stmtList );
+ void exportTree( StmtList *stmtList );
+
+ virtual void go( long activeRealm );
+};
+
+
diff --git a/src/cstring.h b/src/cstring.h
new file mode 100644
index 0000000..a59ebe3
--- /dev/null
+++ b/src/cstring.h
@@ -0,0 +1,861 @@
+/*
+ * Copyright 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AAPL_ASTRING_H
+#define _AAPL_ASTRING_H
+
+#include <new>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <iostream>
+#include <assert.h>
+
+#include "tree.h"
+
+struct colm_data;
+
+#ifdef AAPL_NAMESPACE
+namespace Aapl {
+#endif
+
+#ifdef AAPL_DOCUMENTATION
+
+/**
+ * \defgroup astring String
+ * \brief Implicitly shared copy-on-write string.
+ *
+ * @{
+ */
+
+/**
+ * \class String
+ * \brief Implicitly shared copy-on-write string.
+ */
+
+/*@}*/
+
+class String
+{
+public:
+ /**
+ * \brief Create a null string. Data points to NULL.
+ */
+ String();
+
+ /**
+ * \brief Construct a string from a c-style string.
+ *
+ * A new buffer is allocated for the c string. Initially, this string will
+ * be the only String class referencing the data.
+ */
+ String( const char *s );
+
+ /**
+ * \brief Construct a string from a c-style string of specific length.
+ *
+ * A new buffer is allocated for the c string. Initially, this string will
+ * be the only String class referencing the data.
+ */
+ String( const char *s, long len );
+
+ /**
+ * \brief Construct a string from another String.
+ *
+ * A refernce to the buffer allocated for s is taken. A new buffer is
+ * not allocated.
+ */
+ String( const String &s );
+
+ /**
+ * \brief Construct a string using snprintf.
+ *
+ * Requires a maximum length for the resulting string. If the formatting
+ * (not including trailing null) requires more space than maxLen, the
+ * result will be truncated to maxLen long. Only the length actually
+ * written will be used by the new string. This string will be the only
+ * String class referencing the data.
+ */
+ String( long maxLen, const char *format, ... )
+
+ /**
+ * \brief Clean up the string.
+ *
+ * If the string is not null, the referenced data is detached. If no other
+ * string refernces the detached data, it is deleted.
+ */
+ ~String();
+
+ /**
+ * \brief Set the string from a c-style string.
+ *
+ * If this string is not null, the current buffer is dereferenced and
+ * possibly deleted. A new buffer is allocated (or possibly the old buffer
+ * reused) for the string. Initially, this string will be the only String
+ * class referencing the data.
+ *
+ * If s is null, then this string becomes a null ptr.
+ *
+ * \returns A reference to this.
+ */
+ String &operator=( const char *s );
+
+ /**
+ * \brief Set the string from a c-style of specific length.
+ *
+ * If this string is not null, the current buffer is dereferenced and
+ * possibly deleted. A new buffer is allocated (or possibly the old buffer
+ * reused) for the string. Initially, this string will be the only String
+ * class referencing the data.
+ *
+ * If s is null, then this string becomes a null ptr.
+ *
+ * \returns A reference to this.
+ */
+ void setAs( const char *s, long len );
+
+ /**
+ * \brief Set the string from a single char.
+ *
+ * The current buffer is dereferenced and possibly deleted. A new buffer
+ * is allocated (or possibly the old buffer reused) for the string.
+ * Initially, this string will be the only String class referencing the
+ * data.
+ *
+ * If s is null, then this string becomes a null ptr.
+ *
+ * \returns A reference to this.
+ */
+ String &operator=( const char c );
+
+
+ /**
+ * \brief Set the string from another String.
+ *
+ * If this string is not null, the current buffer is dereferenced and
+ * possibly deleted. A reference to the buffer allocated for s is taken.
+ * A new buffer is not allocated.
+ *
+ * If s is null, then this string becomes a null ptr.
+ *
+ * \returns a reference to this.
+ */
+ String &operator=( const String &s );
+
+ /**
+ * \brief Append a c string to the end of this string.
+ *
+ * If this string shares its allocation with another, a copy is first
+ * taken. The buffer for this string is grown and s is appended to the
+ * end.
+ *
+ * If s is null nothing happens.
+ *
+ * \returns a reference to this.
+ */
+ String &operator+=( const char *s );
+
+ /**
+ * \brief Append a c string of specific length to the end of this string.
+ *
+ * If this string shares its allocation with another, a copy is first
+ * taken. The buffer for this string is grown and s is appended to the
+ * end.
+ *
+ * If s is null nothing happens.
+ *
+ * \returns a reference to this.
+ */
+ void append( const char *s, long len );
+
+ /**
+ * \brief Append a single char to the end of this string.
+ *
+ * If this string shares its allocation with another, a copy is first
+ * taken. The buffer for this string is grown and s is appended to the
+ * end.
+ *
+ * \returns a reference to this.
+ */
+ String &operator+=( const char c );
+
+ /**
+ * \brief Append a String to the end of this string.
+ *
+ * If this string shares its allocation with another, a copy is first
+ * taken. The buffer for this string is grown and the data of s is
+ * appeneded to the end.
+ *
+ * If s is null nothing happens.
+ *
+ * returns a reference to this.
+ */
+ String &operator+=( const String &s );
+
+ /**
+ * \brief Cast to a char star.
+ *
+ * \returns the string data. A null string returns 0.
+ */
+ operator char*() const;
+
+ /**
+ * \brief Get a pointer to the data.
+ *
+ * \returns the string Data
+ */
+ char *get() const;
+
+ /**
+ * \brief Get the length of the string
+ *
+ * If the string is null, then undefined behaviour results.
+ *
+ * \returns the length of the string.
+ */
+ long length() const;
+
+ /**
+ * \brief Pointer to the data.
+ *
+ * Publically accessible pointer to the data. Immediately in front of the
+ * string data block is the string header which stores the refcount and
+ * length. Consequently, care should be taken if modifying this pointer.
+ */
+ char *data;
+};
+
+/**
+ * \relates String
+ * \brief Concatenate a c-style string and a String.
+ *
+ * \returns The concatenation of the two strings in a String.
+ */
+String operator+( const String &s1, const char *s2 );
+
+/**
+ * \relates String
+ * \brief Concatenate a String and a c-style string.
+ *
+ * \returns The concatenation of the two strings in a String.
+ */
+String operator+( const char *s1, const String &s2 );
+
+/**
+ * \relates String
+ * \brief Concatenate two String classes.
+ *
+ * \returns The concatenation of the two strings in a String.
+ */
+String operator+( const String &s1, const String &s2 );
+
+#endif
+
+template<class T> class StrTmpl
+{
+public:
+ class Fresh {};
+
+ /* Header located just before string data. Keeps the length and a refcount on
+ * the data. */
+ struct Head
+ {
+ long refCount;
+ long length;
+ };
+
+ /**
+ * \brief Create a null string.
+ */
+ StrTmpl() : data(0) { }
+
+ /* Clean up the string. */
+ ~StrTmpl();
+
+ /* Construct a string from a c-style string. */
+ StrTmpl( const char *s );
+
+ /* Construct a string from a c-style string of specific len. */
+ StrTmpl( const char *s, long len );
+
+ /* Allocate len spaces. */
+ StrTmpl( const Fresh &, long len );
+
+ /* Construct a string from another StrTmpl. */
+ StrTmpl( const StrTmpl &s );
+
+ /* Construct a string from with, sprintf. */
+ StrTmpl( long lenGuess, const char *format, ... );
+
+ /* Construct a string from with, sprintf. */
+ StrTmpl( const colm_data *cd );
+
+ /* Set the string from a c-style string. */
+ StrTmpl &operator=( const char *s );
+
+ /* Set the string from a c-style string of specific len. */
+ void setAs( const char *s, long len );
+
+ /* Allocate len spaces. */
+ void setAs( const Fresh &, long len );
+
+ void chop( long len );
+
+ /* Construct a string from with, sprintf. */
+ void setAs( long lenGuess, const char *format, ... );
+
+ /* Set the string from a single char. */
+ StrTmpl &operator=( const char c );
+
+ /* Set the string from another StrTmpl. */
+ StrTmpl &operator=( const StrTmpl &s );
+
+ /* Append a c string to the end of this string. */
+ StrTmpl &operator+=( const char *s );
+
+ /* Append a c string to the end of this string of specifi len. */
+ void append( const char *s, long len );
+
+ /* Append a single char to the end of this string. */
+ StrTmpl &operator+=( const char c );
+
+ /* Append an StrTmpl to the end of this string. */
+ StrTmpl &operator+=( const StrTmpl &s );
+
+ /* Cast to a char star. */
+ operator char*() const { return data; }
+
+ /* Get a pointer to the data. */
+ char *get() const { return data; }
+
+ /* Return the length of the string. Must check for null data pointer. */
+ long length() const { return data ? (((Head*)data)-1)->length : 0; }
+
+ /**
+ * \brief Pointer to the data.
+ */
+ char *data;
+
+protected:
+ /* Make space for a string of length len to be appended. */
+ char *appendSpace( long len );
+ void initSpace( long length );
+ void setSpace( long length );
+
+ template <class FT> friend StrTmpl<FT> operator+(
+ const StrTmpl<FT> &s1, const char *s2 );
+ template <class FT> friend StrTmpl<FT> operator+(
+ const char *s1, const StrTmpl<FT> &s2 );
+ template <class FT> friend StrTmpl<FT> operator+(
+ const StrTmpl<FT> &s1, const StrTmpl<FT> &s2 );
+
+private:
+ /* A dummy struct solely to make a constructor that will never be
+ * ambiguous with the public constructors. */
+ struct DisAmbig { };
+ StrTmpl( char *data, const DisAmbig & ) : data(data) { }
+};
+
+/* Free all mem used by the string. */
+template<class T> StrTmpl<T>::~StrTmpl()
+{
+ if ( data != 0 ) {
+ /* If we are the only ones referencing the string, then delete it. */
+ Head *head = ((Head*) data) - 1;
+ head->refCount -= 1;
+ if ( head->refCount == 0 )
+ free( head );
+ }
+}
+
+/* Create from a c-style string. */
+template<class T> StrTmpl<T>::StrTmpl( const char *s )
+{
+ if ( s == 0 )
+ data = 0;
+ else {
+ /* Find the length and allocate the space for the shared string. */
+ long length = strlen( s );
+
+ /* Init space for the data. */
+ initSpace( length );
+
+ /* Copy in the data. */
+ memcpy( data, s, length+1 );
+ }
+}
+
+/* Create from a c-style string. */
+template<class T> StrTmpl<T>::StrTmpl( const char *s, long length )
+{
+ if ( s == 0 )
+ data = 0;
+ else {
+ /* Init space for the data. */
+ initSpace( length );
+
+ /* Copy in the data. */
+ memcpy( data, s, length );
+ data[length] = 0;
+ }
+}
+
+/* Create from a c-style string. */
+template<class T> StrTmpl<T>::StrTmpl( const Fresh &, long length )
+{
+ /* Init space for the data. */
+ initSpace( length );
+ data[length] = 0;
+}
+
+/* Create from another string class. */
+template<class T> StrTmpl<T>::StrTmpl( const StrTmpl &s )
+{
+ if ( s.data == 0 )
+ data = 0;
+ else {
+ /* Take a reference to the string. */
+ Head *strHead = ((Head*)s.data) - 1;
+ strHead->refCount += 1;
+ data = (char*) (strHead+1);
+ }
+}
+
+/* Construct a string from with, sprintf. */
+template<class T> StrTmpl<T>::StrTmpl( long lenGuess, const char *format, ... )
+{
+ /* Set the string for len. */
+ initSpace( lenGuess );
+
+ va_list args;
+
+ va_start( args, format );
+ long written = vsnprintf( data, lenGuess+1, format, args );
+ va_end( args );
+
+ if ( written > lenGuess ) {
+ setSpace( written );
+ va_start( args, format );
+ written = vsnprintf( data, written+1, format, args );
+ va_end( args );
+ }
+ chop( written );
+
+ va_end( args );
+}
+
+/* Create from another string class. */
+template<class T> StrTmpl<T>::StrTmpl( const colm_data *cd )
+{
+ if ( cd->data == 0 )
+ data = 0;
+ else {
+ /* Init space for the data. */
+ initSpace( cd->length );
+
+ /* Copy in the data. */
+ memcpy( data, cd->data, cd->length );
+ data[cd->length] = 0;
+ }
+}
+
+
+
+/* Construct a string from with, sprintf. */
+template<class T> void StrTmpl<T>::setAs( long lenGuess, const char *format, ... )
+{
+ /* Set the string for len. */
+ setSpace( lenGuess );
+
+ va_list args;
+
+ /* Write to the temporary buffer. */
+ va_start( args, format );
+
+ long written = vsnprintf( data, lenGuess+1, format, args );
+ if ( written > lenGuess ) {
+ setSpace( written );
+ written = vsnprintf( data, written+1, format, args );
+ }
+ chop( written );
+
+ va_end( args );
+}
+
+template<class T> void StrTmpl<T>::initSpace( long length )
+{
+ /* Find the length and allocate the space for the shared string. */
+ Head *head = (Head*) malloc( sizeof(Head) + length+1 );
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ /* Init the header. */
+ head->refCount = 1;
+ head->length = length;
+
+ /* Save the pointer to the data. */
+ data = (char*) (head+1);
+}
+
+
+/* Set this string to be the c string exactly. The old string is discarded.
+ * Returns a reference to this. */
+template<class T> StrTmpl<T> &StrTmpl<T>::operator=( const char *s )
+{
+ if ( s == 0 ) {
+ /* Just free the data, we are being set to null. */
+ if ( data != 0 ) {
+ Head *head = ((Head*)data) - 1;
+ head->refCount -= 1;
+ if ( head->refCount == 0 )
+ free(head);
+ data = 0;
+ }
+ }
+ else {
+ /* Find the length of the string we are setting. */
+ long length = strlen( s );
+
+ /* Set the string for len. */
+ setSpace( length );
+
+ /* Copy in the data. */
+ memcpy( data, s, length+1 );
+ }
+ return *this;
+}
+
+/* Set this string to be the c string exactly. The old string is discarded.
+ * Returns a reference to this. */
+template<class T> void StrTmpl<T>::setAs( const char *s, long length )
+{
+ if ( s == 0 ) {
+ /* Just free the data, we are being set to null. */
+ if ( data != 0 ) {
+ Head *head = ((Head*)data) - 1;
+ head->refCount -= 1;
+ if ( head->refCount == 0 )
+ free(head);
+ data = 0;
+ }
+ }
+ else {
+ /* Set the string for len. */
+ setSpace( length );
+
+ /* Copy in the data. */
+ memcpy( data, s, length );
+ data[length] = 0;
+ }
+}
+
+template<class T> void StrTmpl<T>::chop( long length )
+{
+ Head *head = ((Head*)data) - 1;
+ assert( head->refCount == 1 );
+ assert( length <= head->length );
+ head->length = length;
+ data[length] = 0;
+}
+
+/* Set this string to be the c string exactly. The old string is discarded.
+ * Returns a reference to this. */
+template<class T> void StrTmpl<T>::setAs( const Fresh &, long length )
+{
+ setSpace( length );
+ data[length] = 0;
+}
+
+/* Set this string to be the single char exactly. The old string is discarded.
+ * Returns a reference to this. */
+template<class T> StrTmpl<T> &StrTmpl<T>::operator=( const char c )
+{
+ /* Set to length 1. */
+ setSpace( 1 );
+
+ /* Copy in the data. */
+ data[0] = c;
+ data[1] = 0;
+
+ /* Return ourselves. */
+ return *this;
+}
+
+/* Set this string to be the StrTmpl s exactly. The old string is
+ * discarded. */
+template<class T> StrTmpl<T> &StrTmpl<T>::operator=( const StrTmpl &s )
+{
+ /* Detach from the existing string. */
+ if ( data != 0 ) {
+ Head *head = ((Head*)data) - 1;
+ head->refCount -= 1;
+ if ( head->refCount == 0 )
+ free( head );
+ }
+
+ if ( s.data != 0 ) {
+ /* Take a reference to the string. */
+ Head *strHead = ((Head*)s.data) - 1;
+ strHead->refCount += 1;
+ data = (char*)(strHead+1);
+ }
+ else {
+ /* Setting from a null string, just null our pointer. */
+ data = 0;
+ }
+ return *this;
+}
+
+/* Prepare the string to be set to something else of the given length. */
+template<class T> void StrTmpl<T>::setSpace( long length )
+{
+ /* Detach from the existing string. */
+ Head *head = ((Head*)data) - 1;
+ if ( data != 0 && --head->refCount == 0 ) {
+ /* Resuse the space. */
+ head = (Head*) realloc( head, sizeof(Head) + length+1 );
+ }
+ else {
+ /* Need to make new space, there is no usable old space. */
+ head = (Head*) malloc( sizeof(Head) + length+1 );
+ }
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ /* Init the header. */
+ head->refCount = 1;
+ head->length = length;
+
+ /* Copy in the data and save the pointer to it. */
+ data = (char*) (head+1);
+}
+
+
+/* Append a c-style string to the end of this string. Returns a reference to
+ * this */
+template<class T> StrTmpl<T> &StrTmpl<T>::operator+=( const char *s )
+{
+ /* Find the length of the string appended. */
+ if ( s != 0 ) {
+ /* Get the string length and make space on the end. */
+ long addedLen = strlen( s );
+ char *dest = appendSpace( addedLen );
+
+ /* Copy the data in. Plus one for the null. */
+ memcpy( dest, s, addedLen+1 );
+ }
+ return *this;
+}
+
+/* Append a c-style string of specific length to the end of this string.
+ * Returns a reference to this */
+template<class T> void StrTmpl<T>::append( const char *s, long length )
+{
+ /* Find the length of the string appended. */
+ if ( s != 0 ) {
+ /* Make space on the end. */
+ char *dest = appendSpace( length );
+
+ /* Copy the data in. Plus one for the null. */
+ memcpy( dest, s, length );
+ dest[length] = 0;
+ }
+}
+
+/* Append a single char to the end of this string. Returns a reference to
+ * this */
+template<class T> StrTmpl<T> &StrTmpl<T>::operator+=( const char c )
+{
+ /* Grow on the end. */
+ char *dst = appendSpace( 1 );
+
+ /* Append a single charachter. */
+ dst[0] = c;
+ dst[1] = 0;
+ return *this;
+}
+
+
+/* Append an StrTmpl string to the end of this string. Returns a reference
+ * to this */
+template<class T> StrTmpl<T> &StrTmpl<T>::operator+=( const StrTmpl &s )
+{
+ /* Find the length of the string appended. */
+ if ( s.data != 0 ) {
+ /* Find the length to append. */
+ long addedLen = (((Head*)s.data) - 1)->length;
+
+ /* Make space on the end to put the string. */
+ char *dest = appendSpace( addedLen );
+
+ /* Append the data, add one for the null. */
+ memcpy( dest, s.data, addedLen+1 );
+ }
+ return *this;
+}
+
+/* Make space for a string of length len to be appended. */
+template<class T> char *StrTmpl<T>::appendSpace( long len )
+{
+ /* Find the length of this and the string appended. */
+ Head *head = (((Head*)data) - 1);
+ long thisLen = head->length;
+
+ if ( head->refCount == 1 ) {
+ /* No other string is using the space, grow this space. */
+ head = (Head*) realloc( head,
+ sizeof(Head) + thisLen + len + 1 );
+ if ( head == 0 )
+ throw std::bad_alloc();
+ data = (char*) (head+1);
+
+ /* Adjust the length. */
+ head->length += len;
+ }
+ else {
+ /* Another string is using this space, make new space. */
+ head->refCount -= 1;
+ Head *newHead = (Head*) malloc(
+ sizeof(Head) + thisLen + len + 1 );
+ if ( newHead == 0 )
+ throw std::bad_alloc();
+ data = (char*) (newHead+1);
+
+ /* Set the new header and data from this. */
+ newHead->refCount = 1;
+ newHead->length = thisLen + len;
+ memcpy( data, head+1, thisLen );
+ }
+
+ /* Return writing position. */
+ return data + thisLen;
+}
+
+/* Concatenate a String and a c-style string. */
+template<class T> StrTmpl<T> operator+( const StrTmpl<T> &s1, const char *s2 )
+{
+ /* Find s2 length and alloc the space for the result. */
+ long str1Len = (((typename StrTmpl<T>::Head*)(s1.data)) - 1)->length;
+ long str2Len = strlen( s2 );
+
+ typename StrTmpl<T>::Head *head = (typename StrTmpl<T>::Head*)
+ malloc( sizeof(typename StrTmpl<T>::Head) + str1Len + str2Len + 1 );
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ /* Set up the header. */
+ head->refCount = 1;
+ head->length = str1Len + str2Len;
+
+ /* Save the pointer to data and copy the data in. */
+ char *data = (char*) (head+1);
+ memcpy( data, s1.data, str1Len );
+ memcpy( data + str1Len, s2, str2Len + 1 );
+ return StrTmpl<T>( data, typename StrTmpl<T>::DisAmbig() );
+}
+
+/* Concatenate a c-style string and a String. */
+template<class T> StrTmpl<T> operator+( const char *s1, const StrTmpl<T> &s2 )
+{
+ /* Find s2 length and alloc the space for the result. */
+ long str1Len = strlen( s1 );
+ long str2Len = (((typename StrTmpl<T>::Head*)(s2.data)) - 1)->length;
+
+ typename StrTmpl<T>::Head *head = (typename StrTmpl<T>::Head*)
+ malloc( sizeof(typename StrTmpl<T>::Head) + str1Len + str2Len + 1 );
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ /* Set up the header. */
+ head->refCount = 1;
+ head->length = str1Len + str2Len;
+
+ /* Save the pointer to data and copy the data in. */
+ char *data = (char*) (head+1);
+ memcpy( data, s1, str1Len );
+ memcpy( data + str1Len, s2.data, str2Len + 1 );
+ return StrTmpl<T>( data, typename StrTmpl<T>::DisAmbig() );
+}
+
+/* Add two StrTmpl strings. */
+template<class T> StrTmpl<T> operator+( const StrTmpl<T> &s1, const StrTmpl<T> &s2 )
+{
+ /* Find s2 length and alloc the space for the result. */
+ long str1Len = (((typename StrTmpl<T>::Head*)(s1.data)) - 1)->length;
+ long str2Len = (((typename StrTmpl<T>::Head*)(s2.data)) - 1)->length;
+ typename StrTmpl<T>::Head *head = (typename StrTmpl<T>::Head*)
+ malloc( sizeof(typename StrTmpl<T>::Head) + str1Len + str2Len + 1 );
+ if ( head == 0 )
+ throw std::bad_alloc();
+
+ /* Set up the header. */
+ head->refCount = 1;
+ head->length = str1Len + str2Len;
+
+ /* Save the pointer to data and copy the data in. */
+ char *data = (char*) (head+1);
+ memcpy( data, s1.data, str1Len );
+ memcpy( data + str1Len, s2.data, str2Len + 1 );
+ return StrTmpl<T>( data, typename StrTmpl<T>::DisAmbig() );
+}
+
+/* Operator used in case the compiler does not support the conversion. */
+template <class T> inline std::ostream &operator<<( std::ostream &o, const StrTmpl<T> &s )
+{
+ return o.write( s.data, s.length() );
+}
+
+typedef StrTmpl<char> String;
+
+/**
+ * \brief Compare two null terminated character sequences.
+ *
+ * This comparision class is a wrapper for strcmp.
+ */
+template<class T> struct CmpStrTmpl
+{
+ /**
+ * \brief Compare two null terminated string types.
+ */
+ static inline long compare( const char *k1, const char *k2 )
+ { return strcmp(k1, k2); }
+
+ static int compare( const StrTmpl<T> &s1, const StrTmpl<T> &s2 )
+ {
+ if ( s1.length() < s2.length() )
+ return -1;
+ else if ( s1.length() > s2.length() )
+ return 1;
+ else
+ return memcmp( s1.data, s2.data, s1.length() );
+ }
+};
+
+typedef CmpStrTmpl<char> CmpStr;
+
+
+
+#ifdef AAPL_NAMESPACE
+}
+#endif
+
+#endif /* _AAPL_ASTRING_H */
diff --git a/src/ctinput.cc b/src/ctinput.cc
new file mode 100644
index 0000000..c8005ff
--- /dev/null
+++ b/src/ctinput.cc
@@ -0,0 +1,497 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "parsedata.h"
+#include "parsetree.h"
+#include "input.h"
+#include "debug.h"
+#include "pool.h"
+
+#include <iostream>
+
+using std::cerr;
+using std::endl;
+
+extern StreamFuncs patternFuncs;
+extern StreamFuncs replFuncs;
+
+/*
+ * Pattern
+ */
+
+StreamImpl *newSourceStreamPat( const char *name, Pattern *pattern )
+{
+ StreamImpl *ss = (StreamImpl*)malloc(sizeof(StreamImpl));
+ memset( ss, 0, sizeof(StreamImpl) );
+ ss->pattern = pattern;
+ ss->patItem = pattern->list->head;
+ ss->funcs = &patternFuncs;
+ return ss;
+}
+
+LangEl *inputStreamPatternGetLangEl( StreamImpl *ss, long *bindId, char **data, long *length )
+{
+ LangEl *klangEl = ss->patItem->prodEl->langEl;
+ *bindId = ss->patItem->bindId;
+ *data = 0;
+ *length = 0;
+
+ ss->patItem = ss->patItem->next;
+ ss->offset = 0;
+ return klangEl;
+}
+
+int inputStreamPatternGetParseBlock( StreamImpl *ss, int skip, char **pdp, int *copied )
+{
+ *copied = 0;
+
+ PatternItem *buf = ss->patItem;
+ int offset = ss->offset;
+
+ while ( true ) {
+ if ( buf == 0 )
+ return INPUT_EOD;
+
+ if ( buf->form == PatternItem::TypeRefForm )
+ return INPUT_LANG_EL;
+
+ assert ( buf->form == PatternItem::InputTextForm );
+ int avail = buf->data.length() - offset;
+
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ char *src = &buf->data[offset];
+ int slen = avail;
+
+ /* Need to skip? */
+ if ( skip > 0 && slen <= skip ) {
+ /* Skipping the the whole source. */
+ skip -= slen;
+ }
+ else {
+ /* Either skip is zero, or less than slen. Skip goes to zero.
+ * Some data left over, copy it. */
+ src += skip;
+ slen -= skip;
+ skip = 0;
+
+ *pdp = src;
+ *copied += slen;
+ break;
+ }
+ }
+
+ buf = buf->next;
+ offset = 0;
+ }
+
+ return INPUT_DATA;
+}
+
+int inputStreamPatternGetData( StreamImpl *ss, char *dest, int length )
+{
+ int copied = 0;
+
+ PatternItem *buf = ss->patItem;
+ int offset = ss->offset;
+
+ while ( true ) {
+ if ( buf == 0 )
+ break;
+
+ if ( buf->form == PatternItem::TypeRefForm )
+ break;
+
+ assert ( buf->form == PatternItem::InputTextForm );
+ int avail = buf->data.length() - offset;
+
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ char *src = &buf->data[offset];
+ int slen = avail <= length ? avail : length;
+
+ memcpy( dest+copied, src, slen ) ;
+ copied += slen;
+ length -= slen;
+ }
+
+ if ( length == 0 )
+ break;
+
+ buf = buf->next;
+ offset = 0;
+ }
+
+ return copied;
+}
+
+void inputStreamPatternBackup( StreamImpl *ss )
+{
+ if ( ss->patItem == 0 )
+ ss->patItem = ss->pattern->list->tail;
+ else
+ ss->patItem = ss->patItem->prev;
+}
+
+void inputStreamPatternPushBackBuf( StreamImpl *ss, RunBuf *runBuf )
+{
+ char *data = runBuf->data + runBuf->offset;
+ long length = runBuf->length;
+
+ if ( length == 0 )
+ return;
+
+ /* While pushing back past the current pattern item start. */
+ while ( length > ss->offset ) {
+ length -= ss->offset;
+ if ( ss->offset > 0 )
+ assert( memcmp( ss->patItem->data, data-length, ss->offset ) == 0 );
+ inputStreamPatternBackup( ss );
+ ss->offset = ss->patItem->data.length();
+ }
+
+ ss->offset -= length;
+ assert( memcmp( &ss->patItem->data[ss->offset], data, length ) == 0 );
+}
+
+void inputStreamPatternUndoConsumeLangEl( StreamImpl *ss )
+{
+ inputStreamPatternBackup( ss );
+ ss->offset = ss->patItem->data.length();
+}
+
+int inputStreamPatternConsumeData( StreamImpl *ss, int length, Location *loc )
+{
+ //debug( REALM_INPUT, "consuming %ld bytes\n", length );
+
+ int consumed = 0;
+
+ while ( true ) {
+ if ( ss->patItem == 0 )
+ break;
+
+ int avail = ss->patItem->data.length() - ss->offset;
+
+ if ( length >= avail ) {
+ /* Read up to the end of the data. Advance the
+ * pattern item. */
+ ss->patItem = ss->patItem->next;
+ ss->offset = 0;
+
+ length -= avail;
+ consumed += avail;
+
+ if ( length == 0 )
+ break;
+ }
+ else {
+ ss->offset += length;
+ consumed += length;
+ break;
+ }
+ }
+
+ return consumed;
+}
+
+int inputStreamPatternUndoConsumeData( StreamImpl *ss, const char *data, int length )
+{
+ ss->offset -= length;
+ return length;
+}
+
+StreamFuncs patternFuncs =
+{
+ &inputStreamPatternGetParseBlock,
+ &inputStreamPatternGetData,
+ &inputStreamPatternConsumeData,
+ &inputStreamPatternUndoConsumeData,
+ 0,
+ 0,
+ &inputStreamPatternGetLangEl,
+ &inputStreamPatternUndoConsumeLangEl,
+};
+
+
+/*
+ * Constructor
+ */
+
+StreamImpl *newSourceStreamCons( const char *name, Constructor *constructor )
+{
+ StreamImpl *ss = (StreamImpl*)malloc(sizeof(StreamImpl));
+ memset( ss, 0, sizeof(StreamImpl) );
+ ss->constructor = constructor;
+ ss->consItem = constructor->list->head;
+ ss->funcs = &replFuncs;
+ return ss;
+}
+
+LangEl *inputStreamConsGetLangEl( StreamImpl *ss, long *bindId, char **data, long *length )
+{
+ LangEl *klangEl = ss->consItem->type == ConsItem::ExprType ?
+ ss->consItem->langEl : ss->consItem->prodEl->langEl;
+ *bindId = ss->consItem->bindId;
+
+ *data = 0;
+ *length = 0;
+
+ if ( ss->consItem->type == ConsItem::LiteralType ) {
+ if ( ss->consItem->prodEl->typeRef->pdaLiteral != 0 ) {
+ bool unusedCI;
+ prepareLitString( ss->consItem->data, unusedCI,
+ ss->consItem->prodEl->typeRef->pdaLiteral->data,
+ ss->consItem->prodEl->typeRef->pdaLiteral->loc );
+
+ *data = ss->consItem->data;
+ *length = ss->consItem->data.length();
+ }
+ }
+
+ ss->consItem = ss->consItem->next;
+ ss->offset = 0;
+ return klangEl;
+}
+
+int inputStreamConsGetParseBlock( StreamImpl *ss,
+ int skip, char **pdp, int *copied )
+{
+ *copied = 0;
+
+ ConsItem *buf = ss->consItem;
+ int offset = ss->offset;
+
+ while ( true ) {
+ if ( buf == 0 )
+ return INPUT_EOD;
+
+ if ( buf->type == ConsItem::ExprType || buf->type == ConsItem::LiteralType )
+ return INPUT_LANG_EL;
+
+ assert ( buf->type == ConsItem::InputText );
+ int avail = buf->data.length() - offset;
+
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ char *src = &buf->data[offset];
+ int slen = avail;
+
+ /* Need to skip? */
+ if ( skip > 0 && slen <= skip ) {
+ /* Skipping the the whole source. */
+ skip -= slen;
+ }
+ else {
+ /* Either skip is zero, or less than slen. Skip goes to zero.
+ * Some data left over, copy it. */
+ src += skip;
+ slen -= skip;
+ skip = 0;
+
+ *pdp = src;
+ *copied += slen;
+ break;
+ }
+ }
+
+ buf = buf->next;
+ offset = 0;
+ }
+
+ return INPUT_DATA;
+}
+
+int inputStreamConsGetData( StreamImpl *ss, char *dest, int length )
+{
+ int copied = 0;
+
+ ConsItem *buf = ss->consItem;
+ int offset = ss->offset;
+
+ while ( true ) {
+ if ( buf == 0 )
+ break;
+
+ if ( buf->type == ConsItem::ExprType || buf->type == ConsItem::LiteralType )
+ break;
+
+ assert ( buf->type == ConsItem::InputText );
+ int avail = buf->data.length() - offset;
+
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ char *src = &buf->data[offset];
+ int slen = avail <= length ? avail : length;
+
+ memcpy( dest+copied, src, slen ) ;
+ copied += slen;
+ length -= slen;
+ }
+
+ if ( length == 0 )
+ break;
+
+ buf = buf->next;
+ offset = 0;
+ }
+
+ return copied;
+}
+
+void inputStreamConsBackup( StreamImpl *ss )
+{
+ if ( ss->consItem == 0 )
+ ss->consItem = ss->constructor->list->tail;
+ else
+ ss->consItem = ss->consItem->prev;
+}
+
+void inputStreamConsPushBackBuf( StreamImpl *ss, RunBuf *runBuf )
+{
+ char *data = runBuf->data + runBuf->offset;
+ long length = runBuf->length;
+
+ //cerr << "push back data: ";
+ //cerr.write( data, length );
+ //cerr << endl;
+
+ if ( length == 0 )
+ return;
+
+ /* While pushing back past the current pattern item start. */
+ while ( length > ss->offset ) {
+ length -= ss->offset;
+ if ( ss->offset > 0 )
+ assert( memcmp( ss->consItem->data, data-length, ss->offset ) == 0 );
+ inputStreamConsBackup( ss );
+ ss->offset = ss->consItem->data.length();
+ }
+
+ ss->offset -= length;
+ assert( memcmp( &ss->consItem->data[ss->offset], data, length ) == 0 );
+}
+
+void inputStreamConsUndoConsumeLangEl( StreamImpl *ss )
+{
+ inputStreamConsBackup( ss );
+ ss->offset = ss->consItem->data.length();
+}
+
+int inputStreamConsConsumeData( StreamImpl *ss, int length, Location *loc )
+{
+ int consumed = 0;
+
+ while ( true ) {
+ if ( ss->consItem == 0 )
+ break;
+
+ int avail = ss->consItem->data.length() - ss->offset;
+
+ if ( length >= avail ) {
+ /* Read up to the end of the data. Advance the
+ * pattern item. */
+ ss->consItem = ss->consItem->next;
+ ss->offset = 0;
+
+ length -= avail;
+ consumed += avail;
+
+ if ( length == 0 )
+ break;
+ }
+ else {
+ ss->offset += length;
+ consumed += length;
+ break;
+ }
+ }
+
+ return consumed;
+}
+
+int inputStreamConsUndoConsumeData( StreamImpl *ss, const char *data, int length )
+{
+ ss->offset -= length;
+ return length;
+}
+
+StreamFuncs replFuncs =
+{
+ &inputStreamConsGetParseBlock,
+ &inputStreamConsGetData,
+ &inputStreamConsConsumeData,
+ &inputStreamConsUndoConsumeData,
+ 0,
+ 0,
+ &inputStreamConsGetLangEl,
+ &inputStreamConsUndoConsumeLangEl,
+};
+
+extern "C" void internalSendNamedLangEl( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *is )
+{
+ /* All three set by consumeLangEl. */
+ long bindId;
+ char *data;
+ long length;
+
+ LangEl *klangEl = is->funcs->consumeLangEl( is, &bindId, &data, &length );
+
+ //cerr << "named langEl: " << prg->rtd->lelInfo[klangEl->id].name << endl;
+
+ /* Copy the token data. */
+ Head *tokdata = 0;
+ if ( data != 0 )
+ tokdata = stringAllocFull( prg, data, length );
+
+ Kid *input = makeTokenWithData( prg, pdaRun, fsmRun, is, klangEl->id, tokdata );
+
+ incrementSteps( pdaRun );
+
+ ParseTree *parseTree = parseTreeAllocate( prg );
+ parseTree->id = input->tree->id;
+ parseTree->flags |= PF_NAMED;
+ parseTree->shadow = input;
+
+ if ( bindId > 0 )
+ pushBinding( pdaRun, parseTree );
+
+ pdaRun->parseInput = parseTree;
+}
+
+extern "C" void internalInitBindings( PdaRun *pdaRun )
+{
+ /* Bindings are indexed at 1. Need a no-binding. */
+ pdaRun->bindings = new Bindings;
+ pdaRun->bindings->push(0);
+}
+
+void pushBinding( PdaRun *pdaRun, ParseTree *parseTree )
+{
+ /* If the item is bound then store it in the bindings array. */
+ pdaRun->bindings->push( parseTree );
+}
+
+extern "C" void internalPopBinding( PdaRun *pdaRun, ParseTree *parseTree )
+{
+ ParseTree *lastBound = pdaRun->bindings->top();
+ if ( lastBound == parseTree )
+ pdaRun->bindings->pop();
+}
diff --git a/src/debug.c b/src/debug.c
new file mode 100644
index 0000000..c43f5a6
--- /dev/null
+++ b/src/debug.c
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <colm/debug.h>
+#include <colm/program.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+const char *const colmRealmNames[REALMS] =
+ {
+ "BYTECODE",
+ "PARSE",
+ "MATCH",
+ "COMPILE",
+ "POOL",
+ "PRINT",
+ "INPUT",
+ "SCAN",
+ };
+
+int _debug( struct colm_program *prg, long realm, const char *fmt, ... )
+{
+ int result = 0;
+ if ( prg->activeRealm & realm ) {
+ /* Compute the index by shifting. */
+ int ind = 0;
+ while ( (realm & 0x1) != 0x1 ) {
+ realm >>= 1;
+ ind += 1;
+ }
+
+ fprintf( stderr, "%s: ", colmRealmNames[ind] );
+ va_list args;
+ va_start( args, fmt );
+ result = vfprintf( stderr, fmt, args );
+ va_end( args );
+ }
+
+ return result;
+}
+
+void fatal( const char *fmt, ... )
+{
+ va_list args;
+ fprintf( stderr, "fatal: " );
+ va_start( args, fmt );
+ vfprintf( stderr, fmt, args );
+ va_end( args );
+ exit(1);
+}
+
+void message( const char *fmt, ... )
+{
+ va_list args;
+ fprintf( stderr, "message: " );
+ va_start( args, fmt );
+ vfprintf( stderr, fmt, args );
+ va_end( args );
+}
diff --git a/src/debug.h b/src/debug.h
new file mode 100644
index 0000000..91e1c46
--- /dev/null
+++ b/src/debug.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "config.h"
+
+void fatal( const char *fmt, ... );
+
+#ifdef DEBUG
+#define debug( prg, realm, ... ) _debug( prg, realm, __VA_ARGS__ )
+#define check_realm( realm ) _check_realm( realm )
+#else
+#define debug( prg, realm, ... )
+#define check_realm( realm )
+#endif
+
+struct colm_program;
+
+int _debug( struct colm_program *prg, long realm, const char *fmt, ... );
+
+void message( const char *fmt, ... );
+
+#define REALM_BYTECODE 0x00000001
+#define REALM_PARSE 0x00000002
+#define REALM_MATCH 0x00000004
+#define REALM_COMPILE 0x00000008
+#define REALM_POOL 0x00000010
+#define REALM_PRINT 0x00000020
+#define REALM_INPUT 0x00000040
+#define REALM_SCAN 0x00000080
+
+#define REALMS 32
+
+extern const char *const colmRealmNames[REALMS];
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/declare.cc b/src/declare.cc
new file mode 100644
index 0000000..d18ce5d
--- /dev/null
+++ b/src/declare.cc
@@ -0,0 +1,1255 @@
+/*
+ * Copyright 2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "bytecode.h"
+#include "parsedata.h"
+#include <iostream>
+#include <assert.h>
+
+void Compiler::initUniqueTypes( )
+{
+ uniqueTypeNil = new UniqueType( TYPE_NIL );
+ uniqueTypeVoid = new UniqueType( TYPE_TREE, voidLangEl );
+ uniqueTypePtr = new UniqueType( TYPE_TREE, ptrLangEl );
+ uniqueTypeBool = new UniqueType( TYPE_TREE, boolLangEl );
+ uniqueTypeInt = new UniqueType( TYPE_TREE, intLangEl );
+ uniqueTypeStr = new UniqueType( TYPE_TREE, strLangEl );
+ uniqueTypeStream = new UniqueType( TYPE_TREE, streamLangEl );
+ uniqueTypeIgnore = new UniqueType( TYPE_TREE, ignoreLangEl );
+ uniqueTypeAny = new UniqueType( TYPE_TREE, anyLangEl );
+
+ uniqeTypeMap.insert( uniqueTypeNil );
+ uniqeTypeMap.insert( uniqueTypeVoid );
+ uniqeTypeMap.insert( uniqueTypePtr );
+ uniqeTypeMap.insert( uniqueTypeBool );
+ uniqeTypeMap.insert( uniqueTypeInt );
+ uniqeTypeMap.insert( uniqueTypeStr );
+ uniqeTypeMap.insert( uniqueTypeStream );
+ uniqeTypeMap.insert( uniqueTypeIgnore );
+ uniqeTypeMap.insert( uniqueTypeAny );
+}
+
+ObjectField *ObjNameScope::checkRedecl( const String &name )
+{
+ return owner->checkRedecl( this, name );
+}
+
+void ObjNameScope::insertField( const String &name, ObjectField *value )
+{
+ return owner->insertField( this, name, value );
+}
+
+ObjectField *ObjectDef::checkRedecl( ObjNameScope *inScope, const String &name )
+{
+ ObjFieldMapEl *objDefMapEl = inScope->objFieldMap->find( name );
+ if ( objDefMapEl != 0 )
+ return objDefMapEl->value;
+ return 0;
+}
+
+void ObjectDef::insertField( ObjNameScope *inScope, const String &name, ObjectField *value )
+{
+ inScope->objFieldMap->insert( name, value );
+ objFieldList->append( value );
+ value->scope = inScope;
+}
+
+ObjNameScope *ObjectDef::pushScope( ObjNameScope *curScope )
+{
+ ObjNameScope *newScope = new ObjNameScope;
+ newScope->objFieldMap = new ObjFieldMap;
+
+ newScope->owner = this;
+ newScope->parentScope = curScope;
+ curScope->children.append( newScope );
+
+ return newScope;
+}
+
+void LexJoin::varDecl( Compiler *pd, TokenDef *tokenDef )
+{
+ expr->varDecl( pd, tokenDef );
+}
+
+void LexExpression::varDecl( Compiler *pd, TokenDef *tokenDef )
+{
+ switch ( type ) {
+ case OrType: case IntersectType: case SubtractType:
+ case StrongSubtractType:
+ expression->varDecl( pd, tokenDef );
+ term->varDecl( pd, tokenDef );
+ break;
+ case TermType:
+ term->varDecl( pd, tokenDef );
+ break;
+ case BuiltinType:
+ break;
+ }
+}
+
+void LexTerm::varDecl( Compiler *pd, TokenDef *tokenDef )
+{
+ switch ( type ) {
+ case ConcatType:
+ case RightStartType:
+ case RightFinishType:
+ case LeftType:
+ term->varDecl( pd, tokenDef );
+ factorAug->varDecl( pd, tokenDef );
+ break;
+ case FactorAugType:
+ factorAug->varDecl( pd, tokenDef );
+ break;
+ }
+}
+
+void LexFactorAug::varDecl( Compiler *pd, TokenDef *tokenDef )
+{
+ for ( ReCaptureVect::Iter re = reCaptureVect; re.lte(); re++ ) {
+ if ( tokenDef->objectDef->rootScope->checkRedecl( re->objField->name ) != 0 ) {
+ error(re->objField->loc) << "label name \"" <<
+ re->objField->name << "\" already in use" << endp;
+ }
+
+ /* Insert it into the map. */
+ tokenDef->objectDef->rootScope->insertField( re->objField->name, re->objField );
+
+ /* Store it in the TokenDef. */
+ tokenDef->reCaptureVect.append( *re );
+ }
+}
+
+void Compiler::declareReVars()
+{
+ for ( NamespaceList::Iter n = namespaceList; n.lte(); n++ ) {
+ for ( TokenDefListNs::Iter tok = n->tokenDefList; tok.lte(); tok++ ) {
+ if ( tok->join != 0 )
+ tok->join->varDecl( this, tok );
+ }
+ }
+
+ /* FIXME: declare RE captures in token generation actions. */
+#if 0
+ /* Add captures to the local frame. We Depend on these becoming the
+ * first local variables so we can compute their location. */
+
+ /* Make local variables corresponding to the local capture vector. */
+ for ( ReCaptureVect::Iter c = reCaptureVect; c.lte(); c++ )
+ {
+ ObjectField *objField = ObjectField::cons( c->objField->loc,
+ c->objField->typeRef, c->objField->name );
+
+ /* Insert it into the field map. */
+ pd->curLocalFrame->insertField( objField->name, objField );
+ }
+#endif
+}
+
+LangEl *declareLangEl( Compiler *pd, Namespace *nspace, const String &data, LangEl::Type type )
+{
+ /* If the id is already in the dict, it will be placed in last found. If
+ * it is not there then it will be inserted and last found will be set to it. */
+ TypeMapEl *inDict = nspace->typeMap.find( data );
+ if ( inDict != 0 )
+ error() << "'" << data << "' already defined as something else" << endp;
+
+ /* Language element not there. Make the new lang el and insert.. */
+ LangEl *langEl = new LangEl( nspace, data, type );
+ TypeMapEl *typeMapEl = new TypeMapEl( data, langEl );
+ nspace->typeMap.insert( typeMapEl );
+ pd->langEls.append( langEl );
+
+ return langEl;
+}
+
+/* Does not map the new language element. */
+LangEl *addLangEl( Compiler *pd, Namespace *nspace, const String &data, LangEl::Type type )
+{
+ LangEl *langEl = new LangEl( nspace, data, type );
+ pd->langEls.append( langEl );
+ return langEl;
+}
+
+void declareTypeAlias( Compiler *pd, Namespace *nspace, const String &data, TypeRef *typeRef )
+{
+ /* If the id is already in the dict, it will be placed in last found. If
+ * it is not there then it will be inserted and last found will be set to it. */
+ TypeMapEl *inDict = nspace->typeMap.find( data );
+ if ( inDict != 0 )
+ error() << "'" << data << "' already defined as something else" << endp;
+
+ /* Language element not there. Make the new lang el and insert.. */
+ TypeMapEl *typeMapEl = new TypeMapEl( data, typeRef );
+ nspace->typeMap.insert( typeMapEl );
+}
+
+LangEl *findType( Compiler *pd, Namespace *nspace, const String &data )
+{
+ /* If the id is already in the dict, it will be placed in last found. If
+ * it is not there then it will be inserted and last found will be set to it. */
+ TypeMapEl *inDict = nspace->typeMap.find( data );
+
+ if ( inDict == 0 )
+ error() << "'" << data << "' not declared as anything" << endp;
+
+ return inDict->value;
+}
+
+
+void Compiler::declareBaseLangEls()
+{
+ /* Order here is important because we make assumptions about the inbuilt
+ * language elements in the runtime. Note tokens are have identifiers set
+ * in an initial pass. */
+
+ /* Make a "_notoken" language element. This element is used when a
+ * generation action fails to generate anything, but there is reverse code
+ * that needs to be associated with a language element. This allows us to
+ * always associate reverse code with the first language element produced
+ * after a generation action. */
+ noTokenLangEl = declareLangEl( this, rootNamespace, "_notoken", LangEl::Term );
+ noTokenLangEl->isIgnore = true;
+
+ ptrLangEl = declareLangEl( this, rootNamespace, "ptr", LangEl::Term );
+ voidLangEl = declareLangEl( this, rootNamespace, "void", LangEl::Term );
+ boolLangEl = declareLangEl( this, rootNamespace, "bool", LangEl::Term );
+ intLangEl = declareLangEl( this, rootNamespace, "int", LangEl::Term );
+ strLangEl = declareLangEl( this, rootNamespace, "str", LangEl::Term );
+ streamLangEl = declareLangEl( this, rootNamespace, "stream", LangEl::Term );
+ ignoreLangEl = declareLangEl( this, rootNamespace, "il", LangEl::Term );
+
+ /* Make the EOF language element. */
+ eofLangEl = 0;
+
+ /* Make the "any" language element */
+ anyLangEl = declareLangEl( this, rootNamespace, "any", LangEl::NonTerm );
+}
+
+
+void Compiler::addProdRedObjectVar( ObjectDef *localFrame, LangEl *nonTerm )
+{
+ UniqueType *prodNameUT = findUniqueType( TYPE_TREE, nonTerm );
+ TypeRef *typeRef = TypeRef::cons( internal, prodNameUT );
+ ObjectField *el = ObjectField::cons( internal, typeRef, "lhs" );
+
+ el->isLhsEl = true;
+
+ initLocalInstructions( el );
+
+ localFrame->rootScope->insertField( el->name, el );
+}
+
+void Compiler::addProdLHSLoad( Production *prod, CodeVect &code, long &insertPos )
+{
+ ObjNameScope *scope = prod->redBlock->localFrame->rootScope;
+ ObjectField *lhsField = scope->findField("lhs");
+ assert( lhsField != 0 );
+
+ CodeVect loads;
+ if ( lhsField->beenReferenced ) {
+ loads.append( IN_INIT_LHS_EL );
+ loads.appendHalf( lhsField->offset );
+ }
+
+ code.insert( insertPos, loads );
+ insertPos += loads.length();
+}
+
+void Compiler::addPushBackLHS( Production *prod, CodeVect &code, long &insertPos )
+{
+ CodeBlock *block = prod->redBlock;
+
+ /* If the lhs tree is dirty then we will need to save off the old lhs
+ * before it gets modified. We want to avoid this for attribute
+ * modifications. The computation of dirtyTree should deal with this for
+ * us. */
+ ObjNameScope *scope = block->localFrame->rootScope;
+ ObjectField *lhsField = scope->findField("lhs");
+ assert( lhsField != 0 );
+
+ if ( lhsField->beenReferenced ) {
+ code.append( IN_STORE_LHS_EL );
+ code.appendHalf( lhsField->offset );
+ }
+}
+
+void Compiler::addProdRHSVars( ObjectDef *localFrame, ProdElList *prodElList )
+{
+ long position = 1;
+ for ( ProdElList::Iter rhsEl = *prodElList; rhsEl.lte(); rhsEl++, position++ ) {
+ if ( rhsEl->type == ProdEl::ReferenceType ) {
+ /* Use an offset of zero. For frame objects we compute the offset on
+ * demand. */
+ String name( 8, "r%d", position );
+ ObjectField *el = ObjectField::cons( InputLoc(), rhsEl->typeRef, name );
+ rhsEl->rhsElField = el;
+
+ /* Right hand side elements are constant. */
+ el->isConst = true;
+ el->isRhsEl = true;
+
+ /* Only ever fetch for reading since they are constant. */
+ el->inGetR = IN_GET_LOCAL_R;
+
+ localFrame->rootScope->insertField( el->name, el );
+ }
+ }
+}
+
+void Compiler::addProdRHSLoads( Production *prod, CodeVect &code, long &insertPos )
+{
+ CodeVect loads;
+ long elPos = 0;
+ for ( ProdElList::Iter rhsEl = *prod->prodElList; rhsEl.lte(); rhsEl++, elPos++ ) {
+ if ( rhsEl->type == ProdEl::ReferenceType ) {
+ if ( rhsEl->rhsElField->beenReferenced ) {
+ loads.append ( IN_INIT_RHS_EL );
+ loads.appendHalf( elPos );
+ loads.appendHalf( rhsEl->rhsElField->offset );
+ }
+ }
+ }
+
+ /* Insert and update the insert position. */
+ code.insert( insertPos, loads );
+ insertPos += loads.length();
+}
+
+void GenericType::declare( Compiler *pd, Namespace *nspace )
+{
+ //std::cout << "generic " << g->name << std::endl;
+
+ LangEl *langEl = declareLangEl( pd, nspace, name, LangEl::NonTerm );
+
+ /* Add one empty production. */
+ ProdElList *emptyList = new ProdElList;
+ //addProduction( g->loc, langEl, emptyList, false, 0, 0 );
+
+ {
+ LangEl *prodName = langEl;
+ assert( prodName->type == LangEl::NonTerm );
+
+ Production *newDef = Production::cons( InputLoc(), prodName,
+ emptyList, String(), false, 0,
+ pd->prodList.length(), prodName->defList.length() );
+
+ prodName->defList.append( newDef );
+ pd->prodList.append( newDef );
+ newDef->predOf = 0;
+ }
+
+ langEl->generic = this;
+ this->langEl = langEl;
+
+ utArg = typeArg->uniqueType;
+
+ if ( typeId == GEN_MAP )
+ keyUT = keyTypeArg->uniqueType;
+
+ objDef = ObjectDef::cons( ObjectDef::BuiltinType,
+ name, pd->nextObjectId++ );
+
+ switch ( typeId ) {
+ case GEN_MAP:
+ pd->initMapFunctions( this );
+ break;
+ case GEN_LIST:
+ pd->initListFunctions( this );
+ pd->initListFields( this );
+ break;
+ case GEN_VECTOR:
+ pd->initVectorFunctions( this );
+ break;
+ case GEN_PARSER:
+ /* Need to generate a parser for the type. */
+ utArg->langEl->parserId = pd->nextParserId++;
+ pd->initParserFunctions( this );
+ pd->initParserFields( this );
+ break;
+ }
+
+ langEl->objectDef = objDef;
+}
+
+void Namespace::declare( Compiler *pd )
+{
+ for ( GenericList::Iter g = genericList; g.lte(); g++ )
+ g->declare( pd, this );
+
+ for ( TokenDefListNs::Iter tokenDef = tokenDefList; tokenDef.lte(); tokenDef++ ) {
+ if ( tokenDef->isLiteral ) {
+ if ( tokenDef->isZero ) {
+ assert( tokenDef->regionSet->collectIgnore->zeroLel != 0 );
+ tokenDef->tdLangEl = tokenDef->regionSet->collectIgnore->zeroLel;
+ }
+ else {
+ /* Original. Create a token for the literal. */
+ LangEl *litEl = declareLangEl( pd, this, tokenDef->name, LangEl::Term );
+
+ litEl->lit = tokenDef->literal;
+ litEl->isLiteral = true;
+ litEl->tokenDef = tokenDef;
+ litEl->objectDef = tokenDef->objectDef;
+
+ tokenDef->tdLangEl = litEl;
+
+ if ( tokenDef->noPreIgnore )
+ litEl->noPreIgnore = true;
+ if ( tokenDef->noPostIgnore )
+ litEl->noPostIgnore = true;
+ }
+ }
+ }
+
+ for ( ContextDefList::Iter c = contextDefList; c.lte(); c++ ) {
+ LangEl *lel = declareLangEl( pd, this, c->name, LangEl::NonTerm );
+ ProdElList *emptyList = new ProdElList;
+ //addProduction( c->context->loc, c->name, emptyList, false, 0, 0 );
+
+ {
+ LangEl *prodName = lel;
+ assert( prodName->type == LangEl::NonTerm );
+
+ Production *newDef = Production::cons( loc, prodName,
+ emptyList, String(), false, 0,
+ pd->prodList.length(), prodName->defList.length() );
+
+ prodName->defList.append( newDef );
+ pd->prodList.append( newDef );
+ newDef->predOf = 0;
+
+ /* If the token has the same name as the region it is in, then also
+ * insert it into the symbol map for the parent region. */
+ if ( strcmp( c->name, this->name ) == 0 ) {
+ /* Insert the name into the top of the region stack after popping the
+ * region just created. We need it in the parent. */
+ TypeMapEl *typeMapEl = new TypeMapEl( c->name, prodName );
+ this->parentNamespace->typeMap.insert( typeMapEl );
+ }
+ }
+
+ c->context->lel = lel;
+ lel->contextDef = c->context;
+ lel->objectDef = c->context->contextObjDef;
+ }
+
+ for ( TokenDefListNs::Iter tokenDef = tokenDefList; tokenDef.lte(); tokenDef++ ) {
+ /* Literals already taken care of. */
+ if ( ! tokenDef->isLiteral ) {
+ /* Create the token. */
+ LangEl *tokEl = declareLangEl( pd, this, tokenDef->name, LangEl::Term );
+ tokEl->isIgnore = tokenDef->isIgnore;
+ tokEl->transBlock = tokenDef->codeBlock;
+ tokEl->objectDef = tokenDef->objectDef;
+ tokEl->contextIn = tokenDef->contextIn;
+ tokEl->tokenDef = tokenDef;
+
+ if ( tokenDef->noPreIgnore )
+ tokEl->noPreIgnore = true;
+ if ( tokenDef->noPostIgnore )
+ tokEl->noPostIgnore = true;
+
+ tokenDef->tdLangEl = tokEl;
+
+ if ( tokenDef->isZero ) {
+ /* Setting zero lel to newly created tokEl. */
+ tokenDef->regionSet->collectIgnore->zeroLel = tokEl;
+ tokEl->isZero = true;
+ }
+ }
+ }
+
+ for ( NtDefList::Iter n = ntDefList; n.lte(); n++ ) {
+ /* Get the language element. */
+ LangEl *langEl = declareLangEl( pd, this, n->name, LangEl::NonTerm );
+ //$$->langEl = langEl;
+
+ /* Get the language element. */
+ langEl->objectDef = n->objectDef;
+ langEl->reduceFirst = n->reduceFirst;
+ langEl->contextIn = n->contextIn;
+ langEl->defList.transfer( *n->defList );
+
+ for ( LelDefList::Iter d = langEl->defList; d.lte(); d++ ) {
+ d->prodName = langEl;
+
+ if ( d->redBlock != 0 ) {
+ pd->addProdRedObjectVar( d->redBlock->localFrame, langEl );
+ pd->addProdRHSVars( d->redBlock->localFrame, d->prodElList );
+ }
+
+ /* References to the reduce item. */
+ }
+ }
+
+ for ( TypeAliasList::Iter ta = typeAliasList; ta.lte(); ta++ )
+ declareTypeAlias( pd, this, ta->name, ta->typeRef );
+
+ /* Go into child aliases. */
+ for ( NamespaceVect::Iter c = childNamespaces; c.lte(); c++ )
+ (*c)->declare( pd );
+}
+
+void Compiler::makeIgnoreCollectors()
+{
+ for ( RegionSetList::Iter regionSet = regionSetList; regionSet.lte(); regionSet++ ) {
+ if ( regionSet->collectIgnore->zeroLel == 0 ) {
+ String name( 128, "_ign_%p", regionSet->tokenIgnore );
+ LangEl *zeroLel = new LangEl( rootNamespace, name, LangEl::Term );
+ langEls.append( zeroLel );
+ zeroLel->isZero = true;
+ zeroLel->regionSet = regionSet;
+
+ regionSet->collectIgnore->zeroLel = zeroLel;
+ }
+ }
+}
+
+void LangStmt::chooseDefaultIter( Compiler *pd, IterCall *iterCall ) const
+{
+ /* The iterator name. */
+ LangVarRef *callVarRef = LangVarRef::cons( loc, context, scope, "triter" );
+
+ /* The parameters. */
+ CallArgVect *callExprVect = new CallArgVect;
+ callExprVect->append( new CallArg( iterCall->langExpr ) );
+ iterCall->langTerm = LangTerm::cons( InputLoc(), callVarRef, callExprVect );
+ iterCall->langExpr = 0;
+ iterCall->form = IterCall::IterCallForm;
+}
+
+
+void LangStmt::declareForIter( Compiler *pd ) const
+{
+ if ( iterCall->form != IterCall::IterCallForm )
+ chooseDefaultIter( pd, iterCall );
+
+ objField->typeRef = TypeRef::cons( loc, typeRef, iterCall );
+}
+
+void LangStmt::declare( Compiler *pd ) const
+{
+ switch ( type ) {
+ case PrintType:
+ break;
+ case PrintXMLACType:
+ break;
+ case PrintXMLType:
+ break;
+ case PrintStreamType:
+ break;
+ case ExprType:
+ break;
+ case IfType:
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->declare( pd );
+
+ if ( elsePart != 0 )
+ elsePart->declare( pd );
+ break;
+
+ case ElseType:
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->declare( pd );
+ break;
+ case RejectType:
+ break;
+ case WhileType:
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->declare( pd );
+ break;
+ case AssignType:
+ break;
+ case ForIterType:
+ declareForIter( pd );
+
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->declare( pd );
+ break;
+ case ReturnType:
+ break;
+ case BreakType:
+ break;
+ case YieldType:
+ break;
+ }
+}
+
+void CodeBlock::declare( Compiler *pd ) const
+{
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->declare( pd );
+}
+
+
+void Compiler::declareFunction( Function *func )
+{
+ CodeBlock *block = func->codeBlock;
+ block->declare( this );
+}
+
+void Compiler::declareReductionCode( Production *prod )
+{
+ CodeBlock *block = prod->redBlock;
+ block->declare( this );
+}
+
+void Compiler::declareTranslateBlock( LangEl *langEl )
+{
+ CodeBlock *block = langEl->transBlock;
+
+ /* References to the reduce item. */
+ addMatchLength( block->localFrame, langEl );
+ addMatchText( block->localFrame, langEl );
+ addInput( block->localFrame );
+ addCtx( block->localFrame );
+
+ block->declare( this );
+}
+
+void Compiler::declarePreEof( TokenRegion *region )
+{
+ CodeBlock *block = region->preEofBlock;
+
+ addInput( block->localFrame );
+ addCtx( block->localFrame );
+
+ block->declare( this );
+}
+
+void Compiler::declareRootBlock()
+{
+ CodeBlock *block = rootCodeBlock;
+ block->declare( this );
+}
+
+void Compiler::declareByteCode()
+{
+ for ( FunctionList::Iter f = functionList; f.lte(); f++ )
+ declareFunction( f );
+
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ if ( prod->redBlock != 0 )
+ declareReductionCode( prod );
+ }
+
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->transBlock != 0 )
+ declareTranslateBlock( lel );
+ }
+
+ for ( RegionList::Iter r = regionList; r.lte(); r++ ) {
+ if ( r->preEofBlock != 0 )
+ declarePreEof( r );
+ }
+
+ declareRootBlock( );
+}
+
+void Compiler::makeDefaultIterators()
+{
+ /* Tree iterator. */
+ {
+ UniqueType *anyRefUT = findUniqueType( TYPE_REF, anyLangEl );
+ ObjMethod *objMethod = initFunction( uniqueTypeAny, globalObjectDef,
+ "triter", IN_HALT, IN_HALT, anyRefUT, true );
+
+ IterDef *triter = findIterDef( IterDef::Tree );
+ objMethod->iterDef = triter;
+ }
+
+ /* Child iterator. */
+ {
+ UniqueType *anyRefUT = findUniqueType( TYPE_REF, anyLangEl );
+ ObjMethod *objMethod = initFunction( uniqueTypeAny, globalObjectDef,
+ "child", IN_HALT, IN_HALT, anyRefUT, true );
+
+ IterDef *triter = findIterDef( IterDef::Child );
+ objMethod->iterDef = triter;
+ }
+
+ /* Reverse iterator. */
+ {
+ UniqueType *anyRefUT = findUniqueType( TYPE_REF, anyLangEl );
+ ObjMethod *objMethod = initFunction( uniqueTypeAny, globalObjectDef,
+ "rev_child", IN_HALT, IN_HALT, anyRefUT, true );
+
+ IterDef *triter = findIterDef( IterDef::RevChild );
+ objMethod->iterDef = triter;
+ }
+
+ /* Repeat iterator. */
+ {
+ UniqueType *anyRefUT = findUniqueType( TYPE_REF, anyLangEl );
+ ObjMethod *objMethod = initFunction( uniqueTypeAny, globalObjectDef,
+ "repeat", IN_HALT, IN_HALT, anyRefUT, true );
+
+ IterDef *triter = findIterDef( IterDef::Repeat );
+ objMethod->iterDef = triter;
+ }
+
+ /* Reverse repeat iterator. */
+ {
+ UniqueType *anyRefUT = findUniqueType( TYPE_REF, anyLangEl );
+ ObjMethod *objMethod = initFunction( uniqueTypeAny, globalObjectDef,
+ "rev_repeat", IN_HALT, IN_HALT, anyRefUT, true );
+
+ IterDef *triter = findIterDef( IterDef::RevRepeat );
+ objMethod->iterDef = triter;
+ }
+}
+
+void Compiler::addMatchLength( ObjectDef *frame, LangEl *lel )
+{
+ /* Make the type ref. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeInt );
+
+ /* Create the field and insert it into the map. */
+ ObjectField *el = ObjectField::cons( InputLoc(), typeRef, "match_length" );
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->isConst = true;
+ el->useOffset = false;
+ el->inGetR = IN_GET_MATCH_LENGTH_R;
+ frame->rootScope->insertField( el->name, el );
+}
+
+void Compiler::addMatchText( ObjectDef *frame, LangEl *lel )
+{
+ /* Make the type ref. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStr );
+
+ /* Create the field and insert it into the map. */
+ ObjectField *el = ObjectField::cons( internal, typeRef, "match_text" );
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->isConst = true;
+ el->useOffset = false;
+ el->inGetR = IN_GET_MATCH_TEXT_R;
+ frame->rootScope->insertField( el->name, el );
+}
+
+void Compiler::addInput( ObjectDef *frame )
+{
+ /* Make the type ref. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStream );
+
+ /* Create the field and insert it into the map. */
+ ObjectField *el = ObjectField::cons( internal, typeRef, "input" );
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->isConst = false;
+ el->useOffset = false;
+ el->isCustom = true;
+ el->inGetR = IN_LOAD_INPUT_R;
+ el->inGetWV = IN_LOAD_INPUT_WV;
+ el->inGetWC = IN_LOAD_INPUT_WC;
+ frame->rootScope->insertField( el->name, el );
+}
+
+void Compiler::addCtx( ObjectDef *frame )
+{
+ /* Make the type ref. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStream );
+
+ /* Create the field and insert it into the map. */
+ ObjectField *el = ObjectField::cons( internal, typeRef, "ctx" );
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->isConst = false;
+ el->useOffset = false;
+ el->isCustom = true;
+ el->inGetR = IN_LOAD_CTX_R;
+ el->inGetWV = IN_LOAD_CTX_WV;
+ el->inGetWC = IN_LOAD_CTX_WC;
+ frame->rootScope->insertField( el->name, el );
+}
+
+void Compiler::initIntObject( )
+{
+ intObj = ObjectDef::cons( ObjectDef::BuiltinType, "int", nextObjectId++ );
+ intLangEl->objectDef = intObj;
+
+ initFunction( uniqueTypeStr, intObj, "to_string", IN_INT_TO_STR, IN_INT_TO_STR, true );
+}
+
+void Compiler::initStrObject( )
+{
+ strObj = ObjectDef::cons( ObjectDef::BuiltinType, "str", nextObjectId++ );
+ strLangEl->objectDef = strObj;
+
+ initFunction( uniqueTypeInt, strObj, "atoi", IN_STR_ATOI, IN_STR_ATOI, true );
+ initFunction( uniqueTypeInt, strObj, "uord8", IN_STR_UORD8, IN_STR_UORD8, true );
+ initFunction( uniqueTypeInt, strObj, "sord8", IN_STR_SORD8, IN_STR_SORD8, true );
+ initFunction( uniqueTypeInt, strObj, "uord16", IN_STR_UORD16, IN_STR_UORD16, true );
+ initFunction( uniqueTypeInt, strObj, "sord16", IN_STR_SORD16, IN_STR_SORD16, true );
+ initFunction( uniqueTypeInt, strObj, "uord32", IN_STR_UORD32, IN_STR_UORD32, true );
+ initFunction( uniqueTypeInt, strObj, "sord32", IN_STR_SORD32, IN_STR_SORD32, true );
+ addLengthField( strObj, IN_STR_LENGTH );
+
+ initFunction( uniqueTypeStr, globalObjectDef, "sprintf",
+ IN_SPRINTF, IN_SPRINTF, uniqueTypeStr, uniqueTypeInt, true );
+}
+
+void Compiler::initStreamObject( )
+{
+ streamObj = ObjectDef::cons( ObjectDef::BuiltinType,
+ "stream", nextObjectId++ );
+ streamLangEl->objectDef = streamObj;
+
+ initFunction( uniqueTypeStr, streamObj, "pull",
+ IN_INPUT_PULL_WV, IN_INPUT_PULL_WC, uniqueTypeInt, false );
+ initFunction( uniqueTypeStr, streamObj, "push",
+ IN_INPUT_PUSH_WV, IN_INPUT_PUSH_WV, uniqueTypeAny, false );
+ initFunction( uniqueTypeStr, streamObj, "push_ignore",
+ IN_INPUT_PUSH_IGNORE_WV, IN_INPUT_PUSH_IGNORE_WV, uniqueTypeAny, false );
+}
+
+ObjectField *Compiler::makeDataEl()
+{
+ /* Create the "data" field. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStr );
+ ObjectField *el = ObjectField::cons( internal, typeRef, "data" );
+
+ /* Setting beenReferenced to true prevents us from assigning instructions
+ * and an offset to the field. */
+
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->useOffset = false;
+ el->inGetR = IN_GET_TOKEN_DATA_R;
+ el->inSetWC = IN_SET_TOKEN_DATA_WC;
+ el->inSetWV = IN_SET_TOKEN_DATA_WV;
+ return el;
+}
+
+ObjectField *Compiler::makePosEl()
+{
+ /* Create the "data" field. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeInt );
+ ObjectField *el = ObjectField::cons( internal, typeRef, "pos" );
+
+ /* Setting beenReferenced to true prevents us from assigning instructions
+ * and an offset to the field. */
+
+ el->isConst = true;
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->useOffset = false;
+ el->inGetR = IN_GET_TOKEN_POS_R;
+ return el;
+}
+
+ObjectField *Compiler::makeLineEl()
+{
+ /* Create the "data" field. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeInt );
+ ObjectField *el = ObjectField::cons( internal, typeRef, "line" );
+
+ /* Setting beenReferenced to true prevents us from assigning instructions
+ * and an offset to the field. */
+
+ el->isConst = true;
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->useOffset = false;
+ el->inGetR = IN_GET_TOKEN_LINE_R;
+ return el;
+}
+
+void Compiler::initFieldInstructions( ObjectField *el )
+{
+ el->inGetR = IN_GET_FIELD_R;
+ el->inGetWC = IN_GET_FIELD_WC;
+ el->inGetWV = IN_GET_FIELD_WV;
+ el->inSetWC = IN_SET_FIELD_WC;
+ el->inSetWV = IN_SET_FIELD_WV;
+}
+
+void Compiler::initLocalInstructions( ObjectField *el )
+{
+ el->inGetR = IN_GET_LOCAL_R;
+ el->inGetWC = IN_GET_LOCAL_WC;
+ el->inSetWC = IN_SET_LOCAL_WC;
+}
+
+void Compiler::initLocalRefInstructions( ObjectField *el )
+{
+ el->inGetR = IN_GET_LOCAL_REF_R;
+ el->inGetWC = IN_GET_LOCAL_REF_WC;
+ el->inSetWC = IN_SET_LOCAL_REF_WC;
+}
+
+/* Add a constant length field to the object.
+ * Opcode supplied by the caller. */
+void Compiler::addLengthField( ObjectDef *objDef, Code getLength )
+{
+ /* Create the "length" field. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeInt );
+ ObjectField *el = ObjectField::cons( internal, typeRef, "length" );
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->isConst = true;
+ el->useOffset = false;
+ el->inGetR = getLength;
+
+ objDef->rootScope->insertField( el->name, el );
+}
+
+void Compiler::initTokenObjects( )
+{
+ /* Give all user terminals the token object type. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->type == LangEl::Term ) {
+ if ( lel->objectDef != 0 ) {
+ /* Create the "data" field. */
+ ObjectField *dataEl = makeDataEl();
+ lel->objectDef->rootScope->insertField( dataEl->name, dataEl );
+
+ /* Create the "pos" field. */
+ ObjectField *posEl = makePosEl();
+ lel->objectDef->rootScope->insertField( posEl->name, posEl );
+
+ /* Create the "line" field. */
+ ObjectField *lineEl = makeLineEl();
+ lel->objectDef->rootScope->insertField( lineEl->name, lineEl );
+ }
+ }
+ }
+}
+
+void Compiler::initGlobalFunctions()
+{
+ ObjMethod *method;
+
+ method = initFunction( uniqueTypeStream, globalObjectDef, "open",
+ IN_OPEN_FILE, IN_OPEN_FILE, uniqueTypeStr, uniqueTypeStr, true );
+ method->useCallObj = false;
+
+ method = initFunction( uniqueTypeStr, globalObjectDef, "tolower",
+ IN_TO_LOWER, IN_TO_LOWER, uniqueTypeStr, true );
+ method->useCallObj = false;
+
+ method = initFunction( uniqueTypeStr, globalObjectDef, "toupper",
+ IN_TO_UPPER, IN_TO_UPPER, uniqueTypeStr, true );
+ method->useCallObj = false;
+
+ method = initFunction( uniqueTypeInt, globalObjectDef, "exit",
+ IN_EXIT, IN_EXIT, uniqueTypeInt, true );
+
+ method = initFunction( uniqueTypeInt, globalObjectDef, "system",
+ IN_SYSTEM, IN_SYSTEM, uniqueTypeStr, true );
+
+ addStdin();
+ addStdout();
+ addStderr();
+ addArgv();
+ addError();
+}
+
+void Compiler::addStdin()
+{
+ /* Make the type ref. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStream );
+
+ /* Create the field and insert it into the map. */
+ ObjectField *el = ObjectField::cons( internal, typeRef, "stdin" );
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->isConst = true;
+ el->useOffset = false;
+ el->inGetR = IN_GET_STDIN;
+ el->inGetWC = IN_GET_STDIN;
+ el->inGetWV = IN_GET_STDIN;
+ globalObjectDef->rootScope->insertField( el->name, el );
+}
+
+void Compiler::addStdout()
+{
+ /* Make the type ref. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStream );
+
+ /* Create the field and insert it into the map. */
+ ObjectField *el = ObjectField::cons( internal, typeRef, "stdout" );
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->isConst = true;
+ el->useOffset = false;
+ el->inGetR = IN_GET_STDOUT;
+ el->inGetWC = IN_GET_STDOUT;
+ el->inGetWV = IN_GET_STDOUT;
+ globalObjectDef->rootScope->insertField( el->name, el );
+}
+
+void Compiler::addStderr()
+{
+ /* Make the type ref. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStream );
+
+ /* Create the field and insert it into the map. */
+ ObjectField *el = ObjectField::cons( internal, typeRef, "stderr" );
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->isConst = true;
+ el->useOffset = false;
+ el->inGetR = IN_GET_STDERR;
+ el->inGetWC = IN_GET_STDERR;
+ el->inGetWV = IN_GET_STDERR;
+ globalObjectDef->rootScope->insertField( el->name, el );
+}
+
+void Compiler::addArgv()
+{
+ /* Create the field and insert it into the map. */
+ ObjectField *el = ObjectField::cons( internal, argvTypeRef, "argv" );
+ el->isArgv = true;
+ el->isConst = true;
+ globalObjectDef->rootScope->insertField( el->name, el );
+}
+
+void Compiler::addError()
+{
+ /* Make the type ref. */
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueTypeStr );
+
+ /* Create the field and insert it into the map. */
+ ObjectField *el = ObjectField::cons( internal, typeRef, "error" );
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+ el->isConst = true;
+ el->useOffset = false;
+ el->inGetR = IN_GET_ERROR;
+ el->inGetWC = IN_GET_ERROR;
+ el->inGetWV = IN_GET_ERROR;
+ globalObjectDef->rootScope->insertField( el->name, el );
+}
+
+int Compiler::argvOffset()
+{
+ for ( ObjFieldList::Iter field = *globalObjectDef->objFieldList;
+ field.lte(); field++ )
+ {
+ if ( field->value->isArgv ) {
+ globalObjectDef->referenceField( this, field->value );
+ return field->value->offset;
+ }
+ }
+ assert(false);
+}
+
+void Compiler::initMapFunctions( GenericType *gen )
+{
+ addLengthField( gen->objDef, IN_MAP_LENGTH );
+ initFunction( gen->utArg, gen->objDef, "find",
+ IN_MAP_FIND, IN_MAP_FIND, gen->keyUT, true );
+ initFunction( uniqueTypeInt, gen->objDef, "insert",
+ IN_MAP_INSERT_WV, IN_MAP_INSERT_WC, gen->keyUT, gen->utArg, false );
+ initFunction( uniqueTypeInt, gen->objDef, "store",
+ IN_MAP_STORE_WV, IN_MAP_STORE_WC, gen->keyUT, gen->utArg, false );
+ initFunction( gen->utArg, gen->objDef, "remove",
+ IN_MAP_REMOVE_WV, IN_MAP_REMOVE_WC, gen->keyUT, false );
+}
+
+void Compiler::initListFunctions( GenericType *gen )
+{
+ addLengthField( gen->objDef, IN_LIST_LENGTH );
+
+ initFunction( uniqueTypeInt, gen->objDef, "append",
+ IN_LIST_APPEND_WV, IN_LIST_APPEND_WC, gen->utArg, false );
+ initFunction( uniqueTypeInt, gen->objDef, "push",
+ IN_LIST_APPEND_WV, IN_LIST_APPEND_WC, gen->utArg, false );
+
+ initFunction( gen->utArg, gen->objDef, "remove_end",
+ IN_LIST_REMOVE_END_WV, IN_LIST_REMOVE_END_WC, false );
+ initFunction( gen->utArg, gen->objDef, "pop",
+ IN_LIST_REMOVE_END_WV, IN_LIST_REMOVE_END_WC, false );
+}
+
+void Compiler::initListField( GenericType *gen, const char *name, int offset )
+{
+ /* Make the type ref and create the field. */
+ TypeRef *typeRef = TypeRef::cons( internal, gen->utArg );
+ ObjectField *el = ObjectField::cons( internal, typeRef, name );
+
+ el->inGetR = IN_GET_LIST_MEM_R;
+ el->inGetWC = IN_GET_LIST_MEM_WC;
+ el->inGetWV = IN_GET_LIST_MEM_WV;
+ el->inSetWC = IN_SET_LIST_MEM_WC;
+ el->inSetWV = IN_SET_LIST_MEM_WV;
+
+ gen->objDef->rootScope->insertField( el->name, el );
+
+ el->useOffset = true;
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+
+ /* Zero for head, One for tail. */
+ el->offset = offset;
+}
+
+void Compiler::initListFields( GenericType *gen )
+{
+ initListField( gen, "head", 0 );
+ initListField( gen, "tail", 1 );
+ initListField( gen, "top", 1 );
+}
+
+void Compiler::initVectorFunctions( GenericType *gen )
+{
+ addLengthField( gen->objDef, IN_VECTOR_LENGTH );
+ initFunction( uniqueTypeInt, gen->objDef, "append",
+ IN_VECTOR_APPEND_WV, IN_VECTOR_APPEND_WC, gen->utArg, false );
+ initFunction( uniqueTypeInt, gen->objDef, "insert",
+ IN_VECTOR_INSERT_WV, IN_VECTOR_INSERT_WC, uniqueTypeInt, gen->utArg, false );
+}
+
+void Compiler::initParserFunctions( GenericType *gen )
+{
+ initFunction( gen->utArg, gen->objDef, "finish",
+ IN_PARSE_FINISH_WV, IN_PARSE_FINISH_WC, true );
+
+ initFunction( gen->utArg, gen->objDef, "eof",
+ IN_PARSE_FINISH_WV, IN_PARSE_FINISH_WC, true );
+}
+
+void Compiler::initParserField( GenericType *gen, const char *name, int offset, TypeRef *typeRef )
+{
+ /* Make the type ref and create the field. */
+ ObjectField *el = ObjectField::cons( internal, typeRef, name );
+
+ el->inGetR = IN_GET_PARSER_MEM_R;
+ el->inGetWC = IN_GET_PARSER_MEM_WC;
+ el->inGetWV = IN_GET_PARSER_MEM_WV;
+ el->inSetWC = IN_SET_PARSER_MEM_WC;
+ el->inSetWV = IN_SET_PARSER_MEM_WV;
+
+ gen->objDef->rootScope->insertField( el->name, el );
+
+ el->useOffset = true;
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+
+ /* Zero for head, One for tail. */
+ el->offset = offset;
+}
+
+void Compiler::initCtxField( GenericType *gen )
+{
+ LangEl *langEl = gen->utArg->langEl;
+ Context *context = langEl->contextIn;
+
+ /* Make the type ref and create the field. */
+ UniqueType *ctxUT = findUniqueType( TYPE_TREE, context->lel );
+ TypeRef *typeRef = TypeRef::cons( internal, ctxUT );
+ ObjectField *el = ObjectField::cons( internal, typeRef, "ctx" );
+
+ el->inGetR = IN_GET_PARSER_CTX_R;
+ el->inGetWC = IN_GET_PARSER_CTX_WC;
+ el->inGetWV = IN_GET_PARSER_CTX_WV;
+ el->inSetWC = IN_SET_PARSER_CTX_WC;
+ el->inSetWV = IN_SET_PARSER_CTX_WV;
+
+ gen->objDef->rootScope->insertField( el->name, el );
+
+ el->useOffset = false;
+ el->beenReferenced = true;
+ el->beenInitialized = true;
+}
+
+void Compiler::initParserFields( GenericType *gen )
+{
+ LangEl *langEl = gen->utArg->langEl;
+ if ( langEl->contextIn != 0 )
+ initCtxField( gen );
+
+ TypeRef *typeRef;
+
+ typeRef = TypeRef::cons( internal, gen->utArg );
+ initParserField( gen, "tree", 0, typeRef );
+
+ typeRef = TypeRef::cons( internal, uniqueTypeStr );
+ initParserField( gen, "error", 1, typeRef );
+}
+
+void Compiler::makeFuncVisible( Function *func, bool isUserIter )
+{
+ func->localFrame = func->codeBlock->localFrame;
+
+ /* Set up the parameters. */
+ long paramPos = 0;
+ for ( ParameterList::Iter param = *func->paramList; param.lte(); param++ ) {
+ if ( func->localFrame->rootScope->findField( param->name ) != 0 )
+ error(param->loc) << "parameter " << param->name << " redeclared" << endp;
+
+ func->localFrame->rootScope->insertField( param->name, param );
+ param->beenInitialized = true;
+ param->pos = paramPos;
+
+ paramPos += 1;
+ }
+
+ /* Insert the function into the global function map. */
+ ObjMethod *objMethod = new ObjMethod( func->typeRef, func->name,
+ IN_CALL_WV, IN_CALL_WC,
+ func->paramList->length(), 0, func->paramList, false );
+ objMethod->funcId = func->funcId;
+ objMethod->useFuncId = true;
+ objMethod->useCallObj = false;
+ objMethod->func = func;
+
+ if ( isUserIter ) {
+ IterDef *uiter = findIterDef( IterDef::User, func );
+ objMethod->iterDef = uiter;
+ }
+
+ globalObjectDef->objMethodMap->insert( func->name, objMethod );
+
+ func->objMethod = objMethod;
+}
+
+/*
+ * Type Declaration Root.
+ */
+void Compiler::declarePass()
+{
+ declareReVars();
+
+ makeDefaultIterators();
+
+ for ( FunctionList::Iter f = functionList; f.lte(); f++ )
+ makeFuncVisible( f, f->isUserIter );
+
+ rootNamespace->declare( this );
+
+ /* Will fill in zero lels that were not declared. */
+ makeIgnoreCollectors();
+
+ declareByteCode();
+
+ initIntObject();
+ initStrObject();
+ initStreamObject();
+ initTokenObjects();
+ initGlobalFunctions();
+
+ /* Fill any empty scanners with a default token. */
+ initEmptyScanners();
+}
diff --git a/src/defs.h b/src/defs.h
new file mode 100644
index 0000000..95a4c2c
--- /dev/null
+++ b/src/defs.h
@@ -0,0 +1,31 @@
+/* src/defs.h. Generated from defs.h.in by configure. */
+/*
+ * Copyright 2001 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Ragel.
+ *
+ * Ragel 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.
+ *
+ * Ragel 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 Ragel; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _CONFIG_H
+#define _CONFIG_H
+
+/* Configuration */
+
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 8
+
+#endif /* _CONFIG_H */
diff --git a/src/defs.h.in b/src/defs.h.in
new file mode 100644
index 0000000..4281536
--- /dev/null
+++ b/src/defs.h.in
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2001 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Ragel.
+ *
+ * Ragel 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.
+ *
+ * Ragel 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 Ragel; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _CONFIG_H
+#define _CONFIG_H
+
+/* Configuration */
+
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+#endif /* _CONFIG_H */
diff --git a/src/dotgen.cc b/src/dotgen.cc
new file mode 100644
index 0000000..e207805
--- /dev/null
+++ b/src/dotgen.cc
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#include "global.h"
+#include "parsedata.h"
+
+using namespace std;
+
+
+void Compiler::writeTransList( PdaState *state )
+{
+ ostream &out = *outStream;
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ /* Write out the from and to states. */
+ out << "\t" << state->stateNum << " -> " << trans->value->toState->stateNum;
+
+ /* Begin the label. */
+ out << " [ label = \"";
+ long key = trans->key;
+ LangEl *lel = langElIndex[key];
+ if ( lel != 0 )
+ out << lel->name;
+ else
+ out << (char)key;
+
+ if ( trans->value->actions.length() > 0 ) {
+ out << " / ";
+ for ( ActDataList::Iter act = trans->value->actions; act.lte(); act++ ) {
+ switch ( *act & 0x3 ) {
+ case 1:
+ out << "S(" << trans->value->actOrds[act.pos()] << ")";
+ break;
+ case 2: {
+ out << "R(" << prodIdIndex[(*act >> 2)]->data <<
+ ", " << trans->value->actOrds[act.pos()] << ")";
+ break;
+ }
+ case 3: {
+ out << "SR(" << prodIdIndex[(*act >> 2)]->data <<
+ ", " << trans->value->actOrds[act.pos()] << ")";
+ break;
+ }}
+ if ( ! act.last() )
+ out << ", ";
+ }
+ }
+
+ out << "\" ];\n";
+ }
+}
+
+void Compiler::writeDotFile( PdaGraph *graph )
+{
+ ostream &out = *outStream;
+ out <<
+ "digraph " << parserName << " {\n"
+ " rankdir=LR;\n"
+ " ranksep=\"0\"\n"
+ " nodesep=\"0.25\"\n"
+ "\n";
+
+ /* Define the psuedo states. Transitions will be done after the states
+ * have been defined as either final or not final. */
+ out <<
+ " node [ shape = point ];\n";
+
+ for ( int i = 0; i < graph->entryStateSet.length(); i++ )
+ out << "\tENTRY" << i << " [ label = \"\" ];\n";
+
+ out <<
+ "\n"
+ " node [ shape = circle, fixedsize = true, height = 0.6 ];\n";
+
+ /* Walk the states. */
+ for ( PdaStateList::Iter st = graph->stateList; st.lte(); st++ )
+ out << " " << st->stateNum << " [ label = \"" << st->stateNum << "\" ];\n";
+
+ out << "\n";
+
+ /* Walk the states. */
+ for ( PdaStateList::Iter st = graph->stateList; st.lte(); st++ )
+ writeTransList( st );
+
+ /* Start state and other entry points. */
+ for ( PdaStateSet::Iter st = graph->entryStateSet; st.lte(); st++ )
+ out << "\tENTRY" << st.pos() << " -> " << (*st)->stateNum << " [ label = \"\" ];\n";
+
+ out <<
+ "}\n";
+}
+
+void Compiler::writeDotFile()
+{
+ writeDotFile( pdaGraph );
+}
+
diff --git a/src/dotgen.h b/src/dotgen.h
new file mode 100644
index 0000000..d05a241
--- /dev/null
+++ b/src/dotgen.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2001-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _GVDOTGEN_H
+#define _GVDOTGEN_H
+
+#include <iostream>
+
+#if 0
+
+class GraphvizDotGen : public CodeGenData
+{
+public:
+ GraphvizDotGen( ostream &out ) : CodeGenData(out) { }
+
+ /* Print an fsm to out stream. */
+ void writeTransList( RedState *state );
+ void writeDotFile( );
+
+ virtual void finishRagelDef();
+
+private:
+ /* Writing labels and actions. */
+ std::ostream &ONCHAR( Key lowKey, Key highKey );
+ std::ostream &TRANS_ACTION( RedState *fromState, RedTrans *trans );
+ std::ostream &ACTION( RedAction *action );
+ std::ostream &KEY( Key key );
+};
+
+#endif
+
+
+#endif /* _GVDOTGEN_H */
diff --git a/src/exports.cc b/src/exports.cc
new file mode 100644
index 0000000..62e0d2a
--- /dev/null
+++ b/src/exports.cc
@@ -0,0 +1,316 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "parsedata.h"
+#include "fsmcodegen.h"
+#include "redfsm.h"
+#include "bstmap.h"
+#include "debug.h"
+#include <sstream>
+#include <string>
+
+using std::ostream;
+using std::ostringstream;
+using std::string;
+using std::cerr;
+using std::endl;
+
+void Compiler::openNameSpace( ostream &out, Namespace *nspace )
+{
+ if ( nspace == rootNamespace )
+ return;
+
+ openNameSpace( out, nspace->parentNamespace );
+ out << "namespace " << nspace->name << " { ";
+}
+
+void Compiler::closeNameSpace( ostream &out, Namespace *nspace )
+{
+ if ( nspace == rootNamespace )
+ return;
+
+ openNameSpace( out, nspace->parentNamespace );
+ out << " }";
+}
+
+void Compiler::generateExports()
+{
+ ostream &out = *outStream;
+
+ out <<
+ "#ifndef _EXPORTS_H\n"
+ "#define _EXPORTS_H\n"
+ "\n"
+ "#include <colm/colm.h>\n"
+ "#include <string>\n"
+ "\n";
+
+ out <<
+ "inline void appendString( colm_print_args *args, const char *data, int length )\n"
+ "{\n"
+ " std::string *str = (std::string*)args->arg;\n"
+ " *str += std::string( data, length );\n"
+ "}\n"
+ "\n";
+
+ out <<
+ "inline std::string printTreeStr( colm_program *prg, colm_tree *tree, bool trim )\n"
+ "{\n"
+ " std::string str;\n"
+ " colm_print_args printArgs = { &str, 1, 0, trim, &appendString, \n"
+ " &colm_print_null, &colm_print_term_tree, &colm_print_null };\n"
+ " colm_print_tree_args( prg, colm_vm_root(prg), &printArgs, tree );\n"
+ " return str;\n"
+ "}\n"
+ "\n";
+
+ /* Declare. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->isEOF )
+ continue;
+
+ openNameSpace( out, lel->nspace );
+ out << "struct " << lel->fullName << ";";
+ closeNameSpace( out, lel->nspace );
+ out << "\n";
+ }
+
+ /* Class definitions. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->isEOF )
+ continue;
+
+ openNameSpace( out, lel->nspace );
+ out << "struct " << lel->fullName << "\n";
+ out << "{\n";
+ out << " std::string text() { return printTreeStr( __prg, __tree, true ); }\n";
+ out << " colm_location *loc() { return colm_find_location( __prg, __tree ); }\n";
+ out << " std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }\n";
+ out << " std::string text_ws() { return printTreeStr( __prg, __tree, false ); }\n";
+ out << " colm_data *data() { return __tree->tokdata; }\n";
+ out << " operator colm_tree *() { return __tree; }\n";
+ out << " colm_program *__prg;\n";
+ out << " colm_tree *__tree;\n";
+
+ if ( mainReturnUT != 0 && mainReturnUT->langEl == lel ) {
+ out << " " << lel->fullName <<
+ "( colm_program *prg ) : __prg(prg), __tree(returnVal(prg)) {}\n";
+ }
+
+ out << " " << lel->fullName <<
+ "( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}\n";
+
+ if ( lel->objectDef != 0 && lel->objectDef->objFieldList != 0 ) {
+ ObjFieldList *objFieldList = lel->objectDef->objFieldList;
+ for ( ObjFieldList::Iter ofi = *objFieldList; ofi.lte(); ofi++ ) {
+ ObjectField *field = ofi->value;
+ if ( field->useOffset && field->typeRef != 0 ) {
+ UniqueType *ut = field->typeRef->resolveType( this );
+
+ if ( ut != 0 && ut->typeId == TYPE_TREE ) {
+ out << " " << ut->langEl->refName << " " << field->name << "();\n";
+ }
+ }
+
+ if ( field->isRhsGet ) {
+ UniqueType *ut = field->typeRef->resolveType( this );
+
+ if ( ut != 0 && ut->typeId == TYPE_TREE ) {
+ out << " " << ut->langEl->refName << " " << field->name << "();\n";
+ }
+ }
+ }
+ }
+
+ bool prodNames = false;
+ for ( LelDefList::Iter prod = lel->defList; prod.lte(); prod++ ) {
+ if ( prod->name.length() > 0 )
+ prodNames = true;
+ }
+
+ if ( prodNames ) {
+ out << " enum prod_name {\n";
+ for ( LelDefList::Iter prod = lel->defList; prod.lte(); prod++ ) {
+ if ( prod->name.length() > 0 )
+ out << "\t\t_" << prod->name << " = " << prod->prodNum << ",\n";
+ }
+ out << " };\n";
+ out << " enum prod_name prodName() " <<
+ "{ return (enum prod_name)__tree->prodNum; }\n";
+ }
+
+
+ if ( lel->isRepeat ) {
+ out << " " << "int end() { return colm_repeat_end( __tree ); }\n";
+ out << " " << lel->refName << " next();\n";
+ out << " " << lel->repeatOf->refName << " value();\n";
+ }
+
+ if ( lel->isList ) {
+ out << " " << "int last() { return colm_list_last( __tree ); }\n";
+ out << " " << lel->refName << " next();\n";
+ out << " " << lel->repeatOf->refName << " value();\n";
+ }
+
+
+ out << "};";
+ closeNameSpace( out, lel->nspace );
+ out << "\n";
+ }
+
+ for ( ObjFieldList::Iter of = *globalObjectDef->objFieldList; of.lte(); of++ ) {
+ ObjectField *field = of->value;
+ if ( field->isExport ) {
+ UniqueType *ut = field->typeRef->resolveType(this);
+ if ( ut != 0 && ut->typeId == TYPE_TREE ) {
+ out << ut->langEl->refName << " " << field->name << "( colm_program *prg );\n";
+ }
+ }
+ }
+
+ out << "\n";
+
+ for ( FunctionList::Iter func = functionList; func.lte(); func++ ) {
+ if ( func->exprt ) {
+ char *refName = func->typeRef->uniqueType->langEl->refName;
+ int paramCount = func->paramList->length();
+ out <<
+ refName << " " << func->name << "( colm_program *prg";
+
+ for ( int p = 0; p < paramCount; p++ )
+ out << ", const char *p" << p;
+
+ out << " );\n";
+ }
+ }
+
+ out << "#endif\n";
+}
+
+void Compiler::generateExportsImpl()
+{
+ ostream &out = *outStream;
+
+ if ( exportHeaderFn != 0 ) {
+ out << "#include \"" << exportHeaderFn << "\"\n";
+ }
+
+ /* Function implementations. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->objectDef != 0 && lel->objectDef->objFieldList != 0 ) {
+ ObjFieldList *objFieldList = lel->objectDef->objFieldList;
+ for ( ObjFieldList::Iter ofi = *objFieldList; ofi.lte(); ofi++ ) {
+ ObjectField *field = ofi->value;
+ if ( field->useOffset && field->typeRef != 0 ) {
+ UniqueType *ut = field->typeRef->resolveType( this );
+
+ if ( ut != 0 && ut->typeId == TYPE_TREE ) {
+ out << ut->langEl->refName << " " << lel->declName << "::" << field->name <<
+ "() { return " << ut->langEl->refName <<
+ "( __prg, colm_get_attr( __tree, " << field->offset << ") ); }\n";
+ }
+ }
+
+ if ( field->isRhsGet ) {
+ UniqueType *ut = field->typeRef->resolveType( this );
+
+ if ( ut != 0 && ut->typeId == TYPE_TREE ) {
+ out << ut->langEl->refName << " " << lel->declName << "::" << field->name <<
+ "() { static int a[] = {";
+
+ /* Need to place the array computing the val. */
+ out << field->rhsVal.length();
+ for ( Vector<RhsVal>::Iter rg = field->rhsVal; rg.lte(); rg++ ) {
+ out << ", " << rg->prodEl->production->prodNum;
+ out << ", " << rg->prodEl->pos;
+ }
+
+ out << "}; return " << ut->langEl->refName <<
+ "( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }\n";
+ }
+ }
+ }
+ }
+
+ if ( lel->isRepeat ) {
+ out << lel->refName << " " << lel->declName << "::" << " next"
+ "() { return " << lel->refName <<
+ "( __prg, colm_get_repeat_next( __tree ) ); }\n";
+
+ out << lel->repeatOf->refName << " " << lel->declName << "::" << " value"
+ "() { return " << lel->repeatOf->refName <<
+ "( __prg, colm_get_repeat_val( __tree ) ); }\n";
+
+ }
+
+ if ( lel->isList ) {
+ out << lel->refName << " " << lel->declName << "::" << " next"
+ "() { return " << lel->refName <<
+ "( __prg, colm_get_repeat_next( __tree ) ); }\n";
+
+ out << lel->repeatOf->refName << " " << lel->declName << "::" << " value"
+ "() { return " << lel->repeatOf->refName <<
+ "( __prg, colm_get_repeat_val( __tree ) ); }\n";
+ }
+ }
+
+ out << "\n";
+
+ for ( ObjFieldList::Iter of = *globalObjectDef->objFieldList; of.lte(); of++ ) {
+ ObjectField *field = of->value;
+ if ( field->isExport ) {
+ UniqueType *ut = field->typeRef->resolveType(this);
+ if ( ut != 0 && ut->typeId == TYPE_TREE ) {
+ out <<
+ ut->langEl->refName << " " << field->name << "( colm_program *prg )\n"
+ "{ return " << ut->langEl->refName << "( prg, colm_get_global( prg, " <<
+ field->offset << ") ); }\n";
+ }
+ }
+ }
+
+ out << "\n";
+
+ for ( FunctionList::Iter func = functionList; func.lte(); func++ ) {
+ if ( func->exprt ) {
+ char *refName = func->typeRef->uniqueType->langEl->refName;
+ int paramCount = func->paramList->length();
+ out <<
+ refName << " " << func->name << "( colm_program *prg";
+
+ for ( int p = 0; p < paramCount; p++ )
+ out << ", const char *p" << p;
+
+ out << " )\n"
+ "{\n"
+ " int funcId = " << func->funcId << ";\n"
+ " const char *params[" << paramCount << "];\n";
+
+ for ( int p = 0; p < paramCount; p++ )
+ out << " params[" << p << "] = p" << p << ";\n";
+
+ out <<
+ " return " << refName <<
+ "( prg, colm_run_func( prg, funcId, params, " << paramCount << " ));\n"
+ "}\n";
+ }
+ }
+}
diff --git a/src/fsmap.cc b/src/fsmap.cc
new file mode 100644
index 0000000..cd95561
--- /dev/null
+++ b/src/fsmap.cc
@@ -0,0 +1,804 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "config.h"
+#include "defs.h"
+#include "fsmgraph.h"
+#include <iostream>
+
+using std::cerr;
+using std::endl;
+
+KeyOps *keyOps = 0;
+
+/* Insert an action into an action table. */
+void ActionTable::setAction( int ordering, Action *action )
+{
+ /* Multi-insert in case specific instances of an action appear in a
+ * transition more than once. */
+ insertMulti( ordering, action );
+}
+
+/* Set all the action from another action table in this table. */
+void ActionTable::setActions( const ActionTable &other )
+{
+ for ( ActionTable::Iter action = other; action.lte(); action++ )
+ insertMulti( action->key, action->value );
+}
+
+void ActionTable::setActions( int *orderings, Action **actions, int nActs )
+{
+ for ( int a = 0; a < nActs; a++ )
+ insertMulti( orderings[a], actions[a] );
+}
+
+bool ActionTable::hasAction( Action *action )
+{
+ for ( int a = 0; a < length(); a++ ) {
+ if ( data[a].value == action )
+ return true;
+ }
+ return false;
+}
+
+/* Insert an action into an action table. */
+void LmActionTable::setAction( int ordering, TokenInstance *action )
+{
+ /* Multi-insert in case specific instances of an action appear in a
+ * transition more than once. */
+ insertMulti( ordering, action );
+}
+
+/* Set all the action from another action table in this table. */
+void LmActionTable::setActions( const LmActionTable &other )
+{
+ for ( LmActionTable::Iter action = other; action.lte(); action++ )
+ insertMulti( action->key, action->value );
+}
+
+void ErrActionTable::setAction( int ordering, Action *action, int transferPoint )
+{
+ insertMulti( ErrActionTableEl( action, ordering, transferPoint ) );
+}
+
+void ErrActionTable::setActions( const ErrActionTable &other )
+{
+ for ( ErrActionTable::Iter act = other; act.lte(); act++ )
+ insertMulti( ErrActionTableEl( act->action, act->ordering, act->transferPoint ) );
+}
+
+/* Insert a priority into this priority table. Looks out for priorities on
+ * duplicate keys. */
+void PriorTable::setPrior( int ordering, PriorDesc *desc )
+{
+ PriorEl *lastHit = 0;
+ PriorEl *insed = insert( PriorEl(ordering, desc), &lastHit );
+ if ( insed == 0 ) {
+ /* This already has a priority on the same key as desc. Overwrite the
+ * priority if the ordering is larger (later in time). */
+ if ( ordering >= lastHit->ordering )
+ *lastHit = PriorEl( ordering, desc );
+ }
+}
+
+/* Set all the priorities from a priorTable in this table. */
+void PriorTable::setPriors( const PriorTable &other )
+{
+ /* Loop src priorities once to overwrite duplicates. */
+ PriorTable::Iter priorIt = other;
+ for ( ; priorIt.lte(); priorIt++ )
+ setPrior( priorIt->ordering, priorIt->desc );
+}
+
+/* Set the priority of starting transitions. Isolates the start state so it has
+ * no other entry points, then sets the priorities of all the transitions out
+ * of the start state. If the start state is final, then the outPrior of the
+ * start state is also set. The idea is that a machine that accepts the null
+ * string can still specify the starting trans prior for when it accepts the
+ * null word. */
+void FsmGraph::startFsmPrior( int ordering, PriorDesc *prior )
+{
+ /* Make sure the start state has no other entry points. */
+ isolateStartState();
+
+ /* Walk all transitions out of the start state. */
+ for ( TransList::Iter trans = startState->outList; trans.lte(); trans++ ) {
+ if ( trans->toState != 0 )
+ trans->priorTable.setPrior( ordering, prior );
+ }
+}
+
+/* Set the priority of all transitions in a graph. Walks all transition lists
+ * and all def transitions. */
+void FsmGraph::allTransPrior( int ordering, PriorDesc *prior )
+{
+ /* Walk the list of all states. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ /* Walk the out list of the state. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+ if ( trans->toState != 0 )
+ trans->priorTable.setPrior( ordering, prior );
+ }
+ }
+}
+
+/* Set the priority of all transitions that go into a final state. Note that if
+ * any entry states are final, we will not be setting the priority of any
+ * transitions that may go into those states in the future. The graph does not
+ * support pending in transitions in the same way pending out transitions are
+ * supported. */
+void FsmGraph::finishFsmPrior( int ordering, PriorDesc *prior )
+{
+ /* Walk all final states. */
+ for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) {
+ /* Walk all in transitions of the final state. */
+ for ( TransInList::Iter trans = (*state)->inList; trans.lte(); trans++ )
+ trans->priorTable.setPrior( ordering, prior );
+ }
+}
+
+/* Set the priority of any future out transitions that may be made going out of
+ * this state machine. */
+void FsmGraph::leaveFsmPrior( int ordering, PriorDesc *prior )
+{
+ /* Set priority in all final states. */
+ for ( StateSet::Iter state = finStateSet; state.lte(); state++ )
+ (*state)->outPriorTable.setPrior( ordering, prior );
+}
+
+
+/* Set actions to execute on starting transitions. Isolates the start state
+ * so it has no other entry points, then adds to the transition functions
+ * of all the transitions out of the start state. If the start state is final,
+ * then the func is also added to the start state's out func list. The idea is
+ * that a machine that accepts the null string can execute a start func when it
+ * matches the null word, which can only be done when leaving the start/final
+ * state. */
+void FsmGraph::startFsmAction( int ordering, Action *action )
+{
+ /* Make sure the start state has no other entry points. */
+ isolateStartState();
+
+ /* Walk the start state's transitions, setting functions. */
+ for ( TransList::Iter trans = startState->outList; trans.lte(); trans++ ) {
+ if ( trans->toState != 0 )
+ trans->actionTable.setAction( ordering, action );
+ }
+}
+
+/* Set functions to execute on all transitions. Walks the out lists of all
+ * states. */
+void FsmGraph::allTransAction( int ordering, Action *action )
+{
+ /* Walk all states. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ /* Walk the out list of the state. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+ if ( trans->toState != 0 )
+ trans->actionTable.setAction( ordering, action );
+ }
+ }
+}
+
+/* Specify functions to execute upon entering final states. If the start state
+ * is final we can't really specify a function to execute upon entering that
+ * final state the first time. So function really means whenever entering a
+ * final state from within the same fsm. */
+void FsmGraph::finishFsmAction( int ordering, Action *action )
+{
+ /* Walk all final states. */
+ for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) {
+ /* Walk the final state's in list. */
+ for ( TransInList::Iter trans = (*state)->inList; trans.lte(); trans++ )
+ trans->actionTable.setAction( ordering, action );
+ }
+}
+
+/* Add functions to any future out transitions that may be made going out of
+ * this state machine. */
+void FsmGraph::leaveFsmAction( int ordering, Action *action )
+{
+ /* Insert the action in the outActionTable of all final states. */
+ for ( StateSet::Iter state = finStateSet; state.lte(); state++ )
+ (*state)->outActionTable.setAction( ordering, action );
+}
+
+/* Add functions to the longest match action table for constructing scanners. */
+void FsmGraph::longMatchAction( int ordering, TokenInstance *lmPart )
+{
+ /* Walk all final states. */
+ for ( StateSet::Iter state = finStateSet; state.lte(); state++ ) {
+ /* Walk the final state's in list. */
+ for ( TransInList::Iter trans = (*state)->inList; trans.lte(); trans++ )
+ trans->lmActionTable.setAction( ordering, lmPart );
+ }
+}
+
+void FsmGraph::fillGaps( FsmState *state )
+{
+ if ( state->outList.length() == 0 ) {
+ /* Add the range on the lower and upper bound. */
+ attachNewTrans( state, 0, keyOps->minKey, keyOps->maxKey );
+ }
+ else {
+ TransList srcList;
+ srcList.transfer( state->outList );
+
+ /* Check for a gap at the beginning. */
+ TransList::Iter trans = srcList, next;
+ if ( keyOps->minKey < trans->lowKey ) {
+ /* Make the high key and append. */
+ Key highKey = trans->lowKey;
+ highKey.decrement();
+
+ attachNewTrans( state, 0, keyOps->minKey, highKey );
+ }
+
+ /* Write the transition. */
+ next = trans.next();
+ state->outList.append( trans );
+
+ /* Keep the last high end. */
+ Key lastHigh = trans->highKey;
+
+ /* Loop each source range. */
+ for ( trans = next; trans.lte(); trans = next ) {
+ /* Make the next key following the last range. */
+ Key nextKey = lastHigh;
+ nextKey.increment();
+
+ /* Check for a gap from last up to here. */
+ if ( nextKey < trans->lowKey ) {
+ /* Make the high end of the range that fills the gap. */
+ Key highKey = trans->lowKey;
+ highKey.decrement();
+
+ attachNewTrans( state, 0, nextKey, highKey );
+ }
+
+ /* Reduce the transition. If it reduced to anything then add it. */
+ next = trans.next();
+ state->outList.append( trans );
+
+ /* Keep the last high end. */
+ lastHigh = trans->highKey;
+ }
+
+ /* Now check for a gap on the end to fill. */
+ if ( lastHigh < keyOps->maxKey ) {
+ /* Get a copy of the default. */
+ lastHigh.increment();
+
+ attachNewTrans( state, 0, lastHigh, keyOps->maxKey );
+ }
+ }
+}
+
+void FsmGraph::setErrorAction( FsmState *state, int ordering, Action *action )
+{
+ /* Fill any gaps in the out list with an error transition. */
+ fillGaps( state );
+
+ /* Set error transitions in the transitions that go to error. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+ if ( trans->toState == 0 )
+ trans->actionTable.setAction( ordering, action );
+ }
+}
+
+void FsmGraph::setErrorActions( FsmState *state, const ActionTable &other )
+{
+ /* Fill any gaps in the out list with an error transition. */
+ fillGaps( state );
+
+ /* Set error transitions in the transitions that go to error. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+ if ( trans->toState == 0 )
+ trans->actionTable.setActions( other );
+ }
+}
+
+
+/* Give a target state for error transitions. */
+void FsmGraph::setErrorTarget( FsmState *state, FsmState *target, int *orderings,
+ Action **actions, int nActs )
+{
+ /* Fill any gaps in the out list with an error transition. */
+ fillGaps( state );
+
+ /* Set error target in the transitions that go to error. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+ if ( trans->toState == 0 ) {
+ /* The trans goes to error, redirect it. */
+ redirectErrorTrans( trans->fromState, target, trans );
+ trans->actionTable.setActions( orderings, actions, nActs );
+ }
+ }
+}
+
+void FsmGraph::transferErrorActions( FsmState *state, int transferPoint )
+{
+ for ( int i = 0; i < state->errActionTable.length(); ) {
+ ErrActionTableEl *act = state->errActionTable.data + i;
+ if ( act->transferPoint == transferPoint ) {
+ /* Transfer the error action and remove it. */
+ setErrorAction( state, act->ordering, act->action );
+ state->errActionTable.vremove( i );
+ }
+ else {
+ /* Not transfering and deleting, skip over the item. */
+ i += 1;
+ }
+ }
+}
+
+/* Set error actions in the start state. */
+void FsmGraph::startErrorAction( int ordering, Action *action, int transferPoint )
+{
+ /* Make sure the start state has no other entry points. */
+ isolateStartState();
+
+ /* Add the actions. */
+ startState->errActionTable.setAction( ordering, action, transferPoint );
+}
+
+/* Set error actions in all states where there is a transition out. */
+void FsmGraph::allErrorAction( int ordering, Action *action, int transferPoint )
+{
+ /* Insert actions in the error action table of all states. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ )
+ state->errActionTable.setAction( ordering, action, transferPoint );
+}
+
+/* Set error actions in final states. */
+void FsmGraph::finalErrorAction( int ordering, Action *action, int transferPoint )
+{
+ /* Add the action to the error table of final states. */
+ for ( StateSet::Iter state = finStateSet; state.lte(); state++ )
+ (*state)->errActionTable.setAction( ordering, action, transferPoint );
+}
+
+void FsmGraph::notStartErrorAction( int ordering, Action *action, int transferPoint )
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( state != startState )
+ state->errActionTable.setAction( ordering, action, transferPoint );
+ }
+}
+
+void FsmGraph::notFinalErrorAction( int ordering, Action *action, int transferPoint )
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( ! state->isFinState() )
+ state->errActionTable.setAction( ordering, action, transferPoint );
+ }
+}
+
+/* Set error actions in the states that have transitions into a final state. */
+void FsmGraph::middleErrorAction( int ordering, Action *action, int transferPoint )
+{
+ /* Isolate the start state in case it is reachable from in inside the
+ * machine, in which case we don't want it set. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( state != startState && ! state->isFinState() )
+ state->errActionTable.setAction( ordering, action, transferPoint );
+ }
+}
+
+/* Set EOF actions in the start state. */
+void FsmGraph::startEOFAction( int ordering, Action *action )
+{
+ /* Make sure the start state has no other entry points. */
+ isolateStartState();
+
+ /* Add the actions. */
+ startState->eofActionTable.setAction( ordering, action );
+}
+
+/* Set EOF actions in all states where there is a transition out. */
+void FsmGraph::allEOFAction( int ordering, Action *action )
+{
+ /* Insert actions in the EOF action table of all states. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ )
+ state->eofActionTable.setAction( ordering, action );
+}
+
+/* Set EOF actions in final states. */
+void FsmGraph::finalEOFAction( int ordering, Action *action )
+{
+ /* Add the action to the error table of final states. */
+ for ( StateSet::Iter state = finStateSet; state.lte(); state++ )
+ (*state)->eofActionTable.setAction( ordering, action );
+}
+
+void FsmGraph::notStartEOFAction( int ordering, Action *action )
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( state != startState )
+ state->eofActionTable.setAction( ordering, action );
+ }
+}
+
+void FsmGraph::notFinalEOFAction( int ordering, Action *action )
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( ! state->isFinState() )
+ state->eofActionTable.setAction( ordering, action );
+ }
+}
+
+/* Set EOF actions in the states that have transitions into a final state. */
+void FsmGraph::middleEOFAction( int ordering, Action *action )
+{
+ /* Set the actions in all states that are not the start state and not final. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( state != startState && ! state->isFinState() )
+ state->eofActionTable.setAction( ordering, action );
+ }
+}
+
+/*
+ * Set To State Actions.
+ */
+
+/* Set to state actions in the start state. */
+void FsmGraph::startToStateAction( int ordering, Action *action )
+{
+ /* Make sure the start state has no other entry points. */
+ isolateStartState();
+ startState->toStateActionTable.setAction( ordering, action );
+}
+
+/* Set to state actions in all states. */
+void FsmGraph::allToStateAction( int ordering, Action *action )
+{
+ /* Insert the action on all states. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ )
+ state->toStateActionTable.setAction( ordering, action );
+}
+
+/* Set to state actions in final states. */
+void FsmGraph::finalToStateAction( int ordering, Action *action )
+{
+ /* Add the action to the error table of final states. */
+ for ( StateSet::Iter state = finStateSet; state.lte(); state++ )
+ (*state)->toStateActionTable.setAction( ordering, action );
+}
+
+void FsmGraph::notStartToStateAction( int ordering, Action *action )
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( state != startState )
+ state->toStateActionTable.setAction( ordering, action );
+ }
+}
+
+void FsmGraph::notFinalToStateAction( int ordering, Action *action )
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( ! state->isFinState() )
+ state->toStateActionTable.setAction( ordering, action );
+ }
+}
+
+/* Set to state actions in states that are not final and not the start state. */
+void FsmGraph::middleToStateAction( int ordering, Action *action )
+{
+ /* Set the action in all states that are not the start state and not final. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( state != startState && ! state->isFinState() )
+ state->toStateActionTable.setAction( ordering, action );
+ }
+}
+
+/*
+ * Set From State Actions.
+ */
+
+void FsmGraph::startFromStateAction( int ordering, Action *action )
+{
+ /* Make sure the start state has no other entry points. */
+ isolateStartState();
+ startState->fromStateActionTable.setAction( ordering, action );
+}
+
+void FsmGraph::allFromStateAction( int ordering, Action *action )
+{
+ /* Insert the action on all states. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ )
+ state->fromStateActionTable.setAction( ordering, action );
+}
+
+void FsmGraph::finalFromStateAction( int ordering, Action *action )
+{
+ /* Add the action to the error table of final states. */
+ for ( StateSet::Iter state = finStateSet; state.lte(); state++ )
+ (*state)->fromStateActionTable.setAction( ordering, action );
+}
+
+void FsmGraph::notStartFromStateAction( int ordering, Action *action )
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( state != startState )
+ state->fromStateActionTable.setAction( ordering, action );
+ }
+}
+
+void FsmGraph::notFinalFromStateAction( int ordering, Action *action )
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( ! state->isFinState() )
+ state->fromStateActionTable.setAction( ordering, action );
+ }
+}
+
+void FsmGraph::middleFromStateAction( int ordering, Action *action )
+{
+ /* Set the action in all states that are not the start state and not final. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ if ( state != startState && ! state->isFinState() )
+ state->fromStateActionTable.setAction( ordering, action );
+ }
+}
+
+/* Shift the function ordering of the start transitions to start
+ * at fromOrder and increase in units of 1. Useful before staring.
+ * Returns the maximum number of order numbers used. */
+int FsmGraph::shiftStartActionOrder( int fromOrder )
+{
+ int maxUsed = 0;
+
+ /* Walk the start state's transitions, shifting function ordering. */
+ for ( TransList::Iter trans = startState->outList; trans.lte(); trans++ ) {
+ /* Walk the function data for the transition and set the keys to
+ * increasing values starting at fromOrder. */
+ int curFromOrder = fromOrder;
+ ActionTable::Iter action = trans->actionTable;
+ for ( ; action.lte(); action++ )
+ action->key = curFromOrder++;
+
+ /* Keep track of the max number of orders used. */
+ if ( curFromOrder - fromOrder > maxUsed )
+ maxUsed = curFromOrder - fromOrder;
+ }
+
+ return maxUsed;
+}
+
+/* Remove all priorities. */
+void FsmGraph::clearAllPriorities()
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ /* Clear out priority data. */
+ state->outPriorTable.empty();
+
+ /* Clear transition data from the out transitions. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ )
+ trans->priorTable.empty();
+ }
+}
+
+/* Zeros out the function ordering keys. This may be called before minimization
+ * when it is known that no more fsm operations are going to be done. This
+ * will achieve greater reduction as states will not be separated on the basis
+ * of function ordering. */
+void FsmGraph::nullActionKeys( )
+{
+ /* For each state... */
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ /* Walk the transitions for the state. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+ /* Walk the action table for the transition. */
+ for ( ActionTable::Iter action = trans->actionTable;
+ action.lte(); action++ )
+ action->key = 0;
+
+ /* Walk the action table for the transition. */
+ for ( LmActionTable::Iter action = trans->lmActionTable;
+ action.lte(); action++ )
+ action->key = 0;
+ }
+
+ /* Null the action keys of the to state action table. */
+ for ( ActionTable::Iter action = state->toStateActionTable;
+ action.lte(); action++ )
+ action->key = 0;
+
+ /* Null the action keys of the from state action table. */
+ for ( ActionTable::Iter action = state->fromStateActionTable;
+ action.lte(); action++ )
+ action->key = 0;
+
+ /* Null the action keys of the out transtions. */
+ for ( ActionTable::Iter action = state->outActionTable;
+ action.lte(); action++ )
+ action->key = 0;
+
+ /* Null the action keys of the error action table. */
+ for ( ErrActionTable::Iter action = state->errActionTable;
+ action.lte(); action++ )
+ action->ordering = 0;
+
+ /* Null the action keys eof action table. */
+ for ( ActionTable::Iter action = state->eofActionTable;
+ action.lte(); action++ )
+ action->key = 0;
+ }
+}
+
+/* Walk the list of states and verify that non final states do not have out
+ * data, that all stateBits are cleared, and that there are no states with
+ * zero foreign in transitions. */
+void FsmGraph::verifyStates()
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ /* Non final states should not have leaving data. */
+ if ( ! (state->stateBits & SB_ISFINAL) ) {
+ assert( state->outActionTable.length() == 0 );
+ assert( state->outCondSet.length() == 0 );
+ assert( state->outPriorTable.length() == 0 );
+ }
+
+ /* Data used in algorithms should be cleared. */
+ assert( (state->stateBits & SB_BOTH) == 0 );
+ assert( state->foreignInTrans > 0 );
+ }
+}
+
+/* Compare two transitions according to their relative priority. Since the
+ * base transition has no priority associated with it, the default is to
+ * return equal. */
+int FsmGraph::comparePrior( const PriorTable &priorTable1, const PriorTable &priorTable2 )
+{
+ /* Looking for differing priorities on same keys. Need to concurrently
+ * scan the priority lists. */
+ PriorTable::Iter pd1 = priorTable1;
+ PriorTable::Iter pd2 = priorTable2;
+ while ( pd1.lte() && pd2.lte() ) {
+ /* Check keys. */
+ if ( pd1->desc->key < pd2->desc->key )
+ pd1.increment();
+ else if ( pd1->desc->key > pd2->desc->key )
+ pd2.increment();
+ /* Keys are the same, check priorities. */
+ else if ( pd1->desc->priority < pd2->desc->priority )
+ return -1;
+ else if ( pd1->desc->priority > pd2->desc->priority )
+ return 1;
+ else {
+ /* Keys and priorities are equal, advance both. */
+ pd1.increment();
+ pd2.increment();
+ }
+ }
+
+ /* No differing priorities on the same key. */
+ return 0;
+}
+
+/* Compares two transitions according to priority and functions. Pointers
+ * should not be null. Does not consider to state or from state. Compare two
+ * transitions according to the data contained in the transitions. Data means
+ * any properties added to user transitions that may differentiate them. Since
+ * the base transition has no data, the default is to return equal. */
+int FsmGraph::compareTransData( FsmTrans *trans1, FsmTrans *trans2 )
+{
+ /* Compare the prior table. */
+ int cmpRes = CmpPriorTable::compare( trans1->priorTable,
+ trans2->priorTable );
+ if ( cmpRes != 0 )
+ return cmpRes;
+
+ /* Compare longest match action tables. */
+ cmpRes = CmpLmActionTable::compare(trans1->lmActionTable,
+ trans2->lmActionTable);
+ if ( cmpRes != 0 )
+ return cmpRes;
+
+ /* Compare action tables. */
+ return CmpActionTable::compare(trans1->actionTable,
+ trans2->actionTable);
+}
+
+/* Callback invoked when another trans (or possibly this) is added into this
+ * transition during the merging process. Draw in any properties of srcTrans
+ * into this transition. AddInTrans is called when a new transitions is made
+ * that will be a duplicate of another transition or a combination of several
+ * other transitions. AddInTrans will be called for each transition that the
+ * new transition is to represent. */
+void FsmGraph::addInTrans( FsmTrans *destTrans, FsmTrans *srcTrans )
+{
+ /* Protect against adding in from ourselves. */
+ if ( srcTrans == destTrans ) {
+ /* Adding in ourselves, need to make a copy of the source transitions.
+ * The priorities are not copied in as that would have no effect. */
+ destTrans->lmActionTable.setActions( LmActionTable(srcTrans->lmActionTable) );
+ destTrans->actionTable.setActions( ActionTable(srcTrans->actionTable) );
+ }
+ else {
+ /* Not a copy of ourself, get the functions and priorities. */
+ destTrans->lmActionTable.setActions( srcTrans->lmActionTable );
+ destTrans->actionTable.setActions( srcTrans->actionTable );
+ destTrans->priorTable.setPriors( srcTrans->priorTable );
+ }
+}
+
+/* Compare the properties of states that are embedded by users. Compares out
+ * priorities, out transitions, to, from, out, error and eof action tables. */
+int FsmGraph::compareStateData( const FsmState *state1, const FsmState *state2 )
+{
+ /* Compare the out priority table. */
+ int cmpRes = CmpPriorTable::
+ compare( state1->outPriorTable, state2->outPriorTable );
+ if ( cmpRes != 0 )
+ return cmpRes;
+
+ /* Test to state action tables. */
+ cmpRes = CmpActionTable::compare( state1->toStateActionTable,
+ state2->toStateActionTable );
+ if ( cmpRes != 0 )
+ return cmpRes;
+
+ /* Test from state action tables. */
+ cmpRes = CmpActionTable::compare( state1->fromStateActionTable,
+ state2->fromStateActionTable );
+ if ( cmpRes != 0 )
+ return cmpRes;
+
+ /* Test out action tables. */
+ cmpRes = CmpActionTable::compare( state1->outActionTable,
+ state2->outActionTable );
+ if ( cmpRes != 0 )
+ return cmpRes;
+
+ /* Test out condition sets. */
+ cmpRes = CmpActionSet::compare( state1->outCondSet,
+ state2->outCondSet );
+ if ( cmpRes != 0 )
+ return cmpRes;
+
+ /* Test out error action tables. */
+ cmpRes = CmpErrActionTable::compare( state1->errActionTable,
+ state2->errActionTable );
+ if ( cmpRes != 0 )
+ return cmpRes;
+
+ /* Test eof action tables. */
+ return CmpActionTable::compare( state1->eofActionTable,
+ state2->eofActionTable );
+}
+
+/* Invoked when a state looses its final state status and the leaving
+ * transition embedding data should be deleted. */
+void FsmGraph::clearOutData( FsmState *state )
+{
+ /* Kill the out actions and priorities. */
+ state->outActionTable.empty();
+ state->outCondSet.empty();
+ state->outPriorTable.empty();
+}
+
+bool FsmGraph::hasOutData( FsmState *state )
+{
+ return ( state->outActionTable.length() > 0 ||
+ state->outCondSet.length() > 0 ||
+ state->outPriorTable.length() > 0 );
+}
diff --git a/src/fsmattach.cc b/src/fsmattach.cc
new file mode 100644
index 0000000..a58ed9a
--- /dev/null
+++ b/src/fsmattach.cc
@@ -0,0 +1,425 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <string.h>
+#include <assert.h>
+#include "fsmgraph.h"
+
+#include <iostream>
+using namespace std;
+
+/* Insert a transition into an inlist. The head must be supplied. */
+void FsmGraph::attachToInList( FsmState *from, FsmState *to,
+ FsmTrans *&head, FsmTrans *trans )
+{
+ trans->ilnext = head;
+ trans->ilprev = 0;
+
+ /* If in trans list is not empty, set the head->prev to trans. */
+ if ( head != 0 )
+ head->ilprev = trans;
+
+ /* Now insert ourselves at the front of the list. */
+ head = trans;
+
+ /* Keep track of foreign transitions for from and to. */
+ if ( from != to ) {
+ if ( misfitAccounting ) {
+ /* If the number of foreign in transitions is about to go up to 1 then
+ * move it from the misfit list to the main list. */
+ if ( to->foreignInTrans == 0 )
+ stateList.append( misfitList.detach( to ) );
+ }
+
+ to->foreignInTrans += 1;
+ }
+};
+
+/* Detach a transition from an inlist. The head of the inlist must be supplied. */
+void FsmGraph::detachFromInList( FsmState *from, FsmState *to,
+ FsmTrans *&head, FsmTrans *trans )
+{
+ /* Detach in the inTransList. */
+ if ( trans->ilprev == 0 )
+ head = trans->ilnext;
+ else
+ trans->ilprev->ilnext = trans->ilnext;
+
+ if ( trans->ilnext != 0 )
+ trans->ilnext->ilprev = trans->ilprev;
+
+ /* Keep track of foreign transitions for from and to. */
+ if ( from != to ) {
+ to->foreignInTrans -= 1;
+
+ if ( misfitAccounting ) {
+ /* If the number of foreign in transitions goes down to 0 then move it
+ * from the main list to the misfit list. */
+ if ( to->foreignInTrans == 0 )
+ misfitList.append( stateList.detach( to ) );
+ }
+ }
+}
+
+/* Attach states on the default transition, range list or on out/in list key.
+ * First makes a new transition. If there is already a transition out from
+ * fromState on the default, then will assertion fail. */
+FsmTrans *FsmGraph::attachNewTrans( FsmState *from, FsmState *to, Key lowKey, Key highKey )
+{
+ /* Make the new transition. */
+ FsmTrans *retVal = new FsmTrans();
+
+ /* The transition is now attached. Remember the parties involved. */
+ retVal->fromState = from;
+ retVal->toState = to;
+
+ /* Make the entry in the out list for the transitions. */
+ from->outList.append( retVal );
+
+ /* Set the the keys of the new trans. */
+ retVal->lowKey = lowKey;
+ retVal->highKey = highKey;
+
+ /* Attach using inList as the head pointer. */
+ if ( to != 0 )
+ attachToInList( from, to, to->inList.head, retVal );
+
+ return retVal;
+}
+
+/* Attach for range lists or for the default transition. This attach should
+ * be used when a transition already is allocated and must be attached to a
+ * target state. Does not handle adding the transition into the out list. */
+void FsmGraph::attachTrans( FsmState *from, FsmState *to, FsmTrans *trans )
+{
+ assert( trans->fromState == 0 && trans->toState == 0 );
+ trans->fromState = from;
+ trans->toState = to;
+
+ if ( to != 0 ) {
+ /* Attach using the inList pointer as the head pointer. */
+ attachToInList( from, to, to->inList.head, trans );
+ }
+}
+
+/* Redirect a transition away from error and towards some state. This is just
+ * like attachTrans except it requires fromState to be set and does not touch
+ * it. */
+void FsmGraph::redirectErrorTrans( FsmState *from, FsmState *to, FsmTrans *trans )
+{
+ assert( trans->fromState != 0 && trans->toState == 0 );
+ trans->toState = to;
+
+ if ( to != 0 ) {
+ /* Attach using the inList pointer as the head pointer. */
+ attachToInList( from, to, to->inList.head, trans );
+ }
+}
+
+/* Detach for out/in lists or for default transition. */
+void FsmGraph::detachTrans( FsmState *from, FsmState *to, FsmTrans *trans )
+{
+ assert( trans->fromState == from && trans->toState == to );
+ trans->fromState = 0;
+ trans->toState = 0;
+
+ if ( to != 0 ) {
+ /* Detach using to's inList pointer as the head. */
+ detachFromInList( from, to, to->inList.head, trans );
+ }
+}
+
+
+/* Detach a state from the graph. Detaches and deletes transitions in and out
+ * of the state. Empties inList and outList. Removes the state from the final
+ * state set. A detached state becomes useless and should be deleted. */
+void FsmGraph::detachState( FsmState *state )
+{
+ /* Detach the in transitions from the inList list of transitions. */
+ while ( state->inList.head != 0 ) {
+ /* Get pointers to the trans and the state. */
+ FsmTrans *trans = state->inList.head;
+ FsmState *fromState = trans->fromState;
+
+ /* Detach the transitions from the source state. */
+ detachTrans( fromState, state, trans );
+
+ /* Ok to delete the transition. */
+ fromState->outList.detach( trans );
+ delete trans;
+ }
+
+ /* Remove the entry points in on the machine. */
+ while ( state->entryIds.length() > 0 )
+ unsetEntry( state->entryIds[0], state );
+
+ /* Detach out range transitions. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); ) {
+ TransList::Iter next = trans.next();
+ detachTrans( state, trans->toState, trans );
+ delete trans;
+ trans = next;
+ }
+
+ /* Delete all of the out range pointers. */
+ state->outList.abandon();
+
+ /* Unset final stateness before detaching from graph. */
+ if ( state->stateBits & SB_ISFINAL )
+ finStateSet.remove( state );
+}
+
+
+/* Duplicate a transition. Makes a new transition that is attached to the same
+ * dest as srcTrans. The new transition has functions and priority taken from
+ * srcTrans. Used for merging a transition in to a free spot. The trans can
+ * just be dropped in. It does not conflict with an existing trans and need
+ * not be crossed. Returns the new transition. */
+FsmTrans *FsmGraph::dupTrans( FsmState *from, FsmTrans *srcTrans )
+{
+ /* Make a new transition. */
+ FsmTrans *newTrans = new FsmTrans();
+
+ /* We can attach the transition, one does not exist. */
+ attachTrans( from, srcTrans->toState, newTrans );
+
+ /* Call the user callback to add in the original source transition. */
+ addInTrans( newTrans, srcTrans );
+
+ return newTrans;
+}
+
+/* In crossing, src trans and dest trans both go to existing states. Make one
+ * state from the sets of states that src and dest trans go to. */
+FsmTrans *FsmGraph::fsmAttachStates( MergeData &md, FsmState *from,
+ FsmTrans *destTrans, FsmTrans *srcTrans )
+{
+ /* The priorities are equal. We must merge the transitions. Does the
+ * existing trans go to the state we are to attach to? ie, are we to
+ * simply double up the transition? */
+ FsmState *toState = srcTrans->toState;
+ FsmState *existingState = destTrans->toState;
+
+ if ( existingState == toState ) {
+ /* The transition is a double up to the same state. Copy the src
+ * trans into itself. We don't need to merge in the from out trans
+ * data, that was done already. */
+ addInTrans( destTrans, srcTrans );
+ }
+ else {
+ /* The trans is not a double up. Dest trans cannot be the same as src
+ * trans. Set up the state set. */
+ StateSet stateSet;
+
+ /* We go to all the states the existing trans goes to, plus... */
+ if ( existingState->stateDictEl == 0 )
+ stateSet.insert( existingState );
+ else
+ stateSet.insert( existingState->stateDictEl->stateSet );
+
+ /* ... all the states that we have been told to go to. */
+ if ( toState->stateDictEl == 0 )
+ stateSet.insert( toState );
+ else
+ stateSet.insert( toState->stateDictEl->stateSet );
+
+ /* Look for the state. If it is not there already, make it. */
+ StateDictEl *lastFound;
+ if ( md.stateDict.insert( stateSet, &lastFound ) ) {
+ /* Make a new state representing the combination of states in
+ * stateSet. It gets added to the fill list. This means that we
+ * need to fill in it's transitions sometime in the future. We
+ * don't do that now (ie, do not recurse). */
+ FsmState *combinState = addState();
+
+ /* Link up the dict element and the state. */
+ lastFound->targState = combinState;
+ combinState->stateDictEl = lastFound;
+
+ /* Add to the fill list. */
+ md.fillListAppend( combinState );
+ }
+
+ /* Get the state insertted/deleted. */
+ FsmState *targ = lastFound->targState;
+
+ /* Detach the state from existing state. */
+ detachTrans( from, existingState, destTrans );
+
+ /* Re-attach to the new target. */
+ attachTrans( from, targ, destTrans );
+
+ /* Add in src trans to the existing transition that we redirected to
+ * the new state. We don't need to merge in the from out trans data,
+ * that was done already. */
+ addInTrans( destTrans, srcTrans );
+ }
+
+ return destTrans;
+}
+
+/* Two transitions are to be crossed, handle the possibility of either going
+ * to the error state. */
+FsmTrans *FsmGraph::mergeTrans( MergeData &md, FsmState *from,
+ FsmTrans *destTrans, FsmTrans *srcTrans )
+{
+ FsmTrans *retTrans = 0;
+ if ( destTrans->toState == 0 && srcTrans->toState == 0 ) {
+ /* Error added into error. */
+ addInTrans( destTrans, srcTrans );
+ retTrans = destTrans;
+ }
+ else if ( destTrans->toState == 0 && srcTrans->toState != 0 ) {
+ /* Non error added into error we need to detach and reattach, */
+ detachTrans( from, destTrans->toState, destTrans );
+ attachTrans( from, srcTrans->toState, destTrans );
+ addInTrans( destTrans, srcTrans );
+ retTrans = destTrans;
+ }
+ else if ( srcTrans->toState == 0 ) {
+ /* Dest goes somewhere but src doesn't, just add it it in. */
+ addInTrans( destTrans, srcTrans );
+ retTrans = destTrans;
+ }
+ else {
+ /* Both go somewhere, run the actual cross. */
+ retTrans = fsmAttachStates( md, from, destTrans, srcTrans );
+ }
+
+ return retTrans;
+}
+
+/* Find the trans with the higher priority. If src is lower priority then dest then
+ * src is ignored. If src is higher priority than dest, then src overwrites dest. If
+ * the priorities are equal, then they are merged. */
+FsmTrans *FsmGraph::crossTransitions( MergeData &md, FsmState *from,
+ FsmTrans *destTrans, FsmTrans *srcTrans )
+{
+ FsmTrans *retTrans;
+
+ /* Compare the priority of the dest and src transitions. */
+ int compareRes = comparePrior( destTrans->priorTable, srcTrans->priorTable );
+ if ( compareRes < 0 ) {
+ /* Src trans has a higher priority than dest, src overwrites dest.
+ * Detach dest and return a copy of src. */
+ detachTrans( from, destTrans->toState, destTrans );
+ retTrans = dupTrans( from, srcTrans );
+ }
+ else if ( compareRes > 0 ) {
+ /* The dest trans has a higher priority, use dest. */
+ retTrans = destTrans;
+ }
+ else {
+ /* Src trans and dest trans have the same priority, they must be merged. */
+ retTrans = mergeTrans( md, from, destTrans, srcTrans );
+ }
+
+ /* Return the transition that resulted from the cross. */
+ return retTrans;
+}
+
+/* Copy the transitions in srcList to the outlist of dest. The srcList should
+ * not be the outList of dest, otherwise you would be copying the contents of
+ * srcList into itself as it's iterated: bad news. */
+void FsmGraph::outTransCopy( MergeData &md, FsmState *dest, FsmTrans *srcList )
+{
+ /* The destination list. */
+ TransList destList;
+
+ /* Set up an iterator to stop at breaks. */
+ PairIter<FsmTrans> outPair( dest->outList.head, srcList );
+ for ( ; !outPair.end(); outPair++ ) {
+ switch ( outPair.userState ) {
+ case RangeInS1: {
+ /* The pair iter is the authority on the keys. It may have needed
+ * to break the dest range. */
+ FsmTrans *destTrans = outPair.s1Tel.trans;
+ destTrans->lowKey = outPair.s1Tel.lowKey;
+ destTrans->highKey = outPair.s1Tel.highKey;
+ destList.append( destTrans );
+ break;
+ }
+ case RangeInS2: {
+ /* Src range may get crossed with dest's default transition. */
+ FsmTrans *newTrans = dupTrans( dest, outPair.s2Tel.trans );
+
+ /* Set up the transition's keys and append to the dest list. */
+ newTrans->lowKey = outPair.s2Tel.lowKey;
+ newTrans->highKey = outPair.s2Tel.highKey;
+ destList.append( newTrans );
+ break;
+ }
+ case RangeOverlap: {
+ /* Exact overlap, cross them. */
+ FsmTrans *newTrans = crossTransitions( md, dest,
+ outPair.s1Tel.trans, outPair.s2Tel.trans );
+
+ /* Set up the transition's keys and append to the dest list. */
+ newTrans->lowKey = outPair.s1Tel.lowKey;
+ newTrans->highKey = outPair.s1Tel.highKey;
+ destList.append( newTrans );
+ break;
+ }
+ case BreakS1: {
+ /* Since we are always writing to the dest trans, the dest needs
+ * to be copied when it is broken. The copy goes into the first
+ * half of the break to "break it off". */
+ outPair.s1Tel.trans = dupTrans( dest, outPair.s1Tel.trans );
+ break;
+ }
+ case BreakS2:
+ break;
+ }
+ }
+
+ /* Abandon the old outList and transfer destList into it. */
+ dest->outList.transfer( destList );
+}
+
+
+/* Move all the transitions that go into src so that they go into dest. */
+void FsmGraph::inTransMove( FsmState *dest, FsmState *src )
+{
+ /* Do not try to move in trans to and from the same state. */
+ assert( dest != src );
+
+ /* If src is the start state, dest becomes the start state. */
+ if ( src == startState ) {
+ unsetStartState();
+ setStartState( dest );
+ }
+
+ /* For each entry point into, create an entry point into dest, when the
+ * state is detached, the entry points to src will be removed. */
+ for ( EntryIdSet::Iter enId = src->entryIds; enId.lte(); enId++ )
+ changeEntry( *enId, dest, src );
+
+ /* Move the transitions in inList. */
+ while ( src->inList.head != 0 ) {
+ /* Get trans and from state. */
+ FsmTrans *trans = src->inList.head;
+ FsmState *fromState = trans->fromState;
+
+ /* Detach from src, reattach to dest. */
+ detachTrans( fromState, src, trans );
+ attachTrans( fromState, dest, trans );
+ }
+}
diff --git a/src/fsmbase.cc b/src/fsmbase.cc
new file mode 100644
index 0000000..9034103
--- /dev/null
+++ b/src/fsmbase.cc
@@ -0,0 +1,602 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <string.h>
+#include <assert.h>
+#include "fsmgraph.h"
+
+/* Simple singly linked list append routine for the fill list. The new state
+ * goes to the end of the list. */
+void MergeData::fillListAppend( FsmState *state )
+{
+ state->alg.next = 0;
+
+ if ( stfillHead == 0 ) {
+ /* List is empty, state becomes head and tail. */
+ stfillHead = state;
+ stfillTail = state;
+ }
+ else {
+ /* List is not empty, state goes after last element. */
+ stfillTail->alg.next = state;
+ stfillTail = state;
+ }
+}
+
+/* Graph constructor. */
+FsmGraph::FsmGraph()
+:
+ /* No start state. */
+ startState(0),
+ errState(0),
+
+ /* Misfit accounting is a switch, turned on only at specific times. It
+ * controls what happens when states have no way in from the outside
+ * world.. */
+ misfitAccounting(false),
+
+ lmRequiresErrorState(false)
+{
+}
+
+/* Copy all graph data including transitions. */
+FsmGraph::FsmGraph( const FsmGraph &graph )
+:
+ /* Lists start empty. Will be filled by copy. */
+ stateList(),
+ misfitList(),
+
+ /* Copy in the entry points,
+ * pointers will be resolved later. */
+ entryPoints(graph.entryPoints),
+ startState(graph.startState),
+ errState(0),
+
+ /* Will be filled by copy. */
+ finStateSet(),
+
+ /* Misfit accounting is only on during merging. */
+ misfitAccounting(false),
+
+ lmRequiresErrorState(graph.lmRequiresErrorState)
+{
+ /* Create the states and record their map in the original state. */
+ StateList::Iter origState = graph.stateList;
+ for ( ; origState.lte(); origState++ ) {
+ /* Make the new state. */
+ FsmState *newState = new FsmState( *origState );
+
+ /* Add the state to the list. */
+ stateList.append( newState );
+
+ /* Set the mapsTo item of the old state. */
+ origState->alg.stateMap = newState;
+ }
+
+ /* Derefernce all the state maps. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+ /* The points to the original in the src machine. The taget's duplicate
+ * is in the statemap. */
+ FsmState *toState = trans->toState != 0 ? trans->toState->alg.stateMap : 0;
+
+ /* Attach The transition to the duplicate. */
+ trans->toState = 0;
+ attachTrans( state, toState, trans );
+ }
+ }
+
+ /* Fix the state pointers in the entry points array. */
+ EntryMapEl *eel = entryPoints.data;
+ for ( int e = 0; e < entryPoints.length(); e++, eel++ ) {
+ /* Get the duplicate of the state. */
+ eel->value = eel->value->alg.stateMap;
+
+ /* Foreign in transitions must be built up when duping machines so
+ * increment it here. */
+ eel->value->foreignInTrans += 1;
+ }
+
+ /* Fix the start state pointer and the new start state's count of in
+ * transiions. */
+ startState = startState->alg.stateMap;
+ startState->foreignInTrans += 1;
+
+ /* Build the final state set. */
+ StateSet::Iter st = graph.finStateSet;
+ for ( ; st.lte(); st++ )
+ finStateSet.insert((*st)->alg.stateMap);
+}
+
+/* Deletes all transition data then deletes each state. */
+FsmGraph::~FsmGraph()
+{
+ /* Delete all the transitions. */
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ /* Iterate the out transitions, deleting them. */
+ state->outList.empty();
+ }
+
+ /* Delete all the states. */
+ stateList.empty();
+}
+
+/* Set a state final. The state has its isFinState set to true and the state
+ * is added to the finStateSet. */
+void FsmGraph::setFinState( FsmState *state )
+{
+ /* Is it already a fin state. */
+ if ( state->stateBits & SB_ISFINAL )
+ return;
+
+ state->stateBits |= SB_ISFINAL;
+ finStateSet.insert( state );
+}
+
+/* Set a state non-final. The has its isFinState flag set false and the state
+ * is removed from the final state set. */
+void FsmGraph::unsetFinState( FsmState *state )
+{
+ /* Is it already a non-final state? */
+ if ( ! (state->stateBits & SB_ISFINAL) )
+ return;
+
+ /* When a state looses its final state status it must relinquish all the
+ * properties that are allowed only for final states. */
+ clearOutData( state );
+
+ state->stateBits &= ~ SB_ISFINAL;
+ finStateSet.remove( state );
+}
+
+/* Set and unset a state as the start state. */
+void FsmGraph::setStartState( FsmState *state )
+{
+ /* Sould change from unset to set. */
+ assert( startState == 0 );
+ startState = state;
+
+ if ( misfitAccounting ) {
+ /* If the number of foreign in transitions is about to go up to 1 then
+ * take it off the misfit list and put it on the head list. */
+ if ( state->foreignInTrans == 0 )
+ stateList.append( misfitList.detach( state ) );
+ }
+
+ /* Up the foreign in transitions to the state. */
+ state->foreignInTrans += 1;
+}
+
+void FsmGraph::unsetStartState()
+{
+ /* Should change from set to unset. */
+ assert( startState != 0 );
+
+ /* Decrement the entry's count of foreign entries. */
+ startState->foreignInTrans -= 1;
+
+ if ( misfitAccounting ) {
+ /* If the number of foreign in transitions just went down to 0 then take
+ * it off the main list and put it on the misfit list. */
+ if ( startState->foreignInTrans == 0 )
+ misfitList.append( stateList.detach( startState ) );
+ }
+
+ startState = 0;
+}
+
+/* Associate an id with a state. Makes the state a named entry point. Has no
+ * effect if the entry point is already mapped to the state. */
+void FsmGraph::setEntry( int id, FsmState *state )
+{
+ /* Insert the id into the state. If the state is already labelled with id,
+ * nothing to do. */
+ if ( state->entryIds.insert( id ) ) {
+ /* Insert the entry and assert that it succeeds. */
+ entryPoints.insertMulti( id, state );
+
+ if ( misfitAccounting ) {
+ /* If the number of foreign in transitions is about to go up to 1 then
+ * take it off the misfit list and put it on the head list. */
+ if ( state->foreignInTrans == 0 )
+ stateList.append( misfitList.detach( state ) );
+ }
+
+ /* Up the foreign in transitions to the state. */
+ state->foreignInTrans += 1;
+ }
+}
+
+/* Remove the association of an id with a state. The state looses it's entry
+ * point status. Assumes that the id is indeed mapped to state. */
+void FsmGraph::unsetEntry( int id, FsmState *state )
+{
+ /* Find the entry point in on id. */
+ EntryMapEl *enLow = 0, *enHigh = 0;
+ entryPoints.findMulti( id, enLow, enHigh );
+ while ( enLow->value != state )
+ enLow += 1;
+
+ /* Remove the record from the map. */
+ entryPoints.remove( enLow );
+
+ /* Remove the state's sense of the link. */
+ state->entryIds.remove( id );
+ state->foreignInTrans -= 1;
+ if ( misfitAccounting ) {
+ /* If the number of foreign in transitions just went down to 0 then take
+ * it off the main list and put it on the misfit list. */
+ if ( state->foreignInTrans == 0 )
+ misfitList.append( stateList.detach( state ) );
+ }
+}
+
+/* Remove all association of an id with states. Assumes that the id is indeed
+ * mapped to a state. */
+void FsmGraph::unsetEntry( int id )
+{
+ /* Find the entry point in on id. */
+ EntryMapEl *enLow = 0, *enHigh = 0;
+ entryPoints.findMulti( id, enLow, enHigh );
+ for ( EntryMapEl *mel = enLow; mel <= enHigh; mel++ ) {
+ /* Remove the state's sense of the link. */
+ mel->value->entryIds.remove( id );
+ mel->value->foreignInTrans -= 1;
+ if ( misfitAccounting ) {
+ /* If the number of foreign in transitions just went down to 0
+ * then take it off the main list and put it on the misfit list. */
+ if ( mel->value->foreignInTrans == 0 )
+ misfitList.append( stateList.detach( mel->value ) );
+ }
+ }
+
+ /* Remove the records from the entry points map. */
+ entryPoints.removeMulti( enLow, enHigh );
+}
+
+
+void FsmGraph::changeEntry( int id, FsmState *to, FsmState *from )
+{
+ /* Find the entry in the entry map. */
+ EntryMapEl *enLow = 0, *enHigh = 0;
+ entryPoints.findMulti( id, enLow, enHigh );
+ while ( enLow->value != from )
+ enLow += 1;
+
+ /* Change it to the new target. */
+ enLow->value = to;
+
+ /* Remove from's sense of the link. */
+ from->entryIds.remove( id );
+ from->foreignInTrans -= 1;
+ if ( misfitAccounting ) {
+ /* If the number of foreign in transitions just went down to 0 then take
+ * it off the main list and put it on the misfit list. */
+ if ( from->foreignInTrans == 0 )
+ misfitList.append( stateList.detach( from ) );
+ }
+
+ /* Add to's sense of the link. */
+ if ( to->entryIds.insert( id ) != 0 ) {
+ if ( misfitAccounting ) {
+ /* If the number of foreign in transitions is about to go up to 1 then
+ * take it off the misfit list and put it on the head list. */
+ if ( to->foreignInTrans == 0 )
+ stateList.append( misfitList.detach( to ) );
+ }
+
+ /* Up the foreign in transitions to the state. */
+ to->foreignInTrans += 1;
+ }
+}
+
+
+/* Clear all entry points from a machine. */
+void FsmGraph::unsetAllEntryPoints()
+{
+ for ( EntryMap::Iter en = entryPoints; en.lte(); en++ ) {
+ /* Kill all the state's entry points at once. */
+ if ( en->value->entryIds.length() > 0 ) {
+ en->value->foreignInTrans -= en->value->entryIds.length();
+
+ if ( misfitAccounting ) {
+ /* If the number of foreign in transitions just went down to 0
+ * then take it off the main list and put it on the misfit
+ * list. */
+ if ( en->value->foreignInTrans == 0 )
+ misfitList.append( stateList.detach( en->value ) );
+ }
+
+ /* Clear the set of ids out all at once. */
+ en->value->entryIds.empty();
+ }
+ }
+
+ /* Now clear out the entry map all at once. */
+ entryPoints.empty();
+}
+
+/* Assigning an epsilon transition into final states. */
+void FsmGraph::epsilonTrans( int id )
+{
+ for ( StateSet::Iter fs = finStateSet; fs.lte(); fs++ )
+ (*fs)->epsilonTrans.append( id );
+}
+
+/* Mark all states reachable from state. Traverses transitions forward. Used
+ * for removing states that have no path into them. */
+void FsmGraph::markReachableFromHere( FsmState *state )
+{
+ /* Base case: return; */
+ if ( state->stateBits & SB_ISMARKED )
+ return;
+
+ /* Set this state as processed. We are going to visit all states that this
+ * state has a transition to. */
+ state->stateBits |= SB_ISMARKED;
+
+ /* Recurse on all out transitions. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+ if ( trans->toState != 0 )
+ markReachableFromHere( trans->toState );
+ }
+}
+
+void FsmGraph::markReachableFromHereStopFinal( FsmState *state )
+{
+ /* Base case: return; */
+ if ( state->stateBits & SB_ISMARKED )
+ return;
+
+ /* Set this state as processed. We are going to visit all states that this
+ * state has a transition to. */
+ state->stateBits |= SB_ISMARKED;
+
+ /* Recurse on all out transitions. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+ FsmState *toState = trans->toState;
+ if ( toState != 0 && !toState->isFinState() )
+ markReachableFromHereStopFinal( toState );
+ }
+}
+
+/* Mark all states reachable from state. Traverse transitions backwards. Used
+ * for removing dead end paths in graphs. */
+void FsmGraph::markReachableFromHereReverse( FsmState *state )
+{
+ /* Base case: return; */
+ if ( state->stateBits & SB_ISMARKED )
+ return;
+
+ /* Set this state as processed. We are going to visit all states with
+ * transitions into this state. */
+ state->stateBits |= SB_ISMARKED;
+
+ /* Recurse on all items in transitions. */
+ for ( TransInList::Iter trans = state->inList; trans.lte(); trans++ )
+ markReachableFromHereReverse( trans->fromState );
+}
+
+/* Determine if there are any entry points into a start state other than the
+ * start state. Setting starting transitions requires that the start state be
+ * isolated. In most cases a start state will already be isolated. */
+bool FsmGraph::isStartStateIsolated()
+{
+ /* If there are any in transitions then the state is not isolated. */
+ if ( startState->inList.head != 0 )
+ return false;
+
+ /* If there are any entry points then isolated. */
+ if ( startState->entryIds.length() > 0 )
+ return false;
+
+ return true;
+}
+
+/* Bring in other's entry points. Assumes others states are going to be
+ * copied into this machine. */
+void FsmGraph::copyInEntryPoints( FsmGraph *other )
+{
+ /* Use insert multi because names are not unique. */
+ for ( EntryMap::Iter en = other->entryPoints; en.lte(); en++ )
+ entryPoints.insertMulti( en->key, en->value );
+}
+
+
+void FsmGraph::unsetAllFinStates()
+{
+ for ( StateSet::Iter st = finStateSet; st.lte(); st++ )
+ (*st)->stateBits &= ~ SB_ISFINAL;
+ finStateSet.empty();
+}
+
+void FsmGraph::setFinBits( int finStateBits )
+{
+ for ( int s = 0; s < finStateSet.length(); s++ )
+ finStateSet.data[s]->stateBits |= finStateBits;
+}
+
+
+/* Tests the integrity of the transition lists and the fromStates. */
+void FsmGraph::verifyIntegrity()
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ ) {
+ /* Walk the out transitions and assert fromState is correct. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ )
+ assert( trans->fromState == state );
+
+ /* Walk the inlist and assert toState is correct. */
+ for ( TransInList::Iter trans = state->inList; trans.lte(); trans++ )
+ assert( trans->toState == state );
+ }
+}
+
+void FsmGraph::verifyReachability()
+{
+ /* Mark all the states that can be reached
+ * through the set of entry points. */
+ markReachableFromHere( startState );
+ for ( EntryMap::Iter en = entryPoints; en.lte(); en++ )
+ markReachableFromHere( en->value );
+
+ /* Check that everything got marked. */
+ for ( StateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Assert it got marked and then clear the mark. */
+ assert( st->stateBits & SB_ISMARKED );
+ st->stateBits &= ~ SB_ISMARKED;
+ }
+}
+
+void FsmGraph::verifyNoDeadEndStates()
+{
+ /* Mark all states that have paths to the final states. */
+ for ( StateSet::Iter pst = finStateSet; pst.lte(); pst++ )
+ markReachableFromHereReverse( *pst );
+
+ /* Start state gets honorary marking. Must be done AFTER recursive call. */
+ startState->stateBits |= SB_ISMARKED;
+
+ /* Make sure everything got marked. */
+ for ( StateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Assert the state got marked and unmark it. */
+ assert( st->stateBits & SB_ISMARKED );
+ st->stateBits &= ~ SB_ISMARKED;
+ }
+}
+
+void FsmGraph::depthFirstOrdering( FsmState *state )
+{
+ /* Nothing to do if the state is already on the list. */
+ if ( state->stateBits & SB_ONLIST )
+ return;
+
+ /* Doing depth first, put state on the list. */
+ state->stateBits |= SB_ONLIST;
+ stateList.append( state );
+
+ /* Recurse on everything ranges. */
+ for ( TransList::Iter tel = state->outList; tel.lte(); tel++ ) {
+ if ( tel->toState != 0 )
+ depthFirstOrdering( tel->toState );
+ }
+}
+
+/* Ordering states by transition connections. */
+void FsmGraph::depthFirstOrdering()
+{
+ /* Init on state list flags. */
+ for ( StateList::Iter st = stateList; st.lte(); st++ )
+ st->stateBits &= ~SB_ONLIST;
+
+ /* Clear out the state list, we will rebuild it. */
+ int stateListLen = stateList.length();
+ stateList.abandon();
+
+ /* Add back to the state list from the start state and all other entry
+ * points. */
+ if ( errState != 0 )
+ depthFirstOrdering( errState );
+ depthFirstOrdering( startState );
+ for ( EntryMap::Iter en = entryPoints; en.lte(); en++ )
+ depthFirstOrdering( en->value );
+
+ /* Make sure we put everything back on. */
+ assert( stateListLen == stateList.length() );
+}
+
+/* Stable sort the states by final state status. */
+void FsmGraph::sortStatesByFinal()
+{
+ /* Move forward through the list and throw final states onto the end. */
+ FsmState *state = 0;
+ FsmState *next = stateList.head;
+ FsmState *last = stateList.tail;
+ while ( state != last ) {
+ /* Move forward and load up the next. */
+ state = next;
+ next = state->next;
+
+ /* Throw to the end? */
+ if ( state->isFinState() ) {
+ stateList.detach( state );
+ stateList.append( state );
+ }
+ }
+}
+
+void FsmGraph::setStateNumbers( int base )
+{
+ for ( StateList::Iter state = stateList; state.lte(); state++ )
+ state->alg.stateNum = base++;
+}
+
+
+bool FsmGraph::checkErrTrans( FsmState *state, FsmTrans *trans )
+{
+ /* Might go directly to error state. */
+ if ( trans->toState == 0 )
+ return true;
+
+ if ( trans->prev == 0 ) {
+ /* If this is the first transition. */
+ if ( keyOps->minKey < trans->lowKey )
+ return true;
+ }
+ else {
+ /* Not the first transition. Compare against the prev. */
+ FsmTrans *prev = trans->prev;
+ Key nextKey = prev->highKey;
+ nextKey.increment();
+ if ( nextKey < trans->lowKey )
+ return true;
+ }
+ return false;
+}
+
+bool FsmGraph::checkErrTransFinish( FsmState *state )
+{
+ /* Check if there are any ranges already. */
+ if ( state->outList.length() == 0 )
+ return true;
+ else {
+ /* Get the last and check for a gap on the end. */
+ FsmTrans *last = state->outList.tail;
+ if ( last->highKey < keyOps->maxKey )
+ return true;
+ }
+ return 0;
+}
+
+bool FsmGraph::hasErrorTrans()
+{
+ bool result;
+ for ( StateList::Iter st = stateList; st.lte(); st++ ) {
+ for ( TransList::Iter tr = st->outList; tr.lte(); tr++ ) {
+ result = checkErrTrans( st, tr );
+ if ( result )
+ return true;
+ }
+ result = checkErrTransFinish( st );
+ if ( result )
+ return true;
+ }
+ return false;
+}
diff --git a/src/fsmcodegen.cc b/src/fsmcodegen.cc
new file mode 100644
index 0000000..61a48f7
--- /dev/null
+++ b/src/fsmcodegen.cc
@@ -0,0 +1,931 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "parsedata.h"
+#include "fsmcodegen.h"
+#include "redfsm.h"
+#include "bstmap.h"
+#include <sstream>
+#include <string>
+#include <assert.h>
+
+
+using std::ostream;
+using std::ostringstream;
+using std::string;
+using std::cerr;
+using std::endl;
+
+
+/* Init code gen with in parameters. */
+FsmCodeGen::FsmCodeGen( ostream &out,
+ RedFsm *redFsm, FsmTables *fsmTables )
+:
+ out(out),
+ redFsm(redFsm),
+ fsmTables(fsmTables),
+ codeGenErrCount(0),
+ dataPrefix(true),
+ writeFirstFinal(true),
+ writeErr(true),
+ skipTokenLabelNeeded(false)
+{
+}
+
+/* Write out the fsm name. */
+string FsmCodeGen::FSM_NAME()
+{
+ return "parser";
+}
+
+/* Emit the offset of the start state as a decimal integer. */
+string FsmCodeGen::START_STATE_ID()
+{
+ ostringstream ret;
+ ret << redFsm->startState->id;
+ return ret.str();
+};
+
+/* Write out the array of actions. */
+std::ostream &FsmCodeGen::ACTIONS_ARRAY()
+{
+ out << "\t0, ";
+ int totalActions = 1;
+ for ( GenActionTableMap::Iter act = redFsm->actionMap; act.lte(); act++ ) {
+ /* Write out the length, which will never be the last character. */
+ out << act->key.length() << ", ";
+ /* Put in a line break every 8 */
+ if ( totalActions++ % 8 == 7 )
+ out << "\n\t";
+
+ for ( GenActionTable::Iter item = act->key; item.lte(); item++ ) {
+ out << item->value->actionId;
+ if ( ! (act.last() && item.last()) )
+ out << ", ";
+
+ /* Put in a line break every 8 */
+ if ( totalActions++ % 8 == 7 )
+ out << "\n\t";
+ }
+ }
+ out << "\n";
+ return out;
+}
+
+
+string FsmCodeGen::CS()
+{
+ ostringstream ret;
+ /* Expression for retrieving the key, use simple dereference. */
+ ret << ACCESS() << "cs";
+ return ret.str();
+}
+
+string FsmCodeGen::GET_WIDE_KEY()
+{
+ return GET_KEY();
+}
+
+string FsmCodeGen::GET_WIDE_KEY( RedState *state )
+{
+ return GET_KEY();
+}
+
+string FsmCodeGen::GET_KEY()
+{
+ ostringstream ret;
+ /* Expression for retrieving the key, use simple dereference. */
+ ret << "(*" << P() << ")";
+ return ret.str();
+}
+
+/* Write out level number of tabs. Makes the nested binary search nice
+ * looking. */
+string FsmCodeGen::TABS( int level )
+{
+ string result;
+ while ( level-- > 0 )
+ result += "\t";
+ return result;
+}
+
+/* Write out a key from the fsm code gen. Depends on wether or not the key is
+ * signed. */
+string FsmCodeGen::KEY( Key key )
+{
+ ostringstream ret;
+ ret << key.getVal();
+ return ret.str();
+}
+
+void FsmCodeGen::SET_ACT( ostream &ret, InlineItem *item )
+{
+ ret << ACT() << " = " << item->longestMatchPart->longestMatchId << ";";
+}
+
+void FsmCodeGen::SET_TOKEND( ostream &ret, InlineItem *item )
+{
+ /* The tokend action sets tokend. */
+ ret << "{ " << TOKEND() << " = " << TOKLEN() << " + ( " << P() << " - " << BLOCK_START() << " ) + 1; }";
+}
+void FsmCodeGen::INIT_TOKSTART( ostream &ret, InlineItem *item )
+{
+ ret << TOKSTART() << " = 0;";
+}
+
+void FsmCodeGen::INIT_ACT( ostream &ret, InlineItem *item )
+{
+ ret << ACT() << " = 0;";
+}
+
+void FsmCodeGen::SET_TOKSTART( ostream &ret, InlineItem *item )
+{
+ ret << TOKSTART() << " = " << P() << ";";
+}
+
+void FsmCodeGen::EMIT_TOKEN( ostream &ret, LangEl *token )
+{
+ ret << " " << MATCHED_TOKEN() << " = " << token->id << ";\n";
+}
+
+void FsmCodeGen::LM_SWITCH( ostream &ret, InlineItem *item,
+ int targState, int inFinish )
+{
+ ret <<
+ " " << TOKLEN() << " = " << TOKEND() << ";\n"
+ " switch( " << ACT() << " ) {\n";
+
+ /* If the switch handles error then we also forced the error state. It
+ * will exist. */
+ if ( item->tokenRegion->lmSwitchHandlesError ) {
+ ret << " case 0: " //<< P() << " = " << TOKSTART() << ";" <<
+ "goto st" << redFsm->errState->id << ";\n";
+ }
+
+ for ( TokenInstanceListReg::Iter lmi = item->tokenRegion->tokenInstanceList; lmi.lte(); lmi++ ) {
+ if ( lmi->inLmSelect ) {
+ assert( lmi->tokenDef->tdLangEl != 0 );
+ ret << " case " << lmi->longestMatchId << ":\n";
+ EMIT_TOKEN( ret, lmi->tokenDef->tdLangEl );
+ ret << " break;\n";
+ }
+ }
+
+ ret <<
+ " }\n"
+ "\t"
+ " goto skip_toklen;\n";
+
+ skipTokenLabelNeeded = true;
+}
+
+void FsmCodeGen::LM_ON_LAST( ostream &ret, InlineItem *item )
+{
+ assert( item->longestMatchPart->tokenDef->tdLangEl != 0 );
+
+ ret << " " << P() << " += 1;\n";
+ EMIT_TOKEN( ret, item->longestMatchPart->tokenDef->tdLangEl );
+ ret << " goto out;\n";
+}
+
+void FsmCodeGen::LM_ON_NEXT( ostream &ret, InlineItem *item )
+{
+ assert( item->longestMatchPart->tokenDef->tdLangEl != 0 );
+
+ EMIT_TOKEN( ret, item->longestMatchPart->tokenDef->tdLangEl );
+ ret << " goto out;\n";
+}
+
+void FsmCodeGen::LM_ON_LAG_BEHIND( ostream &ret, InlineItem *item )
+{
+ assert( item->longestMatchPart->tokenDef->tdLangEl != 0 );
+
+ ret << " " << TOKLEN() << " = " << TOKEND() << ";\n";
+ EMIT_TOKEN( ret, item->longestMatchPart->tokenDef->tdLangEl );
+ ret << " goto skip_toklen;\n";
+
+ skipTokenLabelNeeded = true;
+}
+
+
+/* Write out an inline tree structure. Walks the list and possibly calls out
+ * to virtual functions than handle language specific items in the tree. */
+void FsmCodeGen::INLINE_LIST( ostream &ret, InlineList *inlineList,
+ int targState, bool inFinish )
+{
+ for ( InlineList::Iter item = *inlineList; item.lte(); item++ ) {
+ switch ( item->type ) {
+ case InlineItem::Text:
+ assert( false );
+ break;
+ case InlineItem::LmSetActId:
+ SET_ACT( ret, item );
+ break;
+ case InlineItem::LmSetTokEnd:
+ SET_TOKEND( ret, item );
+ break;
+ case InlineItem::LmInitTokStart:
+ assert( false );
+ break;
+ case InlineItem::LmInitAct:
+ INIT_ACT( ret, item );
+ break;
+ case InlineItem::LmSetTokStart:
+ SET_TOKSTART( ret, item );
+ break;
+ case InlineItem::LmSwitch:
+ LM_SWITCH( ret, item, targState, inFinish );
+ break;
+ case InlineItem::LmOnLast:
+ LM_ON_LAST( ret, item );
+ break;
+ case InlineItem::LmOnNext:
+ LM_ON_NEXT( ret, item );
+ break;
+ case InlineItem::LmOnLagBehind:
+ LM_ON_LAG_BEHIND( ret, item );
+ break;
+ }
+ }
+}
+
+/* Write out paths in line directives. Escapes any special characters. */
+string FsmCodeGen::LDIR_PATH( char *path )
+{
+ ostringstream ret;
+ for ( char *pc = path; *pc != 0; pc++ ) {
+ if ( *pc == '\\' )
+ ret << "\\\\";
+ else
+ ret << *pc;
+ }
+ return ret.str();
+}
+
+void FsmCodeGen::ACTION( ostream &ret, GenAction *action, int targState, bool inFinish )
+{
+ /* Write the block and close it off. */
+ ret << "\t{";
+ INLINE_LIST( ret, action->inlineList, targState, inFinish );
+
+ if ( action->markId > 0 )
+ ret << "mark[" << action->markId-1 << "] = " << P() << ";\n";
+
+ ret << "}\n";
+
+}
+
+void FsmCodeGen::CONDITION( ostream &ret, GenAction *condition )
+{
+ ret << "\n";
+ INLINE_LIST( ret, condition->inlineList, 0, false );
+}
+
+string FsmCodeGen::ERROR_STATE()
+{
+ ostringstream ret;
+ if ( redFsm->errState != 0 )
+ ret << redFsm->errState->id;
+ else
+ ret << "-1";
+ return ret.str();
+}
+
+string FsmCodeGen::FIRST_FINAL_STATE()
+{
+ ostringstream ret;
+ if ( redFsm->firstFinState != 0 )
+ ret << redFsm->firstFinState->id;
+ else
+ ret << redFsm->nextStateId;
+ return ret.str();
+}
+
+string FsmCodeGen::DATA_PREFIX()
+{
+ if ( dataPrefix )
+ return FSM_NAME() + "_";
+ return "";
+}
+
+/* Emit the alphabet data type. */
+string FsmCodeGen::ALPH_TYPE()
+{
+ string ret = keyOps->alphType->data1;
+ if ( keyOps->alphType->data2 != 0 ) {
+ ret += " ";
+ ret += + keyOps->alphType->data2;
+ }
+ return ret;
+}
+
+/* Emit the alphabet data type. */
+string FsmCodeGen::WIDE_ALPH_TYPE()
+{
+ string ret;
+ ret = ALPH_TYPE();
+ return ret;
+}
+
+
+string FsmCodeGen::PTR_CONST()
+{
+ return "const ";
+}
+
+std::ostream &FsmCodeGen::OPEN_ARRAY( string type, string name )
+{
+ out << "static const " << type << " " << name << "[] = {\n";
+ return out;
+}
+
+std::ostream &FsmCodeGen::CLOSE_ARRAY()
+{
+ return out << "};\n";
+}
+
+std::ostream &FsmCodeGen::STATIC_VAR( string type, string name )
+{
+ out << "static const " << type << " " << name;
+ return out;
+}
+
+string FsmCodeGen::UINT( )
+{
+ return "unsigned int";
+}
+
+string FsmCodeGen::ARR_OFF( string ptr, string offset )
+{
+ return ptr + " + " + offset;
+}
+
+string FsmCodeGen::CAST( string type )
+{
+ return "(" + type + ")";
+}
+
+std::ostream &FsmCodeGen::TO_STATE_ACTION_SWITCH()
+{
+ /* Walk the list of functions, printing the cases. */
+ for ( GenActionList::Iter act = redFsm->genActionList; act.lte(); act++ ) {
+ /* Write out referenced actions. */
+ if ( act->numToStateRefs > 0 ) {
+ /* Write the case label, the action and the case break. */
+ out << "\tcase " << act->actionId << ":\n";
+ ACTION( out, act, 0, false );
+ out << "\tbreak;\n";
+ }
+ }
+
+ return out;
+}
+
+std::ostream &FsmCodeGen::FROM_STATE_ACTION_SWITCH()
+{
+ /* Walk the list of functions, printing the cases. */
+ for ( GenActionList::Iter act = redFsm->genActionList; act.lte(); act++ ) {
+ /* Write out referenced actions. */
+ if ( act->numFromStateRefs > 0 ) {
+ /* Write the case label, the action and the case break. */
+ out << "\tcase " << act->actionId << ":\n";
+ ACTION( out, act, 0, false );
+ out << "\tbreak;\n";
+ }
+ }
+
+ return out;
+}
+
+std::ostream &FsmCodeGen::ACTION_SWITCH()
+{
+ /* Walk the list of functions, printing the cases. */
+ for ( GenActionList::Iter act = redFsm->genActionList; act.lte(); act++ ) {
+ /* Write out referenced actions. */
+ if ( act->numTransRefs > 0 ) {
+ /* Write the case label, the action and the case break. */
+ out << "\tcase " << act->actionId << ":\n";
+ ACTION( out, act, 0, false );
+ out << "\tbreak;\n";
+ }
+ }
+
+ return out;
+}
+
+void FsmCodeGen::emitSingleSwitch( RedState *state )
+{
+ /* Load up the singles. */
+ int numSingles = state->outSingle.length();
+ RedTransEl *data = state->outSingle.data;
+
+ if ( numSingles == 1 ) {
+ /* If there is a single single key then write it out as an if. */
+ out << "\tif ( " << GET_WIDE_KEY(state) << " == " <<
+ KEY(data[0].lowKey) << " )\n\t\t";
+
+ /* Virtual function for writing the target of the transition. */
+ TRANS_GOTO(data[0].value, 0) << "\n";
+ }
+ else if ( numSingles > 1 ) {
+ /* Write out single keys in a switch if there is more than one. */
+ out << "\tswitch( " << GET_WIDE_KEY(state) << " ) {\n";
+
+ /* Write out the single indicies. */
+ for ( int j = 0; j < numSingles; j++ ) {
+ out << "\t\tcase " << KEY(data[j].lowKey) << ": ";
+ TRANS_GOTO(data[j].value, 0) << "\n";
+ }
+
+ /* Close off the transition switch. */
+ out << "\t}\n";
+ }
+}
+
+void FsmCodeGen::emitRangeBSearch( RedState *state, int level, int low, int high )
+{
+ /* Get the mid position, staying on the lower end of the range. */
+ int mid = (low + high) >> 1;
+ RedTransEl *data = state->outRange.data;
+
+ /* Determine if we need to look higher or lower. */
+ bool anyLower = mid > low;
+ bool anyHigher = mid < high;
+
+ /* Determine if the keys at mid are the limits of the alphabet. */
+ bool limitLow = data[mid].lowKey == keyOps->minKey;
+ bool limitHigh = data[mid].highKey == keyOps->maxKey;
+
+ if ( anyLower && anyHigher ) {
+ /* Can go lower and higher than mid. */
+ out << TABS(level) << "if ( " << GET_WIDE_KEY(state) << " < " <<
+ KEY(data[mid].lowKey) << " ) {\n";
+ emitRangeBSearch( state, level+1, low, mid-1 );
+ out << TABS(level) << "} else if ( " << GET_WIDE_KEY(state) << " > " <<
+ KEY(data[mid].highKey) << " ) {\n";
+ emitRangeBSearch( state, level+1, mid+1, high );
+ out << TABS(level) << "} else\n";
+ TRANS_GOTO(data[mid].value, level+1) << "\n";
+ }
+ else if ( anyLower && !anyHigher ) {
+ /* Can go lower than mid but not higher. */
+ out << TABS(level) << "if ( " << GET_WIDE_KEY(state) << " < " <<
+ KEY(data[mid].lowKey) << " ) {\n";
+ emitRangeBSearch( state, level+1, low, mid-1 );
+
+ /* if the higher is the highest in the alphabet then there is no
+ * sense testing it. */
+ if ( limitHigh ) {
+ out << TABS(level) << "} else\n";
+ TRANS_GOTO(data[mid].value, level+1) << "\n";
+ }
+ else {
+ out << TABS(level) << "} else if ( " << GET_WIDE_KEY(state) << " <= " <<
+ KEY(data[mid].highKey) << " )\n";
+ TRANS_GOTO(data[mid].value, level+1) << "\n";
+ }
+ }
+ else if ( !anyLower && anyHigher ) {
+ /* Can go higher than mid but not lower. */
+ out << TABS(level) << "if ( " << GET_WIDE_KEY(state) << " > " <<
+ KEY(data[mid].highKey) << " ) {\n";
+ emitRangeBSearch( state, level+1, mid+1, high );
+
+ /* If the lower end is the lowest in the alphabet then there is no
+ * sense testing it. */
+ if ( limitLow ) {
+ out << TABS(level) << "} else\n";
+ TRANS_GOTO(data[mid].value, level+1) << "\n";
+ }
+ else {
+ out << TABS(level) << "} else if ( " << GET_WIDE_KEY(state) << " >= " <<
+ KEY(data[mid].lowKey) << " )\n";
+ TRANS_GOTO(data[mid].value, level+1) << "\n";
+ }
+ }
+ else {
+ /* Cannot go higher or lower than mid. It's mid or bust. What
+ * tests to do depends on limits of alphabet. */
+ if ( !limitLow && !limitHigh ) {
+ out << TABS(level) << "if ( " << KEY(data[mid].lowKey) << " <= " <<
+ GET_WIDE_KEY(state) << " && " << GET_WIDE_KEY(state) << " <= " <<
+ KEY(data[mid].highKey) << " )\n";
+ TRANS_GOTO(data[mid].value, level+1) << "\n";
+ }
+ else if ( limitLow && !limitHigh ) {
+ out << TABS(level) << "if ( " << GET_WIDE_KEY(state) << " <= " <<
+ KEY(data[mid].highKey) << " )\n";
+ TRANS_GOTO(data[mid].value, level+1) << "\n";
+ }
+ else if ( !limitLow && limitHigh ) {
+ out << TABS(level) << "if ( " << KEY(data[mid].lowKey) << " <= " <<
+ GET_WIDE_KEY(state) << " )\n";
+ TRANS_GOTO(data[mid].value, level+1) << "\n";
+ }
+ else {
+ /* Both high and low are at the limit. No tests to do. */
+ TRANS_GOTO(data[mid].value, level+1) << "\n";
+ }
+ }
+}
+
+std::ostream &FsmCodeGen::STATE_GOTOS()
+{
+ for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) {
+ if ( st == redFsm->errState )
+ STATE_GOTO_ERROR();
+ else {
+ /* Writing code above state gotos. */
+ GOTO_HEADER( st );
+
+ /* Try singles. */
+ if ( st->outSingle.length() > 0 )
+ emitSingleSwitch( st );
+
+ /* Default case is to binary search for the ranges, if that fails then */
+ if ( st->outRange.length() > 0 )
+ emitRangeBSearch( st, 1, 0, st->outRange.length() - 1 );
+
+ /* Write the default transition. */
+ TRANS_GOTO( st->defTrans, 1 ) << "\n";
+ }
+ }
+ return out;
+}
+
+unsigned int FsmCodeGen::TO_STATE_ACTION( RedState *state )
+{
+ int act = 0;
+ if ( state->toStateAction != 0 )
+ act = state->toStateAction->location+1;
+ return act;
+}
+
+unsigned int FsmCodeGen::FROM_STATE_ACTION( RedState *state )
+{
+ int act = 0;
+ if ( state->fromStateAction != 0 )
+ act = state->fromStateAction->location+1;
+ return act;
+}
+
+std::ostream &FsmCodeGen::TO_STATE_ACTIONS()
+{
+ /* Take one off for the psuedo start state. */
+ int numStates = redFsm->stateList.length();
+ unsigned int *vals = new unsigned int[numStates];
+ memset( vals, 0, sizeof(unsigned int)*numStates );
+
+ for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ )
+ vals[st->id] = TO_STATE_ACTION(st);
+
+ out << "\t";
+ for ( int st = 0; st < redFsm->nextStateId; st++ ) {
+ /* Write any eof action. */
+ out << vals[st];
+ if ( st < numStates-1 ) {
+ out << ", ";
+ if ( (st+1) % IALL == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n";
+ delete[] vals;
+ return out;
+}
+
+std::ostream &FsmCodeGen::FROM_STATE_ACTIONS()
+{
+ /* Take one off for the psuedo start state. */
+ int numStates = redFsm->stateList.length();
+ unsigned int *vals = new unsigned int[numStates];
+ memset( vals, 0, sizeof(unsigned int)*numStates );
+
+ for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ )
+ vals[st->id] = FROM_STATE_ACTION(st);
+
+ out << "\t";
+ for ( int st = 0; st < redFsm->nextStateId; st++ ) {
+ /* Write any eof action. */
+ out << vals[st];
+ if ( st < numStates-1 ) {
+ out << ", ";
+ if ( (st+1) % IALL == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n";
+ delete[] vals;
+ return out;
+}
+
+bool FsmCodeGen::IN_TRANS_ACTIONS( RedState *state )
+{
+ /* Emit any transitions that have actions and that go to this state. */
+ for ( int it = 0; it < state->numInTrans; it++ ) {
+ RedTrans *trans = state->inTrans[it];
+ if ( trans->action != 0 && trans->labelNeeded ) {
+ /* Write the label for the transition so it can be jumped to. */
+ out << "tr" << trans->id << ":\n";
+
+ /* If the action contains a next, then we must preload the current
+ * state since the action may or may not set it. */
+ if ( trans->action->anyNextStmt() )
+ out << " " << CS() << " = " << trans->targ->id << ";\n";
+
+ /* Write each action in the list. */
+ for ( GenActionTable::Iter item = trans->action->key; item.lte(); item++ )
+ ACTION( out, item->value, trans->targ->id, false );
+
+ out << "\tgoto st" << trans->targ->id << ";\n";
+ }
+ }
+
+ return 0;
+}
+
+/* Called from FsmCodeGen::STATE_GOTOS just before writing the gotos for each
+ * state. */
+void FsmCodeGen::GOTO_HEADER( RedState *state )
+{
+ IN_TRANS_ACTIONS( state );
+
+ if ( state->labelNeeded )
+ out << "st" << state->id << ":\n";
+
+ if ( state->toStateAction != 0 ) {
+ /* Remember that we wrote an action. Write every action in the list. */
+ for ( GenActionTable::Iter item = state->toStateAction->key; item.lte(); item++ )
+ ACTION( out, item->value, state->id, false );
+ }
+
+ /* Give the state a switch case. */
+ out << "case " << state->id << ":\n";
+
+ /* Advance and test buffer pos. */
+ out <<
+ " if ( ++" << P() << " == " << PE() << " )\n"
+ " goto out" << state->id << ";\n";
+
+ if ( state->fromStateAction != 0 ) {
+ /* Remember that we wrote an action. Write every action in the list. */
+ for ( GenActionTable::Iter item = state->fromStateAction->key; item.lte(); item++ )
+ ACTION( out, item->value, state->id, false );
+ }
+
+ /* Record the prev state if necessary. */
+ if ( state->anyRegCurStateRef() )
+ out << " _ps = " << state->id << ";\n";
+}
+
+void FsmCodeGen::STATE_GOTO_ERROR()
+{
+ /* In the error state we need to emit some stuff that usually goes into
+ * the header. */
+ RedState *state = redFsm->errState;
+ IN_TRANS_ACTIONS( state );
+
+ if ( state->labelNeeded )
+ out << "st" << state->id << ":\n";
+
+ /* We do not need a case label here because the the error state is checked
+ * at the head of the loop. */
+
+ /* Break out here. */
+ out << " goto out" << state->id << ";\n";
+}
+
+
+/* Emit the goto to take for a given transition. */
+std::ostream &FsmCodeGen::TRANS_GOTO( RedTrans *trans, int level )
+{
+ if ( trans->action != 0 ) {
+ /* Go to the transition which will go to the state. */
+ out << TABS(level) << "goto tr" << trans->id << ";";
+ }
+ else {
+ /* Go directly to the target state. */
+ out << TABS(level) << "goto st" << trans->targ->id << ";";
+ }
+ return out;
+}
+
+std::ostream &FsmCodeGen::EXIT_STATES()
+{
+ for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) {
+ out << " case " << st->id << ": out" << st->id << ": ";
+ if ( st->eofTrans != 0 ) {
+ out << "if ( " << DATA_EOF() << " ) {";
+ TRANS_GOTO( st->eofTrans, 0 );
+ out << "\n";
+ out << "}";
+ }
+
+ /* Exit. */
+ out << CS() << " = " << st->id << "; goto out; \n";
+ }
+ return out;
+}
+
+/* Set up labelNeeded flag for each state. */
+void FsmCodeGen::setLabelsNeeded()
+{
+ /* Do not use all labels by default, init all labelNeeded vars to false. */
+ for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ )
+ st->labelNeeded = false;
+
+ if ( redFsm->errState != 0 && redFsm->anyLmSwitchError() )
+ redFsm->errState->labelNeeded = true;
+
+ /* Walk all transitions and set only those that have targs. */
+ for ( RedTransSet::Iter trans = redFsm->transSet; trans.lte(); trans++ ) {
+ /* If there is no action with a next statement, then the label will be
+ * needed. */
+ if ( trans->action == 0 || !trans->action->anyNextStmt() )
+ trans->targ->labelNeeded = true;
+ }
+
+ for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ )
+ st->outNeeded = st->labelNeeded;
+}
+
+void FsmCodeGen::writeData()
+{
+ out << "#define " << START() << " " << START_STATE_ID() << "\n";
+ out << "#define " << FIRST_FINAL() << " " << FIRST_FINAL_STATE() << "\n";
+ out << "#define " << ERROR() << " " << ERROR_STATE() << "\n";
+ out << "#define false 0\n";
+ out << "#define true 1\n";
+ out << "\n";
+
+ out << "static long " << ENTRY_BY_REGION() << "[] = {\n\t";
+ for ( int i = 0; i < fsmTables->numRegions; i++ ) {
+ out << fsmTables->entryByRegion[i];
+
+ if ( i < fsmTables->numRegions-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out <<
+ "static FsmTables fsmTables_start =\n"
+ "{\n"
+ " 0, " /* actions */
+ " 0, " /* keyOffsets */
+ " 0, " /* transKeys */
+ " 0, " /* singleLengths */
+ " 0, " /* rangeLengths */
+ " 0, " /* indexOffsets */
+ " 0, " /* transTargsWI */
+ " 0, " /* transActionsWI */
+ " 0, " /* toStateActions */
+ " 0, " /* fromStateActions */
+ " 0, " /* eofActions */
+ " 0,\n" /* eofTargs */
+ " " << ENTRY_BY_REGION() << ",\n"
+
+ "\n"
+ " 0, " /* numStates */
+ " 0, " /* numActions */
+ " 0, " /* numTransKeys */
+ " 0, " /* numSingleLengths */
+ " 0, " /* numRangeLengths */
+ " 0, " /* numIndexOffsets */
+ " 0, " /* numTransTargsWI */
+ " 0,\n" /* numTransActionsWI */
+ " " << redFsm->regionToEntry.length() << ",\n"
+ "\n"
+ " " << START() << ",\n"
+ " " << FIRST_FINAL() << ",\n"
+ " " << ERROR() << ",\n"
+ "\n"
+ " 0,\n" /* actionSwitch */
+ " 0\n" /* numActionSwitch */
+ "};\n"
+ "\n";
+}
+
+void FsmCodeGen::writeInit()
+{
+ out <<
+ " " << CS() << " = " << START() << ";\n";
+
+ /* If there are any calls, then the stack top needs initialization. */
+ if ( redFsm->anyActionCalls() || redFsm->anyActionRets() )
+ out << "\t" << TOP() << " = 0;\n";
+
+ out <<
+ " " << TOKSTART() << " = 0;\n"
+ " " << TOKEND() << " = 0;\n"
+ " " << ACT() << " = 0;\n";
+
+ out << "\n";
+}
+
+void FsmCodeGen::writeExec()
+{
+ setLabelsNeeded();
+
+ out <<
+ "static void fsmExecute( FsmRun *fsmRun, StreamImpl *inputStream )\n"
+ "{\n"
+ " " << BLOCK_START() << " = fsmRun->p;\n"
+ "/*_resume:*/\n";
+
+ if ( redFsm->errState != 0 ) {
+ out <<
+ " if ( " << CS() << " == " << redFsm->errState->id << " )\n"
+ " goto out;\n";
+ }
+
+ out <<
+ " if ( " << P() << " == " << PE() << " )\n"
+ " goto out_switch;\n"
+ " --" << P() << ";\n"
+ "\n"
+ " switch ( " << CS() << " )\n {\n";
+ STATE_GOTOS() <<
+ " }\n";
+
+ out <<
+ "out_switch:\n"
+ " switch ( " << CS() << " )\n {\n";
+ EXIT_STATES() <<
+ " }\n";
+
+ out <<
+ "out:\n"
+ " if ( " << P() << " != 0 )\n"
+ " " << TOKLEN() << " += " << P() << " - " << BLOCK_START() << ";\n";
+
+ if ( skipTokenLabelNeeded ) {
+ out <<
+ "skip_toklen:\n"
+ " {}\n";
+ }
+
+ out <<
+ "}\n"
+ "\n";
+}
+
+void FsmCodeGen::writeIncludes()
+{
+ out <<
+ "#include <colm/pdarun.h>\n"
+ "#include <colm/debug.h>\n"
+ "#include <colm/bytecode.h>\n"
+ "#include <stdio.h>\n"
+ "#include <stdlib.h>\n"
+ "#include <string.h>\n"
+ "#include <assert.h>\n"
+ "#include <colm/config.h>\n"
+ "#include <colm/defs.h>\n"
+ "#include <colm/input.h>\n"
+ "#include <colm/tree.h>\n"
+ "#include <colm/program.h>\n"
+ "#include <colm/colm.h>\n"
+ "\n"
+ "\n";
+}
+
+void FsmCodeGen::writeCode()
+{
+ redFsm->depthFirstOrdering();
+
+ writeData();
+ writeExec();
+
+ /* Referenced in the runtime lib, but used only in the compiler. Probably
+ * should use the preprocessor to make these go away. */
+ out <<
+ "static void sendNamedLangEl( Program *prg, Tree **tree, PdaRun *pdaRun,\n"
+ " FsmRun *fsmRun, StreamImpl *inputStream ) { }\n"
+ "static void initBindings( PdaRun *pdaRun ) {}\n"
+ "static void popBinding( PdaRun *pdaRun, ParseTree *tree ) {}\n"
+ "\n"
+ "\n";
+}
+
+
diff --git a/src/fsmcodegen.h b/src/fsmcodegen.h
new file mode 100644
index 0000000..7c88dc8
--- /dev/null
+++ b/src/fsmcodegen.h
@@ -0,0 +1,206 @@
+/*
+ * Copyright 2001-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _FSMCODEGEN_H
+#define _FSMCODEGEN_H
+
+#include <iostream>
+#include <string>
+#include <stdio.h>
+#include "keyops.h"
+#include "parsedata.h"
+#include "redfsm.h"
+
+using std::string;
+using std::ostream;
+
+/* Integer array line length. */
+#define IALL 8
+
+/* Forwards. */
+struct RedFsm;
+struct RedState;
+struct GenAction;
+struct NameInst;
+struct RedAction;
+struct LongestMatch;
+struct TokenInstance;
+struct InlineList;
+struct InlineItem;
+struct NameInst;
+struct FsmCodeGen;
+
+typedef unsigned long ulong;
+typedef unsigned char uchar;
+
+
+/*
+ * The interface to the parser
+ */
+
+std::ostream *openOutput( char *inputFile );
+
+inline string itoa( int i )
+{
+ char buf[16];
+ sprintf( buf, "%i", i );
+ return buf;
+}
+
+/*
+ * class FsmCodeGen
+ */
+class FsmCodeGen
+{
+public:
+ FsmCodeGen( ostream &out, RedFsm *redFsm, FsmTables *fsmTables );
+
+protected:
+
+ string FSM_NAME();
+ string START_STATE_ID();
+ ostream &ACTIONS_ARRAY();
+ string GET_WIDE_KEY();
+ string GET_WIDE_KEY( RedState *state );
+ string TABS( int level );
+ string KEY( Key key );
+ string LDIR_PATH( char *path );
+ void ACTION( ostream &ret, GenAction *action, int targState, bool inFinish );
+ void CONDITION( ostream &ret, GenAction *condition );
+ string ALPH_TYPE();
+ string WIDE_ALPH_TYPE();
+ string ARRAY_TYPE( unsigned long maxVal );
+
+ string ARR_OFF( string ptr, string offset );
+ string CAST( string type );
+ string UINT();
+ string GET_KEY();
+
+ string ACCESS() { return "fsmRun->"; }
+
+ string P() { return ACCESS() + "p"; }
+ string PE() { return ACCESS() + "pe"; }
+ string DATA_EOF() { return ACCESS() + "eof"; }
+
+ string CS();
+ string TOP() { return ACCESS() + "top"; }
+ string TOKSTART() { return ACCESS() + "tokstart"; }
+ string TOKEND() { return ACCESS() + "tokend"; }
+ string BLOCK_START() { return ACCESS() + "start"; }
+ string TOKLEN() { return ACCESS() + "toklen"; }
+ string ACT() { return ACCESS() + "act"; }
+ string MATCHED_TOKEN() { return ACCESS() + "matchedToken"; }
+
+ string DATA_PREFIX();
+
+ string START() { return DATA_PREFIX() + "start"; }
+ string ERROR() { return DATA_PREFIX() + "error"; }
+ string FIRST_FINAL() { return DATA_PREFIX() + "first_final"; }
+
+ string ENTRY_BY_REGION() { return DATA_PREFIX() + "entryByRegion"; }
+
+
+ void INLINE_LIST( ostream &ret, InlineList *inlineList,
+ int targState, bool inFinish );
+ void EXEC_TOKEND( ostream &ret, InlineItem *item, int targState, int inFinish );
+ void EXECTE( ostream &ret, InlineItem *item, int targState, int inFinish );
+ void LM_SWITCH( ostream &ret, InlineItem *item, int targState, int inFinish );
+ void SET_ACT( ostream &ret, InlineItem *item );
+ void INIT_TOKSTART( ostream &ret, InlineItem *item );
+ void INIT_ACT( ostream &ret, InlineItem *item );
+ void SET_TOKSTART( ostream &ret, InlineItem *item );
+ void SET_TOKEND( ostream &ret, InlineItem *item );
+ void GET_TOKEND( ostream &ret, InlineItem *item );
+ void SUB_ACTION( ostream &ret, InlineItem *item, int targState, bool inFinish );
+ void LM_ON_LAST( ostream &ret, InlineItem *item );
+ void LM_ON_NEXT( ostream &ret, InlineItem *item );
+ void LM_ON_LAG_BEHIND( ostream &ret, InlineItem *item );
+ void EXEC_TOKEND( ostream &ret );
+ void EMIT_TOKEN( ostream &ret, LangEl *token );
+
+ string ERROR_STATE();
+ string FIRST_FINAL_STATE();
+
+ string PTR_CONST();
+ ostream &OPEN_ARRAY( string type, string name );
+ ostream &CLOSE_ARRAY();
+ ostream &STATIC_VAR( string type, string name );
+
+ string CTRL_FLOW();
+
+ unsigned int arrayTypeSize( unsigned long maxVal );
+
+public:
+ ostream &out;
+ RedFsm *redFsm;
+ FsmTables *fsmTables;
+ int codeGenErrCount;
+
+ /* Write options. */
+ bool dataPrefix;
+ bool writeFirstFinal;
+ bool writeErr;
+ bool skipTokenLabelNeeded;
+
+ std::ostream &TO_STATE_ACTION_SWITCH();
+ std::ostream &FROM_STATE_ACTION_SWITCH();
+ std::ostream &ACTION_SWITCH();
+ std::ostream &STATE_GOTOS();
+ std::ostream &TRANSITIONS();
+ std::ostream &EXEC_FUNCS();
+
+ unsigned int TO_STATE_ACTION( RedState *state );
+ unsigned int FROM_STATE_ACTION( RedState *state );
+
+ std::ostream &TO_STATE_ACTIONS();
+ std::ostream &FROM_STATE_ACTIONS();
+
+ void emitCondBSearch( RedState *state, int level, int low, int high );
+ void STATE_CONDS( RedState *state, bool genDefault );
+
+ void emitSingleSwitch( RedState *state );
+ void emitRangeBSearch( RedState *state, int level, int low, int high );
+
+ std::ostream &EXIT_STATES();
+ std::ostream &TRANS_GOTO( RedTrans *trans, int level );
+ std::ostream &FINISH_CASES();
+
+ void writeIncludes();
+ void writeData();
+ void writeInit();
+ void writeExec();
+ void writeCode();
+ void writeMain( long activeRealm );
+
+protected:
+ bool useAgainLabel();
+
+ /* Called from GotoCodeGen::STATE_GOTOS just before writing the gotos for
+ * each state. */
+ bool IN_TRANS_ACTIONS( RedState *state );
+ void GOTO_HEADER( RedState *state );
+ void STATE_GOTO_ERROR();
+
+ /* Set up labelNeeded flag for each state. */
+ void setLabelsNeeded();
+};
+
+#endif /* _FSMCODEGEN_H */
diff --git a/src/fsmexec.cc b/src/fsmexec.cc
new file mode 100644
index 0000000..bec899f
--- /dev/null
+++ b/src/fsmexec.cc
@@ -0,0 +1,223 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <string.h>
+#include <iostream>
+
+#include "config.h"
+#include "defs.h"
+#include "redfsm.h"
+#include "parsedata.h"
+#include "parsetree.h"
+#include "pdarun.h"
+#include "global.h"
+
+void execAction( FsmRun *fsmRun, GenAction *genAction )
+{
+ for ( InlineList::Iter item = *genAction->inlineList; item.lte(); item++ ) {
+ switch ( item->type ) {
+ case InlineItem::Text:
+ assert(false);
+ break;
+ case InlineItem::LmSetActId:
+ fsmRun->act = item->longestMatchPart->longestMatchId;
+ break;
+ case InlineItem::LmSetTokEnd:
+ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1;
+ break;
+ case InlineItem::LmInitTokStart:
+ assert(false);
+ break;
+ case InlineItem::LmInitAct:
+ fsmRun->act = 0;
+ break;
+ case InlineItem::LmSetTokStart:
+ fsmRun->tokstart = fsmRun->p;
+ break;
+ case InlineItem::LmSwitch:
+ /* If the switch handles error then we also forced the error state. It
+ * will exist. */
+ fsmRun->toklen = fsmRun->tokend;
+ if ( item->tokenRegion->lmSwitchHandlesError && fsmRun->act == 0 ) {
+ fsmRun->cs = fsmRun->tables->errorState;
+ }
+ else {
+ for ( TokenInstanceListReg::Iter lmi = item->tokenRegion->tokenInstanceList;
+ lmi.lte(); lmi++ )
+ {
+ if ( lmi->inLmSelect && fsmRun->act == lmi->longestMatchId )
+ fsmRun->matchedToken = lmi->tokenDef->tdLangEl->id;
+ }
+ }
+ fsmRun->returnResult = true;
+ fsmRun->skipToklen = true;
+ break;
+ case InlineItem::LmOnLast:
+ fsmRun->p += 1;
+ fsmRun->matchedToken = item->longestMatchPart->tokenDef->tdLangEl->id;
+ fsmRun->returnResult = true;
+ break;
+ case InlineItem::LmOnNext:
+ fsmRun->matchedToken = item->longestMatchPart->tokenDef->tdLangEl->id;
+ fsmRun->returnResult = true;
+ break;
+ case InlineItem::LmOnLagBehind:
+ fsmRun->toklen = fsmRun->tokend;
+ fsmRun->matchedToken = item->longestMatchPart->tokenDef->tdLangEl->id;
+ fsmRun->returnResult = true;
+ fsmRun->skipToklen = true;
+ break;
+ }
+ }
+
+ if ( genAction->markType == MarkMark )
+ fsmRun->mark[genAction->markId-1] = fsmRun->p;
+}
+
+extern "C" void internalFsmExecute( FsmRun *fsmRun, StreamImpl *inputStream )
+{
+ int _klen;
+ unsigned int _trans;
+ const long *_acts;
+ unsigned int _nacts;
+ const char *_keys;
+
+ fsmRun->start = fsmRun->p;
+
+ /* Init the token match to nothing (the sentinal). */
+ fsmRun->matchedToken = 0;
+
+/*_resume:*/
+ if ( fsmRun->cs == fsmRun->tables->errorState )
+ goto out;
+
+ if ( fsmRun->p == fsmRun->pe )
+ goto out;
+
+_loop_head:
+ _acts = fsmRun->tables->actions + fsmRun->tables->fromStateActions[fsmRun->cs];
+ _nacts = (unsigned int) *_acts++;
+ while ( _nacts-- > 0 )
+ execAction( fsmRun, fsmRun->tables->actionSwitch[*_acts++] );
+
+ _keys = fsmRun->tables->transKeys + fsmRun->tables->keyOffsets[fsmRun->cs];
+ _trans = fsmRun->tables->indexOffsets[fsmRun->cs];
+
+ _klen = fsmRun->tables->singleLengths[fsmRun->cs];
+ if ( _klen > 0 ) {
+ const char *_lower = _keys;
+ const char *_mid;
+ const char *_upper = _keys + _klen - 1;
+ while (1) {
+ if ( _upper < _lower )
+ break;
+
+ _mid = _lower + ((_upper-_lower) >> 1);
+ if ( (*fsmRun->p) < *_mid )
+ _upper = _mid - 1;
+ else if ( (*fsmRun->p) > *_mid )
+ _lower = _mid + 1;
+ else {
+ _trans += (_mid - _keys);
+ goto _match;
+ }
+ }
+ _keys += _klen;
+ _trans += _klen;
+ }
+
+ _klen = fsmRun->tables->rangeLengths[fsmRun->cs];
+ if ( _klen > 0 ) {
+ const char *_lower = _keys;
+ const char *_mid;
+ const char *_upper = _keys + (_klen<<1) - 2;
+ while (1) {
+ if ( _upper < _lower )
+ break;
+
+ _mid = _lower + (((_upper-_lower) >> 1) & ~1);
+ if ( (*fsmRun->p) < _mid[0] )
+ _upper = _mid - 2;
+ else if ( (*fsmRun->p) > _mid[1] )
+ _lower = _mid + 2;
+ else {
+ _trans += ((_mid - _keys)>>1);
+ goto _match;
+ }
+ }
+ _trans += _klen;
+ }
+
+_match:
+ fsmRun->cs = fsmRun->tables->transTargsWI[_trans];
+
+ if ( fsmRun->tables->transActionsWI[_trans] == 0 )
+ goto _again;
+
+ fsmRun->returnResult = false;
+ fsmRun->skipToklen = false;
+ _acts = fsmRun->tables->actions + fsmRun->tables->transActionsWI[_trans];
+ _nacts = (unsigned int) *_acts++;
+ while ( _nacts-- > 0 )
+ execAction( fsmRun, fsmRun->tables->actionSwitch[*_acts++] );
+ if ( fsmRun->returnResult ) {
+ if ( fsmRun->skipToklen )
+ goto skip_toklen;
+ goto final;
+ }
+
+_again:
+ _acts = fsmRun->tables->actions + fsmRun->tables->toStateActions[fsmRun->cs];
+ _nacts = (unsigned int) *_acts++;
+ while ( _nacts-- > 0 )
+ execAction( fsmRun, fsmRun->tables->actionSwitch[*_acts++] );
+
+ if ( fsmRun->cs == fsmRun->tables->errorState )
+ goto out;
+
+ if ( ++fsmRun->p != fsmRun->pe )
+ goto _loop_head;
+out:
+ if ( fsmRun->eof ) {
+ fsmRun->returnResult = false;
+ fsmRun->skipToklen = false;
+ _acts = fsmRun->tables->actions + fsmRun->tables->eofActions[fsmRun->cs];
+ _nacts = (unsigned int) *_acts++;
+
+ if ( fsmRun->tables->eofTargs[fsmRun->cs] >= 0 )
+ fsmRun->cs = fsmRun->tables->eofTargs[fsmRun->cs];
+
+ while ( _nacts-- > 0 )
+ execAction( fsmRun, fsmRun->tables->actionSwitch[*_acts++] );
+ if ( fsmRun->returnResult ) {
+ if ( fsmRun->skipToklen )
+ goto skip_toklen;
+ goto final;
+ }
+ }
+
+final:
+
+ if ( fsmRun->p != 0 )
+ fsmRun->toklen += fsmRun->p - fsmRun->start;
+skip_toklen:
+ {}
+}
diff --git a/src/fsmgraph.cc b/src/fsmgraph.cc
new file mode 100644
index 0000000..bf2d244
--- /dev/null
+++ b/src/fsmgraph.cc
@@ -0,0 +1,982 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <assert.h>
+#include <iostream>
+
+#include "config.h"
+#include "defs.h"
+#include "fsmgraph.h"
+#include "mergesort.h"
+
+using std::cerr;
+using std::endl;
+
+/* Make a new state. The new state will be put on the graph's
+ * list of state. The new state can be created final or non final. */
+FsmState *FsmGraph::addState()
+{
+ /* Make the new state to return. */
+ FsmState *state = new FsmState();
+
+ if ( misfitAccounting ) {
+ /* Create the new state on the misfit list. All states are created
+ * with no foreign in transitions. */
+ misfitList.append( state );
+ }
+ else {
+ /* Create the new state. */
+ stateList.append( state );
+ }
+
+ return state;
+}
+
+/* Construct an FSM that is the concatenation of an array of characters. A new
+ * machine will be made that has len+1 states with one transition between each
+ * state for each integer in str. IsSigned determines if the integers are to
+ * be considered as signed or unsigned ints. */
+void FsmGraph::concatFsm( Key *str, int len )
+{
+ /* Make the first state and set it as the start state. */
+ FsmState *last = addState();
+ setStartState( last );
+
+ /* Attach subsequent states. */
+ for ( int i = 0; i < len; i++ ) {
+ FsmState *newState = addState();
+ attachNewTrans( last, newState, str[i], str[i] );
+ last = newState;
+ }
+
+ /* Make the last state the final state. */
+ setFinState( last );
+}
+
+/* Case insensitive version of concatFsm. */
+void FsmGraph::concatFsmCI( Key *str, int len )
+{
+ /* Make the first state and set it as the start state. */
+ FsmState *last = addState();
+ setStartState( last );
+
+ /* Attach subsequent states. */
+ for ( int i = 0; i < len; i++ ) {
+ FsmState *newState = addState();
+
+ KeySet keySet;
+ if ( str[i].isLower() )
+ keySet.insert( str[i].toUpper() );
+ if ( str[i].isUpper() )
+ keySet.insert( str[i].toLower() );
+ keySet.insert( str[i] );
+
+ for ( int i = 0; i < keySet.length(); i++ )
+ attachNewTrans( last, newState, keySet[i], keySet[i] );
+
+ last = newState;
+ }
+
+ /* Make the last state the final state. */
+ setFinState( last );
+}
+
+/* Construct a machine that matches one character. A new machine will be made
+ * that has two states with a single transition between the states. IsSigned
+ * determines if the integers are to be considered as signed or unsigned ints. */
+void FsmGraph::concatFsm( Key chr )
+{
+ /* Two states first start, second final. */
+ setStartState( addState() );
+
+ FsmState *end = addState();
+ setFinState( end );
+
+ /* Attach on the character. */
+ attachNewTrans( startState, end, chr, chr );
+}
+
+/* Construct a machine that matches any character in set. A new machine will
+ * be made that has two states and len transitions between the them. The set
+ * should be ordered correctly accroding to KeyOps and should not contain
+ * any duplicates. */
+void FsmGraph::orFsm( Key *set, int len )
+{
+ /* Two states first start, second final. */
+ setStartState( addState() );
+
+ FsmState *end = addState();
+ setFinState( end );
+
+ for ( int i = 1; i < len; i++ )
+ assert( set[i-1] < set[i] );
+
+ /* Attach on all the integers in the given string of ints. */
+ for ( int i = 0; i < len; i++ )
+ attachNewTrans( startState, end, set[i], set[i] );
+}
+
+/* Construct a machine that matches a range of characters. A new machine will
+ * be made with two states and a range transition between them. The range will
+ * match any characters from low to high inclusive. Low should be less than or
+ * equal to high otherwise undefined behaviour results. IsSigned determines
+ * if the integers are to be considered as signed or unsigned ints. */
+void FsmGraph::rangeFsm( Key low, Key high )
+{
+ /* Two states first start, second final. */
+ setStartState( addState() );
+
+ FsmState *end = addState();
+ setFinState( end );
+
+ /* Attach using the range of characters. */
+ attachNewTrans( startState, end, low, high );
+}
+
+/* Construct a machine that a repeated range of characters. */
+void FsmGraph::rangeStarFsm( Key low, Key high)
+{
+ /* One state which is final and is the start state. */
+ setStartState( addState() );
+ setFinState( startState );
+
+ /* Attach start to start using range of characters. */
+ attachNewTrans( startState, startState, low, high );
+}
+
+/* Construct a machine that matches the empty string. A new machine will be
+ * made with only one state. The new state will be both a start and final
+ * state. IsSigned determines if the machine has a signed or unsigned
+ * alphabet. Fsm operations must be done on machines with the same alphabet
+ * signedness. */
+void FsmGraph::lambdaFsm( )
+{
+ /* Give it one state with no transitions making it
+ * the start state and final state. */
+ setStartState( addState() );
+ setFinState( startState );
+}
+
+/* Construct a machine that matches nothing at all. A new machine will be
+ * made with only one state. It will not be final. */
+void FsmGraph::emptyFsm( )
+{
+ /* Give it one state with no transitions making it
+ * the start state and final state. */
+ setStartState( addState() );
+}
+
+void FsmGraph::transferOutData( FsmState *destState, FsmState *srcState )
+{
+ for ( TransList::Iter trans = destState->outList; trans.lte(); trans++ ) {
+ if ( trans->toState != 0 ) {
+ /* Get the actions data from the outActionTable. */
+ trans->actionTable.setActions( srcState->outActionTable );
+
+ /* Get the priorities from the outPriorTable. */
+ trans->priorTable.setPriors( srcState->outPriorTable );
+ }
+ }
+}
+
+/* Kleene star operator. Makes this machine the kleene star of itself. Any
+ * transitions made going out of the machine and back into itself will be
+ * notified that they are leaving transitions by having the leavingFromState
+ * callback invoked. */
+void FsmGraph::starOp( )
+{
+ /* For the merging process. */
+ MergeData md;
+
+ /* Turn on misfit accounting to possibly catch the old start state. */
+ setMisfitAccounting( true );
+
+ /* Create the new new start state. It will be set final after the merging
+ * of the final states with the start state is complete. */
+ FsmState *prevStartState = startState;
+ unsetStartState();
+ setStartState( addState() );
+
+ /* Merge the new start state with the old one to isolate it. */
+ mergeStates( md, startState, prevStartState );
+
+ /* Merge the start state into all final states. Except the start state on
+ * the first pass. If the start state is set final we will be doubling up
+ * its transitions, which will get transfered to any final states that
+ * follow it in the final state set. This will be determined by the order
+ * of items in the final state set. To prevent this we just merge with the
+ * start on a second pass. */
+ for ( StateSet::Iter st = finStateSet; st.lte(); st++ ) {
+ if ( *st != startState )
+ mergeStatesLeaving( md, *st, startState );
+ }
+
+ /* Now it is safe to merge the start state with itself (provided it
+ * is set final). */
+ if ( startState->isFinState() )
+ mergeStatesLeaving( md, startState, startState );
+
+ /* Now ensure the new start state is a final state. */
+ setFinState( startState );
+
+ /* Fill in any states that were newed up as combinations of others. */
+ fillInStates( md );
+
+ /* Remove the misfits and turn off misfit accounting. */
+ removeMisfits();
+ setMisfitAccounting( false );
+}
+
+void FsmGraph::repeatOp( int times )
+{
+ /* Must be 1 and up. 0 produces null machine and requires deleting this. */
+ assert( times > 0 );
+
+ /* A repeat of one does absolutely nothing. */
+ if ( times == 1 )
+ return;
+
+ /* Make a machine to make copies from. */
+ FsmGraph *copyFrom = new FsmGraph( *this );
+
+ /* Concatentate duplicates onto the end up until before the last. */
+ for ( int i = 1; i < times-1; i++ ) {
+ FsmGraph *dup = new FsmGraph( *copyFrom );
+ doConcat( dup, 0, false );
+ }
+
+ /* Now use the copyFrom on the end. */
+ doConcat( copyFrom, 0, false );
+}
+
+void FsmGraph::optionalRepeatOp( int times )
+{
+ /* Must be 1 and up. 0 produces null machine and requires deleting this. */
+ assert( times > 0 );
+
+ /* A repeat of one optional merely allows zero string. */
+ if ( times == 1 ) {
+ setFinState( startState );
+ return;
+ }
+
+ /* Make a machine to make copies from. */
+ FsmGraph *copyFrom = new FsmGraph( *this );
+
+ /* The state set used in the from end of the concatentation. Starts with
+ * the initial final state set, then after each concatenation, gets set to
+ * the the final states that come from the the duplicate. */
+ StateSet lastFinSet( finStateSet );
+
+ /* Set the initial state to zero to allow zero copies. */
+ setFinState( startState );
+
+ /* Concatentate duplicates onto the end up until before the last. */
+ for ( int i = 1; i < times-1; i++ ) {
+ /* Make a duplicate for concating and set the fin bits to graph 2 so we
+ * can pick out it's final states after the optional style concat. */
+ FsmGraph *dup = new FsmGraph( *copyFrom );
+ dup->setFinBits( SB_GRAPH2 );
+ doConcat( dup, &lastFinSet, true );
+
+ /* Clear the last final state set and make the new one by taking only
+ * the final states that come from graph 2.*/
+ lastFinSet.empty();
+ for ( int i = 0; i < finStateSet.length(); i++ ) {
+ /* If the state came from graph 2, add it to the last set and clear
+ * the bits. */
+ FsmState *fs = finStateSet[i];
+ if ( fs->stateBits & SB_GRAPH2 ) {
+ lastFinSet.insert( fs );
+ fs->stateBits &= ~SB_GRAPH2;
+ }
+ }
+ }
+
+ /* Now use the copyFrom on the end, no bits set, no bits to clear. */
+ doConcat( copyFrom, &lastFinSet, true );
+}
+
+
+/* Fsm concatentation worker. Supports treating the concatentation as optional,
+ * which essentially leaves the final states of machine one as final. */
+void FsmGraph::doConcat( FsmGraph *other, StateSet *fromStates, bool optional )
+{
+ /* For the merging process. */
+ StateSet finStateSetCopy, startStateSet;
+ MergeData md;
+
+ /* Turn on misfit accounting for both graphs. */
+ setMisfitAccounting( true );
+ other->setMisfitAccounting( true );
+
+ /* Get the other's start state. */
+ FsmState *otherStartState = other->startState;
+
+ /* Unset other's start state before bringing in the entry points. */
+ other->unsetStartState();
+
+ /* Bring in the rest of other's entry points. */
+ copyInEntryPoints( other );
+ other->entryPoints.empty();
+
+ /* Bring in other's states into our state lists. */
+ stateList.append( other->stateList );
+ misfitList.append( other->misfitList );
+
+ /* If from states is not set, then get a copy of our final state set before
+ * we clobber it and use it instead. */
+ if ( fromStates == 0 ) {
+ finStateSetCopy = finStateSet;
+ fromStates = &finStateSetCopy;
+ }
+
+ /* Unset all of our final states and get the final states from other. */
+ if ( !optional )
+ unsetAllFinStates();
+ finStateSet.insert( other->finStateSet );
+
+ /* Since other's lists are empty, we can delete the fsm without
+ * affecting any states. */
+ delete other;
+
+ /* Merge our former final states with the start state of other. */
+ for ( int i = 0; i < fromStates->length(); i++ ) {
+ FsmState *state = fromStates->data[i];
+
+ /* Merge the former final state with other's start state. */
+ mergeStatesLeaving( md, state, otherStartState );
+
+ /* If the former final state was not reset final then we must clear
+ * the state's out trans data. If it got reset final then it gets to
+ * keep its out trans data. This must be done before fillInStates gets
+ * called to prevent the data from being sourced. */
+ if ( ! state->isFinState() )
+ clearOutData( state );
+ }
+
+ /* Fill in any new states made from merging. */
+ fillInStates( md );
+
+ /* Remove the misfits and turn off misfit accounting. */
+ removeMisfits();
+ setMisfitAccounting( false );
+}
+
+/* Concatenates other to the end of this machine. Other is deleted. Any
+ * transitions made leaving this machine and entering into other are notified
+ * that they are leaving transitions by having the leavingFromState callback
+ * invoked. */
+void FsmGraph::concatOp( FsmGraph *other )
+{
+ /* Assert same signedness and return graph concatenation op. */
+ doConcat( other, 0, false );
+}
+
+
+void FsmGraph::doOr( FsmGraph *other )
+{
+ /* For the merging process. */
+ MergeData md;
+
+ /* Build a state set consisting of both start states */
+ StateSet startStateSet;
+ startStateSet.insert( startState );
+ startStateSet.insert( other->startState );
+
+ /* Both of the original start states loose their start state status. */
+ unsetStartState();
+ other->unsetStartState();
+
+ /* Bring in the rest of other's entry points. */
+ copyInEntryPoints( other );
+ other->entryPoints.empty();
+
+ /* Merge the lists. This will move all the states from other
+ * into this. No states will be deleted. */
+ stateList.append( other->stateList );
+ misfitList.append( other->misfitList );
+
+ /* Move the final set data from other into this. */
+ finStateSet.insert(other->finStateSet);
+ other->finStateSet.empty();
+
+ /* Since other's list is empty, we can delete the fsm without
+ * affecting any states. */
+ delete other;
+
+ /* Create a new start state. */
+ setStartState( addState() );
+
+ /* Merge the start states. */
+ mergeStates( md, startState, startStateSet.data, startStateSet.length() );
+
+ /* Fill in any new states made from merging. */
+ fillInStates( md );
+}
+
+/* Unions other with this machine. Other is deleted. */
+void FsmGraph::unionOp( FsmGraph *other )
+{
+ /* Turn on misfit accounting for both graphs. */
+ setMisfitAccounting( true );
+ other->setMisfitAccounting( true );
+
+ /* Call Worker routine. */
+ doOr( other );
+
+ /* Remove the misfits and turn off misfit accounting. */
+ removeMisfits();
+ setMisfitAccounting( false );
+}
+
+/* Intersects other with this machine. Other is deleted. */
+void FsmGraph::intersectOp( FsmGraph *other )
+{
+ /* Turn on misfit accounting for both graphs. */
+ setMisfitAccounting( true );
+ other->setMisfitAccounting( true );
+
+ /* Set the fin bits on this and other to want each other. */
+ setFinBits( SB_GRAPH1 );
+ other->setFinBits( SB_GRAPH2 );
+
+ /* Call worker Or routine. */
+ doOr( other );
+
+ /* Unset any final states that are no longer to
+ * be final due to final bits. */
+ unsetIncompleteFinals();
+
+ /* Remove the misfits and turn off misfit accounting. */
+ removeMisfits();
+ setMisfitAccounting( false );
+
+ /* Remove states that have no path to a final state. */
+ removeDeadEndStates();
+}
+
+/* Set subtracts other machine from this machine. Other is deleted. */
+void FsmGraph::subtractOp( FsmGraph *other )
+{
+ /* Turn on misfit accounting for both graphs. */
+ setMisfitAccounting( true );
+ other->setMisfitAccounting( true );
+
+ /* Set the fin bits of other to be killers. */
+ other->setFinBits( SB_GRAPH1 );
+
+ /* Call worker Or routine. */
+ doOr( other );
+
+ /* Unset any final states that are no longer to
+ * be final due to final bits. */
+ unsetKilledFinals();
+
+ /* Remove the misfits and turn off misfit accounting. */
+ removeMisfits();
+ setMisfitAccounting( false );
+
+ /* Remove states that have no path to a final state. */
+ removeDeadEndStates();
+}
+
+bool FsmGraph::inEptVect( EptVect *eptVect, FsmState *state )
+{
+ if ( eptVect != 0 ) {
+ /* Vect is there, walk it looking for state. */
+ for ( int i = 0; i < eptVect->length(); i++ ) {
+ if ( eptVect->data[i].targ == state )
+ return true;
+ }
+ }
+ return false;
+}
+
+/* Fill epsilon vectors in a root state from a given starting point. Epmploys
+ * a depth first search through the graph of epsilon transitions. */
+void FsmGraph::epsilonFillEptVectFrom( FsmState *root, FsmState *from, bool parentLeaving )
+{
+ /* Walk the epsilon transitions out of the state. */
+ for ( EpsilonTrans::Iter ep = from->epsilonTrans; ep.lte(); ep++ ) {
+ /* Find the entry point, if the it does not resove, ignore it. */
+ EntryMapEl *enLow, *enHigh;
+ if ( entryPoints.findMulti( *ep, enLow, enHigh ) ) {
+ /* Loop the targets. */
+ for ( EntryMapEl *en = enLow; en <= enHigh; en++ ) {
+ /* Do not add the root or states already in eptVect. */
+ FsmState *targ = en->value;
+ if ( targ != from && !inEptVect(root->eptVect, targ) ) {
+ /* Maybe need to create the eptVect. */
+ if ( root->eptVect == 0 )
+ root->eptVect = new EptVect();
+
+ /* If moving to a different graph or if any parent is
+ * leaving then we are leaving. */
+ bool leaving = parentLeaving ||
+ root->owningGraph != targ->owningGraph;
+
+ /* All ok, add the target epsilon and recurse. */
+ root->eptVect->append( EptVectEl(targ, leaving) );
+ epsilonFillEptVectFrom( root, targ, leaving );
+ }
+ }
+ }
+ }
+}
+
+void FsmGraph::shadowReadWriteStates( MergeData &md )
+{
+ /* Init isolatedShadow algorithm data. */
+ for ( StateList::Iter st = stateList; st.lte(); st++ )
+ st->isolatedShadow = 0;
+
+ /* Any states that may be both read from and written to must
+ * be shadowed. */
+ for ( StateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Find such states by looping through stateVect lists, which give us
+ * the states that will be read from. May cause us to visit the states
+ * that we are interested in more than once. */
+ if ( st->eptVect != 0 ) {
+ /* For all states that will be read from. */
+ for ( EptVect::Iter ept = *st->eptVect; ept.lte(); ept++ ) {
+ /* Check for read and write to the same state. */
+ FsmState *targ = ept->targ;
+ if ( targ->eptVect != 0 ) {
+ /* State is to be written to, if the shadow is not already
+ * there, create it. */
+ if ( targ->isolatedShadow == 0 ) {
+ FsmState *shadow = addState();
+ mergeStates( md, shadow, targ );
+ targ->isolatedShadow = shadow;
+ }
+
+ /* Write shadow into the state vector so that it is the
+ * state that the epsilon transition will read from. */
+ ept->targ = targ->isolatedShadow;
+ }
+ }
+ }
+ }
+}
+
+void FsmGraph::resolveEpsilonTrans( MergeData &md )
+{
+ /* Walk the state list and invoke recursive worker on each state. */
+ for ( StateList::Iter st = stateList; st.lte(); st++ )
+ epsilonFillEptVectFrom( st, st, false );
+
+ /* Prevent reading from and writing to of the same state. */
+ shadowReadWriteStates( md );
+
+ /* For all states that have epsilon transitions out, draw the transitions,
+ * clear the epsilon transitions. */
+ for ( StateList::Iter st = stateList; st.lte(); st++ ) {
+ /* If there is a state vector, then create the pre-merge state. */
+ if ( st->eptVect != 0 ) {
+ /* Merge all the epsilon targets into the state. */
+ for ( EptVect::Iter ept = *st->eptVect; ept.lte(); ept++ ) {
+ if ( ept->leaving )
+ mergeStatesLeaving( md, st, ept->targ );
+ else
+ mergeStates( md, st, ept->targ );
+ }
+
+ /* Clean up the target list. */
+ delete st->eptVect;
+ st->eptVect = 0;
+ }
+
+ /* Clear the epsilon transitions vector. */
+ st->epsilonTrans.empty();
+ }
+}
+
+void FsmGraph::epsilonOp()
+{
+ /* For merging process. */
+ MergeData md;
+
+ setMisfitAccounting( true );
+
+ for ( StateList::Iter st = stateList; st.lte(); st++ )
+ st->owningGraph = 0;
+
+ /* Perform merges. */
+ resolveEpsilonTrans( md );
+
+ /* Epsilons can caused merges which leave behind unreachable states. */
+ fillInStates( md );
+
+ /* Remove the misfits and turn off misfit accounting. */
+ removeMisfits();
+ setMisfitAccounting( false );
+}
+
+/* Make a new maching by joining together a bunch of machines without making
+ * any transitions between them. A negative finalId results in there being no
+ * final id. */
+void FsmGraph::joinOp( int startId, int finalId, FsmGraph **others, int numOthers )
+{
+ /* For the merging process. */
+ MergeData md;
+
+ /* Set the owning machines. Start at one. Zero is reserved for the start
+ * and final states. */
+ for ( StateList::Iter st = stateList; st.lte(); st++ )
+ st->owningGraph = 1;
+ for ( int m = 0; m < numOthers; m++ ) {
+ for ( StateList::Iter st = others[m]->stateList; st.lte(); st++ )
+ st->owningGraph = 2+m;
+ }
+
+ /* All machines loose start state status. */
+ unsetStartState();
+ for ( int m = 0; m < numOthers; m++ )
+ others[m]->unsetStartState();
+
+ /* Bring the other machines into this. */
+ for ( int m = 0; m < numOthers; m++ ) {
+ /* Bring in the rest of other's entry points. */
+ copyInEntryPoints( others[m] );
+ others[m]->entryPoints.empty();
+
+ /* Merge the lists. This will move all the states from other into
+ * this. No states will be deleted. */
+ stateList.append( others[m]->stateList );
+ assert( others[m]->misfitList.length() == 0 );
+
+ /* Move the final set data from other into this. */
+ finStateSet.insert( others[m]->finStateSet );
+ others[m]->finStateSet.empty();
+
+ /* Since other's list is empty, we can delete the fsm without
+ * affecting any states. */
+ delete others[m];
+ }
+
+ /* Look up the start entry point. */
+ EntryMapEl *enLow = 0, *enHigh = 0;
+ bool findRes = entryPoints.findMulti( startId, enLow, enHigh );
+ if ( ! findRes ) {
+ /* No start state. Set a default one and proceed with the join. Note
+ * that the result of the join will be a very uninteresting machine. */
+ setStartState( addState() );
+ }
+ else {
+ /* There is at least one start state, create a state that will become
+ * the new start state. */
+ FsmState *newStart = addState();
+ setStartState( newStart );
+
+ /* The start state is in an owning machine class all it's own. */
+ newStart->owningGraph = 0;
+
+ /* Create the set of states to merge from. */
+ StateSet stateSet;
+ for ( EntryMapEl *en = enLow; en <= enHigh; en++ )
+ stateSet.insert( en->value );
+
+ /* Merge in the set of start states into the new start state. */
+ mergeStates( md, newStart, stateSet.data, stateSet.length() );
+ }
+
+ /* Take a copy of the final state set, before unsetting them all. This
+ * will allow us to call clearOutData on the states that don't get
+ * final state status back back. */
+ StateSet finStateSetCopy = finStateSet;
+
+ /* Now all final states are unset. */
+ unsetAllFinStates();
+
+ if ( finalId >= 0 ) {
+ /* Create the implicit final state. */
+ FsmState *finState = addState();
+ setFinState( finState );
+
+ /* Assign an entry into the final state on the final state entry id. Note
+ * that there may already be an entry on this id. That's ok. Also set the
+ * final state owning machine id. It's in a class all it's own. */
+ setEntry( finalId, finState );
+ finState->owningGraph = 0;
+ }
+
+ /* Hand over to workers for resolving epsilon trans. This will merge states
+ * with the targets of their epsilon transitions. */
+ resolveEpsilonTrans( md );
+
+ /* Invoke the relinquish final callback on any states that did not get
+ * final state status back. */
+ for ( StateSet::Iter st = finStateSetCopy; st.lte(); st++ ) {
+ if ( !((*st)->stateBits & SB_ISFINAL) )
+ clearOutData( *st );
+ }
+
+ /* Fill in any new states made from merging. */
+ fillInStates( md );
+
+ /* Joining can be messy. Instead of having misfit accounting on (which is
+ * tricky here) do a full cleaning. */
+ removeUnreachableStates();
+}
+
+void FsmGraph::globOp( FsmGraph **others, int numOthers )
+{
+ /* All other machines loose start states status. */
+ for ( int m = 0; m < numOthers; m++ )
+ others[m]->unsetStartState();
+
+ /* Bring the other machines into this. */
+ for ( int m = 0; m < numOthers; m++ ) {
+ /* Bring in the rest of other's entry points. */
+ copyInEntryPoints( others[m] );
+ others[m]->entryPoints.empty();
+
+ /* Merge the lists. This will move all the states from other into
+ * this. No states will be deleted. */
+ stateList.append( others[m]->stateList );
+ assert( others[m]->misfitList.length() == 0 );
+
+ /* Move the final set data from other into this. */
+ finStateSet.insert( others[m]->finStateSet );
+ others[m]->finStateSet.empty();
+
+ /* Since other's list is empty, we can delete the fsm without
+ * affecting any states. */
+ delete others[m];
+ }
+}
+
+void FsmGraph::deterministicEntry()
+{
+ /* For the merging process. */
+ MergeData md;
+
+ /* States may loose their entry points, turn on misfit accounting. */
+ setMisfitAccounting( true );
+
+ /* Get a copy of the entry map then clear all the entry points. As we
+ * iterate the old entry map finding duplicates we will add the entry
+ * points for the new states that we create. */
+ EntryMap prevEntry = entryPoints;
+ unsetAllEntryPoints();
+
+ for ( int enId = 0; enId < prevEntry.length(); ) {
+ /* Count the number of states on this entry key. */
+ int highId = enId;
+ while ( highId < prevEntry.length() && prevEntry[enId].key == prevEntry[highId].key )
+ highId += 1;
+
+ int numIds = highId - enId;
+ if ( numIds == 1 ) {
+ /* Only a single entry point, just set the entry. */
+ setEntry( prevEntry[enId].key, prevEntry[enId].value );
+ }
+ else {
+ /* Multiple entry points, need to create a new state and merge in
+ * all the targets of entry points. */
+ FsmState *newEntry = addState();
+ for ( int en = enId; en < highId; en++ )
+ mergeStates( md, newEntry, prevEntry[en].value );
+
+ /* Add the new state as the single entry point. */
+ setEntry( prevEntry[enId].key, newEntry );
+ }
+
+ enId += numIds;
+ }
+
+ /* The old start state may be unreachable. Remove the misfits and turn off
+ * misfit accounting. */
+ removeMisfits();
+ setMisfitAccounting( false );
+}
+
+/* Unset any final states that are no longer to be final due to final bits. */
+void FsmGraph::unsetKilledFinals()
+{
+ /* Duplicate the final state set before we begin modifying it. */
+ StateSet fin( finStateSet );
+
+ for ( int s = 0; s < fin.length(); s++ ) {
+ /* Check for killing bit. */
+ FsmState *state = fin.data[s];
+ if ( state->stateBits & SB_GRAPH1 ) {
+ /* One final state is a killer, set to non-final. */
+ unsetFinState( state );
+ }
+
+ /* Clear all killing bits. Non final states should never have had those
+ * state bits set in the first place. */
+ state->stateBits &= ~SB_GRAPH1;
+ }
+}
+
+/* Unset any final states that are no longer to be final due to final bits. */
+void FsmGraph::unsetIncompleteFinals()
+{
+ /* Duplicate the final state set before we begin modifying it. */
+ StateSet fin( finStateSet );
+
+ for ( int s = 0; s < fin.length(); s++ ) {
+ /* Check for one set but not the other. */
+ FsmState *state = fin.data[s];
+ if ( state->stateBits & SB_BOTH &&
+ (state->stateBits & SB_BOTH) != SB_BOTH )
+ {
+ /* One state wants the other but it is not there. */
+ unsetFinState( state );
+ }
+
+ /* Clear wanting bits. Non final states should never have had those
+ * state bits set in the first place. */
+ state->stateBits &= ~SB_BOTH;
+ }
+}
+
+/* Ensure that the start state is free of entry points (aside from the fact
+ * that it is the start state). If the start state has entry points then Make a
+ * new start state by merging with the old one. Useful before modifying start
+ * transitions. If the existing start state has any entry points other than the
+ * start state entry then modifying its transitions changes more than the start
+ * transitions. So isolate the start state by separating it out such that it
+ * only has start stateness as it's entry point. */
+void FsmGraph::isolateStartState( )
+{
+ /* For the merging process. */
+ MergeData md;
+
+ /* Bail out if the start state is already isolated. */
+ if ( isStartStateIsolated() )
+ return;
+
+ /* Turn on misfit accounting to possibly catch the old start state. */
+ setMisfitAccounting( true );
+
+ /* This will be the new start state. The existing start
+ * state is merged with it. */
+ FsmState *prevStartState = startState;
+ unsetStartState();
+ setStartState( addState() );
+
+ /* Merge the new start state with the old one to isolate it. */
+ mergeStates( md, startState, prevStartState );
+
+ /* Stfil and stateDict will be empty because the merging of the old start
+ * state into the new one will not have any conflicting transitions. */
+ assert( md.stateDict.treeSize == 0 );
+ assert( md.stfillHead == 0 );
+
+ /* The old start state may be unreachable. Remove the misfits and turn off
+ * misfit accounting. */
+ removeMisfits();
+ setMisfitAccounting( false );
+}
+
+/* A state merge which represents the drawing in of leaving transitions. If
+ * there is any out data then we duplicate the souce state, transfer the out
+ * data, then merge in the state. The new state will be reaped because it will
+ * not be given any in transitions. */
+void FsmGraph::mergeStatesLeaving( MergeData &md, FsmState *destState, FsmState *srcState )
+{
+ if ( !hasOutData( destState ) )
+ mergeStates( md, destState, srcState );
+ else {
+ FsmState *ssMutable = addState();
+ mergeStates( md, ssMutable, srcState );
+ transferOutData( ssMutable, destState );
+ mergeStates( md, destState, ssMutable );
+ }
+}
+
+void FsmGraph::mergeStates( MergeData &md, FsmState *destState,
+ FsmState **srcStates, int numSrc )
+{
+ for ( int s = 0; s < numSrc; s++ )
+ mergeStates( md, destState, srcStates[s] );
+}
+
+void FsmGraph::mergeStates( MergeData &md, FsmState *destState, FsmState *srcState )
+{
+ outTransCopy( md, destState, srcState->outList.head );
+
+ /* Get its bits and final state status. */
+ destState->stateBits |= ( srcState->stateBits & ~SB_ISFINAL );
+ if ( srcState->isFinState() )
+ setFinState( destState );
+
+ /* Draw in any properties of srcState into destState. */
+ if ( srcState == destState ) {
+ /* Duplicate the list to protect against write to source. The
+ * priorities sets are not copied in because that would have no
+ * effect. */
+ destState->epsilonTrans.append( EpsilonTrans( srcState->epsilonTrans ) );
+
+ /* Get all actions, duplicating to protect against write to source. */
+ destState->toStateActionTable.setActions(
+ ActionTable( srcState->toStateActionTable ) );
+ destState->fromStateActionTable.setActions(
+ ActionTable( srcState->fromStateActionTable ) );
+ destState->outActionTable.setActions( ActionTable( srcState->outActionTable ) );
+ destState->outCondSet.insert( ActionSet( srcState->outCondSet ) );
+ destState->errActionTable.setActions( ErrActionTable( srcState->errActionTable ) );
+ destState->eofActionTable.setActions( ActionTable( srcState->eofActionTable ) );
+ }
+ else {
+ /* Get the epsilons, out priorities. */
+ destState->epsilonTrans.append( srcState->epsilonTrans );
+ destState->outPriorTable.setPriors( srcState->outPriorTable );
+
+ /* Get all actions. */
+ destState->toStateActionTable.setActions( srcState->toStateActionTable );
+ destState->fromStateActionTable.setActions( srcState->fromStateActionTable );
+ destState->outActionTable.setActions( srcState->outActionTable );
+ destState->outCondSet.insert( srcState->outCondSet );
+ destState->errActionTable.setActions( srcState->errActionTable );
+ destState->eofActionTable.setActions( srcState->eofActionTable );
+ }
+}
+
+void FsmGraph::fillInStates( MergeData &md )
+{
+ /* Merge any states that are awaiting merging. This will likey cause
+ * other states to be added to the stfil list. */
+ FsmState *state = md.stfillHead;
+ while ( state != 0 ) {
+ StateSet *stateSet = &state->stateDictEl->stateSet;
+ mergeStates( md, state, stateSet->data, stateSet->length() );
+ state = state->alg.next;
+ }
+
+ /* Delete the state sets of all states that are on the fill list. */
+ state = md.stfillHead;
+ while ( state != 0 ) {
+ /* Delete and reset the state set. */
+ delete state->stateDictEl;
+ state->stateDictEl = 0;
+
+ /* Next state in the stfill list. */
+ state = state->alg.next;
+ }
+
+ /* StateDict will still have its ptrs/size set but all of it's element
+ * will be deleted so we don't need to clean it up. */
+}
diff --git a/src/fsmgraph.h b/src/fsmgraph.h
new file mode 100644
index 0000000..9a0f2ae
--- /dev/null
+++ b/src/fsmgraph.h
@@ -0,0 +1,1317 @@
+/*
+ * Copyright 2001-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _FSMGRAPH_H
+#define _FSMGRAPH_H
+
+#include <assert.h>
+#include "keyops.h"
+#include "vector.h"
+#include "bstset.h"
+#include "compare.h"
+#include "avltree.h"
+#include "dlist.h"
+#include "bstmap.h"
+#include "sbstmap.h"
+#include "sbstset.h"
+#include "sbsttable.h"
+#include "avlset.h"
+#include "avlmap.h"
+
+/* Flags that control merging. */
+#define SB_GRAPH1 0x01
+#define SB_GRAPH2 0x02
+#define SB_BOTH 0x03
+#define SB_ISFINAL 0x04
+#define SB_ISMARKED 0x08
+#define SB_ONLIST 0x10
+
+struct FsmTrans;
+struct FsmState;
+struct FsmGraph;
+struct Action;
+struct TokenInstance;
+struct NameInst;
+
+/* State list element for unambiguous access to list element. */
+struct FsmListEl
+{
+ FsmState *prev, *next;
+};
+
+/* This is the marked index for a state pair. Used in minimization. It keeps
+ * track of whether or not the state pair is marked. */
+struct MarkIndex
+{
+ MarkIndex(int states);
+ ~MarkIndex();
+
+ void markPair(int state1, int state2);
+ bool isPairMarked(int state1, int state2);
+
+private:
+ int numStates;
+ bool *array;
+};
+
+extern KeyOps *keyOps;
+
+/* Transistion Action Element. */
+typedef SBstMapEl< int, Action* > ActionTableEl;
+
+/* Transition Action Table. */
+struct ActionTable
+ : public SBstMap< int, Action*, CmpOrd<int> >
+{
+ void setAction( int ordering, Action *action );
+ void setActions( int *orderings, Action **actions, int nActs );
+ void setActions( const ActionTable &other );
+
+ bool hasAction( Action *action );
+};
+
+typedef SBstSet< Action*, CmpOrd<Action*> > ActionSet;
+typedef CmpSTable< Action*, CmpOrd<Action*> > CmpActionSet;
+
+/* Transistion Action Element. */
+typedef SBstMapEl< int, TokenInstance* > LmActionTableEl;
+
+/* Transition Action Table. */
+struct LmActionTable
+ : public SBstMap< int, TokenInstance*, CmpOrd<int> >
+{
+ void setAction( int ordering, TokenInstance *action );
+ void setActions( const LmActionTable &other );
+};
+
+/* Compare of a whole action table element (key & value). */
+struct CmpActionTableEl
+{
+ static int compare( const ActionTableEl &action1,
+ const ActionTableEl &action2 )
+ {
+ if ( action1.key < action2.key )
+ return -1;
+ else if ( action1.key > action2.key )
+ return 1;
+ else if ( action1.value < action2.value )
+ return -1;
+ else if ( action1.value > action2.value )
+ return 1;
+ return 0;
+ }
+};
+
+/* Compare for ActionTable. */
+typedef CmpSTable< ActionTableEl, CmpActionTableEl > CmpActionTable;
+
+/* Compare of a whole lm action table element (key & value). */
+struct CmpLmActionTableEl
+{
+ static int compare( const LmActionTableEl &lmAction1,
+ const LmActionTableEl &lmAction2 )
+ {
+ if ( lmAction1.key < lmAction2.key )
+ return -1;
+ else if ( lmAction1.key > lmAction2.key )
+ return 1;
+ else if ( lmAction1.value < lmAction2.value )
+ return -1;
+ else if ( lmAction1.value > lmAction2.value )
+ return 1;
+ return 0;
+ }
+};
+
+/* Compare for ActionTable. */
+typedef CmpSTable< LmActionTableEl, CmpLmActionTableEl > CmpLmActionTable;
+
+/* Action table element for error action tables. Adds the encoding of transfer
+ * point. */
+struct ErrActionTableEl
+{
+ ErrActionTableEl( Action *action, int ordering, int transferPoint )
+ : ordering(ordering), action(action), transferPoint(transferPoint) { }
+
+ /* Ordering and id of the action embedding. */
+ int ordering;
+ Action *action;
+
+ /* Id of point of transfere from Error action table to transtions and
+ * eofActionTable. */
+ int transferPoint;
+
+ int getKey() const { return ordering; }
+};
+
+struct ErrActionTable
+ : public SBstTable< ErrActionTableEl, int, CmpOrd<int> >
+{
+ void setAction( int ordering, Action *action, int transferPoint );
+ void setActions( const ErrActionTable &other );
+};
+
+/* Compare of an error action table element (key & value). */
+struct CmpErrActionTableEl
+{
+ static int compare( const ErrActionTableEl &action1,
+ const ErrActionTableEl &action2 )
+ {
+ if ( action1.ordering < action2.ordering )
+ return -1;
+ else if ( action1.ordering > action2.ordering )
+ return 1;
+ else if ( action1.action < action2.action )
+ return -1;
+ else if ( action1.action > action2.action )
+ return 1;
+ else if ( action1.transferPoint < action2.transferPoint )
+ return -1;
+ else if ( action1.transferPoint > action2.transferPoint )
+ return 1;
+ return 0;
+ }
+};
+
+/* Compare for ErrActionTable. */
+typedef CmpSTable< ErrActionTableEl, CmpErrActionTableEl > CmpErrActionTable;
+
+
+/* Descibe a priority, shared among PriorEls.
+ * Has key and whether or not used. */
+struct PriorDesc
+{
+ int key;
+ int priority;
+};
+
+/* Element in the arrays of priorities for transitions and arrays. Ordering is
+ * unique among instantiations of machines, desc is shared. */
+struct PriorEl
+{
+ PriorEl( int ordering, PriorDesc *desc )
+ : ordering(ordering), desc(desc) { }
+
+ int ordering;
+ PriorDesc *desc;
+};
+
+/* Compare priority elements, which are ordered by the priority descriptor
+ * key. */
+struct PriorElCmp
+{
+ static inline int compare( const PriorEl &pel1, const PriorEl &pel2 )
+ {
+ if ( pel1.desc->key < pel2.desc->key )
+ return -1;
+ else if ( pel1.desc->key > pel2.desc->key )
+ return 1;
+ else
+ return 0;
+ }
+};
+
+
+/* Priority Table. */
+struct PriorTable
+ : public SBstSet< PriorEl, PriorElCmp >
+{
+ void setPrior( int ordering, PriorDesc *desc );
+ void setPriors( const PriorTable &other );
+};
+
+/* Compare of prior table elements for distinguising state data. */
+struct CmpPriorEl
+{
+ static inline int compare( const PriorEl &pel1, const PriorEl &pel2 )
+ {
+ if ( pel1.desc < pel2.desc )
+ return -1;
+ else if ( pel1.desc > pel2.desc )
+ return 1;
+ else if ( pel1.ordering < pel2.ordering )
+ return -1;
+ else if ( pel1.ordering > pel2.ordering )
+ return 1;
+ return 0;
+ }
+};
+
+/* Compare of PriorTable distinguising state data. Using a compare of the
+ * pointers is a little more strict than it needs be. It requires that
+ * prioritiy tables have the exact same set of priority assignment operators
+ * (from the input lang) to be considered equal.
+ *
+ * Really only key-value pairs need be tested and ordering be merged. However
+ * this would require that in the fuseing of states, priority descriptors be
+ * chosen for the new fused state based on priority. Since the out transition
+ * lists and ranges aren't necessarily going to line up, this is more work for
+ * little gain. Final compression resets all priorities first, so this would
+ * only be useful for compression at every operator, which is only an
+ * undocumented test feature.
+ */
+typedef CmpSTable<PriorEl, CmpPriorEl> CmpPriorTable;
+
+/* Plain action list that imposes no ordering. */
+typedef Vector<int> TransFuncList;
+
+/* Comparison for TransFuncList. */
+typedef CmpTable< int, CmpOrd<int> > TransFuncListCompare;
+
+/* Transition class that implements actions and priorities. */
+struct FsmTrans
+{
+ FsmTrans() : fromState(0), toState(0) {}
+ FsmTrans( const FsmTrans &other ) :
+ lowKey(other.lowKey),
+ highKey(other.highKey),
+ fromState(0), toState(0),
+ actionTable(other.actionTable),
+ priorTable(other.priorTable)
+ {
+ assert( lmActionTable.length() == 0 && other.lmActionTable.length() == 0 );
+ }
+
+ Key lowKey, highKey;
+ FsmState *fromState;
+ FsmState *toState;
+
+ /* Pointers for outlist. */
+ FsmTrans *prev, *next;
+
+ /* Pointers for in-list. */
+ FsmTrans *ilprev, *ilnext;
+
+ /* The function table and priority for the transition. */
+ ActionTable actionTable;
+ PriorTable priorTable;
+
+ LmActionTable lmActionTable;
+};
+
+/* In transition list. Like DList except only has head pointers, which is all
+ * that is required. Insertion and deletion is handled by the graph. This
+ * class provides the iterator of a single list. */
+struct TransInList
+{
+ TransInList() : head(0) { }
+
+ FsmTrans *head;
+
+ struct Iter
+ {
+ /* Default construct. */
+ Iter() : ptr(0) { }
+
+ /* Construct, assign from a list. */
+ Iter( const TransInList &il ) : ptr(il.head) { }
+ Iter &operator=( const TransInList &dl ) { ptr = dl.head; return *this; }
+
+ /* At the end */
+ bool lte() const { return ptr != 0; }
+ bool end() const { return ptr == 0; }
+
+ /* At the first, last element. */
+ bool first() const { return ptr && ptr->ilprev == 0; }
+ bool last() const { return ptr && ptr->ilnext == 0; }
+
+ /* Cast, dereference, arrow ops. */
+ operator FsmTrans*() const { return ptr; }
+ FsmTrans &operator *() const { return *ptr; }
+ FsmTrans *operator->() const { return ptr; }
+
+ /* Increment, decrement. */
+ inline void operator++(int) { ptr = ptr->ilnext; }
+ inline void operator--(int) { ptr = ptr->ilprev; }
+
+ /* The iterator is simply a pointer. */
+ FsmTrans *ptr;
+ };
+};
+
+typedef DList<FsmTrans> TransList;
+
+/* Set of states, list of states. */
+typedef BstSet<FsmState*> StateSet;
+typedef DList<FsmState> StateList;
+
+/* A element in a state dict. */
+struct StateDictEl
+:
+ public AvlTreeEl<StateDictEl>
+{
+ StateDictEl(const StateSet &stateSet)
+ : stateSet(stateSet) { }
+
+ const StateSet &getKey() { return stateSet; }
+ StateSet stateSet;
+ FsmState *targState;
+};
+
+/* Dictionary mapping a set of states to a target state. */
+typedef AvlTree< StateDictEl, StateSet, CmpTable<FsmState*> > StateDict;
+
+/* Data needed for a merge operation. */
+struct MergeData
+{
+ MergeData()
+ : stfillHead(0), stfillTail(0) { }
+
+ StateDict stateDict;
+
+ FsmState *stfillHead;
+ FsmState *stfillTail;
+
+ void fillListAppend( FsmState *state );
+};
+
+struct TransEl
+{
+ /* Constructors. */
+ TransEl() { }
+ TransEl( Key lowKey, Key highKey )
+ : lowKey(lowKey), highKey(highKey) { }
+ TransEl( Key lowKey, Key highKey, FsmTrans *value )
+ : lowKey(lowKey), highKey(highKey), value(value) { }
+
+ Key lowKey, highKey;
+ FsmTrans *value;
+};
+
+struct CmpKey
+{
+ static int compare( const Key key1, const Key key2 )
+ {
+ if ( key1 < key2 )
+ return -1;
+ else if ( key1 > key2 )
+ return 1;
+ else
+ return 0;
+ }
+};
+
+/* Vector based set of key items. */
+typedef BstSet<Key, CmpKey> KeySet;
+
+struct MinPartition
+{
+ MinPartition() : active(false) { }
+
+ StateList list;
+ bool active;
+
+ MinPartition *prev, *next;
+};
+
+/* Epsilon transition stored in a state. Specifies the target */
+typedef Vector<int> EpsilonTrans;
+
+/* List of states that are to be drawn into this. */
+struct EptVectEl
+{
+ EptVectEl( FsmState *targ, bool leaving )
+ : targ(targ), leaving(leaving) { }
+
+ FsmState *targ;
+ bool leaving;
+};
+typedef Vector<EptVectEl> EptVect;
+
+/* Set of entry ids that go into this state. */
+typedef BstSet<int> EntryIdSet;
+
+/* Set of longest match items that may be active in a given state. */
+typedef BstSet<TokenInstance*> LmItemSet;
+
+/* Conditions. */
+typedef BstSet< Action*, CmpOrd<Action*> > CondSet;
+typedef CmpTable< Action*, CmpOrd<Action*> > CmpCondSet;
+
+struct CondSpace
+ : public AvlTreeEl<CondSpace>
+{
+ CondSpace( const CondSet &condSet )
+ : condSet(condSet) {}
+
+ const CondSet &getKey() { return condSet; }
+
+ CondSet condSet;
+ Key baseKey;
+ long condSpaceId;
+};
+
+typedef Vector<CondSpace*> CondSpaceVect;
+
+typedef AvlTree<CondSpace, CondSet, CmpCondSet> CondSpaceMap;
+
+struct StateCond
+{
+ StateCond( Key lowKey, Key highKey ) :
+ lowKey(lowKey), highKey(highKey) {}
+
+ Key lowKey;
+ Key highKey;
+ CondSpace *condSpace;
+
+ StateCond *prev, *next;
+};
+
+typedef DList<StateCond> StateCondList;
+typedef Vector<long> LongVect;
+
+/* State class that implements actions and priorities. */
+struct FsmState
+{
+ FsmState();
+ FsmState(const FsmState &other);
+ ~FsmState();
+
+ /* Is the state final? */
+ bool isFinState() { return stateBits & SB_ISFINAL; }
+
+ /* Out transition list and the pointer for the default out trans. */
+ TransList outList;
+
+ /* In transition Lists. */
+ TransInList inList;
+
+ /* Entry points into the state. */
+ EntryIdSet entryIds;
+
+ /* Epsilon transitions. */
+ EpsilonTrans epsilonTrans;
+
+ /* Condition info. */
+ StateCondList stateCondList;
+
+ /* Number of in transitions from states other than ourselves. */
+ int foreignInTrans;
+
+ /* Temporary data for various algorithms. */
+ union {
+ /* When duplicating the fsm we need to map each
+ * state to the new state representing it. */
+ FsmState *stateMap;
+
+ /* When minimizing machines by partitioning, this maps to the group
+ * the state is in. */
+ MinPartition *partition;
+
+ /* When merging states (state machine operations) this next pointer is
+ * used for the list of states that need to be filled in. */
+ FsmState *next;
+
+ /* Identification for printing and stable minimization. */
+ int stateNum;
+
+ } alg;
+
+ /* Data used in epsilon operation, maybe fit into alg? */
+ FsmState *isolatedShadow;
+ int owningGraph;
+
+ /* A pointer to a dict element that contains the set of states this state
+ * represents. This cannot go into alg, because alg.next is used during
+ * the merging process. */
+ StateDictEl *stateDictEl;
+
+ /* When drawing epsilon transitions, holds the list of states to merge
+ * with. */
+ EptVect *eptVect;
+
+ /* Bits controlling the behaviour of the state during collapsing to dfa. */
+ int stateBits;
+
+ /* State list elements. */
+ FsmState *next, *prev;
+
+ /*
+ * Priority and Action data.
+ */
+
+ /* Out priorities transfered to out transitions. */
+ PriorTable outPriorTable;
+
+ /* The following two action tables are distinguished by the fact that when
+ * toState actions are executed immediatly after transition actions of
+ * incoming transitions and the current character will be the same as the
+ * one available then. The fromState actions are executed immediately
+ * before the transition actions of outgoing transitions and the current
+ * character is same as the one available then. */
+
+ /* Actions to execute upon entering into a state. */
+ ActionTable toStateActionTable;
+
+ /* Actions to execute when going from the state to the transition. */
+ ActionTable fromStateActionTable;
+
+ /* Actions to add to any future transitions that leave via this state. */
+ ActionTable outActionTable;
+
+ /* Conditions to add to any future transiions that leave via this sttate. */
+ ActionSet outCondSet;
+
+ /* Error action tables. */
+ ErrActionTable errActionTable;
+
+ /* Actions to execute on eof. */
+ ActionTable eofActionTable;
+
+ /* Set of longest match items that may be active in this state. */
+ LmItemSet lmItemSet;
+
+ FsmState *eofTarget;
+};
+
+template <class ListItem> struct NextTrans
+{
+ Key lowKey, highKey;
+ ListItem *trans;
+ ListItem *next;
+
+ void load() {
+ if ( trans == 0 )
+ next = 0;
+ else {
+ next = trans->next;
+ lowKey = trans->lowKey;
+ highKey = trans->highKey;
+ }
+ }
+
+ void set( ListItem *t ) {
+ trans = t;
+ load();
+ }
+
+ void increment() {
+ trans = next;
+ load();
+ }
+};
+
+
+/* Encodes the different states that are meaningful to the of the iterator. */
+enum PairIterUserState
+{
+ RangeInS1, RangeInS2,
+ RangeOverlap,
+ BreakS1, BreakS2
+};
+
+template <class ListItem1, class ListItem2 = ListItem1> struct PairIter
+{
+ /* Encodes the different states that an fsm iterator can be in. */
+ enum IterState {
+ Begin,
+ ConsumeS1Range, ConsumeS2Range,
+ OnlyInS1Range, OnlyInS2Range,
+ S1SticksOut, S1SticksOutBreak,
+ S2SticksOut, S2SticksOutBreak,
+ S1DragsBehind, S1DragsBehindBreak,
+ S2DragsBehind, S2DragsBehindBreak,
+ ExactOverlap, End
+ };
+
+ PairIter( ListItem1 *list1, ListItem2 *list2 );
+
+ /* Query iterator. */
+ bool lte() { return itState != End; }
+ bool end() { return itState == End; }
+ void operator++(int) { findNext(); }
+ void operator++() { findNext(); }
+
+ /* Iterator state. */
+ ListItem1 *list1;
+ ListItem2 *list2;
+ IterState itState;
+ PairIterUserState userState;
+
+ NextTrans<ListItem1> s1Tel;
+ NextTrans<ListItem2> s2Tel;
+ Key bottomLow, bottomHigh;
+ ListItem1 *bottomTrans1;
+ ListItem2 *bottomTrans2;
+
+private:
+ void findNext();
+};
+
+/* Init the iterator by advancing to the first item. */
+template <class ListItem1, class ListItem2> PairIter<ListItem1, ListItem2>::PairIter(
+ ListItem1 *list1, ListItem2 *list2 )
+:
+ list1(list1),
+ list2(list2),
+ itState(Begin)
+{
+ findNext();
+}
+
+/* Return and re-entry for the co-routine iterators. This should ALWAYS be
+ * used inside of a block. */
+#define CO_RETURN(label) \
+ itState = label; \
+ return; \
+ entry##label: {}
+
+/* Return and re-entry for the co-routine iterators. This should ALWAYS be
+ * used inside of a block. */
+#define CO_RETURN2(label, uState) \
+ itState = label; \
+ userState = uState; \
+ return; \
+ entry##label: {}
+
+/* Advance to the next transition. When returns, trans points to the next
+ * transition, unless there are no more, in which case end() returns true. */
+template <class ListItem1, class ListItem2> void PairIter<ListItem1, ListItem2>::findNext()
+{
+ /* Jump into the iterator routine base on the iterator state. */
+ switch ( itState ) {
+ case Begin: goto entryBegin;
+ case ConsumeS1Range: goto entryConsumeS1Range;
+ case ConsumeS2Range: goto entryConsumeS2Range;
+ case OnlyInS1Range: goto entryOnlyInS1Range;
+ case OnlyInS2Range: goto entryOnlyInS2Range;
+ case S1SticksOut: goto entryS1SticksOut;
+ case S1SticksOutBreak: goto entryS1SticksOutBreak;
+ case S2SticksOut: goto entryS2SticksOut;
+ case S2SticksOutBreak: goto entryS2SticksOutBreak;
+ case S1DragsBehind: goto entryS1DragsBehind;
+ case S1DragsBehindBreak: goto entryS1DragsBehindBreak;
+ case S2DragsBehind: goto entryS2DragsBehind;
+ case S2DragsBehindBreak: goto entryS2DragsBehindBreak;
+ case ExactOverlap: goto entryExactOverlap;
+ case End: goto entryEnd;
+ }
+
+entryBegin:
+ /* Set up the next structs at the head of the transition lists. */
+ s1Tel.set( list1 );
+ s2Tel.set( list2 );
+
+ /* Concurrently scan both out ranges. */
+ while ( true ) {
+ if ( s1Tel.trans == 0 ) {
+ /* We are at the end of state1's ranges. Process the rest of
+ * state2's ranges. */
+ while ( s2Tel.trans != 0 ) {
+ /* Range is only in s2. */
+ CO_RETURN2( ConsumeS2Range, RangeInS2 );
+ s2Tel.increment();
+ }
+ break;
+ }
+ else if ( s2Tel.trans == 0 ) {
+ /* We are at the end of state2's ranges. Process the rest of
+ * state1's ranges. */
+ while ( s1Tel.trans != 0 ) {
+ /* Range is only in s1. */
+ CO_RETURN2( ConsumeS1Range, RangeInS1 );
+ s1Tel.increment();
+ }
+ break;
+ }
+ /* Both state1's and state2's transition elements are good.
+ * The signiture of no overlap is a back key being in front of a
+ * front key. */
+ else if ( s1Tel.highKey < s2Tel.lowKey ) {
+ /* A range exists in state1 that does not overlap with state2. */
+ CO_RETURN2( OnlyInS1Range, RangeInS1 );
+ s1Tel.increment();
+ }
+ else if ( s2Tel.highKey < s1Tel.lowKey ) {
+ /* A range exists in state2 that does not overlap with state1. */
+ CO_RETURN2( OnlyInS2Range, RangeInS2 );
+ s2Tel.increment();
+ }
+ /* There is overlap, must mix the ranges in some way. */
+ else if ( s1Tel.lowKey < s2Tel.lowKey ) {
+ /* Range from state1 sticks out front. Must break it into
+ * non-overlaping and overlaping segments. */
+ bottomLow = s2Tel.lowKey;
+ bottomHigh = s1Tel.highKey;
+ s1Tel.highKey = s2Tel.lowKey;
+ s1Tel.highKey.decrement();
+ bottomTrans1 = s1Tel.trans;
+
+ /* Notify the caller that we are breaking s1. This gives them a
+ * chance to duplicate s1Tel[0,1].value. */
+ CO_RETURN2( S1SticksOutBreak, BreakS1 );
+
+ /* Broken off range is only in s1. */
+ CO_RETURN2( S1SticksOut, RangeInS1 );
+
+ /* Advance over the part sticking out front. */
+ s1Tel.lowKey = bottomLow;
+ s1Tel.highKey = bottomHigh;
+ s1Tel.trans = bottomTrans1;
+ }
+ else if ( s2Tel.lowKey < s1Tel.lowKey ) {
+ /* Range from state2 sticks out front. Must break it into
+ * non-overlaping and overlaping segments. */
+ bottomLow = s1Tel.lowKey;
+ bottomHigh = s2Tel.highKey;
+ s2Tel.highKey = s1Tel.lowKey;
+ s2Tel.highKey.decrement();
+ bottomTrans2 = s2Tel.trans;
+
+ /* Notify the caller that we are breaking s2. This gives them a
+ * chance to duplicate s2Tel[0,1].value. */
+ CO_RETURN2( S2SticksOutBreak, BreakS2 );
+
+ /* Broken off range is only in s2. */
+ CO_RETURN2( S2SticksOut, RangeInS2 );
+
+ /* Advance over the part sticking out front. */
+ s2Tel.lowKey = bottomLow;
+ s2Tel.highKey = bottomHigh;
+ s2Tel.trans = bottomTrans2;
+ }
+ /* Low ends are even. Are the high ends even? */
+ else if ( s1Tel.highKey < s2Tel.highKey ) {
+ /* Range from state2 goes longer than the range from state1. We
+ * must break the range from state2 into an evenly overlaping
+ * segment. */
+ bottomLow = s1Tel.highKey;
+ bottomLow.increment();
+ bottomHigh = s2Tel.highKey;
+ s2Tel.highKey = s1Tel.highKey;
+ bottomTrans2 = s2Tel.trans;
+
+ /* Notify the caller that we are breaking s2. This gives them a
+ * chance to duplicate s2Tel[0,1].value. */
+ CO_RETURN2( S2DragsBehindBreak, BreakS2 );
+
+ /* Breaking s2 produces exact overlap. */
+ CO_RETURN2( S2DragsBehind, RangeOverlap );
+
+ /* Advance over the front we just broke off of range 2. */
+ s2Tel.lowKey = bottomLow;
+ s2Tel.highKey = bottomHigh;
+ s2Tel.trans = bottomTrans2;
+
+ /* Advance over the entire s1Tel. We have consumed it. */
+ s1Tel.increment();
+ }
+ else if ( s2Tel.highKey < s1Tel.highKey ) {
+ /* Range from state1 goes longer than the range from state2. We
+ * must break the range from state1 into an evenly overlaping
+ * segment. */
+ bottomLow = s2Tel.highKey;
+ bottomLow.increment();
+ bottomHigh = s1Tel.highKey;
+ s1Tel.highKey = s2Tel.highKey;
+ bottomTrans1 = s1Tel.trans;
+
+ /* Notify the caller that we are breaking s1. This gives them a
+ * chance to duplicate s2Tel[0,1].value. */
+ CO_RETURN2( S1DragsBehindBreak, BreakS1 );
+
+ /* Breaking s1 produces exact overlap. */
+ CO_RETURN2( S1DragsBehind, RangeOverlap );
+
+ /* Advance over the front we just broke off of range 1. */
+ s1Tel.lowKey = bottomLow;
+ s1Tel.highKey = bottomHigh;
+ s1Tel.trans = bottomTrans1;
+
+ /* Advance over the entire s2Tel. We have consumed it. */
+ s2Tel.increment();
+ }
+ else {
+ /* There is an exact overlap. */
+ CO_RETURN2( ExactOverlap, RangeOverlap );
+
+ s1Tel.increment();
+ s2Tel.increment();
+ }
+ }
+
+ /* Done, go into end state. */
+ CO_RETURN( End );
+}
+
+
+/* Compare lists of epsilon transitions. Entries are name ids of targets. */
+typedef CmpTable< int, CmpOrd<int> > CmpEpsilonTrans;
+
+/* Compare class for the Approximate minimization. */
+class ApproxCompare
+{
+public:
+ ApproxCompare() { }
+ int compare( const FsmState *pState1, const FsmState *pState2 );
+};
+
+/* Compare class for the initial partitioning of a partition minimization. */
+class InitPartitionCompare
+{
+public:
+ InitPartitionCompare() { }
+ int compare( const FsmState *pState1, const FsmState *pState2 );
+};
+
+/* Compare class for the regular partitioning of a partition minimization. */
+class PartitionCompare
+{
+public:
+ PartitionCompare() { }
+ int compare( const FsmState *pState1, const FsmState *pState2 );
+};
+
+/* Compare class for a minimization that marks pairs. Provides the shouldMark
+ * routine. */
+class MarkCompare
+{
+public:
+ MarkCompare() { }
+ bool shouldMark( MarkIndex &markIndex, const FsmState *pState1,
+ const FsmState *pState2 );
+};
+
+/* List of partitions. */
+typedef DList< MinPartition > PartitionList;
+
+/* List of transtions out of a state. */
+typedef Vector<TransEl> TransListVect;
+
+/* Entry point map used for keeping track of entry points in a machine. */
+typedef BstSet< int > EntryIdSet;
+typedef BstMapEl< int, FsmState* > EntryMapEl;
+typedef BstMap< int, FsmState* > EntryMap;
+typedef Vector<EntryMapEl> EntryMapBase;
+
+/* Graph class that implements actions and priorities. */
+struct FsmGraph
+{
+ /* Constructors/Destructors. */
+ FsmGraph( );
+ FsmGraph( const FsmGraph &graph );
+ ~FsmGraph();
+
+ /* The list of states. */
+ StateList stateList;
+ StateList misfitList;
+
+ /* The map of entry points. */
+ EntryMap entryPoints;
+
+ /* The start state. */
+ FsmState *startState;
+
+ /* Error state, possibly created only when the final machine has been
+ * created and the XML machine is about to be written. No transitions
+ * point to this state. */
+ FsmState *errState;
+
+ /* The set of final states. */
+ StateSet finStateSet;
+
+ /* Misfit Accounting. Are misfits put on a separate list. */
+ bool misfitAccounting;
+
+ bool lmRequiresErrorState;
+ NameInst **nameIndex;
+
+ /*
+ * Transition actions and priorities.
+ */
+
+ /* Set priorities on transtions. */
+ void startFsmPrior( int ordering, PriorDesc *prior );
+ void allTransPrior( int ordering, PriorDesc *prior );
+ void finishFsmPrior( int ordering, PriorDesc *prior );
+ void leaveFsmPrior( int ordering, PriorDesc *prior );
+
+ /* Action setting support. */
+ void transferErrorActions( FsmState *state, int transferPoint );
+ void setErrorAction( FsmState *state, int ordering, Action *action );
+ void setErrorActions( FsmState *state, const ActionTable &other );
+
+ /* Fill all spaces in a transition list with an error transition. */
+ void fillGaps( FsmState *state );
+
+ /* Similar to setErrorAction, instead gives a state to go to on error. */
+ void setErrorTarget( FsmState *state, FsmState *target, int *orderings,
+ Action **actions, int nActs );
+
+ /* Set actions to execute. */
+ void startFsmAction( int ordering, Action *action );
+ void allTransAction( int ordering, Action *action );
+ void finishFsmAction( int ordering, Action *action );
+ void leaveFsmAction( int ordering, Action *action );
+ void longMatchAction( int ordering, TokenInstance *lmPart );
+
+ /* Set error actions to execute. */
+ void startErrorAction( int ordering, Action *action, int transferPoint );
+ void allErrorAction( int ordering, Action *action, int transferPoint );
+ void finalErrorAction( int ordering, Action *action, int transferPoint );
+ void notStartErrorAction( int ordering, Action *action, int transferPoint );
+ void notFinalErrorAction( int ordering, Action *action, int transferPoint );
+ void middleErrorAction( int ordering, Action *action, int transferPoint );
+
+ /* Set EOF actions. */
+ void startEOFAction( int ordering, Action *action );
+ void allEOFAction( int ordering, Action *action );
+ void finalEOFAction( int ordering, Action *action );
+ void notStartEOFAction( int ordering, Action *action );
+ void notFinalEOFAction( int ordering, Action *action );
+ void middleEOFAction( int ordering, Action *action );
+
+ /* Set To State actions. */
+ void startToStateAction( int ordering, Action *action );
+ void allToStateAction( int ordering, Action *action );
+ void finalToStateAction( int ordering, Action *action );
+ void notStartToStateAction( int ordering, Action *action );
+ void notFinalToStateAction( int ordering, Action *action );
+ void middleToStateAction( int ordering, Action *action );
+
+ /* Set From State actions. */
+ void startFromStateAction( int ordering, Action *action );
+ void allFromStateAction( int ordering, Action *action );
+ void finalFromStateAction( int ordering, Action *action );
+ void notStartFromStateAction( int ordering, Action *action );
+ void notFinalFromStateAction( int ordering, Action *action );
+ void middleFromStateAction( int ordering, Action *action );
+
+ /* Shift the action ordering of the start transitions to start at
+ * fromOrder and increase in units of 1. Useful before kleene star
+ * operation. */
+ int shiftStartActionOrder( int fromOrder );
+
+ /* Clear all priorities from the fsm to so they won't affcet minimization
+ * of the final fsm. */
+ void clearAllPriorities();
+
+ /* Zero out all the function keys. */
+ void nullActionKeys();
+
+ /* Walk the list of states and verify state properties. */
+ void verifyStates();
+
+ /* Misfit Accounting. Are misfits put on a separate list. */
+ void setMisfitAccounting( bool val )
+ { misfitAccounting = val; }
+
+ /* Set and Unset a state as final. */
+ void setFinState( FsmState *state );
+ void unsetFinState( FsmState *state );
+
+ void setStartState( FsmState *state );
+ void unsetStartState( );
+
+ /* Set and unset a state as an entry point. */
+ void setEntry( int id, FsmState *state );
+ void changeEntry( int id, FsmState *to, FsmState *from );
+ void unsetEntry( int id, FsmState *state );
+ void unsetEntry( int id );
+ void unsetAllEntryPoints();
+
+ /* Epsilon transitions. */
+ void epsilonTrans( int id );
+ void shadowReadWriteStates( MergeData &md );
+
+ /*
+ * Basic attaching and detaching.
+ */
+
+ /* Common to attaching/detaching list and default. */
+ void attachToInList( FsmState *from, FsmState *to, FsmTrans *&head, FsmTrans *trans );
+ void detachFromInList( FsmState *from, FsmState *to, FsmTrans *&head, FsmTrans *trans );
+
+ /* Attach with a new transition. */
+ FsmTrans *attachNewTrans( FsmState *from, FsmState *to,
+ Key onChar1, Key onChar2 );
+
+ /* Attach with an existing transition that already in an out list. */
+ void attachTrans( FsmState *from, FsmState *to, FsmTrans *trans );
+
+ /* Redirect a transition away from error and towards some state. */
+ void redirectErrorTrans( FsmState *from, FsmState *to, FsmTrans *trans );
+
+ /* Detach a transition from a target state. */
+ void detachTrans( FsmState *from, FsmState *to, FsmTrans *trans );
+
+ /* Detach a state from the graph. */
+ void detachState( FsmState *state );
+
+ /*
+ * NFA to DFA conversion routines.
+ */
+
+ /* Duplicate a transition that will dropin to a free spot. */
+ FsmTrans *dupTrans( FsmState *from, FsmTrans *srcTrans );
+
+ /* In crossing, two transitions both go to real states. */
+ FsmTrans *fsmAttachStates( MergeData &md, FsmState *from,
+ FsmTrans *destTrans, FsmTrans *srcTrans );
+
+ /* Two transitions are to be crossed, handle the possibility of either
+ * going to the error state. */
+ FsmTrans *mergeTrans( MergeData &md, FsmState *from,
+ FsmTrans *destTrans, FsmTrans *srcTrans );
+
+ /* Compare deterimne relative priorities of two transition tables. */
+ int comparePrior( const PriorTable &priorTable1, const PriorTable &priorTable2 );
+
+ /* Cross a src transition with one that is already occupying a spot. */
+ FsmTrans *crossTransitions( MergeData &md, FsmState *from,
+ FsmTrans *destTrans, FsmTrans *srcTrans );
+
+ void outTransCopy( MergeData &md, FsmState *dest, FsmTrans *srcList );
+ void mergeStateConds( FsmState *destState, FsmState *srcState );
+
+ /* Merge a set of states into newState. */
+ void mergeStates( MergeData &md, FsmState *destState,
+ FsmState **srcStates, int numSrc );
+ void mergeStatesLeaving( MergeData &md, FsmState *destState, FsmState *srcState );
+ void mergeStates( MergeData &md, FsmState *destState, FsmState *srcState );
+
+ /* Make all states that are combinations of other states and that
+ * have not yet had their out transitions filled in. This will
+ * empty out stateDict and stFil. */
+ void fillInStates( MergeData &md );
+
+ /*
+ * Transition Comparison.
+ */
+
+ /* Compare transition data. Either of the pointers may be null. */
+ static inline int compareDataPtr( FsmTrans *trans1, FsmTrans *trans2 );
+
+ /* Compare target state and transition data. Either pointer may be null. */
+ static inline int compareFullPtr( FsmTrans *trans1, FsmTrans *trans2 );
+
+ /* Compare target partitions. Either pointer may be null. */
+ static inline int comparePartPtr( FsmTrans *trans1, FsmTrans *trans2 );
+
+ /* Check marked status of target states. Either pointer may be null. */
+ static inline bool shouldMarkPtr( MarkIndex &markIndex,
+ FsmTrans *trans1, FsmTrans *trans2 );
+
+ /*
+ * Callbacks.
+ */
+
+ /* Compare priority and function table of transitions. */
+ static int compareTransData( FsmTrans *trans1, FsmTrans *trans2 );
+
+ /* Add in the properties of srcTrans into this. */
+ void addInTrans( FsmTrans *destTrans, FsmTrans *srcTrans );
+
+ /* Compare states on data stored in the states. */
+ static int compareStateData( const FsmState *state1, const FsmState *state2 );
+
+ /* Out transition data. */
+ void clearOutData( FsmState *state );
+ bool hasOutData( FsmState *state );
+ void transferOutData( FsmState *destState, FsmState *srcState );
+
+ /*
+ * Allocation.
+ */
+
+ /* New up a state and add it to the graph. */
+ FsmState *addState();
+
+ /*
+ * Building basic machines
+ */
+
+ void concatFsm( Key c );
+ void concatFsm( Key *str, int len );
+ void concatFsmCI( Key *str, int len );
+ void orFsm( Key *set, int len );
+ void rangeFsm( Key low, Key high );
+ void rangeStarFsm( Key low, Key high );
+ void emptyFsm( );
+ void lambdaFsm( );
+
+ /*
+ * Fsm operators.
+ */
+
+ void starOp( );
+ void repeatOp( int times );
+ void optionalRepeatOp( int times );
+ void concatOp( FsmGraph *other );
+ void unionOp( FsmGraph *other );
+ void intersectOp( FsmGraph *other );
+ void subtractOp( FsmGraph *other );
+ void epsilonOp();
+ void joinOp( int startId, int finalId, FsmGraph **others, int numOthers );
+ void globOp( FsmGraph **others, int numOthers );
+ void deterministicEntry();
+
+ /*
+ * Operator workers
+ */
+
+ /* Determine if there are any entry points into a start state other than
+ * the start state. */
+ bool isStartStateIsolated();
+
+ /* Make a new start state that has no entry points. Will not change the
+ * identity of the fsm. */
+ void isolateStartState();
+
+ /* Workers for resolving epsilon transitions. */
+ bool inEptVect( EptVect *eptVect, FsmState *targ );
+ void epsilonFillEptVectFrom( FsmState *root, FsmState *from, bool parentLeaving );
+ void resolveEpsilonTrans( MergeData &md );
+
+ /* Workers for concatenation and union. */
+ void doConcat( FsmGraph *other, StateSet *fromStates, bool optional );
+ void doOr( FsmGraph *other );
+
+ /*
+ * Final states
+ */
+
+ /* Unset any final states that are no longer to be final
+ * due to final bits. */
+ void unsetIncompleteFinals();
+ void unsetKilledFinals();
+
+ /* Bring in other's entry points. Assumes others states are going to be
+ * copied into this machine. */
+ void copyInEntryPoints( FsmGraph *other );
+
+ /* Ordering states. */
+ void depthFirstOrdering( FsmState *state );
+ void depthFirstOrdering();
+ void sortStatesByFinal();
+
+ /* Set sqequential state numbers starting at 0. */
+ void setStateNumbers( int base );
+
+ /* Unset all final states. */
+ void unsetAllFinStates();
+
+ /* Set the bits of final states and clear the bits of non final states. */
+ void setFinBits( int finStateBits );
+
+ /*
+ * Self-consistency checks.
+ */
+
+ /* Run a sanity check on the machine. */
+ void verifyIntegrity();
+
+ /* Verify that there are no unreachable states, or dead end states. */
+ void verifyReachability();
+ void verifyNoDeadEndStates();
+
+ /*
+ * Path pruning
+ */
+
+ /* Mark all states reachable from state. */
+ void markReachableFromHereReverse( FsmState *state );
+
+ /* Mark all states reachable from state. */
+ void markReachableFromHere( FsmState *state );
+ void markReachableFromHereStopFinal( FsmState *state );
+
+ /* Removes states that cannot be reached by any path in the fsm and are
+ * thus wasted silicon. */
+ void removeDeadEndStates();
+
+ /* Removes states that cannot be reached by any path in the fsm and are
+ * thus wasted silicon. */
+ void removeUnreachableStates();
+
+ /* Remove error actions from states on which the error transition will
+ * never be taken. */
+ bool outListCovers( FsmState *state );
+ bool anyErrorRange( FsmState *state );
+
+ /* Remove states that are on the misfit list. */
+ void removeMisfits();
+
+ /*
+ * FSM Minimization
+ */
+
+ /* Minimization by partitioning. */
+ void minimizePartition1();
+ void minimizePartition2();
+
+ /* Minimize the final state Machine. The result is the minimal fsm. Slow
+ * but stable, correct minimization. Uses n^2 space (lookout) and average
+ * n^2 time. Worst case n^3 time, but a that is a very rare case. */
+ void minimizeStable();
+
+ /* Minimize the final state machine. Does not find the minimal fsm, but a
+ * pretty good approximation. Does not use any extra space. Average n^2
+ * time. Worst case n^3 time, but a that is a very rare case. */
+ void minimizeApproximate();
+
+ /* This is the worker for the minimize approximate solution. It merges
+ * states that have identical out transitions. */
+ bool minimizeRound( );
+
+ /* Given an intial partioning of states, split partitions that have out trans
+ * to differing partitions. */
+ int partitionRound( FsmState **statePtrs, MinPartition *parts, int numParts );
+
+ /* Split partitions that have a transition to a previously split partition, until
+ * there are no more partitions to split. */
+ int splitCandidates( FsmState **statePtrs, MinPartition *parts, int numParts );
+
+ /* Fuse together states in the same partition. */
+ void fusePartitions( MinPartition *parts, int numParts );
+
+ /* Mark pairs where out final stateness differs, out trans data differs,
+ * trans pairs go to a marked pair or trans data differs. Should get
+ * alot of pairs. */
+ void initialMarkRound( MarkIndex &markIndex );
+
+ /* One marking round on all state pairs. Considers if trans pairs go
+ * to a marked state only. Returns whether or not a pair was marked. */
+ bool markRound( MarkIndex &markIndex );
+
+ /* Move the in trans into src into dest. */
+ void inTransMove(FsmState *dest, FsmState *src);
+
+ /* Make state src and dest the same state. */
+ void fuseEquivStates(FsmState *dest, FsmState *src);
+
+ /* Find any states that didn't get marked by the marking algorithm and
+ * merge them into the primary states of their equivalence class. */
+ void fuseUnmarkedPairs( MarkIndex &markIndex );
+
+ /* Merge neighboring transitions go to the same state and have the same
+ * transitions data. */
+ void compressTransitions();
+
+ /* Returns true if there is a transtion (either explicit or by a gap) to
+ * the error state. */
+ bool checkErrTrans( FsmState *state, FsmTrans *trans );
+ bool checkErrTransFinish( FsmState *state );
+ bool hasErrorTrans();
+};
+
+
+#endif /* _FSMGRAPH_H */
diff --git a/src/fsmmin.cc b/src/fsmmin.cc
new file mode 100644
index 0000000..cbb2b99
--- /dev/null
+++ b/src/fsmmin.cc
@@ -0,0 +1,732 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "fsmgraph.h"
+#include "mergesort.h"
+
+int FsmGraph::partitionRound( FsmState **statePtrs, MinPartition *parts, int numParts )
+{
+ /* Need a mergesort object and a single partition compare. */
+ MergeSort<FsmState*, PartitionCompare> mergeSort;
+ PartitionCompare partCompare;
+
+ /* For each partition. */
+ for ( int p = 0; p < numParts; p++ ) {
+ /* Fill the pointer array with the states in the partition. */
+ StateList::Iter state = parts[p].list;
+ for ( int s = 0; state.lte(); state++, s++ )
+ statePtrs[s] = state;
+
+ /* Sort the states using the partitioning compare. */
+ int numStates = parts[p].list.length();
+ mergeSort.sort( statePtrs, numStates );
+
+ /* Assign the states into partitions based on the results of the sort. */
+ int destPart = p, firstNewPart = numParts;
+ for ( int s = 1; s < numStates; s++ ) {
+ /* If this state differs from the last then move to the next partition. */
+ if ( partCompare.compare( statePtrs[s-1], statePtrs[s] ) < 0 ) {
+ /* The new partition is the next avail spot. */
+ destPart = numParts;
+ numParts += 1;
+ }
+
+ /* If the state is not staying in the first partition, then
+ * transfer it to its destination partition. */
+ if ( destPart != p ) {
+ FsmState *state = parts[p].list.detach( statePtrs[s] );
+ parts[destPart].list.append( state );
+ }
+ }
+
+ /* Fix the partition pointer for all the states that got moved to a new
+ * partition. This must be done after the states are transfered so the
+ * result of the sort is not altered. */
+ for ( int newPart = firstNewPart; newPart < numParts; newPart++ ) {
+ StateList::Iter state = parts[newPart].list;
+ for ( ; state.lte(); state++ )
+ state->alg.partition = &parts[newPart];
+ }
+ }
+
+ return numParts;
+}
+
+/**
+ * \brief Minimize by partitioning version 1.
+ *
+ * Repeatedly tries to split partitions until all partitions are unsplittable.
+ * Produces the most minimal FSM possible.
+ */
+void FsmGraph::minimizePartition1()
+{
+ /* Need one mergesort object and partition compares. */
+ MergeSort<FsmState*, InitPartitionCompare> mergeSort;
+ InitPartitionCompare initPartCompare;
+
+ /* Nothing to do if there are no states. */
+ if ( stateList.length() == 0 )
+ return;
+
+ /*
+ * First thing is to partition the states by final state status and
+ * transition functions. This gives us an initial partitioning to work
+ * with.
+ */
+
+ /* Make a array of pointers to states. */
+ int numStates = stateList.length();
+ FsmState** statePtrs = new FsmState*[numStates];
+
+ /* Fill up an array of pointers to the states for easy sorting. */
+ StateList::Iter state = stateList;
+ for ( int s = 0; state.lte(); state++, s++ )
+ statePtrs[s] = state;
+
+ /* Sort the states using the array of states. */
+ mergeSort.sort( statePtrs, numStates );
+
+ /* An array of lists of states is used to partition the states. */
+ MinPartition *parts = new MinPartition[numStates];
+
+ /* Assign the states into partitions. */
+ int destPart = 0;
+ for ( int s = 0; s < numStates; s++ ) {
+ /* If this state differs from the last then move to the next partition. */
+ if ( s > 0 && initPartCompare.compare( statePtrs[s-1], statePtrs[s] ) < 0 ) {
+ /* Move to the next partition. */
+ destPart += 1;
+ }
+
+ /* Put the state into its partition. */
+ statePtrs[s]->alg.partition = &parts[destPart];
+ parts[destPart].list.append( statePtrs[s] );
+ }
+
+ /* We just moved all the states from the main list into partitions without
+ * taking them off the main list. So clean up the main list now. */
+ stateList.abandon();
+
+ /* Split partitions. */
+ int numParts = destPart + 1;
+ while ( true ) {
+ /* Test all partitions for splitting. */
+ int newNum = partitionRound( statePtrs, parts, numParts );
+
+ /* When no partitions can be split, stop. */
+ if ( newNum == numParts )
+ break;
+
+ numParts = newNum;
+ }
+
+ /* Fuse states in the same partition. The states will end up back on the
+ * main list. */
+ fusePartitions( parts, numParts );
+
+ /* Cleanup. */
+ delete[] statePtrs;
+ delete[] parts;
+}
+
+/* Split partitions that need splittting, decide which partitions might need
+ * to be split as a result, continue until there are no more that might need
+ * to be split. */
+int FsmGraph::splitCandidates( FsmState **statePtrs, MinPartition *parts, int numParts )
+{
+ /* Need a mergesort and a partition compare. */
+ MergeSort<FsmState*, PartitionCompare> mergeSort;
+ PartitionCompare partCompare;
+
+ /* The lists of unsplitable (partList) and splitable partitions.
+ * Only partitions in the splitable list are check for needing splitting. */
+ PartitionList partList, splittable;
+
+ /* Initially, all partitions are born from a split (the initial
+ * partitioning) and can cause other partitions to be split. So any
+ * partition with a state with a transition out to another partition is a
+ * candidate for splitting. This will make every partition except possibly
+ * partitions of final states split candidates. */
+ for ( int p = 0; p < numParts; p++ ) {
+ /* Assume not active. */
+ parts[p].active = false;
+
+ /* Look for a trans out of any state in the partition. */
+ for ( StateList::Iter state = parts[p].list; state.lte(); state++ ) {
+ /* If there is at least one transition out to another state then
+ * the partition becomes splittable. */
+ if ( state->outList.length() > 0 ) {
+ parts[p].active = true;
+ break;
+ }
+ }
+
+ /* If it was found active then it goes on the splittable list. */
+ if ( parts[p].active )
+ splittable.append( &parts[p] );
+ else
+ partList.append( &parts[p] );
+ }
+
+ /* While there are partitions that are splittable, pull one off and try
+ * to split it. If it splits, determine which partitions may now be split
+ * as a result of the newly split partition. */
+ while ( splittable.length() > 0 ) {
+ MinPartition *partition = splittable.detachFirst();
+
+ /* Fill the pointer array with the states in the partition. */
+ StateList::Iter state = partition->list;
+ for ( int s = 0; state.lte(); state++, s++ )
+ statePtrs[s] = state;
+
+ /* Sort the states using the partitioning compare. */
+ int numStates = partition->list.length();
+ mergeSort.sort( statePtrs, numStates );
+
+ /* Assign the states into partitions based on the results of the sort. */
+ MinPartition *destPart = partition;
+ int firstNewPart = numParts;
+ for ( int s = 1; s < numStates; s++ ) {
+ /* If this state differs from the last then move to the next partition. */
+ if ( partCompare.compare( statePtrs[s-1], statePtrs[s] ) < 0 ) {
+ /* The new partition is the next avail spot. */
+ destPart = &parts[numParts];
+ numParts += 1;
+ }
+
+ /* If the state is not staying in the first partition, then
+ * transfer it to its destination partition. */
+ if ( destPart != partition ) {
+ FsmState *state = partition->list.detach( statePtrs[s] );
+ destPart->list.append( state );
+ }
+ }
+
+ /* Fix the partition pointer for all the states that got moved to a new
+ * partition. This must be done after the states are transfered so the
+ * result of the sort is not altered. */
+ int newPart;
+ for ( newPart = firstNewPart; newPart < numParts; newPart++ ) {
+ StateList::Iter state = parts[newPart].list;
+ for ( ; state.lte(); state++ )
+ state->alg.partition = &parts[newPart];
+ }
+
+ /* Put the partition we just split and any new partitions that came out
+ * of the split onto the inactive list. */
+ partition->active = false;
+ partList.append( partition );
+ for ( newPart = firstNewPart; newPart < numParts; newPart++ ) {
+ parts[newPart].active = false;
+ partList.append( &parts[newPart] );
+ }
+
+ if ( destPart == partition )
+ continue;
+
+ /* Now determine which partitions are splittable as a result of
+ * splitting partition by walking the in lists of the states in
+ * partitions that got split. Partition is the faked first item in the
+ * loop. */
+ MinPartition *causalPart = partition;
+ newPart = firstNewPart - 1;
+ while ( newPart < numParts ) {
+ /* Loop all states in the causal partition. */
+ StateList::Iter state = causalPart->list;
+ for ( ; state.lte(); state++ ) {
+ /* Walk all transition into the state and put the partition
+ * that the from state is in onto the splittable list. */
+ for ( TransInList::Iter trans = state->inList; trans.lte(); trans++ ) {
+ MinPartition *fromPart = trans->fromState->alg.partition;
+ if ( ! fromPart->active ) {
+ fromPart->active = true;
+ partList.detach( fromPart );
+ splittable.append( fromPart );
+ }
+ }
+ }
+
+ newPart += 1;
+ causalPart = &parts[newPart];
+ }
+ }
+ return numParts;
+}
+
+
+/**
+ * \brief Minimize by partitioning version 2 (best alg).
+ *
+ * Repeatedly tries to split partitions that may splittable until there are no
+ * more partitions that might possibly need splitting. Runs faster than
+ * version 1. Produces the most minimal fsm possible.
+ */
+void FsmGraph::minimizePartition2()
+{
+ /* Need a mergesort and an initial partition compare. */
+ MergeSort<FsmState*, InitPartitionCompare> mergeSort;
+ InitPartitionCompare initPartCompare;
+
+ /* Nothing to do if there are no states. */
+ if ( stateList.length() == 0 )
+ return;
+
+ /*
+ * First thing is to partition the states by final state status and
+ * transition functions. This gives us an initial partitioning to work
+ * with.
+ */
+
+ /* Make a array of pointers to states. */
+ int numStates = stateList.length();
+ FsmState** statePtrs = new FsmState*[numStates];
+
+ /* Fill up an array of pointers to the states for easy sorting. */
+ StateList::Iter state = stateList;
+ for ( int s = 0; state.lte(); state++, s++ )
+ statePtrs[s] = state;
+
+ /* Sort the states using the array of states. */
+ mergeSort.sort( statePtrs, numStates );
+
+ /* An array of lists of states is used to partition the states. */
+ MinPartition *parts = new MinPartition[numStates];
+
+ /* Assign the states into partitions. */
+ int destPart = 0;
+ for ( int s = 0; s < numStates; s++ ) {
+ /* If this state differs from the last then move to the next partition. */
+ if ( s > 0 && initPartCompare.compare( statePtrs[s-1], statePtrs[s] ) < 0 ) {
+ /* Move to the next partition. */
+ destPart += 1;
+ }
+
+ /* Put the state into its partition. */
+ statePtrs[s]->alg.partition = &parts[destPart];
+ parts[destPart].list.append( statePtrs[s] );
+ }
+
+ /* We just moved all the states from the main list into partitions without
+ * taking them off the main list. So clean up the main list now. */
+ stateList.abandon();
+
+ /* Split partitions. */
+ int numParts = splitCandidates( statePtrs, parts, destPart+1 );
+
+ /* Fuse states in the same partition. The states will end up back on the
+ * main list. */
+ fusePartitions( parts, numParts );
+
+ /* Cleanup. */
+ delete[] statePtrs;
+ delete[] parts;
+}
+
+void FsmGraph::initialMarkRound( MarkIndex &markIndex )
+{
+ /* P and q for walking pairs. */
+ FsmState *p = stateList.head, *q;
+
+ /* Need an initial partition compare. */
+ InitPartitionCompare initPartCompare;
+
+ /* Walk all unordered pairs of (p, q) where p != q.
+ * The second depth of the walk stops before reaching p. This
+ * gives us all unordered pairs of states (p, q) where p != q. */
+ while ( p != 0 ) {
+ q = stateList.head;
+ while ( q != p ) {
+ /* If the states differ on final state status, out transitions or
+ * any transition data then they should be separated on the initial
+ * round. */
+ if ( initPartCompare.compare( p, q ) != 0 )
+ markIndex.markPair( p->alg.stateNum, q->alg.stateNum );
+
+ q = q->next;
+ }
+ p = p->next;
+ }
+}
+
+bool FsmGraph::markRound( MarkIndex &markIndex )
+{
+ /* P an q for walking pairs. Take note if any pair gets marked. */
+ FsmState *p = stateList.head, *q;
+ bool pairWasMarked = false;
+
+ /* Need a mark comparison. */
+ MarkCompare markCompare;
+
+ /* Walk all unordered pairs of (p, q) where p != q.
+ * The second depth of the walk stops before reaching p. This
+ * gives us all unordered pairs of states (p, q) where p != q. */
+ while ( p != 0 ) {
+ q = stateList.head;
+ while ( q != p ) {
+ /* Should we mark the pair? */
+ if ( !markIndex.isPairMarked( p->alg.stateNum, q->alg.stateNum ) ) {
+ if ( markCompare.shouldMark( markIndex, p, q ) ) {
+ markIndex.markPair( p->alg.stateNum, q->alg.stateNum );
+ pairWasMarked = true;
+ }
+ }
+ q = q->next;
+ }
+ p = p->next;
+ }
+
+ return pairWasMarked;
+}
+
+
+/**
+ * \brief Minimize by pair marking.
+ *
+ * Decides if each pair of states is distinct or not. Uses O(n^2) memory and
+ * should only be used on small graphs. Produces the most minmimal FSM
+ * possible.
+ */
+void FsmGraph::minimizeStable()
+{
+ /* Set the state numbers. */
+ setStateNumbers( 0 );
+
+ /* This keeps track of which pairs have been marked. */
+ MarkIndex markIndex( stateList.length() );
+
+ /* Mark pairs where final stateness, out trans, or trans data differ. */
+ initialMarkRound( markIndex );
+
+ /* While the last round of marking succeeded in marking a state
+ * continue to do another round. */
+ int modified = markRound( markIndex );
+ while (modified)
+ modified = markRound( markIndex );
+
+ /* Merge pairs that are unmarked. */
+ fuseUnmarkedPairs( markIndex );
+}
+
+bool FsmGraph::minimizeRound()
+{
+ /* Nothing to do if there are no states. */
+ if ( stateList.length() == 0 )
+ return false;
+
+ /* Need a mergesort on approx compare and an approx compare. */
+ MergeSort<FsmState*, ApproxCompare> mergeSort;
+ ApproxCompare approxCompare;
+
+ /* Fill up an array of pointers to the states. */
+ FsmState **statePtrs = new FsmState*[stateList.length()];
+ StateList::Iter state = stateList;
+ for ( int s = 0; state.lte(); state++, s++ )
+ statePtrs[s] = state;
+
+ bool modified = false;
+
+ /* Sort The list. */
+ mergeSort.sort( statePtrs, stateList.length() );
+
+ /* Walk the list looking for duplicates next to each other,
+ * merge in any duplicates. */
+ FsmState **pLast = statePtrs;
+ FsmState **pState = statePtrs + 1;
+ for ( int i = 1; i < stateList.length(); i++, pState++ ) {
+ if ( approxCompare.compare( *pLast, *pState ) == 0 ) {
+ /* Last and pState are the same, so fuse together. Move forward
+ * with pState but not with pLast. If any more are identical, we
+ * must */
+ fuseEquivStates( *pLast, *pState );
+ modified = true;
+ }
+ else {
+ /* Last and this are different, do not set to merge them. Move
+ * pLast to the current (it may be way behind from merging many
+ * states) and pState forward one to consider the next pair. */
+ pLast = pState;
+ }
+ }
+ delete[] statePtrs;
+ return modified;
+}
+
+/**
+ * \brief Minmimize by an approximation.
+ *
+ * Repeatedly tries to find states with transitions out to the same set of
+ * states on the same set of keys until no more identical states can be found.
+ * Does not produce the most minimial FSM possible.
+ */
+void FsmGraph::minimizeApproximate()
+{
+ /* While the last minimization round succeeded in compacting states,
+ * continue to try to compact states. */
+ while ( true ) {
+ bool modified = minimizeRound();
+ if ( ! modified )
+ break;
+ }
+}
+
+
+/* Remove states that have no path to them from the start state. Recursively
+ * traverses the graph marking states that have paths into them. Then removes
+ * all states that did not get marked. */
+void FsmGraph::removeUnreachableStates()
+{
+ /* Misfit accounting should be off and there should be no states on the
+ * misfit list. */
+ assert( !misfitAccounting && misfitList.length() == 0 );
+
+ /* Mark all the states that can be reached
+ * through the existing set of entry points. */
+ markReachableFromHere( startState );
+ for ( EntryMap::Iter en = entryPoints; en.lte(); en++ )
+ markReachableFromHere( en->value );
+
+ /* Delete all states that are not marked
+ * and unmark the ones that are marked. */
+ FsmState *state = stateList.head;
+ while ( state ) {
+ FsmState *next = state->next;
+
+ if ( state->stateBits & SB_ISMARKED )
+ state->stateBits &= ~ SB_ISMARKED;
+ else {
+ detachState( state );
+ stateList.detach( state );
+ delete state;
+ }
+
+ state = next;
+ }
+}
+
+bool FsmGraph::outListCovers( FsmState *state )
+{
+ /* Must be at least one range to cover. */
+ if ( state->outList.length() == 0 )
+ return false;
+
+ /* The first must start at the lower bound. */
+ TransList::Iter trans = state->outList.first();
+ if ( keyOps->minKey < trans->lowKey )
+ return false;
+
+ /* Loop starts at second el. */
+ trans.increment();
+
+ /* Loop checks lower against prev upper. */
+ for ( ; trans.lte(); trans++ ) {
+ /* Lower end of the trans must be one greater than the
+ * previous' high end. */
+ Key lowKey = trans->lowKey;
+ lowKey.decrement();
+ if ( trans->prev->highKey < lowKey )
+ return false;
+ }
+
+ /* Require that the last range extends to the upper bound. */
+ trans = state->outList.last();
+ if ( trans->highKey < keyOps->maxKey )
+ return false;
+
+ return true;
+}
+
+/* Remove states that that do not lead to a final states. Works recursivly traversing
+ * the graph in reverse (starting from all final states) and marking seen states. Then
+ * removes states that did not get marked. */
+void FsmGraph::removeDeadEndStates()
+{
+ /* Misfit accounting should be off and there should be no states on the
+ * misfit list. */
+ assert( !misfitAccounting && misfitList.length() == 0 );
+
+ /* Mark all states that have paths to the final states. */
+ FsmState **st = finStateSet.data;
+ int nst = finStateSet.length();
+ for ( int i = 0; i < nst; i++, st++ )
+ markReachableFromHereReverse( *st );
+
+ /* Start state gets honorary marking. If the machine accepts nothing we
+ * still want the start state to hang around. This must be done after the
+ * recursive call on all the final states so that it does not cause the
+ * start state in transitions to be skipped when the start state is
+ * visited by the traversal. */
+ startState->stateBits |= SB_ISMARKED;
+
+ /* Delete all states that are not marked
+ * and unmark the ones that are marked. */
+ FsmState *state = stateList.head;
+ while ( state != 0 ) {
+ FsmState *next = state->next;
+
+ if ( state->stateBits & SB_ISMARKED )
+ state->stateBits &= ~ SB_ISMARKED;
+ else {
+ detachState( state );
+ stateList.detach( state );
+ delete state;
+ }
+
+ state = next;
+ }
+}
+
+/* Remove states on the misfit list. To work properly misfit accounting should
+ * be on when this is called. The detaching of a state will likely cause
+ * another misfit to be collected and it can then be removed. */
+void FsmGraph::removeMisfits()
+{
+ while ( misfitList.length() > 0 ) {
+ /* Get the first state. */
+ FsmState *state = misfitList.head;
+
+ /* Detach and delete. */
+ detachState( state );
+
+ /* The state was previously on the misfit list and detaching can only
+ * remove in transitions so the state must still be on the misfit
+ * list. */
+ misfitList.detach( state );
+ delete state;
+ }
+}
+
+/* Fuse src into dest because they have been deemed equivalent states.
+ * Involves moving transitions into src to go into dest and invoking
+ * callbacks. Src is deleted detached from the graph and deleted. */
+void FsmGraph::fuseEquivStates( FsmState *dest, FsmState *src )
+{
+ /* This would get ugly. */
+ assert( dest != src );
+
+ /* Cur is a duplicate. We can merge it with trail. */
+ inTransMove( dest, src );
+
+ detachState( src );
+ stateList.detach( src );
+ delete src;
+}
+
+void FsmGraph::fuseUnmarkedPairs( MarkIndex &markIndex )
+{
+ FsmState *p = stateList.head, *nextP, *q;
+
+ /* Definition: The primary state of an equivalence class is the first state
+ * encounterd that belongs to the equivalence class. All equivalence
+ * classes have primary state including equivalence classes with one state
+ * in it. */
+
+ /* For each unmarked pair merge p into q and delete p. q is always the
+ * primary state of it's equivalence class. We wouldn't have landed on it
+ * here if it were not, because it would have been deleted.
+ *
+ * Proof that q is the primaray state of it's equivalence class: Assume q
+ * is not the primary state of it's equivalence class, then it would be
+ * merged into some state that came before it and thus p would be
+ * equivalent to that state. But q is the first state that p is equivalent
+ * to so we have a contradiction. */
+
+ /* Walk all unordered pairs of (p, q) where p != q.
+ * The second depth of the walk stops before reaching p. This
+ * gives us all unordered pairs of states (p, q) where p != q. */
+ while ( p != 0 ) {
+ nextP = p->next;
+
+ q = stateList.head;
+ while ( q != p ) {
+ /* If one of p or q is a final state then mark. */
+ if ( ! markIndex.isPairMarked( p->alg.stateNum, q->alg.stateNum ) ) {
+ fuseEquivStates( q, p );
+ break;
+ }
+ q = q->next;
+ }
+ p = nextP;
+ }
+}
+
+void FsmGraph::fusePartitions( MinPartition *parts, int numParts )
+{
+ /* For each partition, fuse state 2, 3, ... into state 1. */
+ for ( int p = 0; p < numParts; p++ ) {
+ /* Assume that there will always be at least one state. */
+ FsmState *first = parts[p].list.head, *toFuse = first->next;
+
+ /* Put the first state back onto the main state list. Don't bother
+ * removing it from the partition list first. */
+ stateList.append( first );
+
+ /* Fuse the rest of the state into the first. */
+ while ( toFuse != 0 ) {
+ /* Save the next. We will trash it before it is needed. */
+ FsmState *next = toFuse->next;
+
+ /* Put the state to be fused in to the first back onto the main
+ * list before it is fuse. the graph. The state needs to be on
+ * the main list for the detach from the graph to work. Don't
+ * bother removing the state from the partition list first. We
+ * need not maintain it. */
+ stateList.append( toFuse );
+
+ /* Now fuse to the first. */
+ fuseEquivStates( first, toFuse );
+
+ /* Go to the next that we saved before trashing the next pointer. */
+ toFuse = next;
+ }
+
+ /* We transfered the states from the partition list into the main list without
+ * removing the states from the partition list first. Clean it up. */
+ parts[p].list.abandon();
+ }
+}
+
+
+/* Merge neighboring transitions go to the same state and have the same
+ * transitions data. */
+void FsmGraph::compressTransitions()
+{
+ for ( StateList::Iter st = stateList; st.lte(); st++ ) {
+ if ( st->outList.length() > 1 ) {
+ for ( TransList::Iter trans = st->outList, next = trans.next(); next.lte(); ) {
+ Key nextLow = next->lowKey;
+ nextLow.decrement();
+ if ( trans->highKey == nextLow && trans->toState == next->toState &&
+ CmpActionTable::compare( trans->actionTable, next->actionTable ) == 0 )
+ {
+ trans->highKey = next->highKey;
+ st->outList.detach( next );
+ detachTrans( next->fromState, next->toState, next );
+ delete next;
+ next = trans.next();
+ }
+ else {
+ trans.increment();
+ next.increment();
+ }
+ }
+ }
+ }
+}
diff --git a/src/fsmstate.cc b/src/fsmstate.cc
new file mode 100644
index 0000000..f917302
--- /dev/null
+++ b/src/fsmstate.cc
@@ -0,0 +1,437 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <string.h>
+#include <assert.h>
+#include "fsmgraph.h"
+
+#include <iostream>
+using namespace std;
+
+/* Construct a mark index for a specified number of states. Must new up
+ * an array that is states^2 in size. */
+MarkIndex::MarkIndex( int states ) : numStates(states)
+{
+ /* Total pairs is states^2. Actually only use half of these, but we allocate
+ * them all to make indexing into the array easier. */
+ int total = states * states;
+
+ /* New up chars so that individual DListEl constructors are
+ * not called. Zero out the mem manually. */
+ array = new bool[total];
+ memset( array, 0, sizeof(bool) * total );
+}
+
+/* Free the array used to store state pairs. */
+MarkIndex::~MarkIndex()
+{
+ delete[] array;
+}
+
+/* Mark a pair of states. States are specified by their number. The
+ * marked states are moved from the unmarked list to the marked list. */
+void MarkIndex::markPair(int state1, int state2)
+{
+ int pos = ( state1 >= state2 ) ?
+ ( state1 * numStates ) + state2 :
+ ( state2 * numStates ) + state1;
+
+ array[pos] = true;
+}
+
+/* Returns true if the pair of states are marked. Returns false otherwise.
+ * Ordering of states given does not matter. */
+bool MarkIndex::isPairMarked(int state1, int state2)
+{
+ int pos = ( state1 >= state2 ) ?
+ ( state1 * numStates ) + state2 :
+ ( state2 * numStates ) + state1;
+
+ return array[pos];
+}
+
+/* Create a new fsm state. State has not out transitions or in transitions, not
+ * out out transition data and not number. */
+FsmState::FsmState()
+:
+ /* No out or in transitions. */
+ outList(),
+ inList(),
+
+ /* No entry points, or epsilon trans. */
+ entryIds(),
+ epsilonTrans(),
+
+ /* No transitions in from other states. */
+ foreignInTrans(0),
+
+ /* Only used during merging. Normally null. */
+ stateDictEl(0),
+ eptVect(0),
+
+ /* No state identification bits. */
+ stateBits(0),
+
+ /* No Priority data. */
+ outPriorTable(),
+
+ /* No Action data. */
+ toStateActionTable(),
+ fromStateActionTable(),
+ outActionTable(),
+ outCondSet(),
+ errActionTable(),
+ eofActionTable(),
+
+ eofTarget(0)
+{
+}
+
+/* Copy everything except actual the transitions. That is left up to the
+ * FsmGraph copy constructor. */
+FsmState::FsmState(const FsmState &other)
+:
+ /* All lists are cleared. They will be filled in when the
+ * individual transitions are duplicated and attached. */
+ outList(),
+ inList(),
+
+ /* Duplicate the entry id set and epsilon transitions. These
+ * are sets of integers and as such need no fixing. */
+ entryIds(other.entryIds),
+ epsilonTrans(other.epsilonTrans),
+
+ /* No transitions in from other states. */
+ foreignInTrans(0),
+
+ /* This is only used during merging. Normally null. */
+ stateDictEl(0),
+ eptVect(0),
+
+ /* Fsm state data. */
+ stateBits(other.stateBits),
+
+ /* Copy in priority data. */
+ outPriorTable(other.outPriorTable),
+
+ /* Copy in action data. */
+ toStateActionTable(other.toStateActionTable),
+ fromStateActionTable(other.fromStateActionTable),
+ outActionTable(other.outActionTable),
+ outCondSet(other.outCondSet),
+ errActionTable(other.errActionTable),
+ eofActionTable(other.eofActionTable),
+
+ eofTarget(0)
+{
+ /* Duplicate all the transitions. */
+ for ( TransList::Iter trans = other.outList; trans.lte(); trans++ ) {
+ /* Dupicate and store the orginal target in the transition. This will
+ * be corrected once all the states have been created. */
+ FsmTrans *newTrans = new FsmTrans(*trans);
+ newTrans->toState = trans->toState;
+ outList.append( newTrans );
+ }
+}
+
+/* If there is a state dict element, then delete it. Everything else is left
+ * up to the FsmGraph destructor. */
+FsmState::~FsmState()
+{
+ if ( stateDictEl != 0 )
+ delete stateDictEl;
+}
+
+/* Compare two states using pointers to the states. With the approximate
+ * compare the idea is that if the compare finds them the same, they can
+ * immediately be merged. */
+int ApproxCompare::compare( const FsmState *state1 , const FsmState *state2 )
+{
+ int compareRes;
+
+ /* Test final state status. */
+ if ( (state1->stateBits & SB_ISFINAL) && !(state2->stateBits & SB_ISFINAL) )
+ return -1;
+ else if ( !(state1->stateBits & SB_ISFINAL) && (state2->stateBits & SB_ISFINAL) )
+ return 1;
+
+ /* Test epsilon transition sets. */
+ compareRes = CmpEpsilonTrans::compare( state1->epsilonTrans,
+ state2->epsilonTrans );
+ if ( compareRes != 0 )
+ return compareRes;
+
+ /* Compare the out transitions. */
+ compareRes = FsmGraph::compareStateData( state1, state2 );
+ if ( compareRes != 0 )
+ return compareRes;
+
+ /* Use a pair iterator to get the transition pairs. */
+ PairIter<FsmTrans> outPair( state1->outList.head, state2->outList.head );
+ for ( ; !outPair.end(); outPair++ ) {
+ switch ( outPair.userState ) {
+
+ case RangeInS1:
+ compareRes = FsmGraph::compareFullPtr( outPair.s1Tel.trans, 0 );
+ if ( compareRes != 0 )
+ return compareRes;
+ break;
+
+ case RangeInS2:
+ compareRes = FsmGraph::compareFullPtr( 0, outPair.s2Tel.trans );
+ if ( compareRes != 0 )
+ return compareRes;
+ break;
+
+ case RangeOverlap:
+ compareRes = FsmGraph::compareFullPtr(
+ outPair.s1Tel.trans, outPair.s2Tel.trans );
+ if ( compareRes != 0 )
+ return compareRes;
+ break;
+
+ case BreakS1:
+ case BreakS2:
+ break;
+ }
+ }
+
+ /* Got through the entire state comparison, deem them equal. */
+ return 0;
+}
+
+/* Compare class for the sort that does the intial partition of compaction. */
+int InitPartitionCompare::compare( const FsmState *state1 , const FsmState *state2 )
+{
+ int compareRes;
+
+ /* Test final state status. */
+ if ( (state1->stateBits & SB_ISFINAL) && !(state2->stateBits & SB_ISFINAL) )
+ return -1;
+ else if ( !(state1->stateBits & SB_ISFINAL) && (state2->stateBits & SB_ISFINAL) )
+ return 1;
+
+ /* Test epsilon transition sets. */
+ compareRes = CmpEpsilonTrans::compare( state1->epsilonTrans,
+ state2->epsilonTrans );
+ if ( compareRes != 0 )
+ return compareRes;
+
+ /* Compare the out transitions. */
+ compareRes = FsmGraph::compareStateData( state1, state2 );
+ if ( compareRes != 0 )
+ return compareRes;
+
+ /* Use a pair iterator to test the transition pairs. */
+ PairIter<FsmTrans> outPair( state1->outList.head, state2->outList.head );
+ for ( ; !outPair.end(); outPair++ ) {
+ switch ( outPair.userState ) {
+
+ case RangeInS1:
+ compareRes = FsmGraph::compareDataPtr( outPair.s1Tel.trans, 0 );
+ if ( compareRes != 0 )
+ return compareRes;
+ break;
+
+ case RangeInS2:
+ compareRes = FsmGraph::compareDataPtr( 0, outPair.s2Tel.trans );
+ if ( compareRes != 0 )
+ return compareRes;
+ break;
+
+ case RangeOverlap:
+ compareRes = FsmGraph::compareDataPtr(
+ outPair.s1Tel.trans, outPair.s2Tel.trans );
+ if ( compareRes != 0 )
+ return compareRes;
+ break;
+
+ case BreakS1:
+ case BreakS2:
+ break;
+ }
+ }
+
+ return 0;
+}
+
+/* Compare class for the sort that does the partitioning. */
+int PartitionCompare::compare( const FsmState *state1, const FsmState *state2 )
+{
+ int compareRes;
+
+ /* Use a pair iterator to get the transition pairs. */
+ PairIter<FsmTrans> outPair( state1->outList.head, state2->outList.head );
+ for ( ; !outPair.end(); outPair++ ) {
+ switch ( outPair.userState ) {
+
+ case RangeInS1:
+ compareRes = FsmGraph::comparePartPtr( outPair.s1Tel.trans, 0 );
+ if ( compareRes != 0 )
+ return compareRes;
+ break;
+
+ case RangeInS2:
+ compareRes = FsmGraph::comparePartPtr( 0, outPair.s2Tel.trans );
+ if ( compareRes != 0 )
+ return compareRes;
+ break;
+
+ case RangeOverlap:
+ compareRes = FsmGraph::comparePartPtr(
+ outPair.s1Tel.trans, outPair.s2Tel.trans );
+ if ( compareRes != 0 )
+ return compareRes;
+ break;
+
+ case BreakS1:
+ case BreakS2:
+ break;
+ }
+ }
+
+ return 0;
+}
+
+/* Compare class for the sort that does the partitioning. */
+bool MarkCompare::shouldMark( MarkIndex &markIndex, const FsmState *state1,
+ const FsmState *state2 )
+{
+ /* Use a pair iterator to get the transition pairs. */
+ PairIter<FsmTrans> outPair( state1->outList.head, state2->outList.head );
+ for ( ; !outPair.end(); outPair++ ) {
+ switch ( outPair.userState ) {
+
+ case RangeInS1:
+ if ( FsmGraph::shouldMarkPtr( markIndex, outPair.s1Tel.trans, 0 ) )
+ return true;
+ break;
+
+ case RangeInS2:
+ if ( FsmGraph::shouldMarkPtr( markIndex, 0, outPair.s2Tel.trans ) )
+ return true;
+ break;
+
+ case RangeOverlap:
+ if ( FsmGraph::shouldMarkPtr( markIndex,
+ outPair.s1Tel.trans, outPair.s2Tel.trans ) )
+ return true;
+ break;
+
+ case BreakS1:
+ case BreakS2:
+ break;
+ }
+ }
+
+ return false;
+}
+
+/*
+ * Transition Comparison.
+ */
+
+/* Compare target partitions. Either pointer may be null. */
+int FsmGraph::comparePartPtr( FsmTrans *trans1, FsmTrans *trans2 )
+{
+ if ( trans1 != 0 ) {
+ /* If trans1 is set then so should trans2. The initial partitioning
+ * guarantees this for us. */
+ if ( trans1->toState == 0 && trans2->toState != 0 )
+ return -1;
+ else if ( trans1->toState != 0 && trans2->toState == 0 )
+ return 1;
+ else if ( trans1->toState != 0 ) {
+ /* Both of targets are set. */
+ return CmpOrd< MinPartition* >::compare(
+ trans1->toState->alg.partition, trans2->toState->alg.partition );
+ }
+ }
+ return 0;
+}
+
+
+/* Compares two transition pointers according to priority and functions.
+ * Either pointer may be null. Does not consider to state or from state. */
+int FsmGraph::compareDataPtr( FsmTrans *trans1, FsmTrans *trans2 )
+{
+ if ( trans1 == 0 && trans2 != 0 )
+ return -1;
+ else if ( trans1 != 0 && trans2 == 0 )
+ return 1;
+ else if ( trans1 != 0 ) {
+ /* Both of the transition pointers are set. */
+ int compareRes = compareTransData( trans1, trans2 );
+ if ( compareRes != 0 )
+ return compareRes;
+ }
+ return 0;
+}
+
+/* Compares two transitions according to target state, priority and functions.
+ * Does not consider from state. Either of the pointers may be null. */
+int FsmGraph::compareFullPtr( FsmTrans *trans1, FsmTrans *trans2 )
+{
+ if ( (trans1 != 0) ^ (trans2 != 0) ) {
+ /* Exactly one of the transitions is set. */
+ if ( trans1 != 0 )
+ return -1;
+ else
+ return 1;
+ }
+ else if ( trans1 != 0 ) {
+ /* Both of the transition pointers are set. Test target state,
+ * priority and funcs. */
+ if ( trans1->toState < trans2->toState )
+ return -1;
+ else if ( trans1->toState > trans2->toState )
+ return 1;
+ else if ( trans1->toState != 0 ) {
+ /* Test transition data. */
+ int compareRes = compareTransData( trans1, trans2 );
+ if ( compareRes != 0 )
+ return compareRes;
+ }
+ }
+ return 0;
+}
+
+
+bool FsmGraph::shouldMarkPtr( MarkIndex &markIndex, FsmTrans *trans1,
+ FsmTrans *trans2 )
+{
+ if ( (trans1 != 0) ^ (trans2 != 0) ) {
+ /* Exactly one of the transitions is set. The initial mark round
+ * should rule out this case. */
+ assert( false );
+ }
+ else if ( trans1 != 0 ) {
+ /* Both of the transitions are set. If the target pair is marked, then
+ * the pair we are considering gets marked. */
+ return markIndex.isPairMarked( trans1->toState->alg.stateNum,
+ trans2->toState->alg.stateNum );
+ }
+
+ /* Neither of the transitiosn are set. */
+ return false;
+}
+
+
diff --git a/src/global.h b/src/global.h
new file mode 100644
index 0000000..2dd6e4f
--- /dev/null
+++ b/src/global.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __COLM_GLOBAL_H
+#define __COLM_GLOBAL_H
+
+#include <stdio.h>
+#include <iostream>
+#include <fstream>
+#include <fstream>
+#include <string>
+
+#include "config.h"
+#include "defs.h"
+#include "avltree.h"
+#include "keyops.h"
+
+#define PROGNAME "colm"
+
+/* IO filenames and stream. */
+extern bool genGraphviz;
+extern int gblErrorCount;
+
+std::ostream &error();
+
+/* IO filenames and stream. */
+extern std::ostream *outStream;
+extern bool generateGraphviz;
+extern bool branchPointInfo;
+extern bool verbose, logging;
+extern bool addUniqueEmptyProductions;
+
+extern int gblErrorCount;
+extern char startDefName[];
+
+/* Error reporting. */
+std::ostream &error();
+std::ostream &error( int first_line, int first_column );
+std::ostream &warning( );
+std::ostream &warning( int first_line, int first_column );
+
+extern std::ostream *outStream;
+extern bool printStatistics;
+
+extern int gblErrorCount;
+extern bool gblLibrary;
+extern char machineMain[];
+extern const char *exportHeaderFn;
+
+struct colm_location;
+
+/* Location in an input file. */
+struct InputLoc
+{
+ InputLoc( colm_location *pcloc );
+
+ InputLoc() : fileName(0), line(-1), col(-1) {}
+
+ InputLoc( const InputLoc &loc )
+ {
+ fileName = loc.fileName;
+ line = loc.line;
+ col = loc.col;
+ }
+
+ const char *fileName;
+ int line;
+ int col;
+};
+
+extern InputLoc internal;
+
+/* Error reporting. */
+std::ostream &error();
+std::ostream &error( const InputLoc &loc );
+std::ostream &warning( const InputLoc &loc );
+
+void scan( char *fileName, std::istream &input, std::ostream &output );
+void terminateAllParsers( );
+void checkMachines( );
+
+void xmlEscapeHost( std::ostream &out, char *data, int len );
+void openOutput();
+void escapeLiteralString( std::ostream &out, const char *data );
+
+#endif
diff --git a/src/if1.cc b/src/if1.cc
new file mode 100644
index 0000000..0fb8cb2
--- /dev/null
+++ b/src/if1.cc
@@ -0,0 +1,101 @@
+#include "if1.h"
+::literal lex_factor::Literal() { static int a[] = {1, 0, 0}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr lex_factor::Expr() { static int a[] = {1, 1, 1}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal lex_factor::Low() { static int a[] = {1, 2, 0}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal lex_factor::High() { static int a[] = {1, 2, 2}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id lex_factor::Id() { static int a[] = {1, 3, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_neg lex_factor_neg::FactorNeg() { static int a[] = {1, 0, 1}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor lex_factor_neg::Factor() { static int a[] = {1, 1, 0}; return ::lex_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_rep lex_factor_rep::FactorRep() { static int a[] = {2, 0, 0, 1, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::STAR lex_factor_rep::Star() { static int a[] = {1, 0, 1}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PLUS lex_factor_rep::Plus() { static int a[] = {1, 1, 1}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_neg lex_factor_rep::FactorNeg() { static int a[] = {1, 2, 0}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_term lex_term::Term() { static int a[] = {1, 0, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_rep lex_term::FactorRep() { static int a[] = {2, 0, 2, 1, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr lex_expr::Expr() { static int a[] = {1, 0, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_term lex_expr::Term() { static int a[] = {2, 0, 2, 1, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NI opt_ni::Ni() { static int a[] = {1, 0, 0}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::STAR opt_prod_repeat::Star() { static int a[] = {1, 0, 0}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id opt_prod_el_name::Name() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_prod_el_name prod_el::OptName() { static int a[] = {1, 0, 0}; return ::opt_prod_el_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id prod_el::Id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_prod_repeat prod_el::OptRepeat() { static int a[] = {1, 0, 2}; return ::opt_prod_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el_list prod_el_list::ProdElList() { static int a[] = {1, 0, 0}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el prod_el_list::ProdEl() { static int a[] = {1, 0, 1}; return ::prod_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COMMIT opt_commit::Commit() { static int a[] = {1, 0, 0}; return ::COMMIT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id opt_prod_name::Name() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el_list prod::ProdElList() { static int a[] = {1, 0, 1}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_prod_name prod::OptName() { static int a[] = {1, 0, 3}; return ::opt_prod_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_commit prod::OptCommit() { static int a[] = {1, 0, 4}; return ::opt_commit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_list prod_list::ProdList() { static int a[] = {1, 0, 0}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod prod_list::Prod() { static int a[] = {2, 0, 2, 1, 0}; return ::prod( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr ignore_def::Expr() { static int a[] = {1, 0, 2}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id token_def::Id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_ni token_def::LeftNi() { static int a[] = {1, 0, 2}; return ::opt_ni( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr token_def::Expr() { static int a[] = {1, 0, 4}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_ni token_def::RightNi() { static int a[] = {1, 0, 6}; return ::opt_ni( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_list token_list::TokenList() { static int a[] = {2, 0, 0, 1, 0}; return ::token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_def token_list::TokenDef() { static int a[] = {1, 0, 1}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ignore_def token_list::IgnoreDef() { static int a[] = {1, 1, 1}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_list item::TokenList() { static int a[] = {1, 0, 1}; return ::token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id item::DefId() { static int a[] = {1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_list item::ProdList() { static int a[] = {1, 1, 2}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_item start::ItemList() { static int a[] = {1, 0, 0}; return ::_repeat_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::start __accum0::tree() { return ::start( __prg, colm_get_attr( __tree, 0) ); }
+::str __accum0::error() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+::_repeat_item _repeat_item:: next() { return ::_repeat_item( __prg, colm_get_repeat_next( __tree ) ); }
+::item _repeat_item:: value() { return ::item( __prg, colm_get_repeat_val( __tree ) ); }
+::str __list0::head() { return ::str( __prg, colm_get_attr( __tree, 0) ); }
+::str __list0::tail() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+::str __list0::top() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+::literal _T_lex_factor::Literal() { static int a[] = {1, 0, 0}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr _T_lex_factor::Expr() { static int a[] = {1, 1, 1}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal _T_lex_factor::Low() { static int a[] = {1, 2, 0}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal _T_lex_factor::High() { static int a[] = {1, 2, 2}; return ::literal( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_lex_factor::Id() { static int a[] = {1, 3, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_neg _T_lex_factor_neg::FactorNeg() { static int a[] = {1, 0, 1}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor _T_lex_factor_neg::Factor() { static int a[] = {1, 1, 0}; return ::lex_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_rep _T_lex_factor_rep::FactorRep() { static int a[] = {2, 0, 0, 1, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::STAR _T_lex_factor_rep::Star() { static int a[] = {1, 0, 1}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PLUS _T_lex_factor_rep::Plus() { static int a[] = {1, 1, 1}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_neg _T_lex_factor_rep::FactorNeg() { static int a[] = {1, 2, 0}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_term _T_lex_term::Term() { static int a[] = {1, 0, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_rep _T_lex_term::FactorRep() { static int a[] = {2, 0, 2, 1, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr _T_lex_expr::Expr() { static int a[] = {1, 0, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_term _T_lex_expr::Term() { static int a[] = {2, 0, 2, 1, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NI _T_opt_ni::Ni() { static int a[] = {1, 0, 0}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::STAR _T_opt_prod_repeat::Star() { static int a[] = {1, 0, 0}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_opt_prod_el_name::Name() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_prod_el_name _T_prod_el::OptName() { static int a[] = {1, 0, 0}; return ::opt_prod_el_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_prod_el::Id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_prod_repeat _T_prod_el::OptRepeat() { static int a[] = {1, 0, 2}; return ::opt_prod_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el_list _T_prod_el_list::ProdElList() { static int a[] = {1, 0, 0}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el _T_prod_el_list::ProdEl() { static int a[] = {1, 0, 1}; return ::prod_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COMMIT _T_opt_commit::Commit() { static int a[] = {1, 0, 0}; return ::COMMIT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_opt_prod_name::Name() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el_list _T_prod::ProdElList() { static int a[] = {1, 0, 1}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_prod_name _T_prod::OptName() { static int a[] = {1, 0, 3}; return ::opt_prod_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_commit _T_prod::OptCommit() { static int a[] = {1, 0, 4}; return ::opt_commit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_list _T_prod_list::ProdList() { static int a[] = {1, 0, 0}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod _T_prod_list::Prod() { static int a[] = {2, 0, 2, 1, 0}; return ::prod( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr _T_ignore_def::Expr() { static int a[] = {1, 0, 2}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_token_def::Id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_ni _T_token_def::LeftNi() { static int a[] = {1, 0, 2}; return ::opt_ni( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr _T_token_def::Expr() { static int a[] = {1, 0, 4}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_ni _T_token_def::RightNi() { static int a[] = {1, 0, 6}; return ::opt_ni( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_list _T_token_list::TokenList() { static int a[] = {2, 0, 0, 1, 0}; return ::token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_def _T_token_list::TokenDef() { static int a[] = {1, 0, 1}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ignore_def _T_token_list::IgnoreDef() { static int a[] = {1, 1, 1}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_list _T_item::TokenList() { static int a[] = {1, 0, 1}; return ::token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_item::DefId() { static int a[] = {1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_list _T_item::ProdList() { static int a[] = {1, 1, 2}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_item _T_start::ItemList() { static int a[] = {1, 0, 0}; return ::_repeat_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::start _T___accum0::tree() { return ::start( __prg, colm_get_attr( __tree, 0) ); }
+::str _T___accum0::error() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+::str _T___list0::head() { return ::str( __prg, colm_get_attr( __tree, 0) ); }
+::str _T___list0::tail() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+::str _T___list0::top() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+
+::start ColmTree( colm_program *prg )
+{ return ::start( prg, colm_get_global( prg, 0) ); }
+
diff --git a/src/if1.h b/src/if1.h
new file mode 100644
index 0000000..7199da6
--- /dev/null
+++ b/src/if1.h
@@ -0,0 +1,1148 @@
+#ifndef _EXPORTS_H
+#define _EXPORTS_H
+
+#include <colm/colm.h>
+#include <string>
+
+inline void appendString( colm_print_args *args, const char *data, int length )
+{
+ std::string *str = (std::string*)args->arg;
+ *str += std::string( data, length );
+}
+
+inline std::string printTreeStr( colm_program *prg, colm_tree *tree, bool trim )
+{
+ std::string str;
+ colm_print_args printArgs = { &str, 1, 0, trim, &appendString,
+ &colm_print_null, &colm_print_term_tree, &colm_print_null };
+ colm_print_tree_args( prg, colm_vm_root(prg), &printArgs, tree );
+ return str;
+}
+
+struct _notoken;
+struct ptr;
+struct _void;
+struct _bool;
+struct _int;
+struct str;
+struct stream;
+struct il;
+struct any;
+struct _literal_0005;
+struct _literal_0007;
+struct _literal_0009;
+struct _literal_000b;
+struct _literal_000d;
+struct _literal_001b;
+struct _literal_001d;
+struct _literal_001f;
+struct _literal_0021;
+struct _literal_0023;
+struct _literal_0025;
+struct _literal_0027;
+struct _literal_0029;
+struct _literal_002b;
+struct _literal_002d;
+struct _ignore_0001;
+struct _ignore_0003;
+struct NI;
+struct COMMIT;
+struct id;
+struct literal;
+struct STAR;
+struct PLUS;
+struct lex_factor;
+struct lex_factor_neg;
+struct lex_factor_rep;
+struct lex_term;
+struct lex_expr;
+struct opt_ni;
+struct opt_prod_repeat;
+struct opt_prod_el_name;
+struct prod_el;
+struct prod_el_list;
+struct opt_commit;
+struct opt_prod_name;
+struct prod;
+struct prod_list;
+struct ignore_def;
+struct token_def;
+struct token_list;
+struct item;
+struct start;
+struct _ign_0x11bb1a0;
+struct __accum0;
+struct _repeat_item;
+struct __list0;
+struct _T_any;
+struct _T_lex_factor;
+struct _T_lex_factor_neg;
+struct _T_lex_factor_rep;
+struct _T_lex_term;
+struct _T_lex_expr;
+struct _T_opt_ni;
+struct _T_opt_prod_repeat;
+struct _T_opt_prod_el_name;
+struct _T_prod_el;
+struct _T_prod_el_list;
+struct _T_opt_commit;
+struct _T_opt_prod_name;
+struct _T_prod;
+struct _T_prod_list;
+struct _T_ignore_def;
+struct _T_token_def;
+struct _T_token_list;
+struct _T_item;
+struct _T_start;
+struct _T___accum0;
+struct _T__repeat_item;
+struct _T___list0;
+struct _root;
+struct _notoken
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _notoken( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct ptr
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ ptr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _void
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _void( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _bool
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _bool( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _int
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _int( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct str
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ str( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct stream
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ stream( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct il
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ il( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct any
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ any( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_0005
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_0005( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_0007
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_0007( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_0009
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_0009( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_000b
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_000b( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_000d
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_000d( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_001b
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_001b( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_001d
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_001d( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_001f
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_001f( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_0021
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_0021( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_0023
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_0023( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_0025
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_0025( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_0027
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_0027( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_0029
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_0029( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_002b
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_002b( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _literal_002d
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _literal_002d( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ignore_0001
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ignore_0001( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ignore_0003
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ignore_0003( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct NI
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ NI( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct COMMIT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ COMMIT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct id
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ id( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct literal
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ literal( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct STAR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ STAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PLUS
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PLUS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct lex_factor
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::literal Literal();
+ ::lex_expr Expr();
+ ::literal Low();
+ ::literal High();
+ ::id Id();
+};
+struct lex_factor_neg
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_factor_neg( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_factor_neg FactorNeg();
+ ::lex_factor Factor();
+};
+struct lex_factor_rep
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_factor_rep( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_factor_rep FactorRep();
+ ::STAR Star();
+ ::PLUS Plus();
+ ::lex_factor_neg FactorNeg();
+};
+struct lex_term
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_term Term();
+ ::lex_factor_rep FactorRep();
+};
+struct lex_expr
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_expr Expr();
+ ::lex_term Term();
+};
+struct opt_ni
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_ni( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::NI Ni();
+};
+struct opt_prod_repeat
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_prod_repeat( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::STAR Star();
+};
+struct opt_prod_el_name
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_prod_el_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id Name();
+};
+struct prod_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ prod_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::opt_prod_el_name OptName();
+ ::id Id();
+ ::opt_prod_repeat OptRepeat();
+};
+struct prod_el_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ prod_el_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::prod_el_list ProdElList();
+ ::prod_el ProdEl();
+};
+struct opt_commit
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_commit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COMMIT Commit();
+};
+struct opt_prod_name
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_prod_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id Name();
+};
+struct prod
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ prod( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::prod_el_list ProdElList();
+ ::opt_prod_name OptName();
+ ::opt_commit OptCommit();
+};
+struct prod_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ prod_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::prod_list ProdList();
+ ::prod Prod();
+};
+struct ignore_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ ignore_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_expr Expr();
+};
+struct token_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ token_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id Id();
+ ::opt_ni LeftNi();
+ ::lex_expr Expr();
+ ::opt_ni RightNi();
+};
+struct token_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ token_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::token_list TokenList();
+ ::token_def TokenDef();
+ ::ignore_def IgnoreDef();
+};
+struct item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::token_list TokenList();
+ ::id DefId();
+ ::prod_list ProdList();
+};
+struct start
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ start( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::_repeat_item ItemList();
+};
+struct _ign_0x11bb1a0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ign_0x11bb1a0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct __accum0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ __accum0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::start tree();
+ ::str error();
+};
+struct _repeat_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_item next();
+ ::item value();
+};
+struct __list0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ __list0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::str head();
+ ::str tail();
+ ::str top();
+};
+struct _T_any
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_any( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T_lex_factor
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::literal Literal();
+ ::lex_expr Expr();
+ ::literal Low();
+ ::literal High();
+ ::id Id();
+};
+struct _T_lex_factor_neg
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_factor_neg( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_factor_neg FactorNeg();
+ ::lex_factor Factor();
+};
+struct _T_lex_factor_rep
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_factor_rep( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_factor_rep FactorRep();
+ ::STAR Star();
+ ::PLUS Plus();
+ ::lex_factor_neg FactorNeg();
+};
+struct _T_lex_term
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_term Term();
+ ::lex_factor_rep FactorRep();
+};
+struct _T_lex_expr
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_expr Expr();
+ ::lex_term Term();
+};
+struct _T_opt_ni
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_ni( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::NI Ni();
+};
+struct _T_opt_prod_repeat
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_prod_repeat( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::STAR Star();
+};
+struct _T_opt_prod_el_name
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_prod_el_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id Name();
+};
+struct _T_prod_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_prod_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::opt_prod_el_name OptName();
+ ::id Id();
+ ::opt_prod_repeat OptRepeat();
+};
+struct _T_prod_el_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_prod_el_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::prod_el_list ProdElList();
+ ::prod_el ProdEl();
+};
+struct _T_opt_commit
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_commit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COMMIT Commit();
+};
+struct _T_opt_prod_name
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_prod_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id Name();
+};
+struct _T_prod
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_prod( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::prod_el_list ProdElList();
+ ::opt_prod_name OptName();
+ ::opt_commit OptCommit();
+};
+struct _T_prod_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_prod_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::prod_list ProdList();
+ ::prod Prod();
+};
+struct _T_ignore_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_ignore_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_expr Expr();
+};
+struct _T_token_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_token_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id Id();
+ ::opt_ni LeftNi();
+ ::lex_expr Expr();
+ ::opt_ni RightNi();
+};
+struct _T_token_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_token_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::token_list TokenList();
+ ::token_def TokenDef();
+ ::ignore_def IgnoreDef();
+};
+struct _T_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::token_list TokenList();
+ ::id DefId();
+ ::prod_list ProdList();
+};
+struct _T_start
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_start( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::_repeat_item ItemList();
+};
+struct _T___accum0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T___accum0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::start tree();
+ ::str error();
+};
+struct _T__repeat_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T___list0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T___list0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::str head();
+ ::str tail();
+ ::str top();
+};
+struct _root
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _root( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+::start ColmTree( colm_program *prg );
+
+#endif
diff --git a/src/if2.cc b/src/if2.cc
new file mode 100644
index 0000000..55d7365
--- /dev/null
+++ b/src/if2.cc
@@ -0,0 +1,1091 @@
+#include "if2.h"
+::_repeat_root_item start::RootItemList() { static int a[] = {1, 0, 0}; return ::_repeat_root_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::rl_def root_item::rl_def() { static int a[] = {1, 0, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_def root_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_def root_item::token_def() { static int a[] = {1, 2, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ic_def root_item::ic_def() { static int a[] = {1, 3, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ignore_def root_item::ignore_def() { static int a[] = {1, 4, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cfl_def root_item::cfl_def() { static int a[] = {1, 5, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_def root_item::region_def() { static int a[] = {1, 6, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::context_def root_item::context_def() { static int a[] = {1, 7, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::namespace_def root_item::namespace_def() { static int a[] = {1, 8, 0}; return ::namespace_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::function_def root_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::iter_def root_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::statement root_item::statement() { static int a[] = {1, 11, 0}; return ::statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::global_def root_item::global_def() { static int a[] = {1, 12, 0}; return ::global_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::export_def root_item::export_def() { static int a[] = {1, 13, 0}; return ::export_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pre_eof_def root_item::pre_eof_def() { static int a[] = {1, 14, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::precedence_def root_item::precedence_def() { static int a[] = {1, 15, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::alias_def root_item::alias_def() { static int a[] = {1, 16, 0}; return ::alias_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::include root_item::include() { static int a[] = {1, 17, 0}; return ::include( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::INCLUDE include::INCLUDE() { static int a[] = {1, 0, 0}; return ::INCLUDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ include::SQ() { static int a[] = {1, 0, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data include::SqConsDataList() { static int a[] = {1, 0, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term include::sq_lit_term() { static int a[] = {1, 0, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pred_type precedence_def::pred_type() { static int a[] = {1, 0, 0}; return ::pred_type( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pred_token_list precedence_def::pred_token_list() { static int a[] = {1, 0, 1}; return ::pred_token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEFT pred_type::LEFT() { static int a[] = {1, 0, 0}; return ::LEFT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RIGHT pred_type::RIGHT() { static int a[] = {1, 1, 0}; return ::RIGHT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NONASSOC pred_type::NONASSOC() { static int a[] = {1, 2, 0}; return ::NONASSOC( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pred_token_list pred_token_list::_pred_token_list() { static int a[] = {1, 0, 0}; return ::pred_token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COMMA pred_token_list::COMMA() { static int a[] = {1, 0, 1}; return ::COMMA( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pred_token pred_token_list::pred_token() { static int a[] = {2, 0, 2, 1, 0}; return ::pred_token( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual pred_token::region_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id pred_token::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::backtick_lit pred_token::backtick_lit() { static int a[] = {1, 1, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PREEOF pre_eof_def::PREEOF() { static int a[] = {1, 0, 0}; return ::PREEOF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN pre_eof_def::COPEN() { static int a[] = {1, 0, 1}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list pre_eof_def::lang_stmt_list() { static int a[] = {1, 0, 2}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE pre_eof_def::CCLOSE() { static int a[] = {1, 0, 3}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ALIAS alias_def::ALIAS() { static int a[] = {1, 0, 0}; return ::ALIAS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id alias_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref alias_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::context_var_def context_item::context_var_def() { static int a[] = {1, 0, 0}; return ::context_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_def context_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::rl_def context_item::rl_def() { static int a[] = {1, 2, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_def context_item::token_def() { static int a[] = {1, 3, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ic_def context_item::ic_def() { static int a[] = {1, 4, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ignore_def context_item::ignore_def() { static int a[] = {1, 5, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cfl_def context_item::cfl_def() { static int a[] = {1, 6, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_def context_item::region_def() { static int a[] = {1, 7, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::context_def context_item::context_def() { static int a[] = {1, 8, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::function_def context_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::iter_def context_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::export_def context_item::export_def() { static int a[] = {1, 11, 0}; return ::export_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pre_eof_def context_item::pre_eof_def() { static int a[] = {1, 12, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::precedence_def context_item::precedence_def() { static int a[] = {1, 13, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EXPORT export_def::EXPORT() { static int a[] = {1, 0, 0}; return ::EXPORT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_def export_def::var_def() { static int a[] = {1, 0, 1}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_def_init export_def::opt_def_init() { static int a[] = {1, 0, 2}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GLOBAL global_def::GLOBAL() { static int a[] = {1, 0, 0}; return ::GLOBAL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_def global_def::var_def() { static int a[] = {1, 0, 1}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_def_init global_def::opt_def_init() { static int a[] = {1, 0, 2}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ITER iter_def::ITER() { static int a[] = {1, 0, 0}; return ::ITER( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id iter_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN iter_def::POPEN() { static int a[] = {1, 0, 2}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::param_var_def_list iter_def::ParamVarDefList() { static int a[] = {1, 0, 3}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE iter_def::PCLOSE() { static int a[] = {1, 0, 4}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN iter_def::COPEN() { static int a[] = {1, 0, 5}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list iter_def::lang_stmt_list() { static int a[] = {1, 0, 6}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE iter_def::CCLOSE() { static int a[] = {1, 0, 7}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::REF reference_type_ref::REF() { static int a[] = {1, 0, 0}; return ::REF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LT reference_type_ref::LT() { static int a[] = {1, 0, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref reference_type_ref::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GT reference_type_ref::GT() { static int a[] = {1, 0, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::param_var_def param_var_def_list::param_var_def() { static int a[] = {1, 0, 0}; return ::param_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::param_var_def_list param_var_def_list::_param_var_def_list() { static int a[] = {1, 0, 1}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id param_var_def::id() { static int a[] = {2, 0, 0, 1, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON param_var_def::COLON() { static int a[] = {2, 0, 1, 1, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref param_var_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::reference_type_ref param_var_def::reference_type_ref() { static int a[] = {1, 1, 2}; return ::reference_type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EXPORT opt_export::EXPORT() { static int a[] = {1, 0, 0}; return ::EXPORT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_export function_def::opt_export() { static int a[] = {1, 0, 0}; return ::opt_export( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref function_def::type_ref() { static int a[] = {1, 0, 1}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id function_def::id() { static int a[] = {1, 0, 2}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN function_def::POPEN() { static int a[] = {1, 0, 3}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::param_var_def_list function_def::ParamVarDefList() { static int a[] = {1, 0, 4}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE function_def::PCLOSE() { static int a[] = {1, 0, 5}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN function_def::COPEN() { static int a[] = {1, 0, 6}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list function_def::lang_stmt_list() { static int a[] = {1, 0, 7}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE function_def::CCLOSE() { static int a[] = {1, 0, 8}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_def context_var_def::var_def() { static int a[] = {1, 0, 0}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONTEXT context_def::CONTEXT() { static int a[] = {1, 0, 0}; return ::CONTEXT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id context_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_context_item context_def::ContextItemList() { static int a[] = {1, 0, 2}; return ::_repeat_context_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::END context_def::END() { static int a[] = {1, 0, 3}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LITERAL literal_def::LITERAL() { static int a[] = {1, 0, 0}; return ::LITERAL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_list literal_def::literal_list() { static int a[] = {1, 0, 1}; return ::literal_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_list literal_list::_literal_list() { static int a[] = {1, 0, 0}; return ::literal_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_item literal_list::literal_item() { static int a[] = {2, 0, 1, 1, 0}; return ::literal_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::no_ignore_left literal_item::no_ignore_left() { static int a[] = {1, 0, 0}; return ::no_ignore_left( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::backtick_lit literal_item::backtick_lit() { static int a[] = {1, 0, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::no_ignore_right literal_item::no_ignore_right() { static int a[] = {1, 0, 2}; return ::no_ignore_right( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NI no_ignore_left::NI() { static int a[] = {1, 0, 0}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MINUS no_ignore_left::MINUS() { static int a[] = {1, 0, 1}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MINUS no_ignore_right::MINUS() { static int a[] = {1, 0, 0}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NI no_ignore_right::NI() { static int a[] = {1, 0, 1}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NAMESPACE namespace_def::NAMESPACE() { static int a[] = {1, 0, 0}; return ::NAMESPACE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id namespace_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_namespace_item namespace_def::ItemList() { static int a[] = {1, 0, 2}; return ::_repeat_namespace_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::END namespace_def::END() { static int a[] = {1, 0, 3}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::rl_def namespace_item::rl_def() { static int a[] = {1, 0, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_def namespace_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_def namespace_item::token_def() { static int a[] = {1, 2, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ic_def namespace_item::ic_def() { static int a[] = {1, 3, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ignore_def namespace_item::ignore_def() { static int a[] = {1, 4, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cfl_def namespace_item::cfl_def() { static int a[] = {1, 5, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_def namespace_item::region_def() { static int a[] = {1, 6, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::context_def namespace_item::context_def() { static int a[] = {1, 7, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::namespace_def namespace_item::namespace_def() { static int a[] = {1, 8, 0}; return ::namespace_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::function_def namespace_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::iter_def namespace_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pre_eof_def namespace_item::pre_eof_def() { static int a[] = {1, 11, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::precedence_def namespace_item::precedence_def() { static int a[] = {1, 12, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::alias_def namespace_item::alias_def() { static int a[] = {1, 13, 0}; return ::alias_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::include namespace_item::include() { static int a[] = {1, 14, 0}; return ::include( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::REDUCEFIRST opt_reduce_first::REDUCEFIRST() { static int a[] = {1, 0, 0}; return ::REDUCEFIRST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DEF cfl_def::DEF() { static int a[] = {1, 0, 0}; return ::DEF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id cfl_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_var_def cfl_def::VarDefList() { static int a[] = {1, 0, 2}; return ::_repeat_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_reduce_first cfl_def::opt_reduce_first() { static int a[] = {1, 0, 3}; return ::opt_reduce_first( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_list cfl_def::prod_list() { static int a[] = {1, 0, 4}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX region_def::LEX() { static int a[] = {1, 0, 0}; return ::LEX( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_root_item region_def::RootItemList() { static int a[] = {1, 0, 1}; return ::_repeat_root_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::END region_def::END() { static int a[] = {1, 0, 2}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RL rl_def::RL() { static int a[] = {1, 0, 0}; return ::RL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id rl_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_FSLASH rl_def::LEX_FSLASH() { static int a[] = {2, 0, 2, 0, 4}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr rl_def::lex_expr() { static int a[] = {1, 0, 3}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr opt_lex_expr::lex_expr() { static int a[] = {1, 0, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TOKEN token_def::TOKEN() { static int a[] = {1, 0, 0}; return ::TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id token_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_var_def token_def::VarDefList() { static int a[] = {1, 0, 2}; return ::_repeat_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::no_ignore_left token_def::no_ignore_left() { static int a[] = {1, 0, 3}; return ::no_ignore_left( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_FSLASH token_def::LEX_FSLASH() { static int a[] = {2, 0, 4, 0, 6}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_lex_expr token_def::opt_lex_expr() { static int a[] = {1, 0, 5}; return ::opt_lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::no_ignore_right token_def::no_ignore_right() { static int a[] = {1, 0, 7}; return ::no_ignore_right( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_translate token_def::opt_translate() { static int a[] = {1, 0, 8}; return ::opt_translate( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TOKEN ic_def::TOKEN() { static int a[] = {1, 0, 0}; return ::TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id ic_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MINUS ic_def::MINUS() { static int a[] = {1, 0, 2}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN opt_translate::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list opt_translate::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE opt_translate::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id opt_id::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::IGNORE ignore_def::IGNORE() { static int a[] = {1, 0, 0}; return ::IGNORE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_id ignore_def::opt_id() { static int a[] = {1, 0, 1}; return ::opt_id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_FSLASH ignore_def::LEX_FSLASH() { static int a[] = {2, 0, 2, 0, 4}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_lex_expr ignore_def::opt_lex_expr() { static int a[] = {1, 0, 3}; return ::opt_lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_prod_el_name prod_el::opt_prod_el_name() { static int a[] = {2, 0, 0, 1, 0}; return ::opt_prod_el_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual prod_el::region_qual() { static int a[] = {2, 0, 1, 1, 1}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id prod_el::id() { static int a[] = {1, 0, 2}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_repeat prod_el::opt_repeat() { static int a[] = {2, 0, 3, 1, 3}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::backtick_lit prod_el::backtick_lit() { static int a[] = {1, 1, 2}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id opt_prod_el_name::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON opt_prod_el_name::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el_list prod_el_list::_prod_el_list() { static int a[] = {1, 0, 0}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el prod_el_list::prod_el() { static int a[] = {1, 0, 1}; return ::prod_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COMMIT opt_commit::COMMIT() { static int a[] = {1, 0, 0}; return ::COMMIT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON opt_prod_name::COLON() { static int a[] = {1, 0, 0}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id opt_prod_name::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQOPEN prod::SQOPEN() { static int a[] = {1, 0, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el_list prod::prod_el_list() { static int a[] = {1, 0, 1}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQCLOSE prod::SQCLOSE() { static int a[] = {1, 0, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_prod_name prod::opt_prod_name() { static int a[] = {1, 0, 3}; return ::opt_prod_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_commit prod::opt_commit() { static int a[] = {1, 0, 4}; return ::opt_commit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_reduce prod::opt_reduce() { static int a[] = {1, 0, 5}; return ::opt_reduce( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN opt_reduce::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list opt_reduce::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE opt_reduce::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_list prod_list::_prod_list() { static int a[] = {1, 0, 0}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::BAR prod_list::BAR() { static int a[] = {1, 0, 1}; return ::BAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod prod_list::prod() { static int a[] = {2, 0, 2, 1, 0}; return ::prod( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::print_stmt statement::print_stmt() { static int a[] = {1, 0, 0}; return ::print_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::expr_stmt statement::expr_stmt() { static int a[] = {1, 1, 0}; return ::expr_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_def statement::var_def() { static int a[] = {1, 2, 0}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_def_init statement::opt_def_init() { static int a[] = {1, 2, 1}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::FOR statement::FOR() { static int a[] = {1, 3, 0}; return ::FOR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id statement::id() { static int a[] = {1, 3, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON statement::COLON() { static int a[] = {1, 3, 2}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref statement::type_ref() { static int a[] = {1, 3, 3}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::IN statement::IN() { static int a[] = {1, 3, 4}; return ::IN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::iter_call statement::iter_call() { static int a[] = {1, 3, 5}; return ::iter_call( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::block_or_single statement::block_or_single() { static int a[] = {3, 3, 6, 4, 2, 5, 2}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::IF statement::IF() { static int a[] = {1, 4, 0}; return ::IF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr statement::code_expr() { static int a[] = {4, 4, 1, 5, 1, 6, 2, 8, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::elsif_list statement::elsif_list() { static int a[] = {1, 4, 3}; return ::elsif_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::WHILE statement::WHILE() { static int a[] = {1, 5, 0}; return ::WHILE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_ref statement::var_ref() { static int a[] = {2, 6, 0, 7, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EQUALS statement::EQUALS() { static int a[] = {1, 6, 1}; return ::EQUALS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::YIELD statement::YIELD() { static int a[] = {1, 7, 0}; return ::YIELD( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RETURN statement::RETURN() { static int a[] = {1, 8, 0}; return ::RETURN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::BREAK statement::BREAK() { static int a[] = {1, 9, 0}; return ::BREAK( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::REJECT statement::REJECT() { static int a[] = {1, 10, 0}; return ::REJECT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::elsif_clause elsif_list::elsif_clause() { static int a[] = {1, 0, 0}; return ::elsif_clause( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::elsif_list elsif_list::_elsif_list() { static int a[] = {1, 0, 1}; return ::elsif_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::optional_else elsif_list::optional_else() { static int a[] = {1, 1, 0}; return ::optional_else( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ELSIF elsif_clause::ELSIF() { static int a[] = {1, 0, 0}; return ::ELSIF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr elsif_clause::code_expr() { static int a[] = {1, 0, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::block_or_single elsif_clause::block_or_single() { static int a[] = {1, 0, 2}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ELSE optional_else::ELSE() { static int a[] = {1, 0, 0}; return ::ELSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::block_or_single optional_else::block_or_single() { static int a[] = {1, 0, 1}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr call_arg_list::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::call_arg_list call_arg_list::_call_arg_list() { static int a[] = {1, 0, 1}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E1 iter_call::E1() { static int a[] = {1, 0, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_ref iter_call::var_ref() { static int a[] = {1, 0, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN iter_call::POPEN() { static int a[] = {1, 0, 2}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::call_arg_list iter_call::call_arg_list() { static int a[] = {1, 0, 3}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE iter_call::PCLOSE() { static int a[] = {1, 0, 4}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E2 iter_call::E2() { static int a[] = {1, 1, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id iter_call::id() { static int a[] = {1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E3 iter_call::E3() { static int a[] = {1, 2, 0}; return ::E3( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr iter_call::code_expr() { static int a[] = {1, 2, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN block_or_single::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list block_or_single::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE block_or_single::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::statement block_or_single::statement() { static int a[] = {1, 1, 0}; return ::statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::REQUIRE require_pattern::REQUIRE() { static int a[] = {1, 0, 0}; return ::REQUIRE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_ref require_pattern::var_ref() { static int a[] = {1, 0, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern require_pattern::pattern() { static int a[] = {1, 0, 2}; return ::pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::require_pattern opt_require_stmt::require_pattern() { static int a[] = {1, 0, 0}; return ::require_pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list opt_require_stmt::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_statement lang_stmt_list::StmtList() { static int a[] = {1, 0, 0}; return ::_repeat_statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_require_stmt lang_stmt_list::opt_require_stmt() { static int a[] = {1, 0, 1}; return ::opt_require_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EQUALS opt_def_init::EQUALS() { static int a[] = {1, 0, 0}; return ::EQUALS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr opt_def_init::code_expr() { static int a[] = {1, 0, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id var_def::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON var_def::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref var_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PRINT print_stmt::PRINT() { static int a[] = {1, 0, 0}; return ::PRINT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN print_stmt::POPEN() { static int a[] = {4, 0, 1, 1, 1, 2, 1, 3, 1}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::call_arg_list print_stmt::call_arg_list() { static int a[] = {4, 0, 2, 1, 2, 2, 2, 3, 2}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE print_stmt::PCLOSE() { static int a[] = {4, 0, 3, 1, 3, 2, 3, 3, 3}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PRINTS print_stmt::PRINTS() { static int a[] = {1, 1, 0}; return ::PRINTS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PRINT_XML print_stmt::PRINT_XML() { static int a[] = {1, 2, 0}; return ::PRINT_XML( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PRINT_XML_AC print_stmt::PRINT_XML_AC() { static int a[] = {1, 3, 0}; return ::PRINT_XML_AC( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr expr_stmt::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr code_expr::_code_expr() { static int a[] = {2, 0, 0, 1, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::AMPAMP code_expr::AMPAMP() { static int a[] = {1, 0, 1}; return ::AMPAMP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_relational code_expr::code_relational() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_relational( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::BARBAR code_expr::BARBAR() { static int a[] = {1, 1, 1}; return ::BARBAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_relational code_relational::_code_relational() { static int a[] = {6, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0}; return ::code_relational( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EQEQ code_relational::EQEQ() { static int a[] = {1, 0, 1}; return ::EQEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_additive code_relational::code_additive() { static int a[] = {7, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 0}; return ::code_additive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NEQ code_relational::NEQ() { static int a[] = {1, 1, 1}; return ::NEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LT code_relational::LT() { static int a[] = {1, 2, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GT code_relational::GT() { static int a[] = {1, 3, 1}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LTEQ code_relational::LTEQ() { static int a[] = {1, 4, 1}; return ::LTEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GTEQ code_relational::GTEQ() { static int a[] = {1, 5, 1}; return ::GTEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_additive code_additive::_code_additive() { static int a[] = {2, 0, 0, 1, 0}; return ::code_additive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PLUS code_additive::PLUS() { static int a[] = {1, 0, 1}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_multiplicitive code_additive::code_multiplicitive() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_multiplicitive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MINUS code_additive::MINUS() { static int a[] = {1, 1, 1}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_multiplicitive code_multiplicitive::_code_multiplicitive() { static int a[] = {2, 0, 0, 1, 0}; return ::code_multiplicitive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::STAR code_multiplicitive::STAR() { static int a[] = {1, 0, 1}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_unary code_multiplicitive::code_unary() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_unary( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::FSLASH code_multiplicitive::FSLASH() { static int a[] = {1, 1, 1}; return ::FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::BANG code_unary::BANG() { static int a[] = {1, 0, 0}; return ::BANG( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_factor code_unary::code_factor() { static int a[] = {5, 0, 1, 1, 1, 2, 1, 3, 1, 4, 0}; return ::code_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DOLLAR code_unary::DOLLAR() { static int a[] = {1, 1, 0}; return ::DOLLAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CARET code_unary::CARET() { static int a[] = {1, 2, 0}; return ::CARET( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PERCENT code_unary::PERCENT() { static int a[] = {1, 3, 0}; return ::PERCENT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DOT opt_eos::DOT() { static int a[] = {1, 0, 0}; return ::DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EOS opt_eos::EOS() { static int a[] = {1, 1, 0}; return ::EOS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::number code_factor::number() { static int a[] = {1, 0, 0}; return ::number( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_ref code_factor::var_ref() { static int a[] = {5, 1, 0, 2, 0, 7, 1, 11, 1, 13, 2}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN code_factor::POPEN() { static int a[] = {4, 1, 1, 6, 0, 14, 1, 15, 1}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::call_arg_list code_factor::call_arg_list() { static int a[] = {3, 1, 2, 14, 2, 15, 2}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE code_factor::PCLOSE() { static int a[] = {4, 1, 3, 6, 2, 14, 3, 15, 3}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NIL code_factor::NIL() { static int a[] = {1, 3, 0}; return ::NIL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TRUE code_factor::TRUE() { static int a[] = {1, 4, 0}; return ::TRUE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::FALSE code_factor::FALSE() { static int a[] = {1, 5, 0}; return ::FALSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr code_factor::code_expr() { static int a[] = {1, 6, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SEND code_factor::SEND() { static int a[] = {1, 7, 0}; return ::SEND( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::accumulate code_factor::accumulate() { static int a[] = {3, 7, 2, 8, 4, 9, 4}; return ::accumulate( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_eos code_factor::opt_eos() { static int a[] = {1, 7, 3}; return ::opt_eos( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PARSE code_factor::PARSE() { static int a[] = {1, 8, 0}; return ::PARSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_capture code_factor::opt_capture() { static int a[] = {3, 8, 1, 9, 1, 10, 1}; return ::opt_capture( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref code_factor::type_ref() { static int a[] = {6, 8, 2, 9, 2, 10, 2, 13, 0, 16, 2, 18, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_field_init code_factor::opt_field_init() { static int a[] = {3, 8, 3, 9, 3, 10, 3}; return ::opt_field_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PARSE_STOP code_factor::PARSE_STOP() { static int a[] = {1, 9, 0}; return ::PARSE_STOP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS code_factor::CONS() { static int a[] = {1, 10, 0}; return ::CONS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::constructor code_factor::constructor() { static int a[] = {1, 10, 4}; return ::constructor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MATCH code_factor::MATCH() { static int a[] = {1, 11, 0}; return ::MATCH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern code_factor::pattern() { static int a[] = {1, 11, 2}; return ::pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::string code_factor::string() { static int a[] = {1, 12, 0}; return ::string( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::IN code_factor::IN() { static int a[] = {1, 13, 1}; return ::IN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MAKE_TREE code_factor::MAKE_TREE() { static int a[] = {1, 14, 0}; return ::MAKE_TREE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MAKE_TOKEN code_factor::MAKE_TOKEN() { static int a[] = {1, 15, 0}; return ::MAKE_TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TYPEID code_factor::TYPEID() { static int a[] = {1, 16, 0}; return ::TYPEID( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LT code_factor::LT() { static int a[] = {2, 16, 1, 18, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GT code_factor::GT() { static int a[] = {2, 16, 3, 18, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NEW code_factor::NEW() { static int a[] = {1, 17, 0}; return ::NEW( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_factor code_factor::_code_factor() { static int a[] = {2, 17, 1, 18, 4}; return ::code_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CAST code_factor::CAST() { static int a[] = {1, 18, 0}; return ::CAST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual type_ref::region_qual() { static int a[] = {2, 0, 0, 1, 2}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id type_ref::id() { static int a[] = {2, 0, 1, 1, 3}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_repeat type_ref::opt_repeat() { static int a[] = {2, 0, 2, 1, 4}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PTR type_ref::PTR() { static int a[] = {1, 1, 0}; return ::PTR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LT type_ref::LT() { static int a[] = {5, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GT type_ref::GT() { static int a[] = {5, 1, 5, 2, 4, 3, 3, 4, 3, 5, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MAP type_ref::MAP() { static int a[] = {1, 2, 0}; return ::MAP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref type_ref::MapKeyType() { static int a[] = {1, 2, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref type_ref::MapValueType() { static int a[] = {1, 2, 3}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LIST type_ref::LIST() { static int a[] = {1, 3, 0}; return ::LIST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref type_ref::_type_ref() { static int a[] = {3, 3, 2, 4, 2, 5, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::VECTOR type_ref::VECTOR() { static int a[] = {1, 4, 0}; return ::VECTOR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PARSER type_ref::PARSER() { static int a[] = {1, 5, 0}; return ::PARSER( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual region_qual::_region_qual() { static int a[] = {1, 0, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id region_qual::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DOUBLE_COLON region_qual::DOUBLE_COLON() { static int a[] = {1, 0, 2}; return ::DOUBLE_COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::STAR opt_repeat::STAR() { static int a[] = {1, 0, 0}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PLUS opt_repeat::PLUS() { static int a[] = {1, 1, 0}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::QUESTION opt_repeat::QUESTION() { static int a[] = {1, 2, 0}; return ::QUESTION( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id opt_capture::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON opt_capture::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN opt_field_init::POPEN() { static int a[] = {1, 0, 0}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_field_init opt_field_init::FieldInitList() { static int a[] = {1, 0, 1}; return ::_repeat_field_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE opt_field_init::PCLOSE() { static int a[] = {1, 0, 2}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr field_init::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id opt_label::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON opt_label::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_DQ dq_lit_term::CONS_DQ() { static int a[] = {1, 0, 0}; return ::CONS_DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_DQ_NL dq_lit_term::CONS_DQ_NL() { static int a[] = {1, 1, 0}; return ::CONS_DQ_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQ sq_lit_term::CONS_SQ() { static int a[] = {1, 0, 0}; return ::CONS_SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQ_NL sq_lit_term::CONS_SQ_NL() { static int a[] = {1, 1, 0}; return ::CONS_SQ_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::tilde_data opt_tilde_data::tilde_data() { static int a[] = {1, 0, 0}; return ::tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual pattern_el_lel::region_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id pattern_el_lel::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_repeat pattern_el_lel::opt_repeat() { static int a[] = {2, 0, 2, 1, 2}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::backtick_lit pattern_el_lel::backtick_lit() { static int a[] = {1, 1, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_label pattern_el::opt_label() { static int a[] = {1, 0, 0}; return ::opt_label( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern_el_lel pattern_el::pattern_el_lel() { static int a[] = {1, 0, 1}; return ::pattern_el_lel( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ pattern_el::DQ() { static int a[] = {1, 1, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_litpat_el pattern_el::LitpatElList() { static int a[] = {1, 1, 1}; return ::_repeat_litpat_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term pattern_el::dq_lit_term() { static int a[] = {1, 1, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ pattern_el::SQ() { static int a[] = {1, 2, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data pattern_el::SqConsDataList() { static int a[] = {1, 2, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term pattern_el::sq_lit_term() { static int a[] = {1, 2, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE pattern_el::TILDE() { static int a[] = {1, 3, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data pattern_el::opt_tilde_data() { static int a[] = {1, 3, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL pattern_el::TILDE_NL() { static int a[] = {1, 3, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_cons_data litpat_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQOPEN litpat_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_pattern_el litpat_el::PatternElList() { static int a[] = {1, 1, 1}; return ::_repeat_pattern_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQCLOSE litpat_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ pattern_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_litpat_el pattern_top_el::LitpatElList() { static int a[] = {1, 0, 1}; return ::_repeat_litpat_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term pattern_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ pattern_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data pattern_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term pattern_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE pattern_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data pattern_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL pattern_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQOPEN pattern_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_pattern_el pattern_top_el::PatternElList() { static int a[] = {1, 3, 1}; return ::_repeat_pattern_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQCLOSE pattern_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern_list pattern_list::_pattern_list() { static int a[] = {1, 0, 0}; return ::pattern_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern_top_el pattern_list::pattern_top_el() { static int a[] = {2, 0, 1, 1, 0}; return ::pattern_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern_list pattern::pattern_list() { static int a[] = {1, 0, 0}; return ::pattern_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E1 cons_el::E1() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual cons_el::region_qual() { static int a[] = {1, 0, 1}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::backtick_lit cons_el::backtick_lit() { static int a[] = {1, 0, 2}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ cons_el::DQ() { static int a[] = {1, 1, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_cons_el cons_el::LitConsElList() { static int a[] = {1, 1, 2}; return ::_repeat_lit_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term cons_el::dq_lit_term() { static int a[] = {1, 1, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ cons_el::SQ() { static int a[] = {1, 2, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data cons_el::SqConsDataList() { static int a[] = {1, 2, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term cons_el::sq_lit_term() { static int a[] = {1, 2, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE cons_el::TILDE() { static int a[] = {1, 3, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data cons_el::opt_tilde_data() { static int a[] = {1, 3, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL cons_el::TILDE_NL() { static int a[] = {1, 3, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E2 cons_el::E2() { static int a[] = {1, 4, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr cons_el::code_expr() { static int a[] = {1, 4, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_cons_data lit_cons_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQOPEN lit_cons_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_cons_el lit_cons_el::ConsElList() { static int a[] = {1, 1, 1}; return ::_repeat_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQCLOSE lit_cons_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ cons_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_cons_el cons_top_el::LitConsElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term cons_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ cons_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data cons_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term cons_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE cons_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data cons_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL cons_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQOPEN cons_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_cons_el cons_top_el::ConsElList() { static int a[] = {1, 3, 1}; return ::_repeat_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQCLOSE cons_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cons_top_el cons_list::cons_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::cons_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cons_list cons_list::_cons_list() { static int a[] = {1, 0, 1}; return ::cons_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cons_list constructor::cons_list() { static int a[] = {1, 0, 0}; return ::cons_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E1 accum_el::E1() { static int a[] = {3, 0, 0, 1, 0, 2, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ accum_el::DQ() { static int a[] = {1, 0, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_accum_el accum_el::LitAccumElList() { static int a[] = {1, 0, 2}; return ::_repeat_lit_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term accum_el::dq_lit_term() { static int a[] = {1, 0, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ accum_el::SQ() { static int a[] = {1, 1, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data accum_el::SqConsDataList() { static int a[] = {1, 1, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term accum_el::sq_lit_term() { static int a[] = {1, 1, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE accum_el::TILDE() { static int a[] = {1, 2, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data accum_el::opt_tilde_data() { static int a[] = {1, 2, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL accum_el::TILDE_NL() { static int a[] = {1, 2, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E2 accum_el::E2() { static int a[] = {1, 3, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr accum_el::code_expr() { static int a[] = {1, 3, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_cons_data lit_accum_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQOPEN lit_accum_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_accum_el lit_accum_el::AccumElList() { static int a[] = {1, 1, 1}; return ::_repeat_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQCLOSE lit_accum_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ accum_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_accum_el accum_top_el::LitAccumElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term accum_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ accum_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data accum_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term accum_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE accum_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data accum_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL accum_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQOPEN accum_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_accum_el accum_top_el::AccumElList() { static int a[] = {1, 3, 1}; return ::_repeat_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQCLOSE accum_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::accum_top_el accum_list::accum_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::accum_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::accum_list accum_list::_accum_list() { static int a[] = {1, 0, 1}; return ::accum_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::accum_list accumulate::accum_list() { static int a[] = {1, 0, 0}; return ::accum_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E1 string_el::E1() { static int a[] = {3, 0, 0, 1, 0, 2, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ string_el::DQ() { static int a[] = {1, 0, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_string_el string_el::LitStringElList() { static int a[] = {1, 0, 2}; return ::_repeat_lit_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term string_el::dq_lit_term() { static int a[] = {1, 0, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ string_el::SQ() { static int a[] = {1, 1, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data string_el::SqConsDataList() { static int a[] = {1, 1, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term string_el::sq_lit_term() { static int a[] = {1, 1, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE string_el::TILDE() { static int a[] = {1, 2, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data string_el::opt_tilde_data() { static int a[] = {1, 2, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL string_el::TILDE_NL() { static int a[] = {1, 2, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E2 string_el::E2() { static int a[] = {1, 3, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr string_el::code_expr() { static int a[] = {1, 3, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_cons_data lit_string_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQOPEN lit_string_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_string_el lit_string_el::StringElList() { static int a[] = {1, 1, 1}; return ::_repeat_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQCLOSE lit_string_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ string_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_string_el string_top_el::LitStringElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term string_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ string_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data string_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term string_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE string_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data string_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL string_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQOPEN string_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_string_el string_top_el::StringElList() { static int a[] = {1, 3, 1}; return ::_repeat_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQCLOSE string_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::string_top_el string_list::string_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::string_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::string_list string_list::_string_list() { static int a[] = {1, 0, 1}; return ::string_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::string_list string::string_list() { static int a[] = {1, 0, 0}; return ::string_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::qual var_ref::qual() { static int a[] = {1, 0, 0}; return ::qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id var_ref::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::qual qual::_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id qual::id() { static int a[] = {2, 0, 1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DOT qual::DOT() { static int a[] = {1, 0, 2}; return ::DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ARROW qual::ARROW() { static int a[] = {1, 1, 2}; return ::ARROW( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr lex_expr::_lex_expr() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_BAR lex_expr::LEX_BAR() { static int a[] = {1, 0, 1}; return ::LEX_BAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_term lex_expr::lex_term() { static int a[] = {5, 0, 2, 1, 2, 2, 2, 3, 2, 4, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_AMP lex_expr::LEX_AMP() { static int a[] = {1, 1, 1}; return ::LEX_AMP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_DASH lex_expr::LEX_DASH() { static int a[] = {1, 2, 1}; return ::LEX_DASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_DASHDASH lex_expr::LEX_DASHDASH() { static int a[] = {1, 3, 1}; return ::LEX_DASHDASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_DOT opt_lex_dot::LEX_DOT() { static int a[] = {1, 0, 0}; return ::LEX_DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_term lex_term::_lex_term() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_lex_dot lex_term::opt_lex_dot() { static int a[] = {1, 0, 1}; return ::opt_lex_dot( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_rep lex_term::lex_factor_rep() { static int a[] = {5, 0, 2, 1, 2, 2, 2, 3, 2, 4, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_COLON_GT lex_term::LEX_COLON_GT() { static int a[] = {1, 1, 1}; return ::LEX_COLON_GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_COLON_GTGT lex_term::LEX_COLON_GTGT() { static int a[] = {1, 2, 1}; return ::LEX_COLON_GTGT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_LT_COLON lex_term::LEX_LT_COLON() { static int a[] = {1, 3, 1}; return ::LEX_LT_COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_rep lex_factor_rep::_lex_factor_rep() { static int a[] = {8, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_STAR lex_factor_rep::LEX_STAR() { static int a[] = {1, 0, 1}; return ::LEX_STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_STARSTAR lex_factor_rep::LEX_STARSTAR() { static int a[] = {1, 1, 1}; return ::LEX_STARSTAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_PLUS lex_factor_rep::LEX_PLUS() { static int a[] = {1, 2, 1}; return ::LEX_PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_QUESTION lex_factor_rep::LEX_QUESTION() { static int a[] = {1, 3, 1}; return ::LEX_QUESTION( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN lex_factor_rep::COPEN() { static int a[] = {4, 4, 1, 5, 1, 6, 1, 7, 1}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_uint lex_factor_rep::lex_uint() { static int a[] = {3, 4, 2, 5, 3, 6, 2}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE lex_factor_rep::CCLOSE() { static int a[] = {4, 4, 3, 5, 4, 6, 4, 7, 5}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COMMA lex_factor_rep::COMMA() { static int a[] = {3, 5, 2, 6, 3, 7, 3}; return ::COMMA( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_uint lex_factor_rep::Low() { static int a[] = {1, 7, 2}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_uint lex_factor_rep::High() { static int a[] = {1, 7, 4}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_neg lex_factor_rep::lex_factor_neg() { static int a[] = {1, 8, 0}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_CARET lex_factor_neg::LEX_CARET() { static int a[] = {1, 0, 0}; return ::LEX_CARET( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_neg lex_factor_neg::_lex_factor_neg() { static int a[] = {1, 0, 1}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor lex_factor_neg::lex_factor() { static int a[] = {1, 1, 0}; return ::lex_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_lit lex_range_lit::lex_lit() { static int a[] = {1, 0, 0}; return ::lex_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_num lex_range_lit::lex_num() { static int a[] = {1, 1, 0}; return ::lex_num( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_uint lex_num::lex_uint() { static int a[] = {1, 0, 0}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_hex lex_num::lex_hex() { static int a[] = {1, 1, 0}; return ::lex_hex( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_lit lex_factor::lex_lit() { static int a[] = {1, 0, 0}; return ::lex_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_id lex_factor::lex_id() { static int a[] = {1, 1, 0}; return ::lex_id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_uint lex_factor::lex_uint() { static int a[] = {1, 2, 0}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_hex lex_factor::lex_hex() { static int a[] = {1, 3, 0}; return ::lex_hex( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_range_lit lex_factor::Low() { static int a[] = {1, 4, 0}; return ::lex_range_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_DOTDOT lex_factor::LEX_DOTDOT() { static int a[] = {1, 4, 1}; return ::LEX_DOTDOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_range_lit lex_factor::High() { static int a[] = {1, 4, 2}; return ::lex_range_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_SQOPEN_POS lex_factor::LEX_SQOPEN_POS() { static int a[] = {1, 5, 0}; return ::LEX_SQOPEN_POS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::reg_or_data lex_factor::reg_or_data() { static int a[] = {2, 5, 1, 6, 1}; return ::reg_or_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RE_SQCLOSE lex_factor::RE_SQCLOSE() { static int a[] = {2, 5, 2, 6, 2}; return ::RE_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_SQOPEN_NEG lex_factor::LEX_SQOPEN_NEG() { static int a[] = {1, 6, 0}; return ::LEX_SQOPEN_NEG( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_POPEN lex_factor::LEX_POPEN() { static int a[] = {1, 7, 0}; return ::LEX_POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr lex_factor::lex_expr() { static int a[] = {1, 7, 1}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_PCLOSE lex_factor::LEX_PCLOSE() { static int a[] = {1, 7, 2}; return ::LEX_PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::reg_or_data reg_or_data::_reg_or_data() { static int a[] = {1, 0, 0}; return ::reg_or_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::reg_or_char reg_or_data::reg_or_char() { static int a[] = {1, 0, 1}; return ::reg_or_char( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RE_CHAR reg_or_char::RE_CHAR() { static int a[] = {1, 0, 0}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RE_CHAR reg_or_char::Low() { static int a[] = {1, 1, 0}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RE_DASH reg_or_char::RE_DASH() { static int a[] = {1, 1, 1}; return ::RE_DASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RE_CHAR reg_or_char::High() { static int a[] = {1, 1, 2}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::start __accum0::tree() { return ::start( __prg, colm_get_attr( __tree, 0) ); }
+::str __accum0::error() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+::_repeat_root_item _repeat_root_item:: next() { return ::_repeat_root_item( __prg, colm_get_repeat_next( __tree ) ); }
+::root_item _repeat_root_item:: value() { return ::root_item( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_sq_cons_data _repeat_sq_cons_data:: next() { return ::_repeat_sq_cons_data( __prg, colm_get_repeat_next( __tree ) ); }
+::sq_cons_data _repeat_sq_cons_data:: value() { return ::sq_cons_data( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_context_item _repeat_context_item:: next() { return ::_repeat_context_item( __prg, colm_get_repeat_next( __tree ) ); }
+::context_item _repeat_context_item:: value() { return ::context_item( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_namespace_item _repeat_namespace_item:: next() { return ::_repeat_namespace_item( __prg, colm_get_repeat_next( __tree ) ); }
+::namespace_item _repeat_namespace_item:: value() { return ::namespace_item( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_var_def _repeat_var_def:: next() { return ::_repeat_var_def( __prg, colm_get_repeat_next( __tree ) ); }
+::var_def _repeat_var_def:: value() { return ::var_def( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_statement _repeat_statement:: next() { return ::_repeat_statement( __prg, colm_get_repeat_next( __tree ) ); }
+::statement _repeat_statement:: value() { return ::statement( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_field_init _repeat_field_init:: next() { return ::_repeat_field_init( __prg, colm_get_repeat_next( __tree ) ); }
+::field_init _repeat_field_init:: value() { return ::field_init( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_litpat_el _repeat_litpat_el:: next() { return ::_repeat_litpat_el( __prg, colm_get_repeat_next( __tree ) ); }
+::litpat_el _repeat_litpat_el:: value() { return ::litpat_el( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_pattern_el _repeat_pattern_el:: next() { return ::_repeat_pattern_el( __prg, colm_get_repeat_next( __tree ) ); }
+::pattern_el _repeat_pattern_el:: value() { return ::pattern_el( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_lit_cons_el _repeat_lit_cons_el:: next() { return ::_repeat_lit_cons_el( __prg, colm_get_repeat_next( __tree ) ); }
+::lit_cons_el _repeat_lit_cons_el:: value() { return ::lit_cons_el( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_cons_el _repeat_cons_el:: next() { return ::_repeat_cons_el( __prg, colm_get_repeat_next( __tree ) ); }
+::cons_el _repeat_cons_el:: value() { return ::cons_el( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_lit_accum_el _repeat_lit_accum_el:: next() { return ::_repeat_lit_accum_el( __prg, colm_get_repeat_next( __tree ) ); }
+::lit_accum_el _repeat_lit_accum_el:: value() { return ::lit_accum_el( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_accum_el _repeat_accum_el:: next() { return ::_repeat_accum_el( __prg, colm_get_repeat_next( __tree ) ); }
+::accum_el _repeat_accum_el:: value() { return ::accum_el( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_lit_string_el _repeat_lit_string_el:: next() { return ::_repeat_lit_string_el( __prg, colm_get_repeat_next( __tree ) ); }
+::lit_string_el _repeat_lit_string_el:: value() { return ::lit_string_el( __prg, colm_get_repeat_val( __tree ) ); }
+::_repeat_string_el _repeat_string_el:: next() { return ::_repeat_string_el( __prg, colm_get_repeat_next( __tree ) ); }
+::string_el _repeat_string_el:: value() { return ::string_el( __prg, colm_get_repeat_val( __tree ) ); }
+::str __list0::head() { return ::str( __prg, colm_get_attr( __tree, 0) ); }
+::str __list0::tail() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+::str __list0::top() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+::_repeat_root_item _T_start::RootItemList() { static int a[] = {1, 0, 0}; return ::_repeat_root_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::rl_def _T_root_item::rl_def() { static int a[] = {1, 0, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_def _T_root_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_def _T_root_item::token_def() { static int a[] = {1, 2, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ic_def _T_root_item::ic_def() { static int a[] = {1, 3, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ignore_def _T_root_item::ignore_def() { static int a[] = {1, 4, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cfl_def _T_root_item::cfl_def() { static int a[] = {1, 5, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_def _T_root_item::region_def() { static int a[] = {1, 6, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::context_def _T_root_item::context_def() { static int a[] = {1, 7, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::namespace_def _T_root_item::namespace_def() { static int a[] = {1, 8, 0}; return ::namespace_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::function_def _T_root_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::iter_def _T_root_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::statement _T_root_item::statement() { static int a[] = {1, 11, 0}; return ::statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::global_def _T_root_item::global_def() { static int a[] = {1, 12, 0}; return ::global_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::export_def _T_root_item::export_def() { static int a[] = {1, 13, 0}; return ::export_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pre_eof_def _T_root_item::pre_eof_def() { static int a[] = {1, 14, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::precedence_def _T_root_item::precedence_def() { static int a[] = {1, 15, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::alias_def _T_root_item::alias_def() { static int a[] = {1, 16, 0}; return ::alias_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::include _T_root_item::include() { static int a[] = {1, 17, 0}; return ::include( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::INCLUDE _T_include::INCLUDE() { static int a[] = {1, 0, 0}; return ::INCLUDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ _T_include::SQ() { static int a[] = {1, 0, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data _T_include::SqConsDataList() { static int a[] = {1, 0, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term _T_include::sq_lit_term() { static int a[] = {1, 0, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pred_type _T_precedence_def::pred_type() { static int a[] = {1, 0, 0}; return ::pred_type( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pred_token_list _T_precedence_def::pred_token_list() { static int a[] = {1, 0, 1}; return ::pred_token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEFT _T_pred_type::LEFT() { static int a[] = {1, 0, 0}; return ::LEFT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RIGHT _T_pred_type::RIGHT() { static int a[] = {1, 1, 0}; return ::RIGHT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NONASSOC _T_pred_type::NONASSOC() { static int a[] = {1, 2, 0}; return ::NONASSOC( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pred_token_list _T_pred_token_list::_pred_token_list() { static int a[] = {1, 0, 0}; return ::pred_token_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COMMA _T_pred_token_list::COMMA() { static int a[] = {1, 0, 1}; return ::COMMA( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pred_token _T_pred_token_list::pred_token() { static int a[] = {2, 0, 2, 1, 0}; return ::pred_token( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual _T_pred_token::region_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_pred_token::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::backtick_lit _T_pred_token::backtick_lit() { static int a[] = {1, 1, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PREEOF _T_pre_eof_def::PREEOF() { static int a[] = {1, 0, 0}; return ::PREEOF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN _T_pre_eof_def::COPEN() { static int a[] = {1, 0, 1}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list _T_pre_eof_def::lang_stmt_list() { static int a[] = {1, 0, 2}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE _T_pre_eof_def::CCLOSE() { static int a[] = {1, 0, 3}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ALIAS _T_alias_def::ALIAS() { static int a[] = {1, 0, 0}; return ::ALIAS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_alias_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref _T_alias_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::context_var_def _T_context_item::context_var_def() { static int a[] = {1, 0, 0}; return ::context_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_def _T_context_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::rl_def _T_context_item::rl_def() { static int a[] = {1, 2, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_def _T_context_item::token_def() { static int a[] = {1, 3, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ic_def _T_context_item::ic_def() { static int a[] = {1, 4, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ignore_def _T_context_item::ignore_def() { static int a[] = {1, 5, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cfl_def _T_context_item::cfl_def() { static int a[] = {1, 6, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_def _T_context_item::region_def() { static int a[] = {1, 7, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::context_def _T_context_item::context_def() { static int a[] = {1, 8, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::function_def _T_context_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::iter_def _T_context_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::export_def _T_context_item::export_def() { static int a[] = {1, 11, 0}; return ::export_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pre_eof_def _T_context_item::pre_eof_def() { static int a[] = {1, 12, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::precedence_def _T_context_item::precedence_def() { static int a[] = {1, 13, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EXPORT _T_export_def::EXPORT() { static int a[] = {1, 0, 0}; return ::EXPORT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_def _T_export_def::var_def() { static int a[] = {1, 0, 1}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_def_init _T_export_def::opt_def_init() { static int a[] = {1, 0, 2}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GLOBAL _T_global_def::GLOBAL() { static int a[] = {1, 0, 0}; return ::GLOBAL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_def _T_global_def::var_def() { static int a[] = {1, 0, 1}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_def_init _T_global_def::opt_def_init() { static int a[] = {1, 0, 2}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ITER _T_iter_def::ITER() { static int a[] = {1, 0, 0}; return ::ITER( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_iter_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN _T_iter_def::POPEN() { static int a[] = {1, 0, 2}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::param_var_def_list _T_iter_def::ParamVarDefList() { static int a[] = {1, 0, 3}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE _T_iter_def::PCLOSE() { static int a[] = {1, 0, 4}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN _T_iter_def::COPEN() { static int a[] = {1, 0, 5}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list _T_iter_def::lang_stmt_list() { static int a[] = {1, 0, 6}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE _T_iter_def::CCLOSE() { static int a[] = {1, 0, 7}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::REF _T_reference_type_ref::REF() { static int a[] = {1, 0, 0}; return ::REF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LT _T_reference_type_ref::LT() { static int a[] = {1, 0, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref _T_reference_type_ref::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GT _T_reference_type_ref::GT() { static int a[] = {1, 0, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::param_var_def _T_param_var_def_list::param_var_def() { static int a[] = {1, 0, 0}; return ::param_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::param_var_def_list _T_param_var_def_list::_param_var_def_list() { static int a[] = {1, 0, 1}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_param_var_def::id() { static int a[] = {2, 0, 0, 1, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON _T_param_var_def::COLON() { static int a[] = {2, 0, 1, 1, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref _T_param_var_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::reference_type_ref _T_param_var_def::reference_type_ref() { static int a[] = {1, 1, 2}; return ::reference_type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EXPORT _T_opt_export::EXPORT() { static int a[] = {1, 0, 0}; return ::EXPORT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_export _T_function_def::opt_export() { static int a[] = {1, 0, 0}; return ::opt_export( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref _T_function_def::type_ref() { static int a[] = {1, 0, 1}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_function_def::id() { static int a[] = {1, 0, 2}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN _T_function_def::POPEN() { static int a[] = {1, 0, 3}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::param_var_def_list _T_function_def::ParamVarDefList() { static int a[] = {1, 0, 4}; return ::param_var_def_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE _T_function_def::PCLOSE() { static int a[] = {1, 0, 5}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN _T_function_def::COPEN() { static int a[] = {1, 0, 6}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list _T_function_def::lang_stmt_list() { static int a[] = {1, 0, 7}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE _T_function_def::CCLOSE() { static int a[] = {1, 0, 8}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_def _T_context_var_def::var_def() { static int a[] = {1, 0, 0}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONTEXT _T_context_def::CONTEXT() { static int a[] = {1, 0, 0}; return ::CONTEXT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_context_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_context_item _T_context_def::ContextItemList() { static int a[] = {1, 0, 2}; return ::_repeat_context_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::END _T_context_def::END() { static int a[] = {1, 0, 3}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LITERAL _T_literal_def::LITERAL() { static int a[] = {1, 0, 0}; return ::LITERAL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_list _T_literal_def::literal_list() { static int a[] = {1, 0, 1}; return ::literal_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_list _T_literal_list::_literal_list() { static int a[] = {1, 0, 0}; return ::literal_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_item _T_literal_list::literal_item() { static int a[] = {2, 0, 1, 1, 0}; return ::literal_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::no_ignore_left _T_literal_item::no_ignore_left() { static int a[] = {1, 0, 0}; return ::no_ignore_left( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::backtick_lit _T_literal_item::backtick_lit() { static int a[] = {1, 0, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::no_ignore_right _T_literal_item::no_ignore_right() { static int a[] = {1, 0, 2}; return ::no_ignore_right( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NI _T_no_ignore_left::NI() { static int a[] = {1, 0, 0}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MINUS _T_no_ignore_left::MINUS() { static int a[] = {1, 0, 1}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MINUS _T_no_ignore_right::MINUS() { static int a[] = {1, 0, 0}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NI _T_no_ignore_right::NI() { static int a[] = {1, 0, 1}; return ::NI( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NAMESPACE _T_namespace_def::NAMESPACE() { static int a[] = {1, 0, 0}; return ::NAMESPACE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_namespace_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_namespace_item _T_namespace_def::ItemList() { static int a[] = {1, 0, 2}; return ::_repeat_namespace_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::END _T_namespace_def::END() { static int a[] = {1, 0, 3}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::rl_def _T_namespace_item::rl_def() { static int a[] = {1, 0, 0}; return ::rl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::literal_def _T_namespace_item::literal_def() { static int a[] = {1, 1, 0}; return ::literal_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::token_def _T_namespace_item::token_def() { static int a[] = {1, 2, 0}; return ::token_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ic_def _T_namespace_item::ic_def() { static int a[] = {1, 3, 0}; return ::ic_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ignore_def _T_namespace_item::ignore_def() { static int a[] = {1, 4, 0}; return ::ignore_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cfl_def _T_namespace_item::cfl_def() { static int a[] = {1, 5, 0}; return ::cfl_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_def _T_namespace_item::region_def() { static int a[] = {1, 6, 0}; return ::region_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::context_def _T_namespace_item::context_def() { static int a[] = {1, 7, 0}; return ::context_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::namespace_def _T_namespace_item::namespace_def() { static int a[] = {1, 8, 0}; return ::namespace_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::function_def _T_namespace_item::function_def() { static int a[] = {1, 9, 0}; return ::function_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::iter_def _T_namespace_item::iter_def() { static int a[] = {1, 10, 0}; return ::iter_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pre_eof_def _T_namespace_item::pre_eof_def() { static int a[] = {1, 11, 0}; return ::pre_eof_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::precedence_def _T_namespace_item::precedence_def() { static int a[] = {1, 12, 0}; return ::precedence_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::alias_def _T_namespace_item::alias_def() { static int a[] = {1, 13, 0}; return ::alias_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::include _T_namespace_item::include() { static int a[] = {1, 14, 0}; return ::include( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::REDUCEFIRST _T_opt_reduce_first::REDUCEFIRST() { static int a[] = {1, 0, 0}; return ::REDUCEFIRST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DEF _T_cfl_def::DEF() { static int a[] = {1, 0, 0}; return ::DEF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_cfl_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_var_def _T_cfl_def::VarDefList() { static int a[] = {1, 0, 2}; return ::_repeat_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_reduce_first _T_cfl_def::opt_reduce_first() { static int a[] = {1, 0, 3}; return ::opt_reduce_first( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_list _T_cfl_def::prod_list() { static int a[] = {1, 0, 4}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX _T_region_def::LEX() { static int a[] = {1, 0, 0}; return ::LEX( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_root_item _T_region_def::RootItemList() { static int a[] = {1, 0, 1}; return ::_repeat_root_item( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::END _T_region_def::END() { static int a[] = {1, 0, 2}; return ::END( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RL _T_rl_def::RL() { static int a[] = {1, 0, 0}; return ::RL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_rl_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_FSLASH _T_rl_def::LEX_FSLASH() { static int a[] = {2, 0, 2, 0, 4}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr _T_rl_def::lex_expr() { static int a[] = {1, 0, 3}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr _T_opt_lex_expr::lex_expr() { static int a[] = {1, 0, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TOKEN _T_token_def::TOKEN() { static int a[] = {1, 0, 0}; return ::TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_token_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_var_def _T_token_def::VarDefList() { static int a[] = {1, 0, 2}; return ::_repeat_var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::no_ignore_left _T_token_def::no_ignore_left() { static int a[] = {1, 0, 3}; return ::no_ignore_left( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_FSLASH _T_token_def::LEX_FSLASH() { static int a[] = {2, 0, 4, 0, 6}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_lex_expr _T_token_def::opt_lex_expr() { static int a[] = {1, 0, 5}; return ::opt_lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::no_ignore_right _T_token_def::no_ignore_right() { static int a[] = {1, 0, 7}; return ::no_ignore_right( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_translate _T_token_def::opt_translate() { static int a[] = {1, 0, 8}; return ::opt_translate( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TOKEN _T_ic_def::TOKEN() { static int a[] = {1, 0, 0}; return ::TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_ic_def::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MINUS _T_ic_def::MINUS() { static int a[] = {1, 0, 2}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN _T_opt_translate::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list _T_opt_translate::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE _T_opt_translate::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_opt_id::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::IGNORE _T_ignore_def::IGNORE() { static int a[] = {1, 0, 0}; return ::IGNORE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_id _T_ignore_def::opt_id() { static int a[] = {1, 0, 1}; return ::opt_id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_FSLASH _T_ignore_def::LEX_FSLASH() { static int a[] = {2, 0, 2, 0, 4}; return ::LEX_FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_lex_expr _T_ignore_def::opt_lex_expr() { static int a[] = {1, 0, 3}; return ::opt_lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_prod_el_name _T_prod_el::opt_prod_el_name() { static int a[] = {2, 0, 0, 1, 0}; return ::opt_prod_el_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual _T_prod_el::region_qual() { static int a[] = {2, 0, 1, 1, 1}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_prod_el::id() { static int a[] = {1, 0, 2}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_repeat _T_prod_el::opt_repeat() { static int a[] = {2, 0, 3, 1, 3}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::backtick_lit _T_prod_el::backtick_lit() { static int a[] = {1, 1, 2}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_opt_prod_el_name::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON _T_opt_prod_el_name::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el_list _T_prod_el_list::_prod_el_list() { static int a[] = {1, 0, 0}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el _T_prod_el_list::prod_el() { static int a[] = {1, 0, 1}; return ::prod_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COMMIT _T_opt_commit::COMMIT() { static int a[] = {1, 0, 0}; return ::COMMIT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON _T_opt_prod_name::COLON() { static int a[] = {1, 0, 0}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_opt_prod_name::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQOPEN _T_prod::SQOPEN() { static int a[] = {1, 0, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_el_list _T_prod::prod_el_list() { static int a[] = {1, 0, 1}; return ::prod_el_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQCLOSE _T_prod::SQCLOSE() { static int a[] = {1, 0, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_prod_name _T_prod::opt_prod_name() { static int a[] = {1, 0, 3}; return ::opt_prod_name( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_commit _T_prod::opt_commit() { static int a[] = {1, 0, 4}; return ::opt_commit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_reduce _T_prod::opt_reduce() { static int a[] = {1, 0, 5}; return ::opt_reduce( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN _T_opt_reduce::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list _T_opt_reduce::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE _T_opt_reduce::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod_list _T_prod_list::_prod_list() { static int a[] = {1, 0, 0}; return ::prod_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::BAR _T_prod_list::BAR() { static int a[] = {1, 0, 1}; return ::BAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::prod _T_prod_list::prod() { static int a[] = {2, 0, 2, 1, 0}; return ::prod( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::print_stmt _T_statement::print_stmt() { static int a[] = {1, 0, 0}; return ::print_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::expr_stmt _T_statement::expr_stmt() { static int a[] = {1, 1, 0}; return ::expr_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_def _T_statement::var_def() { static int a[] = {1, 2, 0}; return ::var_def( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_def_init _T_statement::opt_def_init() { static int a[] = {1, 2, 1}; return ::opt_def_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::FOR _T_statement::FOR() { static int a[] = {1, 3, 0}; return ::FOR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_statement::id() { static int a[] = {1, 3, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON _T_statement::COLON() { static int a[] = {1, 3, 2}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref _T_statement::type_ref() { static int a[] = {1, 3, 3}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::IN _T_statement::IN() { static int a[] = {1, 3, 4}; return ::IN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::iter_call _T_statement::iter_call() { static int a[] = {1, 3, 5}; return ::iter_call( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::block_or_single _T_statement::block_or_single() { static int a[] = {3, 3, 6, 4, 2, 5, 2}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::IF _T_statement::IF() { static int a[] = {1, 4, 0}; return ::IF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_statement::code_expr() { static int a[] = {4, 4, 1, 5, 1, 6, 2, 8, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::elsif_list _T_statement::elsif_list() { static int a[] = {1, 4, 3}; return ::elsif_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::WHILE _T_statement::WHILE() { static int a[] = {1, 5, 0}; return ::WHILE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_ref _T_statement::var_ref() { static int a[] = {2, 6, 0, 7, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EQUALS _T_statement::EQUALS() { static int a[] = {1, 6, 1}; return ::EQUALS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::YIELD _T_statement::YIELD() { static int a[] = {1, 7, 0}; return ::YIELD( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RETURN _T_statement::RETURN() { static int a[] = {1, 8, 0}; return ::RETURN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::BREAK _T_statement::BREAK() { static int a[] = {1, 9, 0}; return ::BREAK( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::REJECT _T_statement::REJECT() { static int a[] = {1, 10, 0}; return ::REJECT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::elsif_clause _T_elsif_list::elsif_clause() { static int a[] = {1, 0, 0}; return ::elsif_clause( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::elsif_list _T_elsif_list::_elsif_list() { static int a[] = {1, 0, 1}; return ::elsif_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::optional_else _T_elsif_list::optional_else() { static int a[] = {1, 1, 0}; return ::optional_else( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ELSIF _T_elsif_clause::ELSIF() { static int a[] = {1, 0, 0}; return ::ELSIF( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_elsif_clause::code_expr() { static int a[] = {1, 0, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::block_or_single _T_elsif_clause::block_or_single() { static int a[] = {1, 0, 2}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ELSE _T_optional_else::ELSE() { static int a[] = {1, 0, 0}; return ::ELSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::block_or_single _T_optional_else::block_or_single() { static int a[] = {1, 0, 1}; return ::block_or_single( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_call_arg_list::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::call_arg_list _T_call_arg_list::_call_arg_list() { static int a[] = {1, 0, 1}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E1 _T_iter_call::E1() { static int a[] = {1, 0, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_ref _T_iter_call::var_ref() { static int a[] = {1, 0, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN _T_iter_call::POPEN() { static int a[] = {1, 0, 2}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::call_arg_list _T_iter_call::call_arg_list() { static int a[] = {1, 0, 3}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE _T_iter_call::PCLOSE() { static int a[] = {1, 0, 4}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E2 _T_iter_call::E2() { static int a[] = {1, 1, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_iter_call::id() { static int a[] = {1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E3 _T_iter_call::E3() { static int a[] = {1, 2, 0}; return ::E3( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_iter_call::code_expr() { static int a[] = {1, 2, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN _T_block_or_single::COPEN() { static int a[] = {1, 0, 0}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list _T_block_or_single::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE _T_block_or_single::CCLOSE() { static int a[] = {1, 0, 2}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::statement _T_block_or_single::statement() { static int a[] = {1, 1, 0}; return ::statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::REQUIRE _T_require_pattern::REQUIRE() { static int a[] = {1, 0, 0}; return ::REQUIRE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_ref _T_require_pattern::var_ref() { static int a[] = {1, 0, 1}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern _T_require_pattern::pattern() { static int a[] = {1, 0, 2}; return ::pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::require_pattern _T_opt_require_stmt::require_pattern() { static int a[] = {1, 0, 0}; return ::require_pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lang_stmt_list _T_opt_require_stmt::lang_stmt_list() { static int a[] = {1, 0, 1}; return ::lang_stmt_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_statement _T_lang_stmt_list::StmtList() { static int a[] = {1, 0, 0}; return ::_repeat_statement( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_require_stmt _T_lang_stmt_list::opt_require_stmt() { static int a[] = {1, 0, 1}; return ::opt_require_stmt( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EQUALS _T_opt_def_init::EQUALS() { static int a[] = {1, 0, 0}; return ::EQUALS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_opt_def_init::code_expr() { static int a[] = {1, 0, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_var_def::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON _T_var_def::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref _T_var_def::type_ref() { static int a[] = {1, 0, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PRINT _T_print_stmt::PRINT() { static int a[] = {1, 0, 0}; return ::PRINT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN _T_print_stmt::POPEN() { static int a[] = {4, 0, 1, 1, 1, 2, 1, 3, 1}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::call_arg_list _T_print_stmt::call_arg_list() { static int a[] = {4, 0, 2, 1, 2, 2, 2, 3, 2}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE _T_print_stmt::PCLOSE() { static int a[] = {4, 0, 3, 1, 3, 2, 3, 3, 3}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PRINTS _T_print_stmt::PRINTS() { static int a[] = {1, 1, 0}; return ::PRINTS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PRINT_XML _T_print_stmt::PRINT_XML() { static int a[] = {1, 2, 0}; return ::PRINT_XML( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PRINT_XML_AC _T_print_stmt::PRINT_XML_AC() { static int a[] = {1, 3, 0}; return ::PRINT_XML_AC( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_expr_stmt::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_code_expr::_code_expr() { static int a[] = {2, 0, 0, 1, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::AMPAMP _T_code_expr::AMPAMP() { static int a[] = {1, 0, 1}; return ::AMPAMP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_relational _T_code_expr::code_relational() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_relational( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::BARBAR _T_code_expr::BARBAR() { static int a[] = {1, 1, 1}; return ::BARBAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_relational _T_code_relational::_code_relational() { static int a[] = {6, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0}; return ::code_relational( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EQEQ _T_code_relational::EQEQ() { static int a[] = {1, 0, 1}; return ::EQEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_additive _T_code_relational::code_additive() { static int a[] = {7, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 0}; return ::code_additive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NEQ _T_code_relational::NEQ() { static int a[] = {1, 1, 1}; return ::NEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LT _T_code_relational::LT() { static int a[] = {1, 2, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GT _T_code_relational::GT() { static int a[] = {1, 3, 1}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LTEQ _T_code_relational::LTEQ() { static int a[] = {1, 4, 1}; return ::LTEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GTEQ _T_code_relational::GTEQ() { static int a[] = {1, 5, 1}; return ::GTEQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_additive _T_code_additive::_code_additive() { static int a[] = {2, 0, 0, 1, 0}; return ::code_additive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PLUS _T_code_additive::PLUS() { static int a[] = {1, 0, 1}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_multiplicitive _T_code_additive::code_multiplicitive() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_multiplicitive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MINUS _T_code_additive::MINUS() { static int a[] = {1, 1, 1}; return ::MINUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_multiplicitive _T_code_multiplicitive::_code_multiplicitive() { static int a[] = {2, 0, 0, 1, 0}; return ::code_multiplicitive( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::STAR _T_code_multiplicitive::STAR() { static int a[] = {1, 0, 1}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_unary _T_code_multiplicitive::code_unary() { static int a[] = {3, 0, 2, 1, 2, 2, 0}; return ::code_unary( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::FSLASH _T_code_multiplicitive::FSLASH() { static int a[] = {1, 1, 1}; return ::FSLASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::BANG _T_code_unary::BANG() { static int a[] = {1, 0, 0}; return ::BANG( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_factor _T_code_unary::code_factor() { static int a[] = {5, 0, 1, 1, 1, 2, 1, 3, 1, 4, 0}; return ::code_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DOLLAR _T_code_unary::DOLLAR() { static int a[] = {1, 1, 0}; return ::DOLLAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CARET _T_code_unary::CARET() { static int a[] = {1, 2, 0}; return ::CARET( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PERCENT _T_code_unary::PERCENT() { static int a[] = {1, 3, 0}; return ::PERCENT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DOT _T_opt_eos::DOT() { static int a[] = {1, 0, 0}; return ::DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::EOS _T_opt_eos::EOS() { static int a[] = {1, 1, 0}; return ::EOS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::number _T_code_factor::number() { static int a[] = {1, 0, 0}; return ::number( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::var_ref _T_code_factor::var_ref() { static int a[] = {5, 1, 0, 2, 0, 7, 1, 11, 1, 13, 2}; return ::var_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN _T_code_factor::POPEN() { static int a[] = {4, 1, 1, 6, 0, 14, 1, 15, 1}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::call_arg_list _T_code_factor::call_arg_list() { static int a[] = {3, 1, 2, 14, 2, 15, 2}; return ::call_arg_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE _T_code_factor::PCLOSE() { static int a[] = {4, 1, 3, 6, 2, 14, 3, 15, 3}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NIL _T_code_factor::NIL() { static int a[] = {1, 3, 0}; return ::NIL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TRUE _T_code_factor::TRUE() { static int a[] = {1, 4, 0}; return ::TRUE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::FALSE _T_code_factor::FALSE() { static int a[] = {1, 5, 0}; return ::FALSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_code_factor::code_expr() { static int a[] = {1, 6, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SEND _T_code_factor::SEND() { static int a[] = {1, 7, 0}; return ::SEND( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::accumulate _T_code_factor::accumulate() { static int a[] = {3, 7, 2, 8, 4, 9, 4}; return ::accumulate( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_eos _T_code_factor::opt_eos() { static int a[] = {1, 7, 3}; return ::opt_eos( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PARSE _T_code_factor::PARSE() { static int a[] = {1, 8, 0}; return ::PARSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_capture _T_code_factor::opt_capture() { static int a[] = {3, 8, 1, 9, 1, 10, 1}; return ::opt_capture( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref _T_code_factor::type_ref() { static int a[] = {6, 8, 2, 9, 2, 10, 2, 13, 0, 16, 2, 18, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_field_init _T_code_factor::opt_field_init() { static int a[] = {3, 8, 3, 9, 3, 10, 3}; return ::opt_field_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PARSE_STOP _T_code_factor::PARSE_STOP() { static int a[] = {1, 9, 0}; return ::PARSE_STOP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS _T_code_factor::CONS() { static int a[] = {1, 10, 0}; return ::CONS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::constructor _T_code_factor::constructor() { static int a[] = {1, 10, 4}; return ::constructor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MATCH _T_code_factor::MATCH() { static int a[] = {1, 11, 0}; return ::MATCH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern _T_code_factor::pattern() { static int a[] = {1, 11, 2}; return ::pattern( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::string _T_code_factor::string() { static int a[] = {1, 12, 0}; return ::string( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::IN _T_code_factor::IN() { static int a[] = {1, 13, 1}; return ::IN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MAKE_TREE _T_code_factor::MAKE_TREE() { static int a[] = {1, 14, 0}; return ::MAKE_TREE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MAKE_TOKEN _T_code_factor::MAKE_TOKEN() { static int a[] = {1, 15, 0}; return ::MAKE_TOKEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TYPEID _T_code_factor::TYPEID() { static int a[] = {1, 16, 0}; return ::TYPEID( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LT _T_code_factor::LT() { static int a[] = {2, 16, 1, 18, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GT _T_code_factor::GT() { static int a[] = {2, 16, 3, 18, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::NEW _T_code_factor::NEW() { static int a[] = {1, 17, 0}; return ::NEW( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_factor _T_code_factor::_code_factor() { static int a[] = {2, 17, 1, 18, 4}; return ::code_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CAST _T_code_factor::CAST() { static int a[] = {1, 18, 0}; return ::CAST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual _T_type_ref::region_qual() { static int a[] = {2, 0, 0, 1, 2}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_type_ref::id() { static int a[] = {2, 0, 1, 1, 3}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_repeat _T_type_ref::opt_repeat() { static int a[] = {2, 0, 2, 1, 4}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PTR _T_type_ref::PTR() { static int a[] = {1, 1, 0}; return ::PTR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LT _T_type_ref::LT() { static int a[] = {5, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1}; return ::LT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::GT _T_type_ref::GT() { static int a[] = {5, 1, 5, 2, 4, 3, 3, 4, 3, 5, 3}; return ::GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::MAP _T_type_ref::MAP() { static int a[] = {1, 2, 0}; return ::MAP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref _T_type_ref::MapKeyType() { static int a[] = {1, 2, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref _T_type_ref::MapValueType() { static int a[] = {1, 2, 3}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LIST _T_type_ref::LIST() { static int a[] = {1, 3, 0}; return ::LIST( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::type_ref _T_type_ref::_type_ref() { static int a[] = {3, 3, 2, 4, 2, 5, 2}; return ::type_ref( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::VECTOR _T_type_ref::VECTOR() { static int a[] = {1, 4, 0}; return ::VECTOR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PARSER _T_type_ref::PARSER() { static int a[] = {1, 5, 0}; return ::PARSER( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual _T_region_qual::_region_qual() { static int a[] = {1, 0, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_region_qual::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DOUBLE_COLON _T_region_qual::DOUBLE_COLON() { static int a[] = {1, 0, 2}; return ::DOUBLE_COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::STAR _T_opt_repeat::STAR() { static int a[] = {1, 0, 0}; return ::STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PLUS _T_opt_repeat::PLUS() { static int a[] = {1, 1, 0}; return ::PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::QUESTION _T_opt_repeat::QUESTION() { static int a[] = {1, 2, 0}; return ::QUESTION( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_opt_capture::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON _T_opt_capture::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::POPEN _T_opt_field_init::POPEN() { static int a[] = {1, 0, 0}; return ::POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_field_init _T_opt_field_init::FieldInitList() { static int a[] = {1, 0, 1}; return ::_repeat_field_init( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::PCLOSE _T_opt_field_init::PCLOSE() { static int a[] = {1, 0, 2}; return ::PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_field_init::code_expr() { static int a[] = {1, 0, 0}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_opt_label::id() { static int a[] = {1, 0, 0}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COLON _T_opt_label::COLON() { static int a[] = {1, 0, 1}; return ::COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_DQ _T_dq_lit_term::CONS_DQ() { static int a[] = {1, 0, 0}; return ::CONS_DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_DQ_NL _T_dq_lit_term::CONS_DQ_NL() { static int a[] = {1, 1, 0}; return ::CONS_DQ_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQ _T_sq_lit_term::CONS_SQ() { static int a[] = {1, 0, 0}; return ::CONS_SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQ_NL _T_sq_lit_term::CONS_SQ_NL() { static int a[] = {1, 1, 0}; return ::CONS_SQ_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::tilde_data _T_opt_tilde_data::tilde_data() { static int a[] = {1, 0, 0}; return ::tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual _T_pattern_el_lel::region_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_pattern_el_lel::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_repeat _T_pattern_el_lel::opt_repeat() { static int a[] = {2, 0, 2, 1, 2}; return ::opt_repeat( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::backtick_lit _T_pattern_el_lel::backtick_lit() { static int a[] = {1, 1, 1}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_label _T_pattern_el::opt_label() { static int a[] = {1, 0, 0}; return ::opt_label( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern_el_lel _T_pattern_el::pattern_el_lel() { static int a[] = {1, 0, 1}; return ::pattern_el_lel( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ _T_pattern_el::DQ() { static int a[] = {1, 1, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_litpat_el _T_pattern_el::LitpatElList() { static int a[] = {1, 1, 1}; return ::_repeat_litpat_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term _T_pattern_el::dq_lit_term() { static int a[] = {1, 1, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ _T_pattern_el::SQ() { static int a[] = {1, 2, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data _T_pattern_el::SqConsDataList() { static int a[] = {1, 2, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term _T_pattern_el::sq_lit_term() { static int a[] = {1, 2, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE _T_pattern_el::TILDE() { static int a[] = {1, 3, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data _T_pattern_el::opt_tilde_data() { static int a[] = {1, 3, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL _T_pattern_el::TILDE_NL() { static int a[] = {1, 3, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_cons_data _T_litpat_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQOPEN _T_litpat_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_pattern_el _T_litpat_el::PatternElList() { static int a[] = {1, 1, 1}; return ::_repeat_pattern_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQCLOSE _T_litpat_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ _T_pattern_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_litpat_el _T_pattern_top_el::LitpatElList() { static int a[] = {1, 0, 1}; return ::_repeat_litpat_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term _T_pattern_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ _T_pattern_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data _T_pattern_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term _T_pattern_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE _T_pattern_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data _T_pattern_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL _T_pattern_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQOPEN _T_pattern_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_pattern_el _T_pattern_top_el::PatternElList() { static int a[] = {1, 3, 1}; return ::_repeat_pattern_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQCLOSE _T_pattern_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern_list _T_pattern_list::_pattern_list() { static int a[] = {1, 0, 0}; return ::pattern_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern_top_el _T_pattern_list::pattern_top_el() { static int a[] = {2, 0, 1, 1, 0}; return ::pattern_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::pattern_list _T_pattern::pattern_list() { static int a[] = {1, 0, 0}; return ::pattern_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E1 _T_cons_el::E1() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::region_qual _T_cons_el::region_qual() { static int a[] = {1, 0, 1}; return ::region_qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::backtick_lit _T_cons_el::backtick_lit() { static int a[] = {1, 0, 2}; return ::backtick_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ _T_cons_el::DQ() { static int a[] = {1, 1, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_cons_el _T_cons_el::LitConsElList() { static int a[] = {1, 1, 2}; return ::_repeat_lit_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term _T_cons_el::dq_lit_term() { static int a[] = {1, 1, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ _T_cons_el::SQ() { static int a[] = {1, 2, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data _T_cons_el::SqConsDataList() { static int a[] = {1, 2, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term _T_cons_el::sq_lit_term() { static int a[] = {1, 2, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE _T_cons_el::TILDE() { static int a[] = {1, 3, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data _T_cons_el::opt_tilde_data() { static int a[] = {1, 3, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL _T_cons_el::TILDE_NL() { static int a[] = {1, 3, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E2 _T_cons_el::E2() { static int a[] = {1, 4, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_cons_el::code_expr() { static int a[] = {1, 4, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_cons_data _T_lit_cons_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQOPEN _T_lit_cons_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_cons_el _T_lit_cons_el::ConsElList() { static int a[] = {1, 1, 1}; return ::_repeat_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQCLOSE _T_lit_cons_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ _T_cons_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_cons_el _T_cons_top_el::LitConsElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term _T_cons_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ _T_cons_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data _T_cons_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term _T_cons_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE _T_cons_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data _T_cons_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL _T_cons_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQOPEN _T_cons_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_cons_el _T_cons_top_el::ConsElList() { static int a[] = {1, 3, 1}; return ::_repeat_cons_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQCLOSE _T_cons_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cons_top_el _T_cons_list::cons_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::cons_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cons_list _T_cons_list::_cons_list() { static int a[] = {1, 0, 1}; return ::cons_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::cons_list _T_constructor::cons_list() { static int a[] = {1, 0, 0}; return ::cons_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E1 _T_accum_el::E1() { static int a[] = {3, 0, 0, 1, 0, 2, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ _T_accum_el::DQ() { static int a[] = {1, 0, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_accum_el _T_accum_el::LitAccumElList() { static int a[] = {1, 0, 2}; return ::_repeat_lit_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term _T_accum_el::dq_lit_term() { static int a[] = {1, 0, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ _T_accum_el::SQ() { static int a[] = {1, 1, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data _T_accum_el::SqConsDataList() { static int a[] = {1, 1, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term _T_accum_el::sq_lit_term() { static int a[] = {1, 1, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE _T_accum_el::TILDE() { static int a[] = {1, 2, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data _T_accum_el::opt_tilde_data() { static int a[] = {1, 2, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL _T_accum_el::TILDE_NL() { static int a[] = {1, 2, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E2 _T_accum_el::E2() { static int a[] = {1, 3, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_accum_el::code_expr() { static int a[] = {1, 3, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_cons_data _T_lit_accum_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQOPEN _T_lit_accum_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_accum_el _T_lit_accum_el::AccumElList() { static int a[] = {1, 1, 1}; return ::_repeat_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQCLOSE _T_lit_accum_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ _T_accum_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_accum_el _T_accum_top_el::LitAccumElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term _T_accum_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ _T_accum_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data _T_accum_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term _T_accum_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE _T_accum_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data _T_accum_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL _T_accum_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQOPEN _T_accum_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_accum_el _T_accum_top_el::AccumElList() { static int a[] = {1, 3, 1}; return ::_repeat_accum_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQCLOSE _T_accum_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::accum_top_el _T_accum_list::accum_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::accum_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::accum_list _T_accum_list::_accum_list() { static int a[] = {1, 0, 1}; return ::accum_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::accum_list _T_accumulate::accum_list() { static int a[] = {1, 0, 0}; return ::accum_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E1 _T_string_el::E1() { static int a[] = {3, 0, 0, 1, 0, 2, 0}; return ::E1( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ _T_string_el::DQ() { static int a[] = {1, 0, 1}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_string_el _T_string_el::LitStringElList() { static int a[] = {1, 0, 2}; return ::_repeat_lit_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term _T_string_el::dq_lit_term() { static int a[] = {1, 0, 3}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ _T_string_el::SQ() { static int a[] = {1, 1, 1}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data _T_string_el::SqConsDataList() { static int a[] = {1, 1, 2}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term _T_string_el::sq_lit_term() { static int a[] = {1, 1, 3}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE _T_string_el::TILDE() { static int a[] = {1, 2, 1}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data _T_string_el::opt_tilde_data() { static int a[] = {1, 2, 2}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL _T_string_el::TILDE_NL() { static int a[] = {1, 2, 3}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::E2 _T_string_el::E2() { static int a[] = {1, 3, 0}; return ::E2( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::code_expr _T_string_el::code_expr() { static int a[] = {1, 3, 1}; return ::code_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_cons_data _T_lit_string_el::dq_cons_data() { static int a[] = {1, 0, 0}; return ::dq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQOPEN _T_lit_string_el::CONS_SQOPEN() { static int a[] = {1, 1, 0}; return ::CONS_SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_string_el _T_lit_string_el::StringElList() { static int a[] = {1, 1, 1}; return ::_repeat_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CONS_SQCLOSE _T_lit_string_el::CONS_SQCLOSE() { static int a[] = {1, 1, 2}; return ::CONS_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DQ _T_string_top_el::DQ() { static int a[] = {1, 0, 0}; return ::DQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_lit_string_el _T_string_top_el::LitStringElList() { static int a[] = {1, 0, 1}; return ::_repeat_lit_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::dq_lit_term _T_string_top_el::dq_lit_term() { static int a[] = {1, 0, 2}; return ::dq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQ _T_string_top_el::SQ() { static int a[] = {1, 1, 0}; return ::SQ( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_sq_cons_data _T_string_top_el::SqConsDataList() { static int a[] = {1, 1, 1}; return ::_repeat_sq_cons_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::sq_lit_term _T_string_top_el::sq_lit_term() { static int a[] = {1, 1, 2}; return ::sq_lit_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE _T_string_top_el::TILDE() { static int a[] = {1, 2, 0}; return ::TILDE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_tilde_data _T_string_top_el::opt_tilde_data() { static int a[] = {1, 2, 1}; return ::opt_tilde_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::TILDE_NL _T_string_top_el::TILDE_NL() { static int a[] = {1, 2, 2}; return ::TILDE_NL( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQOPEN _T_string_top_el::SQOPEN() { static int a[] = {1, 3, 0}; return ::SQOPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::_repeat_string_el _T_string_top_el::StringElList() { static int a[] = {1, 3, 1}; return ::_repeat_string_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::SQCLOSE _T_string_top_el::SQCLOSE() { static int a[] = {1, 3, 2}; return ::SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::string_top_el _T_string_list::string_top_el() { static int a[] = {2, 0, 0, 1, 0}; return ::string_top_el( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::string_list _T_string_list::_string_list() { static int a[] = {1, 0, 1}; return ::string_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::string_list _T_string::string_list() { static int a[] = {1, 0, 0}; return ::string_list( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::qual _T_var_ref::qual() { static int a[] = {1, 0, 0}; return ::qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_var_ref::id() { static int a[] = {1, 0, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::qual _T_qual::_qual() { static int a[] = {2, 0, 0, 1, 0}; return ::qual( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::id _T_qual::id() { static int a[] = {2, 0, 1, 1, 1}; return ::id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::DOT _T_qual::DOT() { static int a[] = {1, 0, 2}; return ::DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::ARROW _T_qual::ARROW() { static int a[] = {1, 1, 2}; return ::ARROW( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr _T_lex_expr::_lex_expr() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_BAR _T_lex_expr::LEX_BAR() { static int a[] = {1, 0, 1}; return ::LEX_BAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_term _T_lex_expr::lex_term() { static int a[] = {5, 0, 2, 1, 2, 2, 2, 3, 2, 4, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_AMP _T_lex_expr::LEX_AMP() { static int a[] = {1, 1, 1}; return ::LEX_AMP( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_DASH _T_lex_expr::LEX_DASH() { static int a[] = {1, 2, 1}; return ::LEX_DASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_DASHDASH _T_lex_expr::LEX_DASHDASH() { static int a[] = {1, 3, 1}; return ::LEX_DASHDASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_DOT _T_opt_lex_dot::LEX_DOT() { static int a[] = {1, 0, 0}; return ::LEX_DOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_term _T_lex_term::_lex_term() { static int a[] = {4, 0, 0, 1, 0, 2, 0, 3, 0}; return ::lex_term( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::opt_lex_dot _T_lex_term::opt_lex_dot() { static int a[] = {1, 0, 1}; return ::opt_lex_dot( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_rep _T_lex_term::lex_factor_rep() { static int a[] = {5, 0, 2, 1, 2, 2, 2, 3, 2, 4, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_COLON_GT _T_lex_term::LEX_COLON_GT() { static int a[] = {1, 1, 1}; return ::LEX_COLON_GT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_COLON_GTGT _T_lex_term::LEX_COLON_GTGT() { static int a[] = {1, 2, 1}; return ::LEX_COLON_GTGT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_LT_COLON _T_lex_term::LEX_LT_COLON() { static int a[] = {1, 3, 1}; return ::LEX_LT_COLON( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_rep _T_lex_factor_rep::_lex_factor_rep() { static int a[] = {8, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0}; return ::lex_factor_rep( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_STAR _T_lex_factor_rep::LEX_STAR() { static int a[] = {1, 0, 1}; return ::LEX_STAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_STARSTAR _T_lex_factor_rep::LEX_STARSTAR() { static int a[] = {1, 1, 1}; return ::LEX_STARSTAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_PLUS _T_lex_factor_rep::LEX_PLUS() { static int a[] = {1, 2, 1}; return ::LEX_PLUS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_QUESTION _T_lex_factor_rep::LEX_QUESTION() { static int a[] = {1, 3, 1}; return ::LEX_QUESTION( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COPEN _T_lex_factor_rep::COPEN() { static int a[] = {4, 4, 1, 5, 1, 6, 1, 7, 1}; return ::COPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_uint _T_lex_factor_rep::lex_uint() { static int a[] = {3, 4, 2, 5, 3, 6, 2}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::CCLOSE _T_lex_factor_rep::CCLOSE() { static int a[] = {4, 4, 3, 5, 4, 6, 4, 7, 5}; return ::CCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::COMMA _T_lex_factor_rep::COMMA() { static int a[] = {3, 5, 2, 6, 3, 7, 3}; return ::COMMA( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_uint _T_lex_factor_rep::Low() { static int a[] = {1, 7, 2}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_uint _T_lex_factor_rep::High() { static int a[] = {1, 7, 4}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_neg _T_lex_factor_rep::lex_factor_neg() { static int a[] = {1, 8, 0}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_CARET _T_lex_factor_neg::LEX_CARET() { static int a[] = {1, 0, 0}; return ::LEX_CARET( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor_neg _T_lex_factor_neg::_lex_factor_neg() { static int a[] = {1, 0, 1}; return ::lex_factor_neg( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_factor _T_lex_factor_neg::lex_factor() { static int a[] = {1, 1, 0}; return ::lex_factor( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_lit _T_lex_range_lit::lex_lit() { static int a[] = {1, 0, 0}; return ::lex_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_num _T_lex_range_lit::lex_num() { static int a[] = {1, 1, 0}; return ::lex_num( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_uint _T_lex_num::lex_uint() { static int a[] = {1, 0, 0}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_hex _T_lex_num::lex_hex() { static int a[] = {1, 1, 0}; return ::lex_hex( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_lit _T_lex_factor::lex_lit() { static int a[] = {1, 0, 0}; return ::lex_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_id _T_lex_factor::lex_id() { static int a[] = {1, 1, 0}; return ::lex_id( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_uint _T_lex_factor::lex_uint() { static int a[] = {1, 2, 0}; return ::lex_uint( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_hex _T_lex_factor::lex_hex() { static int a[] = {1, 3, 0}; return ::lex_hex( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_range_lit _T_lex_factor::Low() { static int a[] = {1, 4, 0}; return ::lex_range_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_DOTDOT _T_lex_factor::LEX_DOTDOT() { static int a[] = {1, 4, 1}; return ::LEX_DOTDOT( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_range_lit _T_lex_factor::High() { static int a[] = {1, 4, 2}; return ::lex_range_lit( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_SQOPEN_POS _T_lex_factor::LEX_SQOPEN_POS() { static int a[] = {1, 5, 0}; return ::LEX_SQOPEN_POS( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::reg_or_data _T_lex_factor::reg_or_data() { static int a[] = {2, 5, 1, 6, 1}; return ::reg_or_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RE_SQCLOSE _T_lex_factor::RE_SQCLOSE() { static int a[] = {2, 5, 2, 6, 2}; return ::RE_SQCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_SQOPEN_NEG _T_lex_factor::LEX_SQOPEN_NEG() { static int a[] = {1, 6, 0}; return ::LEX_SQOPEN_NEG( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_POPEN _T_lex_factor::LEX_POPEN() { static int a[] = {1, 7, 0}; return ::LEX_POPEN( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::lex_expr _T_lex_factor::lex_expr() { static int a[] = {1, 7, 1}; return ::lex_expr( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::LEX_PCLOSE _T_lex_factor::LEX_PCLOSE() { static int a[] = {1, 7, 2}; return ::LEX_PCLOSE( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::reg_or_data _T_reg_or_data::_reg_or_data() { static int a[] = {1, 0, 0}; return ::reg_or_data( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::reg_or_char _T_reg_or_data::reg_or_char() { static int a[] = {1, 0, 1}; return ::reg_or_char( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RE_CHAR _T_reg_or_char::RE_CHAR() { static int a[] = {1, 0, 0}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RE_CHAR _T_reg_or_char::Low() { static int a[] = {1, 1, 0}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RE_DASH _T_reg_or_char::RE_DASH() { static int a[] = {1, 1, 1}; return ::RE_DASH( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::RE_CHAR _T_reg_or_char::High() { static int a[] = {1, 1, 2}; return ::RE_CHAR( __prg, colm_get_rhs_val( __prg, __tree, a ) ); }
+::start _T___accum0::tree() { return ::start( __prg, colm_get_attr( __tree, 0) ); }
+::str _T___accum0::error() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+::str _T___list0::head() { return ::str( __prg, colm_get_attr( __tree, 0) ); }
+::str _T___list0::tail() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+::str _T___list0::top() { return ::str( __prg, colm_get_attr( __tree, 1) ); }
+
+::start ColmTree( colm_program *prg )
+{ return ::start( prg, colm_get_global( prg, 0) ); }
+::str ColmError( colm_program *prg )
+{ return ::str( prg, colm_get_global( prg, 1) ); }
+
diff --git a/src/if2.h b/src/if2.h
new file mode 100644
index 0000000..4ae10d7
--- /dev/null
+++ b/src/if2.h
@@ -0,0 +1,6965 @@
+#ifndef _EXPORTS_H
+#define _EXPORTS_H
+
+#include <colm/colm.h>
+#include <string>
+
+inline void appendString( colm_print_args *args, const char *data, int length )
+{
+ std::string *str = (std::string*)args->arg;
+ *str += std::string( data, length );
+}
+
+inline std::string printTreeStr( colm_program *prg, colm_tree *tree, bool trim )
+{
+ std::string str;
+ colm_print_args printArgs = { &str, 1, 0, trim, &appendString,
+ &colm_print_null, &colm_print_term_tree, &colm_print_null };
+ colm_print_tree_args( prg, colm_vm_root(prg), &printArgs, tree );
+ return str;
+}
+
+struct _notoken;
+struct ptr;
+struct _void;
+struct _bool;
+struct _int;
+struct str;
+struct stream;
+struct il;
+struct any;
+struct DEF;
+struct LEX;
+struct END;
+struct TOKEN;
+struct RL;
+struct IGNORE;
+struct PRINT;
+struct PRINTS;
+struct PRINT_XML;
+struct PRINT_XML_AC;
+struct PARSE;
+struct PARSE_STOP;
+struct CONS;
+struct MATCH;
+struct REQUIRE;
+struct SEND;
+struct NAMESPACE;
+struct FOR;
+struct IF;
+struct YIELD;
+struct WHILE;
+struct ELSIF;
+struct ELSE;
+struct IN;
+struct PARSER;
+struct LIST;
+struct VECTOR;
+struct MAP;
+struct PTR;
+struct ITER;
+struct REF;
+struct EXPORT;
+struct RETURN;
+struct BREAK;
+struct REJECT;
+struct REDUCEFIRST;
+struct ALIAS;
+struct COMMIT;
+struct NEW;
+struct PREEOF;
+struct GLOBAL;
+struct EOS;
+struct CAST;
+struct MAKE_TOKEN;
+struct MAKE_TREE;
+struct TYPEID;
+struct LITERAL;
+struct CONTEXT;
+struct NI;
+struct NIL;
+struct TRUE;
+struct FALSE;
+struct LEFT;
+struct RIGHT;
+struct NONASSOC;
+struct INCLUDE;
+struct id;
+struct number;
+struct backtick_lit;
+struct DQ;
+struct SQ;
+struct TILDE;
+struct SQOPEN;
+struct SQCLOSE;
+struct BAR;
+struct FSLASH;
+struct COLON;
+struct DOUBLE_COLON;
+struct DOT;
+struct ARROW;
+struct POPEN;
+struct PCLOSE;
+struct COPEN;
+struct CCLOSE;
+struct STAR;
+struct QUESTION;
+struct EQUALS;
+struct EQEQ;
+struct NEQ;
+struct COMMA;
+struct LT;
+struct GT;
+struct LTEQ;
+struct GTEQ;
+struct BANG;
+struct DOLLAR;
+struct CARET;
+struct PERCENT;
+struct PLUS;
+struct MINUS;
+struct AMPAMP;
+struct BARBAR;
+struct _ignore_00b9;
+struct _ignore_00bb;
+struct CONS_DQ;
+struct CONS_DQ_NL;
+struct CONS_SQOPEN;
+struct CONS_SQCLOSE;
+struct dq_cons_data;
+struct CONS_SQ;
+struct CONS_SQ_NL;
+struct sq_cons_data;
+struct TILDE_NL;
+struct tilde_data;
+struct lex_id;
+struct lex_uint;
+struct lex_hex;
+struct lex_lit;
+struct LEX_DOT;
+struct LEX_BAR;
+struct LEX_AMP;
+struct LEX_DASH;
+struct LEX_POPEN;
+struct LEX_PCLOSE;
+struct LEX_STAR;
+struct LEX_STARSTAR;
+struct LEX_QUESTION;
+struct LEX_PLUS;
+struct LEX_CARET;
+struct LEX_DOTDOT;
+struct LEX_SQOPEN_POS;
+struct LEX_SQOPEN_NEG;
+struct LEX_FSLASH;
+struct LEX_DASHDASH;
+struct LEX_COLON_GT;
+struct LEX_COLON_GTGT;
+struct LEX_LT_COLON;
+struct _ignore_00ff;
+struct _ignore_0101;
+struct RE_DASH;
+struct RE_CHAR;
+struct RE_SQCLOSE;
+struct start;
+struct root_item;
+struct include;
+struct precedence_def;
+struct pred_type;
+struct pred_token_list;
+struct pred_token;
+struct pre_eof_def;
+struct alias_def;
+struct context_item;
+struct export_def;
+struct global_def;
+struct iter_def;
+struct reference_type_ref;
+struct param_var_def_list;
+struct param_var_def;
+struct opt_export;
+struct function_def;
+struct context_var_def;
+struct context_def;
+struct literal_def;
+struct literal_list;
+struct literal_item;
+struct no_ignore_left;
+struct no_ignore_right;
+struct namespace_def;
+struct namespace_item;
+struct obj_var_list;
+struct opt_reduce_first;
+struct cfl_def;
+struct region_def;
+struct rl_def;
+struct opt_lex_expr;
+struct token_def;
+struct ic_def;
+struct opt_translate;
+struct opt_id;
+struct ignore_def;
+struct prod_el;
+struct opt_prod_el_name;
+struct prod_el_list;
+struct opt_commit;
+struct opt_prod_name;
+struct prod;
+struct opt_reduce;
+struct prod_list;
+struct statement;
+struct elsif_list;
+struct elsif_clause;
+struct optional_else;
+struct call_arg_list;
+struct iter_call;
+struct block_or_single;
+struct require_pattern;
+struct opt_require_stmt;
+struct lang_stmt_list;
+struct opt_def_init;
+struct var_def;
+struct print_stmt;
+struct expr_stmt;
+struct code_expr;
+struct code_relational;
+struct code_additive;
+struct code_multiplicitive;
+struct code_unary;
+struct opt_eos;
+struct code_factor;
+struct type_ref;
+struct region_qual;
+struct opt_repeat;
+struct opt_capture;
+struct opt_field_init;
+struct field_init;
+struct opt_label;
+struct dq_lit_term;
+struct sq_lit_term;
+struct opt_tilde_data;
+struct pattern_el_lel;
+struct pattern_el;
+struct litpat_el;
+struct pattern_top_el;
+struct pattern_list;
+struct pattern;
+struct E1;
+struct E2;
+struct E3;
+struct E4;
+struct cons_el;
+struct lit_cons_el;
+struct cons_top_el;
+struct cons_list;
+struct constructor;
+struct accum_el;
+struct lit_accum_el;
+struct accum_top_el;
+struct accum_list;
+struct accumulate;
+struct string_el;
+struct lit_string_el;
+struct string_top_el;
+struct string_list;
+struct string;
+struct var_ref;
+struct qual;
+struct lex_expr;
+struct opt_lex_dot;
+struct lex_term;
+struct lex_factor_rep;
+struct lex_factor_neg;
+struct lex_range_lit;
+struct lex_num;
+struct lex_factor;
+struct reg_or_data;
+struct reg_or_char;
+struct _ign_0xdbb3a0;
+struct _ign_0xde4b20;
+struct _ign_0xde7770;
+struct _ign_0xde9520;
+struct _ign_0xdea540;
+struct _ign_0xdf7df0;
+struct __0xde4bc0_DEF_PAT_1;
+struct __0xde7810_DEF_PAT_2;
+struct __0xde95c0_DEF_PAT_3;
+struct __0xdf7e90_DEF_PAT_4;
+struct __accum0;
+struct _repeat_root_item;
+struct _repeat_sq_cons_data;
+struct _repeat_context_item;
+struct _repeat_namespace_item;
+struct _repeat_var_def;
+struct _repeat_statement;
+struct _repeat_field_init;
+struct _repeat_litpat_el;
+struct _repeat_pattern_el;
+struct _repeat_lit_cons_el;
+struct _repeat_cons_el;
+struct _repeat_lit_accum_el;
+struct _repeat_accum_el;
+struct _repeat_lit_string_el;
+struct _repeat_string_el;
+struct __list0;
+struct _T_any;
+struct _T_start;
+struct _T_root_item;
+struct _T_include;
+struct _T_precedence_def;
+struct _T_pred_type;
+struct _T_pred_token_list;
+struct _T_pred_token;
+struct _T_pre_eof_def;
+struct _T_alias_def;
+struct _T_context_item;
+struct _T_export_def;
+struct _T_global_def;
+struct _T_iter_def;
+struct _T_reference_type_ref;
+struct _T_param_var_def_list;
+struct _T_param_var_def;
+struct _T_opt_export;
+struct _T_function_def;
+struct _T_context_var_def;
+struct _T_context_def;
+struct _T_literal_def;
+struct _T_literal_list;
+struct _T_literal_item;
+struct _T_no_ignore_left;
+struct _T_no_ignore_right;
+struct _T_namespace_def;
+struct _T_namespace_item;
+struct _T_obj_var_list;
+struct _T_opt_reduce_first;
+struct _T_cfl_def;
+struct _T_region_def;
+struct _T_rl_def;
+struct _T_opt_lex_expr;
+struct _T_token_def;
+struct _T_ic_def;
+struct _T_opt_translate;
+struct _T_opt_id;
+struct _T_ignore_def;
+struct _T_prod_el;
+struct _T_opt_prod_el_name;
+struct _T_prod_el_list;
+struct _T_opt_commit;
+struct _T_opt_prod_name;
+struct _T_prod;
+struct _T_opt_reduce;
+struct _T_prod_list;
+struct _T_statement;
+struct _T_elsif_list;
+struct _T_elsif_clause;
+struct _T_optional_else;
+struct _T_call_arg_list;
+struct _T_iter_call;
+struct _T_block_or_single;
+struct _T_require_pattern;
+struct _T_opt_require_stmt;
+struct _T_lang_stmt_list;
+struct _T_opt_def_init;
+struct _T_var_def;
+struct _T_print_stmt;
+struct _T_expr_stmt;
+struct _T_code_expr;
+struct _T_code_relational;
+struct _T_code_additive;
+struct _T_code_multiplicitive;
+struct _T_code_unary;
+struct _T_opt_eos;
+struct _T_code_factor;
+struct _T_type_ref;
+struct _T_region_qual;
+struct _T_opt_repeat;
+struct _T_opt_capture;
+struct _T_opt_field_init;
+struct _T_field_init;
+struct _T_opt_label;
+struct _T_dq_lit_term;
+struct _T_sq_lit_term;
+struct _T_opt_tilde_data;
+struct _T_pattern_el_lel;
+struct _T_pattern_el;
+struct _T_litpat_el;
+struct _T_pattern_top_el;
+struct _T_pattern_list;
+struct _T_pattern;
+struct _T_E1;
+struct _T_E2;
+struct _T_E3;
+struct _T_E4;
+struct _T_cons_el;
+struct _T_lit_cons_el;
+struct _T_cons_top_el;
+struct _T_cons_list;
+struct _T_constructor;
+struct _T_accum_el;
+struct _T_lit_accum_el;
+struct _T_accum_top_el;
+struct _T_accum_list;
+struct _T_accumulate;
+struct _T_string_el;
+struct _T_lit_string_el;
+struct _T_string_top_el;
+struct _T_string_list;
+struct _T_string;
+struct _T_var_ref;
+struct _T_qual;
+struct _T_lex_expr;
+struct _T_opt_lex_dot;
+struct _T_lex_term;
+struct _T_lex_factor_rep;
+struct _T_lex_factor_neg;
+struct _T_lex_range_lit;
+struct _T_lex_num;
+struct _T_lex_factor;
+struct _T_reg_or_data;
+struct _T_reg_or_char;
+struct _T___accum0;
+struct _T__repeat_root_item;
+struct _T__repeat_sq_cons_data;
+struct _T__repeat_context_item;
+struct _T__repeat_namespace_item;
+struct _T__repeat_var_def;
+struct _T__repeat_statement;
+struct _T__repeat_field_init;
+struct _T__repeat_litpat_el;
+struct _T__repeat_pattern_el;
+struct _T__repeat_lit_cons_el;
+struct _T__repeat_cons_el;
+struct _T__repeat_lit_accum_el;
+struct _T__repeat_accum_el;
+struct _T__repeat_lit_string_el;
+struct _T__repeat_string_el;
+struct _T___list0;
+struct _root;
+struct _notoken
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _notoken( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct ptr
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ ptr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _void
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _void( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _bool
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _bool( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _int
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _int( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct str
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ str( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct stream
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ stream( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct il
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ il( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct any
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ any( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct DEF
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ DEF( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct END
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ END( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct TOKEN
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ TOKEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct RL
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ RL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct IGNORE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ IGNORE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PRINT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PRINT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PRINTS
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PRINTS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PRINT_XML
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PRINT_XML( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PRINT_XML_AC
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PRINT_XML_AC( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PARSE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PARSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PARSE_STOP
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PARSE_STOP( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CONS
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CONS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct MATCH
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ MATCH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct REQUIRE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ REQUIRE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct SEND
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ SEND( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct NAMESPACE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ NAMESPACE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct FOR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ FOR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct IF
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ IF( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct YIELD
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ YIELD( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct WHILE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ WHILE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct ELSIF
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ ELSIF( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct ELSE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ ELSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct IN
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ IN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PARSER
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PARSER( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LIST
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LIST( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct VECTOR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ VECTOR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct MAP
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ MAP( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PTR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PTR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct ITER
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ ITER( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct REF
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ REF( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct EXPORT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ EXPORT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct RETURN
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ RETURN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct BREAK
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ BREAK( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct REJECT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ REJECT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct REDUCEFIRST
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ REDUCEFIRST( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct ALIAS
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ ALIAS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct COMMIT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ COMMIT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct NEW
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ NEW( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PREEOF
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PREEOF( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct GLOBAL
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ GLOBAL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct EOS
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ EOS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CAST
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CAST( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct MAKE_TOKEN
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ MAKE_TOKEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct MAKE_TREE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ MAKE_TREE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct TYPEID
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ TYPEID( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LITERAL
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LITERAL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CONTEXT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CONTEXT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct NI
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ NI( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct NIL
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ NIL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct TRUE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ TRUE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct FALSE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ FALSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEFT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEFT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct RIGHT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ RIGHT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct NONASSOC
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ NONASSOC( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct INCLUDE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ INCLUDE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct id
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ id( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct number
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ number( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct backtick_lit
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ backtick_lit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct DQ
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ DQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct SQ
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ SQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct TILDE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ TILDE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct SQOPEN
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ SQOPEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct SQCLOSE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ SQCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct BAR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ BAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct FSLASH
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ FSLASH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct COLON
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ COLON( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct DOUBLE_COLON
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ DOUBLE_COLON( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct DOT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ DOT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct ARROW
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ ARROW( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct POPEN
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ POPEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PCLOSE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct COPEN
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ COPEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CCLOSE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct STAR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ STAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct QUESTION
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ QUESTION( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct EQUALS
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ EQUALS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct EQEQ
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ EQEQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct NEQ
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ NEQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct COMMA
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ COMMA( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct GT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ GT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LTEQ
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LTEQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct GTEQ
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ GTEQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct BANG
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ BANG( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct DOLLAR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ DOLLAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CARET
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CARET( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PERCENT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PERCENT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct PLUS
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ PLUS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct MINUS
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ MINUS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct AMPAMP
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ AMPAMP( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct BARBAR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ BARBAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ignore_00b9
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ignore_00b9( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ignore_00bb
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ignore_00bb( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CONS_DQ
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CONS_DQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CONS_DQ_NL
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CONS_DQ_NL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CONS_SQOPEN
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CONS_SQOPEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CONS_SQCLOSE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CONS_SQCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct dq_cons_data
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ dq_cons_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CONS_SQ
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CONS_SQ( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct CONS_SQ_NL
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ CONS_SQ_NL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct sq_cons_data
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ sq_cons_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct TILDE_NL
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ TILDE_NL( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct tilde_data
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ tilde_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct lex_id
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_id( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct lex_uint
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_uint( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct lex_hex
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_hex( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct lex_lit
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_lit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_DOT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_DOT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_BAR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_BAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_AMP
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_AMP( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_DASH
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_DASH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_POPEN
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_POPEN( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_PCLOSE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_PCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_STAR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_STAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_STARSTAR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_STARSTAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_QUESTION
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_QUESTION( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_PLUS
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_PLUS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_CARET
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_CARET( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_DOTDOT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_DOTDOT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_SQOPEN_POS
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_SQOPEN_POS( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_SQOPEN_NEG
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_SQOPEN_NEG( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_FSLASH
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_FSLASH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_DASHDASH
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_DASHDASH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_COLON_GT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_COLON_GT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_COLON_GTGT
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_COLON_GTGT( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct LEX_LT_COLON
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ LEX_LT_COLON( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ignore_00ff
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ignore_00ff( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ignore_0101
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ignore_0101( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct RE_DASH
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ RE_DASH( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct RE_CHAR
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ RE_CHAR( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct RE_SQCLOSE
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ RE_SQCLOSE( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct start
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ start( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::_repeat_root_item RootItemList();
+};
+struct root_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ root_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::rl_def rl_def();
+ ::literal_def literal_def();
+ ::token_def token_def();
+ ::ic_def ic_def();
+ ::ignore_def ignore_def();
+ ::cfl_def cfl_def();
+ ::region_def region_def();
+ ::context_def context_def();
+ ::namespace_def namespace_def();
+ ::function_def function_def();
+ ::iter_def iter_def();
+ ::statement statement();
+ ::global_def global_def();
+ ::export_def export_def();
+ ::pre_eof_def pre_eof_def();
+ ::precedence_def precedence_def();
+ ::alias_def alias_def();
+ ::include include();
+ enum prod_name {
+ _Rl = 0,
+ _Literal = 1,
+ _Token = 2,
+ _IgnoreCollector = 3,
+ _Ignore = 4,
+ _Cfl = 5,
+ _Region = 6,
+ _Context = 7,
+ _Namespace = 8,
+ _Function = 9,
+ _Iter = 10,
+ _Statement = 11,
+ _Global = 12,
+ _Export = 13,
+ _PreEof = 14,
+ _Precedence = 15,
+ _Alias = 16,
+ _Include = 17,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct include
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ include( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::INCLUDE INCLUDE();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+};
+struct precedence_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ precedence_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::pred_type pred_type();
+ ::pred_token_list pred_token_list();
+};
+struct pred_type
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ pred_type( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::LEFT LEFT();
+ ::RIGHT RIGHT();
+ ::NONASSOC NONASSOC();
+ enum prod_name {
+ _Left = 0,
+ _Right = 1,
+ _NonAssoc = 2,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct pred_token_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ pred_token_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::pred_token_list _pred_token_list();
+ ::COMMA COMMA();
+ ::pred_token pred_token();
+ enum prod_name {
+ _List = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct pred_token
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ pred_token( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::region_qual region_qual();
+ ::id id();
+ ::backtick_lit backtick_lit();
+ enum prod_name {
+ _Id = 0,
+ _Lit = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct pre_eof_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ pre_eof_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::PREEOF PREEOF();
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+};
+struct alias_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ alias_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::ALIAS ALIAS();
+ ::id id();
+ ::type_ref type_ref();
+};
+struct context_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ context_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::context_var_def context_var_def();
+ ::literal_def literal_def();
+ ::rl_def rl_def();
+ ::token_def token_def();
+ ::ic_def ic_def();
+ ::ignore_def ignore_def();
+ ::cfl_def cfl_def();
+ ::region_def region_def();
+ ::context_def context_def();
+ ::function_def function_def();
+ ::iter_def iter_def();
+ ::export_def export_def();
+ ::pre_eof_def pre_eof_def();
+ ::precedence_def precedence_def();
+ enum prod_name {
+ _ContextVar = 0,
+ _Literal = 1,
+ _Rl = 2,
+ _Token = 3,
+ _IgnoreCollector = 4,
+ _Ignore = 5,
+ _Cfl = 6,
+ _Region = 7,
+ _Context = 8,
+ _Function = 9,
+ _Iter = 10,
+ _Export = 11,
+ _PreEof = 12,
+ _Precedence = 13,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct export_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ export_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::EXPORT EXPORT();
+ ::var_def var_def();
+ ::opt_def_init opt_def_init();
+};
+struct global_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ global_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::GLOBAL GLOBAL();
+ ::var_def var_def();
+ ::opt_def_init opt_def_init();
+};
+struct iter_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ iter_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::ITER ITER();
+ ::id id();
+ ::POPEN POPEN();
+ ::param_var_def_list ParamVarDefList();
+ ::PCLOSE PCLOSE();
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+};
+struct reference_type_ref
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ reference_type_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::REF REF();
+ ::LT LT();
+ ::type_ref type_ref();
+ ::GT GT();
+};
+struct param_var_def_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ param_var_def_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::param_var_def param_var_def();
+ ::param_var_def_list _param_var_def_list();
+};
+struct param_var_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ param_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ ::COLON COLON();
+ ::type_ref type_ref();
+ ::reference_type_ref reference_type_ref();
+ enum prod_name {
+ _Type = 0,
+ _Ref = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct opt_export
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_export( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::EXPORT EXPORT();
+ enum prod_name {
+ _Export = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct function_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ function_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::opt_export opt_export();
+ ::type_ref type_ref();
+ ::id id();
+ ::POPEN POPEN();
+ ::param_var_def_list ParamVarDefList();
+ ::PCLOSE PCLOSE();
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+};
+struct context_var_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ context_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::var_def var_def();
+};
+struct context_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ context_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::CONTEXT CONTEXT();
+ ::id id();
+ ::_repeat_context_item ContextItemList();
+ ::END END();
+};
+struct literal_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ literal_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::LITERAL LITERAL();
+ ::literal_list literal_list();
+};
+struct literal_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ literal_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::literal_list _literal_list();
+ ::literal_item literal_item();
+ enum prod_name {
+ _Item = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct literal_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ literal_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::no_ignore_left no_ignore_left();
+ ::backtick_lit backtick_lit();
+ ::no_ignore_right no_ignore_right();
+};
+struct no_ignore_left
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ no_ignore_left( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::NI NI();
+ ::MINUS MINUS();
+ enum prod_name {
+ _Ni = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct no_ignore_right
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ no_ignore_right( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::MINUS MINUS();
+ ::NI NI();
+ enum prod_name {
+ _Ni = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct namespace_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ namespace_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::NAMESPACE NAMESPACE();
+ ::id id();
+ ::_repeat_namespace_item ItemList();
+ ::END END();
+};
+struct namespace_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ namespace_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::rl_def rl_def();
+ ::literal_def literal_def();
+ ::token_def token_def();
+ ::ic_def ic_def();
+ ::ignore_def ignore_def();
+ ::cfl_def cfl_def();
+ ::region_def region_def();
+ ::context_def context_def();
+ ::namespace_def namespace_def();
+ ::function_def function_def();
+ ::iter_def iter_def();
+ ::pre_eof_def pre_eof_def();
+ ::precedence_def precedence_def();
+ ::alias_def alias_def();
+ ::include include();
+ enum prod_name {
+ _Rl = 0,
+ _Literal = 1,
+ _Token = 2,
+ _IgnoreCollector = 3,
+ _Ignore = 4,
+ _Cfl = 5,
+ _Region = 6,
+ _Context = 7,
+ _Namespace = 8,
+ _Function = 9,
+ _Iter = 10,
+ _PreEof = 11,
+ _Precedence = 12,
+ _Alias = 13,
+ _Include = 14,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct obj_var_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ obj_var_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct opt_reduce_first
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_reduce_first( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::REDUCEFIRST REDUCEFIRST();
+};
+struct cfl_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ cfl_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DEF DEF();
+ ::id id();
+ ::_repeat_var_def VarDefList();
+ ::opt_reduce_first opt_reduce_first();
+ ::prod_list prod_list();
+};
+struct region_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ region_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::LEX LEX();
+ ::_repeat_root_item RootItemList();
+ ::END END();
+};
+struct rl_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ rl_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::RL RL();
+ ::id id();
+ ::LEX_FSLASH LEX_FSLASH();
+ ::lex_expr lex_expr();
+};
+struct opt_lex_expr
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_expr lex_expr();
+};
+struct token_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ token_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::TOKEN TOKEN();
+ ::id id();
+ ::_repeat_var_def VarDefList();
+ ::no_ignore_left no_ignore_left();
+ ::LEX_FSLASH LEX_FSLASH();
+ ::opt_lex_expr opt_lex_expr();
+ ::no_ignore_right no_ignore_right();
+ ::opt_translate opt_translate();
+};
+struct ic_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ ic_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::TOKEN TOKEN();
+ ::id id();
+ ::MINUS MINUS();
+};
+struct opt_translate
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_translate( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+ enum prod_name {
+ _Translate = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct opt_id
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_id( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ enum prod_name {
+ _Id = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct ignore_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ ignore_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::IGNORE IGNORE();
+ ::opt_id opt_id();
+ ::LEX_FSLASH LEX_FSLASH();
+ ::opt_lex_expr opt_lex_expr();
+};
+struct prod_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ prod_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::opt_prod_el_name opt_prod_el_name();
+ ::region_qual region_qual();
+ ::id id();
+ ::opt_repeat opt_repeat();
+ ::backtick_lit backtick_lit();
+ enum prod_name {
+ _Id = 0,
+ _Lit = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct opt_prod_el_name
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_prod_el_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ ::COLON COLON();
+ enum prod_name {
+ _Name = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct prod_el_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ prod_el_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::prod_el_list _prod_el_list();
+ ::prod_el prod_el();
+ enum prod_name {
+ _List = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct opt_commit
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_commit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COMMIT COMMIT();
+ enum prod_name {
+ _Commit = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct opt_prod_name
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_prod_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COLON COLON();
+ ::id id();
+ enum prod_name {
+ _Name = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct prod
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ prod( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::SQOPEN SQOPEN();
+ ::prod_el_list prod_el_list();
+ ::SQCLOSE SQCLOSE();
+ ::opt_prod_name opt_prod_name();
+ ::opt_commit opt_commit();
+ ::opt_reduce opt_reduce();
+};
+struct opt_reduce
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_reduce( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+ enum prod_name {
+ _Reduce = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct prod_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ prod_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::prod_list _prod_list();
+ ::BAR BAR();
+ ::prod prod();
+ enum prod_name {
+ _List = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct statement
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ statement( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::print_stmt print_stmt();
+ ::expr_stmt expr_stmt();
+ ::var_def var_def();
+ ::opt_def_init opt_def_init();
+ ::FOR FOR();
+ ::id id();
+ ::COLON COLON();
+ ::type_ref type_ref();
+ ::IN IN();
+ ::iter_call iter_call();
+ ::block_or_single block_or_single();
+ ::IF IF();
+ ::code_expr code_expr();
+ ::elsif_list elsif_list();
+ ::WHILE WHILE();
+ ::var_ref var_ref();
+ ::EQUALS EQUALS();
+ ::YIELD YIELD();
+ ::RETURN RETURN();
+ ::BREAK BREAK();
+ ::REJECT REJECT();
+ enum prod_name {
+ _Print = 0,
+ _Expr = 1,
+ _VarDef = 2,
+ _For = 3,
+ _If = 4,
+ _While = 5,
+ _LhsVarRef = 6,
+ _Yield = 7,
+ _Return = 8,
+ _Break = 9,
+ _Reject = 10,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct elsif_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ elsif_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::elsif_clause elsif_clause();
+ ::elsif_list _elsif_list();
+ ::optional_else optional_else();
+ enum prod_name {
+ _Clause = 0,
+ _OptElse = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct elsif_clause
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ elsif_clause( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::ELSIF ELSIF();
+ ::code_expr code_expr();
+ ::block_or_single block_or_single();
+};
+struct optional_else
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ optional_else( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::ELSE ELSE();
+ ::block_or_single block_or_single();
+ enum prod_name {
+ _Else = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct call_arg_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ call_arg_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_expr code_expr();
+ ::call_arg_list _call_arg_list();
+};
+struct iter_call
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ iter_call( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::E1 E1();
+ ::var_ref var_ref();
+ ::POPEN POPEN();
+ ::call_arg_list call_arg_list();
+ ::PCLOSE PCLOSE();
+ ::E2 E2();
+ ::id id();
+ ::E3 E3();
+ ::code_expr code_expr();
+ enum prod_name {
+ _Call = 0,
+ _Id = 1,
+ _Expr = 2,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct block_or_single
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ block_or_single( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+ ::statement statement();
+ enum prod_name {
+ _Block = 0,
+ _Single = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct require_pattern
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ require_pattern( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::REQUIRE REQUIRE();
+ ::var_ref var_ref();
+ ::pattern pattern();
+};
+struct opt_require_stmt
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_require_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::require_pattern require_pattern();
+ ::lang_stmt_list lang_stmt_list();
+ enum prod_name {
+ _Require = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct lang_stmt_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lang_stmt_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::_repeat_statement StmtList();
+ ::opt_require_stmt opt_require_stmt();
+};
+struct opt_def_init
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_def_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::EQUALS EQUALS();
+ ::code_expr code_expr();
+ enum prod_name {
+ _Init = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct var_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ ::COLON COLON();
+ ::type_ref type_ref();
+};
+struct print_stmt
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ print_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::PRINT PRINT();
+ ::POPEN POPEN();
+ ::call_arg_list call_arg_list();
+ ::PCLOSE PCLOSE();
+ ::PRINTS PRINTS();
+ ::PRINT_XML PRINT_XML();
+ ::PRINT_XML_AC PRINT_XML_AC();
+ enum prod_name {
+ _Tree = 0,
+ _PrintStream = 1,
+ _Xml = 2,
+ _XmlAc = 3,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct expr_stmt
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ expr_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_expr code_expr();
+};
+struct code_expr
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ code_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_expr _code_expr();
+ ::AMPAMP AMPAMP();
+ ::code_relational code_relational();
+ ::BARBAR BARBAR();
+ enum prod_name {
+ _AmpAmp = 0,
+ _BarBar = 1,
+ _Base = 2,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct code_relational
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ code_relational( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_relational _code_relational();
+ ::EQEQ EQEQ();
+ ::code_additive code_additive();
+ ::NEQ NEQ();
+ ::LT LT();
+ ::GT GT();
+ ::LTEQ LTEQ();
+ ::GTEQ GTEQ();
+ enum prod_name {
+ _EqEq = 0,
+ _Neq = 1,
+ _Lt = 2,
+ _Gt = 3,
+ _LtEq = 4,
+ _GtEq = 5,
+ _Base = 6,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct code_additive
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ code_additive( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_additive _code_additive();
+ ::PLUS PLUS();
+ ::code_multiplicitive code_multiplicitive();
+ ::MINUS MINUS();
+ enum prod_name {
+ _Plus = 0,
+ _Minus = 1,
+ _Base = 2,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct code_multiplicitive
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ code_multiplicitive( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_multiplicitive _code_multiplicitive();
+ ::STAR STAR();
+ ::code_unary code_unary();
+ ::FSLASH FSLASH();
+ enum prod_name {
+ _Star = 0,
+ _Fslash = 1,
+ _Base = 2,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct code_unary
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ code_unary( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::BANG BANG();
+ ::code_factor code_factor();
+ ::DOLLAR DOLLAR();
+ ::CARET CARET();
+ ::PERCENT PERCENT();
+ enum prod_name {
+ _Bang = 0,
+ _Dollar = 1,
+ _Caret = 2,
+ _Percent = 3,
+ _Base = 4,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct opt_eos
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_eos( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DOT DOT();
+ ::EOS EOS();
+ enum prod_name {
+ _Dot = 0,
+ _Eos = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct code_factor
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ code_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::number number();
+ ::var_ref var_ref();
+ ::POPEN POPEN();
+ ::call_arg_list call_arg_list();
+ ::PCLOSE PCLOSE();
+ ::NIL NIL();
+ ::TRUE TRUE();
+ ::FALSE FALSE();
+ ::code_expr code_expr();
+ ::SEND SEND();
+ ::accumulate accumulate();
+ ::opt_eos opt_eos();
+ ::PARSE PARSE();
+ ::opt_capture opt_capture();
+ ::type_ref type_ref();
+ ::opt_field_init opt_field_init();
+ ::PARSE_STOP PARSE_STOP();
+ ::CONS CONS();
+ ::constructor constructor();
+ ::MATCH MATCH();
+ ::pattern pattern();
+ ::string string();
+ ::IN IN();
+ ::MAKE_TREE MAKE_TREE();
+ ::MAKE_TOKEN MAKE_TOKEN();
+ ::TYPEID TYPEID();
+ ::LT LT();
+ ::GT GT();
+ ::NEW NEW();
+ ::code_factor _code_factor();
+ ::CAST CAST();
+ enum prod_name {
+ _Number = 0,
+ _Call = 1,
+ _VarRef = 2,
+ _Nil = 3,
+ _True = 4,
+ _False = 5,
+ _Paren = 6,
+ _Send = 7,
+ _Parse = 8,
+ _ParseStop = 9,
+ _Cons = 10,
+ _Match = 11,
+ _String = 12,
+ _In = 13,
+ _MakeTree = 14,
+ _MakeToken = 15,
+ _TypeId = 16,
+ _New = 17,
+ _Cast = 18,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct type_ref
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ type_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::region_qual region_qual();
+ ::id id();
+ ::opt_repeat opt_repeat();
+ ::PTR PTR();
+ ::LT LT();
+ ::GT GT();
+ ::MAP MAP();
+ ::type_ref MapKeyType();
+ ::type_ref MapValueType();
+ ::LIST LIST();
+ ::type_ref _type_ref();
+ ::VECTOR VECTOR();
+ ::PARSER PARSER();
+ enum prod_name {
+ _Id = 0,
+ _Ptr = 1,
+ _Map = 2,
+ _List = 3,
+ _Vector = 4,
+ _Parser = 5,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct region_qual
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ region_qual( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::region_qual _region_qual();
+ ::id id();
+ ::DOUBLE_COLON DOUBLE_COLON();
+ enum prod_name {
+ _Qual = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct opt_repeat
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_repeat( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::STAR STAR();
+ ::PLUS PLUS();
+ ::QUESTION QUESTION();
+ enum prod_name {
+ _Star = 0,
+ _Plus = 1,
+ _Question = 2,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct opt_capture
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_capture( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ ::COLON COLON();
+ enum prod_name {
+ _Id = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct opt_field_init
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::POPEN POPEN();
+ ::_repeat_field_init FieldInitList();
+ ::PCLOSE PCLOSE();
+ enum prod_name {
+ _Init = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct field_init
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_expr code_expr();
+};
+struct opt_label
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_label( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ ::COLON COLON();
+ enum prod_name {
+ _Id = 0,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct dq_lit_term
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ dq_lit_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::CONS_DQ CONS_DQ();
+ ::CONS_DQ_NL CONS_DQ_NL();
+};
+struct sq_lit_term
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ sq_lit_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::CONS_SQ CONS_SQ();
+ ::CONS_SQ_NL CONS_SQ_NL();
+};
+struct opt_tilde_data
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_tilde_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::tilde_data tilde_data();
+};
+struct pattern_el_lel
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ pattern_el_lel( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::region_qual region_qual();
+ ::id id();
+ ::opt_repeat opt_repeat();
+ ::backtick_lit backtick_lit();
+ enum prod_name {
+ _Id = 0,
+ _Lit = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct pattern_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ pattern_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::opt_label opt_label();
+ ::pattern_el_lel pattern_el_lel();
+ ::DQ DQ();
+ ::_repeat_litpat_el LitpatElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ enum prod_name {
+ _PatternEl = 0,
+ _Dq = 1,
+ _Sq = 2,
+ _Tilde = 3,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct litpat_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ litpat_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::dq_cons_data dq_cons_data();
+ ::CONS_SQOPEN CONS_SQOPEN();
+ ::_repeat_pattern_el PatternElList();
+ ::CONS_SQCLOSE CONS_SQCLOSE();
+ enum prod_name {
+ _ConsData = 0,
+ _SubList = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct pattern_top_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ pattern_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DQ DQ();
+ ::_repeat_litpat_el LitpatElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::SQOPEN SQOPEN();
+ ::_repeat_pattern_el PatternElList();
+ ::SQCLOSE SQCLOSE();
+ enum prod_name {
+ _Dq = 0,
+ _Sq = 1,
+ _Tilde = 2,
+ _SubList = 3,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct pattern_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ pattern_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::pattern_list _pattern_list();
+ ::pattern_top_el pattern_top_el();
+ enum prod_name {
+ _List = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct pattern
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ pattern( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::pattern_list pattern_list();
+};
+struct E1
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ E1( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct E2
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ E2( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct E3
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ E3( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct E4
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ E4( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct cons_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::E1 E1();
+ ::region_qual region_qual();
+ ::backtick_lit backtick_lit();
+ ::DQ DQ();
+ ::_repeat_lit_cons_el LitConsElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::E2 E2();
+ ::code_expr code_expr();
+ enum prod_name {
+ _Lit = 0,
+ _Dq = 1,
+ _Sq = 2,
+ _Tilde = 3,
+ _CodeExpr = 4,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct lit_cons_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lit_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::dq_cons_data dq_cons_data();
+ ::CONS_SQOPEN CONS_SQOPEN();
+ ::_repeat_cons_el ConsElList();
+ ::CONS_SQCLOSE CONS_SQCLOSE();
+ enum prod_name {
+ _ConsData = 0,
+ _SubList = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct cons_top_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ cons_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DQ DQ();
+ ::_repeat_lit_cons_el LitConsElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::SQOPEN SQOPEN();
+ ::_repeat_cons_el ConsElList();
+ ::SQCLOSE SQCLOSE();
+ enum prod_name {
+ _Dq = 0,
+ _Sq = 1,
+ _Tilde = 2,
+ _SubList = 3,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct cons_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ cons_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::cons_top_el cons_top_el();
+ ::cons_list _cons_list();
+ enum prod_name {
+ _List = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct constructor
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ constructor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::cons_list cons_list();
+};
+struct accum_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::E1 E1();
+ ::DQ DQ();
+ ::_repeat_lit_accum_el LitAccumElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::E2 E2();
+ ::code_expr code_expr();
+ enum prod_name {
+ _Dq = 0,
+ _Sq = 1,
+ _Tilde = 2,
+ _CodeExpr = 3,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct lit_accum_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lit_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::dq_cons_data dq_cons_data();
+ ::CONS_SQOPEN CONS_SQOPEN();
+ ::_repeat_accum_el AccumElList();
+ ::CONS_SQCLOSE CONS_SQCLOSE();
+ enum prod_name {
+ _ConsData = 0,
+ _SubList = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct accum_top_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ accum_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DQ DQ();
+ ::_repeat_lit_accum_el LitAccumElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::SQOPEN SQOPEN();
+ ::_repeat_accum_el AccumElList();
+ ::SQCLOSE SQCLOSE();
+ enum prod_name {
+ _Dq = 0,
+ _Sq = 1,
+ _Tilde = 2,
+ _SubList = 3,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct accum_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ accum_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::accum_top_el accum_top_el();
+ ::accum_list _accum_list();
+ enum prod_name {
+ _List = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct accumulate
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ accumulate( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::accum_list accum_list();
+};
+struct string_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::E1 E1();
+ ::DQ DQ();
+ ::_repeat_lit_string_el LitStringElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::E2 E2();
+ ::code_expr code_expr();
+ enum prod_name {
+ _Dq = 0,
+ _Sq = 1,
+ _Tilde = 2,
+ _CodeExpr = 3,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct lit_string_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lit_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::dq_cons_data dq_cons_data();
+ ::CONS_SQOPEN CONS_SQOPEN();
+ ::_repeat_string_el StringElList();
+ ::CONS_SQCLOSE CONS_SQCLOSE();
+ enum prod_name {
+ _ConsData = 0,
+ _SubList = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct string_top_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ string_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DQ DQ();
+ ::_repeat_lit_string_el LitStringElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::SQOPEN SQOPEN();
+ ::_repeat_string_el StringElList();
+ ::SQCLOSE SQCLOSE();
+ enum prod_name {
+ _Dq = 0,
+ _Sq = 1,
+ _Tilde = 2,
+ _SubList = 3,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct string_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ string_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::string_top_el string_top_el();
+ ::string_list _string_list();
+ enum prod_name {
+ _List = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct string
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ string( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::string_list string_list();
+};
+struct var_ref
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ var_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::qual qual();
+ ::id id();
+};
+struct qual
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ qual( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::qual _qual();
+ ::id id();
+ ::DOT DOT();
+ ::ARROW ARROW();
+ enum prod_name {
+ _Dot = 0,
+ _Arrow = 1,
+ _Base = 2,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct lex_expr
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_expr _lex_expr();
+ ::LEX_BAR LEX_BAR();
+ ::lex_term lex_term();
+ ::LEX_AMP LEX_AMP();
+ ::LEX_DASH LEX_DASH();
+ ::LEX_DASHDASH LEX_DASHDASH();
+ enum prod_name {
+ _Bar = 0,
+ _Amp = 1,
+ _Dash = 2,
+ _DashDash = 3,
+ _Base = 4,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct opt_lex_dot
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ opt_lex_dot( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::LEX_DOT LEX_DOT();
+};
+struct lex_term
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_term _lex_term();
+ ::opt_lex_dot opt_lex_dot();
+ ::lex_factor_rep lex_factor_rep();
+ ::LEX_COLON_GT LEX_COLON_GT();
+ ::LEX_COLON_GTGT LEX_COLON_GTGT();
+ ::LEX_LT_COLON LEX_LT_COLON();
+ enum prod_name {
+ _Dot = 0,
+ _ColonGt = 1,
+ _ColonGtGt = 2,
+ _LtColon = 3,
+ _Base = 4,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct lex_factor_rep
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_factor_rep( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_factor_rep _lex_factor_rep();
+ ::LEX_STAR LEX_STAR();
+ ::LEX_STARSTAR LEX_STARSTAR();
+ ::LEX_PLUS LEX_PLUS();
+ ::LEX_QUESTION LEX_QUESTION();
+ ::COPEN COPEN();
+ ::lex_uint lex_uint();
+ ::CCLOSE CCLOSE();
+ ::COMMA COMMA();
+ ::lex_uint Low();
+ ::lex_uint High();
+ ::lex_factor_neg lex_factor_neg();
+ enum prod_name {
+ _Star = 0,
+ _StarStar = 1,
+ _Plus = 2,
+ _Question = 3,
+ _Exact = 4,
+ _Max = 5,
+ _Min = 6,
+ _Range = 7,
+ _Base = 8,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct lex_factor_neg
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_factor_neg( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::LEX_CARET LEX_CARET();
+ ::lex_factor_neg _lex_factor_neg();
+ ::lex_factor lex_factor();
+ enum prod_name {
+ _Caret = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct lex_range_lit
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_range_lit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_lit lex_lit();
+ ::lex_num lex_num();
+ enum prod_name {
+ _Lit = 0,
+ _Number = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct lex_num
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_num( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_uint lex_uint();
+ ::lex_hex lex_hex();
+};
+struct lex_factor
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ lex_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_lit lex_lit();
+ ::lex_id lex_id();
+ ::lex_uint lex_uint();
+ ::lex_hex lex_hex();
+ ::lex_range_lit Low();
+ ::LEX_DOTDOT LEX_DOTDOT();
+ ::lex_range_lit High();
+ ::LEX_SQOPEN_POS LEX_SQOPEN_POS();
+ ::reg_or_data reg_or_data();
+ ::RE_SQCLOSE RE_SQCLOSE();
+ ::LEX_SQOPEN_NEG LEX_SQOPEN_NEG();
+ ::LEX_POPEN LEX_POPEN();
+ ::lex_expr lex_expr();
+ ::LEX_PCLOSE LEX_PCLOSE();
+ enum prod_name {
+ _Literal = 0,
+ _Id = 1,
+ _Number = 2,
+ _Hex = 3,
+ _Range = 4,
+ _PosOrBlock = 5,
+ _NegOrBlock = 6,
+ _Paren = 7,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct reg_or_data
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ reg_or_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::reg_or_data _reg_or_data();
+ ::reg_or_char reg_or_char();
+ enum prod_name {
+ _Data = 0,
+ _Base = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct reg_or_char
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ reg_or_char( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::RE_CHAR RE_CHAR();
+ ::RE_CHAR Low();
+ ::RE_DASH RE_DASH();
+ ::RE_CHAR High();
+ enum prod_name {
+ _Char = 0,
+ _Range = 1,
+ };
+ enum prod_name prodName() { return (enum prod_name)__tree->prodNum; }
+};
+struct _ign_0xdbb3a0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ign_0xdbb3a0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ign_0xde4b20
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ign_0xde4b20( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ign_0xde7770
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ign_0xde7770( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ign_0xde9520
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ign_0xde9520( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ign_0xdea540
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ign_0xdea540( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _ign_0xdf7df0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _ign_0xdf7df0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct __0xde4bc0_DEF_PAT_1
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ __0xde4bc0_DEF_PAT_1( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct __0xde7810_DEF_PAT_2
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ __0xde7810_DEF_PAT_2( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct __0xde95c0_DEF_PAT_3
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ __0xde95c0_DEF_PAT_3( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct __0xdf7e90_DEF_PAT_4
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ __0xdf7e90_DEF_PAT_4( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct __accum0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ __accum0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::start tree();
+ ::str error();
+};
+struct _repeat_root_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_root_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_root_item next();
+ ::root_item value();
+};
+struct _repeat_sq_cons_data
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_sq_cons_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_sq_cons_data next();
+ ::sq_cons_data value();
+};
+struct _repeat_context_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_context_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_context_item next();
+ ::context_item value();
+};
+struct _repeat_namespace_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_namespace_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_namespace_item next();
+ ::namespace_item value();
+};
+struct _repeat_var_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_var_def next();
+ ::var_def value();
+};
+struct _repeat_statement
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_statement( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_statement next();
+ ::statement value();
+};
+struct _repeat_field_init
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_field_init next();
+ ::field_init value();
+};
+struct _repeat_litpat_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_litpat_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_litpat_el next();
+ ::litpat_el value();
+};
+struct _repeat_pattern_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_pattern_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_pattern_el next();
+ ::pattern_el value();
+};
+struct _repeat_lit_cons_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_lit_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_lit_cons_el next();
+ ::lit_cons_el value();
+};
+struct _repeat_cons_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_cons_el next();
+ ::cons_el value();
+};
+struct _repeat_lit_accum_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_lit_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_lit_accum_el next();
+ ::lit_accum_el value();
+};
+struct _repeat_accum_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_accum_el next();
+ ::accum_el value();
+};
+struct _repeat_lit_string_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_lit_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_lit_string_el next();
+ ::lit_string_el value();
+};
+struct _repeat_string_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _repeat_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ int end() { return colm_repeat_end( __tree ); }
+ ::_repeat_string_el next();
+ ::string_el value();
+};
+struct __list0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ __list0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::str head();
+ ::str tail();
+ ::str top();
+};
+struct _T_any
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_any( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T_start
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_start( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::_repeat_root_item RootItemList();
+};
+struct _T_root_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_root_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::rl_def rl_def();
+ ::literal_def literal_def();
+ ::token_def token_def();
+ ::ic_def ic_def();
+ ::ignore_def ignore_def();
+ ::cfl_def cfl_def();
+ ::region_def region_def();
+ ::context_def context_def();
+ ::namespace_def namespace_def();
+ ::function_def function_def();
+ ::iter_def iter_def();
+ ::statement statement();
+ ::global_def global_def();
+ ::export_def export_def();
+ ::pre_eof_def pre_eof_def();
+ ::precedence_def precedence_def();
+ ::alias_def alias_def();
+ ::include include();
+};
+struct _T_include
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_include( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::INCLUDE INCLUDE();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+};
+struct _T_precedence_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_precedence_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::pred_type pred_type();
+ ::pred_token_list pred_token_list();
+};
+struct _T_pred_type
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_pred_type( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::LEFT LEFT();
+ ::RIGHT RIGHT();
+ ::NONASSOC NONASSOC();
+};
+struct _T_pred_token_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_pred_token_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::pred_token_list _pred_token_list();
+ ::COMMA COMMA();
+ ::pred_token pred_token();
+};
+struct _T_pred_token
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_pred_token( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::region_qual region_qual();
+ ::id id();
+ ::backtick_lit backtick_lit();
+};
+struct _T_pre_eof_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_pre_eof_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::PREEOF PREEOF();
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+};
+struct _T_alias_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_alias_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::ALIAS ALIAS();
+ ::id id();
+ ::type_ref type_ref();
+};
+struct _T_context_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_context_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::context_var_def context_var_def();
+ ::literal_def literal_def();
+ ::rl_def rl_def();
+ ::token_def token_def();
+ ::ic_def ic_def();
+ ::ignore_def ignore_def();
+ ::cfl_def cfl_def();
+ ::region_def region_def();
+ ::context_def context_def();
+ ::function_def function_def();
+ ::iter_def iter_def();
+ ::export_def export_def();
+ ::pre_eof_def pre_eof_def();
+ ::precedence_def precedence_def();
+};
+struct _T_export_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_export_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::EXPORT EXPORT();
+ ::var_def var_def();
+ ::opt_def_init opt_def_init();
+};
+struct _T_global_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_global_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::GLOBAL GLOBAL();
+ ::var_def var_def();
+ ::opt_def_init opt_def_init();
+};
+struct _T_iter_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_iter_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::ITER ITER();
+ ::id id();
+ ::POPEN POPEN();
+ ::param_var_def_list ParamVarDefList();
+ ::PCLOSE PCLOSE();
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+};
+struct _T_reference_type_ref
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_reference_type_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::REF REF();
+ ::LT LT();
+ ::type_ref type_ref();
+ ::GT GT();
+};
+struct _T_param_var_def_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_param_var_def_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::param_var_def param_var_def();
+ ::param_var_def_list _param_var_def_list();
+};
+struct _T_param_var_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_param_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ ::COLON COLON();
+ ::type_ref type_ref();
+ ::reference_type_ref reference_type_ref();
+};
+struct _T_opt_export
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_export( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::EXPORT EXPORT();
+};
+struct _T_function_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_function_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::opt_export opt_export();
+ ::type_ref type_ref();
+ ::id id();
+ ::POPEN POPEN();
+ ::param_var_def_list ParamVarDefList();
+ ::PCLOSE PCLOSE();
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+};
+struct _T_context_var_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_context_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::var_def var_def();
+};
+struct _T_context_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_context_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::CONTEXT CONTEXT();
+ ::id id();
+ ::_repeat_context_item ContextItemList();
+ ::END END();
+};
+struct _T_literal_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_literal_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::LITERAL LITERAL();
+ ::literal_list literal_list();
+};
+struct _T_literal_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_literal_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::literal_list _literal_list();
+ ::literal_item literal_item();
+};
+struct _T_literal_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_literal_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::no_ignore_left no_ignore_left();
+ ::backtick_lit backtick_lit();
+ ::no_ignore_right no_ignore_right();
+};
+struct _T_no_ignore_left
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_no_ignore_left( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::NI NI();
+ ::MINUS MINUS();
+};
+struct _T_no_ignore_right
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_no_ignore_right( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::MINUS MINUS();
+ ::NI NI();
+};
+struct _T_namespace_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_namespace_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::NAMESPACE NAMESPACE();
+ ::id id();
+ ::_repeat_namespace_item ItemList();
+ ::END END();
+};
+struct _T_namespace_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_namespace_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::rl_def rl_def();
+ ::literal_def literal_def();
+ ::token_def token_def();
+ ::ic_def ic_def();
+ ::ignore_def ignore_def();
+ ::cfl_def cfl_def();
+ ::region_def region_def();
+ ::context_def context_def();
+ ::namespace_def namespace_def();
+ ::function_def function_def();
+ ::iter_def iter_def();
+ ::pre_eof_def pre_eof_def();
+ ::precedence_def precedence_def();
+ ::alias_def alias_def();
+ ::include include();
+};
+struct _T_obj_var_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_obj_var_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T_opt_reduce_first
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_reduce_first( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::REDUCEFIRST REDUCEFIRST();
+};
+struct _T_cfl_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_cfl_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DEF DEF();
+ ::id id();
+ ::_repeat_var_def VarDefList();
+ ::opt_reduce_first opt_reduce_first();
+ ::prod_list prod_list();
+};
+struct _T_region_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_region_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::LEX LEX();
+ ::_repeat_root_item RootItemList();
+ ::END END();
+};
+struct _T_rl_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_rl_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::RL RL();
+ ::id id();
+ ::LEX_FSLASH LEX_FSLASH();
+ ::lex_expr lex_expr();
+};
+struct _T_opt_lex_expr
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_expr lex_expr();
+};
+struct _T_token_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_token_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::TOKEN TOKEN();
+ ::id id();
+ ::_repeat_var_def VarDefList();
+ ::no_ignore_left no_ignore_left();
+ ::LEX_FSLASH LEX_FSLASH();
+ ::opt_lex_expr opt_lex_expr();
+ ::no_ignore_right no_ignore_right();
+ ::opt_translate opt_translate();
+};
+struct _T_ic_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_ic_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::TOKEN TOKEN();
+ ::id id();
+ ::MINUS MINUS();
+};
+struct _T_opt_translate
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_translate( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+};
+struct _T_opt_id
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_id( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+};
+struct _T_ignore_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_ignore_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::IGNORE IGNORE();
+ ::opt_id opt_id();
+ ::LEX_FSLASH LEX_FSLASH();
+ ::opt_lex_expr opt_lex_expr();
+};
+struct _T_prod_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_prod_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::opt_prod_el_name opt_prod_el_name();
+ ::region_qual region_qual();
+ ::id id();
+ ::opt_repeat opt_repeat();
+ ::backtick_lit backtick_lit();
+};
+struct _T_opt_prod_el_name
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_prod_el_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ ::COLON COLON();
+};
+struct _T_prod_el_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_prod_el_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::prod_el_list _prod_el_list();
+ ::prod_el prod_el();
+};
+struct _T_opt_commit
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_commit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COMMIT COMMIT();
+};
+struct _T_opt_prod_name
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_prod_name( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COLON COLON();
+ ::id id();
+};
+struct _T_prod
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_prod( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::SQOPEN SQOPEN();
+ ::prod_el_list prod_el_list();
+ ::SQCLOSE SQCLOSE();
+ ::opt_prod_name opt_prod_name();
+ ::opt_commit opt_commit();
+ ::opt_reduce opt_reduce();
+};
+struct _T_opt_reduce
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_reduce( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+};
+struct _T_prod_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_prod_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::prod_list _prod_list();
+ ::BAR BAR();
+ ::prod prod();
+};
+struct _T_statement
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_statement( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::print_stmt print_stmt();
+ ::expr_stmt expr_stmt();
+ ::var_def var_def();
+ ::opt_def_init opt_def_init();
+ ::FOR FOR();
+ ::id id();
+ ::COLON COLON();
+ ::type_ref type_ref();
+ ::IN IN();
+ ::iter_call iter_call();
+ ::block_or_single block_or_single();
+ ::IF IF();
+ ::code_expr code_expr();
+ ::elsif_list elsif_list();
+ ::WHILE WHILE();
+ ::var_ref var_ref();
+ ::EQUALS EQUALS();
+ ::YIELD YIELD();
+ ::RETURN RETURN();
+ ::BREAK BREAK();
+ ::REJECT REJECT();
+};
+struct _T_elsif_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_elsif_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::elsif_clause elsif_clause();
+ ::elsif_list _elsif_list();
+ ::optional_else optional_else();
+};
+struct _T_elsif_clause
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_elsif_clause( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::ELSIF ELSIF();
+ ::code_expr code_expr();
+ ::block_or_single block_or_single();
+};
+struct _T_optional_else
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_optional_else( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::ELSE ELSE();
+ ::block_or_single block_or_single();
+};
+struct _T_call_arg_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_call_arg_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_expr code_expr();
+ ::call_arg_list _call_arg_list();
+};
+struct _T_iter_call
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_iter_call( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::E1 E1();
+ ::var_ref var_ref();
+ ::POPEN POPEN();
+ ::call_arg_list call_arg_list();
+ ::PCLOSE PCLOSE();
+ ::E2 E2();
+ ::id id();
+ ::E3 E3();
+ ::code_expr code_expr();
+};
+struct _T_block_or_single
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_block_or_single( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::COPEN COPEN();
+ ::lang_stmt_list lang_stmt_list();
+ ::CCLOSE CCLOSE();
+ ::statement statement();
+};
+struct _T_require_pattern
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_require_pattern( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::REQUIRE REQUIRE();
+ ::var_ref var_ref();
+ ::pattern pattern();
+};
+struct _T_opt_require_stmt
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_require_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::require_pattern require_pattern();
+ ::lang_stmt_list lang_stmt_list();
+};
+struct _T_lang_stmt_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lang_stmt_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::_repeat_statement StmtList();
+ ::opt_require_stmt opt_require_stmt();
+};
+struct _T_opt_def_init
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_def_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::EQUALS EQUALS();
+ ::code_expr code_expr();
+};
+struct _T_var_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ ::COLON COLON();
+ ::type_ref type_ref();
+};
+struct _T_print_stmt
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_print_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::PRINT PRINT();
+ ::POPEN POPEN();
+ ::call_arg_list call_arg_list();
+ ::PCLOSE PCLOSE();
+ ::PRINTS PRINTS();
+ ::PRINT_XML PRINT_XML();
+ ::PRINT_XML_AC PRINT_XML_AC();
+};
+struct _T_expr_stmt
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_expr_stmt( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_expr code_expr();
+};
+struct _T_code_expr
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_code_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_expr _code_expr();
+ ::AMPAMP AMPAMP();
+ ::code_relational code_relational();
+ ::BARBAR BARBAR();
+};
+struct _T_code_relational
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_code_relational( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_relational _code_relational();
+ ::EQEQ EQEQ();
+ ::code_additive code_additive();
+ ::NEQ NEQ();
+ ::LT LT();
+ ::GT GT();
+ ::LTEQ LTEQ();
+ ::GTEQ GTEQ();
+};
+struct _T_code_additive
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_code_additive( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_additive _code_additive();
+ ::PLUS PLUS();
+ ::code_multiplicitive code_multiplicitive();
+ ::MINUS MINUS();
+};
+struct _T_code_multiplicitive
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_code_multiplicitive( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_multiplicitive _code_multiplicitive();
+ ::STAR STAR();
+ ::code_unary code_unary();
+ ::FSLASH FSLASH();
+};
+struct _T_code_unary
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_code_unary( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::BANG BANG();
+ ::code_factor code_factor();
+ ::DOLLAR DOLLAR();
+ ::CARET CARET();
+ ::PERCENT PERCENT();
+};
+struct _T_opt_eos
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_eos( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DOT DOT();
+ ::EOS EOS();
+};
+struct _T_code_factor
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_code_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::number number();
+ ::var_ref var_ref();
+ ::POPEN POPEN();
+ ::call_arg_list call_arg_list();
+ ::PCLOSE PCLOSE();
+ ::NIL NIL();
+ ::TRUE TRUE();
+ ::FALSE FALSE();
+ ::code_expr code_expr();
+ ::SEND SEND();
+ ::accumulate accumulate();
+ ::opt_eos opt_eos();
+ ::PARSE PARSE();
+ ::opt_capture opt_capture();
+ ::type_ref type_ref();
+ ::opt_field_init opt_field_init();
+ ::PARSE_STOP PARSE_STOP();
+ ::CONS CONS();
+ ::constructor constructor();
+ ::MATCH MATCH();
+ ::pattern pattern();
+ ::string string();
+ ::IN IN();
+ ::MAKE_TREE MAKE_TREE();
+ ::MAKE_TOKEN MAKE_TOKEN();
+ ::TYPEID TYPEID();
+ ::LT LT();
+ ::GT GT();
+ ::NEW NEW();
+ ::code_factor _code_factor();
+ ::CAST CAST();
+};
+struct _T_type_ref
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_type_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::region_qual region_qual();
+ ::id id();
+ ::opt_repeat opt_repeat();
+ ::PTR PTR();
+ ::LT LT();
+ ::GT GT();
+ ::MAP MAP();
+ ::type_ref MapKeyType();
+ ::type_ref MapValueType();
+ ::LIST LIST();
+ ::type_ref _type_ref();
+ ::VECTOR VECTOR();
+ ::PARSER PARSER();
+};
+struct _T_region_qual
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_region_qual( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::region_qual _region_qual();
+ ::id id();
+ ::DOUBLE_COLON DOUBLE_COLON();
+};
+struct _T_opt_repeat
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_repeat( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::STAR STAR();
+ ::PLUS PLUS();
+ ::QUESTION QUESTION();
+};
+struct _T_opt_capture
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_capture( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ ::COLON COLON();
+};
+struct _T_opt_field_init
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::POPEN POPEN();
+ ::_repeat_field_init FieldInitList();
+ ::PCLOSE PCLOSE();
+};
+struct _T_field_init
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::code_expr code_expr();
+};
+struct _T_opt_label
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_label( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::id id();
+ ::COLON COLON();
+};
+struct _T_dq_lit_term
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_dq_lit_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::CONS_DQ CONS_DQ();
+ ::CONS_DQ_NL CONS_DQ_NL();
+};
+struct _T_sq_lit_term
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_sq_lit_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::CONS_SQ CONS_SQ();
+ ::CONS_SQ_NL CONS_SQ_NL();
+};
+struct _T_opt_tilde_data
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_tilde_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::tilde_data tilde_data();
+};
+struct _T_pattern_el_lel
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_pattern_el_lel( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::region_qual region_qual();
+ ::id id();
+ ::opt_repeat opt_repeat();
+ ::backtick_lit backtick_lit();
+};
+struct _T_pattern_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_pattern_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::opt_label opt_label();
+ ::pattern_el_lel pattern_el_lel();
+ ::DQ DQ();
+ ::_repeat_litpat_el LitpatElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+};
+struct _T_litpat_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_litpat_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::dq_cons_data dq_cons_data();
+ ::CONS_SQOPEN CONS_SQOPEN();
+ ::_repeat_pattern_el PatternElList();
+ ::CONS_SQCLOSE CONS_SQCLOSE();
+};
+struct _T_pattern_top_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_pattern_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DQ DQ();
+ ::_repeat_litpat_el LitpatElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::SQOPEN SQOPEN();
+ ::_repeat_pattern_el PatternElList();
+ ::SQCLOSE SQCLOSE();
+};
+struct _T_pattern_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_pattern_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::pattern_list _pattern_list();
+ ::pattern_top_el pattern_top_el();
+};
+struct _T_pattern
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_pattern( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::pattern_list pattern_list();
+};
+struct _T_E1
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_E1( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T_E2
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_E2( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T_E3
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_E3( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T_E4
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_E4( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T_cons_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::E1 E1();
+ ::region_qual region_qual();
+ ::backtick_lit backtick_lit();
+ ::DQ DQ();
+ ::_repeat_lit_cons_el LitConsElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::E2 E2();
+ ::code_expr code_expr();
+};
+struct _T_lit_cons_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lit_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::dq_cons_data dq_cons_data();
+ ::CONS_SQOPEN CONS_SQOPEN();
+ ::_repeat_cons_el ConsElList();
+ ::CONS_SQCLOSE CONS_SQCLOSE();
+};
+struct _T_cons_top_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_cons_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DQ DQ();
+ ::_repeat_lit_cons_el LitConsElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::SQOPEN SQOPEN();
+ ::_repeat_cons_el ConsElList();
+ ::SQCLOSE SQCLOSE();
+};
+struct _T_cons_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_cons_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::cons_top_el cons_top_el();
+ ::cons_list _cons_list();
+};
+struct _T_constructor
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_constructor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::cons_list cons_list();
+};
+struct _T_accum_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::E1 E1();
+ ::DQ DQ();
+ ::_repeat_lit_accum_el LitAccumElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::E2 E2();
+ ::code_expr code_expr();
+};
+struct _T_lit_accum_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lit_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::dq_cons_data dq_cons_data();
+ ::CONS_SQOPEN CONS_SQOPEN();
+ ::_repeat_accum_el AccumElList();
+ ::CONS_SQCLOSE CONS_SQCLOSE();
+};
+struct _T_accum_top_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_accum_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DQ DQ();
+ ::_repeat_lit_accum_el LitAccumElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::SQOPEN SQOPEN();
+ ::_repeat_accum_el AccumElList();
+ ::SQCLOSE SQCLOSE();
+};
+struct _T_accum_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_accum_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::accum_top_el accum_top_el();
+ ::accum_list _accum_list();
+};
+struct _T_accumulate
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_accumulate( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::accum_list accum_list();
+};
+struct _T_string_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::E1 E1();
+ ::DQ DQ();
+ ::_repeat_lit_string_el LitStringElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::E2 E2();
+ ::code_expr code_expr();
+};
+struct _T_lit_string_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lit_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::dq_cons_data dq_cons_data();
+ ::CONS_SQOPEN CONS_SQOPEN();
+ ::_repeat_string_el StringElList();
+ ::CONS_SQCLOSE CONS_SQCLOSE();
+};
+struct _T_string_top_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_string_top_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::DQ DQ();
+ ::_repeat_lit_string_el LitStringElList();
+ ::dq_lit_term dq_lit_term();
+ ::SQ SQ();
+ ::_repeat_sq_cons_data SqConsDataList();
+ ::sq_lit_term sq_lit_term();
+ ::TILDE TILDE();
+ ::opt_tilde_data opt_tilde_data();
+ ::TILDE_NL TILDE_NL();
+ ::SQOPEN SQOPEN();
+ ::_repeat_string_el StringElList();
+ ::SQCLOSE SQCLOSE();
+};
+struct _T_string_list
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_string_list( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::string_top_el string_top_el();
+ ::string_list _string_list();
+};
+struct _T_string
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_string( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::string_list string_list();
+};
+struct _T_var_ref
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_var_ref( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::qual qual();
+ ::id id();
+};
+struct _T_qual
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_qual( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::qual _qual();
+ ::id id();
+ ::DOT DOT();
+ ::ARROW ARROW();
+};
+struct _T_lex_expr
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_expr( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_expr _lex_expr();
+ ::LEX_BAR LEX_BAR();
+ ::lex_term lex_term();
+ ::LEX_AMP LEX_AMP();
+ ::LEX_DASH LEX_DASH();
+ ::LEX_DASHDASH LEX_DASHDASH();
+};
+struct _T_opt_lex_dot
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_opt_lex_dot( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::LEX_DOT LEX_DOT();
+};
+struct _T_lex_term
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_term( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_term _lex_term();
+ ::opt_lex_dot opt_lex_dot();
+ ::lex_factor_rep lex_factor_rep();
+ ::LEX_COLON_GT LEX_COLON_GT();
+ ::LEX_COLON_GTGT LEX_COLON_GTGT();
+ ::LEX_LT_COLON LEX_LT_COLON();
+};
+struct _T_lex_factor_rep
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_factor_rep( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_factor_rep _lex_factor_rep();
+ ::LEX_STAR LEX_STAR();
+ ::LEX_STARSTAR LEX_STARSTAR();
+ ::LEX_PLUS LEX_PLUS();
+ ::LEX_QUESTION LEX_QUESTION();
+ ::COPEN COPEN();
+ ::lex_uint lex_uint();
+ ::CCLOSE CCLOSE();
+ ::COMMA COMMA();
+ ::lex_uint Low();
+ ::lex_uint High();
+ ::lex_factor_neg lex_factor_neg();
+};
+struct _T_lex_factor_neg
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_factor_neg( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::LEX_CARET LEX_CARET();
+ ::lex_factor_neg _lex_factor_neg();
+ ::lex_factor lex_factor();
+};
+struct _T_lex_range_lit
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_range_lit( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_lit lex_lit();
+ ::lex_num lex_num();
+};
+struct _T_lex_num
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_num( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_uint lex_uint();
+ ::lex_hex lex_hex();
+};
+struct _T_lex_factor
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_lex_factor( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::lex_lit lex_lit();
+ ::lex_id lex_id();
+ ::lex_uint lex_uint();
+ ::lex_hex lex_hex();
+ ::lex_range_lit Low();
+ ::LEX_DOTDOT LEX_DOTDOT();
+ ::lex_range_lit High();
+ ::LEX_SQOPEN_POS LEX_SQOPEN_POS();
+ ::reg_or_data reg_or_data();
+ ::RE_SQCLOSE RE_SQCLOSE();
+ ::LEX_SQOPEN_NEG LEX_SQOPEN_NEG();
+ ::LEX_POPEN LEX_POPEN();
+ ::lex_expr lex_expr();
+ ::LEX_PCLOSE LEX_PCLOSE();
+};
+struct _T_reg_or_data
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_reg_or_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::reg_or_data _reg_or_data();
+ ::reg_or_char reg_or_char();
+};
+struct _T_reg_or_char
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T_reg_or_char( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::RE_CHAR RE_CHAR();
+ ::RE_CHAR Low();
+ ::RE_DASH RE_DASH();
+ ::RE_CHAR High();
+};
+struct _T___accum0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T___accum0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::start tree();
+ ::str error();
+};
+struct _T__repeat_root_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_root_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_sq_cons_data
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_sq_cons_data( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_context_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_context_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_namespace_item
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_namespace_item( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_var_def
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_var_def( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_statement
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_statement( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_field_init
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_field_init( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_litpat_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_litpat_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_pattern_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_pattern_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_lit_cons_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_lit_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_cons_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_cons_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_lit_accum_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_lit_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_accum_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_accum_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_lit_string_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_lit_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T__repeat_string_el
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T__repeat_string_el( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+struct _T___list0
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _T___list0( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+ ::str head();
+ ::str tail();
+ ::str top();
+};
+struct _root
+{
+ std::string text() { return printTreeStr( __prg, __tree, true ); }
+ colm_location *loc() { return colm_find_location( __prg, __tree ); }
+ std::string text_notrim() { return printTreeStr( __prg, __tree, false ); }
+ std::string text_ws() { return printTreeStr( __prg, __tree, false ); }
+ colm_data *data() { return __tree->tokdata; }
+ operator colm_tree *() { return __tree; }
+ colm_program *__prg;
+ colm_tree *__tree;
+ _root( colm_program *prg, colm_tree *tree ) : __prg(prg), __tree(tree) {}
+};
+::start ColmTree( colm_program *prg );
+::str ColmError( colm_program *prg );
+
+#endif
diff --git a/src/input.c b/src/input.c
new file mode 100644
index 0000000..a41aa5b
--- /dev/null
+++ b/src/input.c
@@ -0,0 +1,1005 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <colm/input.h>
+#include <colm/pdarun.h>
+#include <colm/debug.h>
+#include <colm/program.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <unistd.h>
+
+#define true 1
+#define false 0
+
+RunBuf *newRunBuf()
+{
+ RunBuf *rb = (RunBuf*)malloc(sizeof(RunBuf));
+ memset( rb, 0, sizeof(RunBuf) );
+ return rb;
+}
+
+void initFdFuncs();
+void initFileFuncs();
+void initPatFuncs();
+void initConsFuncs();
+
+extern struct StreamFuncs fileFuncs;
+extern struct StreamFuncs fdFuncs;
+extern struct StreamFuncs streamFuncs;
+
+void clearSourceStream( struct colm_program *prg, Tree **sp, StreamImpl *sourceStream )
+{
+ RunBuf *buf = sourceStream->queue;
+ while ( buf != 0 ) {
+ switch ( buf->type ) {
+ case RunBufDataType:
+ break;
+
+ case RunBufTokenType:
+ case RunBufIgnoreType:
+ case RunBufSourceType:
+ treeDownref( prg, sp, buf->tree );
+ break;
+ }
+
+ RunBuf *next = buf->next;
+ free( buf );
+ buf = next;
+ }
+
+ sourceStream->queue = 0;
+}
+
+/* Keep the position up to date after consuming text. */
+void updatePosition( StreamImpl *is, const char *data, long length )
+{
+ int i;
+ for ( i = 0; i < length; i++ ) {
+ if ( data[i] != '\n' )
+ is->column += 1;
+ else {
+ is->line += 1;
+ is->column = 1;
+ }
+ }
+
+ is->byte += length;
+}
+
+/* Keep the position up to date after sending back text. */
+void undoPosition( StreamImpl *is, const char *data, long length )
+{
+ /* FIXME: this needs to fetch the position information from the parsed
+ * token and restore based on that.. */
+ int i;
+ for ( i = 0; i < length; i++ ) {
+ if ( data[i] == '\n' )
+ is->line -= 1;
+ }
+
+ is->byte -= length;
+}
+
+
+static RunBuf *sourceStreamPopHead( StreamImpl *ss )
+{
+ RunBuf *ret = ss->queue;
+ ss->queue = ss->queue->next;
+ if ( ss->queue == 0 )
+ ss->queueTail = 0;
+ else
+ ss->queue->prev = 0;
+ return ret;
+}
+
+static void sourceStreamAppend( StreamImpl *ss, RunBuf *runBuf )
+{
+ if ( ss->queue == 0 ) {
+ runBuf->prev = runBuf->next = 0;
+ ss->queue = ss->queueTail = runBuf;
+ }
+ else {
+ ss->queueTail->next = runBuf;
+ runBuf->prev = ss->queueTail;
+ runBuf->next = 0;
+ ss->queueTail = runBuf;
+ }
+}
+
+static void sourceStreamPrepend( StreamImpl *ss, RunBuf *runBuf )
+{
+ if ( ss->queue == 0 ) {
+ runBuf->prev = runBuf->next = 0;
+ ss->queue = ss->queueTail = runBuf;
+ }
+ else {
+ ss->queue->prev = runBuf;
+ runBuf->prev = 0;
+ runBuf->next = ss->queue;
+ ss->queue = runBuf;
+ }
+}
+
+/*
+ * Base run-time input streams.
+ */
+
+int fdGetParseBlock( StreamImpl *ss, int skip, char **pdp, int *copied )
+{
+ int ret = 0;
+ *copied = 0;
+
+ /* Move over skip bytes. */
+ RunBuf *buf = ss->queue;
+ while ( true ) {
+ if ( buf == 0 ) {
+ /* Got through the in-mem buffers without copying anything. */
+ RunBuf *runBuf = newRunBuf();
+ sourceStreamAppend( ss, runBuf );
+ int received = ss->funcs->getDataSource( ss, runBuf->data, FSM_BUFSIZE );
+ if ( received == 0 ) {
+ ret = INPUT_EOD;
+ break;
+ }
+ runBuf->length = received;
+
+ int slen = received;
+ *pdp = runBuf->data;
+ *copied = slen;
+ ret = INPUT_DATA;
+ break;
+ }
+
+ int avail = buf->length - buf->offset;
+
+ /* Anything available in the current buffer. */
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ char *src = &buf->data[buf->offset];
+
+ /* Need to skip? */
+ if ( skip > 0 && skip >= avail ) {
+ /* Skipping the the whole source. */
+ skip -= avail;
+ }
+ else {
+ /* Either skip is zero, or less than slen. Skip goes to zero.
+ * Some data left over, copy it. */
+ src += skip;
+ avail -= skip;
+ skip = 0;
+
+ int slen = avail;
+ *pdp = src;
+ *copied += slen;
+ ret = INPUT_DATA;
+ break;
+ }
+ }
+
+ buf = buf->next;
+ }
+
+ return ret;
+}
+
+int fdGetData( StreamImpl *ss, char *dest, int length )
+{
+ int copied = 0;
+
+ /* Move over skip bytes. */
+ RunBuf *buf = ss->queue;
+ while ( true ) {
+ if ( buf == 0 ) {
+ /* Got through the in-mem buffers without copying anything. */
+ RunBuf *runBuf = newRunBuf();
+ sourceStreamAppend( ss, runBuf );
+ int received = ss->funcs->getDataSource( ss, runBuf->data, FSM_BUFSIZE );
+ runBuf->length = received;
+ if ( received == 0 )
+ break;
+
+ buf = runBuf;
+ }
+
+ int avail = buf->length - buf->offset;
+
+ /* Anything available in the current buffer. */
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ char *src = &buf->data[buf->offset];
+
+ int slen = avail < length ? avail : length;
+ memcpy( dest+copied, src, slen ) ;
+ copied += slen;
+ length -= slen;
+ }
+
+ if ( length == 0 ) {
+ //debug( REALM_INPUT, "exiting get data\n", length );
+ break;
+ }
+
+ buf = buf->next;
+ }
+
+ return copied;
+}
+
+int fdConsumeData( StreamImpl *ss, int length, Location *loc )
+{
+ int consumed = 0;
+
+ /* Move over skip bytes. */
+ while ( true ) {
+ RunBuf *buf = ss->queue;
+
+ if ( buf == 0 )
+ break;
+
+ if ( buf->type == RunBufTokenType )
+ break;
+ else if ( buf->type == RunBufIgnoreType )
+ break;
+ else {
+ if ( loc->line == 0 ) {
+ loc->name = ss->name;
+ loc->line = ss->line;
+ loc->column = ss->column;
+ loc->byte = ss->byte;
+ }
+
+ /* Anything available in the current buffer. */
+ int avail = buf->length - buf->offset;
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ int slen = avail <= length ? avail : length;
+ consumed += slen;
+ length -= slen;
+ updatePosition( ss, buf->data + buf->offset, slen );
+ buf->offset += slen;
+ ss->consumed += slen;
+ }
+ }
+
+ if ( length == 0 )
+ break;
+
+ RunBuf *runBuf = sourceStreamPopHead( ss );
+ free( runBuf );
+ }
+
+ return consumed;
+}
+
+int fdUndoConsumeData( StreamImpl *ss, const char *data, int length )
+{
+ RunBuf *newBuf = newRunBuf();
+ newBuf->length = length;
+ memcpy( newBuf->data, data, length );
+ sourceStreamPrepend( ss, newBuf );
+ undoPosition( ss, data, length );
+ ss->consumed -= length;
+
+ return length;
+}
+
+/*
+ * File
+ */
+
+int fileGetDataSource( StreamImpl *ss, char *dest, int length )
+{
+ //debug( REALM_INPUT, "inputStreamFileGetDataSource length = %ld\n", length );
+ size_t res = fread( dest, 1, length, ss->file );
+ return res;
+}
+
+void initFileFuncs()
+{
+ memset( &fileFuncs, 0, sizeof(struct StreamFuncs) );
+}
+
+/*
+ * FD
+ */
+
+int fdGetDataSource( StreamImpl *ss, char *dest, int length )
+{
+ if ( ss->eof )
+ return 0;
+ else {
+ long got = read( ss->fd, dest, length );
+ if ( got == 0 )
+ ss->eof = true;
+ return got;
+ }
+}
+
+/*
+ * StreamImpl struct, this wraps the list of input streams.
+ */
+
+void initStreamImpl( StreamImpl *is, const char *name )
+{
+ memset( is, 0, sizeof(StreamImpl) );
+
+ is->name = name;
+ is->line = 1;
+ is->column = 1;
+ is->byte = 0;
+}
+
+void clearStreamImpl( struct colm_program *prg, Tree **sp, StreamImpl *inputStream )
+{
+ RunBuf *buf = inputStream->queue;
+ while ( buf != 0 ) {
+ switch ( buf->type ) {
+ case RunBufDataType:
+ break;
+
+ case RunBufTokenType:
+ case RunBufIgnoreType:
+ case RunBufSourceType:
+ treeDownref( prg, sp, buf->tree );
+ break;
+ }
+
+ RunBuf *next = buf->next;
+ free( buf );
+ buf = next;
+ }
+
+ inputStream->queue = 0;
+}
+
+static void inputStreamPrepend( StreamImpl *is, RunBuf *runBuf )
+{
+ if ( is->queue == 0 ) {
+ runBuf->prev = runBuf->next = 0;
+ is->queue = is->queueTail = runBuf;
+ }
+ else {
+ is->queue->prev = runBuf;
+ runBuf->prev = 0;
+ runBuf->next = is->queue;
+ is->queue = runBuf;
+ }
+}
+
+static RunBuf *inputStreamPopHead( StreamImpl *is )
+{
+ RunBuf *ret = is->queue;
+ is->queue = is->queue->next;
+ if ( is->queue == 0 )
+ is->queueTail = 0;
+ else
+ is->queue->prev = 0;
+ return ret;
+}
+
+static void inputStreamAppend( StreamImpl *is, RunBuf *runBuf )
+{
+ if ( is->queue == 0 ) {
+ runBuf->prev = runBuf->next = 0;
+ is->queue = is->queueTail = runBuf;
+ }
+ else {
+ is->queueTail->next = runBuf;
+ runBuf->prev = is->queueTail;
+ runBuf->next = 0;
+ is->queueTail = runBuf;
+ }
+}
+
+static RunBuf *inputStreamPopTail( StreamImpl *is )
+{
+ RunBuf *ret = is->queueTail;
+ is->queueTail = is->queueTail->prev;
+ if ( is->queueTail == 0 )
+ is->queue = 0;
+ else
+ is->queueTail->next = 0;
+ return ret;
+}
+
+static int isSourceStream( StreamImpl *is )
+{
+ if ( is->queue != 0 && is->queue->type == RunBufSourceType )
+ return true;
+ return false;
+}
+
+static void _setEof( StreamImpl *is )
+{
+ //debug( REALM_INPUT, "setting EOF in input stream\n" );
+ is->eof = true;
+}
+
+static void _unsetEof( StreamImpl *is )
+{
+ if ( isSourceStream( is ) ) {
+ Stream *stream = (Stream*)is->queue->tree;
+ stream->in->eof = false;
+ }
+ else {
+ is->eof = false;
+ }
+}
+
+static int _getParseBlock( StreamImpl *is, int skip, char **pdp, int *copied )
+{
+ int ret = 0;
+ *copied = 0;
+
+ /* Move over skip bytes. */
+ RunBuf *buf = is->queue;
+ while ( true ) {
+ if ( buf == 0 ) {
+ /* Got through the in-mem buffers without copying anything. */
+ ret = is->eof ? INPUT_EOF : INPUT_EOD;
+ break;
+ }
+
+ if ( buf->type == RunBufSourceType ) {
+ Stream *stream = (Stream*)buf->tree;
+ int type = stream->in->funcs->getParseBlock( stream->in, skip, pdp, copied );
+
+// if ( type == INPUT_EOD && !stream->in->eosSent ) {
+// stream->in->eosSent = 1;
+// ret = INPUT_EOS;
+// continue;
+// }
+
+ if ( type == INPUT_EOD || type == INPUT_EOF ) {
+ //debug( REALM_INPUT, "skipping over input\n" );
+ buf = buf->next;
+ continue;
+ }
+
+ ret = type;
+ break;
+ }
+
+ if ( buf->type == RunBufTokenType ) {
+ ret = INPUT_TREE;
+ break;
+ }
+
+ if ( buf->type == RunBufIgnoreType ) {
+ ret = INPUT_IGNORE;
+ break;
+ }
+
+ int avail = buf->length - buf->offset;
+
+ /* Anything available in the current buffer. */
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ char *src = &buf->data[buf->offset];
+
+ /* Need to skip? */
+ if ( skip > 0 && skip >= avail ) {
+ /* Skipping the the whole source. */
+ skip -= avail;
+ }
+ else {
+ /* Either skip is zero, or less than slen. Skip goes to zero.
+ * Some data left over, copy it. */
+ src += skip;
+ avail -= skip;
+ skip = 0;
+
+ *pdp = src;
+ *copied += avail;
+ ret = INPUT_DATA;
+ break;
+ }
+ }
+
+ buf = buf->next;
+ }
+
+#if DEBUG
+ switch ( ret ) {
+ case INPUT_DATA:
+ //debug( REALM_INPUT, "get parse block: DATA: %d\n", *copied );
+ break;
+ case INPUT_EOD:
+ //debug( REALM_INPUT, "get parse block: EOD\n" );
+ break;
+ case INPUT_EOF:
+ //debug( REALM_INPUT, "get parse block: EOF\n" );
+ break;
+ case INPUT_TREE:
+ //debug( REALM_INPUT, "get parse block: TREE\n" );
+ break;
+ case INPUT_IGNORE:
+ //debug( REALM_INPUT, "get parse block: IGNORE\n" );
+ break;
+ case INPUT_LANG_EL:
+ //debug( REALM_INPUT, "get parse block: LANG_EL\n" );
+ break;
+ }
+#endif
+
+ return ret;
+}
+
+static int _getData( StreamImpl *is, char *dest, int length )
+{
+ int copied = 0;
+
+ /* Move over skip bytes. */
+ RunBuf *buf = is->queue;
+ while ( true ) {
+ if ( buf == 0 ) {
+ /* Got through the in-mem buffers without copying anything. */
+ break;
+ }
+
+ if ( buf->type == RunBufSourceType ) {
+ Stream *stream = (Stream*)buf->tree;
+ int glen = stream->in->funcs->getData( stream->in, dest+copied, length );
+
+ if ( glen == 0 ) {
+ //debug( REALM_INPUT, "skipping over input\n" );
+ buf = buf->next;
+ continue;
+ }
+
+ copied += glen;
+ length -= glen;
+ }
+ else if ( buf->type == RunBufTokenType )
+ break;
+ else if ( buf->type == RunBufIgnoreType )
+ break;
+ else {
+ int avail = buf->length - buf->offset;
+
+ /* Anything available in the current buffer. */
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ char *src = &buf->data[buf->offset];
+
+ int slen = avail <= length ? avail : length;
+ memcpy( dest+copied, src, slen ) ;
+
+ copied += slen;
+ length -= slen;
+ }
+ }
+
+ if ( length == 0 ) {
+ //debug( REALM_INPUT, "exiting get data\n", length );
+ break;
+ }
+
+ buf = buf->next;
+ }
+
+ return copied;
+}
+
+static int _consumeData( StreamImpl *is, int length, Location *loc )
+{
+ //debug( REALM_INPUT, "consuming %d bytes\n", length );
+
+ int consumed = 0;
+
+ /* Move over skip bytes. */
+ while ( true ) {
+ RunBuf *buf = is->queue;
+
+ if ( buf == 0 )
+ break;
+
+ if ( buf->type == RunBufSourceType ) {
+ Stream *stream = (Stream*)buf->tree;
+ int slen = stream->in->funcs->consumeData( stream->in, length, loc );
+ //debug( REALM_INPUT, " got %d bytes from source\n", slen );
+
+ consumed += slen;
+ length -= slen;
+ }
+ else if ( buf->type == RunBufTokenType )
+ break;
+ else if ( buf->type == RunBufIgnoreType )
+ break;
+ else {
+ /* Anything available in the current buffer. */
+ int avail = buf->length - buf->offset;
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ int slen = avail <= length ? avail : length;
+ consumed += slen;
+ length -= slen;
+ buf->offset += slen;
+ is->consumed += slen;
+ }
+ }
+
+ if ( length == 0 ) {
+ //debug( REALM_INPUT, "exiting consume\n", length );
+ break;
+ }
+
+ RunBuf *runBuf = inputStreamPopHead( is );
+ free( runBuf );
+ }
+
+ return consumed;
+}
+
+static int _undoConsumeData( StreamImpl *is, const char *data, int length )
+{
+ //debug( REALM_INPUT, "undoing consume of %ld bytes\n", length );
+
+ if ( is->consumed == 0 && isSourceStream( is ) ) {
+ Stream *stream = (Stream*)is->queue->tree;
+ int len = stream->in->funcs->undoConsumeData( stream->in, data, length );
+ return len;
+ }
+ else {
+ RunBuf *newBuf = newRunBuf();
+ newBuf->length = length;
+ memcpy( newBuf->data, data, length );
+ inputStreamPrepend( is, newBuf );
+ is->consumed -= length;
+
+ return length;
+ }
+}
+
+static Tree *_consumeTree( StreamImpl *is )
+{
+ while ( is->queue != 0 && is->queue->type == RunBufDataType && is->queue->offset == is->queue->length ) {
+ RunBuf *runBuf = inputStreamPopHead( is );
+ free( runBuf );
+ }
+
+ if ( is->queue != 0 && (is->queue->type == RunBufTokenType || is->queue->type == RunBufIgnoreType) ) {
+ RunBuf *runBuf = inputStreamPopHead( is );
+
+ /* FIXME: using runbufs here for this is a poor use of memory. */
+ Tree *tree = runBuf->tree;
+ free(runBuf);
+ return tree;
+ }
+
+ return 0;
+}
+
+static void _undoConsumeTree( StreamImpl *is, Tree *tree, int ignore )
+{
+ /* Create a new buffer for the data. This is the easy implementation.
+ * Something better is needed here. It puts a max on the amount of
+ * data that can be pushed back to the inputStream. */
+ RunBuf *newBuf = newRunBuf();
+ newBuf->type = ignore ? RunBufIgnoreType : RunBufTokenType;
+ newBuf->tree = tree;
+ inputStreamPrepend( is, newBuf );
+}
+
+static struct LangEl *_consumeLangEl( StreamImpl *is, long *bindId, char **data, long *length )
+{
+ if ( isSourceStream( is ) ) {
+ Stream *stream = (Stream*)is->queue->tree;
+ return stream->in->funcs->consumeLangEl( stream->in, bindId, data, length );
+ }
+ else {
+ assert( false );
+ }
+}
+
+static void _undoConsumeLangEl( StreamImpl *is )
+{
+ if ( isSourceStream( is ) ) {
+ Stream *stream = (Stream*)is->queue->tree;
+ return stream->in->funcs->undoConsumeLangEl( stream->in );
+ }
+ else {
+ assert( false );
+ }
+}
+
+static void _prependData( StreamImpl *is, const char *data, long length )
+{
+ if ( isSourceStream( is ) && ((Stream*)is->queue->tree)->in->funcs == &streamFuncs ) {
+ Stream *stream = (Stream*)is->queue->tree;
+
+ _prependData( stream->in, data, length );
+ }
+ else {
+ /* Create a new buffer for the data. This is the easy implementation.
+ * Something better is needed here. It puts a max on the amount of
+ * data that can be pushed back to the inputStream. */
+ assert( length < FSM_BUFSIZE );
+
+ RunBuf *newBuf = newRunBuf();
+ newBuf->length = length;
+ memcpy( newBuf->data, data, length );
+
+ inputStreamPrepend( is, newBuf );
+ }
+}
+
+static void _prependTree( StreamImpl *is, Tree *tree, int ignore )
+{
+ /* Create a new buffer for the data. This is the easy implementation.
+ * Something better is needed here. It puts a max on the amount of
+ * data that can be pushed back to the inputStream. */
+ RunBuf *newBuf = newRunBuf();
+ newBuf->type = ignore ? RunBufIgnoreType : RunBufTokenType;
+ newBuf->tree = tree;
+ inputStreamPrepend( is, newBuf );
+}
+
+static void _prependStream( StreamImpl *in, struct colm_tree *tree )
+{
+ /* Create a new buffer for the data. This is the easy implementation.
+ * Something better is needed here. It puts a max on the amount of
+ * data that can be pushed back to the inputStream. */
+ RunBuf *newBuf = newRunBuf();
+ newBuf->type = RunBufSourceType;
+ newBuf->tree = tree;
+ inputStreamPrepend( in, newBuf );
+}
+
+static int _undoPrependData( StreamImpl *is, int length )
+{
+ //debug( REALM_INPUT, "consuming %d bytes\n", length );
+
+ int consumed = 0;
+
+ /* Move over skip bytes. */
+ while ( true ) {
+ RunBuf *buf = is->queue;
+
+ if ( buf == 0 )
+ break;
+
+ if ( buf->type == RunBufSourceType ) {
+ Stream *stream = (Stream*)buf->tree;
+ int slen = stream->in->funcs->undoPrependData( stream->in, length );
+
+ consumed += slen;
+ length -= slen;
+ }
+ else if ( buf->type == RunBufTokenType )
+ break;
+ else if ( buf->type == RunBufIgnoreType )
+ break;
+ else {
+ /* Anything available in the current buffer. */
+ int avail = buf->length - buf->offset;
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ int slen = avail <= length ? avail : length;
+ consumed += slen;
+ length -= slen;
+ buf->offset += slen;
+ }
+ }
+
+ if ( length == 0 )
+ break;
+
+ RunBuf *runBuf = inputStreamPopHead( is );
+ free( runBuf );
+ }
+
+ return consumed;
+}
+
+static Tree *_undoPrependTree( StreamImpl *is )
+{
+ while ( is->queue != 0 && is->queue->type == RunBufDataType && is->queue->offset == is->queue->length ) {
+ RunBuf *runBuf = inputStreamPopHead( is );
+ free( runBuf );
+ }
+
+ if ( is->queue != 0 && (is->queue->type == RunBufTokenType || is->queue->type == RunBufIgnoreType) ) {
+ RunBuf *runBuf = inputStreamPopHead( is );
+
+ /* FIXME: using runbufs here for this is a poor use of memory. */
+ Tree *tree = runBuf->tree;
+ free(runBuf);
+ return tree;
+ }
+
+ return 0;
+}
+
+static void _appendData( StreamImpl *is, const char *data, long len )
+{
+ while ( len > 0 ) {
+ RunBuf *ad = newRunBuf();
+ inputStreamAppend( is, ad );
+
+ long consume =
+ len <= (long)sizeof(ad->data) ?
+ len : (long)sizeof(ad->data);
+
+ memcpy( ad->data, data, consume );
+ ad->length = consume;
+
+ len -= consume;
+ data += consume;
+ }
+}
+
+static Tree *_undoAppendData( StreamImpl *is, int length )
+{
+ int consumed = 0;
+
+ /* Move over skip bytes. */
+ while ( true ) {
+ RunBuf *buf = is->queueTail;
+
+ if ( buf == 0 )
+ break;
+
+ if ( buf->type == RunBufTokenType )
+ break;
+ else if ( buf->type == RunBufIgnoreType )
+ break;
+ else {
+ /* Anything available in the current buffer. */
+ int avail = buf->length - buf->offset;
+ if ( avail > 0 ) {
+ /* The source data from the current buffer. */
+ int slen = avail <= length ? avail : length;
+ consumed += slen;
+ length -= slen;
+ buf->length -= slen;
+ }
+ }
+
+ if ( length == 0 )
+ break;
+
+ RunBuf *runBuf = inputStreamPopTail( is );
+ free( runBuf );
+ }
+
+ return 0;
+}
+
+static void _appendTree( StreamImpl *is, Tree *tree )
+{
+ RunBuf *ad = newRunBuf();
+
+ inputStreamAppend( is, ad );
+
+ ad->type = RunBufTokenType;
+ ad->tree = tree;
+ ad->length = 0;
+}
+
+static void _appendStream( StreamImpl *in, struct colm_tree *tree )
+{
+ RunBuf *ad = newRunBuf();
+
+ inputStreamAppend( in, ad );
+
+ ad->type = RunBufSourceType;
+ ad->tree = tree;
+ ad->length = 0;
+}
+
+static Tree *_undoAppendTree( StreamImpl *is )
+{
+ RunBuf *runBuf = inputStreamPopTail( is );
+ Tree *tree = runBuf->tree;
+ free( runBuf );
+ return tree;
+}
+
+static Tree *_undoAppendStream( StreamImpl *is )
+{
+ RunBuf *runBuf = inputStreamPopTail( is );
+ Tree *tree = runBuf->tree;
+ free( runBuf );
+ return tree;
+}
+
+struct StreamFuncs streamFuncs =
+{
+ &_getParseBlock,
+ &_getData,
+ &_consumeData,
+ &_undoConsumeData,
+ &_consumeTree,
+ &_undoConsumeTree,
+ &_consumeLangEl,
+ &_undoConsumeLangEl,
+ 0, // source data get, not needed.
+ &_setEof,
+ &_unsetEof,
+ &_prependData,
+ &_prependTree,
+ &_prependStream,
+ &_undoPrependData,
+ &_undoPrependTree,
+ 0, // FIXME: Add this.
+ &_appendData,
+ &_appendTree,
+ &_appendStream,
+ &_undoAppendData,
+ &_undoAppendTree,
+ &_undoAppendStream,
+};
+
+struct StreamFuncs fdFuncs =
+{
+ .getData = &fdGetData,
+ .getParseBlock = &fdGetParseBlock,
+ .consumeData = &fdConsumeData,
+ .undoConsumeData = &fdUndoConsumeData,
+ .getDataSource = &fdGetDataSource,
+};
+
+struct StreamFuncs fileFuncs =
+{
+ .getData = &fdGetData,
+ .getParseBlock = &fdGetParseBlock,
+ .consumeData = &fdConsumeData,
+ .undoConsumeData = &fdUndoConsumeData,
+ .getDataSource = &fileGetDataSource,
+};
+
+
+StreamImpl *newSourceStreamFile( const char *name, FILE *file )
+{
+ StreamImpl *ss = (StreamImpl*)malloc(sizeof(StreamImpl));
+ initStreamImpl( ss, name );
+ ss->funcs = &fileFuncs;
+
+ ss->file = file;
+
+ return ss;
+}
+
+StreamImpl *newSourceStreamFd( const char *name, long fd )
+{
+ StreamImpl *ss = (StreamImpl*)malloc(sizeof(StreamImpl));
+ initStreamImpl( ss, name );
+ ss->funcs = &fdFuncs;
+
+ ss->fd = fd;
+
+ return ss;
+}
+
+StreamImpl *newSourceStreamGeneric( const char *name )
+{
+ StreamImpl *ss = (StreamImpl*)malloc(sizeof(StreamImpl));
+ initStreamImpl( ss, name );
+ ss->funcs = &streamFuncs;
+
+ return ss;
+}
diff --git a/src/input.h b/src/input.h
new file mode 100644
index 0000000..1605ebc
--- /dev/null
+++ b/src/input.h
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _INPUT_H
+#define _INPUT_H
+
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define FSM_BUFSIZE 8192
+//#define FSM_BUFSIZE 8
+
+#define INPUT_DATA 1
+/* This is for data sources to return, not for the wrapper. */
+#define INPUT_EOD 2
+#define INPUT_EOF 3
+#define INPUT_EOS 4
+#define INPUT_LANG_EL 5
+#define INPUT_TREE 6
+#define INPUT_IGNORE 7
+
+/*
+ * pdaRun <- fsmRun <- stream
+ *
+ * Activities we need to support:
+ *
+ * 1. Stuff data into an input stream each time we <<
+ * 2. Detach an input stream, and attach another when we include
+ * 3. Send data back to an input stream when the parser backtracks
+ * 4. Temporarily stop parsing due to a lack of input.
+ *
+ * At any given time, the fsmRun struct may have a prefix of the stream's
+ * input. If getting data we first get what we can out of the fsmRun, then
+ * consult the stream. If sending data back, we first shift pointers in the
+ * fsmRun, then ship to the stream. If changing streams the old stream needs to
+ * take back unprocessed data from the fsmRun.
+ */
+
+struct LangEl;
+struct Pattern;
+struct PatternItem;
+struct Constructor;
+struct ConsItem;
+struct _FsmRun;
+struct colm_tree;
+struct colm_location;
+struct colm_program;
+
+enum RunBufType {
+ RunBufDataType = 0,
+ RunBufTokenType,
+ RunBufIgnoreType,
+ RunBufSourceType
+};
+
+typedef struct _RunBuf
+{
+ enum RunBufType type;
+ char data[FSM_BUFSIZE];
+ long length;
+ struct colm_tree *tree;
+ long offset;
+ struct _RunBuf *next, *prev;
+} RunBuf;
+
+RunBuf *newRunBuf();
+
+typedef struct _StreamImpl StreamImpl;
+
+struct StreamFuncs
+{
+ int (*getParseBlock)( StreamImpl *ss, int skip, char **pdp, int *copied );
+
+ int (*getData)( StreamImpl *ss, char *dest, int length );
+
+ int (*consumeData)( StreamImpl *ss, int length, struct colm_location *loc );
+ int (*undoConsumeData)( StreamImpl *ss, const char *data, int length );
+
+ struct colm_tree *(*consumeTree)( StreamImpl *ss );
+ void (*undoConsumeTree)( StreamImpl *ss, struct colm_tree *tree, int ignore );
+
+ /* Language elments (compile-time). */
+ struct LangEl *(*consumeLangEl)( StreamImpl *ss, long *bindId, char **data, long *length );
+ void (*undoConsumeLangEl)( StreamImpl *ss );
+
+ /* Private implmentation for some shared get data functions. */
+ int (*getDataSource)( StreamImpl *ss, char *dest, int length );
+
+ void (*setEof)( StreamImpl *is );
+ void (*unsetEof)( StreamImpl *is );
+
+ /* Prepending to a stream. */
+ void (*prependData)( StreamImpl *in, const char *data, long len );
+ void (*prependTree)( StreamImpl *is, struct colm_tree *tree, int ignore );
+ void (*prependStream)( StreamImpl *in, struct colm_tree *tree );
+ int (*undoPrependData)( StreamImpl *is, int length );
+ struct colm_tree *(*undoPrependTree)( StreamImpl *is );
+ struct colm_tree *(*undoPrependStream)( StreamImpl *in );
+
+ /* Appending to a stream. */
+ void (*appendData)( StreamImpl *in, const char *data, long len );
+ void (*appendTree)( StreamImpl *in, struct colm_tree *tree );
+ void (*appendStream)( StreamImpl *in, struct colm_tree *tree );
+ struct colm_tree *(*undoAppendData)( StreamImpl *in, int length );
+ struct colm_tree *(*undoAppendTree)( StreamImpl *in );
+ struct colm_tree *(*undoAppendStream)( StreamImpl *in );
+};
+
+/* List of source streams. Enables streams to be pushed/popped. */
+struct _StreamImpl
+{
+ struct StreamFuncs *funcs;
+
+ char eofSent;
+ char eof;
+ char eosSent;
+
+ RunBuf *queue;
+ RunBuf *queueTail;
+
+ const char *data;
+ long dlen;
+ int offset;
+
+ long line;
+ long column;
+ long byte;
+
+ const char *name;
+ FILE *file;
+ long fd;
+
+ struct Pattern *pattern;
+ struct PatternItem *patItem;
+ struct Constructor *constructor;
+ struct ConsItem *consItem;
+
+ int consumed;
+};
+
+StreamImpl *newSourceStreamPat( const char *name, struct Pattern *pattern );
+StreamImpl *newSourceStreamCons( const char *name, struct Constructor *constructor );
+StreamImpl *newSourceStreamFile( const char *name, FILE *file );
+StreamImpl *newSourceStreamFd( const char *name, long fd );
+StreamImpl *newSourceStreamGeneric( const char *name );
+
+void updatePosition( StreamImpl *inputStream, const char *data, long length );
+void undoPosition( StreamImpl *inputStream, const char *data, long length );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _INPUT_H */
diff --git a/src/iter.c b/src/iter.c
new file mode 100644
index 0000000..9e60a2d
--- /dev/null
+++ b/src/iter.c
@@ -0,0 +1,490 @@
+/*
+ * Copyright 2007-2014 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <colm/tree.h>
+#include <colm/bytecode.h>
+#include <colm/program.h>
+#include <assert.h>
+
+#define true 1
+#define false 0
+
+void initTreeIter( TreeIter *treeIter, Tree **stackRoot, long rootSize,
+ const Ref *rootRef, int searchId )
+{
+ treeIter->type = IT_Tree;
+ treeIter->rootRef = *rootRef;
+ treeIter->searchId = searchId;
+ treeIter->stackRoot = stackRoot;
+ treeIter->yieldSize = 0;
+ treeIter->rootSize = rootSize;
+ treeIter->ref.kid = 0;
+ treeIter->ref.next = 0;
+}
+
+void initRevTreeIter( RevTreeIter *revTriter, Tree **stackRoot, long rootSize,
+ const Ref *rootRef, int searchId, int children )
+{
+ revTriter->type = IT_RevTree;
+ revTriter->rootRef = *rootRef;
+ revTriter->searchId = searchId;
+ revTriter->stackRoot = stackRoot;
+ revTriter->yieldSize = children;
+ revTriter->rootSize = rootSize;
+ revTriter->kidAtYield = 0;
+ revTriter->children = children;
+ revTriter->ref.kid = 0;
+ revTriter->ref.next = 0;
+}
+
+void initUserIter( UserIter *userIter, Tree **stackRoot, long rootSize,
+ long argSize, long searchId )
+{
+ userIter->type = IT_User;
+ userIter->stackRoot = stackRoot;
+ userIter->argSize = argSize;
+ userIter->yieldSize = 0;
+ userIter->rootSize = rootSize;
+ userIter->resume = 0;
+ userIter->frame = 0;
+ userIter->searchId = searchId;
+
+ userIter->ref.kid = 0;
+ userIter->ref.next = 0;
+}
+
+
+UserIter *uiterCreate( Program *prg, Tree ***psp, FunctionInfo *fi, long searchId )
+{
+ Tree **sp = *psp;
+
+ vm_pushn( sizeof(UserIter) / sizeof(Word) );
+ void *mem = vm_ptop();
+ UserIter *uiter = mem;
+
+ Tree **stackRoot = vm_ptop();
+ long rootSize = vm_ssize();
+
+ initUserIter( uiter, stackRoot, rootSize, fi->argSize, searchId );
+
+ *psp = sp;
+ return uiter;
+}
+
+void uiterInit( Program *prg, Tree **sp, UserIter *uiter,
+ FunctionInfo *fi, int revertOn )
+{
+ /* Set up the first yeild so when we resume it starts at the beginning. */
+ uiter->ref.kid = 0;
+ uiter->yieldSize = vm_ssize() - uiter->rootSize;
+ uiter->frame = &uiter->stackRoot[-IFR_AA];
+
+ if ( revertOn )
+ uiter->resume = prg->rtd->frameInfo[fi->frameId].codeWV;
+ else
+ uiter->resume = prg->rtd->frameInfo[fi->frameId].codeWC;
+}
+
+
+void treeIterDestroy( Program *prg, Tree ***psp, TreeIter *iter )
+{
+ if ( (int)iter->type != 0 ) {
+ Tree **sp = *psp;
+ long curStackSize = vm_ssize() - iter->rootSize;
+ assert( iter->yieldSize == curStackSize );
+ vm_popn( iter->yieldSize );
+ iter->type = 0;
+ *psp = sp;
+ }
+}
+
+void revTreeIterDestroy( struct colm_program *prg, Tree ***psp, RevTreeIter *riter )
+{
+ if ( (int)riter->type != 0 ) {
+ Tree **sp = *psp;
+ long curStackSize = vm_ssize() - riter->rootSize;
+ assert( riter->yieldSize == curStackSize );
+ vm_popn( riter->yieldSize );
+ riter->type = 0;
+ *psp = sp;
+ }
+}
+
+void userIterDestroy( Program *prg, Tree ***psp, UserIter *uiter )
+{
+ if ( uiter != 0 && (int)uiter->type != 0 ) {
+ Tree **sp = *psp;
+
+ /* We should always be coming from a yield. The current stack size will be
+ * nonzero and the stack size in the iterator will be correct. */
+ long curStackSize = vm_ssize() - uiter->rootSize;
+ assert( uiter->yieldSize == curStackSize );
+
+ long argSize = uiter->argSize;
+
+ vm_popn( uiter->yieldSize );
+ vm_popn( sizeof(UserIter) / sizeof(Word) );
+ vm_popn( argSize );
+
+ uiter->type = 0;
+
+ *psp = sp;
+ }
+}
+
+void userIterDestroy2( Program *prg, Tree ***psp, UserIter *uiter )
+{
+ if ( uiter != 0 && (int)uiter->type != 0 ) {
+ Tree **sp = *psp;
+
+ /* We should always be coming from a yield. The current stack size will be
+ * nonzero and the stack size in the iterator will be correct. */
+ long curStackSize = vm_ssize() - uiter->rootSize;
+ assert( uiter->yieldSize == curStackSize );
+
+ long argSize = uiter->argSize;
+
+ vm_popn( uiter->yieldSize );
+ vm_popn( sizeof(UserIter) / sizeof(Word) );
+ vm_popn( argSize );
+ vm_pop();
+
+ uiter->type = 0;
+
+ *psp = sp;
+ }
+}
+
+Tree *treeIterDerefCur( TreeIter *iter )
+{
+ return iter->ref.kid == 0 ? 0 : iter->ref.kid->tree;
+}
+
+void setTriterCur( Program *prg, TreeIter *iter, Tree *tree )
+{
+ iter->ref.kid->tree = tree;
+}
+
+void setUiterCur( Program *prg, UserIter *uiter, Tree *tree )
+{
+ uiter->ref.kid->tree = tree;
+}
+
+void splitIterCur( Program *prg, Tree ***psp, TreeIter *iter )
+{
+ if ( iter->ref.kid == 0 )
+ return;
+
+ splitRef( prg, psp, &iter->ref );
+}
+
+void iterFind( Program *prg, Tree ***psp, TreeIter *iter, int tryFirst )
+{
+ int anyTree = iter->searchId == prg->rtd->anyId;
+ Tree **top = iter->stackRoot;
+ Kid *child;
+ Tree **sp = *psp;
+
+rec_call:
+ if ( tryFirst && ( iter->ref.kid->tree->id == iter->searchId || anyTree ) ) {
+ *psp = sp;
+ return;
+ }
+ else {
+ child = treeChild( prg, iter->ref.kid->tree );
+ if ( child != 0 ) {
+ vm_contiguous( 2 );
+ vm_push( (SW) iter->ref.next );
+ vm_push( (SW) iter->ref.kid );
+ iter->ref.kid = child;
+ iter->ref.next = (Ref*)vm_ptop();
+ while ( iter->ref.kid != 0 ) {
+ tryFirst = true;
+ goto rec_call;
+ rec_return:
+ iter->ref.kid = iter->ref.kid->next;
+ }
+ iter->ref.kid = (Kid*)vm_pop();
+ iter->ref.next = (Ref*)vm_pop();
+ }
+ }
+
+ if ( top != vm_ptop() )
+ goto rec_return;
+
+ iter->ref.kid = 0;
+ *psp = sp;
+}
+
+Tree *treeIterAdvance( Program *prg, Tree ***psp, TreeIter *iter )
+{
+ Tree **sp = *psp;
+ assert( iter->yieldSize == (vm_ssize() - iter->rootSize) );
+
+ if ( iter->ref.kid == 0 ) {
+ /* Kid is zero, start from the root. */
+ iter->ref = iter->rootRef;
+ iterFind( prg, psp, iter, true );
+ }
+ else {
+ /* Have a previous item, continue searching from there. */
+ iterFind( prg, psp, iter, false );
+ }
+
+ sp = *psp;
+ iter->yieldSize = vm_ssize() - iter->rootSize;
+
+ return (iter->ref.kid ? prg->trueVal : prg->falseVal );
+}
+
+Tree *treeIterNextChild( Program *prg, Tree ***psp, TreeIter *iter )
+{
+ Tree **sp = *psp;
+ assert( iter->yieldSize == (vm_ssize() - iter->rootSize) );
+ Kid *kid = 0;
+
+ if ( iter->ref.kid == 0 ) {
+ /* Kid is zero, start from the first child. */
+ Kid *child = treeChild( prg, iter->rootRef.kid->tree );
+
+ if ( child == 0 )
+ iter->ref.next = 0;
+ else {
+ /* Make a reference to the root. */
+ vm_contiguous( 2 );
+ vm_push( (SW) iter->rootRef.next );
+ vm_push( (SW) iter->rootRef.kid );
+ iter->ref.next = (Ref*)vm_ptop();
+
+ kid = child;
+ }
+ }
+ else {
+ /* Start at next. */
+ kid = iter->ref.kid->next;
+ }
+
+ if ( iter->searchId != prg->rtd->anyId ) {
+ /* Have a previous item, go to the next sibling. */
+ while ( kid != 0 && kid->tree->id != iter->searchId )
+ kid = kid->next;
+ }
+
+ iter->ref.kid = kid;
+ iter->yieldSize = vm_ssize() - iter->rootSize;
+ *psp = sp;
+ return ( iter->ref.kid ? prg->trueVal : prg->falseVal );
+}
+
+Tree *treeRevIterPrevChild( Program *prg, Tree ***psp, RevTreeIter *iter )
+{
+ Tree **sp = *psp;
+ assert( iter->yieldSize == ( vm_ssize() - iter->rootSize ) );
+
+ if ( iter->kidAtYield != iter->ref.kid ) {
+ /* Need to reload the kids. */
+ vm_popn( iter->children );
+
+ int c;
+ Kid *kid = treeChild( prg, iter->rootRef.kid->tree );
+ for ( c = 0; c < iter->children; c++ ) {
+ vm_push( (SW)kid );
+ kid = kid->next;
+ }
+ }
+
+ if ( iter->ref.kid != 0 ) {
+ vm_pop_ignore();
+ iter->children -= 1;
+ }
+
+ if ( iter->searchId != prg->rtd->anyId ) {
+ /* Have a previous item, go to the next sibling. */
+ while ( iter->children > 0 && ((Kid*)(vm_top()))->tree->id != iter->searchId ) {
+ iter->children -= 1;
+ vm_pop_ignore();
+ }
+ }
+
+ if ( iter->children == 0 ) {
+ iter->ref.next = 0;
+ iter->ref.kid = 0;
+ }
+ else {
+ iter->ref.next = &iter->rootRef;
+ iter->ref.kid = (Kid*)vm_top();
+ }
+
+ /* We will use this to detect a split above the iterated tree. */
+ iter->kidAtYield = iter->ref.kid;
+
+ iter->yieldSize = vm_ssize() - iter->rootSize;
+
+ *psp = sp;
+
+ return (iter->ref.kid ? prg->trueVal : prg->falseVal );
+}
+
+void iterFindRepeat( Program *prg, Tree ***psp, TreeIter *iter, int tryFirst )
+{
+ Tree **sp = *psp;
+ int anyTree = iter->searchId == prg->rtd->anyId;
+ Tree **top = iter->stackRoot;
+ Kid *child;
+
+rec_call:
+ if ( tryFirst && ( iter->ref.kid->tree->id == iter->searchId || anyTree ) ) {
+ *psp = sp;
+ return;
+ }
+ else {
+ /* The repeat iterator is just like the normal top-down-left-right,
+ * execept it only goes into the children of a node if the node is the
+ * root of the iteration, or if does not have any neighbours to the
+ * right. */
+ if ( top == vm_ptop() || iter->ref.kid->next == 0 ) {
+ child = treeChild( prg, iter->ref.kid->tree );
+ if ( child != 0 ) {
+ vm_contiguous( 2 );
+ vm_push( (SW) iter->ref.next );
+ vm_push( (SW) iter->ref.kid );
+ iter->ref.kid = child;
+ iter->ref.next = (Ref*)vm_ptop();
+ while ( iter->ref.kid != 0 ) {
+ tryFirst = true;
+ goto rec_call;
+ rec_return:
+ iter->ref.kid = iter->ref.kid->next;
+ }
+ iter->ref.kid = (Kid*)vm_pop();
+ iter->ref.next = (Ref*)vm_pop();
+ }
+ }
+ }
+
+ if ( top != vm_ptop() )
+ goto rec_return;
+
+ iter->ref.kid = 0;
+ *psp = sp;
+}
+
+Tree *treeIterNextRepeat( Program *prg, Tree ***psp, TreeIter *iter )
+{
+ Tree **sp = *psp;
+ assert( iter->yieldSize == ( vm_ssize() - iter->rootSize ) );
+
+ if ( iter->ref.kid == 0 ) {
+ /* Kid is zero, start from the root. */
+ iter->ref = iter->rootRef;
+ iterFindRepeat( prg, psp, iter, true );
+ }
+ else {
+ /* Have a previous item, continue searching from there. */
+ iterFindRepeat( prg, psp, iter, false );
+ }
+
+ sp = *psp;
+ iter->yieldSize = vm_ssize() - iter->rootSize;
+
+ return (iter->ref.kid ? prg->trueVal : prg->falseVal );
+}
+
+void iterFindRevRepeat( Program *prg, Tree ***psp, TreeIter *iter, int tryFirst )
+{
+ Tree **sp = *psp;
+ int anyTree = iter->searchId == prg->rtd->anyId;
+ Tree **top = iter->stackRoot;
+ Kid *child;
+
+ if ( tryFirst ) {
+ while ( true ) {
+ if ( top == vm_ptop() || iter->ref.kid->next == 0 ) {
+ child = treeChild( prg, iter->ref.kid->tree );
+
+ if ( child == 0 )
+ break;
+ vm_contiguous( 2 );
+ vm_push( (SW) iter->ref.next );
+ vm_push( (SW) iter->ref.kid );
+ iter->ref.kid = child;
+ iter->ref.next = (Ref*)vm_ptop();
+ }
+ else {
+ /* Not the top and not there is a next, go over to it. */
+ iter->ref.kid = iter->ref.kid->next;
+ }
+ }
+
+ goto first;
+ }
+
+ while ( true ) {
+ if ( top == vm_ptop() ) {
+ iter->ref.kid = 0;
+ return;
+ }
+
+ if ( iter->ref.kid->next == 0 ) {
+ /* Go up one and then down. Remember we can't use iter->ref.next
+ * because the chain may have been split, setting it null (to
+ * prevent repeated walks up). */
+ Ref *ref = (Ref*)vm_ptop();
+ iter->ref.kid = treeChild( prg, ref->kid->tree );
+ }
+ else {
+ iter->ref.kid = (Kid*)vm_pop();
+ iter->ref.next = (Ref*)vm_pop();
+ }
+first:
+ if ( iter->ref.kid->tree->id == iter->searchId || anyTree ) {
+ *psp = sp;
+ return;
+ }
+ }
+ *psp = sp;
+ return;
+}
+
+
+Tree *treeIterPrevRepeat( Program *prg, Tree ***psp, TreeIter *iter )
+{
+ Tree **sp = *psp;
+ assert( iter->yieldSize == (vm_ssize() - iter->rootSize) );
+
+ if ( iter->ref.kid == 0 ) {
+ /* Kid is zero, start from the root. */
+ iter->ref = iter->rootRef;
+ iterFindRevRepeat( prg, psp, iter, true );
+ }
+ else {
+ /* Have a previous item, continue searching from there. */
+ iterFindRevRepeat( prg, psp, iter, false );
+ }
+
+ sp = *psp;
+ iter->yieldSize = vm_ssize() - iter->rootSize;
+
+ return (iter->ref.kid ? prg->trueVal : prg->falseVal );
+}
+
+
+
diff --git a/src/keyops.h b/src/keyops.h
new file mode 100644
index 0000000..a79881e
--- /dev/null
+++ b/src/keyops.h
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2001-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _KEYOPS_H
+#define _KEYOPS_H
+
+#include <fstream>
+#include <climits>
+
+enum MarkType
+{
+ MarkNone = 0,
+ MarkMark
+};
+
+typedef unsigned long long Size;
+
+struct Key
+{
+private:
+ long key;
+
+public:
+ friend inline Key operator+(const Key key1, const Key key2);
+ friend inline Key operator-(const Key key1, const Key key2);
+
+ friend inline bool operator<( const Key key1, const Key key2 );
+ friend inline bool operator<=( const Key key1, const Key key2 );
+ friend inline bool operator>( const Key key1, const Key key2 );
+ friend inline bool operator>=( const Key key1, const Key key2 );
+ friend inline bool operator==( const Key key1, const Key key2 );
+ friend inline bool operator!=( const Key key1, const Key key2 );
+
+ friend struct KeyOps;
+
+ Key( ) {}
+ Key( const Key &key ) : key(key.key) {}
+ Key( long key ) : key(key) {}
+
+ /* Returns the value used to represent the key. This value must be
+ * interpreted based on signedness. */
+ long getVal() const { return key; };
+
+ /* Returns the key casted to a long long. This form of the key does not
+ * require and signedness interpretation. */
+ long long getLongLong() const;
+
+ bool isUpper() const { return ( 'A' <= key && key <= 'Z' ); }
+ bool isLower() const { return ( 'a' <= key && key <= 'z' ); }
+ bool isPrintable() const { return ( 32 <= key && key < 127 ); }
+
+ Key toUpper() const
+ { return Key( 'A' + ( key - 'a' ) ); }
+ Key toLower() const
+ { return Key( 'a' + ( key - 'A' ) ); }
+
+ void operator+=( const Key other )
+ { key += other.key; }
+
+ void operator-=( const Key other )
+ { key -= other.key; }
+
+ void operator|=( const Key other )
+ { key |= other.key; }
+
+ /* Decrement. Needed only for ranges. */
+ inline void decrement();
+ inline void increment();
+};
+
+struct HostType
+{
+ const char *data1;
+ const char *data2;
+ long long minVal;
+ long long maxVal;
+ unsigned int size;
+};
+
+struct HostLang
+{
+ HostType *hostTypes;
+ int numHostTypes;
+ HostType *defaultAlphType;
+ bool explicitUnsigned;
+};
+
+extern HostLang *hostLang;
+extern HostLang hostLangC;
+
+/* An abstraction of the key operators that manages key operations such as
+ * comparison and increment according the signedness of the key. */
+struct KeyOps
+{
+ /* Default to signed alphabet. */
+ KeyOps() : alphType(0) {}
+
+ Key minKey, maxKey;
+ HostType *alphType;
+
+ void setAlphType( HostType *alphType )
+ {
+ this->alphType = alphType;
+ minKey = (long) alphType->minVal;
+ maxKey = (long) alphType->maxVal;
+ }
+
+ /* Compute the distance between two keys. */
+ Size span( Key key1, Key key2 )
+ {
+ return (unsigned long long)( (long long)key2.key - (long long)key1.key + 1) ;
+ }
+
+ Size alphSize()
+ { return span( minKey, maxKey ); }
+};
+
+inline bool operator<( const Key key1, const Key key2 )
+{
+ return key1.key < key2.key;
+}
+
+inline bool operator<=( const Key key1, const Key key2 )
+{
+ return key1.key <= key2.key;
+}
+
+inline bool operator>( const Key key1, const Key key2 )
+{
+ return key1.key > key2.key;
+}
+
+inline bool operator>=( const Key key1, const Key key2 )
+{
+ return key1.key >= key2.key;
+}
+
+inline bool operator==( const Key key1, const Key key2 )
+{
+ return key1.key == key2.key;
+}
+
+inline bool operator!=( const Key key1, const Key key2 )
+{
+ return key1.key != key2.key;
+}
+
+/* Decrement. Needed only for ranges. */
+inline void Key::decrement()
+{
+ key = key - 1;
+}
+
+/* Increment. Needed only for ranges. */
+inline void Key::increment()
+{
+ key = key + 1;
+}
+
+inline long long Key::getLongLong() const
+{
+ return (long long) key;
+}
+
+inline Key operator+(const Key key1, const Key key2)
+{
+ return Key( key1.key + key2.key );
+}
+
+inline Key operator-(const Key key1, const Key key2)
+{
+ return Key( key1.key - key2.key );
+}
+
+const char *findFileExtension( const char *stemFile );
+char *fileNameFromStem( const char *stemFile, const char *suffix );
+
+#endif /* _KEYOPS_H */
diff --git a/src/list.c b/src/list.c
new file mode 100644
index 0000000..d9180b7
--- /dev/null
+++ b/src/list.c
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <colm/pdarun.h>
+
+void listAddAfter( List *list, ListEl *prev_el, ListEl *new_el )
+{
+ /* Set the previous pointer of new_el to prev_el. We do
+ * this regardless of the state of the list. */
+ new_el->prev = prev_el;
+
+ /* Set forward pointers. */
+ if (prev_el == 0) {
+ /* There was no prev_el, we are inserting at the head. */
+ new_el->next = list->head;
+ list->head = new_el;
+ }
+ else {
+ /* There was a prev_el, we can access previous next. */
+ new_el->next = prev_el->next;
+ prev_el->next = new_el;
+ }
+
+ /* Set reverse pointers. */
+ if (new_el->next == 0) {
+ /* There is no next element. Set the tail pointer. */
+ list->tail = new_el;
+ }
+ else {
+ /* There is a next element. Set it's prev pointer. */
+ new_el->next->prev = new_el;
+ }
+
+ /* Update list length. */
+ list->listLen++;
+}
+
+void listAddBefore( List *list, ListEl *next_el, ListEl *new_el)
+{
+ /* Set the next pointer of the new element to next_el. We do
+ * this regardless of the state of the list. */
+ new_el->next = next_el;
+
+ /* Set reverse pointers. */
+ if (next_el == 0) {
+ /* There is no next elememnt. We are inserting at the tail. */
+ new_el->prev = list->tail;
+ list->tail = new_el;
+ }
+ else {
+ /* There is a next element and we can access next's previous. */
+ new_el->prev = next_el->prev;
+ next_el->prev = new_el;
+ }
+
+ /* Set forward pointers. */
+ if (new_el->prev == 0) {
+ /* There is no previous element. Set the head pointer.*/
+ list->head = new_el;
+ }
+ else {
+ /* There is a previous element, set it's next pointer to new_el. */
+ new_el->prev->next = new_el;
+ }
+
+ list->listLen++;
+}
+
+ListEl *listDetach( List *list, ListEl *el )
+{
+ /* Set forward pointers to skip over el. */
+ if (el->prev == 0)
+ list->head = el->next;
+ else
+ el->prev->next = el->next;
+
+ /* Set reverse pointers to skip over el. */
+ if (el->next == 0)
+ list->tail = el->prev;
+ else
+ el->next->prev = el->prev;
+
+ /* Update List length and return element we detached. */
+ list->listLen--;
+ return el;
+}
+
diff --git a/src/loadcolm.cc b/src/loadcolm.cc
new file mode 100644
index 0000000..6bdac1c
--- /dev/null
+++ b/src/loadcolm.cc
@@ -0,0 +1,2341 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <iostream>
+#include <errno.h>
+
+#include "parser.h"
+#include "config.h"
+#include "avltree.h"
+#include "parsedata.h"
+#include "parser.h"
+#include "global.h"
+#include "input.h"
+#include "loadcolm.h"
+#include "if2.h"
+#include "colm/colm.h"
+
+extern RuntimeData colm_object;
+
+InputLoc::InputLoc( colm_location *pcloc )
+{
+ if ( pcloc != 0 ) {
+ fileName = pcloc->name;
+ line = pcloc->line;
+ col = pcloc->column;
+ }
+ else {
+ fileName = 0;
+ line = -1;
+ col = -1;
+ }
+}
+
+
+String unescape( const String &s )
+{
+ String out( String::Fresh(), s.length() );
+ char *d = out.data;
+
+ for ( int i = 0; i < s.length(); ) {
+ if ( s[i] == '\\' ) {
+ switch ( s[i+1] ) {
+ case '0': *d++ = '\0'; break;
+ case 'a': *d++ = '\a'; break;
+ case 'b': *d++ = '\b'; break;
+ case 't': *d++ = '\t'; break;
+ case 'n': *d++ = '\n'; break;
+ case 'v': *d++ = '\v'; break;
+ case 'f': *d++ = '\f'; break;
+ case 'r': *d++ = '\r'; break;
+ default: *d++ = s[i+1]; break;
+ }
+ i += 2;
+ }
+ else {
+ *d++ = s[i];
+ i += 1;
+ }
+ }
+ out.chop( d - out.data );
+ return out;
+}
+
+
+struct LoadColm
+:
+ public BaseParser
+{
+ LoadColm( Compiler *pd, const char *inputFileName )
+ :
+ BaseParser( pd ),
+ inputFileName( inputFileName )
+ {}
+
+ const char *inputFileName;
+
+ Literal *walkLexRangeLit( lex_range_lit lexRangeLit )
+ {
+ Literal *literal = 0;
+ switch ( lexRangeLit.prodName() ) {
+ case lex_range_lit::_Lit: {
+ String lit = lexRangeLit.lex_lit().data();
+ literal = Literal::cons( lexRangeLit.lex_lit().loc(), lit, Literal::LitString );
+ break;
+ }
+ case lex_range_lit::_Number: {
+ String num = lexRangeLit.lex_num().text().c_str();
+ literal = Literal::cons( lexRangeLit.lex_num().loc(), num, Literal::Number );
+ break;
+ }}
+ return literal;
+ }
+
+ LexFactor *walkLexFactor( lex_factor lexFactor )
+ {
+ LexFactor *factor = 0;
+ switch ( lexFactor.prodName() ) {
+ case lex_factor::_Literal: {
+ String litString = lexFactor.lex_lit().data();
+ Literal *literal = Literal::cons( lexFactor.lex_lit().loc(),
+ litString, Literal::LitString );
+ factor = LexFactor::cons( literal );
+ break;
+ }
+ case lex_factor::_Id: {
+ String id = lexFactor.lex_id().data();
+ factor = lexRlFactorName( id, lexFactor.lex_id().loc() );
+ break;
+ }
+ case lex_factor::_Range: {
+ Literal *low = walkLexRangeLit( lexFactor.Low() );
+ Literal *high = walkLexRangeLit( lexFactor.High() );
+
+ Range *range = Range::cons( low, high );
+ factor = LexFactor::cons( range );
+ break;
+ }
+ case lex_factor::_PosOrBlock: {
+ ReOrBlock *block = walkRegOrData( lexFactor.reg_or_data() );
+ factor = LexFactor::cons( ReItem::cons( block, ReItem::OrBlock ) );
+ break;
+ }
+ case lex_factor::_NegOrBlock: {
+ ReOrBlock *block = walkRegOrData( lexFactor.reg_or_data() );
+ factor = LexFactor::cons( ReItem::cons( block, ReItem::NegOrBlock ) );
+ break;
+ }
+ case lex_factor::_Number: {
+ String number = lexFactor.lex_uint().text().c_str();
+ factor = LexFactor::cons( Literal::cons( lexFactor.lex_uint().loc(),
+ number, Literal::Number ) );
+ break;
+ }
+ case lex_factor::_Hex: {
+ String number = lexFactor.lex_hex().text().c_str();
+ factor = LexFactor::cons( Literal::cons( lexFactor.lex_hex().loc(),
+ number, Literal::Number ) );
+ break;
+ }
+ case lex_factor::_Paren: {
+ lex_expr LexExpr = lexFactor.lex_expr();
+ LexExpression *expr = walkLexExpr( LexExpr );
+ LexJoin *join = LexJoin::cons( expr );
+ factor = LexFactor::cons( join );
+ break;
+ }}
+ return factor;
+ }
+
+ LexFactorAug *walkLexFactorAug( lex_factor_rep LexFactorRepTree )
+ {
+ LexFactorRep *factorRep = walkLexFactorRep( LexFactorRepTree );
+ return LexFactorAug::cons( factorRep );
+ }
+
+ LangExpr *walkCodeExpr( code_expr codeExpr )
+ {
+ LangExpr *expr = 0;
+ LangExpr *relational = walkCodeRelational( codeExpr.code_relational() );
+
+ switch ( codeExpr.prodName() ) {
+ case code_expr::_AmpAmp: {
+ LangExpr *left = walkCodeExpr( codeExpr._code_expr() );
+
+ InputLoc loc = codeExpr.AMPAMP().loc();
+ expr = LangExpr::cons( loc, left, OP_LogicalAnd, relational );
+ break;
+ }
+ case code_expr::_BarBar: {
+ LangExpr *left = walkCodeExpr( codeExpr._code_expr() );
+
+ InputLoc loc = codeExpr.BARBAR().loc();
+ expr = LangExpr::cons( loc, left, OP_LogicalOr, relational );
+ break;
+ }
+ case code_expr::_Base: {
+ expr = relational;
+ break;
+ }}
+ return expr;
+ }
+
+ LangStmt *walkStatement( statement Statement )
+ {
+ LangStmt *stmt = 0;
+ switch ( Statement.prodName() ) {
+ case statement::_Print: {
+ print_stmt printStmt = Statement.print_stmt();
+ stmt = walkPrintStmt( printStmt );
+ break;
+ }
+ case statement::_Expr: {
+ expr_stmt exprStmt = Statement.expr_stmt();
+ stmt = walkExprStmt( exprStmt );
+ break;
+ }
+ case statement::_VarDef: {
+ ObjectField *objField = walkVarDef( Statement.var_def() );
+ LangExpr *expr = walkOptDefInit( Statement.opt_def_init() );
+ stmt = varDef( objField, expr, LangStmt::AssignType );
+ break;
+ }
+ case statement::_For: {
+ pushScope();
+
+ String forDecl = Statement.id().text().c_str();
+ TypeRef *typeRef = walkTypeRef( Statement.type_ref() );
+ StmtList *stmtList = walkBlockOrSingle( Statement.block_or_single() );
+
+ IterCall *iterCall = walkIterCall( Statement.iter_call() );
+
+ stmt = forScope( Statement.id().loc(), forDecl,
+ curScope, typeRef, iterCall, stmtList );
+
+ popScope();
+ break;
+ }
+ case statement::_If: {
+ pushScope();
+
+ LangExpr *expr = walkCodeExpr( Statement.code_expr() );
+ StmtList *stmtList = walkBlockOrSingle( Statement.block_or_single() );
+
+ popScope();
+
+ LangStmt *elsifList = walkElsifList( Statement.elsif_list() );
+ stmt = LangStmt::cons( LangStmt::IfType, expr, stmtList, elsifList );
+ break;
+ }
+ case statement::_While: {
+ pushScope();
+ LangExpr *expr = walkCodeExpr( Statement.code_expr() );
+ StmtList *stmtList = walkBlockOrSingle( Statement.block_or_single() );
+ stmt = LangStmt::cons( LangStmt::WhileType, expr, stmtList );
+ popScope();
+ break;
+ }
+ case statement::_LhsVarRef: {
+ LangVarRef *varRef = walkVarRef( Statement.var_ref() );
+ LangExpr *expr = walkCodeExpr( Statement.code_expr() );
+ stmt = LangStmt::cons( varRef->loc, LangStmt::AssignType, varRef, expr );
+ break;
+ }
+ case statement::_Yield: {
+ LangVarRef *varRef = walkVarRef( Statement.var_ref() );
+ stmt = LangStmt::cons( LangStmt::YieldType, varRef );
+ break;
+ }
+ case statement::_Return: {
+ LangExpr *expr = walkCodeExpr( Statement.code_expr() );
+ stmt = LangStmt::cons( Statement.loc(), LangStmt::ReturnType, expr );
+ break;
+ }
+ case statement::_Break: {
+ stmt = LangStmt::cons( LangStmt::BreakType );
+ break;
+ }
+ case statement::_Reject: {
+ stmt = LangStmt::cons( Statement.REJECT().loc(), LangStmt::RejectType );
+ break;
+ }}
+ return stmt;
+ }
+
+ StmtList *walkLangStmtList( lang_stmt_list langStmtList )
+ {
+ StmtList *retList = new StmtList;
+ _repeat_statement stmtList = langStmtList.StmtList();
+
+ /* Walk the list of items. */
+ while ( !stmtList.end() ) {
+ statement Statement = stmtList.value();
+ LangStmt *stmt = walkStatement( Statement );
+ if ( stmt != 0 )
+ retList->append( stmt );
+ stmtList = stmtList.next();
+ }
+
+ require_pattern require = langStmtList.opt_require_stmt().require_pattern();
+ if ( require != 0 ) {
+ pushScope();
+
+ LangVarRef *varRef = walkVarRef( require.var_ref() );
+ PatternItemList *list = walkPattern( require.pattern(), varRef );
+ LangExpr *expr = match( require.REQUIRE().loc(), varRef, list );
+
+ StmtList *reqList = walkLangStmtList( langStmtList.opt_require_stmt().lang_stmt_list() );
+
+ LangStmt *stmt = LangStmt::cons( LangStmt::IfType, expr, reqList, 0 );
+
+ popScope();
+
+ retList->append( stmt );
+ }
+
+ return retList;
+ }
+
+ void walkTokenDef( token_def TokenDef )
+ {
+ String name = TokenDef.id().data();
+
+ bool niLeft = walkNoIgnoreLeft( TokenDef.no_ignore_left() );
+ bool niRight = walkNoIgnoreRight( TokenDef.no_ignore_right() );
+
+ ObjectDef *objectDef = walkVarDefList( TokenDef.VarDefList() );
+ objectDef->name = name;
+
+ LexJoin *join = 0;
+ if ( TokenDef.opt_lex_expr().lex_expr() != 0 ) {
+ LexExpression *expr = walkLexExpr( TokenDef.opt_lex_expr().lex_expr() );
+ join = LexJoin::cons( expr );
+ }
+
+ CodeBlock *translate = walkOptTranslate( TokenDef.opt_translate() );
+
+ defineToken( TokenDef.id().loc(), name, join, objectDef,
+ translate, false, niLeft, niRight );
+ }
+
+ void walkIgnoreCollector( ic_def IgnoreCollector )
+ {
+ String id = IgnoreCollector.id().data();
+ zeroDef( IgnoreCollector.id().loc(), id );
+ }
+
+ String walkOptId( opt_id optId )
+ {
+ String name;
+ if ( optId.prodName() == opt_id::_Id )
+ name = optId.id().data();
+ return name;
+ }
+
+ ObjectDef *walkVarDefList( _repeat_var_def varDefList )
+ {
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType,
+ String(), pd->nextObjectId++ );
+
+ while ( !varDefList.end() ) {
+ ObjectField *varDef = walkVarDef( varDefList.value() );
+ objVarDef( objectDef, varDef );
+ varDefList = varDefList.next();
+ }
+
+ return objectDef;
+ }
+
+ void walkPreEof( pre_eof_def PreEofDef )
+ {
+ ObjectDef *localFrame = blockOpen();
+ StmtList *stmtList = walkLangStmtList( PreEofDef.lang_stmt_list() );
+ preEof( PreEofDef.PREEOF().loc(), stmtList, localFrame );
+ blockClose();
+ }
+
+ void walkIgnoreDef( ignore_def IgnoreDef )
+ {
+ String name = walkOptId( IgnoreDef.opt_id() );
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType,
+ name, pd->nextObjectId++ );
+
+ LexJoin *join = 0;
+ if ( IgnoreDef.opt_lex_expr().lex_expr() != 0 ) {
+ LexExpression *expr = walkLexExpr( IgnoreDef.opt_lex_expr().lex_expr() );
+ join = LexJoin::cons( expr );
+ }
+
+ defineToken( IgnoreDef.IGNORE().loc(), name, join, objectDef,
+ 0, true, false, false );
+ }
+
+ LangExpr *walkCodeMultiplicitive( code_multiplicitive mult )
+ {
+ LangExpr *expr = 0;
+ LangExpr *right = walkCodeUnary( mult.code_unary() );
+ switch ( mult.prodName() ) {
+ case code_multiplicitive::_Star: {
+ LangExpr *left = walkCodeMultiplicitive( mult._code_multiplicitive() );
+ expr = LangExpr::cons( mult.STAR().loc(), left, '*', right );
+ break;
+ }
+ case code_multiplicitive::_Fslash: {
+ LangExpr *left = walkCodeMultiplicitive( mult._code_multiplicitive() );
+ expr = LangExpr::cons( mult.FSLASH().loc(), left, '/', right );
+ break;
+ }
+ case code_multiplicitive::_Base: {
+ expr = right;
+ break;
+ }}
+ return expr;
+ }
+
+ PatternItemList *walkPatternElTypeOrLit( pattern_el_lel typeOrLit,
+ LangVarRef *patternVarRef )
+ {
+ NamespaceQual *nspaceQual = walkRegionQual( typeOrLit.region_qual() );
+ RepeatType repeatType = walkOptRepeat( typeOrLit.opt_repeat() );
+
+ PatternItemList *list = 0;
+ switch ( typeOrLit.prodName() ) {
+ case pattern_el_lel::_Id: {
+ String id = typeOrLit.id().data();
+ list = patternElNamed( typeOrLit.id().loc(), patternVarRef,
+ nspaceQual, id, repeatType );
+ break;
+ }
+ case pattern_el_lel::_Lit: {
+ String lit = typeOrLit.backtick_lit().data();
+ list = patternElType( typeOrLit.backtick_lit().loc(), patternVarRef,
+ nspaceQual, lit, repeatType );
+ break;
+ }}
+
+ return list;
+ }
+
+ LangVarRef *walkOptLabel( opt_label optLabel )
+ {
+ LangVarRef *varRef = 0;
+ if ( optLabel.prodName() == opt_label::_Id ) {
+ String id = optLabel.id().data();
+ varRef = LangVarRef::cons( optLabel.id().loc(),
+ curContext(), curScope, id );
+ }
+ return varRef;
+ }
+
+ PatternItemList *walkPatternEl( pattern_el patternEl, LangVarRef *patternVarRef )
+ {
+ PatternItemList *list = 0;
+ switch ( patternEl.prodName() ) {
+ case pattern_el::_Dq: {
+ list = walkLitpatElList( patternEl.LitpatElList(),
+ patternEl.dq_lit_term().CONS_DQ_NL(), patternVarRef );
+ break;
+ }
+ case pattern_el::_Sq: {
+ list = walkPatSqConsDataList( patternEl.SqConsDataList(),
+ patternEl.sq_lit_term().CONS_SQ_NL() );
+ break;
+ }
+ case pattern_el::_Tilde: {
+ String patternData = patternEl.opt_tilde_data().text().c_str();
+ patternData += '\n';
+ PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm,
+ patternEl.opt_tilde_data().loc(), patternData );
+ list = PatternItemList::cons( patternItem );
+ break;
+ }
+ case pattern_el::_PatternEl: {
+ PatternItemList *typeOrLitList = walkPatternElTypeOrLit(
+ patternEl.pattern_el_lel(), patternVarRef );
+ LangVarRef *varRef = walkOptLabel( patternEl.opt_label() );
+ list = consPatternEl( varRef, typeOrLitList );
+ break;
+ }}
+ return list;
+ }
+
+ PatternItemList *walkLitpatEl( litpat_el litpatEl, LangVarRef *patternVarRef )
+ {
+ PatternItemList *list = 0;
+ switch ( litpatEl.prodName() ) {
+ case litpat_el::_ConsData: {
+ String consData = unescape( litpatEl.dq_cons_data().text().c_str() );
+ PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm,
+ litpatEl.dq_cons_data().loc(), consData );
+ list = PatternItemList::cons( patternItem );
+ break;
+ }
+ case litpat_el::_SubList: {
+ list = walkPatternElList( litpatEl.PatternElList(), patternVarRef );
+ break;
+ }}
+ return list;
+ }
+
+ PatternItemList *walkPatSqConsDataList( _repeat_sq_cons_data sqConsDataList, CONS_SQ_NL Nl )
+ {
+ PatternItemList *list = new PatternItemList;
+ while ( !sqConsDataList.end() ) {
+ String consData = unescape( sqConsDataList.value().text().c_str() );
+ PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm,
+ sqConsDataList.value().loc(), consData );
+ PatternItemList *tail = PatternItemList::cons( patternItem );
+ list = patListConcat( list, tail );
+
+ sqConsDataList = sqConsDataList.next();
+ }
+
+ if ( Nl != 0 ) {
+ String nl = unescape( Nl.data() );
+ PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm,
+ Nl.loc(), nl );
+ PatternItemList *term = PatternItemList::cons( patternItem );
+ list = patListConcat( list, term );
+ }
+
+ return list;
+ }
+
+ ConsItemList *walkConsSqConsDataList( _repeat_sq_cons_data sqConsDataList, CONS_SQ_NL Nl )
+ {
+ ConsItemList *list = new ConsItemList;
+ while ( !sqConsDataList.end() ) {
+ String consData = unescape( sqConsDataList.value().text().c_str() );
+ ConsItem *consItem = ConsItem::cons(
+ sqConsDataList.value().loc(), ConsItem::InputText, consData );
+ ConsItemList *tail = ConsItemList::cons( consItem );
+ list = consListConcat( list, tail );
+
+ sqConsDataList = sqConsDataList.next();
+ }
+
+ if ( Nl != 0 ) {
+ String nl = unescape( Nl.data() );
+ ConsItem *consItem = ConsItem::cons(
+ Nl.loc(), ConsItem::InputText, nl );
+ ConsItemList *term = ConsItemList::cons( consItem );
+ list = consListConcat( list, term );
+ }
+
+ return list;
+ }
+
+ PatternItemList *walkLitpatElList( _repeat_litpat_el litpatElList, CONS_DQ_NL Nl,
+ LangVarRef *patternVarRef )
+ {
+ PatternItemList *list = new PatternItemList;
+ while ( !litpatElList.end() ) {
+ PatternItemList *tail = walkLitpatEl( litpatElList.value(), patternVarRef );
+ list = patListConcat( list, tail );
+ litpatElList = litpatElList.next();
+ }
+
+ if ( Nl != 0 ) {
+ String nl = unescape( Nl.data() );
+ PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm,
+ Nl.loc(), nl );
+ PatternItemList *term = PatternItemList::cons( patternItem );
+ list = patListConcat( list, term );
+ }
+
+ return list;
+ }
+
+ PatternItemList *walkPatternElList( _repeat_pattern_el patternElList,
+ LangVarRef *patternVarRef )
+ {
+ PatternItemList *list = new PatternItemList;
+ while ( !patternElList.end() ) {
+ PatternItemList *tail = walkPatternEl( patternElList.value(), patternVarRef );
+ list = patListConcat( list, tail );
+ patternElList = patternElList.next();
+ }
+ return list;
+ }
+
+ PatternItemList *walkPattternTopEl( pattern_top_el patternTopEl, LangVarRef *patternVarRef )
+ {
+ PatternItemList *list = 0;
+ switch ( patternTopEl.prodName() ) {
+ case pattern_top_el::_Dq: {
+ list = walkLitpatElList( patternTopEl.LitpatElList(),
+ patternTopEl.dq_lit_term().CONS_DQ_NL(), patternVarRef );
+ break;
+ }
+ case pattern_top_el::_Sq: {
+ list = walkPatSqConsDataList( patternTopEl.SqConsDataList(),
+ patternTopEl.sq_lit_term().CONS_SQ_NL() );
+ break;
+ }
+ case pattern_top_el::_Tilde: {
+ String patternData = patternTopEl.opt_tilde_data().text().c_str();
+ patternData += '\n';
+ PatternItem *patternItem = PatternItem::cons( PatternItem::InputTextForm,
+ patternTopEl.opt_tilde_data().loc(), patternData );
+ list = PatternItemList::cons( patternItem );
+ break;
+ }
+ case pattern_top_el::_SubList: {
+ list = walkPatternElList( patternTopEl.PatternElList(), patternVarRef );
+ break;
+ }}
+ return list;
+ }
+
+ PatternItemList *walkPatternList( pattern_list patternList, LangVarRef *patternVarRef )
+ {
+ PatternItemList *list = 0;
+ switch ( patternList.prodName() ) {
+ case pattern_list::_List: {
+ PatternItemList *left = walkPatternList( patternList._pattern_list(), patternVarRef );
+ PatternItemList *right = walkPattternTopEl( patternList.pattern_top_el(), patternVarRef );
+ list = patListConcat( left, right );
+ break;
+ }
+ case pattern_list::_Base: {
+ list = walkPattternTopEl( patternList.pattern_top_el(), patternVarRef );
+ break;
+ }}
+ return list;
+ }
+
+ PatternItemList *walkPattern( pattern Pattern, LangVarRef *patternVarRef )
+ {
+ return walkPatternList( Pattern.pattern_list(), patternVarRef );
+ }
+
+ LangExpr *walkOptDefInit( opt_def_init optDefInit )
+ {
+ LangExpr *expr = 0;
+ if ( optDefInit.prodName() == opt_def_init::_Init )
+ expr = walkCodeExpr( optDefInit.code_expr() );
+ return expr;
+ }
+
+ LangStmt *walkExportDef( export_def exportDef )
+ {
+ ObjectField *objField = walkVarDef( exportDef.var_def() );
+ LangExpr *expr = walkOptDefInit( exportDef.opt_def_init() );
+
+ return exportStmt( objField, LangStmt::AssignType, expr );
+ }
+
+ LangStmt *walkGlobalDef( global_def GlobalDef )
+ {
+ ObjectField *objField = walkVarDef( GlobalDef.var_def() );
+ LangExpr *expr = walkOptDefInit( GlobalDef.opt_def_init() );
+
+ return globalDef( objField, expr, LangStmt::AssignType );
+ }
+
+ void walkAliasDef( alias_def aliasDef )
+ {
+ String id = aliasDef.id().data();
+ TypeRef *typeRef = walkTypeRef( aliasDef.type_ref() );
+ alias( aliasDef.id().loc(), id, typeRef );
+ }
+
+ CodeBlock *walkOptTranslate( opt_translate optTranslate )
+ {
+ CodeBlock *block = 0;
+ if ( optTranslate.prodName() == opt_translate::_Translate ) {
+ ObjectDef *localFrame = blockOpen();
+ StmtList *stmtList = walkLangStmtList( optTranslate.lang_stmt_list() );
+ block = CodeBlock::cons( stmtList, localFrame );
+ block->context = curContext();
+ blockClose();
+ }
+ return block;
+ }
+
+ PredDecl *walkPredToken( pred_token predToken )
+ {
+ NamespaceQual *nspaceQual = walkRegionQual( predToken.region_qual() );
+ PredDecl *predDecl = 0;
+ switch ( predToken.prodName() ) {
+ case pred_token::_Id: {
+ String id = predToken.id().data();
+ predDecl = predTokenName( predToken.id().loc(), nspaceQual, id );
+ break;
+ }
+ case pred_token::_Lit: {
+ String lit = predToken.backtick_lit().data();
+ predDecl = predTokenLit( predToken.backtick_lit().loc(), lit, nspaceQual );
+ break;
+ }}
+ return predDecl;
+ }
+
+ PredDeclList *walkPredTokenList( pred_token_list predTokenList )
+ {
+ PredDeclList *list = 0;
+ switch ( predTokenList.prodName() ) {
+ case pred_token_list::_List: {
+ list = walkPredTokenList( predTokenList._pred_token_list() );
+ PredDecl *predDecl = walkPredToken( predTokenList.pred_token() );
+ list->append( predDecl );
+ break;
+ }
+ case pred_token_list::_Base: {
+ PredDecl *predDecl = walkPredToken( predTokenList.pred_token() );
+ list = new PredDeclList;
+ list->append( predDecl );
+ break;
+ }}
+ return list;
+ }
+
+ PredType walkPredType( pred_type predType )
+ {
+ PredType pt = PredLeft;
+ switch ( predType.prodName() ) {
+ case pred_type::_Left:
+ pt = PredLeft;
+ break;
+ case pred_type::_Right:
+ pt = PredRight;
+ break;
+ case pred_type::_NonAssoc:
+ pt = PredNonassoc;
+ break;
+ }
+
+ return pt;
+ }
+
+ void walkPrecedenceDef( precedence_def precedenceDef )
+ {
+ PredType predType = walkPredType( precedenceDef.pred_type() );
+ PredDeclList *predDeclList = walkPredTokenList( precedenceDef.pred_token_list() );
+ precedenceStmt( predType, predDeclList );
+ }
+
+ StmtList *walkInclude( include Include )
+ {
+ String lit = "";
+ _repeat_sq_cons_data sqConsDataList = Include.SqConsDataList();
+ while ( !sqConsDataList.end() ) {
+ colm_data *data = sqConsDataList.value().data();
+ lit.append( data->data, data->length );
+ sqConsDataList = sqConsDataList.next();
+ }
+
+ String file = unescape( lit );
+
+ const char *argv[2];
+ argv[0] = file.data;
+ argv[1] = 0;
+
+ colm_program *program = colm_new_program( &colm_object );
+ colm_run_program( program, 1, argv );
+
+ /* Extract the parse tree. */
+ start Start = ColmTree( program );
+ str Error = ColmError( program );
+
+ if ( Start == 0 ) {
+ gblErrorCount += 1;
+ InputLoc loc = Error.loc();
+ error(loc) << file.data << ": parse error: " << Error.text() << std::endl;
+ return 0;
+ }
+
+ StmtList *stmtList = walkRootItemList( Start.RootItemList() );
+ colm_delete_program( program );
+ return stmtList;
+ }
+
+
+ NamespaceQual *walkRegionQual( region_qual regionQual )
+ {
+ NamespaceQual *qual = 0;
+ switch ( regionQual.prodName() ) {
+ case region_qual::_Qual: {
+ qual = walkRegionQual( regionQual._region_qual() );
+ qual->qualNames.append( String( regionQual.id().data() ) );
+ break;
+ }
+ case region_qual::_Base: {
+ qual = NamespaceQual::cons( curNspace() );
+ break;
+ }}
+ return qual;
+ }
+
+ RepeatType walkOptRepeat( opt_repeat OptRepeat )
+ {
+ RepeatType repeatType = RepeatNone;
+ switch ( OptRepeat.prodName() ) {
+ case opt_repeat::_Star:
+ repeatType = RepeatRepeat;
+ break;
+ case opt_repeat::_Plus:
+ repeatType = RepeatList;
+ break;
+ case opt_repeat::_Question:
+ repeatType = RepeatOpt;
+ break;
+ }
+ return repeatType;
+ }
+
+ TypeRef *walkTypeRef( type_ref typeRef )
+ {
+ TypeRef *tr = 0;
+ switch ( typeRef.prodName() ) {
+ case type_ref::_Id: {
+ NamespaceQual *nspaceQual = walkRegionQual( typeRef.region_qual() );
+ String id = typeRef.id().data();
+ RepeatType repeatType = walkOptRepeat( typeRef.opt_repeat() );
+ tr = TypeRef::cons( typeRef.id().loc(), nspaceQual, id, repeatType );
+ break;
+ }
+ case type_ref::_Ptr: {
+ NamespaceQual *nspaceQual = walkRegionQual( typeRef.region_qual() );
+ String id = typeRef.id().data();
+ RepeatType repeatType = walkOptRepeat( typeRef.opt_repeat() );
+ TypeRef *inner = TypeRef::cons( typeRef.id().loc(), nspaceQual, id, repeatType );
+ tr = TypeRef::cons( typeRef.id().loc(), TypeRef::Ptr, inner );
+ break;
+ }
+ case type_ref::_Map: {
+ TypeRef *key = walkTypeRef( typeRef.MapKeyType() );
+ TypeRef *value = walkTypeRef( typeRef.MapValueType() );
+ tr = TypeRef::cons( typeRef.loc(), TypeRef::Map, 0, key, value );
+ break;
+ }
+ case type_ref::_List: {
+ TypeRef *type = walkTypeRef( typeRef._type_ref() );
+ tr = TypeRef::cons( typeRef.loc(), TypeRef::List, 0, type, 0 );
+ break;
+ }
+ case type_ref::_Vector: {
+ TypeRef *type = walkTypeRef( typeRef._type_ref() );
+ tr = TypeRef::cons( typeRef.loc(), TypeRef::Vector, 0, type, 0 );
+ break;
+ }
+ case type_ref::_Parser: {
+ TypeRef *type = walkTypeRef( typeRef._type_ref() );
+ tr = TypeRef::cons( typeRef.loc(), TypeRef::Parser, 0, type, 0 );
+ break;
+ }}
+ return tr;
+ }
+
+ StmtList *walkBlockOrSingle( block_or_single blockOrSingle )
+ {
+ StmtList *stmtList = 0;
+ switch ( blockOrSingle.prodName() ) {
+ case block_or_single::_Single: {
+ stmtList = new StmtList;
+ LangStmt *stmt = walkStatement( blockOrSingle.statement() );
+ stmtList->append( stmt );
+ break;
+ }
+ case block_or_single::_Block: {
+ stmtList = walkLangStmtList( blockOrSingle.lang_stmt_list() );
+ break;
+ }}
+
+ return stmtList;
+ }
+
+ void walkProdEl( const String &defName, ProdElList *list, prod_el El )
+ {
+ ObjectField *captureField = 0;
+ if ( El.opt_prod_el_name().prodName() == opt_prod_el_name::_Name ) {
+ String fieldName = El.opt_prod_el_name().id().data();
+ captureField = ObjectField::cons( El.opt_prod_el_name().id().loc(), 0, fieldName );
+ }
+ else {
+ /* default the prod name. */
+ if ( El.prodName() == prod_el::_Id ) {
+ String fieldName = El.id().data();
+ opt_repeat::prod_name orpn = El.opt_repeat().prodName();
+ if ( orpn == opt_repeat::_Star )
+ fieldName = "_repeat_" + fieldName;
+ else if ( orpn == opt_repeat::_Plus )
+ fieldName = "_list_" + fieldName;
+ else if ( orpn == opt_repeat::_Question )
+ fieldName = "_opt_" + fieldName;
+ else if ( strcmp( fieldName, defName ) == 0 )
+ fieldName = "_" + fieldName;
+ captureField = ObjectField::cons( El.id().loc(), 0, fieldName );
+ }
+ }
+
+ RepeatType repeatType = walkOptRepeat( El.opt_repeat() );
+ NamespaceQual *nspaceQual = walkRegionQual( El.region_qual() );
+
+ switch ( El.prodName() ) {
+ case prod_el::_Id: {
+ String typeName = El.id().data();
+ ProdEl *prodEl = prodElName( El.id().loc(), typeName,
+ nspaceQual, captureField, repeatType, false );
+ appendProdEl( list, prodEl );
+ break;
+ }
+ case prod_el::_Lit: {
+ String lit = El.backtick_lit().data();
+ ProdEl *prodEl = prodElLiteral( El.backtick_lit().loc(), lit,
+ nspaceQual, captureField, repeatType, false );
+ appendProdEl( list, prodEl );
+ break;
+ }}
+ }
+
+ void walkProdElList( const String &defName, ProdElList *list, prod_el_list ProdElList )
+ {
+ if ( ProdElList.prodName() == prod_el_list::_List ) {
+ prod_el_list RightProdElList = ProdElList._prod_el_list();
+ walkProdElList( defName, list, RightProdElList );
+ walkProdEl( defName, list, ProdElList.prod_el() );
+ }
+ }
+
+ CodeBlock *walkOptReduce( opt_reduce OptReduce )
+ {
+ CodeBlock *block = 0;
+ if ( OptReduce.prodName() == opt_reduce::_Reduce ) {
+ ObjectDef *localFrame = blockOpen();
+ StmtList *stmtList = walkLangStmtList( OptReduce.lang_stmt_list() );
+
+ block = CodeBlock::cons( stmtList, localFrame );
+ block->context = curContext();
+
+ blockClose();
+ }
+ return block;
+ }
+
+ void walkProdudction( const String &defName, LelDefList *lelDefList, prod Prod )
+ {
+ ProdElList *list = new ProdElList;
+
+ walkProdElList( defName, list, Prod.prod_el_list() );
+
+ String name;
+ if ( Prod.opt_prod_name().prodName() == opt_prod_name::_Name )
+ name = Prod.opt_prod_name().id().data();
+
+ CodeBlock *codeBlock = walkOptReduce( Prod.opt_reduce() );
+ bool commit = Prod.opt_commit().prodName() == opt_commit::_Commit;
+
+ Production *prod = BaseParser::production( Prod.SQOPEN().loc(),
+ list, name, commit, codeBlock, 0 );
+ prodAppend( lelDefList, prod );
+ }
+
+ void walkProdList( const String &name, LelDefList *lelDefList, prod_list ProdList )
+ {
+ if ( ProdList.prodName() == prod_list::_List )
+ walkProdList( name, lelDefList, ProdList._prod_list() );
+
+ walkProdudction( name, lelDefList, ProdList.prod() );
+ }
+
+ ReOrItem *walkRegOrChar( reg_or_char regOrChar )
+ {
+ ReOrItem *orItem = 0;
+ switch ( regOrChar.prodName() ) {
+ case reg_or_char::_Char: {
+ String c = unescape( regOrChar.RE_CHAR().data() );
+ orItem = ReOrItem::cons( regOrChar.RE_CHAR().loc(), c );
+ break;
+ }
+ case reg_or_char::_Range: {
+ String low = unescape( regOrChar.Low().data() );
+ String high = unescape( regOrChar.High().data() );
+ orItem = ReOrItem::cons( regOrChar.Low().loc(), low[0], high[0] );
+ break;
+ }}
+ return orItem;
+ }
+
+ ReOrBlock *walkRegOrData( reg_or_data regOrData )
+ {
+ ReOrBlock *block = 0;
+ switch ( regOrData.prodName() ) {
+ case reg_or_data::_Data: {
+ ReOrBlock *left = walkRegOrData( regOrData._reg_or_data() );
+ ReOrItem *right = walkRegOrChar( regOrData.reg_or_char() );
+ block = lexRegularExprData( left, right );
+ break;
+ }
+ case reg_or_data::_Base: {
+ block = ReOrBlock::cons();
+ break;
+ }}
+ return block;
+ }
+
+ LexFactorNeg *walkLexFactorNeg( lex_factor_neg lexFactorNeg )
+ {
+ LexFactorNeg *factorNeg = 0;
+ switch ( lexFactorNeg.prodName() ) {
+ case lex_factor_neg::_Caret: {
+ LexFactorNeg *recNeg = walkLexFactorNeg( lexFactorNeg._lex_factor_neg() );
+ factorNeg = LexFactorNeg::cons( recNeg, LexFactorNeg::CharNegateType );
+ break;
+ }
+ case lex_factor_neg::_Base: {
+ LexFactor *factor = walkLexFactor( lexFactorNeg.lex_factor() );
+ factorNeg = LexFactorNeg::cons( factor );
+ break;
+ }}
+ return factorNeg;
+ }
+
+ LexFactorRep *walkLexFactorRep( lex_factor_rep lexFactorRep )
+ {
+ LexFactorRep *factorRep = 0;
+ LexFactorRep *recRep = 0;
+ lex_factor_rep::prod_name pn = lexFactorRep.prodName();
+
+ if ( pn != lex_factor_rep::_Base )
+ recRep = walkLexFactorRep( lexFactorRep._lex_factor_rep() );
+
+ switch ( pn ) {
+ case lex_factor_rep::_Star: {
+ factorRep = LexFactorRep::cons( lexFactorRep.LEX_STAR().loc(),
+ recRep, 0, 0, LexFactorRep::StarType );
+ break;
+ }
+ case lex_factor_rep::_StarStar: {
+ factorRep = LexFactorRep::cons( lexFactorRep.LEX_STARSTAR().loc(),
+ recRep, 0, 0, LexFactorRep::StarStarType );
+ break;
+ }
+ case lex_factor_rep::_Plus: {
+ factorRep = LexFactorRep::cons( lexFactorRep.LEX_PLUS().loc(),
+ recRep, 0, 0, LexFactorRep::PlusType );
+ break;
+ }
+ case lex_factor_rep::_Question: {
+ factorRep = LexFactorRep::cons( lexFactorRep.LEX_QUESTION().loc(),
+ recRep, 0, 0, LexFactorRep::OptionalType );
+ break;
+ }
+ case lex_factor_rep::_Exact: {
+ int low = atoi( lexFactorRep.lex_uint().data()->data );
+ factorRep = LexFactorRep::cons( lexFactorRep.lex_uint().loc(),
+ recRep, low, 0, LexFactorRep::ExactType );
+ break;
+ }
+ case lex_factor_rep::_Max: {
+ int high = atoi( lexFactorRep.lex_uint().data()->data );
+ factorRep = LexFactorRep::cons( lexFactorRep.lex_uint().loc(),
+ recRep, 0, high, LexFactorRep::MaxType );
+ break;
+ }
+ case lex_factor_rep::_Min: {
+ int low = atoi( lexFactorRep.lex_uint().data()->data );
+ factorRep = LexFactorRep::cons( lexFactorRep.lex_uint().loc(),
+ recRep, low, 0, LexFactorRep::MinType );
+ break;
+ }
+ case lex_factor_rep::_Range: {
+ int low = atoi( lexFactorRep.Low().data()->data );
+ int high = atoi( lexFactorRep.High().data()->data );
+ factorRep = LexFactorRep::cons( lexFactorRep.Low().loc(),
+ recRep, low, high, LexFactorRep::RangeType );
+ break;
+ }
+ case lex_factor_rep::_Base: {
+ LexFactorNeg *factorNeg = walkLexFactorNeg( lexFactorRep.lex_factor_neg() );
+ factorRep = LexFactorRep::cons( factorNeg );
+ }}
+
+ return factorRep;
+ }
+
+ LexTerm *walkLexTerm( lex_term lexTerm )
+ {
+ LexTerm *term = 0;
+ lex_term::prod_name pn = lexTerm.prodName();
+
+ LexTerm *leftTerm = 0;
+ if ( pn != lex_term::_Base )
+ leftTerm = walkLexTerm( lexTerm._lex_term() );
+
+ LexFactorAug *factorAug = walkLexFactorAug( lexTerm.lex_factor_rep() );
+
+ switch ( pn ) {
+ case lex_term::_Dot:
+ term = LexTerm::cons( leftTerm, factorAug, LexTerm::ConcatType );
+ break;
+ case lex_term::_ColonGt:
+ term = LexTerm::cons( leftTerm, factorAug, LexTerm::RightStartType );
+ break;
+ case lex_term::_ColonGtGt:
+ term = LexTerm::cons( leftTerm, factorAug, LexTerm::RightFinishType );
+ break;
+ case lex_term::_LtColon:
+ term = LexTerm::cons( leftTerm, factorAug, LexTerm::LeftType );
+ break;
+ default:
+ term = LexTerm::cons( factorAug );
+ break;
+ }
+
+ return term;
+ }
+
+ LexExpression *walkLexExpr( lex_expr lexExpr )
+ {
+ LexExpression *expr = 0;
+ lex_expr::prod_name pn = lexExpr.prodName();
+
+ LexExpression *leftExpr = 0;
+ if ( pn != lex_expr::_Base )
+ leftExpr = walkLexExpr( lexExpr._lex_expr() );
+
+ LexTerm *term = walkLexTerm( lexExpr.lex_term() );
+
+ switch ( pn ) {
+ case lex_expr::_Bar:
+ expr = LexExpression::cons( leftExpr, term, LexExpression::OrType );
+ break;
+ case lex_expr::_Amp:
+ expr = LexExpression::cons( leftExpr, term, LexExpression::IntersectType );
+ break;
+ case lex_expr::_Dash:
+ expr = LexExpression::cons( leftExpr, term, LexExpression::SubtractType );
+ break;
+ case lex_expr::_DashDash:
+ expr = LexExpression::cons( leftExpr, term, LexExpression::StrongSubtractType );
+ break;
+ case lex_expr::_Base:
+ expr = LexExpression::cons( term );
+ }
+ return expr;
+ }
+
+
+ void walkRlDef( rl_def rlDef )
+ {
+ String id = rlDef.id().data();
+
+ lex_expr LexExpr = rlDef.lex_expr();
+ LexExpression *expr = walkLexExpr( LexExpr );
+ LexJoin *join = LexJoin::cons( expr );
+
+ addRegularDef( rlDef.id().loc(), curNspace(), id, join );
+ }
+
+ void walkLexRegion( region_def regionDef )
+ {
+ pushRegionSet( regionDef.loc() );
+ walkRootItemList( regionDef.RootItemList() );
+ popRegionSet();
+ }
+
+ void walkCflDef( cfl_def cflDef )
+ {
+ String name = cflDef.id().data();
+ ObjectDef *objectDef = walkVarDefList( cflDef.VarDefList() );
+ objectDef->name = name;
+
+ LelDefList *defList = new LelDefList;
+ walkProdList( name, defList, cflDef.prod_list() );
+
+ bool reduceFirst = cflDef.opt_reduce_first().REDUCEFIRST() != 0;
+
+ NtDef *ntDef = NtDef::cons( name, curNspace(),
+ curContext(), reduceFirst );
+
+ BaseParser::cflDef( ntDef, objectDef, defList );
+ }
+
+ CallArgVect *walkCallArgList( call_arg_list callArgList )
+ {
+ CallArgVect *callArgVect = new CallArgVect;
+ while ( callArgList.code_expr() != 0 ) {
+ code_expr codeExpr = callArgList.code_expr();
+ LangExpr *expr = walkCodeExpr( codeExpr );
+ callArgVect->append( new CallArg(expr) );
+ callArgList = callArgList._call_arg_list();
+ }
+ return callArgVect;
+ }
+
+ LangStmt *walkPrintStmt( print_stmt &printStmt )
+ {
+ CallArgVect *exprVect = walkCallArgList( printStmt.call_arg_list() );
+
+ LangStmt::Type type = LangStmt::PrintType;
+ switch ( printStmt.prodName() ) {
+ case print_stmt::_Tree:
+ type = LangStmt::PrintType;
+ break;
+ case print_stmt::_PrintStream:
+ type = LangStmt::PrintStreamType;
+ break;
+ case print_stmt::_Xml:
+ type = LangStmt::PrintXMLType;
+ break;
+ case print_stmt::_XmlAc:
+ type = LangStmt::PrintXMLACType;
+ break;
+ }
+
+ return LangStmt::cons( printStmt.POPEN().loc(), type, exprVect );
+ }
+
+ QualItemVect *walkQual( qual &Qual )
+ {
+ QualItemVect *qualItemVect = 0;
+ qual RecQual = Qual._qual();
+ switch ( Qual.prodName() ) {
+ case qual::_Dot:
+ case qual::_Arrow: {
+ qualItemVect = walkQual( RecQual );
+ String id = Qual.id().data();
+ QualItem::Form form = Qual.DOT() != 0 ? QualItem::Dot : QualItem::Arrow;
+ qualItemVect->append( QualItem( form, Qual.id().loc(), id ) );
+ break;
+ }
+ case qual::_Base: {
+ qualItemVect = new QualItemVect;
+ break;
+ }}
+ return qualItemVect;
+ }
+
+ LangVarRef *walkVarRef( var_ref varRef )
+ {
+ qual Qual = varRef.qual();
+ QualItemVect *qualItemVect = walkQual( Qual );
+ String id = varRef.id().data();
+ LangVarRef *langVarRef = LangVarRef::cons( varRef.id().loc(),
+ curContext(), curScope, qualItemVect, id );
+ return langVarRef;
+ }
+
+ ObjectField *walkOptCapture( opt_capture optCapture )
+ {
+ ObjectField *objField = 0;
+ if ( optCapture.prodName() == opt_capture::_Id ) {
+ String id = optCapture.id().data();
+ objField = ObjectField::cons( optCapture.id().loc(), 0, id );
+ }
+ return objField;
+ }
+
+ /*
+ * Constructor
+ */
+
+ ConsItemList *walkLitConsEl( lit_cons_el litConsEl, TypeRef *consTypeRef )
+ {
+ ConsItemList *list = 0;
+ switch ( litConsEl.prodName() ) {
+ case lit_cons_el::_ConsData: {
+ String consData = unescape( litConsEl.dq_cons_data().text().c_str() );
+ ConsItem *consItem = ConsItem::cons( litConsEl.dq_cons_data().loc(),
+ ConsItem::InputText, consData );
+ list = ConsItemList::cons( consItem );
+ break;
+ }
+ case lit_cons_el::_SubList: {
+ list = walkConsElList( litConsEl.ConsElList(), consTypeRef );
+ break;
+ }}
+ return list;
+ }
+
+ ConsItemList *walkLitConsElList( _repeat_lit_cons_el litConsElList,
+ CONS_DQ_NL Nl, TypeRef *consTypeRef )
+ {
+ ConsItemList *list = new ConsItemList;
+ while ( !litConsElList.end() ) {
+ ConsItemList *extension = walkLitConsEl( litConsElList.value(), consTypeRef );
+ list = consListConcat( list, extension );
+ litConsElList = litConsElList.next();
+ }
+
+ if ( Nl != 0 ) {
+ String consData = unescape( Nl.data() );
+ ConsItem *consItem = ConsItem::cons( Nl.loc(), ConsItem::InputText, consData );
+ ConsItemList *term = ConsItemList::cons( consItem );
+ list = consListConcat( list, term );
+ }
+
+ return list;
+ }
+
+ ConsItemList *walkConsEl( cons_el consEl, TypeRef *consTypeRef )
+ {
+ ConsItemList *list = 0;
+ switch ( consEl.prodName() ) {
+ case cons_el::_Lit: {
+ NamespaceQual *nspaceQual = walkRegionQual( consEl.region_qual() );
+ String lit = consEl.backtick_lit().data();
+ list = consElLiteral( consEl.backtick_lit().loc(), consTypeRef, lit, nspaceQual );
+ break;
+ }
+ case cons_el::_Tilde: {
+ String consData = consEl.opt_tilde_data().text().c_str();
+ consData += '\n';
+ ConsItem *consItem = ConsItem::cons( consEl.opt_tilde_data().loc(),
+ ConsItem::InputText, consData );
+ list = ConsItemList::cons( consItem );
+ break;
+ }
+ case cons_el::_Sq: {
+ list = walkConsSqConsDataList( consEl.SqConsDataList(),
+ consEl.sq_lit_term().CONS_SQ_NL() );
+ break;
+ }
+ case cons_el::_CodeExpr: {
+ LangExpr *consExpr = walkCodeExpr( consEl.code_expr() );
+ ConsItem *consItem = ConsItem::cons( consExpr->loc,
+ ConsItem::ExprType, consExpr );
+ list = ConsItemList::cons( consItem );
+ break;
+ }
+ case cons_el::_Dq: {
+ list = walkLitConsElList( consEl.LitConsElList(),
+ consEl.dq_lit_term().CONS_DQ_NL(), consTypeRef );
+ break;
+ }}
+ return list;
+ }
+
+ ConsItemList *walkConsElList( _repeat_cons_el consElList, TypeRef *consTypeRef )
+ {
+ ConsItemList *list = new ConsItemList;
+ while ( !consElList.end() ) {
+ ConsItemList *extension = walkConsEl( consElList.value(), consTypeRef );
+ list = consListConcat( list, extension );
+ consElList = consElList.next();
+ }
+ return list;
+ }
+
+ ConsItemList *walkConsTopEl( cons_top_el consTopEl, TypeRef *consTypeRef )
+ {
+ ConsItemList *list = 0;
+ switch ( consTopEl.prodName() ) {
+ case cons_top_el::_Dq: {
+ list = walkLitConsElList( consTopEl.LitConsElList(),
+ consTopEl.dq_lit_term().CONS_DQ_NL(), consTypeRef );
+ break;
+ }
+ case cons_top_el::_Sq: {
+ list = walkConsSqConsDataList( consTopEl.SqConsDataList(),
+ consTopEl.sq_lit_term().CONS_SQ_NL() );
+ break;
+ }
+ case cons_top_el::_Tilde: {
+ String consData = consTopEl.opt_tilde_data().text().c_str();
+ consData += '\n';
+ ConsItem *consItem = ConsItem::cons( consTopEl.opt_tilde_data().loc(),
+ ConsItem::InputText, consData );
+ list = ConsItemList::cons( consItem );
+ break;
+ }
+ case cons_top_el::_SubList: {
+ list = walkConsElList( consTopEl.ConsElList(), consTypeRef );
+ break;
+ }}
+ return list;
+ }
+
+ ConsItemList *walkConsList( cons_list consList, TypeRef *consTypeRef )
+ {
+ ConsItemList *list = walkConsTopEl( consList.cons_top_el(), consTypeRef );
+
+ if ( consList._cons_list() != 0 ) {
+ ConsItemList *extension = walkConsList( consList._cons_list(), consTypeRef );
+ consListConcat( list, extension );
+ }
+
+ return list;
+ }
+
+ ConsItemList *walkConstructor( constructor Constructor, TypeRef *consTypeRef )
+ {
+ ConsItemList *list = walkConsList( Constructor.cons_list(), consTypeRef );
+ return list;
+ }
+
+ /*
+ * String
+ */
+
+ ConsItemList *walkLitStringEl( lit_string_el litStringEl )
+ {
+ ConsItemList *list = 0;
+ switch ( litStringEl.prodName() ) {
+ case lit_string_el::_ConsData: {
+ String consData = unescape( litStringEl.dq_cons_data().text().c_str() );
+ ConsItem *stringItem = ConsItem::cons( litStringEl.dq_cons_data().loc(),
+ ConsItem::InputText, consData );
+ list = ConsItemList::cons( stringItem );
+ break;
+ }
+ case lit_string_el::_SubList: {
+ list = walkStringElList( litStringEl.StringElList() );
+ break;
+ }}
+ return list;
+ }
+
+ ConsItemList *walkLitStringElList( _repeat_lit_string_el litStringElList, CONS_DQ_NL Nl )
+ {
+ ConsItemList *list = new ConsItemList;
+ while ( !litStringElList.end() ) {
+ ConsItemList *extension = walkLitStringEl( litStringElList.value() );
+ list = consListConcat( list, extension );
+ litStringElList = litStringElList.next();
+ }
+
+ if ( Nl != 0 ) {
+ String consData = unescape( Nl.data() );
+ ConsItem *consItem = ConsItem::cons( Nl.loc(),
+ ConsItem::InputText, consData );
+ ConsItemList *term = ConsItemList::cons( consItem );
+ list = consListConcat( list, term );
+ }
+ return list;
+ }
+
+ ConsItemList *walkStringEl( string_el stringEl )
+ {
+ ConsItemList *list = 0;
+ switch ( stringEl.prodName() ) {
+ case string_el::_Dq: {
+ list = walkLitStringElList( stringEl.LitStringElList(),
+ stringEl.dq_lit_term().CONS_DQ_NL() );
+ break;
+ }
+ case string_el::_Sq: {
+ list = walkConsSqConsDataList( stringEl.SqConsDataList(),
+ stringEl.sq_lit_term().CONS_SQ_NL() );
+ break;
+ }
+ case string_el::_Tilde: {
+ String consData = stringEl.opt_tilde_data().text().c_str();
+ consData += '\n';
+ ConsItem *consItem = ConsItem::cons( stringEl.opt_tilde_data().loc(),
+ ConsItem::InputText, consData );
+ list = ConsItemList::cons( consItem );
+ break;
+ }
+ case string_el::_CodeExpr: {
+ LangExpr *consExpr = walkCodeExpr( stringEl.code_expr() );
+ ConsItem *consItem = ConsItem::cons( consExpr->loc,
+ ConsItem::ExprType, consExpr );
+ list = ConsItemList::cons( consItem );
+ break;
+ }}
+ return list;
+ }
+
+ ConsItemList *walkStringElList( _repeat_string_el stringElList )
+ {
+ ConsItemList *list = new ConsItemList;
+ while ( !stringElList.end() ) {
+ ConsItemList *extension = walkStringEl( stringElList.value() );
+ list = consListConcat( list, extension );
+ stringElList = stringElList.next();
+ }
+ return list;
+ }
+
+ ConsItemList *walkStringTopEl( string_top_el stringTopEl )
+ {
+ ConsItemList *list = 0;
+ switch ( stringTopEl.prodName() ) {
+ case string_top_el::_Dq: {
+ list = walkLitStringElList( stringTopEl.LitStringElList(),
+ stringTopEl.dq_lit_term().CONS_DQ_NL() );
+ break;
+ }
+ case string_el::_Sq: {
+ list = walkConsSqConsDataList( stringTopEl.SqConsDataList(),
+ stringTopEl.sq_lit_term().CONS_SQ_NL() );
+ break;
+ }
+ case string_top_el::_Tilde: {
+ String consData = stringTopEl.opt_tilde_data().text().c_str();
+ consData += '\n';
+ ConsItem *consItem = ConsItem::cons( stringTopEl.opt_tilde_data().loc(),
+ ConsItem::InputText, consData );
+ list = ConsItemList::cons( consItem );
+ break;
+ }
+ case string_top_el::_SubList: {
+ list = walkStringElList( stringTopEl.StringElList() );
+ break;
+ }}
+ return list;
+ }
+
+ ConsItemList *walkStringList( string_list stringList )
+ {
+ ConsItemList *list = walkStringTopEl( stringList.string_top_el() );
+
+ if ( stringList._string_list() != 0 ) {
+ ConsItemList *extension = walkStringList( stringList._string_list() );
+ consListConcat( list, extension );
+ }
+
+ return list;
+ }
+
+ ConsItemList *walkString( string String )
+ {
+ ConsItemList *list = walkStringList( String.string_list() );
+ return list;
+ }
+
+ /*
+ * Accum
+ */
+
+ ConsItemList *walkLitAccumEl( lit_accum_el litAccumEl )
+ {
+ ConsItemList *list = 0;
+ switch ( litAccumEl.prodName() ) {
+ case lit_accum_el::_ConsData: {
+ String consData = unescape( litAccumEl.dq_cons_data().text().c_str() );
+ ConsItem *consItem = ConsItem::cons( litAccumEl.dq_cons_data().loc(),
+ ConsItem::InputText, consData );
+ list = ConsItemList::cons( consItem );
+ break;
+ }
+ case lit_accum_el::_SubList: {
+ list = walkAccumElList( litAccumEl.AccumElList() );
+ break;
+ }}
+ return list;
+ }
+
+ ConsItemList *walkLitAccumElList( _repeat_lit_accum_el litAccumElList, CONS_DQ_NL Nl )
+ {
+ ConsItemList *list = new ConsItemList;
+ while ( !litAccumElList.end() ) {
+ ConsItemList *extension = walkLitAccumEl( litAccumElList.value() );
+ list = consListConcat( list, extension );
+ litAccumElList = litAccumElList.next();
+ }
+
+ if ( Nl != 0 ) {
+ String consData = unescape( Nl.data() );
+ ConsItem *consItem = ConsItem::cons( Nl.loc(), ConsItem::InputText, consData );
+ ConsItemList *term = ConsItemList::cons( consItem );
+ list = consListConcat( list, term );
+ }
+
+ return list;
+ }
+
+ ConsItemList *walkAccumEl( accum_el accumEl )
+ {
+ ConsItemList *list = 0;
+ switch ( accumEl.prodName() ) {
+ case accum_el::_Dq: {
+ list = walkLitAccumElList( accumEl.LitAccumElList(),
+ accumEl.dq_lit_term().CONS_DQ_NL() );
+ break;
+ }
+ case accum_el::_Sq: {
+ list = walkConsSqConsDataList( accumEl.SqConsDataList(),
+ accumEl.sq_lit_term().CONS_SQ_NL() );
+ break;
+ }
+ case accum_el::_Tilde: {
+ String consData = accumEl.opt_tilde_data().text().c_str();
+ consData += '\n';
+ ConsItem *consItem = ConsItem::cons( accumEl.opt_tilde_data().loc(),
+ ConsItem::InputText, consData );
+ list = ConsItemList::cons( consItem );
+ break;
+ }
+ case accum_el::_CodeExpr: {
+ LangExpr *accumExpr = walkCodeExpr( accumEl.code_expr() );
+ ConsItem *consItem = ConsItem::cons( accumExpr->loc,
+ ConsItem::ExprType, accumExpr );
+ list = ConsItemList::cons( consItem );
+ break;
+ }}
+ return list;
+ }
+
+ ConsItemList *walkAccumElList( _repeat_accum_el accumElList )
+ {
+ ConsItemList *list = new ConsItemList;
+ while ( !accumElList.end() ) {
+ ConsItemList *extension = walkAccumEl( accumElList.value() );
+ list = consListConcat( list, extension );
+ accumElList = accumElList.next();
+ }
+ return list;
+ }
+
+ ConsItemList *walkAccumTopEl( accum_top_el accumTopEl )
+ {
+ ConsItemList *list = 0;
+ switch ( accumTopEl.prodName() ) {
+ case accum_top_el::_Dq: {
+ list = walkLitAccumElList( accumTopEl.LitAccumElList(),
+ accumTopEl.dq_lit_term().CONS_DQ_NL() );
+ break;
+ }
+ case accum_top_el::_Sq: {
+ list = walkConsSqConsDataList( accumTopEl.SqConsDataList(),
+ accumTopEl.sq_lit_term().CONS_SQ_NL() );
+ break;
+ }
+ case accum_top_el::_Tilde: {
+ String consData = accumTopEl.opt_tilde_data().text().c_str();
+ consData += '\n';
+ ConsItem *consItem = ConsItem::cons( accumTopEl.opt_tilde_data().loc(),
+ ConsItem::InputText, consData );
+ list = ConsItemList::cons( consItem );
+ break;
+ }
+ case accum_top_el::_SubList: {
+ list = walkAccumElList( accumTopEl.AccumElList() );
+ break;
+ }}
+ return list;
+ }
+
+ ConsItemList *walkAccumList( accum_list accumList )
+ {
+ ConsItemList *list = walkAccumTopEl( accumList.accum_top_el() );
+
+ if ( accumList.prodName() == accum_list::_List ) {
+ ConsItemList *extension = walkAccumList( accumList._accum_list() );
+ consListConcat( list, extension );
+ }
+
+ return list;
+ }
+
+ ConsItemList *walkAccumulate( accumulate Accumulate )
+ {
+ ConsItemList *list = walkAccumList( Accumulate.accum_list() );
+ return list;
+ }
+
+ void walkFieldInit( FieldInitVect *list, field_init fieldInit )
+ {
+ LangExpr *expr = walkCodeExpr( fieldInit.code_expr() );
+ FieldInit *init = FieldInit::cons( expr->loc, "_name", expr );
+ list->append( init );
+ }
+
+ FieldInitVect *walkOptFieldInit( opt_field_init optFieldInit )
+ {
+ FieldInitVect *list = 0;
+ if ( optFieldInit.prodName() == opt_field_init::_Init ) {
+ list = new FieldInitVect;
+ _repeat_field_init fieldInitList = optFieldInit.FieldInitList();
+ while ( !fieldInitList.end() ) {
+ walkFieldInit( list, fieldInitList.value() );
+ fieldInitList = fieldInitList.next();
+ }
+ }
+ return list;
+ }
+
+ LangExpr *walkCodeFactor( code_factor codeFactor )
+ {
+ LangExpr *expr = 0;
+ switch ( codeFactor.prodName() ) {
+ case code_factor::_VarRef: {
+ LangVarRef *langVarRef = walkVarRef( codeFactor.var_ref() );
+ LangTerm *term = LangTerm::cons( langVarRef->loc,
+ LangTerm::VarRefType, langVarRef );
+ expr = LangExpr::cons( term );
+ break;
+ }
+ case code_factor::_Call: {
+ LangVarRef *langVarRef = walkVarRef( codeFactor.var_ref() );
+ CallArgVect *exprVect = walkCallArgList( codeFactor.call_arg_list() );
+ LangTerm *term = LangTerm::cons( langVarRef->loc, langVarRef, exprVect );
+ expr = LangExpr::cons( term );
+ break;
+ }
+ case code_factor::_Number: {
+ String number = codeFactor.number().text().c_str();
+ LangTerm *term = LangTerm::cons( codeFactor.number().loc(),
+ LangTerm::NumberType, number );
+ expr = LangExpr::cons( term );
+ break;
+ }
+ case code_factor::_Parse: {
+ /* The type we are parsing. */
+ type_ref typeRefTree = codeFactor.type_ref();
+ TypeRef *typeRef = walkTypeRef( typeRefTree );
+ ObjectField *objField = walkOptCapture( codeFactor.opt_capture() );
+ FieldInitVect *init = walkOptFieldInit( codeFactor.opt_field_init() );
+ ConsItemList *list = walkAccumulate( codeFactor.accumulate() );
+
+ expr = parseCmd( codeFactor.PARSE().loc(), false, objField,
+ typeRef, init, list );
+ break;
+ }
+ case code_factor::_ParseStop: {
+ /* The type we are parsing. */
+ type_ref typeRefTree = codeFactor.type_ref();
+ TypeRef *typeRef = walkTypeRef( typeRefTree );
+ ObjectField *objField = walkOptCapture( codeFactor.opt_capture() );
+ FieldInitVect *init = walkOptFieldInit( codeFactor.opt_field_init() );
+ ConsItemList *list = walkAccumulate( codeFactor.accumulate() );
+
+ expr = parseCmd( codeFactor.PARSE_STOP().loc(), true, objField,
+ typeRef, init, list );
+ break;
+ }
+ case code_factor::_Cons: {
+ /* The type we are parsing. */
+ type_ref typeRefTree = codeFactor.type_ref();
+ TypeRef *typeRef = walkTypeRef( typeRefTree );
+ ObjectField *objField = walkOptCapture( codeFactor.opt_capture() );
+ ConsItemList *list = walkConstructor( codeFactor.constructor(), typeRef );
+ FieldInitVect *init = walkOptFieldInit( codeFactor.opt_field_init() );
+
+ expr = construct( codeFactor.CONS().loc(), objField, list, typeRef, init );
+ break;
+ }
+ case code_factor::_Send: {
+ LangVarRef *varRef = walkVarRef( codeFactor.var_ref() );
+ ConsItemList *list = walkAccumulate( codeFactor.accumulate() );
+ bool eof = walkOptEos( codeFactor.opt_eos() );
+ expr = send( codeFactor.SEND().loc(), varRef, list, eof );
+ break;
+ }
+ case code_factor::_Nil: {
+ expr = LangExpr::cons( LangTerm::cons( codeFactor.NIL().loc(),
+ LangTerm::NilType ) );
+ break;
+ }
+ case code_factor::_True: {
+ expr = LangExpr::cons( LangTerm::cons( codeFactor.TRUE().loc(),
+ LangTerm::TrueType ) );
+ break;
+ }
+ case code_factor::_False: {
+ expr = LangExpr::cons( LangTerm::cons( codeFactor.FALSE().loc(),
+ LangTerm::FalseType ) );
+ break;
+ }
+ case code_factor::_Paren: {
+ expr = walkCodeExpr( codeFactor.code_expr() );
+ break;
+ }
+ case code_factor::_String: {
+ ConsItemList *list = walkString( codeFactor.string() );
+ expr = LangExpr::cons( LangTerm::cons( codeFactor.string().loc(), list ) );
+ break;
+ }
+ case code_factor::_Match: {
+ LangVarRef *varRef = walkVarRef( codeFactor.var_ref() );
+ PatternItemList *list = walkPattern( codeFactor.pattern(), varRef );
+ expr = match( codeFactor.loc(), varRef, list );
+ break;
+ }
+ case code_factor::_In: {
+ TypeRef *typeRef = walkTypeRef( codeFactor.type_ref() );
+ LangVarRef *varRef = walkVarRef( codeFactor.var_ref() );
+ expr = LangExpr::cons( LangTerm::cons( typeRef->loc,
+ LangTerm::SearchType, typeRef, varRef ) );
+ break;
+ }
+ case code_factor::_MakeTree: {
+ CallArgVect *exprList = walkCallArgList( codeFactor.call_arg_list() );
+ expr = LangExpr::cons( LangTerm::cons( codeFactor.loc(),
+ LangTerm::MakeTreeType, exprList ) );
+ break;
+ }
+ case code_factor::_MakeToken: {
+ CallArgVect *exprList = walkCallArgList( codeFactor.call_arg_list() );
+ expr = LangExpr::cons( LangTerm::cons( codeFactor.loc(),
+ LangTerm::MakeTokenType, exprList ) );
+ break;
+ }
+ case code_factor::_TypeId: {
+ TypeRef *typeRef = walkTypeRef( codeFactor.type_ref() );
+ expr = LangExpr::cons( LangTerm::cons( codeFactor.loc(),
+ LangTerm::TypeIdType, typeRef ) );
+ break;
+ }
+ case code_factor::_New: {
+ LangExpr *newExpr = walkCodeFactor( codeFactor._code_factor() );
+ expr = LangExpr::cons( LangTerm::cons( codeFactor.loc(),
+ LangTerm::NewType, newExpr ) );
+ break;
+ }
+ case code_factor::_Cast: {
+ TypeRef *typeRef = walkTypeRef( codeFactor.type_ref() );
+ LangExpr *castExpr = walkCodeFactor( codeFactor._code_factor() );
+ expr = LangExpr::cons( LangTerm::cons( codeFactor.loc(),
+ LangTerm::CastType, typeRef, castExpr ) );
+ break;
+ }}
+ return expr;
+ }
+
+ LangExpr *walkCodeAdditive( code_additive additive )
+ {
+ LangExpr *expr = 0;
+ switch ( additive.prodName() ) {
+ case code_additive::_Plus: {
+ LangExpr *left = walkCodeAdditive( additive._code_additive() );
+ LangExpr *right = walkCodeMultiplicitive( additive.code_multiplicitive() );
+ expr = LangExpr::cons( additive.PLUS().loc(), left, '+', right );
+ break;
+ }
+ case code_additive::_Minus: {
+ LangExpr *left = walkCodeAdditive( additive._code_additive() );
+ LangExpr *right = walkCodeMultiplicitive( additive.code_multiplicitive() );
+ expr = LangExpr::cons( additive.MINUS().loc(), left, '-', right );
+ break;
+ }
+ case code_additive::_Base: {
+ expr = walkCodeMultiplicitive( additive.code_multiplicitive() );
+ break;
+ }}
+ return expr;
+ }
+
+ LangExpr *walkCodeUnary( code_unary unary )
+ {
+ LangExpr *expr = 0, *factor = walkCodeFactor( unary.code_factor() );
+
+ switch ( unary.prodName() ) {
+ case code_unary::_Bang: {
+ expr = LangExpr::cons( unary.BANG().loc(), '!', factor );
+ break;
+ }
+ case code_unary::_Dollar: {
+ expr = LangExpr::cons( unary.DOLLAR().loc(), '$', factor );
+ break;
+ }
+ case code_unary::_Caret: {
+ expr = LangExpr::cons( unary.CARET().loc(), '^', factor );
+ break;
+ }
+ case code_unary::_Percent: {
+ expr = LangExpr::cons( unary.PERCENT().loc(), '%', factor );
+ break;
+ }
+ case code_unary::_Base: {
+ expr = factor;
+ }}
+
+ return expr;
+ }
+
+ LangExpr *walkCodeRelational( code_relational codeRelational )
+ {
+ LangExpr *expr = 0, *left = 0;
+
+ if ( codeRelational.prodName() != code_relational::_Base )
+ left = walkCodeRelational( codeRelational._code_relational() );
+
+ LangExpr *additive = walkCodeAdditive( codeRelational.code_additive() );
+
+ switch ( codeRelational.prodName() ) {
+ case code_relational::_EqEq: {
+ expr = LangExpr::cons( codeRelational.loc(), left, OP_DoubleEql, additive );
+ break;
+ }
+ case code_relational::_Neq: {
+ expr = LangExpr::cons( codeRelational.loc(), left, OP_NotEql, additive );
+ break;
+ }
+ case code_relational::_Lt: {
+ expr = LangExpr::cons( codeRelational.loc(), left, '<', additive );
+ break;
+ }
+ case code_relational::_Gt: {
+ expr = LangExpr::cons( codeRelational.loc(), left, '>', additive );
+ break;
+ }
+ case code_relational::_LtEq: {
+ expr = LangExpr::cons( codeRelational.loc(), left, OP_LessEql, additive );
+ break;
+ }
+ case code_relational::_GtEq: {
+ expr = LangExpr::cons( codeRelational.loc(), left, OP_GrtrEql, additive );
+ break;
+ }
+ case code_relational::_Base: {
+ expr = additive;
+ break;
+ }}
+ return expr;
+ }
+
+ LangStmt *walkExprStmt( expr_stmt exprStmt )
+ {
+ LangExpr *expr = walkCodeExpr( exprStmt.code_expr() );
+ LangStmt *stmt = LangStmt::cons( expr->loc, LangStmt::ExprType, expr );
+ return stmt;
+ }
+
+ ObjectField *walkVarDef( var_def varDef )
+ {
+ String id = varDef.id().data();
+ TypeRef *typeRef = walkTypeRef( varDef.type_ref() );
+ return ObjectField::cons( varDef.id().loc(), typeRef, id );
+ }
+
+ IterCall *walkIterCall( iter_call Tree )
+ {
+ IterCall *iterCall = 0;
+ switch ( Tree.prodName() ) {
+ case iter_call::_Call: {
+ LangVarRef *varRef = walkVarRef( Tree.var_ref() );
+ CallArgVect *exprVect = walkCallArgList( Tree.call_arg_list() );
+ LangTerm *langTerm = LangTerm::cons( varRef->loc, varRef, exprVect );
+ iterCall = IterCall::cons( IterCall::IterCallForm, langTerm );
+ break;
+ }
+ case iter_call::_Id: {
+ String tree = Tree.id().data();
+ LangVarRef *varRef = LangVarRef::cons( Tree.id().loc(),
+ curContext(), curScope, tree );
+ LangTerm *langTerm = LangTerm::cons( Tree.id().loc(),
+ LangTerm::VarRefType, varRef );
+ LangExpr *langExpr = LangExpr::cons( langTerm );
+ iterCall = IterCall::cons( IterCall::VarRefForm, langExpr );
+ break;
+ }
+ case iter_call::_Expr: {
+ LangExpr *langExpr = walkCodeExpr( Tree.code_expr() );
+ iterCall = IterCall::cons( IterCall::ExprForm, langExpr );
+ break;
+ }}
+
+ return iterCall;
+ }
+
+ LangStmt *walkElsifClause( elsif_clause elsifClause )
+ {
+ pushScope();
+ LangExpr *expr = walkCodeExpr( elsifClause.code_expr() );
+ StmtList *stmtList = walkBlockOrSingle( elsifClause.block_or_single() );
+ LangStmt *stmt = LangStmt::cons( LangStmt::IfType, expr, stmtList, 0 );
+ popScope();
+ return stmt;
+ }
+
+ LangStmt *walkOptionalElse( optional_else optionalElse )
+ {
+ LangStmt *stmt = 0;
+ if ( optionalElse.prodName() == optional_else::_Else ) {
+ pushScope();
+ StmtList *stmtList = walkBlockOrSingle( optionalElse.block_or_single() );
+ stmt = LangStmt::cons( LangStmt::ElseType, stmtList );
+ popScope();
+ }
+ return stmt;
+ }
+
+ LangStmt *walkElsifList( elsif_list elsifList )
+ {
+ LangStmt *stmt = 0;
+ switch ( elsifList.prodName() ) {
+ case elsif_list::_Clause:
+ stmt = walkElsifClause( elsifList.elsif_clause() );
+ stmt->elsePart = walkElsifList( elsifList._elsif_list() );
+ break;
+ case elsif_list::_OptElse:
+ stmt = walkOptionalElse( elsifList.optional_else() );
+ break;
+ }
+ return stmt;
+ }
+
+ void walkContextVarDef( context_var_def ContextVarDef )
+ {
+ ObjectField *objField = walkVarDef( ContextVarDef.var_def() );
+ contextVarDef( objField->loc, objField );
+ }
+
+ TypeRef *walkReferenceTypeRef( reference_type_ref ReferenceTypeRef )
+ {
+ TypeRef *typeRef = walkTypeRef( ReferenceTypeRef.type_ref() );
+ return TypeRef::cons( ReferenceTypeRef.REF().loc(), TypeRef::Ref, typeRef );
+ }
+
+ ObjectField *walkParamVarDef( param_var_def paramVarDef )
+ {
+ String id = paramVarDef.id().data();
+ TypeRef *typeRef = 0;
+
+ switch ( paramVarDef.prodName() ) {
+ case param_var_def::_Type:
+ typeRef = walkTypeRef( paramVarDef.type_ref() );
+ break;
+ case param_var_def::_Ref:
+ typeRef = walkReferenceTypeRef( paramVarDef.reference_type_ref() );
+ break;
+ }
+
+ return addParam( paramVarDef.id().loc(), typeRef, id );
+ }
+
+ ParameterList *walkParamVarDefList( param_var_def_list paramVarDefList )
+ {
+ ParameterList *paramList = new ParameterList;
+ while ( paramVarDefList.param_var_def() != 0 ) {
+ ObjectField *param = walkParamVarDef( paramVarDefList.param_var_def() );
+ appendParam( paramList, param );
+ paramVarDefList = paramVarDefList._param_var_def_list();
+ }
+ return paramList;
+ }
+
+ bool walkOptExport( opt_export OptExport )
+ {
+ return OptExport.prodName() == opt_export::_Export;
+ }
+
+ void walkFunctionDef( function_def FunctionDef )
+ {
+ ObjectDef *localFrame = blockOpen();
+
+ bool exprt = walkOptExport( FunctionDef.opt_export() );
+ TypeRef *typeRef = walkTypeRef( FunctionDef.type_ref() );
+ String id = FunctionDef.id().data();
+ ParameterList *paramList = walkParamVarDefList( FunctionDef.ParamVarDefList() );
+ StmtList *stmtList = walkLangStmtList( FunctionDef.lang_stmt_list() );
+ functionDef( stmtList, localFrame, paramList, typeRef, id, exprt );
+
+ blockClose();
+ }
+
+ void walkIterDef( iter_def IterDef )
+ {
+ ObjectDef *localFrame = blockOpen();
+
+ String id = IterDef.id().data();
+ ParameterList *paramList = walkParamVarDefList( IterDef.ParamVarDefList() );
+ StmtList *stmtList = walkLangStmtList( IterDef.lang_stmt_list() );
+ iterDef( stmtList, localFrame, paramList, id );
+
+ blockClose();
+ }
+
+ void walkContextItem( context_item contextItem )
+ {
+ switch ( contextItem.prodName() ) {
+ case context_item::_Rl:
+ walkRlDef( contextItem.rl_def() );
+ break;
+ case context_item::_ContextVar:
+ walkContextVarDef( contextItem.context_var_def() );
+ break;
+ case context_item::_Token:
+ walkTokenDef( contextItem.token_def() );
+ break;
+ case context_item::_IgnoreCollector:
+ walkIgnoreCollector( contextItem.ic_def() );
+ break;
+ case context_item::_Ignore:
+ walkIgnoreDef( contextItem.ignore_def() );
+ break;
+ case context_item::_Literal:
+ walkLiteralDef( contextItem.literal_def() );
+ break;
+ case context_item::_Cfl:
+ walkCflDef( contextItem.cfl_def() );
+ break;
+ case context_item::_Region:
+ walkLexRegion( contextItem.region_def() );
+ break;
+ case context_item::_Context:
+ walkContextDef( contextItem.context_def() );
+ break;
+ case context_item::_Function:
+ walkFunctionDef( contextItem.function_def() );
+ break;
+ case context_item::_Iter:
+ walkIterDef( contextItem.iter_def() );
+ break;
+ case context_item::_PreEof:
+ walkPreEof( contextItem.pre_eof_def() );
+ break;
+ case context_item::_Export:
+ walkExportDef( contextItem.export_def() );
+ break;
+ case context_item::_Precedence:
+ walkPrecedenceDef( contextItem.precedence_def() );
+ break;
+ }
+ }
+
+ void walkContextDef( context_def contextDef )
+ {
+ String name = contextDef.id().data();
+ contextHead( contextDef.id().loc(), name );
+
+ _repeat_context_item contextItemList = contextDef.ContextItemList();
+ while ( !contextItemList.end() ) {
+ walkContextItem( contextItemList.value() );
+ contextItemList = contextItemList.next();
+ }
+
+ contextStack.pop();
+ namespaceStack.pop();
+ }
+
+ void walkNamespaceDef( namespace_def NamespaceDef )
+ {
+ String name = NamespaceDef.id().data();
+ createNamespace( NamespaceDef.id().loc(), name );
+ walkNamespaceItemList( NamespaceDef.ItemList() );
+ namespaceStack.pop();
+ }
+
+ void walkRootItem( root_item rootItem, StmtList *stmtList )
+ {
+ switch ( rootItem.prodName() ) {
+ case root_item::_Rl:
+ walkRlDef( rootItem.rl_def() );
+ break;
+ case root_item::_Token:
+ walkTokenDef( rootItem.token_def() );
+ break;
+ case root_item::_IgnoreCollector:
+ walkIgnoreCollector( rootItem.ic_def() );
+ break;
+ case root_item::_Ignore:
+ walkIgnoreDef( rootItem.ignore_def() );
+ break;
+ case root_item::_Literal:
+ walkLiteralDef( rootItem.literal_def() );
+ break;
+ case root_item::_Cfl:
+ walkCflDef( rootItem.cfl_def() );
+ break;
+ case root_item::_Region:
+ walkLexRegion( rootItem.region_def() );
+ break;
+ case root_item::_Statement: {
+ LangStmt *stmt = walkStatement( rootItem.statement() );
+ if ( stmt != 0 )
+ stmtList->append( stmt );
+ break;
+ }
+ case root_item::_Context:
+ walkContextDef( rootItem.context_def() );
+ break;
+ case root_item::_Namespace:
+ walkNamespaceDef( rootItem.namespace_def() );
+ break;
+ case root_item::_Function:
+ walkFunctionDef( rootItem.function_def() );
+ break;
+ case root_item::_Iter:
+ walkIterDef( rootItem.iter_def() );
+ break;
+ case root_item::_PreEof:
+ walkPreEof( rootItem.pre_eof_def() );
+ break;
+ case root_item::_Export: {
+ LangStmt *stmt = walkExportDef( rootItem.export_def() );
+ if ( stmt != 0 )
+ stmtList->append( stmt );
+ break;
+ }
+ case root_item::_Alias:
+ walkAliasDef( rootItem.alias_def() );
+ break;
+ case root_item::_Precedence:
+ walkPrecedenceDef( rootItem.precedence_def() );
+ break;
+ case root_item::_Include: {
+ StmtList *includeList = walkInclude( rootItem.include() );
+ stmtList->append( *includeList );
+ break;
+ }
+ case root_item::_Global: {
+ LangStmt *stmt = walkGlobalDef( rootItem.global_def() );
+ if ( stmt != 0 )
+ stmtList->append( stmt );
+ break;
+ }}
+ }
+
+ void walkNamespaceItem( namespace_item item, StmtList *stmtList )
+ {
+ switch ( item.prodName() ) {
+ case namespace_item::_Rl:
+ walkRlDef( item.rl_def() );
+ break;
+ case namespace_item::_Token:
+ walkTokenDef( item.token_def() );
+ break;
+ case root_item::_IgnoreCollector:
+ walkIgnoreCollector( item.ic_def() );
+ break;
+ case namespace_item::_Ignore:
+ walkIgnoreDef( item.ignore_def() );
+ break;
+ case namespace_item::_Literal:
+ walkLiteralDef( item.literal_def() );
+ break;
+ case namespace_item::_Cfl:
+ walkCflDef( item.cfl_def() );
+ break;
+ case namespace_item::_Region:
+ walkLexRegion( item.region_def() );
+ break;
+ case namespace_item::_Context:
+ walkContextDef( item.context_def() );
+ break;
+ case namespace_item::_Namespace:
+ walkNamespaceDef( item.namespace_def() );
+ break;
+ case namespace_item::_Function:
+ walkFunctionDef( item.function_def() );
+ break;
+ case namespace_item::_Iter:
+ walkIterDef( item.iter_def() );
+ break;
+ case namespace_item::_PreEof:
+ walkPreEof( item.pre_eof_def() );
+ break;
+ case namespace_item::_Alias:
+ walkAliasDef( item.alias_def() );
+ break;
+ case namespace_item::_Precedence:
+ walkPrecedenceDef( item.precedence_def() );
+ break;
+ case namespace_item::_Include: {
+ StmtList *includeList = walkInclude( item.include() );
+ stmtList->append( *includeList );
+ break;
+ }}
+ }
+
+ bool walkNoIgnoreLeft( no_ignore_left OptNoIngore )
+ {
+ return OptNoIngore.prodName() == no_ignore_left::_Ni;
+ }
+
+ bool walkNoIgnoreRight( no_ignore_right OptNoIngore )
+ {
+ return OptNoIngore.prodName() == no_ignore_right::_Ni;
+ }
+
+ bool walkOptEos( opt_eos OptEos )
+ {
+ opt_eos::prod_name pn = OptEos.prodName();
+ return pn == opt_eos::_Dot || pn == opt_eos::_Eos;
+ }
+
+ void walkLiteralItem( literal_item literalItem )
+ {
+ bool niLeft = walkNoIgnoreLeft( literalItem.no_ignore_left() );
+ bool niRight = walkNoIgnoreRight( literalItem.no_ignore_right() );
+
+ String lit = literalItem.backtick_lit().data();
+ literalDef( literalItem.backtick_lit().loc(), lit, niLeft, niRight );
+ }
+
+ void walkLiteralList( literal_list literalList )
+ {
+ if ( literalList.prodName() == literal_list::_Item )
+ walkLiteralList( literalList._literal_list() );
+ walkLiteralItem( literalList.literal_item() );
+ }
+
+ void walkLiteralDef( literal_def literalDef )
+ {
+ walkLiteralList( literalDef.literal_list() );
+ }
+
+ StmtList *walkNamespaceItemList( _repeat_namespace_item itemList )
+ {
+ StmtList *stmtList = new StmtList;
+
+ /* Walk the list of items. */
+ while ( !itemList.end() ) {
+ walkNamespaceItem( itemList.value(), stmtList );
+ itemList = itemList.next();
+ }
+ return stmtList;
+ }
+
+
+ StmtList *walkRootItemList( _repeat_root_item rootItemList )
+ {
+ StmtList *stmtList = new StmtList;
+
+ /* Walk the list of items. */
+ while ( !rootItemList.end() ) {
+ walkRootItem( rootItemList.value(), stmtList );
+ rootItemList = rootItemList.next();
+ }
+ return stmtList;
+ }
+
+ virtual void go( long activeRealm );
+};
+
+void LoadColm::go( long activeRealm )
+{
+ LoadColm::init();
+
+ const char *argv[2];
+ argv[0] = inputFileName;
+ argv[1] = 0;
+
+ colm_program *program = colm_new_program( &colm_object );
+ colm_set_debug( program, activeRealm );
+ colm_run_program( program, 1, argv );
+
+ /* Extract the parse tree. */
+ start Start = ColmTree( program );
+ str Error = ColmError( program );
+
+ if ( Start == 0 ) {
+ gblErrorCount += 1;
+ InputLoc loc = Error.loc();
+ error(loc) << inputFileName << ": parse error: " << Error.text() << std::endl;
+ return;
+ }
+
+ StmtList *stmtList = walkRootItemList( Start.RootItemList() );
+ colm_delete_program( program );
+
+ pd->rootCodeBlock = CodeBlock::cons( stmtList, 0 );
+}
+
+BaseParser *consLoadColm( Compiler *pd, const char *inputFileName )
+{
+ return new LoadColm( pd, inputFileName );
+}
diff --git a/src/loadcolm.h b/src/loadcolm.h
new file mode 100644
index 0000000..bfc0589
--- /dev/null
+++ b/src/loadcolm.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2013 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "parser.h"
+
+BaseParser *consLoadColm( Compiler *pd, const char *inputFileName );
diff --git a/src/loadinit.cc b/src/loadinit.cc
new file mode 100644
index 0000000..6cc76b0
--- /dev/null
+++ b/src/loadinit.cc
@@ -0,0 +1,386 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <iostream>
+#include <string>
+#include <errno.h>
+
+#include "parser.h"
+#include "config.h"
+#include "avltree.h"
+#include "parsedata.h"
+#include "parser.h"
+#include "global.h"
+#include "input.h"
+#include "loadinit.h"
+#include "if1.h"
+#include "colm/colm.h"
+
+using std::string;
+
+extern RuntimeData colm_object;
+
+void LoadInit::walkProdElList( String defName, ProdElList *list, prod_el_list &prodElList )
+{
+ if ( prodElList.ProdElList() != 0 ) {
+ prod_el_list RightProdElList = prodElList.ProdElList();
+ walkProdElList( defName, list, RightProdElList );
+ }
+
+ if ( prodElList.ProdEl() != 0 ) {
+ prod_el El = prodElList.ProdEl();
+ String typeName = El.Id().text().c_str();
+
+ ObjectField *captureField = 0;
+ if ( El.OptName().Name() != 0 ) {
+ /* Has a capture. */
+ String fieldName = El.OptName().Name().text().c_str();
+ captureField = ObjectField::cons( internal, 0, fieldName );
+ }
+ else {
+ /* Default the capture to the name of the type. */
+ String fieldName = typeName;
+ if ( strcmp( fieldName, defName ) == 0 )
+ fieldName = "_" + defName;
+ captureField = ObjectField::cons( internal, 0, fieldName );
+ }
+
+ RepeatType repeatType = RepeatNone;
+ if ( El.OptRepeat().Star() != 0 )
+ repeatType = RepeatRepeat;
+
+ ProdEl *prodEl = prodElName( internal, typeName,
+ NamespaceQual::cons( curNspace() ),
+ captureField, repeatType, false );
+
+ appendProdEl( list, prodEl );
+ }
+}
+
+void LoadInit::walkProdList( String defName, LelDefList *outProdList, prod_list &prodList )
+{
+ if ( prodList.ProdList() != 0 ) {
+ prod_list RightProdList = prodList.ProdList();
+ walkProdList( defName, outProdList, RightProdList );
+ }
+
+ ProdElList *outElList = new ProdElList;
+ prod_el_list prodElList = prodList.Prod().ProdElList();
+ walkProdElList( defName, outElList, prodElList );
+
+ String name;
+ if ( prodList.Prod().OptName().Name() != 0 )
+ name = prodList.Prod().OptName().Name().text().c_str();
+
+ bool commit = prodList.Prod().OptCommit().Commit() != 0;
+
+ Production *prod = BaseParser::production( internal, outElList, name, commit, 0, 0 );
+ prodAppend( outProdList, prod );
+}
+
+LexFactor *LoadInit::walkLexFactor( lex_factor &lexFactor )
+{
+ LexFactor *factor = 0;
+ if ( lexFactor.Literal() != 0 ) {
+ String litString = lexFactor.Literal().text().c_str();
+ Literal *literal = Literal::cons( internal, litString, Literal::LitString );
+ factor = LexFactor::cons( literal );
+ }
+ if ( lexFactor.Id() != 0 ) {
+ String id = lexFactor.Id().text().c_str();
+ factor = lexRlFactorName( id, internal );
+ }
+ else if ( lexFactor.Expr() != 0 ) {
+ lex_expr LexExpr = lexFactor.Expr();
+ LexExpression *expr = walkLexExpr( LexExpr );
+ LexJoin *join = LexJoin::cons( expr );
+ factor = LexFactor::cons( join );
+ }
+ else if ( lexFactor.Low() != 0 ) {
+ String low = lexFactor.Low().text().c_str();
+ Literal *lowLit = Literal::cons( internal, low, Literal::LitString );
+
+ String high = lexFactor.High().text().c_str();
+ Literal *highLit = Literal::cons( internal, high, Literal::LitString );
+
+ Range *range = Range::cons( lowLit, highLit );
+ factor = LexFactor::cons( range );
+ }
+ return factor;
+}
+
+LexFactorNeg *LoadInit::walkLexFactorNeg( lex_factor_neg &lexFactorNeg )
+{
+ if ( lexFactorNeg.FactorNeg() != 0 ) {
+ lex_factor_neg Rec = lexFactorNeg.FactorNeg();
+ LexFactorNeg *recNeg = walkLexFactorNeg( Rec );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( recNeg, LexFactorNeg::CharNegateType );
+ return factorNeg;
+ }
+ else {
+ lex_factor LexFactorTree = lexFactorNeg.Factor();
+ LexFactor *factor = walkLexFactor( LexFactorTree );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ return factorNeg;
+ }
+}
+
+LexFactorRep *LoadInit::walkLexFactorRep( lex_factor_rep &lexFactorRep )
+{
+ LexFactorRep *factorRep = 0;
+ if ( lexFactorRep.Star() != 0 ) {
+ lex_factor_rep Rec = lexFactorRep.FactorRep();
+ LexFactorRep *recRep = walkLexFactorRep( Rec );
+ factorRep = LexFactorRep::cons( internal, recRep, 0, 0, LexFactorRep::StarType );
+ }
+ else if ( lexFactorRep.Plus() != 0 ) {
+ lex_factor_rep Rec = lexFactorRep.FactorRep();
+ LexFactorRep *recRep = walkLexFactorRep( Rec );
+ factorRep = LexFactorRep::cons( internal, recRep, 0, 0, LexFactorRep::PlusType );
+ }
+ else {
+ lex_factor_neg LexFactorNegTree = lexFactorRep.FactorNeg();
+ LexFactorNeg *factorNeg = walkLexFactorNeg( LexFactorNegTree );
+ factorRep = LexFactorRep::cons( factorNeg );
+ }
+ return factorRep;
+}
+
+LexFactorAug *LoadInit::walkLexFactorAug( lex_factor_rep &lexFactorRep )
+{
+ LexFactorRep *factorRep = walkLexFactorRep( lexFactorRep );
+ return LexFactorAug::cons( factorRep );
+}
+
+LexTerm *LoadInit::walkLexTerm( lex_term &lexTerm )
+{
+ if ( lexTerm.Term() != 0 ) {
+ lex_term Rec = lexTerm.Term();
+ LexTerm *leftTerm = walkLexTerm( Rec );
+
+ lex_factor_rep LexFactorRepTree = lexTerm.FactorRep();
+ LexFactorAug *factorAug = walkLexFactorAug( LexFactorRepTree );
+ LexTerm *term = LexTerm::cons( leftTerm, factorAug, LexTerm::ConcatType );
+ return term;
+ }
+ else {
+ lex_factor_rep LexFactorRepTree = lexTerm.FactorRep();
+ LexFactorAug *factorAug = walkLexFactorAug( LexFactorRepTree );
+ LexTerm *term = LexTerm::cons( factorAug );
+ return term;
+ }
+}
+
+LexExpression *LoadInit::walkLexExpr( lex_expr &LexExprTree )
+{
+ if ( LexExprTree.Expr() != 0 ) {
+ lex_expr Rec = LexExprTree.Expr();
+ LexExpression *leftExpr = walkLexExpr( Rec );
+
+ lex_term lexTerm = LexExprTree.Term();
+ LexTerm *term = walkLexTerm( lexTerm );
+ LexExpression *expr = LexExpression::cons( leftExpr, term, LexExpression::OrType );
+
+ return expr;
+ }
+ else {
+ lex_term lexTerm = LexExprTree.Term();
+ LexTerm *term = walkLexTerm( lexTerm );
+ LexExpression *expr = LexExpression::cons( term );
+ return expr;
+ }
+}
+
+bool walkNoIgnore( opt_ni OptNi )
+{
+ return OptNi.Ni() != 0;
+}
+
+void LoadInit::walkTokenList( token_list &tokenList )
+{
+ if ( tokenList.TokenList() != 0 ) {
+ token_list RightTokenList = tokenList.TokenList();
+ walkTokenList( RightTokenList );
+ }
+
+ if ( tokenList.TokenDef() != 0 ) {
+ token_def tokenDef = tokenList.TokenDef();
+ String name = tokenDef.Id().text().c_str();
+
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ );
+
+ lex_expr LexExpr = tokenDef.Expr();
+ LexExpression *expr = walkLexExpr( LexExpr );
+ LexJoin *join = LexJoin::cons( expr );
+
+ bool leftNi = walkNoIgnore( tokenDef.LeftNi() );
+ bool rightNi = walkNoIgnore( tokenDef.RightNi() );
+
+ defineToken( internal, name, join, objectDef, 0, false, leftNi, rightNi );
+ }
+
+ if ( tokenList.IgnoreDef() != 0 ) {
+ ignore_def IgnoreDef = tokenList.IgnoreDef();
+
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, String(), pd->nextObjectId++ );
+
+ lex_expr LexExpr = IgnoreDef.Expr();
+ LexExpression *expr = walkLexExpr( LexExpr );
+ LexJoin *join = LexJoin::cons( expr );
+
+ defineToken( internal, String(), join, objectDef, 0, true, false, false );
+ }
+}
+
+void LoadInit::walkLexRegion( item &LexRegion )
+{
+ pushRegionSet( internal );
+
+ token_list tokenList = LexRegion.TokenList();
+ walkTokenList( tokenList );
+
+ popRegionSet();
+}
+
+void LoadInit::walkDefinition( item &define )
+{
+ prod_list ProdList = define.ProdList();
+
+ String name = define.DefId().text().c_str();
+
+ LelDefList *defList = new LelDefList;
+ walkProdList( name, defList, ProdList );
+
+ NtDef *ntDef = NtDef::cons( name, curNspace(), curContext(), false );
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType, name, pd->nextObjectId++ );
+ cflDef( ntDef, objectDef, defList );
+}
+
+void LoadInit::consParseStmt( StmtList *stmtList )
+{
+ /* Parse the "start" def. */
+ NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() );
+ TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, String("start"), RepeatNone );
+
+ /* Pop argv, this yields the file name . */
+ CallArgVect *popArgs = new CallArgVect;
+ QualItemVect *popQual = new QualItemVect;
+ popQual->append( QualItem( QualItem::Dot, internal, String( "argv" ) ) );
+
+ LangVarRef *popRef = LangVarRef::cons( internal, 0, curLocalFrame->rootScope, popQual, String("pop") );
+ LangExpr *pop = LangExpr::cons( LangTerm::cons( InputLoc(), popRef, popArgs ) );
+
+ /* Construct a literal string 'r', for second arg to open. */
+ ConsItem *modeConsItem = ConsItem::cons( internal, ConsItem::InputText, String("r") );
+ ConsItemList *modeCons = new ConsItemList;
+ modeCons->append( modeConsItem );
+ LangExpr *modeExpr = LangExpr::cons( LangTerm::cons( internal, modeCons ) );
+
+ /* Call open. */
+ QualItemVect *openQual = new QualItemVect;
+ LangVarRef *openRef = LangVarRef::cons( internal,
+ 0, curLocalFrame->rootScope, openQual, String("open") );
+ CallArgVect *openArgs = new CallArgVect;
+ openArgs->append( new CallArg(pop) );
+ openArgs->append( new CallArg(modeExpr) );
+ LangExpr *open = LangExpr::cons( LangTerm::cons( InputLoc(), openRef, openArgs ) );
+
+ /* Construct a list containing the open stream. */
+ ConsItem *consItem = ConsItem::cons( internal, ConsItem::ExprType, open );
+ ConsItemList *list = ConsItemList::cons( consItem );
+
+ /* Will capture the parser to "P" */
+ ObjectField *objField = ObjectField::cons( internal, 0, String("P") );
+
+ /* Parse the above list. */
+ LangExpr *parseExpr = parseCmd( internal, false, objField, typeRef, 0, list );
+ LangStmt *parseStmt = LangStmt::cons( internal, LangStmt::ExprType, parseExpr );
+ stmtList->append( parseStmt );
+}
+
+void LoadInit::consExportTree( StmtList *stmtList )
+{
+ QualItemVect *qual = new QualItemVect;
+ LangVarRef *varRef = LangVarRef::cons( internal, 0, curLocalFrame->rootScope, qual, String("P") );
+ LangExpr *expr = LangExpr::cons( LangTerm::cons( internal, LangTerm::VarRefType, varRef ) );
+
+ NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() );
+ TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, String("start"), RepeatNone );
+ ObjectField *program = ObjectField::cons( internal, typeRef, String("ColmTree") );
+ LangStmt *programExport = exportStmt( program, LangStmt::AssignType, expr );
+ stmtList->append( programExport );
+}
+
+void LoadInit::consExportError( StmtList *stmtList )
+{
+ QualItemVect *qual = new QualItemVect;
+ LangVarRef *varRef = LangVarRef::cons( internal, 0, curLocalFrame->rootScope, qual, String("error") );
+ LangExpr *expr = LangExpr::cons( LangTerm::cons( internal, LangTerm::VarRefType, varRef ) );
+
+ NamespaceQual *nspaceQual = NamespaceQual::cons( curNspace() );
+ TypeRef *typeRef = TypeRef::cons( internal, nspaceQual, String("str"), RepeatNone );
+ ObjectField *program = ObjectField::cons( internal, typeRef, String("ColmError") );
+ LangStmt *programExport = exportStmt( program, LangStmt::AssignType, expr );
+ stmtList->append( programExport );
+}
+
+void LoadInit::go( long activeRealm )
+{
+ LoadInit::init();
+
+ StmtList *stmtList = new StmtList;
+
+ const char *argv[2];
+ argv[0] = inputFileName;
+ argv[1] = 0;
+
+ colm_program *program = colm_new_program( &colm_object );
+ colm_run_program( program, 1, argv );
+
+ /* Extract the parse tree. */
+ start Start = ColmTree( program );
+
+ if ( Start == 0 ) {
+ gblErrorCount += 1;
+ std::cerr << inputFileName << ": parse error" << std::endl;
+ return;
+ }
+
+ /* Walk the list of items. */
+ _repeat_item ItemList = Start.ItemList();
+ while ( !ItemList.end() ) {
+
+ item Item = ItemList.value();
+ if ( Item.DefId() != 0 )
+ walkDefinition( Item );
+ else if ( Item.TokenList() != 0 )
+ walkLexRegion( Item );
+ ItemList = ItemList.next();
+ }
+
+ colm_delete_program( program );
+
+ consParseStmt( stmtList );
+ consExportTree( stmtList );
+ consExportError( stmtList );
+
+ pd->rootCodeBlock = CodeBlock::cons( stmtList, 0 );
+}
diff --git a/src/loadinit.h b/src/loadinit.h
new file mode 100644
index 0000000..6aea12a
--- /dev/null
+++ b/src/loadinit.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2013 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <iostream>
+#include "avltree.h"
+#include "parsedata.h"
+#include "parser.h"
+
+struct lex_factor;
+struct lex_factor_neg;
+struct lex_factor_rep;
+struct lex_term;
+struct lex_expr;
+struct token_list;
+struct prod_el_list;
+struct prod_list;
+struct item;
+
+struct LoadInit
+:
+ public BaseParser
+{
+ LoadInit( Compiler *pd, const char *inputFileName )
+ :
+ BaseParser(pd),
+ inputFileName(inputFileName)
+ {}
+
+ const char *inputFileName;
+
+ /* Constructing the colm language data structures from the the parse tree. */
+ LexFactor *walkLexFactor( lex_factor &LexFactorTree );
+ LexFactorNeg *walkLexFactorNeg( lex_factor_neg &LexFactorNegTree );
+ LexFactorRep *walkLexFactorRep( lex_factor_rep &LexFactorRepTree );
+ LexFactorAug *walkLexFactorAug( lex_factor_rep &LexFactorRepTree );
+ LexTerm *walkLexTerm( lex_term &LexTerm );
+ LexExpression *walkLexExpr( lex_expr &LexExpr );
+ void walkTokenList( token_list &TokenList );
+ void walkLexRegion( item &LexRegion );
+ void walkProdElList( String defName, ProdElList *list, prod_el_list &prodElList );
+ void walkProdList( String defName, LelDefList *list, prod_list &prodList );
+ void walkDefinition( item &define );
+
+ /* Constructing statements needed to parse and export the input. */
+ void consParseStmt( StmtList *stmtList );
+ void consExportTree( StmtList *stmtList );
+ void consExportError( StmtList *stmtList );
+
+ virtual void go( long activeRealm );
+};
diff --git a/src/lookup.cc b/src/lookup.cc
new file mode 100644
index 0000000..3809de3
--- /dev/null
+++ b/src/lookup.cc
@@ -0,0 +1,243 @@
+/*
+ * Copyright 2007-2014 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "bytecode.h"
+#include "parsedata.h"
+
+#include <iostream>
+#include <assert.h>
+
+using std::cout;
+using std::cerr;
+using std::endl;
+
+ObjectDef *UniqueType::objectDef()
+{
+ if ( typeId != TYPE_TREE && typeId != TYPE_REF ) {
+ /* This should have generated a compiler error. */
+ assert(false);
+ }
+
+ return langEl->objectDef;
+}
+
+/* Recurisve find through a single object def's scope. */
+ObjectField *ObjectDef::findFieldInScope( const ObjNameScope *inScope, const String &name ) const
+{
+ ObjFieldMapEl *objDefMapEl = inScope->objFieldMap->find( name );
+ if ( objDefMapEl != 0 )
+ return objDefMapEl->value;
+ if ( inScope->parentScope != 0 )
+ return findFieldInScope( inScope->parentScope, name );
+ return 0;
+}
+
+ObjectField *ObjNameScope::findField( const String &name ) const
+{
+ return owner->findFieldInScope( this, name );
+}
+
+ObjMethod *ObjectDef::findMethod( const String &name ) const
+{
+ ObjMethodMapEl *objMethodMapEl = objMethodMap->find( name );
+ if ( objMethodMapEl != 0 )
+ return objMethodMapEl->value;
+ return 0;
+}
+
+VarRefLookup LangVarRef::lookupQualification( Compiler *pd, ObjNameScope *rootScope ) const
+{
+ int lastPtrInQual = -1;
+ ObjNameScope *searchScope = rootScope;
+ int firstConstPart = -1;
+
+ for ( QualItemVect::Iter qi = *qual; qi.lte(); qi++ ) {
+ /* Lookup the field int the current qualification. */
+ ObjectField *el = searchScope->findField( qi->data );
+ if ( el == 0 )
+ error(qi->loc) << "cannot resolve qualification " << qi->data << endp;
+
+ /* Lookup the type of the field. */
+ el->typeRef->resolveType( pd );
+ UniqueType *qualUT = el->typeRef->uniqueType;
+
+ /* If we are dealing with an iterator then dereference it. */
+ if ( qualUT->typeId == TYPE_ITER )
+ qualUT = el->typeRef->searchUniqueType;
+
+ /* Is it const? */
+ if ( firstConstPart < 0 && el->isConst )
+ firstConstPart = qi.pos();
+
+ /* Check for references. When loop is done we will have the last one
+ * present, if any. */
+ if ( qualUT->typeId == TYPE_PTR )
+ lastPtrInQual = qi.pos();
+
+ if ( qi->form == QualItem::Dot ) {
+ /* Cannot dot a reference. Iterator yes (access of the iterator
+ * not the current) */
+ if ( qualUT->typeId == TYPE_PTR )
+ error(loc) << "dot cannot be used to access a pointer" << endp;
+ }
+ else if ( qi->form == QualItem::Arrow ) {
+ if ( qualUT->typeId == TYPE_ITER )
+ qualUT = el->typeRef->searchUniqueType;
+ else if ( qualUT->typeId == TYPE_PTR )
+ qualUT = pd->findUniqueType( TYPE_TREE, qualUT->langEl );
+ }
+
+ ObjectDef *searchObjDef = qualUT->objectDef();
+ searchScope = searchObjDef->rootScope;
+ }
+
+ return VarRefLookup( lastPtrInQual, firstConstPart, searchScope->owner, searchScope );
+}
+
+bool LangVarRef::isLocalRef() const
+{
+ if ( qual->length() > 0 ) {
+ if ( scope->findField( qual->data[0].data ) != 0 )
+ return true;
+ }
+ else if ( scope->findField( name ) != 0 )
+ return true;
+ else if ( scope->owner->findMethod( name ) != 0 )
+ return true;
+
+ return false;
+}
+
+bool LangVarRef::isContextRef() const
+{
+ if ( context != 0 ) {
+ if ( qual->length() > 0 ) {
+ if ( context->contextObjDef->rootScope->findField( qual->data[0].data ) != 0 )
+ return true;
+ }
+ else if ( context->contextObjDef->rootScope->findField( name ) != 0 )
+ return true;
+ else if ( context->contextObjDef->findMethod( name ) != 0 )
+ return true;
+ }
+
+ return false;
+}
+
+bool LangVarRef::isCustom() const
+{
+ if ( qual->length() > 0 ) {
+ ObjectField *field = scope->findField( qual->data[0].data );
+ if ( field != 0 && field->isCustom )
+ return true;
+ }
+ else {
+ ObjectField *field = scope->findField( name );
+ if ( field != 0 ) {
+ if ( field->isCustom )
+ return true;
+ }
+ else {
+ ObjMethod *method = scope->owner->findMethod( name );
+ if ( method != 0 && method->isCustom )
+ return true;
+ }
+
+ }
+ return false;
+}
+
+VarRefLookup LangVarRef::lookupObj( Compiler *pd ) const
+{
+ ObjNameScope *rootScope;
+ if ( isLocalRef() )
+ rootScope = scope;
+ else if ( isContextRef() )
+ rootScope = context->contextObjDef->rootScope;
+ else
+ rootScope = pd->globalObjectDef->rootScope;
+
+ return lookupQualification( pd, rootScope );
+}
+
+VarRefLookup LangVarRef::lookupField( Compiler *pd ) const
+{
+ /* Lookup the object that the field is in. */
+ VarRefLookup lookup = lookupObj( pd );
+
+ /* Lookup the field. */
+ ObjectField *field = lookup.inScope->findField( name );
+ if ( field == 0 )
+ error(loc) << "cannot find name " << name << " in object" << endp;
+
+ lookup.objField = field;
+ lookup.uniqueType = field->typeRef->uniqueType;
+
+ if ( field->typeRef->searchUniqueType != 0 )
+ lookup.iterSearchUT = field->typeRef->searchUniqueType;
+
+ return lookup;
+}
+
+UniqueType *LangVarRef::lookup( Compiler *pd ) const
+{
+ /* Lookup the loadObj. */
+ VarRefLookup lookup = lookupField( pd );
+
+ ObjectField *el = lookup.objField;
+ UniqueType *elUT = el->typeRef->resolveType( pd );
+
+ /* Deref iterators. */
+ if ( elUT->typeId == TYPE_ITER )
+ elUT = el->typeRef->searchUniqueType;
+
+ return elUT;
+}
+
+
+VarRefLookup LangVarRef::lookupMethod( Compiler *pd ) const
+{
+ /* Lookup the object that the field is in. */
+ VarRefLookup lookup = lookupObj( pd );
+
+ /* Find the method. */
+ assert( lookup.inObject->objMethodMap != 0 );
+ ObjMethod *method = lookup.inObject->findMethod( name );
+ if ( method == 0 ) {
+ /* Not found as a method, try it as an object on which we will call a
+ * default function. */
+ qual->append( QualItem( QualItem::Dot, loc, name ) );
+
+ /* Lookup the object that the field is in. */
+ VarRefLookup lookup = lookupObj( pd );
+
+ /* Find the method. */
+ assert( lookup.inObject->objMethodMap != 0 );
+ method = lookup.inObject->findMethod( "finish" );
+ if ( method == 0 )
+ error(loc) << "cannot find " << name << "(...) in object" << endp;
+ }
+
+ lookup.objMethod = method;
+ lookup.uniqueType = method->returnUT;
+
+ return lookup;
+}
diff --git a/src/main.cc b/src/main.cc
new file mode 100644
index 0000000..aaf46e6
--- /dev/null
+++ b/src/main.cc
@@ -0,0 +1,670 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <iostream>
+#include <fstream>
+#include <unistd.h>
+#include <sstream>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "global.h"
+#include "debug.h"
+#include "pcheck.h"
+#include "vector.h"
+#include "version.h"
+#include "keyops.h"
+#include "parsedata.h"
+#include "vector.h"
+#include "version.h"
+#include "fsmcodegen.h"
+#include "colm.h"
+
+#if defined(CONS_INIT)
+#include "consinit.h"
+#elif defined(LOAD_INIT)
+#include "loadinit.h"
+#else
+#include "loadcolm.h"
+#endif
+
+using std::istream;
+using std::ifstream;
+using std::ostream;
+using std::ios;
+using std::cin;
+using std::cout;
+using std::cerr;
+using std::endl;
+
+/* Graphviz dot file generation. */
+bool genGraphviz = false;
+
+using std::ostream;
+using std::istream;
+using std::ifstream;
+using std::ofstream;
+using std::ios;
+using std::cout;
+using std::cerr;
+using std::cin;
+using std::endl;
+
+InputLoc internal;
+
+/* Io globals. */
+istream *inStream = 0;
+ostream *outStream = 0;
+const char *inputFn = 0;
+const char *outputFn = 0;
+const char *intermedFn = 0;
+const char *binaryFn = 0;
+const char *exportHeaderFn = 0;
+const char *exportCodeFn = 0;
+bool exportCode = false;
+
+bool generateGraphviz = false;
+bool verbose = false;
+bool logging = false;
+bool branchPointInfo = false;
+bool addUniqueEmptyProductions = false;
+bool gblLibrary = false;
+long gblActiveRealm = 0;
+
+ArgsVector includePaths;
+
+/* Print version information. */
+void version();
+
+/* Total error count. */
+int gblErrorCount = 0;
+
+HostType hostTypesC[] =
+{
+ { "char", 0, CHAR_MIN, CHAR_MAX, sizeof(char) },
+};
+
+HostLang hostLangC = { hostTypesC, 8, hostTypesC+0, true };
+HostLang *hostLang = &hostLangC;
+
+/* Print the opening to an error in the input, then return the error ostream. */
+ostream &error( const InputLoc &loc )
+{
+ /* Keep the error count. */
+ gblErrorCount += 1;
+
+ if ( loc.fileName != 0 )
+ cerr << loc.fileName << ":";
+ else
+ cerr << "<input>:";
+
+ if ( loc.line == -1 ) {
+ cerr << "INT: ";
+ }
+ else {
+ cerr << loc.line << ":" << loc.col << ": ";
+ }
+ return cerr;
+}
+
+/* Print the opening to a program error, then return the error stream. */
+ostream &error()
+{
+ gblErrorCount += 1;
+ cerr << "error: " PROGNAME ": ";
+ return cerr;
+}
+
+
+/* Print the opening to a warning, then return the error ostream. */
+ostream &warning( )
+{
+ cerr << "warning: " << inputFn << ": ";
+ return cerr;
+}
+
+/* Print the opening to a warning in the input, then return the error ostream. */
+ostream &warning( const InputLoc &loc )
+{
+ assert( inputFn != 0 );
+ cerr << "warning: " << inputFn << ":" <<
+ loc.line << ":" << loc.col << ": ";
+ return cerr;
+}
+
+void escapeLineDirectivePath( std::ostream &out, char *path )
+{
+ for ( char *pc = path; *pc != 0; pc++ ) {
+ if ( *pc == '\\' )
+ out << "\\\\";
+ else
+ out << *pc;
+ }
+}
+
+void escapeLineDirectivePath( std::ostream &out, char *path );
+void scan( char *fileName, istream &input );
+
+bool printStatistics = false;
+
+/* Print a summary of the options. */
+void usage()
+{
+ cout <<
+"usage: colm [options] file\n"
+"general:\n"
+" -h, -H, -?, --help print this usage and exit\n"
+" -v --version print version information and exit\n"
+" -o <file> write output to <file>\n"
+" -c compile only (don't produce binary)\n"
+" -e <file> write C++ export header to <file>\n"
+" -x <file> write C++ export code to <file>\n"
+ ;
+}
+
+/* Print version information. */
+void version()
+{
+ cout << "Colm version " VERSION << " " PUBDATE << endl <<
+ "Copyright (c) 2007-2012 by Adrian D. Thurston" << endl;
+}
+
+/* Scans a string looking for the file extension. If there is a file
+ * extension then pointer returned points to inside the string
+ * passed in. Otherwise returns null. */
+const char *findFileExtension( const char *stemFile )
+{
+ const char *ppos = stemFile + strlen(stemFile) - 1;
+
+ /* Scan backwards from the end looking for the first dot.
+ * If we encounter a '/' before the first dot, then stop the scan. */
+ while ( 1 ) {
+ /* If we found a dot or got to the beginning of the string then
+ * we are done. */
+ if ( ppos == stemFile || *ppos == '.' )
+ break;
+
+ /* If we hit a / then there is no extension. Done. */
+ if ( *ppos == '/' ) {
+ ppos = stemFile;
+ break;
+ }
+ ppos--;
+ }
+
+ /* If we got to the front of the string then bail we
+ * did not find an extension */
+ if ( ppos == stemFile )
+ ppos = 0;
+
+ return ppos;
+}
+
+/* Make a file name from a stem. Removes the old filename suffix and
+ * replaces it with a new one. Returns a newed up string. */
+char *fileNameFromStem( const char *stemFile, const char *suffix )
+{
+ int len = strlen( stemFile );
+ assert( len > 0 );
+
+ /* Get the extension. */
+ const char *ppos = findFileExtension( stemFile );
+
+ /* If an extension was found, then shorten what we think the len is. */
+ if ( ppos != 0 )
+ len = ppos - stemFile;
+
+ int slen = suffix != 0 ? strlen( suffix ) : 0;
+ char *retVal = new char[ len + slen + 1 ];
+ strncpy( retVal, stemFile, len );
+ if ( suffix != 0 )
+ strcpy( retVal + len, suffix );
+ retVal[len+slen] = 0;
+
+ return retVal;
+}
+
+void openOutputCompiled()
+{
+ if ( binaryFn == 0 )
+ binaryFn = fileNameFromStem( inputFn, 0 );
+
+ if ( intermedFn == 0 )
+ intermedFn = fileNameFromStem( binaryFn, ".c" );
+
+ if ( binaryFn != 0 && inputFn != 0 &&
+ strcmp( inputFn, binaryFn ) == 0 )
+ {
+ error() << "output file \"" << binaryFn <<
+ "\" is the same as the input file" << endl;
+ }
+
+ if ( intermedFn != 0 && inputFn != 0 &&
+ strcmp( inputFn, intermedFn ) == 0 )
+ {
+ error() << "intermediate file \"" << intermedFn <<
+ "\" is the same as the input file" << endl;
+ }
+
+ if ( intermedFn != 0 ) {
+ /* Open the output stream, attaching it to the filter. */
+ ofstream *outFStream = new ofstream( intermedFn );
+
+ if ( !outFStream->is_open() ) {
+ error() << "error opening " << intermedFn << " for writing" << endl;
+ exit(1);
+ }
+
+ outStream = outFStream;
+ }
+ else {
+ /* Writing out ot std out. */
+ outStream = &cout;
+ }
+}
+
+void openOutputLibrary()
+{
+ if ( outputFn == 0 )
+ outputFn = fileNameFromStem( inputFn, ".c" );
+
+ /* Make sure we are not writing to the same file as the input file. */
+ if ( outputFn != 0 && inputFn != 0 &&
+ strcmp( inputFn, outputFn ) == 0 )
+ {
+ error() << "output file \"" << outputFn <<
+ "\" is the same as the input file" << endl;
+ }
+
+ if ( outputFn != 0 ) {
+ /* Open the output stream, attaching it to the filter. */
+ ofstream *outFStream = new ofstream( outputFn );
+
+ if ( !outFStream->is_open() ) {
+ error() << "error opening " << outputFn << " for writing" << endl;
+ exit(1);
+ }
+
+ outStream = outFStream;
+ }
+ else {
+ /* Writing out ot std out. */
+ outStream = &cout;
+ }
+}
+
+void openExports( )
+{
+ /* Make sure we are not writing to the same file as the input file. */
+ if ( inputFn != 0 && exportHeaderFn != 0 && strcmp( inputFn, exportHeaderFn ) == 0 ) {
+ error() << "output file \"" << exportHeaderFn <<
+ "\" is the same as the input file" << endl;
+ }
+
+ if ( exportHeaderFn != 0 ) {
+ /* Open the output stream, attaching it to the filter. */
+ ofstream *outFStream = new ofstream( exportHeaderFn );
+
+ if ( !outFStream->is_open() ) {
+ error() << "error opening " << exportHeaderFn << " for writing" << endl;
+ exit(1);
+ }
+
+ outStream = outFStream;
+ }
+ else {
+ /* Writing out ot std out. */
+ outStream = &cout;
+ }
+}
+
+void openExportsImpl( )
+{
+ /* Make sure we are not writing to the same file as the input file. */
+ if ( inputFn != 0 && exportCodeFn != 0 && strcmp( inputFn, exportCodeFn ) == 0 ) {
+ error() << "output file \"" << exportCodeFn <<
+ "\" is the same as the input file" << endl;
+ }
+
+ if ( exportCodeFn != 0 ) {
+ /* Open the output stream, attaching it to the filter. */
+ ofstream *outFStream = new ofstream( exportCodeFn );
+
+ if ( !outFStream->is_open() ) {
+ error() << "error opening " << exportCodeFn << " for writing" << endl;
+ exit(1);
+ }
+
+ outStream = outFStream;
+ }
+ else {
+ /* Writing out ot std out. */
+ outStream = &cout;
+ }
+}
+
+void compileOutputCommand( const char *command )
+{
+ //cout << "compiling with: " << command << endl;
+ int res = system( command );
+ if ( res != 0 )
+ error() << "there was a problem compiling the output" << endl;
+}
+
+void compileOutputInstalled( const char *argv0 )
+{
+ /* Find the location of the colm program that is executing. */
+ char *location = strdup( argv0 );
+ char *last = location + strlen(location) - 1;
+ while ( true ) {
+ if ( last == location ) {
+ last[0] = '.';
+ last[1] = 0;
+ break;
+ }
+ if ( *last == '/' ) {
+ last[0] = 0;
+ break;
+ }
+ last -= 1;
+ }
+
+ int length = 1024 + strlen(intermedFn) + strlen(binaryFn);
+ char command[length];
+ sprintf( command,
+ "gcc -Wall -Wwrite-strings"
+ " -I" PREFIX "/include"
+ " -g"
+ " -o %s"
+ " %s"
+ " -L" PREFIX "/lib"
+ " -lcolmd",
+ binaryFn, intermedFn );
+
+ compileOutputCommand( command );
+}
+
+void compileOutputInSource( const char *argv0 )
+{
+ /* Find the location of the colm program that is executing. */
+ char *location = strdup( argv0 );
+ char *last = strrchr( location, '/' );
+ assert( last != 0 );
+ last[0] = 0;
+
+ int length = 1024 + 3 * strlen(location) + strlen(intermedFn) + strlen(binaryFn);
+ char command[length];
+ sprintf( command,
+ "gcc -Wall -Wwrite-strings"
+ " -I%s/../aapl"
+ " -I%s/include"
+ " -g"
+ " -o %s"
+ " %s"
+ " -L%s"
+ " -lcolmd",
+ location, location,
+ binaryFn, intermedFn, location );
+
+ compileOutputCommand( command );
+}
+
+bool inSourceTree( const char *argv0 )
+{
+ const char *lastSlash = strrchr( argv0, '/' );
+ if ( lastSlash != 0 ) {
+ int rootLen = lastSlash - argv0 + 1;
+ char *mainPath = new char[rootLen + 16];
+ memcpy( mainPath, argv0, rootLen );
+ strcpy( mainPath + rootLen, "main.cc" );
+
+ struct stat sb;
+ int res = stat( mainPath, &sb );
+ delete[] mainPath;
+
+ if ( res == 0 && S_ISREG( sb.st_mode ) )
+ return true;
+ }
+
+ return false;
+}
+
+void processArgs( int argc, const char **argv )
+{
+ ParamCheck pc( "cD:e:x:I:vdlio:S:M:vHh?-:sV", argc, argv );
+
+ while ( pc.check() ) {
+ switch ( pc.state ) {
+ case ParamCheck::match:
+ switch ( pc.parameter ) {
+ case 'I':
+ includePaths.append( pc.parameterArg );
+ break;
+ case 'v':
+ version();
+ exit(0);
+ break;
+ case 'd':
+ verbose = true;
+ break;
+ case 'l':
+ logging = true;
+ break;
+ case 'i':
+ branchPointInfo = true;
+ break;
+ /* Output. */
+ case 'o':
+ if ( *pc.parameterArg == 0 )
+ error() << "a zero length output file name was given" << endl;
+ else if ( outputFn != 0 )
+ error() << "more than one output file name was given" << endl;
+ else {
+ /* Ok, remember the output file name. */
+ outputFn = pc.parameterArg;
+ }
+ break;
+
+ case 'H': case 'h': case '?':
+ usage();
+ exit(0);
+ case 's':
+ printStatistics = true;
+ break;
+ case 'V':
+ generateGraphviz = true;
+ break;
+ case '-':
+ if ( strcasecmp(pc.parameterArg, "help") == 0 ) {
+ usage();
+ exit(0);
+ }
+ else if ( strcasecmp(pc.parameterArg, "version") == 0 ) {
+ version();
+ exit(0);
+ }
+ else {
+ error() << "--" << pc.parameterArg <<
+ " is an invalid argument" << endl;
+ }
+ break;
+ case 'c':
+ gblLibrary = true;
+ break;
+ case 'e':
+ exportHeaderFn = pc.parameterArg;
+ break;
+ case 'x':
+ exportCodeFn = pc.parameterArg;
+ break;
+ case 'D':
+#if DEBUG
+ if ( strcmp( pc.parameterArg, "BYTECODE" ) == 0 )
+ gblActiveRealm |= REALM_BYTECODE;
+ else if ( strcmp( pc.parameterArg, "PARSE" ) == 0 )
+ gblActiveRealm |= REALM_PARSE;
+ else if ( strcmp( pc.parameterArg, "MATCH" ) == 0 )
+ gblActiveRealm |= REALM_MATCH;
+ else if ( strcmp( pc.parameterArg, "COMPILE" ) == 0 )
+ gblActiveRealm |= REALM_COMPILE;
+ else if ( strcmp( pc.parameterArg, "POOL" ) == 0 )
+ gblActiveRealm |= REALM_POOL;
+ else if ( strcmp( pc.parameterArg, "PRINT" ) == 0 )
+ gblActiveRealm |= REALM_PRINT;
+ else if ( strcmp( pc.parameterArg, "INPUT" ) == 0 )
+ gblActiveRealm |= REALM_INPUT;
+ else if ( strcmp( pc.parameterArg, "SCAN" ) == 0 )
+ gblActiveRealm |= REALM_SCAN;
+ else
+ fatal( "unknown argument to -D %s\n", pc.parameterArg );
+#else
+ fatal( "-D option specified but debugging messsages not compiled in\n" );
+#endif
+
+ }
+ break;
+
+ case ParamCheck::invalid:
+ error() << "-" << pc.parameter << " is an invalid argument" << endl;
+ break;
+
+ case ParamCheck::noparam:
+ /* It is interpreted as an input file. */
+ if ( *pc.curArg == 0 )
+ error() << "a zero length input file name was given" << endl;
+ else if ( inputFn != 0 )
+ error() << "more than one input file name was given" << endl;
+ else {
+ /* OK, Remember the filename. */
+ inputFn = pc.curArg;
+ }
+ break;
+ }
+ }
+}
+
+/* Main, process args and call yyparse to start scanning input. */
+int main(int argc, const char **argv)
+{
+ processArgs( argc, argv );
+
+ if ( verbose )
+ gblActiveRealm = 0xffffffff;
+
+ /* Bail on above errors. */
+ if ( gblErrorCount > 0 )
+ exit(1);
+
+ /* Make sure we are not writing to the same file as the input file. */
+ if ( inputFn != 0 && outputFn != 0 &&
+ strcmp( inputFn, outputFn ) == 0 )
+ {
+ error() << "output file \"" << outputFn <<
+ "\" is the same as the input file" << endl;
+ }
+
+
+#if defined(LOAD_INIT) || defined(LOAD_COLM)
+ /* Open the input file for reading. */
+ if ( inputFn == 0 ) {
+ error() << "colm: no input file given" << endl;
+ }
+ else {
+ /* Open the input file for reading. */
+ ifstream *inFile = new ifstream( inputFn );
+ if ( ! inFile->is_open() )
+ error() << "could not open " << inputFn << " for reading" << endl;
+ delete inFile;
+ }
+#endif
+
+ /* Bail on above errors. */
+ if ( gblErrorCount > 0 )
+ exit(1);
+
+ Compiler *pd = new Compiler;
+
+#if defined(CONS_INIT)
+ BaseParser *parser = new ConsInit( pd );
+#elif defined(LOAD_INIT)
+ BaseParser *parser = new LoadInit( pd, inputFn );
+#else
+ BaseParser *parser = consLoadColm( pd, inputFn );
+#endif
+
+ parser->go( gblActiveRealm );
+
+ /* Parsing complete, check for errors.. */
+ if ( gblErrorCount > 0 )
+ return 1;
+
+ /* Initiate a compile following a parse. */
+ pd->compile();
+
+ /*
+ * Write output.
+ */
+ if ( generateGraphviz ) {
+ outStream = &cout;
+ pd->writeDotFile();
+ }
+ else {
+ if ( gblLibrary )
+ openOutputLibrary();
+ else
+ openOutputCompiled();
+
+ pd->generateOutput( gblActiveRealm );
+ if ( outStream != 0 )
+ delete outStream;
+
+ if ( !gblLibrary ) {
+ if ( inSourceTree( argv[0] ) )
+ compileOutputInSource( argv[0] );
+ else
+ compileOutputInstalled( argv[0] );
+ }
+
+ if ( exportHeaderFn != 0 ) {
+ openExports();
+ pd->generateExports();
+ delete outStream;
+ }
+ if ( exportCodeFn != 0 ) {
+ openExportsImpl();
+ pd->generateExportsImpl();
+ delete outStream;
+ }
+ }
+
+ delete parser;
+ delete pd;
+
+ /* Bail on above errors. */
+ if ( gblErrorCount > 0 )
+ exit(1);
+
+ return 0;
+}
diff --git a/src/map.c b/src/map.c
new file mode 100644
index 0000000..4609db5
--- /dev/null
+++ b/src/map.c
@@ -0,0 +1,763 @@
+/*
+ * Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <assert.h>
+#include <colm/pdarun.h>
+#include <colm/map.h>
+#include <colm/pool.h>
+
+#define true 1
+#define false 0
+
+void mapListAbandon( Map *map )
+{
+ map->head = map->tail = 0;
+}
+
+void mapListAddBefore( Map *map, MapEl *next_el, MapEl *new_el )
+{
+ /* Set the next pointer of the new element to next_el. We do
+ * this regardless of the state of the list. */
+ new_el->next = next_el;
+
+ /* Set reverse pointers. */
+ if ( next_el == 0 ) {
+ /* There is no next elememnt. We are inserting at the tail. */
+ new_el->prev = map->tail;
+ map->tail = new_el;
+ }
+ else {
+ /* There is a next element and we can access next's previous. */
+ new_el->prev = next_el->prev;
+ next_el->prev = new_el;
+ }
+
+ /* Set forward pointers. */
+ if ( new_el->prev == 0 ) {
+ /* There is no previous element. Set the head pointer.*/
+ map->head = new_el;
+ }
+ else {
+ /* There is a previous element, set it's next pointer to new_el. */
+ new_el->prev->next = new_el;
+ }
+}
+
+void mapListAddAfter( Map *map, MapEl *prev_el, MapEl *new_el )
+{
+ /* Set the previous pointer of new_el to prev_el. We do
+ * this regardless of the state of the list. */
+ new_el->prev = prev_el;
+
+ /* Set forward pointers. */
+ if (prev_el == 0) {
+ /* There was no prev_el, we are inserting at the head. */
+ new_el->next = map->head;
+ map->head = new_el;
+ }
+ else {
+ /* There was a prev_el, we can access previous next. */
+ new_el->next = prev_el->next;
+ prev_el->next = new_el;
+ }
+
+ /* Set reverse pointers. */
+ if (new_el->next == 0) {
+ /* There is no next element. Set the tail pointer. */
+ map->tail = new_el;
+ }
+ else {
+ /* There is a next element. Set it's prev pointer. */
+ new_el->next->prev = new_el;
+ }
+}
+
+
+MapEl *mapListDetach( Map *map, MapEl *el )
+{
+ /* Set forward pointers to skip over el. */
+ if ( el->prev == 0 )
+ map->head = el->next;
+ else
+ el->prev->next = el->next;
+
+ /* Set reverse pointers to skip over el. */
+ if ( el->next == 0 )
+ map->tail = el->prev;
+ else
+ el->next->prev = el->prev;
+
+ /* Update List length and return element we detached. */
+ return el;
+}
+
+
+/* Once an insertion position is found, attach a element to the tree. */
+void mapAttachRebal( Map *map, MapEl *element, MapEl *parentEl, MapEl *lastLess )
+{
+ /* Increment the number of element in the tree. */
+ map->treeSize += 1;
+
+ /* Set element's parent. */
+ element->parent = parentEl;
+
+ /* New element always starts as a leaf with height 1. */
+ element->left = 0;
+ element->right = 0;
+ element->height = 1;
+
+ /* Are we inserting in the tree somewhere? */
+ if ( parentEl != 0 ) {
+ /* We have a parent so we are somewhere in the tree. If the parent
+ * equals lastLess, then the last traversal in the insertion went
+ * left, otherwise it went right. */
+ if ( lastLess == parentEl ) {
+ parentEl->left = element;
+
+ mapListAddBefore( map, parentEl, element );
+ }
+ else {
+ parentEl->right = element;
+
+ mapListAddAfter( map, parentEl, element );
+ }
+ }
+ else {
+ /* No parent element so we are inserting the root. */
+ map->root = element;
+
+ mapListAddAfter( map, map->tail, element );
+ }
+
+ /* Recalculate the heights. */
+ mapRecalcHeights( map, parentEl );
+
+ /* Find the first unbalance. */
+ MapEl *ub = mapFindFirstUnbalGP( map, element );
+
+ /* rebalance. */
+ if ( ub != 0 )
+ {
+ /* We assert that after this single rotation the
+ * tree is now properly balanced. */
+ mapRebalance( map, ub );
+ }
+}
+
+#if 0
+/* Recursively delete all the children of a element. */
+void mapDeleteChildrenOf( Map *map, MapEl *element )
+{
+ /* Recurse left. */
+ if ( element->left ) {
+ mapDeleteChildrenOf( map, element->left );
+
+ /* Delete left element. */
+ delete element->left;
+ element->left = 0;
+ }
+
+ /* Recurse right. */
+ if ( element->right ) {
+ mapDeleteChildrenOf( map, element->right );
+
+ /* Delete right element. */
+ delete element->right;
+ element->left = 0;
+ }
+}
+
+void mapEmpty( Map *map )
+{
+ if ( map->root ) {
+ /* Recursively delete from the tree structure. */
+ mapDeleteChildrenOf( map, map->root );
+ delete map->root;
+ map->root = 0;
+ map->treeSize = 0;
+
+ mapListAbandon( map );
+ }
+}
+#endif
+
+/* rebalance from a element whose gradparent is unbalanced. Only
+ * call on a element that has a grandparent. */
+MapEl *mapRebalance( Map *map, MapEl *n )
+{
+ long lheight, rheight;
+ MapEl *a, *b, *c;
+ MapEl *t1, *t2, *t3, *t4;
+
+ MapEl *p = n->parent; /* parent (Non-NUL). L*/
+ MapEl *gp = p->parent; /* Grand-parent (Non-NULL). */
+ MapEl *ggp = gp->parent; /* Great grand-parent (may be NULL). */
+
+ if (gp->right == p)
+ {
+ /* gp
+ * * p
+ p
+ */
+ if (p->right == n)
+ {
+ /* gp
+ * * p
+ p
+ * * n
+ n
+ */
+ a = gp;
+ b = p;
+ c = n;
+ t1 = gp->left;
+ t2 = p->left;
+ t3 = n->left;
+ t4 = n->right;
+ }
+ else
+ {
+ /* gp
+ * * p
+ p
+ * /
+ * n
+ */
+ a = gp;
+ b = n;
+ c = p;
+ t1 = gp->left;
+ t2 = n->left;
+ t3 = n->right;
+ t4 = p->right;
+ }
+ }
+ else
+ {
+ /* gp
+ * /
+ * p
+ */
+ if (p->right == n)
+ {
+ /* gp
+ * /
+ * p
+ * * n
+ n
+ */
+ a = p;
+ b = n;
+ c = gp;
+ t1 = p->left;
+ t2 = n->left;
+ t3 = n->right;
+ t4 = gp->right;
+ }
+ else
+ {
+ /* gp
+ * /
+ * p
+ * /
+ * n
+ */
+ a = n;
+ b = p;
+ c = gp;
+ t1 = n->left;
+ t2 = n->right;
+ t3 = p->right;
+ t4 = gp->right;
+ }
+ }
+
+ /* Perform rotation.
+ */
+
+ /* Tie b to the great grandparent. */
+ if ( ggp == 0 )
+ map->root = b;
+ else if ( ggp->left == gp )
+ ggp->left = b;
+ else
+ ggp->right = b;
+ b->parent = ggp;
+
+ /* Tie a as a leftchild of b. */
+ b->left = a;
+ a->parent = b;
+
+ /* Tie c as a rightchild of b. */
+ b->right = c;
+ c->parent = b;
+
+ /* Tie t1 as a leftchild of a. */
+ a->left = t1;
+ if ( t1 != 0 ) t1->parent = a;
+
+ /* Tie t2 as a rightchild of a. */
+ a->right = t2;
+ if ( t2 != 0 ) t2->parent = a;
+
+ /* Tie t3 as a leftchild of c. */
+ c->left = t3;
+ if ( t3 != 0 ) t3->parent = c;
+
+ /* Tie t4 as a rightchild of c. */
+ c->right = t4;
+ if ( t4 != 0 ) t4->parent = c;
+
+ /* The heights are all recalculated manualy and the great
+ * grand-parent is passed to recalcHeights() to ensure
+ * the heights are correct up the tree.
+ *
+ * Note that recalcHeights() cuts out when it comes across
+ * a height that hasn't changed.
+ */
+
+ /* Fix height of a. */
+ lheight = a->left ? a->left->height : 0;
+ rheight = a->right ? a->right->height : 0;
+ a->height = (lheight > rheight ? lheight : rheight) + 1;
+
+ /* Fix height of c. */
+ lheight = c->left ? c->left->height : 0;
+ rheight = c->right ? c->right->height : 0;
+ c->height = (lheight > rheight ? lheight : rheight) + 1;
+
+ /* Fix height of b. */
+ lheight = a->height;
+ rheight = c->height;
+ b->height = (lheight > rheight ? lheight : rheight) + 1;
+
+ /* Fix height of b's parents. */
+ mapRecalcHeights( map, ggp );
+ return ggp;
+}
+
+/* Recalculates the heights of all the ancestors of element. */
+void mapRecalcHeights( Map *map, MapEl *element )
+{
+ while ( element != 0 )
+ {
+ long lheight = element->left ? element->left->height : 0;
+ long rheight = element->right ? element->right->height : 0;
+
+ long new_height = (lheight > rheight ? lheight : rheight) + 1;
+
+ /* If there is no chage in the height, then there will be no
+ * change in any of the ancestor's height. We can stop going up.
+ * If there was a change, continue upward. */
+ if (new_height == element->height)
+ return;
+ else
+ element->height = new_height;
+
+ element = element->parent;
+ }
+}
+
+/* Finds the first element whose grandparent is unbalanced. */
+MapEl *mapFindFirstUnbalGP( Map *map, MapEl *element )
+{
+ long lheight, rheight, balanceProp;
+ MapEl *gp;
+
+ if ( element == 0 || element->parent == 0 ||
+ element->parent->parent == 0 )
+ return 0;
+
+ /* Don't do anything if we we have no grandparent. */
+ gp = element->parent->parent;
+ while ( gp != 0 )
+ {
+ lheight = gp->left ? gp->left->height : 0;
+ rheight = gp->right ? gp->right->height : 0;
+ balanceProp = lheight - rheight;
+
+ if ( balanceProp < -1 || balanceProp > 1 )
+ return element;
+
+ element = element->parent;
+ gp = gp->parent;
+ }
+ return 0;
+}
+
+
+
+/* Finds the first element that is unbalanced. */
+MapEl *mapFindFirstUnbalEl( Map *map, MapEl *element )
+{
+ if ( element == 0 )
+ return 0;
+
+ while ( element != 0 )
+ {
+ long lheight = element->left ?
+ element->left->height : 0;
+ long rheight = element->right ?
+ element->right->height : 0;
+ long balanceProp = lheight - rheight;
+
+ if ( balanceProp < -1 || balanceProp > 1 )
+ return element;
+
+ element = element->parent;
+ }
+ return 0;
+}
+
+/* Replace a element in the tree with another element not in the tree. */
+void mapReplaceEl( Map *map, MapEl *element, MapEl *replacement )
+{
+ MapEl *parent = element->parent,
+ *left = element->left,
+ *right = element->right;
+
+ replacement->left = left;
+ if (left)
+ left->parent = replacement;
+ replacement->right = right;
+ if (right)
+ right->parent = replacement;
+
+ replacement->parent = parent;
+ if (parent)
+ {
+ if (parent->left == element)
+ parent->left = replacement;
+ else
+ parent->right = replacement;
+ }
+ else {
+ map->root = replacement;
+ }
+
+ replacement->height = element->height;
+}
+
+
+/* Removes a element from a tree and puts filler in it's place.
+ * Filler should be null or a child of element. */
+void mapRemoveEl( Map *map, MapEl *element, MapEl *filler )
+{
+ MapEl *parent = element->parent;
+
+ if ( parent )
+ {
+ if ( parent->left == element )
+ parent->left = filler;
+ else
+ parent->right = filler;
+ }
+ else {
+ map->root = filler;
+ }
+
+ if ( filler )
+ filler->parent = parent;
+
+ return;
+}
+
+/* Recursive worker for tree copying. */
+MapEl *mapCopyBranch( Program *prg, Map *map, MapEl *el, Kid *oldNextDown, Kid **newNextDown )
+{
+ /* Duplicate element. Either the base element's copy constructor or defaul
+ * constructor will get called. Both will suffice for initting the
+ * pointers to null when they need to be. */
+ MapEl *newEl = mapElAllocate( prg );
+
+ if ( (Kid*)el == oldNextDown )
+ *newNextDown = (Kid*)newEl;
+
+ /* If the left tree is there, copy it. */
+ if ( newEl->left ) {
+ newEl->left = mapCopyBranch( prg, map, newEl->left, oldNextDown, newNextDown );
+ newEl->left->parent = newEl;
+ }
+
+ mapListAddAfter( map, map->tail, newEl );
+
+ /* If the right tree is there, copy it. */
+ if ( newEl->right ) {
+ newEl->right = mapCopyBranch( prg, map, newEl->right, oldNextDown, newNextDown );
+ newEl->right->parent = newEl;
+ }
+
+ return newEl;
+}
+
+MapEl *mapInsertEl( Program *prg, Map *map, MapEl *element, MapEl **lastFound )
+{
+ long keyRelation;
+ MapEl *curEl = map->root, *parentEl = 0;
+ MapEl *lastLess = 0;
+
+ while ( true ) {
+ if ( curEl == 0 ) {
+ /* We are at an external element and did not find the key we were
+ * looking for. Attach underneath the leaf and rebalance. */
+ mapAttachRebal( map, element, parentEl, lastLess );
+
+ if ( lastFound != 0 )
+ *lastFound = element;
+ return element;
+ }
+
+ keyRelation = cmpTree( prg,
+ element->key, curEl->key );
+
+ /* Do we go left? */
+ if ( keyRelation < 0 ) {
+ parentEl = lastLess = curEl;
+ curEl = curEl->left;
+ }
+ /* Do we go right? */
+ else if ( keyRelation > 0 ) {
+ parentEl = curEl;
+ curEl = curEl->right;
+ }
+ /* We have hit the target. */
+ else {
+ if ( lastFound != 0 )
+ *lastFound = curEl;
+ return 0;
+ }
+ }
+}
+
+MapEl *mapInsertKey( Program *prg, Map *map, Tree *key, MapEl **lastFound )
+{
+ long keyRelation;
+ MapEl *curEl = map->root, *parentEl = 0;
+ MapEl *lastLess = 0;
+
+ while ( true ) {
+ if ( curEl == 0 ) {
+ /* We are at an external element and did not find the key we were
+ * looking for. Create the new element, attach it underneath the leaf
+ * and rebalance. */
+ MapEl *element = mapElAllocate( prg );
+ element->key = key;
+ element->tree = 0;
+ mapAttachRebal( map, element, parentEl, lastLess );
+
+ if ( lastFound != 0 )
+ *lastFound = element;
+ return element;
+ }
+
+ keyRelation = cmpTree( prg, key, curEl->key );
+
+ /* Do we go left? */
+ if ( keyRelation < 0 ) {
+ parentEl = lastLess = curEl;
+ curEl = curEl->left;
+ }
+ /* Do we go right? */
+ else if ( keyRelation > 0 ) {
+ parentEl = curEl;
+ curEl = curEl->right;
+ }
+ /* We have hit the target. */
+ else {
+ if ( lastFound != 0 )
+ *lastFound = curEl;
+ return 0;
+ }
+ }
+}
+
+
+/**
+ * \brief Find a element in the tree with the given key.
+ *
+ * \returns The element if key exists, null if the key does not exist.
+ */
+MapEl *mapImplFind( Program *prg, Map *map, Tree *key )
+{
+ MapEl *curEl = map->root;
+ long keyRelation;
+
+ while ( curEl != 0 ) {
+ keyRelation = cmpTree( prg, key, curEl->key );
+
+ /* Do we go left? */
+ if ( keyRelation < 0 )
+ curEl = curEl->left;
+ /* Do we go right? */
+ else if ( keyRelation > 0 )
+ curEl = curEl->right;
+ /* We have hit the target. */
+ else {
+ return curEl;
+ }
+ }
+ return 0;
+}
+
+
+/**
+ * \brief Find a element, then detach it from the tree.
+ *
+ * The element is not deleted.
+ *
+ * \returns The element detached if the key is found, othewise returns null.
+ */
+MapEl *mapDetachByKey( Program *prg, Map *map, Tree *key )
+{
+ MapEl *element = mapImplFind( prg, map, key );
+ if ( element )
+ mapDetach( prg, map, element );
+
+ return element;
+}
+
+/**
+ * \brief Detach a element from the tree.
+ *
+ * If the element is not in the tree then undefined behaviour results.
+ *
+ * \returns The element given.
+ */
+MapEl *mapDetach( Program *prg, Map *map, MapEl *element )
+{
+ MapEl *replacement, *fixfrom;
+ long lheight, rheight;
+
+ /* Remove the element from the ordered list. */
+ mapListDetach( map, element );
+
+ /* Update treeSize. */
+ map->treeSize--;
+
+ /* Find a replacement element. */
+ if (element->right)
+ {
+ /* Find the leftmost element of the right subtree. */
+ replacement = element->right;
+ while (replacement->left)
+ replacement = replacement->left;
+
+ /* If replacing the element the with its child then we need to start
+ * fixing at the replacement, otherwise we start fixing at the
+ * parent of the replacement. */
+ if (replacement->parent == element)
+ fixfrom = replacement;
+ else
+ fixfrom = replacement->parent;
+
+ mapRemoveEl( map, replacement, replacement->right );
+ mapReplaceEl( map, element, replacement );
+ }
+ else if (element->left)
+ {
+ /* Find the rightmost element of the left subtree. */
+ replacement = element->left;
+ while (replacement->right)
+ replacement = replacement->right;
+
+ /* If replacing the element the with its child then we need to start
+ * fixing at the replacement, otherwise we start fixing at the
+ * parent of the replacement. */
+ if (replacement->parent == element)
+ fixfrom = replacement;
+ else
+ fixfrom = replacement->parent;
+
+ mapRemoveEl( map, replacement, replacement->left );
+ mapReplaceEl( map, element, replacement );
+ }
+ else
+ {
+ /* We need to start fixing at the parent of the element. */
+ fixfrom = element->parent;
+
+ /* The element we are deleting is a leaf element. */
+ mapRemoveEl( map, element, 0 );
+ }
+
+ /* If fixfrom is null it means we just deleted
+ * the root of the tree. */
+ if ( fixfrom == 0 )
+ return element;
+
+ /* Fix the heights after the deletion. */
+ mapRecalcHeights( map, fixfrom );
+
+ /* Fix every unbalanced element going up in the tree. */
+ MapEl *ub = mapFindFirstUnbalEl( map, fixfrom );
+ while ( ub )
+ {
+ /* Find the element to rebalance by moving down from the first unbalanced
+ * element 2 levels in the direction of the greatest heights. On the
+ * second move down, the heights may be equal ( but not on the first ).
+ * In which case go in the direction of the first move. */
+ lheight = ub->left ? ub->left->height : 0;
+ rheight = ub->right ? ub->right->height : 0;
+ assert( lheight != rheight );
+ if (rheight > lheight)
+ {
+ ub = ub->right;
+ lheight = ub->left ?
+ ub->left->height : 0;
+ rheight = ub->right ?
+ ub->right->height : 0;
+ if (rheight > lheight)
+ ub = ub->right;
+ else if (rheight < lheight)
+ ub = ub->left;
+ else
+ ub = ub->right;
+ }
+ else
+ {
+ ub = ub->left;
+ lheight = ub->left ?
+ ub->left->height : 0;
+ rheight = ub->right ?
+ ub->right->height : 0;
+ if (rheight > lheight)
+ ub = ub->right;
+ else if (rheight < lheight)
+ ub = ub->left;
+ else
+ ub = ub->left;
+ }
+
+
+ /* rebalance returns the grandparant of the subtree formed
+ * by the element that were rebalanced.
+ * We must continue upward from there rebalancing. */
+ fixfrom = mapRebalance( map, ub );
+
+ /* Find the next unbalaced element. */
+ ub = mapFindFirstUnbalEl( map, fixfrom );
+ }
+
+ return element;
+}
+
+
+
diff --git a/src/map.h b/src/map.h
new file mode 100644
index 0000000..06007ad
--- /dev/null
+++ b/src/map.h
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _MAP_H
+#define _MAP_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#include <colm/program.h>
+
+typedef struct _MapEl
+{
+ /* Must overlay Kid. */
+ Tree *tree;
+ struct _MapEl *next;
+ struct _MapEl *prev;
+
+ struct _MapEl *left, *right, *parent;
+ long height;
+ Tree *key;
+} MapEl;
+
+typedef struct _Map
+{
+ /* Must overlay Tree. */
+ short id;
+ unsigned short flags;
+ long refs;
+ MapEl *head;
+
+ MapEl *tail;
+ MapEl *root;
+ long treeSize;
+ GenericInfo *genericInfo;
+} Map;
+
+void mapListAbandon( Map *map );
+
+void mapListAddBefore( Map *map, MapEl *next_el, MapEl *new_el );
+void mapListAddAfter( Map *map, MapEl *prev_el, MapEl *new_el );
+MapEl *mapListDetach( Map *map, MapEl *el );
+void mapAttachRebal( Map *map, MapEl *element, MapEl *parentEl, MapEl *lastLess );
+void mapDeleteChildrenOf( Map *map, MapEl *element );
+void mapEmpty( Map *map );
+MapEl *mapRebalance( Map *map, MapEl *n );
+void mapRecalcHeights( Map *map, MapEl *element );
+MapEl *mapFindFirstUnbalGP( Map *map, MapEl *element );
+MapEl *mapFindFirstUnbalEl( Map *map, MapEl *element );
+void mapRemoveEl( Map *map, MapEl *element, MapEl *filler );
+void mapReplaceEl( Map *map, MapEl *element, MapEl *replacement );
+MapEl *mapInsertEl( Program *prg, Map *map, MapEl *element, MapEl **lastFound );
+MapEl *mapInsertKey( Program *prg, Map *map, Tree *key, MapEl **lastFound );
+MapEl *mapImplFind( Program *prg, Map *map, Tree *key );
+MapEl *mapDetachByKey( Program *prg, Map *map, Tree *key );
+MapEl *mapDetach( Program *prg, Map *map, MapEl *element );
+MapEl *mapCopyBranch( Program *prg, Map *map, MapEl *el, Kid *oldNextDown, Kid **newNextDown );
+
+long cmpTree( Program *prg, const Tree *tree1, const Tree *tree2 );
+
+void mapImplRemoveEl( Program *prg, Map *map, MapEl *element );
+int mapImplRemoveKey( Program *prg, Map *map, Tree *key );
+
+Tree *mapFind( Program *prg, Map *map, Tree *key );
+long mapLength( Map *map );
+Tree *mapUnstore( Program *prg, Map *map, Tree *key, Tree *existing );
+int mapInsert( Program *prg, Map *map, Tree *key, Tree *element );
+void mapUnremove( Program *prg, Map *map, Tree *key, Tree *element );
+Tree *mapUninsert( Program *prg, Map *map, Tree *key );
+Tree *mapStore( Program *prg, Map *map, Tree *key, Tree *element );
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
+
diff --git a/src/parse1.c b/src/parse1.c
new file mode 100644
index 0000000..2127891
--- /dev/null
+++ b/src/parse1.c
@@ -0,0 +1,2329 @@
+#include <colm/pdarun.h>
+#include <colm/debug.h>
+#include <colm/bytecode.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <colm/config.h>
+#include <colm/defs.h>
+#include <colm/input.h>
+#include <colm/tree.h>
+#include <colm/program.h>
+#include <colm/colm.h>
+
+
+extern RuntimeData colm_program_text;
+
+#define parser_start 7
+#define parser_first_final 7
+#define parser_error 0
+#define false 0
+#define true 1
+
+static long parser_entryByRegion[] = {
+ 0, 7, 32, 56, 56
+};
+
+static FsmTables fsmTables_start =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ parser_entryByRegion,
+
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 4,
+
+ parser_start,
+ parser_first_final,
+ parser_error,
+
+ 0,
+ 0
+};
+
+static void fsmExecute( FsmRun *fsmRun, StreamImpl *inputStream )
+{
+ fsmRun->start = fsmRun->p;
+/*_resume:*/
+ if ( fsmRun->cs == 0 )
+ goto out;
+ if ( fsmRun->p == fsmRun->pe )
+ goto out_switch;
+ --fsmRun->p;
+
+ switch ( fsmRun->cs )
+ {
+tr1:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 24;
+ goto out;
+}
+ goto st7;
+tr3:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 28;
+ goto out;
+}
+ goto st7;
+tr12:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 19;
+ goto out;
+}
+ goto st7;
+tr13:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 20;
+ goto out;
+}
+ goto st7;
+tr14:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 29;
+ goto out;
+}
+ goto st7;
+tr15:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 30;
+ goto out;
+}
+ goto st7;
+tr17:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 16;
+ goto out;
+}
+ goto st7;
+tr18:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 17;
+ goto out;
+}
+ goto st7;
+tr20:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 13;
+ goto out;
+}
+ goto st7;
+tr21:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 14;
+ goto out;
+}
+ goto st7;
+tr22:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 22;
+ goto out;
+}
+ goto st7;
+tr30:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 15;
+ goto out;
+}
+ goto st7;
+tr31:
+ { fsmRun->matchedToken = 23;
+ goto out;
+}
+ goto st7;
+tr32:
+ { fsmRun->matchedToken = 18;
+ goto out;
+}
+ goto st7;
+tr33:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 21;
+ goto out;
+}
+ goto st7;
+tr34:
+ { fsmRun->toklen = fsmRun->tokend;
+ switch( fsmRun->act ) {
+ case 5:
+ fsmRun->matchedToken = 8;
+ break;
+ case 7:
+ fsmRun->matchedToken = 9;
+ break;
+ case 9:
+ fsmRun->matchedToken = 10;
+ break;
+ case 11:
+ fsmRun->matchedToken = 11;
+ break;
+ case 13:
+ fsmRun->matchedToken = 12;
+ break;
+ case 15:
+ fsmRun->matchedToken = 25;
+ break;
+ case 17:
+ fsmRun->matchedToken = 26;
+ break;
+ case 19:
+ fsmRun->matchedToken = 27;
+ break;
+ }
+ goto skip_toklen;
+}
+ goto st7;
+tr35:
+ { fsmRun->matchedToken = 27;
+ goto out;
+}
+ goto st7;
+st7:
+case 7:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out7;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 32: goto st8;
+ case 35: goto st1;
+ case 39: goto st2;
+ case 40: goto tr12;
+ case 41: goto tr13;
+ case 42: goto tr14;
+ case 43: goto tr15;
+ case 46: goto st9;
+ case 47: goto tr17;
+ case 58: goto tr18;
+ case 91: goto tr20;
+ case 93: goto tr21;
+ case 94: goto tr22;
+ case 95: goto tr19;
+ case 99: goto st11;
+ case 100: goto st16;
+ case 101: goto st18;
+ case 105: goto st20;
+ case 108: goto st25;
+ case 110: goto st27;
+ case 116: goto st28;
+ case 124: goto tr30;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 11 )
+ goto st8;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto st0;
+st8:
+case 8:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out8;
+ if ( (*fsmRun->p) == 32 )
+ goto st8;
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 11 )
+ goto st8;
+ goto tr31;
+st1:
+case 1:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out1;
+ if ( (*fsmRun->p) == 10 )
+ goto tr1;
+ goto st1;
+st2:
+case 2:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out2;
+ switch( (*fsmRun->p) ) {
+ case 39: goto tr3;
+ case 92: goto st3;
+ }
+ goto st2;
+st3:
+case 3:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out3;
+ goto st2;
+st9:
+case 9:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out9;
+ if ( (*fsmRun->p) == 46 )
+ goto tr33;
+ goto tr32;
+tr19:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 19;}
+ goto st10;
+tr40:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 17;}
+ goto st10;
+tr42:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 5;}
+ goto st10;
+tr44:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 9;}
+ goto st10;
+tr49:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 13;}
+ goto st10;
+tr51:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 7;}
+ goto st10;
+tr52:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 15;}
+ goto st10;
+tr56:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 11;}
+ goto st10;
+st10:
+case 10:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out10;
+ if ( (*fsmRun->p) == 95 )
+ goto tr19;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr34;
+st11:
+case 11:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out11;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 111: goto st12;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st12:
+case 12:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out12;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 109: goto st13;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st13:
+case 13:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out13;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 109: goto st14;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st14:
+case 14:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out14;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 105: goto st15;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st15:
+case 15:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out15;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 116: goto tr40;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st16:
+case 16:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out16;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 101: goto st17;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st17:
+case 17:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out17;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 102: goto tr42;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st18:
+case 18:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out18;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 110: goto st19;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st19:
+case 19:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out19;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 100: goto tr44;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st20:
+case 20:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out20;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 103: goto st21;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st21:
+case 21:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out21;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 110: goto st22;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st22:
+case 22:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out22;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 111: goto st23;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st23:
+case 23:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out23;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 114: goto st24;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st24:
+case 24:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out24;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 101: goto tr49;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st25:
+case 25:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out25;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 101: goto st26;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st26:
+case 26:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out26;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 120: goto tr51;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st27:
+case 27:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out27;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 105: goto tr52;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st28:
+case 28:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out28;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 111: goto st29;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st29:
+case 29:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out29;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 107: goto st30;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st30:
+case 30:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out30;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 101: goto st31;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st31:
+case 31:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out31;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr19;
+ case 110: goto tr56;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr19;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr19;
+ } else
+ goto tr19;
+ goto tr35;
+st0:
+ goto out0;
+tr6:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 28;
+ goto out;
+}
+ goto st32;
+tr57:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 19;
+ goto out;
+}
+ goto st32;
+tr58:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 20;
+ goto out;
+}
+ goto st32;
+tr59:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 29;
+ goto out;
+}
+ goto st32;
+tr60:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 30;
+ goto out;
+}
+ goto st32;
+tr62:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 16;
+ goto out;
+}
+ goto st32;
+tr63:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 17;
+ goto out;
+}
+ goto st32;
+tr65:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 13;
+ goto out;
+}
+ goto st32;
+tr66:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 14;
+ goto out;
+}
+ goto st32;
+tr67:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 22;
+ goto out;
+}
+ goto st32;
+tr75:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 15;
+ goto out;
+}
+ goto st32;
+tr76:
+ { fsmRun->matchedToken = 18;
+ goto out;
+}
+ goto st32;
+tr77:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 21;
+ goto out;
+}
+ goto st32;
+tr78:
+ { fsmRun->toklen = fsmRun->tokend;
+ switch( fsmRun->act ) {
+ case 6:
+ fsmRun->matchedToken = 8;
+ break;
+ case 8:
+ fsmRun->matchedToken = 9;
+ break;
+ case 10:
+ fsmRun->matchedToken = 10;
+ break;
+ case 12:
+ fsmRun->matchedToken = 11;
+ break;
+ case 14:
+ fsmRun->matchedToken = 12;
+ break;
+ case 16:
+ fsmRun->matchedToken = 25;
+ break;
+ case 18:
+ fsmRun->matchedToken = 26;
+ break;
+ case 20:
+ fsmRun->matchedToken = 27;
+ break;
+ }
+ goto skip_toklen;
+}
+ goto st32;
+tr79:
+ { fsmRun->matchedToken = 27;
+ goto out;
+}
+ goto st32;
+st32:
+case 32:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out32;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 39: goto st4;
+ case 40: goto tr57;
+ case 41: goto tr58;
+ case 42: goto tr59;
+ case 43: goto tr60;
+ case 46: goto st33;
+ case 47: goto tr62;
+ case 58: goto tr63;
+ case 91: goto tr65;
+ case 93: goto tr66;
+ case 94: goto tr67;
+ case 95: goto tr64;
+ case 99: goto st35;
+ case 100: goto st40;
+ case 101: goto st42;
+ case 105: goto st44;
+ case 108: goto st49;
+ case 110: goto st51;
+ case 116: goto st52;
+ case 124: goto tr75;
+ }
+ if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else if ( (*fsmRun->p) >= 65 )
+ goto tr64;
+ goto st0;
+st4:
+case 4:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out4;
+ switch( (*fsmRun->p) ) {
+ case 39: goto tr6;
+ case 92: goto st5;
+ }
+ goto st4;
+st5:
+case 5:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out5;
+ goto st4;
+st33:
+case 33:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out33;
+ if ( (*fsmRun->p) == 46 )
+ goto tr77;
+ goto tr76;
+tr64:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 20;}
+ goto st34;
+tr84:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 18;}
+ goto st34;
+tr86:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 6;}
+ goto st34;
+tr88:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 10;}
+ goto st34;
+tr93:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 14;}
+ goto st34;
+tr95:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 8;}
+ goto st34;
+tr96:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 16;}
+ goto st34;
+tr100:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 12;}
+ goto st34;
+st34:
+case 34:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out34;
+ if ( (*fsmRun->p) == 95 )
+ goto tr64;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr78;
+st35:
+case 35:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out35;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st36;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st36:
+case 36:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out36;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 109: goto st37;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st37:
+case 37:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out37;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 109: goto st38;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st38:
+case 38:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out38;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 105: goto st39;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st39:
+case 39:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out39;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr84;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st40:
+case 40:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out40;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st41;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st41:
+case 41:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out41;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 102: goto tr86;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st42:
+case 42:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out42;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 110: goto st43;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st43:
+case 43:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out43;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 100: goto tr88;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st44:
+case 44:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out44;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 103: goto st45;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st45:
+case 45:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out45;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 110: goto st46;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st46:
+case 46:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out46;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st47;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st47:
+case 47:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out47;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto st48;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st48:
+case 48:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out48;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto tr93;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st49:
+case 49:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out49;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st50;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st50:
+case 50:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out50;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 120: goto tr95;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st51:
+case 51:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out51;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 105: goto tr96;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st52:
+case 52:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out52;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st53;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st53:
+case 53:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out53;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 107: goto st54;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st54:
+case 54:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out54;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st55;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+st55:
+case 55:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out55;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 110: goto tr100;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr79;
+tr9:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 24;
+ goto out;
+}
+ goto st56;
+tr102:
+ { fsmRun->matchedToken = 23;
+ goto out;
+}
+ goto st56;
+st56:
+case 56:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out56;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 32: goto st57;
+ case 35: goto st6;
+ }
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 11 )
+ goto st57;
+ goto st0;
+st57:
+case 57:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out57;
+ if ( (*fsmRun->p) == 32 )
+ goto st57;
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 11 )
+ goto st57;
+ goto tr102;
+st6:
+case 6:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out6;
+ if ( (*fsmRun->p) == 10 )
+ goto tr9;
+ goto st6;
+ }
+out_switch:
+ switch ( fsmRun->cs )
+ {
+ case 7: out7: fsmRun->cs = 7; goto out;
+ case 8: out8: if ( fsmRun->eof ) {goto tr31;
+}fsmRun->cs = 8; goto out;
+ case 1: out1: fsmRun->cs = 1; goto out;
+ case 2: out2: fsmRun->cs = 2; goto out;
+ case 3: out3: fsmRun->cs = 3; goto out;
+ case 9: out9: if ( fsmRun->eof ) {goto tr32;
+}fsmRun->cs = 9; goto out;
+ case 10: out10: if ( fsmRun->eof ) {goto tr34;
+}fsmRun->cs = 10; goto out;
+ case 11: out11: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 11; goto out;
+ case 12: out12: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 12; goto out;
+ case 13: out13: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 13; goto out;
+ case 14: out14: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 14; goto out;
+ case 15: out15: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 15; goto out;
+ case 16: out16: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 16; goto out;
+ case 17: out17: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 17; goto out;
+ case 18: out18: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 18; goto out;
+ case 19: out19: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 19; goto out;
+ case 20: out20: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 20; goto out;
+ case 21: out21: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 21; goto out;
+ case 22: out22: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 22; goto out;
+ case 23: out23: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 23; goto out;
+ case 24: out24: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 24; goto out;
+ case 25: out25: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 25; goto out;
+ case 26: out26: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 26; goto out;
+ case 27: out27: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 27; goto out;
+ case 28: out28: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 28; goto out;
+ case 29: out29: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 29; goto out;
+ case 30: out30: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 30; goto out;
+ case 31: out31: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 31; goto out;
+ case 0: out0: fsmRun->cs = 0; goto out;
+ case 32: out32: fsmRun->cs = 32; goto out;
+ case 4: out4: fsmRun->cs = 4; goto out;
+ case 5: out5: fsmRun->cs = 5; goto out;
+ case 33: out33: if ( fsmRun->eof ) {goto tr76;
+}fsmRun->cs = 33; goto out;
+ case 34: out34: if ( fsmRun->eof ) {goto tr78;
+}fsmRun->cs = 34; goto out;
+ case 35: out35: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 35; goto out;
+ case 36: out36: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 36; goto out;
+ case 37: out37: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 37; goto out;
+ case 38: out38: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 38; goto out;
+ case 39: out39: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 39; goto out;
+ case 40: out40: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 40; goto out;
+ case 41: out41: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 41; goto out;
+ case 42: out42: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 42; goto out;
+ case 43: out43: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 43; goto out;
+ case 44: out44: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 44; goto out;
+ case 45: out45: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 45; goto out;
+ case 46: out46: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 46; goto out;
+ case 47: out47: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 47; goto out;
+ case 48: out48: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 48; goto out;
+ case 49: out49: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 49; goto out;
+ case 50: out50: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 50; goto out;
+ case 51: out51: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 51; goto out;
+ case 52: out52: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 52; goto out;
+ case 53: out53: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 53; goto out;
+ case 54: out54: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 54; goto out;
+ case 55: out55: if ( fsmRun->eof ) {goto tr79;
+}fsmRun->cs = 55; goto out;
+ case 56: out56: fsmRun->cs = 56; goto out;
+ case 57: out57: if ( fsmRun->eof ) {goto tr102;
+}fsmRun->cs = 57; goto out;
+ case 6: out6: fsmRun->cs = 6; goto out;
+ }
+out:
+ if ( fsmRun->p != 0 )
+ fsmRun->toklen += fsmRun->p - fsmRun->start;
+skip_toklen:
+ {}
+}
+
+static void sendNamedLangEl( Program *prg, Tree **tree, PdaRun *pdaRun,
+ FsmRun *fsmRun, StreamImpl *inputStream ) { }
+static void initBindings( PdaRun *pdaRun ) {}
+static void popBinding( PdaRun *pdaRun, ParseTree *tree ) {}
+
+
+static int pid_0_parser_indicies[] = {
+ 4, 3, 5, 62, 98, 4, 3, 6,
+ 62, 100, 83, 14, 15, 16, 95, 95,
+ 95, 97, 97, 90, 90, 19, 11, 83,
+ 18, 20, 90, 40, 93, 93, 93, 94,
+ 94, 94, 96, 96, 83, 83, 17, 39,
+ 11, 41, 2, 0, 22, 1, 50, 2,
+ 13, 12, 8, 95, 95, 7, 10, 9,
+ 99, 24, 77, 97, 82, 90, 97, 80,
+ 90, 93, 93, 27, 94, 94, 23, 21,
+ 25, 82, 35, 57, 96, 32, -1, 96,
+ 26, -1, 36, 34, 48, 49, 82, 82,
+ 33, 31, 30, 29, 28, 48, 75, 75,
+ 101, 47, 56, 75, -1, 101, -1, 5,
+ 76, 76, 76, 81, 48, 60, 76, 74,
+ 74, 97, 47, 90, 74, 87, 87, -1,
+ 81, 89, 89, -1, 87, -1, 38, -1,
+ 89, -1, 96, -1, -1, 81, 81, 87,
+ -1, -1, -1, 17, -1, 76, 76, 2,
+ 0, -1, 1, -1, 2, 13, 12, 8,
+ 87, 37, 7, 10, 9, -1, -1, 87,
+ -1, -1, 87, 89, 73, 73, 89, 73,
+ -1, 73, -1, 23, 21, 25, -1, -1,
+ -1, -1, 45, 46, -1, 26, 71, 71,
+ -1, 71, -1, 71, -1, 33, 31, 30,
+ 29, 28, -1, 35, 71, 71, 32, -1,
+ 91, 91, 91, 36, 34, -1, -1, -1,
+ -1, 33, 43, 68, 68, 87, 68, -1,
+ 68, 89, 63, 63, -1, 63, -1, 63,
+ 44, 68, 68, 35, -1, -1, 32, -1,
+ 63, 63, -1, 36, 34, 91, 91, -1,
+ -1, 33, 31, 30, 29, 42, 64, 64,
+ -1, 64, 79, 64, 85, 85, 37, 92,
+ 92, 92, -1, 85, 64, 64, -1, 79,
+ 35, 54, -1, 32, -1, -1, 52, -1,
+ 36, 34, -1, 53, 79, 79, 33, 31,
+ 30, 29, 55, -1, -1, 67, 67, 51,
+ 67, -1, 67, -1, 92, 92, 85, -1,
+ -1, 85, -1, 67, 67, 69, 69, -1,
+ 69, -1, 69, 88, 88, -1, 33, 43,
+ 84, 84, 88, 69, 69, 70, 70, 84,
+ 70, 35, 70, -1, 32, -1, -1, -1,
+ -1, 36, 34, 70, 70, 86, 86, 33,
+ 31, 58, -1, -1, 86, -1, 33, 31,
+ 30, 29, 42, 35, 85, 88, 32, 86,
+ 88, -1, 84, 36, 34, 84, 78, -1,
+ -1, 33, 31, 30, 59, -1, -1, -1,
+ 86, -1, -1, 78, -1, -1, -1, 86,
+ 53, -1, 86, 33, 31, 30, 29, 55,
+ 78, 78, 65, 65, 51, 65, -1, 65,
+ 66, 66, -1, 66, -1, 66, -1, -1,
+ 65, 65, -1, 88, -1, -1, 66, 66,
+ 84, 72, 72, -1, 72, -1, 72, 77,
+ 77, 77, -1, -1, -1, -1, -1, 45,
+ 46, -1, -1, -1, -1, 86, 27, -1,
+ -1, -1, -1, -1, 33, 31, 58, -1,
+ -1, -1, -1, 61, -1, -1, -1, -1,
+ -1, -1, -1, -1, 77, 77, -1, -1,
+ -1, -1, -1, -1, -1, -1, 33, 31,
+ 30, 59, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 61
+};
+
+static int pid_0_parser_owners[] = {
+ 0, 0, 1, 2, 3, 4, 4, 6,
+ 7, 10, 13, 9, 9, 9, 5, 5,
+ 5, 11, 11, 12, 12, 17, 8, 13,
+ 11, 18, 12, 25, 14, 14, 14, 15,
+ 15, 15, 16, 16, 13, 13, 13, 26,
+ 20, 28, 0, 0, 19, 0, 40, 4,
+ 9, 9, 4, 5, 5, 5, 8, 8,
+ 1, 19, 21, 11, 23, 12, 11, 41,
+ 12, 14, 14, 21, 15, 15, 19, 19,
+ 20, 23, 22, 46, 16, 22, -1, 16,
+ 21, -1, 22, 22, 30, 30, 23, 23,
+ 22, 22, 22, 22, 22, 44, 31, 31,
+ 0, 31, 44, 31, -1, 4, -1, 1,
+ 29, 29, 29, 55, 57, 57, 29, 61,
+ 61, 11, 61, 12, 61, 24, 24, -1,
+ 55, 27, 27, -1, 24, -1, 24, -1,
+ 27, -1, 16, -1, -1, 55, 55, 24,
+ -1, -1, -1, 13, -1, 29, 29, 0,
+ 0, -1, 0, -1, 4, 9, 9, 4,
+ 24, 24, 5, 8, 8, -1, -1, 24,
+ -1, -1, 24, 27, 32, 32, 27, 32,
+ -1, 32, -1, 19, 19, 20, -1, -1,
+ -1, -1, 32, 32, -1, 21, 33, 33,
+ -1, 33, -1, 33, -1, 22, 22, 22,
+ 22, 22, -1, 34, 33, 33, 34, -1,
+ 51, 51, 51, 34, 34, -1, -1, -1,
+ -1, 34, 34, 35, 35, 24, 35, -1,
+ 35, 27, 36, 36, -1, 36, -1, 36,
+ 36, 35, 35, 37, -1, -1, 37, -1,
+ 36, 36, -1, 37, 37, 51, 51, -1,
+ -1, 37, 37, 37, 37, 37, 38, 38,
+ -1, 38, 42, 38, 39, 39, 24, 63,
+ 63, 63, -1, 39, 38, 38, -1, 42,
+ 43, 42, -1, 43, -1, -1, 39, -1,
+ 43, 43, -1, 42, 42, 42, 43, 43,
+ 43, 43, 43, -1, -1, 45, 45, 39,
+ 45, -1, 45, -1, 63, 63, 39, -1,
+ -1, 39, -1, 45, 45, 47, 47, -1,
+ 47, -1, 47, 53, 53, -1, 34, 34,
+ 54, 54, 53, 47, 47, 48, 48, 54,
+ 48, 49, 48, -1, 49, -1, -1, -1,
+ -1, 49, 49, 48, 48, 52, 52, 49,
+ 49, 49, -1, -1, 52, -1, 37, 37,
+ 37, 37, 37, 50, 39, 53, 50, 52,
+ 53, -1, 54, 50, 50, 54, 56, -1,
+ -1, 50, 50, 50, 50, -1, -1, -1,
+ 52, -1, -1, 56, -1, -1, -1, 52,
+ 42, -1, 52, 43, 43, 43, 43, 43,
+ 56, 56, 58, 58, 39, 58, -1, 58,
+ 59, 59, -1, 59, -1, 59, -1, -1,
+ 58, 58, -1, 53, -1, -1, 59, 59,
+ 54, 60, 60, -1, 60, -1, 60, 62,
+ 62, 62, -1, -1, -1, -1, -1, 60,
+ 60, -1, -1, -1, -1, 52, 62, -1,
+ -1, -1, -1, -1, 49, 49, 49, -1,
+ -1, -1, -1, 62, -1, -1, -1, -1,
+ -1, -1, -1, -1, 62, 62, -1, -1,
+ -1, -1, -1, -1, -1, -1, 50, 50,
+ 50, 50, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 62
+};
+
+static int pid_0_parser_keys[] = {
+ 8, 154, 52, 153, 104, 104, 104, 104,
+ 8, 154, 10, 150, 27, 27, 106, 106,
+ 13, 147, 10, 149, 104, 104, 8, 104,
+ 8, 104, 14, 143, 10, 48, 10, 48,
+ 8, 104, 27, 27, 16, 16, 14, 142,
+ 13, 146, 16, 139, 19, 138, 14, 41,
+ 8, 145, 27, 27, 17, 17, 8, 104,
+ 16, 16, 10, 48, 15, 16, 15, 20,
+ 15, 30, 15, 30, 19, 135, 15, 30,
+ 15, 30, 19, 138, 15, 30, 8, 144,
+ 27, 27, 27, 27, 14, 140, 19, 138,
+ 15, 20, 15, 30, 28, 28, 15, 30,
+ 15, 30, 19, 136, 19, 137, 10, 48,
+ 8, 104, 8, 104, 8, 104, 14, 41,
+ 14, 41, 15, 16, 15, 30, 15, 30,
+ 15, 30, 15, 20, 10, 139, 10, 48,
+ 0, 0
+};
+
+static unsigned int pid_0_parser_offsets[] = {
+ 0, 2, 3, 4, 5, 14, 7, 8,
+ 22, 11, 9, 17, 19, 10, 28, 31,
+ 34, 21, 25, 44, 40, 58, 74, 60,
+ 117, 27, 39, 121, 41, 104, 84, 94,
+ 164, 182, 195, 211, 218, 227, 246, 252,
+ 46, 63, 250, 264, 93, 285, 75, 301,
+ 317, 321, 347, 200, 333, 307, 312, 107,
+ 358, 108, 386, 392, 409, 111, 415, 255,
+ 0
+};
+
+static unsigned int pid_0_parser_targs[] = {
+ 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64
+};
+
+static unsigned int pid_0_parser_actInds[] = {
+ 0, 2, 4, 6, 8, 10, 12, 14,
+ 16, 18, 20, 22, 24, 26, 28, 30,
+ 32, 34, 36, 38, 40, 42, 44, 46,
+ 48, 51, 53, 55, 57, 59, 61, 63,
+ 65, 67, 69, 71, 73, 75, 77, 79,
+ 81, 83, 85, 87, 89, 91, 93, 95,
+ 97, 99, 101, 103, 105, 107, 109, 111,
+ 113, 115, 117, 119, 121, 123, 125, 127,
+ 129, 131, 133, 135, 137, 139, 141, 143,
+ 145, 147, 149, 151, 153, 155, 157, 159,
+ 161, 163, 165, 167, 169, 171, 173, 175,
+ 177, 179, 181, 183, 185, 187, 189, 191,
+ 193, 195, 197, 199, 201, 203
+};
+
+static unsigned int pid_0_parser_actions[] = {
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 74, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 2,
+ 0, 6, 0, 10, 0, 14, 0, 18,
+ 0, 22, 0, 26, 0, 30, 0, 34,
+ 0, 38, 0, 42, 0, 46, 0, 50,
+ 0, 54, 0, 58, 0, 62, 0, 66,
+ 0, 70, 0, 78, 0, 82, 0, 86,
+ 0, 90, 0, 94, 0, 98, 0, 102,
+ 0, 106, 0, 110, 0, 114, 0, 118,
+ 0, 122, 0, 126, 0, 130, 0, 134,
+ 0, 138, 0, 142, 0, 146, 0, 150,
+ 0, 154, 0, 158, 0
+};
+
+static int pid_0_parser_commitLen[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
+};
+
+static int pid_0_parser_tokenRegionInds[] = {
+ 1, 3, 5, 7, 9, 11, 13, 15,
+ 17, 19, 21, 23, 25, 27, 29, 31,
+ 33, 35, 37, 39, 41, 43, 45, 47,
+ 49, 51, 53, 55, 57, 59, 61, 63,
+ 65, 67, 69, 71, 73, 75, 77, 79,
+ 81, 83, 85, 87, 89, 91, 93, 95,
+ 97, 99, 101, 103, 105, 107, 109, 111,
+ 113, 115, 117, 119, 121, 123, 125, 127,
+ 129
+};
+
+static int pid_0_parser_tokenRegions[] = {
+ 0, 1, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 1, 0, 1, 0, 0,
+ 0, 1, 0, 1, 0, 0, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 0
+};
+
+static int pid_0_parser_tokenPreRegions[] = {
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, 3, 0, 3, 0, -1,
+ 0, 3, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, 3, 0, -1, 0, -1,
+ 0, 3, 0, 3, 0, 3, 0, -1,
+ 0, 3, 0, 3, 0, 3, 0, -1,
+ 0, 3, 0, -1, 0, 3, 0, -1,
+ 0, -1, 0, 3, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, 3, 0, -1,
+ 0, 3, 0, 3, 0, 3, 0, -1,
+ 0, 3, 0, 3, 0, 3, 0, 3,
+ 0, -1, 0, -1, 0, 3, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, 3,
+ 0, 3, 0, -1, 0, 3, 0, -1,
+ 0, 3, 0, -1, 0, 3, 0, 3,
+ 0, -1, 0, -1, 0, 3, 0, -1,
+ 0, 0
+};
+
+static PdaTables pid_0_pdaTables =
+{
+ pid_0_parser_indicies,
+ pid_0_parser_owners,
+ pid_0_parser_keys,
+ pid_0_parser_offsets,
+ pid_0_parser_targs,
+ pid_0_parser_actInds,
+ pid_0_parser_actions,
+ pid_0_parser_commitLen,
+ pid_0_parser_tokenRegionInds,
+ pid_0_parser_tokenRegions,
+ pid_0_parser_tokenPreRegions,
+
+ 545,
+ 130,
+ 65,
+ 102,
+ 102,
+ 205,
+ 102,
+ 130,
+ 130
+};
+
+static LocalInfo locals_0[] = {
+ { 1, -1 }
+};
+
+static unsigned char copy_0[] = {
+ 0, 0
+};
+
+static unsigned char copy_1[] = {
+ 0, 0
+};
+
+static unsigned char copy_2[] = {
+ 0, 1
+};
+
+static unsigned char copy_3[] = {
+ 0, 0, 0, 2
+};
+
+static unsigned char copy_4[] = {
+ 0, 1
+};
+
+static unsigned char copy_5[] = {
+ 0, 0
+};
+
+static unsigned char copy_6[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_7[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_8[] = {
+ 0, 0
+};
+
+static unsigned char copy_9[] = {
+ 0, 0, 0, 2
+};
+
+static unsigned char copy_10[] = {
+ 0, 0
+};
+
+static unsigned char copy_11[] = {
+ 0, 0, 0, 2
+};
+
+static unsigned char copy_12[] = {
+ 0, 0
+};
+
+static unsigned char copy_13[] = {
+ 0, 0
+};
+
+static unsigned char copy_15[] = {
+ 0, 0
+};
+
+static unsigned char copy_17[] = {
+ 0, 0
+};
+
+static unsigned char copy_19[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_20[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_22[] = {
+ 0, 0
+};
+
+static unsigned char copy_24[] = {
+ 0, 1
+};
+
+static unsigned char copy_26[] = {
+ 0, 1, 0, 3, 0, 4
+};
+
+static unsigned char copy_27[] = {
+ 0, 0, 0, 2
+};
+
+static unsigned char copy_28[] = {
+ 0, 0
+};
+
+static unsigned char copy_29[] = {
+ 0, 2
+};
+
+static unsigned char copy_30[] = {
+ 0, 1, 0, 2, 0, 4, 0, 6
+};
+
+static unsigned char copy_31[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_32[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_34[] = {
+ 0, 1
+};
+
+static unsigned char copy_35[] = {
+ 0, 1, 0, 2
+};
+
+static unsigned char copy_36[] = {
+ 0, 0
+};
+
+static Code parser_rootCode[] = {
+ 28, 1, 0, 184, 1, 0, 35, 0,
+ 0, 31, 31, 222, 32, 223, 31, 87,
+ 45, 1, 0, 119, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 180, 32, 224,
+ 168, 29, 31, 160, 162, 0, 0, 177,
+ 163, 160, 171, 0, 0, 177, 172, 29,
+ 31, 91, 1, 0, 226, 91, 0, 0,
+ 31, 39, 255, 255, 29, 37, 255, 255,
+ 87, 49, 0, 0, 144
+};
+
+static LangElInfo parser_lelInfo[] = {
+ { "__UNUSED", "__UNUSED", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { "ptr", "ptr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_void", "void", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_bool", "bool", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_int", "int", 0, 0, 0, 0, -1, 45, 0, 0, 0, 0, -1, 0, 0 },
+ { "str", "str", 0, 0, 0, 0, -1, 46, 0, 0, 0, 0, -1, 0, 0 },
+ { "stream", "stream", 0, 0, 0, 0, -1, 47, 0, 0, 0, 0, -1, 0, 0 },
+ { "il", "il", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "'def'", "_literal_0005", 0, 0, 1, 0, -1, 5, 0, 0, 0, 0, -1, 0, 0 },
+ { "'lex'", "_literal_0007", 0, 0, 1, 0, -1, 6, 0, 0, 0, 0, -1, 0, 0 },
+ { "'end'", "_literal_0009", 0, 0, 1, 0, -1, 7, 0, 0, 0, 0, -1, 0, 0 },
+ { "'token'", "_literal_000b", 0, 0, 1, 0, -1, 8, 0, 0, 0, 0, -1, 0, 0 },
+ { "'ignore'", "_literal_000d", 0, 0, 1, 0, -1, 9, 0, 0, 0, 0, -1, 0, 0 },
+ { "'['", "_literal_001b", 0, 0, 1, 0, -1, 16, 0, 0, 0, 0, -1, 0, 0 },
+ { "']'", "_literal_001d", 0, 0, 1, 0, -1, 17, 0, 0, 0, 0, -1, 0, 0 },
+ { "'|'", "_literal_001f", 0, 0, 1, 0, -1, 18, 0, 0, 0, 0, -1, 0, 0 },
+ { "'/'", "_literal_0021", 0, 0, 1, 0, -1, 19, 0, 0, 0, 0, -1, 0, 0 },
+ { "':'", "_literal_0023", 0, 0, 1, 0, -1, 20, 0, 0, 0, 0, -1, 0, 0 },
+ { "'.'", "_literal_0025", 0, 0, 1, 0, -1, 21, 0, 0, 0, 0, -1, 0, 0 },
+ { "'('", "_literal_0027", 0, 0, 1, 0, -1, 22, 0, 0, 0, 0, -1, 0, 0 },
+ { "')'", "_literal_0029", 0, 0, 1, 0, -1, 23, 0, 0, 0, 0, -1, 0, 0 },
+ { "'..'", "_literal_002b", 0, 0, 1, 0, -1, 24, 0, 0, 0, 0, -1, 0, 0 },
+ { "'^'", "_literal_002d", 0, 0, 1, 0, -1, 25, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ignore_0001", "_ignore_0001", 0, 0, 0, 1, -1, 3, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ignore_0003", "_ignore_0003", 0, 0, 0, 1, -1, 4, 0, 0, 0, 0, -1, 0, 0 },
+ { "NI", "NI", 0, 0, 0, 0, -1, 10, 0, 0, 0, 0, -1, 0, 0 },
+ { "COMMIT", "COMMIT", 0, 0, 0, 0, -1, 11, 0, 0, 0, 0, -1, 0, 0 },
+ { "id", "id", 0, 0, 0, 0, -1, 12, 0, 0, 0, 0, -1, 0, 0 },
+ { "literal", "literal", 0, 0, 0, 0, -1, 13, 0, 0, 0, 0, -1, 0, 0 },
+ { "STAR", "STAR", 0, 0, 0, 0, -1, 14, 0, 0, 0, 0, -1, 0, 0 },
+ { "PLUS", "PLUS", 0, 0, 0, 0, -1, 15, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ign_0x11bb1a0", "_ign_0x11bb1a0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_T_any", "_T_any", 0, 0, 0, 0, -1, 0, 0, 0, 133, 0, -1, 0, 0 },
+ { "_T_lex_factor", "_T_lex_factor", 0, 0, 0, 0, -1, 26, 0, 0, 134, 0, -1, 0, 0 },
+ { "_T_lex_factor_neg", "_T_lex_factor_neg", 0, 0, 0, 0, -1, 27, 0, 0, 135, 0, -1, 0, 0 },
+ { "_T_lex_factor_rep", "_T_lex_factor_rep", 0, 0, 0, 0, -1, 28, 0, 0, 136, 0, -1, 0, 0 },
+ { "_T_lex_term", "_T_lex_term", 0, 0, 0, 0, -1, 29, 0, 0, 137, 0, -1, 0, 0 },
+ { "_T_lex_expr", "_T_lex_expr", 0, 0, 0, 0, -1, 30, 0, 0, 138, 0, -1, 0, 0 },
+ { "_T_opt_ni", "_T_opt_ni", 0, 0, 0, 0, -1, 31, 0, 0, 139, 0, -1, 0, 0 },
+ { "_T_opt_prod_repeat", "_T_opt_prod_repeat", 0, 0, 0, 0, -1, 32, 0, 0, 140, 0, -1, 0, 0 },
+ { "_T_opt_prod_el_name", "_T_opt_prod_el_name", 0, 0, 0, 0, -1, 33, 0, 0, 141, 0, -1, 0, 0 },
+ { "_T_prod_el", "_T_prod_el", 0, 0, 0, 0, -1, 34, 0, 0, 142, 0, -1, 0, 0 },
+ { "_T_prod_el_list", "_T_prod_el_list", 0, 0, 0, 0, -1, 35, 0, 0, 143, 0, -1, 0, 0 },
+ { "_T_opt_commit", "_T_opt_commit", 0, 0, 0, 0, -1, 36, 0, 0, 144, 0, -1, 0, 0 },
+ { "_T_opt_prod_name", "_T_opt_prod_name", 0, 0, 0, 0, -1, 37, 0, 0, 145, 0, -1, 0, 0 },
+ { "_T_prod", "_T_prod", 0, 0, 0, 0, -1, 38, 0, 0, 146, 0, -1, 0, 0 },
+ { "_T_prod_list", "_T_prod_list", 0, 0, 0, 0, -1, 39, 0, 0, 147, 0, -1, 0, 0 },
+ { "_T_ignore_def", "_T_ignore_def", 0, 0, 0, 0, -1, 40, 0, 0, 148, 0, -1, 0, 0 },
+ { "_T_token_def", "_T_token_def", 0, 0, 0, 0, -1, 41, 0, 0, 149, 0, -1, 0, 0 },
+ { "_T_token_list", "_T_token_list", 0, 0, 0, 0, -1, 42, 0, 0, 150, 0, -1, 0, 0 },
+ { "_T_item", "_T_item", 0, 0, 0, 0, -1, 43, 0, 0, 151, 0, -1, 0, 0 },
+ { "_T_start", "_T_start", 0, 0, 0, 0, -1, 44, 0, 0, 152, 0, -1, 0, 0 },
+ { "_T___accum0", "_T___accum0", 0, 0, 0, 0, -1, 48, 0, 0, 153, 0, -1, 0, 0 },
+ { "_T__repeat_item", "_T__repeat_item", 0, 0, 0, 0, -1, 0, 0, 0, 154, 0, -1, 0, 0 },
+ { "_T___list0", "_T___list0", 0, 0, 0, 0, -1, 49, 0, 0, 155, 0, -1, 0, 0 },
+ { "_eof_ptr", "_eof_ptr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_void", "_eof_void", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_bool", "_eof_bool", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_int", "_eof_int", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_str", "_eof_str", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_stream", "_eof_stream", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_il", "_eof_il", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_any", "_eof_any", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_0005", "_eof__literal_0005", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_0007", "_eof__literal_0007", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_0009", "_eof__literal_0009", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_000b", "_eof__literal_000b", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_000d", "_eof__literal_000d", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_001b", "_eof__literal_001b", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_001d", "_eof__literal_001d", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_001f", "_eof__literal_001f", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_0021", "_eof__literal_0021", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_0023", "_eof__literal_0023", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_0025", "_eof__literal_0025", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_0027", "_eof__literal_0027", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_0029", "_eof__literal_0029", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_002b", "_eof__literal_002b", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__literal_002d", "_eof__literal_002d", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ignore_0001", "_eof__ignore_0001", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ignore_0003", "_eof__ignore_0003", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_NI", "_eof_NI", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_COMMIT", "_eof_COMMIT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_id", "_eof_id", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_literal", "_eof_literal", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_STAR", "_eof_STAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PLUS", "_eof_PLUS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_factor", "_eof_lex_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_factor_neg", "_eof_lex_factor_neg", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_factor_rep", "_eof_lex_factor_rep", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_term", "_eof_lex_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_expr", "_eof_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_ni", "_eof_opt_ni", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_prod_repeat", "_eof_opt_prod_repeat", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_prod_el_name", "_eof_opt_prod_el_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_prod_el", "_eof_prod_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_prod_el_list", "_eof_prod_el_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_commit", "_eof_opt_commit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_prod_name", "_eof_opt_prod_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_prod", "_eof_prod", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_prod_list", "_eof_prod_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_ignore_def", "_eof_ignore_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_token_def", "_eof_token_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_token_list", "_eof_token_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_item", "_eof_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_start", "_eof_start", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ign_0x11bb1a0", "_eof__ign_0x11bb1a0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof___accum0", "_eof___accum0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_item", "_eof__repeat_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof___list0", "_eof___list0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_any", "_eof__T_any", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_factor", "_eof__T_lex_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_factor_neg", "_eof__T_lex_factor_neg", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_factor_rep", "_eof__T_lex_factor_rep", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_term", "_eof__T_lex_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_expr", "_eof__T_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_ni", "_eof__T_opt_ni", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_prod_repeat", "_eof__T_opt_prod_repeat", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_prod_el_name", "_eof__T_opt_prod_el_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_prod_el", "_eof__T_prod_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_prod_el_list", "_eof__T_prod_el_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_commit", "_eof__T_opt_commit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_prod_name", "_eof__T_opt_prod_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_prod", "_eof__T_prod", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_prod_list", "_eof__T_prod_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_ignore_def", "_eof__T_ignore_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_token_def", "_eof__T_token_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_token_list", "_eof__T_token_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_item", "_eof__T_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_start", "_eof__T_start", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T___accum0", "_eof__T___accum0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_item", "_eof__T__repeat_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T___list0", "_eof__T___list0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_notoken", "_notoken", 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "any", "any", 0, 0, 0, 0, -1, 0, 0, 0, 32, 0, -1, 0, 0 },
+ { "lex_factor", "lex_factor", 0, 0, 0, 0, -1, 26, 0, 0, 33, 0, -1, 0, 0 },
+ { "lex_factor_neg", "lex_factor_neg", 0, 0, 0, 0, -1, 27, 0, 0, 34, 0, -1, 0, 0 },
+ { "lex_factor_rep", "lex_factor_rep", 0, 0, 0, 0, -1, 28, 0, 0, 35, 0, -1, 0, 0 },
+ { "lex_term", "lex_term", 0, 0, 0, 0, -1, 29, 0, 0, 36, 0, -1, 0, 0 },
+ { "lex_expr", "lex_expr", 0, 0, 0, 0, -1, 30, 0, 0, 37, 0, -1, 0, 0 },
+ { "opt_ni", "opt_ni", 0, 0, 0, 0, -1, 31, 0, 0, 38, 0, -1, 0, 0 },
+ { "opt_prod_repeat", "opt_prod_repeat", 0, 0, 0, 0, -1, 32, 0, 0, 39, 0, -1, 0, 0 },
+ { "opt_prod_el_name", "opt_prod_el_name", 0, 0, 0, 0, -1, 33, 0, 0, 40, 0, -1, 0, 0 },
+ { "prod_el", "prod_el", 0, 0, 0, 0, -1, 34, 0, 0, 41, 0, -1, 0, 0 },
+ { "prod_el_list", "prod_el_list", 0, 0, 0, 0, -1, 35, 0, 0, 42, 0, -1, 0, 0 },
+ { "opt_commit", "opt_commit", 0, 0, 0, 0, -1, 36, 0, 0, 43, 0, -1, 0, 0 },
+ { "opt_prod_name", "opt_prod_name", 0, 0, 0, 0, -1, 37, 0, 0, 44, 0, -1, 0, 0 },
+ { "prod", "prod", 0, 0, 0, 0, -1, 38, 0, 0, 45, 0, -1, 0, 0 },
+ { "prod_list", "prod_list", 0, 0, 0, 0, -1, 39, 0, 0, 46, 0, -1, 0, 0 },
+ { "ignore_def", "ignore_def", 0, 0, 0, 0, -1, 40, 0, 0, 47, 0, -1, 0, 0 },
+ { "token_def", "token_def", 0, 0, 0, 0, -1, 41, 0, 0, 48, 0, -1, 0, 0 },
+ { "token_list", "token_list", 0, 0, 0, 0, -1, 42, 0, 0, 49, 0, -1, 0, 0 },
+ { "item", "item", 0, 0, 0, 0, -1, 43, 0, 0, 50, 0, -1, 0, 0 },
+ { "start", "start", 0, 0, 0, 0, -1, 44, 0, 0, 51, 0, -1, 0, 0 },
+ { "__accum0", "__accum0", 0, 0, 0, 0, -1, 48, 0, 0, 52, 1, -1, 0, 0 },
+ { "_repeat_item", "_repeat_item", 1, 0, 0, 0, -1, 0, 0, 0, 53, 0, -1, 0, 0 },
+ { "__list0", "__list0", 0, 0, 0, 0, -1, 49, 0, 0, 54, 2, -1, 0, 0 },
+ { "_root", "_root", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }
+};
+
+static FrameInfo parser_frameInfo[] = {
+ { 0, 0, 0, 0, locals_0, 1, 0, 1 }
+};
+
+static ProdInfo parser_prodInfo[] = {
+ { 134, 0, 1, "lex_factor-1", -1, 1, copy_0, 1, },
+ { 134, 3, 1, "lex_factor-4", -1, 1, copy_1, 1, },
+ { 134, 1, 3, "lex_factor-2", -1, 1, copy_2, 1, },
+ { 134, 2, 3, "lex_factor-3", -1, 1, copy_3, 2, },
+ { 135, 0, 2, "lex_factor_neg-1", -1, 1, copy_4, 1, },
+ { 135, 1, 1, "lex_factor_neg-2", -1, 1, copy_5, 1, },
+ { 136, 0, 2, "lex_factor_rep-1", -1, 1, copy_6, 2, },
+ { 136, 1, 2, "lex_factor_rep-2", -1, 1, copy_7, 2, },
+ { 136, 2, 1, "lex_factor_rep-3", -1, 1, copy_8, 1, },
+ { 137, 0, 3, "lex_term-1", -1, 1, copy_9, 2, },
+ { 137, 1, 1, "lex_term-2", -1, 1, copy_10, 1, },
+ { 138, 0, 3, "lex_expr-1", -1, 1, copy_11, 2, },
+ { 138, 1, 1, "lex_expr-2", -1, 1, copy_12, 1, },
+ { 139, 0, 1, "opt_ni-1", -1, 1, copy_13, 1, },
+ { 139, 1, 0, "opt_ni-2", -1, 1, 0, 0, },
+ { 140, 0, 1, "opt_prod_repeat-1", -1, 1, copy_15, 1, },
+ { 140, 1, 0, "opt_prod_repeat-2", -1, 1, 0, 0, },
+ { 141, 0, 2, "opt_prod_el_name-1", -1, 1, copy_17, 1, },
+ { 141, 1, 0, "opt_prod_el_name-2", -1, 1, 0, 0, },
+ { 142, 0, 3, "prod_el-1", -1, 1, copy_19, 3, },
+ { 143, 0, 2, "prod_el_list-1", -1, 1, copy_20, 2, },
+ { 143, 1, 0, "prod_el_list-2", -1, 1, 0, 0, },
+ { 144, 0, 1, "opt_commit-1", -1, 1, copy_22, 1, },
+ { 144, 1, 0, "opt_commit-2", -1, 1, 0, 0, },
+ { 145, 0, 2, "opt_prod_name-1", -1, 1, copy_24, 1, },
+ { 145, 1, 0, "opt_prod_name-2", -1, 1, 0, 0, },
+ { 146, 0, 5, "prod-1", -1, 1, copy_26, 3, },
+ { 147, 0, 3, "prod_list-1", -1, 1, copy_27, 2, },
+ { 147, 1, 1, "prod_list-2", -1, 1, copy_28, 1, },
+ { 148, 0, 4, "ignore_def-1", -1, 1, copy_29, 1, },
+ { 149, 0, 7, "token_def-1", -1, 1, copy_30, 4, },
+ { 150, 0, 2, "token_list-1", -1, 1, copy_31, 2, },
+ { 150, 1, 2, "token_list-2", -1, 1, copy_32, 2, },
+ { 150, 2, 0, "token_list-3", -1, 1, 0, 0, },
+ { 151, 0, 3, "item-1", -1, 1, copy_34, 1, },
+ { 151, 1, 3, "item-2", -1, 1, copy_35, 2, },
+ { 152, 0, 1, "start-1", -1, 1, copy_36, 1, },
+ { 153, 0, 0, "__accum0-1", -1, 1, 0, 0, },
+ { 154, 0, 2, "_repeat_item-1", -1, 1, 0, 0, },
+ { 154, 1, 0, "_repeat_item-2", -1, 1, 0, 0, },
+ { 155, 0, 0, "__list0-1", -1, 1, 0, 0, },
+ { 156, 0, 1, "_root-1", -1, 1, 0, 0, },
+ { 156, 1, 1, "_root-2", -1, 1, 0, 0, },
+ { 156, 2, 1, "_root-3", -1, 1, 0, 0, },
+ { 156, 3, 1, "_root-4", -1, 1, 0, 0, },
+ { 156, 4, 1, "_root-5", -1, 1, 0, 0, },
+ { 156, 5, 1, "_root-6", -1, 1, 0, 0, },
+ { 156, 6, 1, "_root-7", -1, 1, 0, 0, },
+ { 156, 7, 1, "_root-8", -1, 1, 0, 0, },
+ { 156, 8, 1, "_root-9", -1, 1, 0, 0, },
+ { 156, 9, 1, "_root-10", -1, 1, 0, 0, },
+ { 156, 10, 1, "_root-11", -1, 1, 0, 0, },
+ { 156, 11, 1, "_root-12", -1, 1, 0, 0, },
+ { 156, 12, 1, "_root-13", -1, 1, 0, 0, },
+ { 156, 13, 1, "_root-14", -1, 1, 0, 0, },
+ { 156, 14, 1, "_root-15", -1, 1, 0, 0, },
+ { 156, 15, 1, "_root-16", -1, 1, 0, 0, },
+ { 156, 16, 1, "_root-17", -1, 1, 0, 0, },
+ { 156, 17, 1, "_root-18", -1, 1, 0, 0, },
+ { 156, 18, 1, "_root-19", -1, 1, 0, 0, },
+ { 156, 19, 1, "_root-20", -1, 1, 0, 0, },
+ { 156, 20, 1, "_root-21", -1, 1, 0, 0, },
+ { 156, 21, 1, "_root-22", -1, 1, 0, 0, },
+ { 156, 22, 1, "_root-23", -1, 1, 0, 0, },
+ { 156, 23, 1, "_root-24", -1, 1, 0, 0, },
+ { 156, 24, 1, "_root-25", -1, 1, 0, 0, },
+ { 156, 25, 1, "_root-26", -1, 1, 0, 0, },
+ { 156, 26, 1, "_root-27", -1, 1, 0, 0, },
+ { 156, 27, 1, "_root-28", -1, 1, 0, 0, },
+ { 156, 28, 1, "_root-29", -1, 1, 0, 0, },
+ { 156, 29, 1, "_root-30", -1, 1, 0, 0, },
+ { 156, 30, 1, "_root-31", -1, 1, 0, 0, },
+ { 156, 31, 1, "_root-32", -1, 1, 0, 0, },
+ { 156, 32, 1, "_root-33", -1, 1, 0, 0, },
+ { 156, 33, 1, "_root-34", -1, 1, 0, 0, },
+ { 156, 34, 1, "_root-35", -1, 1, 0, 0, },
+ { 156, 35, 1, "_root-36", -1, 1, 0, 0, },
+ { 156, 36, 1, "_root-37", -1, 1, 0, 0, },
+ { 156, 37, 1, "_root-38", -1, 1, 0, 0, },
+ { 156, 38, 1, "_root-39", -1, 1, 0, 0, },
+ { 156, 39, 1, "_root-40", -1, 1, 0, 0, },
+ { 156, 40, 1, "_root-41", -1, 1, 0, 0, },
+ { 156, 41, 1, "_root-42", -1, 1, 0, 0, },
+ { 156, 42, 1, "_root-43", -1, 1, 0, 0, },
+ { 156, 43, 1, "_root-44", -1, 1, 0, 0, },
+ { 156, 44, 1, "_root-45", -1, 1, 0, 0, },
+ { 156, 45, 1, "_root-46", -1, 1, 0, 0, },
+ { 156, 46, 1, "_root-47", -1, 1, 0, 0, },
+ { 156, 47, 1, "_root-48", -1, 1, 0, 0, },
+ { 156, 48, 1, "_root-49", -1, 1, 0, 0, },
+ { 156, 49, 1, "_root-50", -1, 1, 0, 0, },
+ { 156, 50, 1, "_root-51", -1, 1, 0, 0, },
+ { 156, 51, 1, "_root-52", -1, 1, 0, 0, },
+ { 156, 52, 1, "_root-53", -1, 1, 0, 0, },
+ { 156, 53, 1, "_root-54", -1, 1, 0, 0, },
+ { 156, 54, 1, "_root-55", -1, 1, 0, 0, },
+ { 156, 55, 1, "_root-56", -1, 1, 0, 0, },
+ { 156, 56, 1, "_root-57", -1, 1, 0, 0, },
+ { 156, 57, 1, "_root-58", -1, 1, 0, 0, },
+ { 156, 58, 1, "_root-59", -1, 1, 0, 0, },
+ { 156, 59, 1, "_root-60", -1, 1, 0, 0, },
+ { 156, 60, 1, "_root-61", -1, 1, 0, 0, },
+ { 156, 61, 1, "_root-62", -1, 1, 0, 0, },
+ { 156, 62, 1, "_root-63", -1, 1, 0, 0, },
+ { 156, 63, 1, "_root-64", -1, 1, 0, 0, },
+ { 156, 64, 1, "_root-65", -1, 1, 0, 0, },
+ { 156, 65, 1, "_root-66", -1, 1, 0, 0, },
+ { 156, 66, 1, "_root-67", -1, 1, 0, 0, },
+ { 156, 67, 1, "_root-68", -1, 1, 0, 0, },
+ { 156, 68, 1, "_root-69", -1, 1, 0, 0, },
+ { 156, 69, 1, "_root-70", -1, 1, 0, 0, },
+ { 156, 70, 1, "_root-71", -1, 1, 0, 0, },
+ { 156, 71, 1, "_root-72", -1, 1, 0, 0, },
+ { 156, 72, 1, "_root-73", -1, 1, 0, 0, },
+ { 156, 73, 1, "_root-74", -1, 1, 0, 0, },
+ { 156, 74, 1, "_root-75", -1, 1, 0, 0, },
+ { 156, 75, 1, "_root-76", -1, 1, 0, 0, },
+ { 156, 76, 1, "_root-77", -1, 1, 0, 0, },
+ { 156, 77, 1, "_root-78", -1, 1, 0, 0, },
+ { 156, 78, 1, "_root-79", -1, 1, 0, 0, },
+ { 156, 79, 1, "_root-80", -1, 1, 0, 0, },
+ { 156, 80, 1, "_root-81", -1, 1, 0, 0, },
+ { 156, 81, 1, "_root-82", -1, 1, 0, 0, },
+ { 156, 82, 1, "_root-83", -1, 1, 0, 0, },
+ { 156, 83, 1, "_root-84", -1, 1, 0, 0, },
+ { 156, 84, 1, "_root-85", -1, 1, 0, 0, },
+ { 156, 85, 1, "_root-86", -1, 1, 0, 0, },
+ { 156, 86, 1, "_root-87", -1, 1, 0, 0, },
+ { 156, 87, 1, "_root-88", -1, 1, 0, 0, },
+ { 156, 88, 1, "_root-89", -1, 1, 0, 0, },
+ { 156, 89, 1, "_root-90", -1, 1, 0, 0, },
+ { 156, 90, 1, "_root-91", -1, 1, 0, 0, },
+ { 156, 91, 1, "_root-92", -1, 1, 0, 0, },
+ { 156, 92, 1, "_root-93", -1, 1, 0, 0, },
+ { 156, 93, 1, "_root-94", -1, 1, 0, 0, },
+ { 156, 94, 1, "_root-95", -1, 1, 0, 0, },
+ { 156, 95, 1, "_root-96", -1, 1, 0, 0, },
+ { 156, 96, 1, "_root-97", -1, 1, 0, 0, },
+ { 156, 97, 1, "_root-98", -1, 1, 0, 0, },
+ { 156, 98, 1, "_root-99", -1, 1, 0, 0, },
+ { 156, 99, 1, "_root-100", -1, 1, 0, 0, },
+ { 156, 100, 1, "_root-101", -1, 1, 0, 0, },
+ { 156, 101, 1, "_root-102", -1, 1, 0, 0, },
+ { 156, 102, 1, "_root-103", -1, 1, 0, 0, },
+ { 156, 103, 1, "_root-104", -1, 1, 0, 0, },
+ { 156, 104, 1, "_root-105", -1, 1, 0, 0, },
+ { 156, 105, 1, "_root-106", -1, 1, 0, 0, },
+ { 156, 106, 1, "_root-107", -1, 1, 0, 0, },
+ { 156, 107, 1, "_root-108", -1, 1, 0, 0, },
+ { 156, 108, 1, "_root-109", -1, 1, 0, 0, },
+ { 156, 109, 1, "_root-110", -1, 1, 0, 0, },
+ { 156, 110, 1, "_root-111", -1, 1, 0, 0, },
+ { 156, 111, 1, "_root-112", -1, 1, 0, 0, },
+ { 156, 112, 1, "_root-113", -1, 1, 0, 0, },
+ { 156, 113, 1, "_root-114", -1, 1, 0, 0, },
+ { 156, 114, 1, "_root-115", -1, 1, 0, 0, },
+ { 156, 115, 1, "_root-116", -1, 1, 0, 0, },
+ { 156, 116, 1, "_root-117", -1, 1, 0, 0, },
+ { 156, 117, 1, "_root-118", -1, 1, 0, 0, },
+ { 156, 118, 1, "_root-119", -1, 1, 0, 0, },
+ { 156, 119, 1, "_root-120", -1, 1, 0, 0, },
+ { 156, 120, 1, "_root-121", -1, 1, 0, 0, },
+ { 156, 121, 1, "_root-122", -1, 1, 0, 0, },
+ { 156, 122, 1, "_root-123", -1, 1, 0, 0, },
+ { 156, 123, 1, "_root-124", -1, 1, 0, 0, },
+ { 156, 124, 1, "_root-125", -1, 1, 0, 0, },
+ { 156, 125, 1, "_root-126", -1, 1, 0, 0, },
+ { 156, 126, 1, "_root-127", -1, 1, 0, 0, },
+ { 156, 127, 1, "_root-128", -1, 1, 0, 0, },
+ { 156, 128, 1, "_root-129", -1, 1, 0, 0, },
+ { 156, 129, 1, "_root-130", -1, 1, 0, 0, },
+ { 156, 130, 1, "_root-131", -1, 1, 0, 0, },
+ { 156, 131, 1, "_root-132", -1, 1, 0, 0, },
+ { 156, 132, 1, "_root-133", -1, 1, 0, 0, },
+ { 156, 133, 1, "_root-134", -1, 1, 0, 0, },
+ { 156, 134, 1, "_root-135", -1, 1, 0, 0, },
+ { 156, 135, 1, "_root-136", -1, 1, 0, 0, },
+ { 156, 136, 1, "_root-137", -1, 1, 0, 0, },
+ { 156, 137, 1, "_root-138", -1, 1, 0, 0, },
+ { 156, 138, 1, "_root-139", -1, 1, 0, 0, },
+ { 156, 139, 1, "_root-140", -1, 1, 0, 0, },
+ { 156, 140, 1, "_root-141", -1, 1, 0, 0, },
+ { 156, 141, 1, "_root-142", -1, 1, 0, 0, },
+ { 156, 142, 1, "_root-143", -1, 1, 0, 0, },
+ { 156, 143, 1, "_root-144", -1, 1, 0, 0, },
+ { 156, 144, 1, "_root-145", -1, 1, 0, 0, },
+ { 156, 145, 1, "_root-146", -1, 1, 0, 0, },
+ { 156, 146, 1, "_root-147", -1, 1, 0, 0, },
+ { 156, 147, 1, "_root-148", -1, 1, 0, 0, },
+ { 156, 148, 1, "_root-149", -1, 1, 0, 0, },
+ { 156, 149, 1, "_root-150", -1, 1, 0, 0, },
+ { 156, 150, 1, "_root-151", -1, 1, 0, 0, },
+ { 156, 151, 1, "_root-152", -1, 1, 0, 0, },
+ { 156, 152, 1, "_root-153", -1, 1, 0, 0, },
+ { 156, 153, 1, "_root-154", -1, 1, 0, 0, },
+ { 156, 154, 1, "_root-155", -1, 1, 0, 0, },
+ { 156, 155, 1, "_root-156", -1, 1, 0, 0, }
+};
+
+static PatConsInfo parser_patReplInfo[] = {
+ { 0, 0 },
+};
+
+static PatConsNode parser_patReplNodes[] = {
+ { 153, 0, -1, -1, 0, 0, 0, -1, -1, 0 },
+};
+
+static FunctionInfo parser_functionInfo[] = {
+
+};
+
+static RegionInfo parser_regionInfo[] = {
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 31 }
+};
+
+static GenericInfo parser_genericInfo[] = {
+ { 0, 0, 0, 0, 0, 0 },
+ { 19, 2, 0, 0, 153, 0 },
+ { 16, 2, 0, 0, 155, -1 },
+};
+
+static const char *parser_litdata[] = {
+ "r",
+};
+
+static long parser_litlen[] = {
+ 1, };
+
+static Head *parser_literals[] = {
+ 0, };
+
+static int startStates[] = {
+ 0, 1, };
+
+static int eofLelIds[] = {
+ 104, 106, };
+
+static int parserLelIds[] = {
+ 152, 153, };
+
+static CaptureAttr captureAttr[] = {
+};
+
+RuntimeData colm_object =
+{
+ parser_lelInfo,
+ 157,
+
+ parser_prodInfo,
+ 197,
+
+ parser_regionInfo,
+ 5,
+
+ parser_rootCode,
+ 69,
+ 0,
+
+ parser_frameInfo,
+ 1,
+
+ parser_functionInfo,
+ 0,
+
+ parser_patReplInfo,
+ 1,
+
+ parser_patReplNodes,
+ 1,
+
+ parser_genericInfo,
+ 3,
+ 2,
+
+ parser_litdata,
+ parser_litlen,
+ parser_literals,
+ 1,
+
+ captureAttr,
+ 0,
+
+ &fsmTables_start,
+ &pid_0_pdaTables,
+ startStates, eofLelIds, parserLelIds, 2,
+
+ 2,
+
+ 133,
+ 4,
+ 5,
+ 133,
+ 0,
+ 132,
+ &fsmExecute,
+ &sendNamedLangEl,
+ &initBindings,
+ &popBinding,
+};
+
diff --git a/src/parse2.c b/src/parse2.c
new file mode 100644
index 0000000..222ec18
--- /dev/null
+++ b/src/parse2.c
@@ -0,0 +1,30258 @@
+#include <colm/pdarun.h>
+#include <colm/debug.h>
+#include <colm/bytecode.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <colm/config.h>
+#include <colm/defs.h>
+#include <colm/input.h>
+#include <colm/tree.h>
+#include <colm/program.h>
+#include <colm/colm.h>
+
+
+extern RuntimeData colm_program_text;
+
+#define parser_start 29
+#define parser_first_final 29
+#define parser_error 0
+#define false 0
+#define true 1
+
+static long parser_entryByRegion[] = {
+ 0, 29, 212, 394, 394, 396, 398, 400,
+ 400, 401, 403, 405, 405, 406, 408, 410,
+ 410, 411, 423, 434, 434, 436, 437, 438,
+ 438
+};
+
+static FsmTables fsmTables_start =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ parser_entryByRegion,
+
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 24,
+
+ parser_start,
+ parser_first_final,
+ parser_error,
+
+ 0,
+ 0
+};
+
+static void fsmExecute( FsmRun *fsmRun, StreamImpl *inputStream )
+{
+ fsmRun->start = fsmRun->p;
+/*_resume:*/
+ if ( fsmRun->cs == 0 )
+ goto out;
+ if ( fsmRun->p == fsmRun->pe )
+ goto out_switch;
+ --fsmRun->p;
+
+ switch ( fsmRun->cs )
+ {
+tr1:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 101;
+ goto out;
+}
+ goto st29;
+tr2:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 98;
+ goto out;
+}
+ goto st29;
+tr5:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 66;
+ goto out;
+}
+ goto st29;
+tr45:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 67;
+ goto out;
+}
+ goto st29;
+tr46:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 93;
+ goto out;
+}
+ goto st29;
+tr47:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 95;
+ goto out;
+}
+ goto st29;
+tr49:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 68;
+ goto out;
+}
+ goto st29;
+tr50:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 78;
+ goto out;
+}
+ goto st29;
+tr51:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 79;
+ goto out;
+}
+ goto st29;
+tr52:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 82;
+ goto out;
+}
+ goto st29;
+tr53:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 96;
+ goto out;
+}
+ goto st29;
+tr54:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 87;
+ goto out;
+}
+ goto st29;
+tr56:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 76;
+ goto out;
+}
+ goto st29;
+tr57:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 73;
+ goto out;
+}
+ goto st29;
+tr63:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 83;
+ goto out;
+}
+ goto st29;
+tr65:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 70;
+ goto out;
+}
+ goto st29;
+tr66:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 71;
+ goto out;
+}
+ goto st29;
+tr67:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 94;
+ goto out;
+}
+ goto st29;
+tr87:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 80;
+ goto out;
+}
+ goto st29;
+tr89:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 81;
+ goto out;
+}
+ goto st29;
+tr90:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 69;
+ goto out;
+}
+ goto st29;
+tr91:
+ { fsmRun->matchedToken = 100;
+ goto out;
+}
+ goto st29;
+tr92:
+ { fsmRun->matchedToken = 92;
+ goto out;
+}
+ goto st29;
+tr93:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 86;
+ goto out;
+}
+ goto st29;
+tr94:
+ { fsmRun->matchedToken = 97;
+ goto out;
+}
+ goto st29;
+tr95:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 77;
+ goto out;
+}
+ goto st29;
+tr96:
+ { fsmRun->matchedToken = 65;
+ goto out;
+}
+ goto st29;
+tr97:
+ { fsmRun->matchedToken = 74;
+ goto out;
+}
+ goto st29;
+tr98:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 75;
+ goto out;
+}
+ goto st29;
+tr99:
+ { fsmRun->matchedToken = 88;
+ goto out;
+}
+ goto st29;
+tr100:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 90;
+ goto out;
+}
+ goto st29;
+tr101:
+ { fsmRun->matchedToken = 84;
+ goto out;
+}
+ goto st29;
+tr102:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 85;
+ goto out;
+}
+ goto st29;
+tr103:
+ { fsmRun->matchedToken = 89;
+ goto out;
+}
+ goto st29;
+tr104:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 91;
+ goto out;
+}
+ goto st29;
+tr105:
+ { fsmRun->toklen = fsmRun->tokend;
+ switch( fsmRun->act ) {
+ case 1:
+ fsmRun->matchedToken = 8;
+ break;
+ case 3:
+ fsmRun->matchedToken = 9;
+ break;
+ case 5:
+ fsmRun->matchedToken = 10;
+ break;
+ case 7:
+ fsmRun->matchedToken = 11;
+ break;
+ case 9:
+ fsmRun->matchedToken = 12;
+ break;
+ case 11:
+ fsmRun->matchedToken = 13;
+ break;
+ case 15:
+ fsmRun->matchedToken = 15;
+ break;
+ case 19:
+ fsmRun->matchedToken = 17;
+ break;
+ case 23:
+ fsmRun->matchedToken = 19;
+ break;
+ case 25:
+ fsmRun->matchedToken = 20;
+ break;
+ case 27:
+ fsmRun->matchedToken = 21;
+ break;
+ case 29:
+ fsmRun->matchedToken = 22;
+ break;
+ case 31:
+ fsmRun->matchedToken = 23;
+ break;
+ case 33:
+ fsmRun->matchedToken = 24;
+ break;
+ case 35:
+ fsmRun->matchedToken = 25;
+ break;
+ case 37:
+ fsmRun->matchedToken = 26;
+ break;
+ case 39:
+ fsmRun->matchedToken = 27;
+ break;
+ case 41:
+ fsmRun->matchedToken = 28;
+ break;
+ case 43:
+ fsmRun->matchedToken = 29;
+ break;
+ case 45:
+ fsmRun->matchedToken = 30;
+ break;
+ case 49:
+ fsmRun->matchedToken = 32;
+ break;
+ case 51:
+ fsmRun->matchedToken = 33;
+ break;
+ case 53:
+ fsmRun->matchedToken = 34;
+ break;
+ case 55:
+ fsmRun->matchedToken = 35;
+ break;
+ case 57:
+ fsmRun->matchedToken = 36;
+ break;
+ case 59:
+ fsmRun->matchedToken = 37;
+ break;
+ case 61:
+ fsmRun->matchedToken = 38;
+ break;
+ case 63:
+ fsmRun->matchedToken = 39;
+ break;
+ case 65:
+ fsmRun->matchedToken = 40;
+ break;
+ case 67:
+ fsmRun->matchedToken = 41;
+ break;
+ case 69:
+ fsmRun->matchedToken = 42;
+ break;
+ case 71:
+ fsmRun->matchedToken = 43;
+ break;
+ case 73:
+ fsmRun->matchedToken = 44;
+ break;
+ case 75:
+ fsmRun->matchedToken = 45;
+ break;
+ case 77:
+ fsmRun->matchedToken = 46;
+ break;
+ case 79:
+ fsmRun->matchedToken = 47;
+ break;
+ case 81:
+ fsmRun->matchedToken = 48;
+ break;
+ case 83:
+ fsmRun->matchedToken = 49;
+ break;
+ case 85:
+ fsmRun->matchedToken = 50;
+ break;
+ case 87:
+ fsmRun->matchedToken = 51;
+ break;
+ case 89:
+ fsmRun->matchedToken = 52;
+ break;
+ case 91:
+ fsmRun->matchedToken = 53;
+ break;
+ case 93:
+ fsmRun->matchedToken = 54;
+ break;
+ case 95:
+ fsmRun->matchedToken = 55;
+ break;
+ case 99:
+ fsmRun->matchedToken = 57;
+ break;
+ case 101:
+ fsmRun->matchedToken = 58;
+ break;
+ case 103:
+ fsmRun->matchedToken = 59;
+ break;
+ case 105:
+ fsmRun->matchedToken = 60;
+ break;
+ case 107:
+ fsmRun->matchedToken = 61;
+ break;
+ case 109:
+ fsmRun->matchedToken = 62;
+ break;
+ case 111:
+ fsmRun->matchedToken = 63;
+ break;
+ case 113:
+ fsmRun->matchedToken = 64;
+ break;
+ }
+ goto skip_toklen;
+}
+ goto st29;
+tr106:
+ { fsmRun->matchedToken = 66;
+ goto out;
+}
+ goto st29;
+tr107:
+ { fsmRun->matchedToken = 64;
+ goto out;
+}
+ goto st29;
+tr131:
+ { fsmRun->matchedToken = 20;
+ goto out;
+}
+ goto st29;
+tr175:
+ { fsmRun->matchedToken = 31;
+ goto out;
+}
+ goto st29;
+tr223:
+ { fsmRun->matchedToken = 56;
+ goto out;
+}
+ goto st29;
+tr237:
+ { fsmRun->matchedToken = 18;
+ goto out;
+}
+ goto st29;
+tr250:
+ { fsmRun->matchedToken = 14;
+ goto out;
+}
+ goto st29;
+tr256:
+ { fsmRun->matchedToken = 16;
+ goto out;
+}
+ goto st29;
+tr318:
+ { fsmRun->matchedToken = 72;
+ goto out;
+}
+ goto st29;
+tr319:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 99;
+ goto out;
+}
+ goto st29;
+st29:
+case 29:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out29;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 32: goto st30;
+ case 33: goto st31;
+ case 34: goto tr45;
+ case 35: goto st1;
+ case 36: goto tr46;
+ case 37: goto tr47;
+ case 38: goto st2;
+ case 39: goto tr49;
+ case 40: goto tr50;
+ case 41: goto tr51;
+ case 42: goto tr52;
+ case 43: goto tr53;
+ case 44: goto tr54;
+ case 45: goto st32;
+ case 46: goto tr56;
+ case 47: goto tr57;
+ case 58: goto st34;
+ case 60: goto st35;
+ case 61: goto st36;
+ case 62: goto st37;
+ case 63: goto tr63;
+ case 91: goto tr65;
+ case 93: goto tr66;
+ case 94: goto tr67;
+ case 96: goto st3;
+ case 97: goto st40;
+ case 98: goto st47;
+ case 99: goto st51;
+ case 100: goto st67;
+ case 101: goto st69;
+ case 102: goto st79;
+ case 103: goto st84;
+ case 105: goto st89;
+ case 108: goto st101;
+ case 109: goto st110;
+ case 110: goto st123;
+ case 112: goto st139;
+ case 114: goto st162;
+ case 115: goto st185;
+ case 116: goto st188;
+ case 118: goto st198;
+ case 119: goto st203;
+ case 121: goto st207;
+ case 123: goto tr87;
+ case 124: goto st211;
+ case 125: goto tr89;
+ case 126: goto tr90;
+ }
+ if ( (*fsmRun->p) < 48 ) {
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto st30;
+ } else if ( (*fsmRun->p) > 57 ) {
+ if ( (*fsmRun->p) > 90 ) {
+ if ( 95 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else if ( (*fsmRun->p) >= 65 )
+ goto tr64;
+ } else
+ goto st33;
+ goto st0;
+st30:
+case 30:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out30;
+ if ( (*fsmRun->p) == 32 )
+ goto st30;
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto st30;
+ goto tr91;
+st31:
+case 31:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out31;
+ if ( (*fsmRun->p) == 61 )
+ goto tr93;
+ goto tr92;
+st1:
+case 1:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out1;
+ if ( (*fsmRun->p) == 10 )
+ goto tr1;
+ goto st1;
+st2:
+case 2:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out2;
+ if ( (*fsmRun->p) == 38 )
+ goto tr2;
+ goto st0;
+st0:
+ goto out0;
+st32:
+case 32:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out32;
+ if ( (*fsmRun->p) == 62 )
+ goto tr95;
+ goto tr94;
+st34:
+case 34:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out34;
+ if ( (*fsmRun->p) == 58 )
+ goto tr98;
+ goto tr97;
+st35:
+case 35:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out35;
+ if ( (*fsmRun->p) == 61 )
+ goto tr100;
+ goto tr99;
+st36:
+case 36:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out36;
+ if ( (*fsmRun->p) == 61 )
+ goto tr102;
+ goto tr101;
+st37:
+case 37:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out37;
+ if ( (*fsmRun->p) == 61 )
+ goto tr104;
+ goto tr103;
+st3:
+case 3:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out3;
+ switch( (*fsmRun->p) ) {
+ case 32: goto st0;
+ case 93: goto tr5;
+ }
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto st0;
+ goto st39;
+st39:
+case 39:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out39;
+ switch( (*fsmRun->p) ) {
+ case 32: goto tr106;
+ case 93: goto tr106;
+ }
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto tr106;
+ goto st39;
+st40:
+case 40:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out40;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto st41;
+ case 108: goto st44;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+tr64:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 113;}
+ goto st38;
+tr112:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 49;}
+ goto st38;
+tr115:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 73;}
+ goto st38;
+tr119:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 67;}
+ goto st38;
+tr123:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 85;}
+ goto st38;
+tr128:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 75;}
+ goto st38;
+tr136:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 25;}
+ goto st38;
+tr139:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 95;}
+ goto st38;
+tr141:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 1;}
+ goto st38;
+tr147:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 45;}
+ goto st38;
+tr149:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 43;}
+ goto st38;
+tr150:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 5;}
+ goto st38;
+tr151:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 83;}
+ goto st38;
+tr155:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 63;}
+ goto st38;
+tr160:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 103;}
+ goto st38;
+tr161:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 35;}
+ goto st38;
+tr166:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 81;}
+ goto st38;
+tr167:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 37;}
+ goto st38;
+tr174:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 11;}
+ goto st38;
+tr180:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 111;}
+ goto st38;
+tr182:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 59;}
+ goto st38;
+tr186:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 3;}
+ goto st38;
+tr187:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 105;}
+ goto st38;
+tr190:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 51;}
+ goto st38;
+tr194:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 93;}
+ goto st38;
+tr197:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 55;}
+ goto st38;
+tr206:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 87;}
+ goto st38;
+tr208:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 89;}
+ goto st38;
+tr210:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 27;}
+ goto st38;
+tr221:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 33;}
+ goto st38;
+tr222:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 77;}
+ goto st38;
+tr224:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 99;}
+ goto st38;
+tr230:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 109;}
+ goto st38;
+tr242:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 23;}
+ goto st38;
+tr247:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 79;}
+ goto st38;
+tr252:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 15;}
+ goto st38;
+tr259:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 19;}
+ goto st38;
+tr260:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 57;}
+ goto st38;
+tr263:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 9;}
+ goto st38;
+tr265:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 61;}
+ goto st38;
+tr276:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 71;}
+ goto st38;
+tr279:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 69;}
+ goto st38;
+tr283:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 29;}
+ goto st38;
+tr286:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 65;}
+ goto st38;
+tr289:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 107;}
+ goto st38;
+tr292:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 31;}
+ goto st38;
+tr298:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 7;}
+ goto st38;
+tr300:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 101;}
+ goto st38;
+tr304:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 91;}
+ goto st38;
+tr309:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 53;}
+ goto st38;
+tr313:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 41;}
+ goto st38;
+tr317:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 39;}
+ goto st38;
+st38:
+case 38:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out38;
+ if ( (*fsmRun->p) == 95 )
+ goto tr64;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr105;
+st41:
+case 41:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out41;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto st42;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st42:
+case 42:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out42;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 117: goto st43;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st43:
+case 43:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out43;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 109: goto tr112;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st44:
+case 44:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out44;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 105: goto st45;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st45:
+case 45:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out45;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st46;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st46:
+case 46:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out46;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto tr115;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st47:
+case 47:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out47;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto st48;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st48:
+case 48:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out48;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st49;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st49:
+case 49:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out49;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st50;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st50:
+case 50:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out50;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 107: goto tr119;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st51:
+case 51:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out51;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st52;
+ case 111: goto st54;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st52:
+case 52:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out52;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st53;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st53:
+case 53:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out53;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr123;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st54:
+case 54:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out54;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 109: goto st55;
+ case 110: goto st58;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st55:
+case 55:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out55;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 109: goto st56;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st56:
+case 56:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out56;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 105: goto st57;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st57:
+case 57:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out57;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr128;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st58:
+case 58:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out58;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st59;
+ case 116: goto st64;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st59:
+case 59:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out59;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto st60;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr131;
+st60:
+case 60:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out60;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto st61;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st61:
+case 61:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out61;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 117: goto st62;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st62:
+case 62:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out62;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto st63;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st63:
+case 63:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out63;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr136;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st64:
+case 64:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out64;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st65;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st65:
+case 65:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out65;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 120: goto st66;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st66:
+case 66:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out66;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr139;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st67:
+case 67:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out67;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st68;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st68:
+case 68:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out68;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 102: goto tr141;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st69:
+case 69:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out69;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 108: goto st70;
+ case 110: goto st73;
+ case 111: goto st74;
+ case 120: goto st75;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st70:
+case 70:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out70;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st71;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st71:
+case 71:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out71;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto tr147;
+ case 105: goto st72;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st72:
+case 72:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out72;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 102: goto tr149;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st73:
+case 73:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out73;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 100: goto tr150;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st74:
+case 74:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out74;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto tr151;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st75:
+case 75:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out75;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 112: goto st76;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st76:
+case 76:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out76;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st77;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st77:
+case 77:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out77;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto st78;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st78:
+case 78:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out78;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr155;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st79:
+case 79:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out79;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st80;
+ case 111: goto st83;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st80:
+case 80:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out80;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 108: goto st81;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st81:
+case 81:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out81;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st82;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st82:
+case 82:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out82;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto tr160;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st83:
+case 83:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out83;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto tr161;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st84:
+case 84:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out84;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 108: goto st85;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st85:
+case 85:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out85;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st86;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st86:
+case 86:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out86;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 98: goto st87;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st87:
+case 87:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out87;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st88;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st88:
+case 88:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out88;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 108: goto tr166;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st89:
+case 89:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out89;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 102: goto tr167;
+ case 103: goto st90;
+ case 110: goto st94;
+ case 116: goto st99;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st90:
+case 90:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out90;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 110: goto st91;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st91:
+case 91:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out91;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st92;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st92:
+case 92:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out92;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto st93;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st93:
+case 93:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out93;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto tr174;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st94:
+case 94:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out94;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto st95;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr175;
+st95:
+case 95:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out95;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 108: goto st96;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st96:
+case 96:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out96;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 117: goto st97;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st97:
+case 97:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out97;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 100: goto st98;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st98:
+case 98:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out98;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto tr180;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st99:
+case 99:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out99;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st100;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st100:
+case 100:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out100;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto tr182;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st101:
+case 101:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out101;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st102;
+ case 105: goto st104;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st102:
+case 102:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out102;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 102: goto st103;
+ case 120: goto tr186;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st103:
+case 103:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out103;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr187;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st104:
+case 104:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out104;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st105;
+ case 116: goto st106;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st105:
+case 105:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out105;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr190;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st106:
+case 106:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out106;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st107;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st107:
+case 107:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out107;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto st108;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st108:
+case 108:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out108;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st109;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st109:
+case 109:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out109;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 108: goto tr194;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st110:
+case 110:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out110;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st111;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st111:
+case 111:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out111;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 107: goto st112;
+ case 112: goto tr197;
+ case 116: goto st121;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st112:
+case 112:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out112;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st113;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st113:
+case 113:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out113;
+ if ( (*fsmRun->p) == 95 )
+ goto st114;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st114:
+case 114:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out114;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto st115;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st115:
+case 115:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out115;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st116;
+ case 114: goto st119;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st116:
+case 116:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out116;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 107: goto st117;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st117:
+case 117:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out117;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st118;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st118:
+case 118:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out118;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 110: goto tr206;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st119:
+case 119:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out119;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st120;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st120:
+case 120:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out120;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto tr208;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st121:
+case 121:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out121;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto st122;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st122:
+case 122:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out122;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 104: goto tr210;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st123:
+case 123:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out123;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st124;
+ case 101: goto st131;
+ case 105: goto st132;
+ case 111: goto st133;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st124:
+case 124:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out124;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 109: goto st125;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st125:
+case 125:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out125;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st126;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st126:
+case 126:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out126;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st127;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st127:
+case 127:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out127;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 112: goto st128;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st128:
+case 128:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out128;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st129;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st129:
+case 129:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out129;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto st130;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st130:
+case 130:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out130;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto tr221;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st131:
+case 131:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out131;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 119: goto tr222;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st132:
+case 132:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out132;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 108: goto tr224;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr223;
+st133:
+case 133:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out133;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 110: goto st134;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st134:
+case 134:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out134;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st135;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st135:
+case 135:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out135;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st136;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st136:
+case 136:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out136;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st137;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st137:
+case 137:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out137;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st138;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st138:
+case 138:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out138;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto tr230;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st139:
+case 139:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out139;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st140;
+ case 114: goto st148;
+ case 116: goto st161;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st140:
+case 140:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out140;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto st141;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st141:
+case 141:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out141;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st142;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st142:
+case 142:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out142;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st143;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st143:
+case 143:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out143;
+ switch( (*fsmRun->p) ) {
+ case 95: goto st144;
+ case 114: goto tr112;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr237;
+st144:
+case 144:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out144;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st145;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st145:
+case 145:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out145;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto st146;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st146:
+case 146:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out146;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st147;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st147:
+case 147:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out147;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 112: goto tr242;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st148:
+case 148:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out148;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st149;
+ case 105: goto st152;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st149:
+case 149:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out149;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st150;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st150:
+case 150:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out150;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st151;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st151:
+case 151:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out151;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 102: goto tr247;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st152:
+case 152:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out152;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 110: goto st153;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st153:
+case 153:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out153;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto st154;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st154:
+case 154:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out154;
+ switch( (*fsmRun->p) ) {
+ case 95: goto st155;
+ case 115: goto tr252;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr250;
+st155:
+case 155:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out155;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 120: goto st156;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st156:
+case 156:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out156;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 109: goto st157;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st157:
+case 157:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out157;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 108: goto st158;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st158:
+case 158:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out158;
+ if ( (*fsmRun->p) == 95 )
+ goto st159;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr256;
+st159:
+case 159:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out159;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 97: goto st160;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st160:
+case 160:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out160;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto tr259;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st161:
+case 161:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out161;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto tr260;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st162:
+case 162:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out162;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st163;
+ case 105: goto st182;
+ case 108: goto tr263;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st163:
+case 163:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out163;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 100: goto st164;
+ case 102: goto tr265;
+ case 106: goto st172;
+ case 113: goto st175;
+ case 116: goto st179;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st164:
+case 164:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out164;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 117: goto st165;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st165:
+case 165:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out165;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto st166;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st166:
+case 166:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out166;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st167;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st167:
+case 167:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out167;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 102: goto st168;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st168:
+case 168:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out168;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 105: goto st169;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st169:
+case 169:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out169;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto st170;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st170:
+case 170:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out170;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 115: goto st171;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st171:
+case 171:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out171;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr276;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st172:
+case 172:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out172;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st173;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st173:
+case 173:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out173;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto st174;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st174:
+case 174:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out174;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr279;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st175:
+case 175:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out175;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 117: goto st176;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st176:
+case 176:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out176;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 105: goto st177;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st177:
+case 177:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out177;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto st178;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st178:
+case 178:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out178;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto tr283;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st179:
+case 179:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out179;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 117: goto st180;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st180:
+case 180:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out180;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto st181;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st181:
+case 181:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out181;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 110: goto tr286;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st182:
+case 182:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out182;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 103: goto st183;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st183:
+case 183:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out183;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 104: goto st184;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st184:
+case 184:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out184;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto tr289;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st185:
+case 185:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out185;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st186;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st186:
+case 186:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out186;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 110: goto st187;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st187:
+case 187:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out187;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 100: goto tr292;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st188:
+case 188:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out188;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st189;
+ case 114: goto st192;
+ case 121: goto st194;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st189:
+case 189:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out189;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 107: goto st190;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st190:
+case 190:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out190;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st191;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st191:
+case 191:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out191;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 110: goto tr298;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st192:
+case 192:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out192;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 117: goto st193;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st193:
+case 193:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out193;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto tr300;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st194:
+case 194:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out194;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 112: goto st195;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st195:
+case 195:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out195;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st196;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st196:
+case 196:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out196;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 105: goto st197;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st197:
+case 197:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out197;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 100: goto tr304;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st198:
+case 198:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out198;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st199;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st199:
+case 199:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out199;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 99: goto st200;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st200:
+case 200:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out200;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 116: goto st201;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st201:
+case 201:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out201;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 111: goto st202;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st202:
+case 202:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out202;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 114: goto tr309;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st203:
+case 203:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out203;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 104: goto st204;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st204:
+case 204:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out204;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 105: goto st205;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st205:
+case 205:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out205;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 108: goto st206;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st206:
+case 206:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out206;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto tr313;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st207:
+case 207:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out207;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 105: goto st208;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st208:
+case 208:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out208;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 101: goto st209;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st209:
+case 209:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out209;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 108: goto st210;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st210:
+case 210:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out210;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr64;
+ case 100: goto tr317;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr64;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr64;
+ } else
+ goto tr64;
+ goto tr107;
+st211:
+case 211:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out211;
+ if ( (*fsmRun->p) == 124 )
+ goto tr319;
+ goto tr318;
+st33:
+case 33:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out33;
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st33;
+ goto tr96;
+tr6:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 98;
+ goto out;
+}
+ goto st212;
+tr8:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 66;
+ goto out;
+}
+ goto st212;
+tr321:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 67;
+ goto out;
+}
+ goto st212;
+tr322:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 93;
+ goto out;
+}
+ goto st212;
+tr323:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 95;
+ goto out;
+}
+ goto st212;
+tr325:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 68;
+ goto out;
+}
+ goto st212;
+tr326:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 78;
+ goto out;
+}
+ goto st212;
+tr327:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 79;
+ goto out;
+}
+ goto st212;
+tr328:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 82;
+ goto out;
+}
+ goto st212;
+tr329:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 96;
+ goto out;
+}
+ goto st212;
+tr330:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 87;
+ goto out;
+}
+ goto st212;
+tr332:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 76;
+ goto out;
+}
+ goto st212;
+tr333:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 73;
+ goto out;
+}
+ goto st212;
+tr339:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 83;
+ goto out;
+}
+ goto st212;
+tr341:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 70;
+ goto out;
+}
+ goto st212;
+tr342:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 71;
+ goto out;
+}
+ goto st212;
+tr343:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 94;
+ goto out;
+}
+ goto st212;
+tr363:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 80;
+ goto out;
+}
+ goto st212;
+tr365:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 81;
+ goto out;
+}
+ goto st212;
+tr366:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 69;
+ goto out;
+}
+ goto st212;
+tr367:
+ { fsmRun->matchedToken = 92;
+ goto out;
+}
+ goto st212;
+tr368:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 86;
+ goto out;
+}
+ goto st212;
+tr369:
+ { fsmRun->matchedToken = 97;
+ goto out;
+}
+ goto st212;
+tr370:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 77;
+ goto out;
+}
+ goto st212;
+tr371:
+ { fsmRun->matchedToken = 65;
+ goto out;
+}
+ goto st212;
+tr372:
+ { fsmRun->matchedToken = 74;
+ goto out;
+}
+ goto st212;
+tr373:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 75;
+ goto out;
+}
+ goto st212;
+tr374:
+ { fsmRun->matchedToken = 88;
+ goto out;
+}
+ goto st212;
+tr375:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 90;
+ goto out;
+}
+ goto st212;
+tr376:
+ { fsmRun->matchedToken = 84;
+ goto out;
+}
+ goto st212;
+tr377:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 85;
+ goto out;
+}
+ goto st212;
+tr378:
+ { fsmRun->matchedToken = 89;
+ goto out;
+}
+ goto st212;
+tr379:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 91;
+ goto out;
+}
+ goto st212;
+tr380:
+ { fsmRun->toklen = fsmRun->tokend;
+ switch( fsmRun->act ) {
+ case 2:
+ fsmRun->matchedToken = 8;
+ break;
+ case 4:
+ fsmRun->matchedToken = 9;
+ break;
+ case 6:
+ fsmRun->matchedToken = 10;
+ break;
+ case 8:
+ fsmRun->matchedToken = 11;
+ break;
+ case 10:
+ fsmRun->matchedToken = 12;
+ break;
+ case 12:
+ fsmRun->matchedToken = 13;
+ break;
+ case 16:
+ fsmRun->matchedToken = 15;
+ break;
+ case 20:
+ fsmRun->matchedToken = 17;
+ break;
+ case 24:
+ fsmRun->matchedToken = 19;
+ break;
+ case 26:
+ fsmRun->matchedToken = 20;
+ break;
+ case 28:
+ fsmRun->matchedToken = 21;
+ break;
+ case 30:
+ fsmRun->matchedToken = 22;
+ break;
+ case 32:
+ fsmRun->matchedToken = 23;
+ break;
+ case 34:
+ fsmRun->matchedToken = 24;
+ break;
+ case 36:
+ fsmRun->matchedToken = 25;
+ break;
+ case 38:
+ fsmRun->matchedToken = 26;
+ break;
+ case 40:
+ fsmRun->matchedToken = 27;
+ break;
+ case 42:
+ fsmRun->matchedToken = 28;
+ break;
+ case 44:
+ fsmRun->matchedToken = 29;
+ break;
+ case 46:
+ fsmRun->matchedToken = 30;
+ break;
+ case 50:
+ fsmRun->matchedToken = 32;
+ break;
+ case 52:
+ fsmRun->matchedToken = 33;
+ break;
+ case 54:
+ fsmRun->matchedToken = 34;
+ break;
+ case 56:
+ fsmRun->matchedToken = 35;
+ break;
+ case 58:
+ fsmRun->matchedToken = 36;
+ break;
+ case 60:
+ fsmRun->matchedToken = 37;
+ break;
+ case 62:
+ fsmRun->matchedToken = 38;
+ break;
+ case 64:
+ fsmRun->matchedToken = 39;
+ break;
+ case 66:
+ fsmRun->matchedToken = 40;
+ break;
+ case 68:
+ fsmRun->matchedToken = 41;
+ break;
+ case 70:
+ fsmRun->matchedToken = 42;
+ break;
+ case 72:
+ fsmRun->matchedToken = 43;
+ break;
+ case 74:
+ fsmRun->matchedToken = 44;
+ break;
+ case 76:
+ fsmRun->matchedToken = 45;
+ break;
+ case 78:
+ fsmRun->matchedToken = 46;
+ break;
+ case 80:
+ fsmRun->matchedToken = 47;
+ break;
+ case 82:
+ fsmRun->matchedToken = 48;
+ break;
+ case 84:
+ fsmRun->matchedToken = 49;
+ break;
+ case 86:
+ fsmRun->matchedToken = 50;
+ break;
+ case 88:
+ fsmRun->matchedToken = 51;
+ break;
+ case 90:
+ fsmRun->matchedToken = 52;
+ break;
+ case 92:
+ fsmRun->matchedToken = 53;
+ break;
+ case 94:
+ fsmRun->matchedToken = 54;
+ break;
+ case 96:
+ fsmRun->matchedToken = 55;
+ break;
+ case 100:
+ fsmRun->matchedToken = 57;
+ break;
+ case 102:
+ fsmRun->matchedToken = 58;
+ break;
+ case 104:
+ fsmRun->matchedToken = 59;
+ break;
+ case 106:
+ fsmRun->matchedToken = 60;
+ break;
+ case 108:
+ fsmRun->matchedToken = 61;
+ break;
+ case 110:
+ fsmRun->matchedToken = 62;
+ break;
+ case 112:
+ fsmRun->matchedToken = 63;
+ break;
+ case 114:
+ fsmRun->matchedToken = 64;
+ break;
+ }
+ goto skip_toklen;
+}
+ goto st212;
+tr381:
+ { fsmRun->matchedToken = 66;
+ goto out;
+}
+ goto st212;
+tr382:
+ { fsmRun->matchedToken = 64;
+ goto out;
+}
+ goto st212;
+tr406:
+ { fsmRun->matchedToken = 20;
+ goto out;
+}
+ goto st212;
+tr450:
+ { fsmRun->matchedToken = 31;
+ goto out;
+}
+ goto st212;
+tr498:
+ { fsmRun->matchedToken = 56;
+ goto out;
+}
+ goto st212;
+tr512:
+ { fsmRun->matchedToken = 18;
+ goto out;
+}
+ goto st212;
+tr525:
+ { fsmRun->matchedToken = 14;
+ goto out;
+}
+ goto st212;
+tr531:
+ { fsmRun->matchedToken = 16;
+ goto out;
+}
+ goto st212;
+tr593:
+ { fsmRun->matchedToken = 72;
+ goto out;
+}
+ goto st212;
+tr594:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 99;
+ goto out;
+}
+ goto st212;
+st212:
+case 212:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out212;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 33: goto st213;
+ case 34: goto tr321;
+ case 36: goto tr322;
+ case 37: goto tr323;
+ case 38: goto st4;
+ case 39: goto tr325;
+ case 40: goto tr326;
+ case 41: goto tr327;
+ case 42: goto tr328;
+ case 43: goto tr329;
+ case 44: goto tr330;
+ case 45: goto st214;
+ case 46: goto tr332;
+ case 47: goto tr333;
+ case 58: goto st216;
+ case 60: goto st217;
+ case 61: goto st218;
+ case 62: goto st219;
+ case 63: goto tr339;
+ case 91: goto tr341;
+ case 93: goto tr342;
+ case 94: goto tr343;
+ case 96: goto st5;
+ case 97: goto st222;
+ case 98: goto st229;
+ case 99: goto st233;
+ case 100: goto st249;
+ case 101: goto st251;
+ case 102: goto st261;
+ case 103: goto st266;
+ case 105: goto st271;
+ case 108: goto st283;
+ case 109: goto st292;
+ case 110: goto st305;
+ case 112: goto st321;
+ case 114: goto st344;
+ case 115: goto st367;
+ case 116: goto st370;
+ case 118: goto st380;
+ case 119: goto st385;
+ case 121: goto st389;
+ case 123: goto tr363;
+ case 124: goto st393;
+ case 125: goto tr365;
+ case 126: goto tr366;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st215;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 95 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto st0;
+st213:
+case 213:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out213;
+ if ( (*fsmRun->p) == 61 )
+ goto tr368;
+ goto tr367;
+st4:
+case 4:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out4;
+ if ( (*fsmRun->p) == 38 )
+ goto tr6;
+ goto st0;
+st214:
+case 214:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out214;
+ if ( (*fsmRun->p) == 62 )
+ goto tr370;
+ goto tr369;
+st216:
+case 216:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out216;
+ if ( (*fsmRun->p) == 58 )
+ goto tr373;
+ goto tr372;
+st217:
+case 217:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out217;
+ if ( (*fsmRun->p) == 61 )
+ goto tr375;
+ goto tr374;
+st218:
+case 218:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out218;
+ if ( (*fsmRun->p) == 61 )
+ goto tr377;
+ goto tr376;
+st219:
+case 219:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out219;
+ if ( (*fsmRun->p) == 61 )
+ goto tr379;
+ goto tr378;
+st5:
+case 5:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out5;
+ switch( (*fsmRun->p) ) {
+ case 32: goto st0;
+ case 93: goto tr8;
+ }
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto st0;
+ goto st221;
+st221:
+case 221:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out221;
+ switch( (*fsmRun->p) ) {
+ case 32: goto tr381;
+ case 93: goto tr381;
+ }
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto tr381;
+ goto st221;
+st222:
+case 222:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out222;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto st223;
+ case 108: goto st226;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+tr340:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 114;}
+ goto st220;
+tr387:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 50;}
+ goto st220;
+tr390:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 74;}
+ goto st220;
+tr394:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 68;}
+ goto st220;
+tr398:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 86;}
+ goto st220;
+tr403:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 76;}
+ goto st220;
+tr411:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 26;}
+ goto st220;
+tr414:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 96;}
+ goto st220;
+tr416:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 2;}
+ goto st220;
+tr422:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 46;}
+ goto st220;
+tr424:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 44;}
+ goto st220;
+tr425:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 6;}
+ goto st220;
+tr426:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 84;}
+ goto st220;
+tr430:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 64;}
+ goto st220;
+tr435:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 104;}
+ goto st220;
+tr436:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 36;}
+ goto st220;
+tr441:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 82;}
+ goto st220;
+tr442:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 38;}
+ goto st220;
+tr449:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 12;}
+ goto st220;
+tr455:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 112;}
+ goto st220;
+tr457:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 60;}
+ goto st220;
+tr461:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 4;}
+ goto st220;
+tr462:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 106;}
+ goto st220;
+tr465:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 52;}
+ goto st220;
+tr469:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 94;}
+ goto st220;
+tr472:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 56;}
+ goto st220;
+tr481:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 88;}
+ goto st220;
+tr483:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 90;}
+ goto st220;
+tr485:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 28;}
+ goto st220;
+tr496:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 34;}
+ goto st220;
+tr497:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 78;}
+ goto st220;
+tr499:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 100;}
+ goto st220;
+tr505:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 110;}
+ goto st220;
+tr517:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 24;}
+ goto st220;
+tr522:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 80;}
+ goto st220;
+tr527:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 16;}
+ goto st220;
+tr534:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 20;}
+ goto st220;
+tr535:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 58;}
+ goto st220;
+tr538:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 10;}
+ goto st220;
+tr540:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 62;}
+ goto st220;
+tr551:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 72;}
+ goto st220;
+tr554:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 70;}
+ goto st220;
+tr558:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 30;}
+ goto st220;
+tr561:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 66;}
+ goto st220;
+tr564:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 108;}
+ goto st220;
+tr567:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 32;}
+ goto st220;
+tr573:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 8;}
+ goto st220;
+tr575:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 102;}
+ goto st220;
+tr579:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 92;}
+ goto st220;
+tr584:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 54;}
+ goto st220;
+tr588:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 42;}
+ goto st220;
+tr592:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 40;}
+ goto st220;
+st220:
+case 220:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out220;
+ if ( (*fsmRun->p) == 95 )
+ goto tr340;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr380;
+st223:
+case 223:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out223;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto st224;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st224:
+case 224:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out224;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 117: goto st225;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st225:
+case 225:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out225;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 109: goto tr387;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st226:
+case 226:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out226;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 105: goto st227;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st227:
+case 227:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out227;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st228;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st228:
+case 228:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out228;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto tr390;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st229:
+case 229:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out229;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto st230;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st230:
+case 230:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out230;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st231;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st231:
+case 231:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out231;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st232;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st232:
+case 232:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out232;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 107: goto tr394;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st233:
+case 233:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out233;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st234;
+ case 111: goto st236;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st234:
+case 234:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out234;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st235;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st235:
+case 235:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out235;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto tr398;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st236:
+case 236:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out236;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 109: goto st237;
+ case 110: goto st240;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st237:
+case 237:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out237;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 109: goto st238;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st238:
+case 238:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out238;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 105: goto st239;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st239:
+case 239:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out239;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto tr403;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st240:
+case 240:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out240;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st241;
+ case 116: goto st246;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st241:
+case 241:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out241;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto st242;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr406;
+st242:
+case 242:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out242;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto st243;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st243:
+case 243:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out243;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 117: goto st244;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st244:
+case 244:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out244;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto st245;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st245:
+case 245:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out245;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto tr411;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st246:
+case 246:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out246;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st247;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st247:
+case 247:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out247;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 120: goto st248;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st248:
+case 248:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out248;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto tr414;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st249:
+case 249:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out249;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st250;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st250:
+case 250:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out250;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 102: goto tr416;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st251:
+case 251:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out251;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 108: goto st252;
+ case 110: goto st255;
+ case 111: goto st256;
+ case 120: goto st257;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st252:
+case 252:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out252;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st253;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st253:
+case 253:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out253;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto tr422;
+ case 105: goto st254;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st254:
+case 254:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out254;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 102: goto tr424;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st255:
+case 255:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out255;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 100: goto tr425;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st256:
+case 256:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out256;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto tr426;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st257:
+case 257:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out257;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 112: goto st258;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st258:
+case 258:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out258;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 111: goto st259;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st259:
+case 259:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out259;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto st260;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st260:
+case 260:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out260;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto tr430;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st261:
+case 261:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out261;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st262;
+ case 111: goto st265;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st262:
+case 262:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out262;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 108: goto st263;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st263:
+case 263:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out263;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st264;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st264:
+case 264:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out264;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto tr435;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st265:
+case 265:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out265;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto tr436;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st266:
+case 266:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out266;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 108: goto st267;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st267:
+case 267:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out267;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 111: goto st268;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st268:
+case 268:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out268;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 98: goto st269;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st269:
+case 269:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out269;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st270;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st270:
+case 270:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out270;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 108: goto tr441;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st271:
+case 271:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out271;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 102: goto tr442;
+ case 103: goto st272;
+ case 110: goto st276;
+ case 116: goto st281;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st272:
+case 272:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out272;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 110: goto st273;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st273:
+case 273:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out273;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 111: goto st274;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st274:
+case 274:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out274;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto st275;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st275:
+case 275:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out275;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto tr449;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st276:
+case 276:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out276;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto st277;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr450;
+st277:
+case 277:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out277;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 108: goto st278;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st278:
+case 278:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out278;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 117: goto st279;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st279:
+case 279:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out279;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 100: goto st280;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st280:
+case 280:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out280;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto tr455;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st281:
+case 281:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out281;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st282;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st282:
+case 282:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out282;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto tr457;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st283:
+case 283:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out283;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st284;
+ case 105: goto st286;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st284:
+case 284:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out284;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 102: goto st285;
+ case 120: goto tr461;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st285:
+case 285:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out285;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto tr462;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st286:
+case 286:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out286;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st287;
+ case 116: goto st288;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st287:
+case 287:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out287;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto tr465;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st288:
+case 288:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out288;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st289;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st289:
+case 289:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out289;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto st290;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st290:
+case 290:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out290;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st291;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st291:
+case 291:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out291;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 108: goto tr469;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st292:
+case 292:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out292;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st293;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st293:
+case 293:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out293;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 107: goto st294;
+ case 112: goto tr472;
+ case 116: goto st303;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st294:
+case 294:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out294;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st295;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st295:
+case 295:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out295;
+ if ( (*fsmRun->p) == 95 )
+ goto st296;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st296:
+case 296:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out296;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto st297;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st297:
+case 297:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out297;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 111: goto st298;
+ case 114: goto st301;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st298:
+case 298:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out298;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 107: goto st299;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st299:
+case 299:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out299;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st300;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st300:
+case 300:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out300;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 110: goto tr481;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st301:
+case 301:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out301;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st302;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st302:
+case 302:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out302;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto tr483;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st303:
+case 303:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out303;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto st304;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st304:
+case 304:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out304;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 104: goto tr485;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st305:
+case 305:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out305;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st306;
+ case 101: goto st313;
+ case 105: goto st314;
+ case 111: goto st315;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st306:
+case 306:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out306;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 109: goto st307;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st307:
+case 307:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out307;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st308;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st308:
+case 308:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out308;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st309;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st309:
+case 309:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out309;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 112: goto st310;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st310:
+case 310:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out310;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st311;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st311:
+case 311:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out311;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto st312;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st312:
+case 312:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out312;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto tr496;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st313:
+case 313:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out313;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 119: goto tr497;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st314:
+case 314:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out314;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 108: goto tr499;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr498;
+st315:
+case 315:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out315;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 110: goto st316;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st316:
+case 316:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out316;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st317;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st317:
+case 317:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out317;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st318;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st318:
+case 318:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out318;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st319;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st319:
+case 319:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out319;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 111: goto st320;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st320:
+case 320:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out320;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto tr505;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st321:
+case 321:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out321;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st322;
+ case 114: goto st330;
+ case 116: goto st343;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st322:
+case 322:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out322;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto st323;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st323:
+case 323:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out323;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st324;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st324:
+case 324:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out324;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st325;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st325:
+case 325:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out325;
+ switch( (*fsmRun->p) ) {
+ case 95: goto st326;
+ case 114: goto tr387;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr512;
+st326:
+case 326:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out326;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st327;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st327:
+case 327:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out327;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto st328;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st328:
+case 328:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out328;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 111: goto st329;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st329:
+case 329:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out329;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 112: goto tr517;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st330:
+case 330:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out330;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st331;
+ case 105: goto st334;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st331:
+case 331:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out331;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st332;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st332:
+case 332:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out332;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 111: goto st333;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st333:
+case 333:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out333;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 102: goto tr522;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st334:
+case 334:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out334;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 110: goto st335;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st335:
+case 335:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out335;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto st336;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st336:
+case 336:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out336;
+ switch( (*fsmRun->p) ) {
+ case 95: goto st337;
+ case 115: goto tr527;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr525;
+st337:
+case 337:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out337;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 120: goto st338;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st338:
+case 338:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out338;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 109: goto st339;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st339:
+case 339:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out339;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 108: goto st340;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st340:
+case 340:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out340;
+ if ( (*fsmRun->p) == 95 )
+ goto st341;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr531;
+st341:
+case 341:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out341;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 97: goto st342;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 98 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st342:
+case 342:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out342;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto tr534;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st343:
+case 343:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out343;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto tr535;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st344:
+case 344:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out344;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st345;
+ case 105: goto st364;
+ case 108: goto tr538;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st345:
+case 345:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out345;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 100: goto st346;
+ case 102: goto tr540;
+ case 106: goto st354;
+ case 113: goto st357;
+ case 116: goto st361;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st346:
+case 346:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out346;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 117: goto st347;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st347:
+case 347:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out347;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto st348;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st348:
+case 348:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out348;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st349;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st349:
+case 349:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out349;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 102: goto st350;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st350:
+case 350:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out350;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 105: goto st351;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st351:
+case 351:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out351;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto st352;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st352:
+case 352:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out352;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 115: goto st353;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st353:
+case 353:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out353;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto tr551;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st354:
+case 354:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out354;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st355;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st355:
+case 355:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out355;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto st356;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st356:
+case 356:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out356;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto tr554;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st357:
+case 357:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out357;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 117: goto st358;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st358:
+case 358:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out358;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 105: goto st359;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st359:
+case 359:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out359;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto st360;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st360:
+case 360:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out360;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto tr558;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st361:
+case 361:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out361;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 117: goto st362;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st362:
+case 362:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out362;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto st363;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st363:
+case 363:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out363;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 110: goto tr561;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st364:
+case 364:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out364;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 103: goto st365;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st365:
+case 365:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out365;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 104: goto st366;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st366:
+case 366:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out366;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto tr564;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st367:
+case 367:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out367;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st368;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st368:
+case 368:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out368;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 110: goto st369;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st369:
+case 369:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out369;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 100: goto tr567;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st370:
+case 370:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out370;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 111: goto st371;
+ case 114: goto st374;
+ case 121: goto st376;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st371:
+case 371:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out371;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 107: goto st372;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st372:
+case 372:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out372;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st373;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st373:
+case 373:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out373;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 110: goto tr573;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st374:
+case 374:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out374;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 117: goto st375;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st375:
+case 375:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out375;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto tr575;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st376:
+case 376:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out376;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 112: goto st377;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st377:
+case 377:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out377;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st378;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st378:
+case 378:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out378;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 105: goto st379;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st379:
+case 379:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out379;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 100: goto tr579;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st380:
+case 380:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out380;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st381;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st381:
+case 381:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out381;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 99: goto st382;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st382:
+case 382:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out382;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 116: goto st383;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st383:
+case 383:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out383;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 111: goto st384;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st384:
+case 384:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out384;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 114: goto tr584;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st385:
+case 385:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out385;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 104: goto st386;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st386:
+case 386:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out386;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 105: goto st387;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st387:
+case 387:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out387;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 108: goto st388;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st388:
+case 388:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out388;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto tr588;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st389:
+case 389:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out389;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 105: goto st390;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st390:
+case 390:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out390;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 101: goto st391;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st391:
+case 391:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out391;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 108: goto st392;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st392:
+case 392:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out392;
+ switch( (*fsmRun->p) ) {
+ case 95: goto tr340;
+ case 100: goto tr592;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto tr340;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto tr340;
+ } else
+ goto tr340;
+ goto tr382;
+st393:
+case 393:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out393;
+ if ( (*fsmRun->p) == 124 )
+ goto tr594;
+ goto tr593;
+st215:
+case 215:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out215;
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st215;
+ goto tr371;
+tr10:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 101;
+ goto out;
+}
+ goto st394;
+tr596:
+ { fsmRun->matchedToken = 100;
+ goto out;
+}
+ goto st394;
+st394:
+case 394:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out394;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 32: goto st395;
+ case 35: goto st6;
+ }
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto st395;
+ goto st0;
+st395:
+case 395:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out395;
+ if ( (*fsmRun->p) == 32 )
+ goto st395;
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto st395;
+ goto tr596;
+st6:
+case 6:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out6;
+ if ( (*fsmRun->p) == 10 )
+ goto tr10;
+ goto st6;
+tr12:
+ { fsmRun->toklen = fsmRun->tokend;
+ switch( fsmRun->act ) {
+ case 0: goto st0;
+ case 197:
+ fsmRun->matchedToken = 106;
+ break;
+ }
+ goto skip_toklen;
+}
+ goto st396;
+tr597:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 103;
+ goto out;
+}
+ goto st396;
+tr598:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 102;
+ goto out;
+}
+ goto st396;
+tr599:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 104;
+ goto out;
+}
+ goto st396;
+tr601:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 105;
+ goto out;
+}
+ goto st396;
+tr602:
+ { fsmRun->matchedToken = 106;
+ goto out;
+}
+ goto st396;
+st396:
+ {fsmRun->act = 0;}
+case 396:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out396;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 10: goto tr597;
+ case 34: goto tr598;
+ case 91: goto tr599;
+ case 92: goto st7;
+ case 93: goto tr601;
+ }
+ goto tr11;
+st7:
+case 7:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out7;
+ goto tr11;
+tr11:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 197;}
+ goto st397;
+st397:
+case 397:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out397;
+ switch( (*fsmRun->p) ) {
+ case 10: goto tr602;
+ case 34: goto tr602;
+ case 92: goto st7;
+ }
+ if ( 91 <= (*fsmRun->p) && (*fsmRun->p) <= 93 )
+ goto tr602;
+ goto tr11;
+tr14:
+ { fsmRun->toklen = fsmRun->tokend;
+ switch( fsmRun->act ) {
+ case 0: goto st0;
+ case 198:
+ fsmRun->matchedToken = 106;
+ break;
+ }
+ goto skip_toklen;
+}
+ goto st398;
+tr603:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 103;
+ goto out;
+}
+ goto st398;
+tr604:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 102;
+ goto out;
+}
+ goto st398;
+tr605:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 104;
+ goto out;
+}
+ goto st398;
+tr607:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 105;
+ goto out;
+}
+ goto st398;
+tr608:
+ { fsmRun->matchedToken = 106;
+ goto out;
+}
+ goto st398;
+st398:
+ {fsmRun->act = 0;}
+case 398:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out398;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 10: goto tr603;
+ case 34: goto tr604;
+ case 91: goto tr605;
+ case 92: goto st8;
+ case 93: goto tr607;
+ }
+ goto tr13;
+st8:
+case 8:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out8;
+ goto tr13;
+tr13:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 198;}
+ goto st399;
+st399:
+case 399:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out399;
+ switch( (*fsmRun->p) ) {
+ case 10: goto tr608;
+ case 34: goto tr608;
+ case 92: goto st8;
+ }
+ if ( 91 <= (*fsmRun->p) && (*fsmRun->p) <= 93 )
+ goto tr608;
+ goto tr13;
+tr609:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 146;
+ goto out;
+}
+ goto st400;
+st400:
+case 400:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out400;
+ {fsmRun->tokstart = fsmRun->p;}
+ goto tr609;
+tr16:
+ { fsmRun->toklen = fsmRun->tokend;
+ switch( fsmRun->act ) {
+ case 0: goto st0;
+ case 203:
+ fsmRun->matchedToken = 109;
+ break;
+ }
+ goto skip_toklen;
+}
+ goto st401;
+tr610:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 108;
+ goto out;
+}
+ goto st401;
+tr611:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 107;
+ goto out;
+}
+ goto st401;
+tr613:
+ { fsmRun->matchedToken = 109;
+ goto out;
+}
+ goto st401;
+st401:
+ {fsmRun->act = 0;}
+case 401:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out401;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 10: goto tr610;
+ case 39: goto tr611;
+ case 92: goto st9;
+ }
+ goto tr15;
+st9:
+case 9:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out9;
+ goto tr15;
+tr15:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 203;}
+ goto st402;
+st402:
+case 402:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out402;
+ switch( (*fsmRun->p) ) {
+ case 10: goto tr613;
+ case 39: goto tr613;
+ case 92: goto st9;
+ }
+ goto tr15;
+tr18:
+ { fsmRun->toklen = fsmRun->tokend;
+ switch( fsmRun->act ) {
+ case 0: goto st0;
+ case 204:
+ fsmRun->matchedToken = 109;
+ break;
+ }
+ goto skip_toklen;
+}
+ goto st403;
+tr614:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 108;
+ goto out;
+}
+ goto st403;
+tr615:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 107;
+ goto out;
+}
+ goto st403;
+tr617:
+ { fsmRun->matchedToken = 109;
+ goto out;
+}
+ goto st403;
+st403:
+ {fsmRun->act = 0;}
+case 403:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out403;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 10: goto tr614;
+ case 39: goto tr615;
+ case 92: goto st10;
+ }
+ goto tr17;
+st10:
+case 10:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out10;
+ goto tr17;
+tr17:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ {fsmRun->act = 204;}
+ goto st404;
+st404:
+case 404:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out404;
+ switch( (*fsmRun->p) ) {
+ case 10: goto tr617;
+ case 39: goto tr617;
+ case 92: goto st10;
+ }
+ goto tr17;
+tr618:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 147;
+ goto out;
+}
+ goto st405;
+st405:
+case 405:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out405;
+ {fsmRun->tokstart = fsmRun->p;}
+ goto tr618;
+tr620:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 110;
+ goto out;
+}
+ goto st406;
+tr621:
+ { fsmRun->matchedToken = 111;
+ goto out;
+}
+ goto st406;
+st406:
+case 406:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out406;
+ {fsmRun->tokstart = fsmRun->p;}
+ if ( (*fsmRun->p) == 10 )
+ goto tr620;
+ goto st407;
+st407:
+case 407:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out407;
+ if ( (*fsmRun->p) == 10 )
+ goto tr621;
+ goto st407;
+tr623:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 110;
+ goto out;
+}
+ goto st408;
+tr624:
+ { fsmRun->matchedToken = 111;
+ goto out;
+}
+ goto st408;
+st408:
+case 408:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out408;
+ {fsmRun->tokstart = fsmRun->p;}
+ if ( (*fsmRun->p) == 10 )
+ goto tr623;
+ goto st409;
+st409:
+case 409:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out409;
+ if ( (*fsmRun->p) == 10 )
+ goto tr624;
+ goto st409;
+tr625:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 148;
+ goto out;
+}
+ goto st410;
+st410:
+case 410:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out410;
+ {fsmRun->tokstart = fsmRun->p;}
+ goto tr625;
+tr23:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 136;
+ goto out;
+}
+ goto st411;
+tr26:
+ { fsmRun->toklen = fsmRun->tokend;
+ fsmRun->matchedToken = 113;
+ goto skip_toklen;
+}
+ goto st411;
+tr29:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 134;
+ goto out;
+}
+ goto st411;
+tr627:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 118;
+ goto out;
+}
+ goto st411;
+tr628:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 120;
+ goto out;
+}
+ goto st411;
+tr629:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 121;
+ goto out;
+}
+ goto st411;
+tr631:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 125;
+ goto out;
+}
+ goto st411;
+tr634:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 130;
+ goto out;
+}
+ goto st411;
+tr639:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 124;
+ goto out;
+}
+ goto st411;
+tr642:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 126;
+ goto out;
+}
+ goto st411;
+tr643:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 117;
+ goto out;
+}
+ goto st411;
+tr644:
+ { fsmRun->matchedToken = 135;
+ goto out;
+}
+ goto st411;
+tr645:
+ { fsmRun->matchedToken = 115;
+ goto out;
+}
+ goto st411;
+tr646:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 115;
+ goto out;
+}
+ goto st411;
+tr647:
+ { fsmRun->matchedToken = 122;
+ goto out;
+}
+ goto st411;
+tr648:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 123;
+ goto out;
+}
+ goto st411;
+tr649:
+ { fsmRun->matchedToken = 119;
+ goto out;
+}
+ goto st411;
+tr650:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 131;
+ goto out;
+}
+ goto st411;
+tr651:
+ { fsmRun->matchedToken = 116;
+ goto out;
+}
+ goto st411;
+tr652:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 127;
+ goto out;
+}
+ goto st411;
+tr653:
+ { fsmRun->matchedToken = 113;
+ goto out;
+}
+ goto st411;
+tr655:
+ { fsmRun->matchedToken = 114;
+ goto out;
+}
+ goto st411;
+tr656:
+ { fsmRun->matchedToken = 132;
+ goto out;
+}
+ goto st411;
+tr657:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 133;
+ goto out;
+}
+ goto st411;
+tr658:
+ { fsmRun->matchedToken = 112;
+ goto out;
+}
+ goto st411;
+tr659:
+ { fsmRun->matchedToken = 128;
+ goto out;
+}
+ goto st411;
+tr660:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 129;
+ goto out;
+}
+ goto st411;
+st411:
+case 411:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out411;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 32: goto st412;
+ case 34: goto st11;
+ case 35: goto st13;
+ case 38: goto tr627;
+ case 39: goto st14;
+ case 40: goto tr628;
+ case 41: goto tr629;
+ case 42: goto st414;
+ case 43: goto tr631;
+ case 45: goto st415;
+ case 46: goto st416;
+ case 47: goto tr634;
+ case 48: goto tr635;
+ case 58: goto st17;
+ case 60: goto st18;
+ case 63: goto tr639;
+ case 91: goto st422;
+ case 94: goto tr642;
+ case 95: goto st421;
+ case 124: goto tr643;
+ }
+ if ( (*fsmRun->p) < 49 ) {
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto st412;
+ } else if ( (*fsmRun->p) > 57 ) {
+ if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto st421;
+ } else if ( (*fsmRun->p) >= 65 )
+ goto st421;
+ } else
+ goto st418;
+ goto st0;
+st412:
+case 412:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out412;
+ if ( (*fsmRun->p) == 32 )
+ goto st412;
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto st412;
+ goto tr644;
+st11:
+case 11:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out11;
+ switch( (*fsmRun->p) ) {
+ case 34: goto st413;
+ case 92: goto st12;
+ }
+ goto st11;
+st413:
+case 413:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out413;
+ if ( (*fsmRun->p) == 105 )
+ goto tr646;
+ goto tr645;
+st12:
+case 12:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out12;
+ goto st11;
+st13:
+case 13:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out13;
+ if ( (*fsmRun->p) == 10 )
+ goto tr23;
+ goto st13;
+st14:
+case 14:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out14;
+ switch( (*fsmRun->p) ) {
+ case 39: goto st413;
+ case 92: goto st15;
+ }
+ goto st14;
+st15:
+case 15:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out15;
+ goto st14;
+st414:
+case 414:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out414;
+ if ( (*fsmRun->p) == 42 )
+ goto tr648;
+ goto tr647;
+st415:
+case 415:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out415;
+ if ( (*fsmRun->p) == 45 )
+ goto tr650;
+ goto tr649;
+st416:
+case 416:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out416;
+ if ( (*fsmRun->p) == 46 )
+ goto tr652;
+ goto tr651;
+tr635:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ goto st417;
+st417:
+case 417:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out417;
+ if ( (*fsmRun->p) == 120 )
+ goto st16;
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st418;
+ goto tr653;
+st16:
+case 16:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out16;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st419;
+ } else if ( (*fsmRun->p) > 70 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 102 )
+ goto st419;
+ } else
+ goto st419;
+ goto tr26;
+st419:
+case 419:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out419;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st419;
+ } else if ( (*fsmRun->p) > 70 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 102 )
+ goto st419;
+ } else
+ goto st419;
+ goto tr655;
+st418:
+case 418:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out418;
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st418;
+ goto tr653;
+st17:
+case 17:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out17;
+ if ( (*fsmRun->p) == 62 )
+ goto st420;
+ goto st0;
+st420:
+case 420:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out420;
+ if ( (*fsmRun->p) == 62 )
+ goto tr657;
+ goto tr656;
+st18:
+case 18:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out18;
+ if ( (*fsmRun->p) == 58 )
+ goto tr29;
+ goto st0;
+st422:
+case 422:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out422;
+ if ( (*fsmRun->p) == 94 )
+ goto tr660;
+ goto tr659;
+st421:
+case 421:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out421;
+ if ( (*fsmRun->p) == 95 )
+ goto st421;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st421;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto st421;
+ } else
+ goto st421;
+ goto tr658;
+tr35:
+ { fsmRun->toklen = fsmRun->tokend;
+ fsmRun->matchedToken = 113;
+ goto skip_toklen;
+}
+ goto st423;
+tr38:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 134;
+ goto out;
+}
+ goto st423;
+tr661:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 118;
+ goto out;
+}
+ goto st423;
+tr662:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 120;
+ goto out;
+}
+ goto st423;
+tr663:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 121;
+ goto out;
+}
+ goto st423;
+tr665:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 125;
+ goto out;
+}
+ goto st423;
+tr668:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 130;
+ goto out;
+}
+ goto st423;
+tr673:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 124;
+ goto out;
+}
+ goto st423;
+tr676:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 126;
+ goto out;
+}
+ goto st423;
+tr677:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 117;
+ goto out;
+}
+ goto st423;
+tr678:
+ { fsmRun->matchedToken = 115;
+ goto out;
+}
+ goto st423;
+tr679:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 115;
+ goto out;
+}
+ goto st423;
+tr680:
+ { fsmRun->matchedToken = 122;
+ goto out;
+}
+ goto st423;
+tr681:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 123;
+ goto out;
+}
+ goto st423;
+tr682:
+ { fsmRun->matchedToken = 119;
+ goto out;
+}
+ goto st423;
+tr683:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 131;
+ goto out;
+}
+ goto st423;
+tr684:
+ { fsmRun->matchedToken = 116;
+ goto out;
+}
+ goto st423;
+tr685:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 127;
+ goto out;
+}
+ goto st423;
+tr686:
+ { fsmRun->matchedToken = 113;
+ goto out;
+}
+ goto st423;
+tr688:
+ { fsmRun->matchedToken = 114;
+ goto out;
+}
+ goto st423;
+tr689:
+ { fsmRun->matchedToken = 132;
+ goto out;
+}
+ goto st423;
+tr690:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 133;
+ goto out;
+}
+ goto st423;
+tr691:
+ { fsmRun->matchedToken = 112;
+ goto out;
+}
+ goto st423;
+tr692:
+ { fsmRun->matchedToken = 128;
+ goto out;
+}
+ goto st423;
+tr693:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 129;
+ goto out;
+}
+ goto st423;
+st423:
+case 423:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out423;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 34: goto st19;
+ case 38: goto tr661;
+ case 39: goto st21;
+ case 40: goto tr662;
+ case 41: goto tr663;
+ case 42: goto st425;
+ case 43: goto tr665;
+ case 45: goto st426;
+ case 46: goto st427;
+ case 47: goto tr668;
+ case 48: goto tr669;
+ case 58: goto st24;
+ case 60: goto st25;
+ case 63: goto tr673;
+ case 91: goto st433;
+ case 94: goto tr676;
+ case 95: goto st432;
+ case 124: goto tr677;
+ }
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 49 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st429;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto st432;
+ } else
+ goto st432;
+ goto st0;
+st19:
+case 19:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out19;
+ switch( (*fsmRun->p) ) {
+ case 34: goto st424;
+ case 92: goto st20;
+ }
+ goto st19;
+st424:
+case 424:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out424;
+ if ( (*fsmRun->p) == 105 )
+ goto tr679;
+ goto tr678;
+st20:
+case 20:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out20;
+ goto st19;
+st21:
+case 21:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out21;
+ switch( (*fsmRun->p) ) {
+ case 39: goto st424;
+ case 92: goto st22;
+ }
+ goto st21;
+st22:
+case 22:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out22;
+ goto st21;
+st425:
+case 425:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out425;
+ if ( (*fsmRun->p) == 42 )
+ goto tr681;
+ goto tr680;
+st426:
+case 426:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out426;
+ if ( (*fsmRun->p) == 45 )
+ goto tr683;
+ goto tr682;
+st427:
+case 427:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out427;
+ if ( (*fsmRun->p) == 46 )
+ goto tr685;
+ goto tr684;
+tr669:
+ {{ fsmRun->tokend = fsmRun->toklen + ( fsmRun->p - fsmRun->start ) + 1; }}
+ goto st428;
+st428:
+case 428:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out428;
+ if ( (*fsmRun->p) == 120 )
+ goto st23;
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st429;
+ goto tr686;
+st23:
+case 23:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out23;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st430;
+ } else if ( (*fsmRun->p) > 70 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 102 )
+ goto st430;
+ } else
+ goto st430;
+ goto tr35;
+st430:
+case 430:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out430;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st430;
+ } else if ( (*fsmRun->p) > 70 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 102 )
+ goto st430;
+ } else
+ goto st430;
+ goto tr688;
+st429:
+case 429:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out429;
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st429;
+ goto tr686;
+st24:
+case 24:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out24;
+ if ( (*fsmRun->p) == 62 )
+ goto st431;
+ goto st0;
+st431:
+case 431:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out431;
+ if ( (*fsmRun->p) == 62 )
+ goto tr690;
+ goto tr689;
+st25:
+case 25:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out25;
+ if ( (*fsmRun->p) == 58 )
+ goto tr38;
+ goto st0;
+st433:
+case 433:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out433;
+ if ( (*fsmRun->p) == 94 )
+ goto tr693;
+ goto tr692;
+st432:
+case 432:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out432;
+ if ( (*fsmRun->p) == 95 )
+ goto st432;
+ if ( (*fsmRun->p) < 65 ) {
+ if ( 48 <= (*fsmRun->p) && (*fsmRun->p) <= 57 )
+ goto st432;
+ } else if ( (*fsmRun->p) > 90 ) {
+ if ( 97 <= (*fsmRun->p) && (*fsmRun->p) <= 122 )
+ goto st432;
+ } else
+ goto st432;
+ goto tr691;
+tr40:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 136;
+ goto out;
+}
+ goto st434;
+tr695:
+ { fsmRun->matchedToken = 135;
+ goto out;
+}
+ goto st434;
+st434:
+case 434:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out434;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 32: goto st435;
+ case 35: goto st26;
+ }
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto st435;
+ goto st0;
+st435:
+case 435:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out435;
+ if ( (*fsmRun->p) == 32 )
+ goto st435;
+ if ( 9 <= (*fsmRun->p) && (*fsmRun->p) <= 10 )
+ goto st435;
+ goto tr695;
+st26:
+case 26:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out26;
+ if ( (*fsmRun->p) == 10 )
+ goto tr40;
+ goto st26;
+tr41:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 138;
+ goto out;
+}
+ goto st436;
+tr696:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 137;
+ goto out;
+}
+ goto st436;
+tr698:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 139;
+ goto out;
+}
+ goto st436;
+st436:
+case 436:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out436;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 45: goto tr696;
+ case 92: goto st27;
+ case 93: goto tr698;
+ }
+ goto tr41;
+st27:
+case 27:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out27;
+ goto tr41;
+tr42:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 138;
+ goto out;
+}
+ goto st437;
+tr699:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 137;
+ goto out;
+}
+ goto st437;
+tr701:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 139;
+ goto out;
+}
+ goto st437;
+st437:
+case 437:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out437;
+ {fsmRun->tokstart = fsmRun->p;}
+ switch( (*fsmRun->p) ) {
+ case 45: goto tr699;
+ case 92: goto st28;
+ case 93: goto tr701;
+ }
+ goto tr42;
+st28:
+case 28:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out28;
+ goto tr42;
+tr702:
+ { fsmRun->p += 1;
+ fsmRun->matchedToken = 149;
+ goto out;
+}
+ goto st438;
+st438:
+case 438:
+ if ( ++fsmRun->p == fsmRun->pe )
+ goto out438;
+ {fsmRun->tokstart = fsmRun->p;}
+ goto tr702;
+ }
+out_switch:
+ switch ( fsmRun->cs )
+ {
+ case 29: out29: fsmRun->cs = 29; goto out;
+ case 30: out30: if ( fsmRun->eof ) {goto tr91;
+}fsmRun->cs = 30; goto out;
+ case 31: out31: if ( fsmRun->eof ) {goto tr92;
+}fsmRun->cs = 31; goto out;
+ case 1: out1: fsmRun->cs = 1; goto out;
+ case 2: out2: fsmRun->cs = 2; goto out;
+ case 0: out0: fsmRun->cs = 0; goto out;
+ case 32: out32: if ( fsmRun->eof ) {goto tr94;
+}fsmRun->cs = 32; goto out;
+ case 34: out34: if ( fsmRun->eof ) {goto tr97;
+}fsmRun->cs = 34; goto out;
+ case 35: out35: if ( fsmRun->eof ) {goto tr99;
+}fsmRun->cs = 35; goto out;
+ case 36: out36: if ( fsmRun->eof ) {goto tr101;
+}fsmRun->cs = 36; goto out;
+ case 37: out37: if ( fsmRun->eof ) {goto tr103;
+}fsmRun->cs = 37; goto out;
+ case 3: out3: fsmRun->cs = 3; goto out;
+ case 39: out39: if ( fsmRun->eof ) {goto tr106;
+}fsmRun->cs = 39; goto out;
+ case 40: out40: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 40; goto out;
+ case 38: out38: if ( fsmRun->eof ) {goto tr105;
+}fsmRun->cs = 38; goto out;
+ case 41: out41: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 41; goto out;
+ case 42: out42: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 42; goto out;
+ case 43: out43: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 43; goto out;
+ case 44: out44: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 44; goto out;
+ case 45: out45: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 45; goto out;
+ case 46: out46: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 46; goto out;
+ case 47: out47: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 47; goto out;
+ case 48: out48: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 48; goto out;
+ case 49: out49: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 49; goto out;
+ case 50: out50: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 50; goto out;
+ case 51: out51: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 51; goto out;
+ case 52: out52: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 52; goto out;
+ case 53: out53: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 53; goto out;
+ case 54: out54: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 54; goto out;
+ case 55: out55: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 55; goto out;
+ case 56: out56: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 56; goto out;
+ case 57: out57: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 57; goto out;
+ case 58: out58: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 58; goto out;
+ case 59: out59: if ( fsmRun->eof ) {goto tr131;
+}fsmRun->cs = 59; goto out;
+ case 60: out60: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 60; goto out;
+ case 61: out61: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 61; goto out;
+ case 62: out62: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 62; goto out;
+ case 63: out63: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 63; goto out;
+ case 64: out64: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 64; goto out;
+ case 65: out65: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 65; goto out;
+ case 66: out66: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 66; goto out;
+ case 67: out67: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 67; goto out;
+ case 68: out68: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 68; goto out;
+ case 69: out69: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 69; goto out;
+ case 70: out70: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 70; goto out;
+ case 71: out71: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 71; goto out;
+ case 72: out72: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 72; goto out;
+ case 73: out73: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 73; goto out;
+ case 74: out74: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 74; goto out;
+ case 75: out75: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 75; goto out;
+ case 76: out76: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 76; goto out;
+ case 77: out77: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 77; goto out;
+ case 78: out78: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 78; goto out;
+ case 79: out79: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 79; goto out;
+ case 80: out80: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 80; goto out;
+ case 81: out81: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 81; goto out;
+ case 82: out82: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 82; goto out;
+ case 83: out83: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 83; goto out;
+ case 84: out84: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 84; goto out;
+ case 85: out85: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 85; goto out;
+ case 86: out86: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 86; goto out;
+ case 87: out87: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 87; goto out;
+ case 88: out88: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 88; goto out;
+ case 89: out89: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 89; goto out;
+ case 90: out90: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 90; goto out;
+ case 91: out91: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 91; goto out;
+ case 92: out92: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 92; goto out;
+ case 93: out93: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 93; goto out;
+ case 94: out94: if ( fsmRun->eof ) {goto tr175;
+}fsmRun->cs = 94; goto out;
+ case 95: out95: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 95; goto out;
+ case 96: out96: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 96; goto out;
+ case 97: out97: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 97; goto out;
+ case 98: out98: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 98; goto out;
+ case 99: out99: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 99; goto out;
+ case 100: out100: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 100; goto out;
+ case 101: out101: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 101; goto out;
+ case 102: out102: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 102; goto out;
+ case 103: out103: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 103; goto out;
+ case 104: out104: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 104; goto out;
+ case 105: out105: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 105; goto out;
+ case 106: out106: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 106; goto out;
+ case 107: out107: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 107; goto out;
+ case 108: out108: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 108; goto out;
+ case 109: out109: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 109; goto out;
+ case 110: out110: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 110; goto out;
+ case 111: out111: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 111; goto out;
+ case 112: out112: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 112; goto out;
+ case 113: out113: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 113; goto out;
+ case 114: out114: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 114; goto out;
+ case 115: out115: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 115; goto out;
+ case 116: out116: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 116; goto out;
+ case 117: out117: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 117; goto out;
+ case 118: out118: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 118; goto out;
+ case 119: out119: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 119; goto out;
+ case 120: out120: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 120; goto out;
+ case 121: out121: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 121; goto out;
+ case 122: out122: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 122; goto out;
+ case 123: out123: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 123; goto out;
+ case 124: out124: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 124; goto out;
+ case 125: out125: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 125; goto out;
+ case 126: out126: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 126; goto out;
+ case 127: out127: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 127; goto out;
+ case 128: out128: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 128; goto out;
+ case 129: out129: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 129; goto out;
+ case 130: out130: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 130; goto out;
+ case 131: out131: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 131; goto out;
+ case 132: out132: if ( fsmRun->eof ) {goto tr223;
+}fsmRun->cs = 132; goto out;
+ case 133: out133: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 133; goto out;
+ case 134: out134: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 134; goto out;
+ case 135: out135: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 135; goto out;
+ case 136: out136: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 136; goto out;
+ case 137: out137: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 137; goto out;
+ case 138: out138: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 138; goto out;
+ case 139: out139: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 139; goto out;
+ case 140: out140: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 140; goto out;
+ case 141: out141: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 141; goto out;
+ case 142: out142: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 142; goto out;
+ case 143: out143: if ( fsmRun->eof ) {goto tr237;
+}fsmRun->cs = 143; goto out;
+ case 144: out144: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 144; goto out;
+ case 145: out145: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 145; goto out;
+ case 146: out146: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 146; goto out;
+ case 147: out147: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 147; goto out;
+ case 148: out148: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 148; goto out;
+ case 149: out149: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 149; goto out;
+ case 150: out150: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 150; goto out;
+ case 151: out151: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 151; goto out;
+ case 152: out152: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 152; goto out;
+ case 153: out153: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 153; goto out;
+ case 154: out154: if ( fsmRun->eof ) {goto tr250;
+}fsmRun->cs = 154; goto out;
+ case 155: out155: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 155; goto out;
+ case 156: out156: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 156; goto out;
+ case 157: out157: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 157; goto out;
+ case 158: out158: if ( fsmRun->eof ) {goto tr256;
+}fsmRun->cs = 158; goto out;
+ case 159: out159: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 159; goto out;
+ case 160: out160: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 160; goto out;
+ case 161: out161: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 161; goto out;
+ case 162: out162: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 162; goto out;
+ case 163: out163: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 163; goto out;
+ case 164: out164: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 164; goto out;
+ case 165: out165: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 165; goto out;
+ case 166: out166: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 166; goto out;
+ case 167: out167: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 167; goto out;
+ case 168: out168: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 168; goto out;
+ case 169: out169: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 169; goto out;
+ case 170: out170: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 170; goto out;
+ case 171: out171: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 171; goto out;
+ case 172: out172: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 172; goto out;
+ case 173: out173: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 173; goto out;
+ case 174: out174: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 174; goto out;
+ case 175: out175: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 175; goto out;
+ case 176: out176: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 176; goto out;
+ case 177: out177: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 177; goto out;
+ case 178: out178: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 178; goto out;
+ case 179: out179: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 179; goto out;
+ case 180: out180: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 180; goto out;
+ case 181: out181: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 181; goto out;
+ case 182: out182: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 182; goto out;
+ case 183: out183: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 183; goto out;
+ case 184: out184: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 184; goto out;
+ case 185: out185: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 185; goto out;
+ case 186: out186: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 186; goto out;
+ case 187: out187: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 187; goto out;
+ case 188: out188: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 188; goto out;
+ case 189: out189: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 189; goto out;
+ case 190: out190: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 190; goto out;
+ case 191: out191: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 191; goto out;
+ case 192: out192: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 192; goto out;
+ case 193: out193: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 193; goto out;
+ case 194: out194: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 194; goto out;
+ case 195: out195: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 195; goto out;
+ case 196: out196: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 196; goto out;
+ case 197: out197: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 197; goto out;
+ case 198: out198: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 198; goto out;
+ case 199: out199: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 199; goto out;
+ case 200: out200: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 200; goto out;
+ case 201: out201: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 201; goto out;
+ case 202: out202: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 202; goto out;
+ case 203: out203: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 203; goto out;
+ case 204: out204: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 204; goto out;
+ case 205: out205: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 205; goto out;
+ case 206: out206: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 206; goto out;
+ case 207: out207: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 207; goto out;
+ case 208: out208: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 208; goto out;
+ case 209: out209: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 209; goto out;
+ case 210: out210: if ( fsmRun->eof ) {goto tr107;
+}fsmRun->cs = 210; goto out;
+ case 211: out211: if ( fsmRun->eof ) {goto tr318;
+}fsmRun->cs = 211; goto out;
+ case 33: out33: if ( fsmRun->eof ) {goto tr96;
+}fsmRun->cs = 33; goto out;
+ case 212: out212: fsmRun->cs = 212; goto out;
+ case 213: out213: if ( fsmRun->eof ) {goto tr367;
+}fsmRun->cs = 213; goto out;
+ case 4: out4: fsmRun->cs = 4; goto out;
+ case 214: out214: if ( fsmRun->eof ) {goto tr369;
+}fsmRun->cs = 214; goto out;
+ case 216: out216: if ( fsmRun->eof ) {goto tr372;
+}fsmRun->cs = 216; goto out;
+ case 217: out217: if ( fsmRun->eof ) {goto tr374;
+}fsmRun->cs = 217; goto out;
+ case 218: out218: if ( fsmRun->eof ) {goto tr376;
+}fsmRun->cs = 218; goto out;
+ case 219: out219: if ( fsmRun->eof ) {goto tr378;
+}fsmRun->cs = 219; goto out;
+ case 5: out5: fsmRun->cs = 5; goto out;
+ case 221: out221: if ( fsmRun->eof ) {goto tr381;
+}fsmRun->cs = 221; goto out;
+ case 222: out222: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 222; goto out;
+ case 220: out220: if ( fsmRun->eof ) {goto tr380;
+}fsmRun->cs = 220; goto out;
+ case 223: out223: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 223; goto out;
+ case 224: out224: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 224; goto out;
+ case 225: out225: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 225; goto out;
+ case 226: out226: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 226; goto out;
+ case 227: out227: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 227; goto out;
+ case 228: out228: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 228; goto out;
+ case 229: out229: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 229; goto out;
+ case 230: out230: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 230; goto out;
+ case 231: out231: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 231; goto out;
+ case 232: out232: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 232; goto out;
+ case 233: out233: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 233; goto out;
+ case 234: out234: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 234; goto out;
+ case 235: out235: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 235; goto out;
+ case 236: out236: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 236; goto out;
+ case 237: out237: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 237; goto out;
+ case 238: out238: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 238; goto out;
+ case 239: out239: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 239; goto out;
+ case 240: out240: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 240; goto out;
+ case 241: out241: if ( fsmRun->eof ) {goto tr406;
+}fsmRun->cs = 241; goto out;
+ case 242: out242: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 242; goto out;
+ case 243: out243: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 243; goto out;
+ case 244: out244: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 244; goto out;
+ case 245: out245: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 245; goto out;
+ case 246: out246: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 246; goto out;
+ case 247: out247: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 247; goto out;
+ case 248: out248: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 248; goto out;
+ case 249: out249: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 249; goto out;
+ case 250: out250: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 250; goto out;
+ case 251: out251: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 251; goto out;
+ case 252: out252: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 252; goto out;
+ case 253: out253: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 253; goto out;
+ case 254: out254: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 254; goto out;
+ case 255: out255: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 255; goto out;
+ case 256: out256: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 256; goto out;
+ case 257: out257: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 257; goto out;
+ case 258: out258: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 258; goto out;
+ case 259: out259: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 259; goto out;
+ case 260: out260: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 260; goto out;
+ case 261: out261: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 261; goto out;
+ case 262: out262: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 262; goto out;
+ case 263: out263: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 263; goto out;
+ case 264: out264: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 264; goto out;
+ case 265: out265: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 265; goto out;
+ case 266: out266: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 266; goto out;
+ case 267: out267: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 267; goto out;
+ case 268: out268: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 268; goto out;
+ case 269: out269: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 269; goto out;
+ case 270: out270: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 270; goto out;
+ case 271: out271: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 271; goto out;
+ case 272: out272: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 272; goto out;
+ case 273: out273: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 273; goto out;
+ case 274: out274: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 274; goto out;
+ case 275: out275: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 275; goto out;
+ case 276: out276: if ( fsmRun->eof ) {goto tr450;
+}fsmRun->cs = 276; goto out;
+ case 277: out277: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 277; goto out;
+ case 278: out278: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 278; goto out;
+ case 279: out279: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 279; goto out;
+ case 280: out280: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 280; goto out;
+ case 281: out281: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 281; goto out;
+ case 282: out282: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 282; goto out;
+ case 283: out283: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 283; goto out;
+ case 284: out284: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 284; goto out;
+ case 285: out285: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 285; goto out;
+ case 286: out286: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 286; goto out;
+ case 287: out287: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 287; goto out;
+ case 288: out288: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 288; goto out;
+ case 289: out289: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 289; goto out;
+ case 290: out290: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 290; goto out;
+ case 291: out291: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 291; goto out;
+ case 292: out292: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 292; goto out;
+ case 293: out293: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 293; goto out;
+ case 294: out294: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 294; goto out;
+ case 295: out295: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 295; goto out;
+ case 296: out296: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 296; goto out;
+ case 297: out297: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 297; goto out;
+ case 298: out298: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 298; goto out;
+ case 299: out299: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 299; goto out;
+ case 300: out300: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 300; goto out;
+ case 301: out301: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 301; goto out;
+ case 302: out302: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 302; goto out;
+ case 303: out303: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 303; goto out;
+ case 304: out304: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 304; goto out;
+ case 305: out305: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 305; goto out;
+ case 306: out306: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 306; goto out;
+ case 307: out307: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 307; goto out;
+ case 308: out308: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 308; goto out;
+ case 309: out309: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 309; goto out;
+ case 310: out310: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 310; goto out;
+ case 311: out311: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 311; goto out;
+ case 312: out312: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 312; goto out;
+ case 313: out313: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 313; goto out;
+ case 314: out314: if ( fsmRun->eof ) {goto tr498;
+}fsmRun->cs = 314; goto out;
+ case 315: out315: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 315; goto out;
+ case 316: out316: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 316; goto out;
+ case 317: out317: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 317; goto out;
+ case 318: out318: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 318; goto out;
+ case 319: out319: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 319; goto out;
+ case 320: out320: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 320; goto out;
+ case 321: out321: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 321; goto out;
+ case 322: out322: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 322; goto out;
+ case 323: out323: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 323; goto out;
+ case 324: out324: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 324; goto out;
+ case 325: out325: if ( fsmRun->eof ) {goto tr512;
+}fsmRun->cs = 325; goto out;
+ case 326: out326: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 326; goto out;
+ case 327: out327: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 327; goto out;
+ case 328: out328: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 328; goto out;
+ case 329: out329: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 329; goto out;
+ case 330: out330: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 330; goto out;
+ case 331: out331: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 331; goto out;
+ case 332: out332: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 332; goto out;
+ case 333: out333: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 333; goto out;
+ case 334: out334: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 334; goto out;
+ case 335: out335: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 335; goto out;
+ case 336: out336: if ( fsmRun->eof ) {goto tr525;
+}fsmRun->cs = 336; goto out;
+ case 337: out337: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 337; goto out;
+ case 338: out338: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 338; goto out;
+ case 339: out339: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 339; goto out;
+ case 340: out340: if ( fsmRun->eof ) {goto tr531;
+}fsmRun->cs = 340; goto out;
+ case 341: out341: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 341; goto out;
+ case 342: out342: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 342; goto out;
+ case 343: out343: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 343; goto out;
+ case 344: out344: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 344; goto out;
+ case 345: out345: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 345; goto out;
+ case 346: out346: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 346; goto out;
+ case 347: out347: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 347; goto out;
+ case 348: out348: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 348; goto out;
+ case 349: out349: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 349; goto out;
+ case 350: out350: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 350; goto out;
+ case 351: out351: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 351; goto out;
+ case 352: out352: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 352; goto out;
+ case 353: out353: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 353; goto out;
+ case 354: out354: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 354; goto out;
+ case 355: out355: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 355; goto out;
+ case 356: out356: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 356; goto out;
+ case 357: out357: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 357; goto out;
+ case 358: out358: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 358; goto out;
+ case 359: out359: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 359; goto out;
+ case 360: out360: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 360; goto out;
+ case 361: out361: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 361; goto out;
+ case 362: out362: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 362; goto out;
+ case 363: out363: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 363; goto out;
+ case 364: out364: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 364; goto out;
+ case 365: out365: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 365; goto out;
+ case 366: out366: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 366; goto out;
+ case 367: out367: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 367; goto out;
+ case 368: out368: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 368; goto out;
+ case 369: out369: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 369; goto out;
+ case 370: out370: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 370; goto out;
+ case 371: out371: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 371; goto out;
+ case 372: out372: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 372; goto out;
+ case 373: out373: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 373; goto out;
+ case 374: out374: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 374; goto out;
+ case 375: out375: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 375; goto out;
+ case 376: out376: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 376; goto out;
+ case 377: out377: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 377; goto out;
+ case 378: out378: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 378; goto out;
+ case 379: out379: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 379; goto out;
+ case 380: out380: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 380; goto out;
+ case 381: out381: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 381; goto out;
+ case 382: out382: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 382; goto out;
+ case 383: out383: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 383; goto out;
+ case 384: out384: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 384; goto out;
+ case 385: out385: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 385; goto out;
+ case 386: out386: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 386; goto out;
+ case 387: out387: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 387; goto out;
+ case 388: out388: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 388; goto out;
+ case 389: out389: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 389; goto out;
+ case 390: out390: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 390; goto out;
+ case 391: out391: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 391; goto out;
+ case 392: out392: if ( fsmRun->eof ) {goto tr382;
+}fsmRun->cs = 392; goto out;
+ case 393: out393: if ( fsmRun->eof ) {goto tr593;
+}fsmRun->cs = 393; goto out;
+ case 215: out215: if ( fsmRun->eof ) {goto tr371;
+}fsmRun->cs = 215; goto out;
+ case 394: out394: fsmRun->cs = 394; goto out;
+ case 395: out395: if ( fsmRun->eof ) {goto tr596;
+}fsmRun->cs = 395; goto out;
+ case 6: out6: fsmRun->cs = 6; goto out;
+ case 396: out396: fsmRun->cs = 396; goto out;
+ case 7: out7: if ( fsmRun->eof ) {goto tr12;
+}fsmRun->cs = 7; goto out;
+ case 397: out397: if ( fsmRun->eof ) {goto tr602;
+}fsmRun->cs = 397; goto out;
+ case 398: out398: fsmRun->cs = 398; goto out;
+ case 8: out8: if ( fsmRun->eof ) {goto tr14;
+}fsmRun->cs = 8; goto out;
+ case 399: out399: if ( fsmRun->eof ) {goto tr608;
+}fsmRun->cs = 399; goto out;
+ case 400: out400: fsmRun->cs = 400; goto out;
+ case 401: out401: fsmRun->cs = 401; goto out;
+ case 9: out9: if ( fsmRun->eof ) {goto tr16;
+}fsmRun->cs = 9; goto out;
+ case 402: out402: if ( fsmRun->eof ) {goto tr613;
+}fsmRun->cs = 402; goto out;
+ case 403: out403: fsmRun->cs = 403; goto out;
+ case 10: out10: if ( fsmRun->eof ) {goto tr18;
+}fsmRun->cs = 10; goto out;
+ case 404: out404: if ( fsmRun->eof ) {goto tr617;
+}fsmRun->cs = 404; goto out;
+ case 405: out405: fsmRun->cs = 405; goto out;
+ case 406: out406: fsmRun->cs = 406; goto out;
+ case 407: out407: if ( fsmRun->eof ) {goto tr621;
+}fsmRun->cs = 407; goto out;
+ case 408: out408: fsmRun->cs = 408; goto out;
+ case 409: out409: if ( fsmRun->eof ) {goto tr624;
+}fsmRun->cs = 409; goto out;
+ case 410: out410: fsmRun->cs = 410; goto out;
+ case 411: out411: fsmRun->cs = 411; goto out;
+ case 412: out412: if ( fsmRun->eof ) {goto tr644;
+}fsmRun->cs = 412; goto out;
+ case 11: out11: fsmRun->cs = 11; goto out;
+ case 413: out413: if ( fsmRun->eof ) {goto tr645;
+}fsmRun->cs = 413; goto out;
+ case 12: out12: fsmRun->cs = 12; goto out;
+ case 13: out13: fsmRun->cs = 13; goto out;
+ case 14: out14: fsmRun->cs = 14; goto out;
+ case 15: out15: fsmRun->cs = 15; goto out;
+ case 414: out414: if ( fsmRun->eof ) {goto tr647;
+}fsmRun->cs = 414; goto out;
+ case 415: out415: if ( fsmRun->eof ) {goto tr649;
+}fsmRun->cs = 415; goto out;
+ case 416: out416: if ( fsmRun->eof ) {goto tr651;
+}fsmRun->cs = 416; goto out;
+ case 417: out417: if ( fsmRun->eof ) {goto tr653;
+}fsmRun->cs = 417; goto out;
+ case 16: out16: if ( fsmRun->eof ) {goto tr26;
+}fsmRun->cs = 16; goto out;
+ case 419: out419: if ( fsmRun->eof ) {goto tr655;
+}fsmRun->cs = 419; goto out;
+ case 418: out418: if ( fsmRun->eof ) {goto tr653;
+}fsmRun->cs = 418; goto out;
+ case 17: out17: fsmRun->cs = 17; goto out;
+ case 420: out420: if ( fsmRun->eof ) {goto tr656;
+}fsmRun->cs = 420; goto out;
+ case 18: out18: fsmRun->cs = 18; goto out;
+ case 422: out422: if ( fsmRun->eof ) {goto tr659;
+}fsmRun->cs = 422; goto out;
+ case 421: out421: if ( fsmRun->eof ) {goto tr658;
+}fsmRun->cs = 421; goto out;
+ case 423: out423: fsmRun->cs = 423; goto out;
+ case 19: out19: fsmRun->cs = 19; goto out;
+ case 424: out424: if ( fsmRun->eof ) {goto tr678;
+}fsmRun->cs = 424; goto out;
+ case 20: out20: fsmRun->cs = 20; goto out;
+ case 21: out21: fsmRun->cs = 21; goto out;
+ case 22: out22: fsmRun->cs = 22; goto out;
+ case 425: out425: if ( fsmRun->eof ) {goto tr680;
+}fsmRun->cs = 425; goto out;
+ case 426: out426: if ( fsmRun->eof ) {goto tr682;
+}fsmRun->cs = 426; goto out;
+ case 427: out427: if ( fsmRun->eof ) {goto tr684;
+}fsmRun->cs = 427; goto out;
+ case 428: out428: if ( fsmRun->eof ) {goto tr686;
+}fsmRun->cs = 428; goto out;
+ case 23: out23: if ( fsmRun->eof ) {goto tr35;
+}fsmRun->cs = 23; goto out;
+ case 430: out430: if ( fsmRun->eof ) {goto tr688;
+}fsmRun->cs = 430; goto out;
+ case 429: out429: if ( fsmRun->eof ) {goto tr686;
+}fsmRun->cs = 429; goto out;
+ case 24: out24: fsmRun->cs = 24; goto out;
+ case 431: out431: if ( fsmRun->eof ) {goto tr689;
+}fsmRun->cs = 431; goto out;
+ case 25: out25: fsmRun->cs = 25; goto out;
+ case 433: out433: if ( fsmRun->eof ) {goto tr692;
+}fsmRun->cs = 433; goto out;
+ case 432: out432: if ( fsmRun->eof ) {goto tr691;
+}fsmRun->cs = 432; goto out;
+ case 434: out434: fsmRun->cs = 434; goto out;
+ case 435: out435: if ( fsmRun->eof ) {goto tr695;
+}fsmRun->cs = 435; goto out;
+ case 26: out26: fsmRun->cs = 26; goto out;
+ case 436: out436: fsmRun->cs = 436; goto out;
+ case 27: out27: fsmRun->cs = 27; goto out;
+ case 437: out437: fsmRun->cs = 437; goto out;
+ case 28: out28: fsmRun->cs = 28; goto out;
+ case 438: out438: fsmRun->cs = 438; goto out;
+ }
+out:
+ if ( fsmRun->p != 0 )
+ fsmRun->toklen += fsmRun->p - fsmRun->start;
+skip_toklen:
+ {}
+}
+
+static void sendNamedLangEl( Program *prg, Tree **tree, PdaRun *pdaRun,
+ FsmRun *fsmRun, StreamImpl *inputStream ) { }
+static void initBindings( PdaRun *pdaRun ) {}
+static void popBinding( PdaRun *pdaRun, ParseTree *tree ) {}
+
+
+static int pid_0_parser_indicies[] = {
+ 25, 26, 112, 23, 21, 24, 48, 49,
+ 50, 51, 77, 78, 79, 80, 707, 76,
+ 28, 34, 35, 38, 36, 708, 116, 115,
+ 101, 97, 99, 95, 93, 30, 113, 43,
+ 39, 40, 41, 118, 46, 155, 87, 44,
+ 42, 129, 88, 85, 84, 86, 22, 27,
+ 154, 72, 73, 74, 59, 60, 61, 47,
+ 57, 71, 738, 104, 106, 108, 110, 100,
+ 96, 98, 94, 92, 140, 130, 75, 935,
+ 53, 145, 143, 156, 119, 856, 120, 856,
+ 121, 122, 157, 200, 66, 67, 68, 69,
+ 194, 149, 148, 150, 147, 195, 139, 856,
+ 138, 136, 711, 137, 711, 754, 712, 135,
+ 712, 707, 203, 206, 207, 753, 213, 873,
+ 165, 257, 267, 280, 278, 309, 872, 315,
+ 974, 856, 316, 320, 303, 304, 310, 311,
+ 312, 713, 365, 713, 977, 977, 163, 367,
+ 935, 977, 977, 163, 368, 182, 183, 0,
+ 2, 20, 18, 45, 935, 369, 17, 19,
+ 403, 16, 15, 13, 414, 415, 117, 29,
+ 12, 416, 10, 4, 151, 152, 153, 418,
+ 11, 176, 177, 935, 8, 9, 3, 423,
+ 5, 6, 427, 428, 7, 728, 728, 728,
+ 728, 728, 318, 429, 319, 14, 711, 711,
+ 430, 434, 712, 712, 436, 441, 442, 983,
+ 33, 31, 32, 52, 62, 63, 64, 65,
+ 933, 70, 83, 91, 934, 55, 307, 308,
+ 146, 873, 165, 446, 53, 713, 713, 466,
+ 467, 154, 983, 855, 164, 855, 1000, 1000,
+ 178, 1001, 1001, 161, 787, 160, 220, 222,
+ 224, 226, 102, 89, 81, 37, 58, 302,
+ 488, 179, 90, 977, 496, 711, 873, 165,
+ 977, 712, 1, 445, 133, 58, 25, 26,
+ 975, 23, 21, 24, 48, 49, 50, 51,
+ 77, 78, 79, 80, 266, 76, 28, 34,
+ 35, 38, 36, 973, 713, 489, 101, 97,
+ 99, 95, 93, 30, 162, 43, 39, 40,
+ 41, 298, 46, 738, 87, 44, 42, 742,
+ 88, 85, 84, 86, 22, 27, 1002, 72,
+ 73, 74, 59, 60, 61, 47, 57, 71,
+ 737, 104, 106, 108, 110, 128, 58, 862,
+ 862, 862, 862, 862, 75, 306, 379, 983,
+ 501, 127, 58, 231, 233, 235, 237, 347,
+ 1002, 507, 66, 67, 68, 69, 983, 980,
+ 983, 1000, 508, 509, 1001, 141, 514, 124,
+ 334, 58, 517, 516, 202, 797, 522, 728,
+ 728, 976, 976, 393, 978, 862, 862, 862,
+ 862, 862, 525, 550, 159, 562, 565, 444,
+ 737, 443, 990, 923, 923, 923, 568, 923,
+ 502, 503, 504, 577, 581, 452, 453, 454,
+ 724, 530, 219, 218, 217, 124, 2, 20,
+ 18, 45, 158, 455, 17, 19, 975, 16,
+ 15, 13, 873, 165, 990, 29, 12, 544,
+ 10, 4, 201, 742, 795, 742, 11, 583,
+ 533, 531, 8, 9, 3, 589, 5, 6,
+ 988, 988, 7, 862, 862, 862, 862, 862,
+ 983, 543, 935, 14, 566, 426, 567, 591,
+ 53, 1001, 1001, 161, 986, 160, 33, 31,
+ 32, 52, 62, 63, 64, 65, 592, 70,
+ 83, 91, 445, 124, 593, 100, 96, 98,
+ 94, 92, 598, 100, 96, 98, 94, 92,
+ 976, 205, 605, 100, 96, 98, 94, 92,
+ 977, 977, 163, 100, 96, 98, 94, 92,
+ 102, 89, 81, 37, 58, 856, 923, 421,
+ 796, 862, 862, 856, 123, 230, 229, 228,
+ 175, 610, 983, 856, 307, 308, 725, 977,
+ 977, 163, 982, 856, 974, 998, 923, 439,
+ 613, 77, 78, 79, 80, 615, 76, 982,
+ 996, 996, 421, 617, 112, 618, 623, 100,
+ 96, 98, 94, 92, 624, 982, 532, 862,
+ 862, 725, 125, 988, 923, 87, 983, 998,
+ 627, 88, 85, 84, 86, 631, 633, 632,
+ 72, 73, 74, 635, 1001, 346, 625, 1006,
+ 71, 637, 104, 106, 108, 110, 100, 96,
+ 98, 94, 92, 969, 969, 75, 588, 994,
+ 202, 992, 992, 644, 159, 452, 453, 454,
+ 743, 647, 303, 304, 419, 420, 626, 977,
+ 336, 982, 451, 455, 649, 650, 856, 861,
+ 861, 861, 861, 861, 656, 862, 862, 658,
+ 126, 994, 301, 425, 424, 873, 165, 519,
+ 58, 307, 308, 435, 659, -1, 977, 518,
+ 420, -1, 728, 728, 728, 728, 728, 861,
+ 305, 590, 971, 971, -1, 982, 204, 214,
+ 90, -1, 982, 996, -1, 215, 90, 100,
+ 96, 98, 94, 92, 975, 216, 90, -1,
+ -1, 982, 728, 982, -1, 262, 90, 378,
+ -1, 0, 2, 20, 18, 45, 307, 308,
+ 17, 19, -1, 16, 15, 13, 935, 856,
+ 117, 29, 12, -1, 10, 4, 151, 152,
+ 153, -1, 11, 176, 177, 345, 8, 9,
+ 3, 969, 5, 6, 992, -1, 7, 100,
+ 96, 98, 94, 92, 743, 486, 743, 14,
+ 171, 82, 90, -1, 997, 997, 391, 726,
+ 390, -1, 33, 31, 32, 52, 62, 63,
+ 64, 65, 492, 70, 82, 90, 726, 856,
+ 487, 856, 146, 856, 864, 864, 864, 864,
+ -1, 102, 89, 81, 132, 58, 164, 371,
+ 263, 90, 178, 100, 96, 98, 94, 92,
+ 971, -1, 970, 970, 102, 89, 81, 37,
+ 58, 302, -1, 179, 90, -1, 970, 970,
+ 77, 78, 79, 80, 1, 76, 133, 58,
+ -1, 861, 861, 856, -1, 500, 100, 96,
+ 98, 94, 92, 977, 977, 163, 266, 880,
+ 880, 880, -1, 880, 87, 640, -1, 641,
+ 88, 85, 84, 86, 728, 728, 162, 72,
+ 73, 74, -1, 298, 726, 726, 1006, 71,
+ -1, 104, 106, 108, 110, -1, 440, 303,
+ 304, 264, 90, 984, 75, 972, 972, 997,
+ -1, 864, 864, 864, 864, 533, 534, 128,
+ 58, 452, 453, 454, 371, 307, 308, 306,
+ 379, -1, 389, 127, 58, -1, 747, 455,
+ -1, 347, -1, 612, 58, 303, 304, -1,
+ -1, -1, -1, 303, 304, -1, 758, 141,
+ 758, -1, 334, 58, -1, -1, 202, 449,
+ 970, 265, 90, 388, 178, 393, 984, 370,
+ -1, 873, 165, 450, 970, -1, 159, -1,
+ -1, 444, -1, 443, -1, 866, -1, 866,
+ -1, -1, 977, -1, -1, -1, 864, 864,
+ 864, -1, 880, -1, 219, 218, 217, 880,
+ 2, 20, 18, 45, 158, -1, 17, 19,
+ -1, 16, 15, 13, -1, 269, 90, 29,
+ 12, -1, 10, 4, 201, -1, -1, -1,
+ 11, -1, 499, 392, 8, 9, 3, -1,
+ 5, 6, -1, 972, 7, 100, 96, 98,
+ 94, 92, 880, 532, 524, 14, -1, 172,
+ 82, 90, 1001, 1001, 161, -1, 160, -1,
+ 33, 31, 32, 52, 62, 63, 64, 65,
+ 523, 70, 82, 90, 372, 856, 563, 355,
+ 356, 357, 354, -1, 977, 977, 163, 361,
+ 102, 89, 81, 132, 58, 352, 556, 359,
+ 360, 984, 984, 864, 864, 864, 977, 977,
+ 163, -1, 102, 89, 81, 37, 58, 307,
+ 308, 758, 231, 233, 235, 237, 123, 230,
+ 229, 228, 175, 660, 660, 660, 660, 660,
+ 660, 660, 660, 660, 660, 660, 660, 660,
+ 660, 439, 660, 660, 660, 660, 660, 660,
+ 866, -1, -1, 660, 660, 660, 660, 660,
+ 660, 866, 660, 660, 660, 660, -1, 660,
+ 532, 660, 660, 660, 125, 660, 660, 660,
+ 660, 660, 660, -1, 660, 660, 660, 660,
+ 660, 660, 660, 660, 660, 1001, 660, 660,
+ 660, 660, 864, 864, 864, 864, -1, -1,
+ -1, 660, 856, -1, 856, 371, -1, -1,
+ 588, -1, 202, 977, -1, 159, 159, 660,
+ 660, 660, 660, -1, -1, -1, 419, 420,
+ -1, -1, -1, -1, -1, 977, 348, -1,
+ 349, 350, 351, 358, 362, 353, 564, 274,
+ 90, -1, 126, 437, 301, 425, 424, 336,
+ -1, 519, 58, -1, 438, 435, 337, 339,
+ -1, 518, 420, -1, -1, 860, 303, 304,
+ -1, -1, 305, -1, 338, -1, 491, -1,
+ 204, 214, 90, 660, 660, 660, 660, 215,
+ 90, 660, 660, -1, 660, 660, 660, 216,
+ 90, -1, 660, 660, -1, 660, 660, 262,
+ 90, 378, -1, 660, 230, 229, 471, 660,
+ 660, 660, -1, 660, 660, -1, -1, 660,
+ 100, 96, 98, 94, 92, 873, 165, -1,
+ 660, 100, 96, 98, 94, 92, -1, 345,
+ 303, 304, -1, 660, 660, 660, 660, 660,
+ 660, 660, 660, -1, 660, 660, 660, 486,
+ 856, -1, 171, 82, 90, 373, 924, 924,
+ 924, 856, 924, 307, 308, 494, 547, 548,
+ 546, 989, 989, 377, 492, 376, 493, 864,
+ 864, 864, 487, 873, 165, 660, 660, 660,
+ 660, 660, -1, 102, 89, 81, 132, 58,
+ -1, 596, 263, 90, -1, 660, 307, 308,
+ 515, 661, 661, 661, 661, 661, 661, 661,
+ 661, 661, 661, 661, 661, 661, 661, -1,
+ 661, 661, 661, 661, 661, 661, -1, 727,
+ -1, 661, 661, 661, 661, 661, 661, 500,
+ 661, 661, 661, 661, -1, 661, 727, 661,
+ 661, 661, 571, 661, 661, 661, 661, 661,
+ 661, -1, 661, 661, 661, 661, 661, 661,
+ 661, 661, 661, 608, 661, 661, 661, 661,
+ 421, -1, 220, 222, 224, 226, -1, 661,
+ 440, -1, -1, 264, 90, -1, 856, 725,
+ 856, 924, 597, -1, -1, 661, 661, 661,
+ 661, -1, -1, -1, 989, -1, -1, -1,
+ 630, 375, -1, -1, 389, -1, 977, 977,
+ 163, 924, 277, 90, -1, 612, 58, -1,
+ -1, 545, 362, 299, 90, 609, 910, 910,
+ 910, -1, 910, -1, 727, 727, -1, -1,
+ -1, 449, -1, 265, 90, 388, 178, 924,
+ -1, 370, -1, -1, 374, 450, -1, -1,
+ -1, 661, 661, 661, 661, -1, -1, 661,
+ 661, 660, 661, 661, 661, -1, -1, -1,
+ 661, 661, -1, 661, 661, 526, 420, -1,
+ -1, 661, -1, -1, -1, 661, 661, 661,
+ -1, 661, 661, -1, -1, 661, -1, 269,
+ 90, 307, 308, -1, -1, -1, 661, 100,
+ 96, 98, 94, 92, 499, 392, -1, -1,
+ -1, 661, 661, 661, 661, 661, 661, 661,
+ 661, -1, 661, 661, 661, 532, 524, -1,
+ -1, 172, 82, 90, -1, 977, -1, 856,
+ -1, 100, 96, 98, 94, 92, 219, 218,
+ 582, 621, 523, -1, -1, -1, 372, -1,
+ 563, 910, -1, 661, 661, 661, 661, 661,
+ -1, -1, 102, 89, 81, 132, 58, -1,
+ 556, 856, -1, 661, 910, -1, 555, 662,
+ 662, 662, 662, 662, 662, 662, 662, 662,
+ 662, 662, 662, 662, 662, -1, 662, 662,
+ 662, 662, 662, 662, -1, -1, -1, 662,
+ 662, 662, 662, 662, 662, 910, 662, 662,
+ 662, 662, -1, 662, -1, 662, 662, 662,
+ 646, 662, 662, 662, 662, 662, 662, -1,
+ 662, 662, 662, 662, 662, 662, 662, 662,
+ 662, -1, 662, 662, 662, 662, 303, 304,
+ 355, 356, 357, 354, -1, 662, -1, -1,
+ 361, -1, -1, -1, -1, -1, 352, -1,
+ 359, 360, -1, 662, 662, 662, 662, -1,
+ 942, 942, 942, 942, 460, 940, 940, 940,
+ 942, 940, -1, -1, -1, -1, 942, 159,
+ 942, 942, 940, 940, 457, 458, 459, -1,
+ -1, 404, 90, -1, -1, -1, -1, -1,
+ 348, -1, 349, 350, 351, 358, 362, 353,
+ 564, 274, 90, -1, -1, 437, -1, -1,
+ -1, -1, -1, -1, -1, -1, 438, 662,
+ 662, 662, 662, 417, 90, 662, 662, 661,
+ 662, 662, 662, -1, -1, -1, 662, 662,
+ 491, 662, 662, -1, -1, -1, -1, 662,
+ -1, -1, -1, 662, 662, 662, -1, 662,
+ 662, -1, -1, 662, 231, 233, 235, 237,
+ -1, 645, -1, -1, 662, -1, 230, 229,
+ 471, 476, 478, 480, 482, -1, -1, 662,
+ 662, 662, 662, 662, 662, 662, 662, -1,
+ 662, 662, 662, 448, 358, 362, 353, -1,
+ 386, -1, 867, 383, 384, 385, 856, 991,
+ 856, 600, 601, 602, -1, 989, 989, 377,
+ 456, 376, 942, 942, 942, 942, 942, 373,
+ -1, 662, 662, 662, 662, 662, -1, 494,
+ 761, -1, 761, -1, -1, -1, -1, 761,
+ 493, 662, -1, -1, -1, 663, 663, 663,
+ 663, 663, 663, 663, 663, 663, 663, 663,
+ 663, 663, 663, 596, 663, 663, 663, 663,
+ 663, 663, 515, 723, -1, 663, 663, 663,
+ 663, 663, 663, -1, 663, 663, 663, 663,
+ -1, 663, 723, 663, 663, 663, -1, 663,
+ 663, 663, 663, 663, 663, -1, 663, 663,
+ 663, 663, 663, 663, 663, 663, 663, -1,
+ 663, 663, 663, 663, 571, -1, -1, -1,
+ 989, 989, 377, 663, 376, -1, -1, -1,
+ -1, -1, 977, 977, 163, 608, -1, -1,
+ -1, 663, 663, 663, 663, -1, -1, -1,
+ 989, -1, -1, -1, -1, 375, 230, 229,
+ 472, -1, -1, -1, 597, -1, 475, 474,
+ 473, -1, -1, 867, -1, 761, 761, 527,
+ 382, 599, 630, 375, 867, 381, -1, -1,
+ 723, 723, -1, -1, 277, 90, -1, -1,
+ -1, -1, -1, 545, 362, 299, 90, 609,
+ 485, -1, -1, 761, -1, 663, 663, 663,
+ 663, -1, -1, 663, 663, 662, 663, 663,
+ 663, -1, -1, -1, 663, 663, 374, 663,
+ 663, -1, 380, -1, -1, 663, -1, -1,
+ -1, 663, 663, 663, -1, 663, 663, -1,
+ -1, 663, 465, -1, -1, -1, -1, 526,
+ 420, -1, 663, 989, -1, -1, -1, -1,
+ 375, 977, -1, -1, -1, 663, 663, 663,
+ 663, 663, 663, 663, 663, -1, 663, 663,
+ 663, -1, 947, 947, 947, 947, 947, 947,
+ 947, 947, 947, 947, 461, 462, 464, 463,
+ 947, -1, 947, 947, 947, 947, 947, 947,
+ 947, -1, 570, 490, -1, -1, -1, 663,
+ 663, 663, 663, 663, -1, -1, -1, -1,
+ 219, 218, 582, 621, -1, -1, -1, 663,
+ -1, -1, -1, 664, 664, 664, 664, 664,
+ 664, 664, 664, 664, 664, 664, 664, 664,
+ 664, -1, 664, 664, 664, 664, 664, 664,
+ 555, -1, -1, 664, 664, 664, 664, 664,
+ 664, -1, 664, 664, 664, 664, -1, 664,
+ -1, 664, 664, 664, -1, 664, 664, 664,
+ 664, 664, 664, -1, 664, 664, 664, 664,
+ 664, 664, 664, 664, 664, -1, 664, 664,
+ 664, 664, 646, -1, -1, 941, 941, 941,
+ 941, 664, 956, -1, -1, 941, -1, -1,
+ -1, -1, -1, 941, -1, 941, 941, 664,
+ 664, 664, 664, -1, -1, -1, -1, -1,
+ -1, -1, 947, -1, 947, 947, 947, 947,
+ 947, -1, 956, 956, 956, 956, 956, 956,
+ 956, 956, 956, 956, 956, 956, 956, 956,
+ 956, -1, 956, 956, 956, 956, 956, 956,
+ 956, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 404, 90, -1, -1, -1,
+ -1, -1, -1, 664, 664, 664, 664, -1,
+ -1, 664, 664, 663, 664, 664, 664, -1,
+ -1, -1, 664, 664, -1, 664, 664, 863,
+ 863, 863, 863, 664, -1, 417, 90, 664,
+ 664, 664, -1, 664, 664, -1, -1, 664,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 664, 100, 96, 98, 94, 92, -1, -1,
+ -1, -1, -1, 664, 664, 664, 664, 664,
+ 664, 664, 664, 645, 664, 664, 664, 941,
+ 941, 941, 941, 941, 881, 881, 881, -1,
+ 881, 856, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 448, 358, 362,
+ 353, -1, -1, -1, -1, 664, 664, 664,
+ 664, 664, 956, -1, 956, 956, 956, 956,
+ 956, -1, 456, -1, -1, 664, -1, -1,
+ -1, 665, 665, 665, 665, 665, 665, 665,
+ 665, 665, 665, 665, 665, 665, 665, -1,
+ 665, 665, 665, 665, 665, 665, -1, -1,
+ -1, 665, 665, 665, 665, 665, 665, -1,
+ 665, 665, 665, 665, -1, 665, -1, 665,
+ 665, 665, -1, 665, 665, 665, 665, 665,
+ 665, -1, 665, 665, 665, 665, 665, 665,
+ 665, 665, 665, 958, 665, 665, 665, 665,
+ -1, -1, -1, 587, -1, 759, -1, 665,
+ -1, 760, 585, 760, 863, 863, 863, 881,
+ 760, 863, 863, 863, 881, 665, 665, 665,
+ 665, -1, -1, 958, 958, 958, 958, 958,
+ 958, 958, 958, 958, 958, 958, 958, 958,
+ 958, 958, -1, 958, 958, 958, 958, 958,
+ 958, 958, -1, 634, 90, -1, -1, 375,
+ 230, 229, 472, -1, -1, -1, -1, 881,
+ 475, 474, 473, -1, -1, -1, -1, -1,
+ -1, 527, 382, 599, -1, -1, -1, 381,
+ -1, 665, 665, 665, 665, -1, -1, 665,
+ 665, 664, 665, 665, 665, -1, -1, -1,
+ 665, 665, 485, 665, 665, -1, -1, -1,
+ -1, 665, -1, -1, -1, 665, 665, 665,
+ -1, 665, 665, -1, 876, 665, 876, 876,
+ 876, 876, -1, 876, 380, -1, 665, -1,
+ 584, 586, -1, -1, -1, -1, 760, 760,
+ -1, 665, 665, 665, 665, 665, 665, 665,
+ 665, -1, 665, 665, 665, -1, -1, 897,
+ 897, 897, 375, 897, -1, 876, 759, 977,
+ 977, 163, -1, -1, 760, -1, -1, -1,
+ -1, -1, -1, 958, -1, 958, 958, 958,
+ 958, 958, -1, 665, 665, 665, 665, 665,
+ -1, -1, -1, -1, -1, 911, 911, 911,
+ -1, 911, -1, 665, 570, 490, -1, 666,
+ 666, 666, 666, 666, 666, 666, 666, 666,
+ 666, 666, 666, 666, 666, -1, 666, 666,
+ 666, 666, 666, 666, -1, -1, -1, 666,
+ 666, 666, 666, 666, 666, -1, 666, 666,
+ 666, 666, -1, 666, -1, 666, 666, 666,
+ -1, 666, 666, 666, 666, 666, 666, -1,
+ 666, 666, 666, 666, 666, 666, 666, 666,
+ 666, 963, 666, 666, 666, 666, -1, -1,
+ -1, 756, -1, 756, 757, 666, 757, 876,
+ 756, -1, 897, 757, 876, -1, 977, -1,
+ 876, 876, -1, 666, 666, 666, 666, -1,
+ 897, 963, 963, 963, 963, 963, 963, 963,
+ 963, 963, 963, 963, 963, 963, 963, 963,
+ 959, 963, 963, 963, 963, 963, 963, 963,
+ 911, -1, -1, -1, -1, -1, -1, 629,
+ -1, -1, -1, -1, 897, -1, 876, -1,
+ -1, -1, -1, 911, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 666,
+ 666, 666, 666, -1, -1, 666, 666, 665,
+ 666, 666, 666, -1, -1, -1, 666, 666,
+ -1, 666, 666, -1, 911, -1, -1, 666,
+ -1, -1, -1, 666, 666, 666, -1, 666,
+ 666, -1, 877, 666, 877, 877, 877, 877,
+ -1, 877, -1, -1, 666, -1, 756, 756,
+ -1, 757, 757, -1, -1, -1, -1, 666,
+ 666, 666, 666, 666, 666, 666, 666, -1,
+ 666, 666, 666, -1, 898, 898, 898, -1,
+ 898, -1, -1, 877, 756, -1, -1, 757,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 963, -1, 963, 963, 963, 963, 963,
+ -1, 666, 666, 666, 666, 666, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 666, -1, -1, -1, 667, 667, 667,
+ 667, 667, 667, 667, 667, 667, 667, 667,
+ 667, 667, 667, -1, 667, 667, 667, 667,
+ 667, 667, -1, -1, -1, 667, 667, 667,
+ 667, 667, 667, -1, 667, 667, 667, 667,
+ -1, 667, -1, 667, 667, 667, -1, 667,
+ 667, 667, 667, 667, 667, -1, 667, 667,
+ 667, 667, 667, 667, 667, 667, 667, 964,
+ 667, 667, 667, 667, -1, -1, -1, -1,
+ -1, -1, -1, 667, -1, 877, -1, 898,
+ -1, -1, 877, -1, -1, -1, 877, 877,
+ -1, 667, 667, 667, 667, 898, -1, 964,
+ 964, 964, 964, 964, 964, 964, 964, 964,
+ 964, 964, 964, 964, 964, 964, -1, 964,
+ 964, 964, 964, 964, 964, 964, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 898, -1, -1, 877, -1, -1, -1,
+ -1, -1, -1, -1, -1, 634, 90, -1,
+ -1, -1, -1, -1, -1, 667, 667, 667,
+ 667, -1, -1, 667, 667, 666, 667, 667,
+ 667, -1, -1, -1, 667, 667, -1, 667,
+ 667, -1, -1, -1, -1, 667, -1, -1,
+ -1, 667, 667, 667, -1, 667, 667, -1,
+ 878, 667, 878, 878, 878, 878, -1, 878,
+ -1, -1, 667, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 667, 667, 667,
+ 667, 667, 667, 667, 667, -1, 667, 667,
+ 667, -1, 584, 586, -1, -1, -1, -1,
+ -1, 878, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 964,
+ -1, 964, 964, 964, 964, 964, -1, 667,
+ 667, 667, 667, 667, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 667,
+ -1, -1, -1, 668, 668, 668, 668, 668,
+ 668, 668, 668, 668, 668, 668, 668, 668,
+ 668, -1, 668, 668, 668, 668, 668, 668,
+ -1, -1, -1, 668, 668, 668, 668, 668,
+ 668, -1, 668, 668, 668, 668, -1, 668,
+ -1, 668, 668, 668, -1, 668, 668, 668,
+ 668, 668, 668, -1, 668, 668, 668, 668,
+ 668, 668, 668, 668, 668, 1007, 668, 668,
+ 668, 668, -1, -1, -1, -1, -1, -1,
+ -1, 668, -1, 878, -1, -1, -1, -1,
+ 878, -1, -1, -1, 878, 878, -1, 668,
+ 668, 668, 668, -1, -1, 1007, 1007, 1007,
+ 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
+ 1007, 1007, 1007, 1007, 961, 1007, 1007, 1007,
+ 1007, 1007, 1007, 1007, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 878, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 629, -1, 668, 668, 668, 668, -1,
+ -1, 668, 668, 667, 668, 668, 668, -1,
+ -1, -1, 668, 668, -1, 668, 668, -1,
+ -1, -1, -1, 668, -1, -1, -1, 668,
+ 668, 668, -1, 668, 668, -1, 386, 668,
+ 867, 383, 384, 385, -1, -1, -1, -1,
+ 668, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 668, 668, 668, 668, 668,
+ 668, 668, 668, -1, 668, 668, 668, -1,
+ -1, -1, -1, -1, -1, -1, -1, 991,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1007, -1, 1007,
+ 1007, 1007, 1007, 1007, -1, 668, 668, 668,
+ 668, 668, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 668, -1, -1,
+ -1, 669, 669, 669, 669, 669, 669, 669,
+ 669, 669, 669, 669, 669, 669, 669, -1,
+ 669, 669, 669, 669, 669, 669, -1, -1,
+ -1, 669, 669, 669, 669, 669, 669, -1,
+ 669, 669, 669, 669, -1, 669, -1, 669,
+ 669, 669, -1, 669, 669, 669, 669, 669,
+ 669, -1, 669, 669, 669, 669, 669, 669,
+ 669, 669, 669, 1008, 669, 669, 669, 669,
+ -1, -1, -1, -1, -1, -1, -1, 669,
+ -1, 867, -1, -1, -1, -1, 382, -1,
+ -1, -1, 867, 381, -1, 669, 669, 669,
+ 669, -1, -1, 1008, 1008, 1008, 1008, 1008,
+ 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008,
+ 1008, 1008, 962, 1008, 1008, 1008, 1008, 1008,
+ 1008, 1008, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 484, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 669, 669, 669, 669, -1, -1, 669,
+ 669, 668, 669, 669, 669, -1, -1, -1,
+ 669, 669, -1, 669, 669, -1, -1, -1,
+ -1, 669, -1, -1, -1, 669, 669, 669,
+ -1, 669, 669, -1, -1, 669, -1, -1,
+ -1, -1, -1, -1, -1, -1, 669, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 669, 669, 669, 669, 669, 669, 669,
+ 669, -1, 669, 669, 669, 355, 356, 357,
+ 354, -1, -1, -1, -1, 361, 997, 997,
+ 391, -1, 390, 352, -1, 359, 360, -1,
+ -1, -1, -1, 1008, -1, 1008, 1008, 1008,
+ 1008, 1008, -1, 669, 669, 669, 669, 669,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 669, -1, -1, -1, 670,
+ 670, 670, 670, 670, 670, 670, 670, 670,
+ 670, 670, 670, 670, 670, -1, 670, 670,
+ 670, 670, 670, 670, -1, -1, -1, 670,
+ 670, 670, 670, 670, 670, -1, 670, 670,
+ 670, 670, -1, 670, -1, 670, 670, 670,
+ -1, 670, 670, 670, 670, 670, 670, -1,
+ 670, 670, 670, 670, 670, 670, 670, 670,
+ 670, -1, 670, 670, 670, 670, -1, -1,
+ -1, -1, -1, -1, -1, 670, 960, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 997, -1, 670, 670, 670, 670, -1,
+ -1, -1, -1, -1, 447, -1, 349, 350,
+ 351, 358, 362, 353, 389, -1, 960, 960,
+ 960, 960, 960, 960, 960, 960, 960, 960,
+ 960, 960, 960, 960, 960, 960, 960, 960,
+ 960, 960, 960, 960, 960, -1, -1, -1,
+ -1, -1, -1, -1, -1, 498, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 670,
+ 670, 670, 670, -1, -1, 670, 670, 669,
+ 670, 670, 670, -1, -1, -1, 670, 670,
+ -1, 670, 670, -1, -1, -1, -1, 670,
+ -1, -1, -1, 670, 670, 670, -1, 670,
+ 670, -1, 386, 670, 867, 383, 384, 385,
+ -1, 991, -1, -1, 670, 879, -1, 879,
+ 879, 879, 879, -1, 879, -1, -1, 670,
+ 670, 670, 670, 670, 670, 670, 670, -1,
+ 670, 670, 670, -1, -1, -1, 993, 993,
+ 554, -1, 553, 991, -1, 355, 356, 357,
+ 354, -1, -1, -1, -1, 361, 879, -1,
+ -1, -1, -1, 352, -1, 359, 360, -1,
+ -1, 670, 670, 670, 670, 670, 960, -1,
+ 960, 960, 960, 960, 960, -1, -1, -1,
+ -1, 670, -1, -1, -1, 671, 671, 671,
+ 671, 671, 671, 671, 671, 671, 671, 671,
+ 671, 671, 671, -1, 671, 671, 671, 671,
+ 671, 671, -1, -1, -1, 671, 671, 671,
+ 671, 671, 671, -1, 671, 671, 671, 671,
+ -1, 671, -1, 671, 671, 671, -1, 671,
+ 671, 671, 671, 671, 671, -1, 671, 671,
+ 671, 671, 671, 671, 671, 671, 671, -1,
+ 671, 671, 671, 671, -1, -1, -1, -1,
+ -1, -1, -1, 671, -1, 867, -1, -1,
+ -1, 993, 382, -1, -1, -1, 867, 381,
+ 879, 671, 671, 671, 671, 879, -1, 552,
+ -1, 879, 879, -1, -1, -1, -1, -1,
+ 382, -1, -1, -1, -1, 381, 535, 350,
+ 351, 358, 362, 353, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 551, 495, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 879,
+ -1, -1, -1, -1, -1, 671, 671, 671,
+ 671, -1, 484, 671, 671, 670, 671, 671,
+ 671, -1, -1, -1, 671, 671, -1, 671,
+ 671, -1, -1, -1, -1, 671, -1, -1,
+ -1, 671, 671, 671, -1, 671, 671, -1,
+ -1, 671, 957, -1, -1, -1, -1, -1,
+ -1, -1, 671, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 671, 671, 671,
+ 671, 671, 671, 671, 671, -1, 671, 671,
+ 671, -1, 957, 957, 957, 957, 957, 957,
+ 957, 957, 957, 957, 957, 957, 957, 957,
+ 957, -1, 957, 957, 957, 957, 957, 957,
+ 957, -1, -1, -1, -1, -1, -1, 671,
+ 671, 671, 671, 671, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 671,
+ -1, -1, -1, 672, 672, 672, 672, 672,
+ 672, 672, 672, 672, 672, 672, 672, 672,
+ 672, -1, 672, 672, 672, 672, 672, 672,
+ -1, -1, -1, 672, 672, 672, 672, 672,
+ 672, -1, 672, 672, 672, 672, -1, 672,
+ -1, 672, 672, 672, -1, 672, 672, 672,
+ 672, 672, 672, -1, 672, 672, 672, 672,
+ 672, 672, 672, 672, 672, -1, 672, 672,
+ 672, 672, -1, -1, -1, 355, 356, 357,
+ 354, 672, 860, -1, 860, 361, -1, -1,
+ -1, 860, -1, 352, -1, 359, 360, 672,
+ 672, 672, 672, -1, 337, 339, -1, -1,
+ -1, -1, 957, -1, 957, 957, 957, 957,
+ 957, -1, 338, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 447, -1,
+ 349, 350, 351, 358, 362, 353, 389, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 672, 672, 672, 672, -1,
+ -1, 672, 672, 671, 672, 672, 672, 498,
+ -1, -1, 672, 672, -1, 672, 672, -1,
+ -1, -1, -1, 672, -1, -1, -1, 672,
+ 672, 672, -1, 672, 672, -1, -1, 672,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 672, -1, -1, -1, -1, -1, -1, 860,
+ 860, -1, -1, 672, 672, 672, 672, 672,
+ 672, 672, 672, -1, 672, 672, 672, 542,
+ 351, 358, 362, 353, -1, -1, -1, -1,
+ -1, 355, 356, 357, 354, 860, 654, -1,
+ -1, 361, -1, -1, -1, -1, -1, 352,
+ -1, 359, 360, -1, -1, 672, 672, 672,
+ 672, 672, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 672, -1, -1,
+ -1, 673, 673, 673, 673, 673, 673, 673,
+ 673, 673, 673, 673, 673, 673, 673, -1,
+ 673, 673, 673, 673, 673, 673, -1, -1,
+ -1, 673, 673, 673, 673, 673, 673, -1,
+ 673, 673, 673, 673, -1, 673, -1, 673,
+ 673, 673, -1, 673, 673, 673, 673, 673,
+ 673, -1, 673, 673, 673, 673, 673, 673,
+ 673, 673, 673, -1, 673, 673, 673, 673,
+ -1, -1, -1, -1, -1, -1, -1, 673,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 355, 356, 357, 354, 673, 673, 673,
+ 673, 361, -1, -1, -1, -1, -1, 352,
+ -1, 359, 360, -1, 382, -1, -1, -1,
+ -1, 381, 536, 350, 351, 358, 362, 353,
+ -1, 552, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 535, 350, 351, 358, 362, 353, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 673, 673, 673, 673, 551, 495, 673,
+ 673, 672, 673, 673, 673, -1, -1, -1,
+ 673, 673, -1, 673, 673, -1, -1, -1,
+ -1, 673, -1, -1, -1, 673, 673, 673,
+ -1, 673, 673, -1, -1, 673, -1, -1,
+ -1, -1, -1, -1, -1, -1, 673, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 673, 673, 673, 673, 673, 673, 673,
+ 673, -1, 673, 673, 673, -1, -1, 997,
+ 997, 391, -1, 390, -1, -1, -1, -1,
+ -1, -1, 537, 350, 351, 358, 362, 353,
+ -1, -1, 355, 356, 357, 354, -1, -1,
+ -1, -1, 361, 673, 673, 673, 673, 673,
+ 352, -1, 359, 360, -1, -1, -1, -1,
+ -1, -1, -1, 673, -1, -1, -1, 674,
+ 674, 674, 674, 674, 674, 674, 674, 674,
+ 674, 674, 674, 674, 674, -1, 674, 674,
+ 674, 674, 674, 674, -1, -1, -1, 674,
+ 674, 674, 674, 674, 674, -1, 674, 674,
+ 674, 674, -1, 674, -1, 674, 674, 674,
+ -1, 674, 674, 674, 674, 674, 674, -1,
+ 674, 674, 674, 674, 674, 674, 674, 674,
+ 674, -1, 674, 674, 674, 674, -1, -1,
+ -1, 355, 356, 357, 354, 674, -1, -1,
+ -1, 361, 997, -1, -1, -1, -1, 352,
+ -1, 359, 360, 674, 674, 674, 674, -1,
+ -1, -1, -1, -1, -1, 389, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 538, 350, 351, 358, 362,
+ 353, -1, -1, -1, -1, -1, 569, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 674,
+ 674, 674, 674, -1, -1, 674, 674, 673,
+ 674, 674, 674, -1, -1, -1, 674, 674,
+ -1, 674, 674, -1, -1, -1, -1, 674,
+ -1, -1, -1, 674, 674, 674, -1, 674,
+ 674, -1, -1, 674, -1, -1, -1, -1,
+ -1, -1, -1, -1, 674, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 674,
+ 674, 674, 674, 674, 674, 674, 674, -1,
+ 674, 674, 674, 539, 351, 358, 362, 353,
+ -1, 874, -1, 874, 874, 874, 874, -1,
+ 874, -1, -1, -1, -1, -1, -1, -1,
+ -1, 542, 351, 358, 362, 353, -1, -1,
+ -1, 674, 674, 674, 674, 674, -1, -1,
+ 654, -1, -1, -1, -1, -1, -1, -1,
+ -1, 674, 874, -1, -1, 675, 675, 675,
+ 675, 675, 675, 675, 675, 675, 675, 675,
+ 675, 675, 675, -1, 675, 675, 675, 675,
+ 675, 675, -1, -1, -1, 675, 675, 675,
+ 675, 675, 675, -1, 675, 675, 675, 675,
+ -1, 675, -1, 675, 675, 675, -1, 675,
+ 675, 675, 675, 675, 675, -1, 675, 675,
+ 675, 675, 675, 675, 675, 675, 675, -1,
+ 675, 675, 675, 675, -1, -1, -1, 355,
+ 356, 357, 354, 675, -1, -1, -1, 361,
+ -1, -1, -1, -1, -1, 352, -1, 359,
+ 360, 675, 675, 675, 675, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 874, -1, -1, -1,
+ -1, 874, -1, -1, -1, 874, 874, -1,
+ -1, -1, -1, -1, 536, 350, 351, 358,
+ 362, 353, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 675, 675, 675,
+ 675, -1, -1, 675, 675, 674, 675, 675,
+ 675, -1, -1, -1, 675, 675, -1, 675,
+ 675, -1, -1, 874, -1, 675, -1, -1,
+ -1, 675, 675, 675, -1, 675, 675, -1,
+ -1, 675, -1, -1, -1, -1, -1, -1,
+ -1, -1, 675, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 675, 675, 675,
+ 675, 675, 675, 675, 675, -1, 675, 675,
+ 675, 540, 351, 358, 362, 353, -1, -1,
+ -1, 355, 356, 357, 354, -1, -1, -1,
+ -1, 361, -1, -1, -1, -1, -1, 352,
+ -1, 359, 360, -1, -1, -1, -1, 675,
+ 675, 675, 675, 675, 537, 350, 351, 358,
+ 362, 353, -1, -1, -1, -1, -1, 675,
+ -1, -1, -1, 676, 676, 676, 676, 676,
+ 676, 676, 676, 676, 676, 676, 676, 676,
+ 676, -1, 676, 676, 676, 676, 676, 676,
+ -1, -1, -1, 676, 676, 676, 676, 676,
+ 676, -1, 676, 676, 676, 676, -1, 676,
+ -1, 676, 676, 676, -1, 676, 676, 676,
+ 676, 676, 676, -1, 676, 676, 676, 676,
+ 676, 676, 676, 676, 676, -1, 676, 676,
+ 676, 676, -1, -1, -1, -1, -1, -1,
+ -1, 676, -1, -1, -1, 942, 942, 942,
+ 942, 460, 936, 936, 936, 942, 936, 676,
+ 676, 676, 676, 942, -1, 942, 942, 936,
+ 936, 457, 458, 459, -1, -1, -1, -1,
+ -1, -1, -1, 541, 351, 358, 362, 353,
+ -1, -1, -1, -1, -1, -1, -1, 389,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 538, 350, 351,
+ 358, 362, 353, 676, 676, 676, 676, -1,
+ 569, 676, 676, 675, 676, 676, 676, -1,
+ -1, -1, 676, 676, -1, 676, 676, -1,
+ -1, -1, -1, 676, -1, -1, -1, 676,
+ 676, 676, -1, 676, 676, -1, -1, 676,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 676, 875, -1, 875, 875, 875, 875, -1,
+ 875, -1, -1, 676, 676, 676, 676, 676,
+ 676, 676, 676, -1, 676, 676, 676, -1,
+ -1, -1, -1, -1, -1, 456, -1, 942,
+ 942, 942, 942, 942, -1, -1, -1, -1,
+ -1, -1, 875, -1, -1, 539, 351, 358,
+ 362, 353, -1, -1, -1, 676, 676, 676,
+ 676, 676, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 676, -1, -1,
+ -1, 677, 677, 677, 677, 677, 677, 677,
+ 677, 677, 677, 677, 677, 677, 677, -1,
+ 677, 677, 677, 677, 677, 677, -1, -1,
+ -1, 677, 677, 677, 677, 677, 677, -1,
+ 677, 677, 677, 677, -1, 677, -1, 677,
+ 677, 677, -1, 677, 677, 677, 677, 677,
+ 677, -1, 677, 677, 677, 677, 677, 677,
+ 677, 677, 677, -1, 677, 677, 677, 677,
+ -1, -1, -1, -1, -1, -1, -1, 677,
+ 948, -1, -1, -1, 993, 993, 554, -1,
+ 553, -1, -1, -1, 875, 677, 677, 677,
+ 677, 875, -1, -1, -1, 875, 875, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 948, 948, 948, 948, 948, 948, 948, 948,
+ 948, 948, 948, 948, 948, 948, 948, -1,
+ 948, 948, 948, 948, 948, 948, 948, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 875, -1, -1, -1, -1,
+ -1, 677, 677, 677, 677, -1, -1, 677,
+ 677, 676, 677, 677, 677, -1, -1, -1,
+ 677, 677, -1, 677, 677, -1, -1, -1,
+ -1, 677, -1, -1, -1, 677, 677, 677,
+ -1, 677, 677, -1, -1, 677, -1, -1,
+ -1, -1, -1, -1, -1, -1, 677, -1,
+ -1, -1, -1, -1, -1, -1, -1, 993,
+ -1, 677, 677, 677, 677, 677, 677, 677,
+ 677, -1, 677, 677, 677, 552, -1, -1,
+ -1, -1, -1, -1, -1, 993, 993, 554,
+ -1, 553, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 540, 351, 358, 362, 353,
+ -1, -1, -1, 677, 677, 677, 677, 677,
+ 948, 595, 948, 948, 948, 948, 948, -1,
+ -1, -1, -1, 677, -1, -1, -1, 25,
+ 26, 975, 23, 21, 24, 48, 49, 50,
+ 51, 77, 78, 79, 80, -1, 76, 28,
+ 34, 35, 38, 36, -1, -1, -1, 101,
+ 97, 99, 95, 93, 30, -1, 43, 39,
+ 40, 41, -1, 46, -1, 87, 44, 42,
+ -1, 88, 85, 84, 86, 22, 27, -1,
+ 72, 73, 74, 59, 60, 61, 47, 57,
+ 71, -1, 104, 106, 108, 110, -1, -1,
+ -1, -1, -1, -1, -1, 75, -1, 860,
+ -1, 860, 860, 860, 860, -1, 860, -1,
+ 993, -1, 336, 66, 67, 68, 69, -1,
+ -1, 337, 339, -1, -1, -1, 552, -1,
+ -1, -1, -1, -1, -1, -1, -1, 338,
+ -1, -1, 355, 356, 357, 354, -1, -1,
+ 860, -1, 361, -1, -1, -1, -1, -1,
+ 352, -1, 359, 360, 748, 541, 351, 358,
+ 362, 353, 628, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2,
+ 20, 18, 45, -1, -1, 17, 19, 677,
+ 16, 15, 13, -1, -1, -1, 29, 12,
+ -1, 10, 4, -1, -1, -1, -1, 11,
+ -1, -1, -1, 8, 9, 3, -1, 5,
+ 6, 363, -1, 7, -1, -1, -1, -1,
+ -1, -1, -1, -1, 14, 100, 96, 98,
+ 94, 92, -1, 580, -1, -1, -1, 33,
+ 31, 32, 52, 62, 63, 64, 65, -1,
+ 70, 83, 91, -1, -1, -1, -1, -1,
+ -1, -1, -1, 983, -1, 856, -1, -1,
+ -1, -1, 860, 606, -1, -1, -1, 860,
+ 983, -1, -1, 860, 860, -1, -1, 456,
+ 53, 102, 89, 81, 37, 58, 983, -1,
+ -1, 364, -1, 349, 350, 351, 358, 362,
+ 353, 114, 771, 771, 771, 771, 771, 771,
+ 771, 771, 771, 771, 771, 771, 771, 771,
+ 771, 771, 771, 771, 771, 771, 771, 771,
+ 771, 860, 771, 771, 771, 771, 771, 771,
+ -1, 771, 771, 771, 771, -1, 771, -1,
+ 771, 771, 771, -1, 771, 771, 771, 771,
+ 771, 771, 983, 771, 771, 771, 771, 771,
+ 771, 771, 771, 771, -1, 771, 771, 771,
+ 771, 579, -1, -1, -1, -1, -1, -1,
+ 771, -1, -1, 771, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 771, 771,
+ 771, 771, -1, -1, -1, -1, 983, -1,
+ -1, -1, -1, 983, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 983, -1, 983, -1, -1, 578,
+ 90, -1, -1, -1, -1, -1, -1, -1,
+ 202, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 771, 771, 771, 771, -1, -1,
+ 771, 771, -1, 771, 771, 771, -1, -1,
+ -1, 771, 771, -1, 771, 771, -1, -1,
+ -1, -1, 771, -1, -1, -1, 771, 771,
+ 771, -1, 771, 771, -1, -1, 771, -1,
+ -1, -1, -1, -1, -1, -1, 344, 771,
+ 771, 771, 771, -1, -1, -1, 771, 771,
+ -1, -1, 771, 771, 771, 771, 771, 771,
+ 771, 771, -1, 771, 771, 771, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 25, 26, 981, 23, 21,
+ 24, -1, -1, -1, -1, -1, -1, 552,
+ -1, -1, -1, 28, 771, 771, 771, 771,
+ 771, -1, -1, 729, 729, 729, 729, 729,
+ 30, -1, 256, -1, 771, -1, -1, 46,
+ -1, 771, 44, -1, -1, -1, -1, -1,
+ -1, 22, 27, 595, -1, -1, -1, 59,
+ 60, 61, 47, 729, -1, -1, 77, 78,
+ 79, 80, -1, 76, -1, -1, -1, -1,
+ -1, -1, -1, -1, 100, 96, 98, 94,
+ 92, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 87, -1, -1, -1, 88, 85,
+ 84, 86, -1, -1, -1, 72, 73, 74,
+ -1, -1, -1, -1, 1006, 71, -1, 104,
+ 106, 108, 110, -1, -1, -1, -1, -1,
+ -1, -1, 75, 860, -1, 860, -1, -1,
+ -1, -1, 860, -1, -1, -1, 336, -1,
+ 66, 67, 68, 69, -1, 337, 339, -1,
+ -1, -1, -1, -1, 255, 253, 45, -1,
+ -1, 252, 254, 338, -1, -1, 251, -1,
+ 552, -1, 29, 250, -1, 248, 242, -1,
+ -1, -1, -1, 249, 240, -1, -1, 246,
+ 247, 241, -1, 243, 244, -1, -1, 245,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 771, -1, -1, -1, 628, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2, 20, 18, 45, 729, 729, 17,
+ 19, -1, 16, 15, 13, -1, -1, -1,
+ 29, 12, -1, 10, 4, -1, -1, -1,
+ -1, 11, -1, -1, -1, 8, 9, 3,
+ -1, 5, 6, 363, -1, 7, -1, -1,
+ 860, 860, -1, -1, -1, -1, 14, 131,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ 239, 33, 31, 32, 52, 62, 63, 64,
+ 65, -1, 70, 82, 90, -1, 860, 653,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 606, 102, 89,
+ 81, 132, 58, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 37, 58,
+ -1, -1, -1, 364, -1, 349, 350, 351,
+ 358, 362, 353, 114, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 772, 772,
+ 772, 772, 772, -1, 772, 772, 772, 772,
+ 772, 772, -1, 772, 772, 772, 772, -1,
+ 772, -1, 772, 772, 772, -1, 772, 772,
+ 772, 772, 772, 772, -1, 772, 772, 772,
+ 772, 772, 772, 772, 772, 772, 949, 772,
+ 772, 772, 772, 579, -1, -1, -1, -1,
+ -1, -1, 772, -1, -1, 772, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 772, 772, 772, 772, -1, -1, 949, 949,
+ 949, 949, 949, 949, 949, 949, 949, 949,
+ 949, 949, 949, 949, 949, -1, 949, 949,
+ 949, 949, 949, 949, 949, -1, -1, -1,
+ -1, 578, 90, -1, -1, -1, -1, -1,
+ -1, -1, 202, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 772, 772, 772, 772,
+ -1, -1, 772, 772, -1, 772, 772, 772,
+ -1, -1, -1, 772, 772, -1, 772, 772,
+ -1, -1, -1, -1, 772, -1, -1, -1,
+ 772, 772, 772, -1, 772, 772, -1, -1,
+ 772, -1, -1, -1, -1, -1, -1, -1,
+ 344, 772, 772, 772, 772, -1, -1, -1,
+ 772, 772, -1, -1, 772, 772, 772, 772,
+ 772, 772, 772, 772, -1, 772, 772, 772,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 949, -1,
+ 949, 949, 949, 949, 949, -1, 772, 772,
+ 772, 772, 772, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 772, -1,
+ -1, -1, -1, 772, -1, 799, 799, 799,
+ 799, 799, 799, 799, 799, 799, 799, 799,
+ 799, 799, 799, 799, 799, 799, 799, 799,
+ 799, 799, 799, 799, -1, 799, 799, 799,
+ 799, 799, 799, -1, 799, 799, 799, 799,
+ -1, 799, -1, 799, 799, 799, -1, 799,
+ 799, 799, 799, 799, 799, -1, 799, 799,
+ 799, 799, 799, 799, 799, 799, 799, -1,
+ 799, 799, 799, 799, -1, -1, -1, -1,
+ -1, -1, -1, 799, -1, -1, 799, -1,
+ -1, 181, -1, -1, -1, -1, -1, -1,
+ -1, 799, 799, 799, 799, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 255, 253,
+ 45, -1, -1, 252, 254, -1, -1, -1,
+ 251, -1, -1, -1, 29, 250, -1, 248,
+ 242, -1, -1, -1, -1, 249, 240, -1,
+ -1, 246, 247, 241, -1, 243, 244, -1,
+ -1, 245, -1, -1, -1, 799, 799, 799,
+ 799, -1, 772, 799, 799, -1, 799, 799,
+ 799, -1, -1, -1, 799, 799, -1, 799,
+ 799, -1, -1, -1, -1, 799, -1, -1,
+ -1, 799, 799, 799, -1, 799, 799, -1,
+ -1, 799, -1, -1, -1, -1, -1, -1,
+ -1, -1, 799, 799, 799, 799, -1, -1,
+ -1, 799, 799, -1, 180, 799, 799, 799,
+ 799, 799, 799, 799, 799, -1, 799, 799,
+ 799, 131, 62, 63, 64, 65, -1, 70,
+ 82, 90, 239, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 653, -1, -1, -1, -1, -1, 799,
+ 799, 799, 799, 799, -1, -1, -1, -1,
+ 102, 89, 81, 132, 58, -1, -1, 799,
+ 77, 78, 79, 80, 799, 76, -1, -1,
+ -1, -1, -1, -1, -1, -1, 100, 96,
+ 98, 94, 92, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 87, -1, -1, -1,
+ 88, 85, 84, 86, -1, -1, -1, 72,
+ 73, 74, -1, -1, -1, -1, 1006, 71,
+ -1, 104, 106, 108, 110, -1, -1, -1,
+ -1, -1, -1, -1, 75, -1, -1, -1,
+ -1, 355, 356, 357, 354, -1, -1, -1,
+ -1, 361, 66, 67, 68, 69, -1, 352,
+ -1, 359, 360, 748, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 77, 78, 79, 80, -1, 76,
+ 529, -1, -1, -1, -1, -1, -1, -1,
+ 100, 96, 98, 94, 92, -1, -1, -1,
+ -1, -1, -1, 799, -1, -1, 87, -1,
+ -1, -1, 88, 85, 84, 86, -1, -1,
+ -1, 72, 73, 74, -1, -1, -1, -1,
+ 1006, 71, -1, 104, 106, 108, 110, -1,
+ 860, -1, 860, 860, 860, 860, 75, 860,
+ -1, 134, 62, 63, 64, 65, -1, 70,
+ 82, 90, 337, 339, -1, -1, -1, -1,
+ 364, -1, 349, 350, 351, 358, 362, 353,
+ 338, -1, -1, -1, -1, -1, -1, -1,
+ -1, 860, -1, -1, -1, -1, -1, -1,
+ 102, 89, 81, 132, 58, 832, 832, 832,
+ 832, 832, 832, 832, 832, 832, 832, 832,
+ 832, 832, 832, 832, 832, 832, 832, 832,
+ 832, 832, 832, 832, -1, 832, 832, 832,
+ 832, 832, 832, -1, 832, 832, 832, 832,
+ -1, 832, -1, 832, 832, 832, -1, 832,
+ 832, 832, 832, 832, 832, -1, 832, 832,
+ 832, 832, 832, 832, 832, 832, 832, 832,
+ 832, 832, 832, 832, 832, -1, 832, -1,
+ -1, -1, -1, 199, 832, 832, 832, 832,
+ -1, 198, 832, 832, -1, 832, 832, 832,
+ 832, 832, 832, 832, 832, 832, 832, 832,
+ 832, 173, 82, 90, -1, -1, 832, -1,
+ -1, -1, -1, 860, 607, -1, -1, -1,
+ 860, -1, -1, -1, 860, 860, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 102, 89, 81, 132, 58, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 832, 832, 832,
+ 832, -1, -1, 832, 832, 832, 832, 832,
+ 832, -1, 860, -1, 832, 832, 832, 832,
+ 832, -1, -1, -1, -1, 832, -1, -1,
+ -1, 832, 832, 832, -1, 832, 832, -1,
+ -1, 832, -1, -1, -1, -1, -1, -1,
+ -1, -1, 832, 832, 832, 832, 832, -1,
+ 832, 832, 832, -1, -1, 832, 832, 832,
+ 832, 832, 832, 832, 832, -1, 832, 832,
+ 832, -1, -1, -1, 832, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 832,
+ 832, -1, -1, 832, -1, -1, -1, -1,
+ 832, -1, -1, -1, -1, 832, -1, 832,
+ 832, 832, 832, 832, -1, -1, 180, -1,
+ -1, -1, -1, -1, -1, -1, -1, 832,
+ -1, 832, -1, -1, 832, 832, -1, -1,
+ -1, 832, -1, 832, -1, 832, -1, -1,
+ -1, -1, -1, -1, 77, 78, 79, 80,
+ -1, 76, -1, -1, -1, -1, -1, -1,
+ -1, -1, 100, 96, 98, 94, 92, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 87, -1, -1, -1, 88, 85, 84, 86,
+ -1, -1, -1, 72, 73, 74, -1, -1,
+ -1, -1, 1006, 71, -1, 104, 106, 108,
+ 110, -1, -1, -1, -1, -1, -1, -1,
+ 75, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 950, -1, -1, -1, 66, 67,
+ 68, 69, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 950, 950, 950, 950, 950, 950,
+ 950, 950, 950, 950, 950, 950, 950, 950,
+ 950, -1, 950, 950, 950, 950, 950, 950,
+ 950, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 832, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 529, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 142, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 134, 62, 63, 64, 65,
+ -1, 70, 82, 90, 102, 89, 81, 132,
+ 58, -1, 364, -1, 349, 350, 351, 358,
+ 362, 353, 950, -1, 950, 950, 950, 950,
+ 950, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 102, 89, 81, 132, 58, 780,
+ 780, 780, 780, 780, 780, 780, 780, 780,
+ 780, 780, 780, 780, 780, 780, 780, 780,
+ 780, 780, 780, 780, 780, 780, -1, 780,
+ 780, 780, 780, 780, 780, -1, 780, 780,
+ 780, 780, -1, 780, -1, 780, 780, 780,
+ -1, 780, 780, 780, 780, 780, 780, -1,
+ 780, 780, 780, 780, 780, 780, 780, 780,
+ 780, -1, 780, 780, 780, 780, -1, -1,
+ -1, -1, -1, -1, -1, 780, -1, -1,
+ 780, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 780, 780, 780, 780, -1,
+ -1, -1, -1, 173, 82, 90, -1, -1,
+ -1, -1, -1, -1, -1, -1, 607, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 132,
+ 58, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 780,
+ 780, 780, 780, -1, -1, 780, 780, -1,
+ 780, 780, 780, -1, -1, -1, 780, 780,
+ -1, 780, 780, -1, -1, -1, -1, 780,
+ -1, -1, -1, 780, 780, 780, -1, 780,
+ 780, -1, -1, 780, 951, -1, -1, -1,
+ -1, -1, -1, -1, 780, 780, 780, 780,
+ -1, -1, -1, 780, 780, -1, -1, 780,
+ 780, 780, 780, 780, 780, 780, 780, -1,
+ 780, 780, 780, -1, 951, 951, 951, 951,
+ 951, 951, 951, 951, 951, 951, 951, 951,
+ 951, 951, 951, -1, 951, 951, 951, 951,
+ 951, 951, 951, -1, -1, -1, -1, -1,
+ -1, 780, 780, 780, 780, 780, -1, -1,
+ -1, 77, 78, 79, 80, -1, 76, -1,
+ -1, 780, -1, -1, -1, -1, 780, 100,
+ 96, 98, 94, 92, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 87, -1, -1,
+ -1, 88, 85, 84, 86, 968, -1, -1,
+ 72, 73, 74, -1, -1, -1, -1, 1006,
+ 71, -1, 104, 106, 108, 110, -1, -1,
+ -1, -1, -1, -1, -1, 75, -1, -1,
+ -1, -1, -1, -1, -1, 968, 968, 968,
+ 968, 968, 968, 968, 968, 968, 968, 968,
+ 968, 968, 968, 968, -1, 968, 968, 968,
+ 968, 968, 968, 968, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 951, -1, 951, 951,
+ 951, 951, 951, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 781, 781, 781, 781,
+ 781, 781, 781, 781, 781, 781, 781, 781,
+ 781, 781, 781, 781, 781, 781, 781, 781,
+ 781, 781, 781, -1, 781, 781, 781, 781,
+ 781, 781, -1, 781, 781, 781, 781, -1,
+ 781, -1, 781, 781, 781, 780, 781, 781,
+ 781, 781, 781, 781, -1, 781, 781, 781,
+ 781, 781, 781, 781, 781, 781, -1, 781,
+ 781, 781, 781, -1, -1, -1, -1, -1,
+ -1, -1, 781, -1, -1, 781, -1, -1,
+ 174, 82, 90, -1, -1, -1, -1, -1,
+ 781, 781, 781, 781, -1, 968, -1, 968,
+ 968, 968, 968, 968, -1, -1, -1, 142,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ -1, 102, 89, 81, 132, 58, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 132, 58, -1, 781, 781, 781, 781,
+ -1, -1, 781, 781, -1, 781, 781, 781,
+ -1, -1, -1, 781, 781, -1, 781, 781,
+ -1, -1, -1, -1, 781, -1, -1, -1,
+ 781, 781, 781, -1, 781, 781, -1, -1,
+ 781, 966, -1, -1, -1, -1, -1, -1,
+ -1, 781, 781, 781, 781, -1, -1, -1,
+ 781, 781, -1, -1, 781, 781, 781, 781,
+ 781, 781, 781, 781, -1, 781, 781, 781,
+ -1, 966, 966, 966, 966, 966, 966, 966,
+ 966, 966, 966, 966, 966, 966, 966, 966,
+ -1, 966, 966, 966, 966, 966, 966, 966,
+ -1, -1, -1, -1, -1, -1, 781, 781,
+ 781, 781, 781, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 781, -1,
+ -1, -1, -1, 781, -1, 805, 805, 805,
+ 805, 805, 805, 805, 805, 805, 805, 805,
+ 805, 805, 805, 805, 805, 805, 805, 805,
+ 805, 805, 805, 805, -1, 805, 805, 805,
+ 805, 805, 805, -1, 805, 805, 805, 805,
+ -1, 805, -1, 805, 805, 805, -1, 805,
+ 805, 805, 805, 805, 805, -1, 805, 805,
+ 805, 805, 805, 805, 805, 805, 805, -1,
+ 805, 805, 805, 805, -1, -1, -1, -1,
+ -1, -1, -1, 805, 967, -1, 805, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 805, 805, 805, 805, -1, -1, 182,
+ 183, 966, -1, 966, 966, 966, 966, 966,
+ -1, -1, -1, -1, 967, 967, 967, 967,
+ 967, 967, 967, 967, 967, 967, 967, 967,
+ 967, 967, 967, -1, 967, 967, 967, 967,
+ 967, 967, 967, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 805, 805, 805,
+ 805, -1, 781, 805, 805, -1, 805, 805,
+ 805, -1, -1, -1, 805, 805, -1, 805,
+ 805, -1, -1, -1, -1, 805, -1, -1,
+ -1, 805, 805, 805, -1, 805, 805, -1,
+ -1, 805, -1, -1, -1, -1, -1, -1,
+ -1, -1, 805, 805, 805, 805, -1, -1,
+ -1, 805, 805, -1, -1, 805, 805, 805,
+ 805, 805, 805, 805, 805, -1, 805, 805,
+ 805, -1, -1, -1, -1, -1, 942, 942,
+ 942, 942, 460, 937, 937, 937, 942, 937,
+ -1, -1, -1, -1, 942, -1, 942, 942,
+ 937, 937, 457, 458, 459, -1, -1, 805,
+ 805, 805, 805, 805, 967, -1, 967, 967,
+ 967, 967, 967, -1, -1, -1, -1, 805,
+ -1, -1, -1, -1, 805, -1, 808, 808,
+ 808, 808, 808, 808, 808, 808, 808, 808,
+ 808, 808, 808, 808, 808, 808, 808, 808,
+ 808, 808, 808, 808, 808, -1, 808, 808,
+ 808, 808, 808, 808, -1, 808, 808, 808,
+ 808, -1, 808, -1, 808, 808, 808, -1,
+ 808, 808, 808, 808, 808, 808, -1, 808,
+ 808, 808, 808, 808, 808, 808, 808, 808,
+ 808, 808, 808, 808, 808, 808, -1, -1,
+ -1, -1, -1, -1, 808, 808, 808, 808,
+ -1, -1, -1, 184, 185, -1, 186, 187,
+ 188, 189, 808, 808, 808, 808, -1, -1,
+ 808, 808, 174, 82, 90, -1, 456, 808,
+ 942, 942, 942, 942, 942, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 808, 808,
+ 808, 808, -1, 805, 808, 808, 808, 808,
+ 808, 808, -1, -1, -1, 808, 808, 808,
+ 808, 808, -1, -1, -1, -1, 808, -1,
+ -1, -1, 808, 808, 808, -1, 808, 808,
+ -1, -1, 808, -1, -1, -1, -1, -1,
+ -1, -1, -1, 808, 808, 808, 808, 808,
+ -1, 808, 808, 808, -1, -1, 808, 808,
+ 808, 808, 808, 808, 808, 808, -1, 808,
+ 808, 808, -1, -1, -1, 808, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 808, 808, -1, -1, 808, -1, -1, -1,
+ -1, 808, -1, -1, -1, -1, 808, -1,
+ 808, 808, 808, 808, 808, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 808, -1, 808, -1, -1, 808, 808, -1,
+ -1, -1, 808, -1, 808, -1, 808, 815,
+ 815, 815, 815, 815, 815, 815, 815, 815,
+ 815, 815, 815, 815, 815, 815, 815, 815,
+ 815, 815, 815, 815, 815, 815, -1, 815,
+ 815, 815, 815, 815, 815, -1, 815, 815,
+ 815, 815, -1, 815, -1, 815, 815, 815,
+ -1, 815, 815, 815, 815, 815, 815, -1,
+ 815, 815, 815, 815, 815, 815, 815, 815,
+ 815, 815, 815, 815, 815, 815, 815, -1,
+ -1, -1, -1, -1, -1, 815, 815, 815,
+ 815, -1, -1, -1, 815, 815, -1, 815,
+ 815, 815, 815, 815, 815, 815, 815, 190,
+ 191, 815, 815, -1, -1, -1, -1, -1,
+ 815, -1, -1, -1, -1, -1, 942, 942,
+ 942, 942, 460, 938, 938, 938, 942, 938,
+ -1, -1, -1, -1, 942, -1, 942, 942,
+ 938, 938, 457, 458, 459, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 808, -1, -1, 815,
+ 815, 815, 815, -1, -1, 815, 815, 815,
+ 815, 815, 815, -1, -1, -1, 815, 815,
+ 815, 815, 815, -1, -1, -1, -1, 815,
+ -1, -1, -1, 815, 815, 815, -1, 815,
+ 815, -1, -1, 815, -1, -1, -1, -1,
+ -1, -1, -1, -1, 815, 815, 815, 815,
+ 815, -1, 815, 815, 815, -1, -1, 815,
+ 815, 815, 815, 815, 815, 815, 815, -1,
+ 815, 815, 815, -1, -1, -1, 815, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 815, 815, -1, -1, 815, -1, -1,
+ -1, -1, 815, -1, -1, -1, -1, 815,
+ -1, 815, 815, 815, 815, 815, 456, -1,
+ 942, 942, 942, 942, 942, -1, -1, -1,
+ -1, 815, -1, 815, -1, -1, 815, 815,
+ -1, -1, -1, 815, -1, 815, -1, 815,
+ 818, 818, 818, 818, 818, 818, 818, 818,
+ 818, 818, 818, 818, 818, 818, 818, 818,
+ 818, 818, 818, 818, 818, 818, 818, -1,
+ 818, 818, 818, 818, 818, 818, -1, 818,
+ 818, 818, 818, -1, 818, -1, 818, 818,
+ 818, -1, 818, 818, 818, 818, 818, 818,
+ -1, 818, 818, 818, 818, 818, 818, 818,
+ 818, 818, 818, 818, 818, 818, 818, 818,
+ -1, 193, -1, -1, -1, -1, 818, 818,
+ 818, 818, 192, -1, -1, 818, 818, -1,
+ 818, 818, 818, 818, 818, 818, 818, 818,
+ 818, 818, 818, 818, -1, -1, -1, -1,
+ 456, 818, -1, -1, -1, -1, -1, 942,
+ 942, 942, 942, 460, 939, 939, 939, 942,
+ 939, -1, -1, -1, -1, 942, -1, 942,
+ 942, 939, 939, 457, 458, 459, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 815, -1, -1,
+ 818, 818, 818, 818, -1, -1, 818, 818,
+ 818, 818, 818, 818, -1, -1, -1, 818,
+ 818, 818, 818, 818, -1, -1, -1, -1,
+ 818, -1, -1, -1, 818, 818, 818, -1,
+ 818, 818, -1, -1, 818, -1, -1, -1,
+ -1, -1, -1, -1, -1, 818, 818, 818,
+ 818, 818, -1, 818, 818, 818, -1, -1,
+ 818, 818, 818, 818, 818, 818, 818, 818,
+ -1, 818, 818, 818, -1, -1, -1, 818,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 818, 818, -1, -1, 818, -1,
+ -1, -1, -1, 818, -1, -1, -1, -1,
+ 818, -1, 818, 818, 818, 818, 818, 456,
+ -1, 942, 942, 942, 942, 942, -1, -1,
+ -1, -1, 818, -1, 818, -1, -1, 818,
+ 818, -1, -1, -1, 818, -1, 818, -1,
+ 818, 821, 821, 821, 821, 821, 821, 821,
+ 821, 821, 821, 821, 821, 821, 821, 821,
+ 821, 821, 821, 821, 821, 821, 821, 821,
+ -1, 821, 821, 821, 821, 821, 821, -1,
+ 821, 821, 821, 821, -1, 821, -1, 821,
+ 821, 821, -1, 821, 821, 821, 821, 821,
+ 821, -1, 821, 821, 821, 821, 821, 821,
+ 821, 821, 821, 821, 821, 821, 821, 821,
+ 821, -1, 821, -1, -1, -1, -1, 821,
+ 821, 821, 821, 821, 465, -1, 821, 821,
+ -1, 821, 821, 821, 821, 821, 821, 821,
+ 821, 821, 821, 821, 821, -1, -1, -1,
+ -1, -1, 821, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 944, 944, 944, 944,
+ 944, 944, 944, 944, 944, 944, 461, 462,
+ 464, 463, 944, -1, 944, 944, 944, 944,
+ 944, 944, 944, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 818, -1,
+ -1, 821, 821, 821, 821, -1, -1, 821,
+ 821, 821, 821, 821, 821, -1, -1, -1,
+ 821, 821, 821, 821, 821, -1, -1, -1,
+ -1, 821, -1, -1, -1, 821, 821, 821,
+ -1, 821, 821, -1, -1, 821, -1, -1,
+ -1, -1, -1, -1, -1, -1, 821, 821,
+ 821, 821, 821, -1, 821, 821, 821, -1,
+ -1, 821, 821, 821, 821, 821, 821, 821,
+ 821, -1, 821, 821, 821, -1, -1, -1,
+ 821, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 821, 821, -1, -1, 821,
+ -1, -1, -1, -1, 821, -1, -1, -1,
+ -1, 821, -1, 821, 821, 821, 821, 821,
+ 456, -1, -1, -1, 944, -1, 944, 944,
+ 944, 944, 944, 821, -1, 821, -1, -1,
+ 821, 821, -1, -1, -1, 821, -1, 821,
+ -1, 821, 826, 826, 826, 826, 826, 826,
+ 826, 826, 826, 826, 826, 826, 826, 826,
+ 826, 826, 826, 826, 826, 826, 826, 826,
+ 826, -1, 826, 826, 826, 826, 826, 826,
+ -1, 826, 826, 826, 826, -1, 826, -1,
+ 826, 826, 826, -1, 826, 826, 826, 826,
+ 826, 826, -1, 826, 826, 826, 826, 826,
+ 826, 826, 826, 826, 826, 826, 826, 826,
+ 826, 826, -1, 826, -1, -1, -1, -1,
+ 826, 826, 826, 826, 826, 465, -1, 826,
+ 826, -1, 826, 826, 826, 826, 826, 826,
+ 826, 826, 826, 826, 826, 826, -1, -1,
+ -1, -1, -1, 826, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 945, 945, 945,
+ 945, 945, 945, 945, 945, 945, 945, 461,
+ 462, 464, 463, 945, -1, 945, 945, 945,
+ 945, 945, 945, 945, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 821,
+ -1, -1, 826, 826, 826, 826, -1, -1,
+ 826, 826, 826, 826, 826, 826, -1, -1,
+ -1, 826, 826, 826, 826, 826, -1, -1,
+ -1, -1, 826, -1, -1, -1, 826, 826,
+ 826, -1, 826, 826, -1, -1, 826, -1,
+ -1, -1, -1, -1, -1, -1, -1, 826,
+ 826, 826, 826, 826, -1, 826, 826, 826,
+ -1, -1, 826, 826, 826, 826, 826, 826,
+ 826, 826, -1, 826, 826, 826, -1, -1,
+ -1, 826, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 826, 826, -1, -1,
+ 826, -1, -1, -1, -1, 826, -1, -1,
+ -1, -1, 826, -1, 826, 826, 826, 826,
+ 826, 456, -1, -1, -1, 945, -1, 945,
+ 945, 945, 945, 945, 826, -1, 826, -1,
+ -1, 826, 826, -1, -1, -1, 826, -1,
+ 826, -1, 826, 830, 830, 830, 830, 830,
+ 830, 830, 830, 830, 830, 830, 830, 830,
+ 830, 830, 830, 830, 830, 830, 830, 830,
+ 830, 830, -1, 830, 830, 830, 830, 830,
+ 830, -1, 830, 830, 830, 830, -1, 830,
+ -1, 830, 830, 830, -1, 830, 830, 830,
+ 830, 830, 830, -1, 830, 830, 830, 830,
+ 830, 830, 830, 830, 830, 830, 830, 830,
+ 830, 830, 830, -1, 830, -1, -1, -1,
+ -1, 830, 830, 830, 830, 830, 465, -1,
+ 830, 830, -1, 830, 830, 830, 830, 830,
+ 830, 830, 830, 830, 830, 830, 830, -1,
+ -1, -1, -1, -1, 830, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 946, 946,
+ 946, 946, 946, 946, 946, 946, 946, 946,
+ 461, 462, 464, 463, 946, -1, 946, 946,
+ 946, 946, 946, 946, 946, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 826, -1, -1, 830, 830, 830, 830, -1,
+ -1, 830, 830, 830, 830, 830, 830, -1,
+ -1, -1, 830, 830, 830, 830, 830, -1,
+ -1, -1, -1, 830, -1, -1, -1, 830,
+ 830, 830, -1, 830, 830, -1, -1, 830,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 830, 830, 830, 830, 830, -1, 830, 830,
+ 830, -1, -1, 830, 830, 830, 830, 830,
+ 830, 830, 830, -1, 830, 830, 830, -1,
+ -1, -1, 830, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 830, 830, -1,
+ -1, 830, -1, -1, -1, -1, 830, -1,
+ -1, -1, -1, 830, -1, 830, 830, 830,
+ 830, 830, -1, -1, -1, -1, 946, -1,
+ 946, 946, 946, 946, 946, 830, -1, 830,
+ -1, -1, 830, 830, -1, -1, -1, 830,
+ -1, 830, -1, 830, 833, 833, 833, 833,
+ 833, 833, 833, 833, 833, 833, 833, 833,
+ 833, 833, 833, 833, 833, 833, 833, 833,
+ 833, 833, 833, -1, 833, 833, 833, 833,
+ 833, 833, -1, 833, 833, 833, 833, -1,
+ 833, -1, 833, 833, 833, -1, 833, 833,
+ 833, 833, 833, 833, -1, 833, 833, 833,
+ 833, 833, 833, 833, 833, 833, 833, 833,
+ 833, 833, 833, 833, -1, 833, -1, -1,
+ -1, -1, 833, 833, 833, 833, 833, 465,
+ -1, 833, 833, -1, 833, 833, 833, 833,
+ 833, 833, 833, 833, 833, 833, 833, 833,
+ -1, -1, -1, -1, -1, 833, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 943,
+ 943, 943, 943, 943, 943, 943, 943, 943,
+ 943, 461, 462, 464, 463, 943, -1, 943,
+ 943, 943, 943, 943, 943, 943, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 830, -1, -1, 833, 833, 833, 833,
+ -1, -1, 833, 833, 833, 833, 833, 833,
+ -1, -1, -1, 833, 833, 833, 833, 833,
+ -1, -1, -1, -1, 833, -1, -1, -1,
+ 833, 833, 833, -1, 833, 833, -1, -1,
+ 833, -1, -1, -1, -1, -1, -1, -1,
+ -1, 833, 833, 833, 833, 833, -1, 833,
+ 833, 833, -1, -1, 833, 833, 833, 833,
+ 833, 833, 833, 833, -1, 833, 833, 833,
+ -1, -1, -1, 833, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 833, 833,
+ -1, -1, 833, -1, -1, -1, -1, 833,
+ -1, -1, -1, -1, 833, -1, 833, 833,
+ 833, 833, 833, -1, -1, -1, -1, 943,
+ -1, 943, 943, 943, 943, 943, 833, -1,
+ 833, -1, -1, 833, 833, -1, -1, -1,
+ 833, -1, 833, -1, 833, 834, 834, 834,
+ 834, 834, 834, 834, 834, 834, 834, 834,
+ 834, 834, 834, 834, 834, 834, 834, 834,
+ 834, 834, 834, 834, -1, 834, 834, 834,
+ 834, 834, 834, -1, 834, 834, 834, 834,
+ -1, 834, -1, 834, 834, 834, -1, 834,
+ 834, 834, 834, 834, 834, -1, 834, 834,
+ 834, 834, 834, 834, 834, 834, 834, 834,
+ 834, 834, 834, 834, 834, -1, 834, -1,
+ -1, -1, -1, 834, 834, 834, 834, 834,
+ 965, -1, 834, 834, -1, 834, 834, 834,
+ 834, 834, 834, 834, 834, 834, 834, 834,
+ 834, -1, -1, -1, -1, -1, 834, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 965, 965, 965, 965, 965, 965, 965, 965,
+ 965, 965, 965, 965, 965, 965, 965, -1,
+ 965, 965, 965, 965, 965, 965, 965, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 833, -1, -1, 834, 834, 834,
+ 834, -1, -1, 834, 834, 834, 834, 834,
+ 834, -1, -1, -1, 834, 834, 834, 834,
+ 834, -1, -1, -1, -1, 834, -1, -1,
+ -1, 834, 834, 834, -1, 834, 834, -1,
+ -1, 834, -1, -1, -1, -1, -1, -1,
+ -1, -1, 834, 834, 834, 834, 834, -1,
+ 834, 834, 834, -1, -1, 834, 834, 834,
+ 834, 834, 834, 834, 834, -1, 834, 834,
+ 834, -1, -1, -1, 834, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 834,
+ 834, -1, -1, 834, -1, -1, -1, -1,
+ 834, -1, -1, -1, -1, 834, -1, 834,
+ 834, 834, 834, 834, -1, -1, -1, -1,
+ 965, -1, 965, 965, 965, 965, 965, 834,
+ -1, 834, -1, -1, 834, 834, -1, -1,
+ -1, 834, -1, 834, -1, 834, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, -1, 835, 835,
+ 835, 835, 835, 835, -1, 835, 835, 835,
+ 835, -1, 835, -1, 835, 835, 835, -1,
+ 835, 835, 835, 835, 835, 835, -1, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, -1, 835,
+ -1, -1, -1, -1, 835, 835, 835, 835,
+ 835, 959, -1, 835, 835, -1, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 835,
+ 835, 835, -1, -1, -1, -1, -1, 835,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 959, 959, 959, 959, 959, 959, 959,
+ 959, 959, 959, 959, 959, 959, 959, 959,
+ -1, 959, 959, 959, 959, 959, 959, 959,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 834, -1, -1, 835, 835,
+ 835, 835, -1, -1, 835, 835, 835, 835,
+ 835, 835, -1, -1, -1, 835, 835, 835,
+ 835, 835, -1, -1, -1, -1, 835, -1,
+ -1, -1, 835, 835, 835, -1, 835, 835,
+ -1, -1, 835, -1, -1, -1, -1, -1,
+ -1, -1, -1, 835, 835, 835, 835, 835,
+ -1, 835, 835, 835, -1, -1, 835, 835,
+ 835, 835, 835, 835, 835, 835, -1, 835,
+ 835, 835, -1, -1, -1, 835, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 835, 835, -1, -1, 835, -1, -1, -1,
+ -1, 835, -1, -1, -1, -1, 835, -1,
+ 835, 835, 835, 835, 835, -1, -1, -1,
+ -1, 959, -1, 959, 959, 959, 959, 959,
+ 835, -1, 835, -1, -1, 835, 835, -1,
+ -1, -1, 835, -1, 835, -1, 835, 77,
+ 78, 79, 80, -1, 76, -1, -1, -1,
+ -1, -1, -1, -1, -1, 100, 96, 98,
+ 94, 92, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 87, -1, -1, -1, 88,
+ 85, 84, 86, -1, -1, -1, 72, 73,
+ 74, -1, -1, -1, -1, 1006, 71, -1,
+ 104, 106, 108, 110, -1, -1, -1, -1,
+ -1, -1, -1, 75, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 66, 67, 68, 69, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 842, 842, 842, 842,
+ 842, 842, 842, 842, 842, 842, 842, 842,
+ 842, 842, 842, 842, 842, 842, 842, 842,
+ 842, 842, 842, -1, 842, 842, 842, 842,
+ 842, 842, -1, 842, 842, 842, 842, -1,
+ 842, -1, 842, 842, 842, -1, 842, 842,
+ 842, 842, 842, 842, 835, 842, 842, 842,
+ 842, 842, 842, 842, 842, 842, 842, 842,
+ 842, 842, 842, 842, -1, 842, -1, -1,
+ -1, -1, 842, 842, 842, 842, 842, -1,
+ -1, 842, 842, -1, 842, 842, 842, 842,
+ 842, 842, 842, 842, 842, 842, 842, 842,
+ -1, -1, -1, -1, -1, 842, -1, -1,
+ 170, 62, 63, 64, 65, -1, 70, 82,
+ 90, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 102,
+ 89, 81, 132, 58, 842, 842, 842, 842,
+ -1, -1, 842, 842, 842, 842, 842, 842,
+ -1, -1, -1, 842, 842, 842, 842, 842,
+ -1, -1, -1, -1, 842, -1, -1, -1,
+ 842, 842, 842, -1, 842, 842, -1, -1,
+ 842, -1, -1, -1, -1, -1, -1, -1,
+ -1, 842, 842, 842, 842, 842, -1, 842,
+ 842, 842, -1, -1, 842, 842, 842, 842,
+ 842, 842, 842, 842, -1, 842, 842, 842,
+ -1, -1, -1, 842, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 842, 842,
+ -1, -1, 842, -1, -1, -1, -1, 842,
+ -1, -1, -1, -1, 842, -1, 842, 842,
+ 842, 842, 842, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 842, -1,
+ 842, -1, -1, 842, 842, -1, -1, -1,
+ 842, -1, 842, -1, 842, 77, 78, 79,
+ 80, -1, 76, -1, -1, -1, -1, -1,
+ -1, -1, -1, 100, 96, 98, 94, 92,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 87, 961, -1, -1, 88, 85, 84,
+ 86, -1, -1, -1, 72, 73, 74, -1,
+ -1, -1, -1, 1006, 71, -1, 104, 106,
+ 108, 110, -1, -1, -1, -1, -1, -1,
+ -1, 75, 961, 961, 961, 961, 961, 961,
+ 961, 961, 961, 961, 961, 961, 961, 961,
+ 961, 961, 961, 961, 961, 961, 961, 961,
+ 961, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 931, 931, 931, 931, 931, 931,
+ 931, 931, 931, 931, 931, 931, 931, 931,
+ 931, 931, 931, 931, 931, 931, 931, 931,
+ 931, -1, 931, 931, 931, 931, 931, 931,
+ -1, 931, 931, 931, 931, -1, 931, -1,
+ 931, 931, 931, -1, 931, 931, 931, 931,
+ 931, 931, 842, 931, 931, 931, 931, 931,
+ 931, 931, 931, 931, 931, 931, 931, 931,
+ 931, 931, -1, 931, -1, -1, -1, -1,
+ 931, 931, 931, 931, 931, -1, -1, 931,
+ 931, -1, 931, 931, 931, 931, 931, 931,
+ 931, 931, 931, 931, 931, 931, -1, -1,
+ -1, -1, -1, 931, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, 82, 90, -1,
+ -1, -1, 961, -1, 961, 961, 961, 961,
+ 961, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 102, 89, 81,
+ 132, 58, 931, 931, 931, 931, -1, -1,
+ 931, 931, 931, 931, 931, 931, -1, -1,
+ -1, 931, 931, 931, 931, 931, -1, -1,
+ -1, -1, 931, -1, -1, -1, 931, 931,
+ 931, -1, 931, 931, -1, -1, 931, -1,
+ -1, -1, -1, -1, -1, -1, -1, 931,
+ 931, 931, 931, 931, -1, 931, 931, 931,
+ -1, -1, 931, 931, 931, 931, 931, 931,
+ 931, 931, -1, 931, 931, 931, -1, -1,
+ -1, 931, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 931, 931, -1, -1,
+ 931, -1, -1, -1, -1, 931, -1, -1,
+ -1, -1, 931, -1, 931, 931, 931, 931,
+ 931, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 962, 931, -1, 931, -1,
+ -1, 931, 931, -1, -1, -1, 931, -1,
+ 931, -1, 931, -1, -1, -1, -1, -1,
+ -1, -1, 170, 62, 63, 64, 65, -1,
+ 70, 82, 90, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, 962, 962, 962, 962, 962, 962,
+ 962, 962, -1, -1, -1, -1, -1, -1,
+ -1, 102, 89, 81, 132, 58, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 930, 930, 930, 930, 930, 930, 930,
+ 930, 930, 930, 930, 930, 930, 930, 930,
+ 930, 930, 930, 930, 930, 930, 930, 930,
+ -1, 930, 930, 930, 930, 930, 930, -1,
+ 930, 930, 930, 930, -1, 930, -1, 930,
+ 930, 930, -1, 930, 930, 930, 930, 930,
+ 930, -1, 930, 930, 930, 930, 930, 930,
+ 930, 930, 930, 930, 105, 107, 109, 111,
+ 930, -1, 930, -1, -1, -1, -1, 930,
+ 930, 930, 930, 930, 952, -1, 930, 930,
+ 931, 930, 930, 930, 930, 930, 930, 930,
+ 930, 930, 930, 930, 930, -1, -1, -1,
+ -1, -1, 930, 962, -1, 962, 962, 962,
+ 962, 962, -1, -1, 952, 952, 952, 952,
+ 952, 952, 952, 952, 952, 952, 952, 952,
+ 952, 952, 952, -1, 952, 952, 952, 952,
+ 952, 952, 952, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 930, 930, 930, 930, -1, -1, 930,
+ 930, 930, 930, 930, 930, -1, -1, -1,
+ 930, 930, 930, 930, 930, -1, -1, -1,
+ -1, 930, -1, -1, -1, 930, 930, 930,
+ -1, 930, 930, -1, -1, 930, -1, -1,
+ -1, -1, -1, -1, -1, -1, 930, 930,
+ 930, 930, 930, -1, 930, 930, 930, -1,
+ -1, 930, 930, 930, 930, 930, 930, 930,
+ 930, -1, 930, 930, 930, -1, -1, -1,
+ 930, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 930, 930, -1, -1, 930,
+ -1, -1, -1, -1, 930, -1, -1, -1,
+ -1, 930, -1, 103, 197, 930, 930, 930,
+ -1, -1, -1, -1, 952, -1, 952, 952,
+ 952, 952, 952, 930, -1, 930, -1, -1,
+ 930, 930, -1, -1, -1, 930, -1, 930,
+ -1, 930, -1, -1, -1, -1, -1, -1,
+ -1, -1, 890, 890, 890, 890, -1, 890,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 890, 890, 890, 890, 890, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 890, -1,
+ -1, -1, 890, 890, 890, 890, 144, 82,
+ 90, 890, 890, 890, -1, -1, -1, -1,
+ 890, 890, -1, 1004, 1004, 1004, 890, 1003,
+ -1, -1, -1, -1, -1, -1, 890, -1,
+ -1, -1, -1, -1, -1, -1, -1, 102,
+ 89, 81, 132, 58, 890, 890, 890, 890,
+ 77, 78, 79, 80, -1, 76, -1, -1,
+ -1, -1, -1, -1, -1, -1, 100, 96,
+ 98, 94, 92, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 87, -1, -1, -1,
+ 88, 85, 84, 86, -1, -1, -1, 72,
+ 73, 74, -1, -1, -1, -1, 1006, 71,
+ -1, 104, 106, 108, 110, -1, -1, 930,
+ -1, -1, -1, -1, 75, 788, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 66, 67, 68, 69, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 890, 890, 890, 890, 890,
+ -1, 890, 890, 890, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 168, 169, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 167, -1, 890, 890, 890, 890, 890, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 208,
+ 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 209, 62, 63, 64, 65, -1, 70,
+ 82, 90, -1, -1, -1, -1, -1, -1,
+ -1, 77, 78, 79, 80, -1, 76, -1,
+ -1, -1, -1, -1, -1, -1, -1, 100,
+ 96, 98, 94, 92, -1, -1, -1, -1,
+ 102, 89, 81, 132, 58, 87, -1, -1,
+ -1, 88, 85, 84, 86, -1, -1, -1,
+ 72, 73, 74, -1, -1, -1, -1, 1006,
+ 71, -1, 104, 106, 108, 110, -1, 77,
+ 78, 79, 80, -1, 76, 75, 788, -1,
+ -1, -1, -1, -1, -1, 100, 96, 98,
+ 94, 92, -1, 66, 67, 68, 69, -1,
+ -1, -1, -1, 87, -1, -1, -1, 88,
+ 85, 84, 86, -1, -1, -1, 72, 73,
+ 74, -1, -1, -1, -1, 1006, 71, -1,
+ 104, 106, 108, 110, -1, -1, -1, -1,
+ -1, -1, -1, 75, 788, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 66, 67, 68, 69, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 210, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 209, 62, 63, 64, 65, -1,
+ 70, 82, 90, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 102, 196, -1,
+ -1, 77, 78, 79, 80, -1, 76, -1,
+ -1, 102, 89, 81, 132, 58, 211, 100,
+ 96, 98, 94, 92, -1, -1, -1, -1,
+ 209, 62, 63, 64, 65, 87, 70, 82,
+ 90, 88, 85, 84, 86, -1, -1, -1,
+ 72, 73, 74, -1, -1, -1, -1, 1006,
+ 71, -1, 104, 106, 108, 110, -1, -1,
+ -1, -1, -1, -1, -1, 75, 788, 102,
+ 89, 81, 132, 58, -1, -1, -1, -1,
+ -1, -1, -1, 66, 67, 68, 69, -1,
+ 48, 49, 50, 51, 77, 78, 79, 80,
+ -1, 76, -1, 34, 35, 38, 36, -1,
+ -1, -1, 100, 96, 98, 94, 92, -1,
+ -1, -1, 39, 40, 41, -1, -1, -1,
+ 87, -1, -1, -1, 88, 85, 84, 86,
+ -1, -1, -1, 72, 73, 74, -1, -1,
+ -1, -1, 56, 71, -1, 104, 106, 108,
+ 110, -1, -1, -1, -1, -1, -1, -1,
+ 75, -1, 259, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 66, 67,
+ 68, 69, -1, -1, 182, 183, -1, -1,
+ -1, -1, -1, 890, 890, 890, 890, -1,
+ 890, -1, -1, -1, -1, -1, -1, -1,
+ 212, 890, 890, 890, 890, 890, -1, -1,
+ -1, -1, 209, 62, 63, 64, 65, 890,
+ 70, 82, 90, 890, 890, 890, 890, -1,
+ -1, -1, 890, 890, 890, -1, -1, -1,
+ -1, 890, 890, -1, 1004, 1004, 1004, 890,
+ 999, -1, -1, -1, -1, -1, -1, 890,
+ -1, 102, 89, 81, 132, 58, -1, -1,
+ -1, -1, -1, -1, -1, 890, 890, 890,
+ 890, -1, -1, -1, 168, 169, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 260,
+ -1, -1, 167, -1, -1, 258, -1, -1,
+ -1, -1, 33, 31, 32, 52, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 208, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 209, 62, 63, 64, 65,
+ -1, 70, 82, 90, 102, 89, 81, 37,
+ 58, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 102, 89, 81, 132, 58, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 890, 890, 890, 890,
+ 890, -1, 890, 890, 890, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 396, 397, -1, -1, -1,
+ -1, -1, -1, -1, 395, -1, -1, -1,
+ -1, -1, -1, 890, 890, 890, 890, 890,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 394,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 890, 890, 890, 890,
+ -1, 890, -1, -1, -1, -1, -1, -1,
+ -1, -1, 890, 890, 890, 890, 890, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 890, -1, -1, -1, 890, 890, 890, 890,
+ -1, -1, -1, 890, 890, 890, -1, -1,
+ -1, -1, 890, 890, -1, 1004, 1004, 1004,
+ 890, -1, 210, -1, -1, -1, -1, -1,
+ 890, -1, -1, -1, 209, 62, 63, 64,
+ 65, -1, 70, 82, 90, -1, 890, 890,
+ 890, 890, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1003, -1, -1, -1, -1,
+ -1, -1, -1, 953, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ 211, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 209, 62, 63, 64, 65, -1,
+ 70, 82, 90, 953, 953, 953, 953, 953,
+ 953, 953, 953, 953, 953, 953, 953, 953,
+ 953, 953, -1, 953, 953, 953, 953, 953,
+ 953, 953, -1, -1, -1, -1, -1, -1,
+ -1, 102, 89, 81, 132, 58, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 890, 890, 890,
+ 890, 890, -1, 890, 890, 890, -1, -1,
+ -1, 954, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 168, 169, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 167, -1, 890, 890, 890, 890,
+ 890, 954, 954, 954, 954, 954, 954, 954,
+ 954, 954, 954, 954, 954, 954, 954, 954,
+ -1, 954, 954, 954, 954, 954, 954, 954,
+ -1, -1, 300, -1, -1, -1, -1, -1,
+ -1, -1, -1, 953, -1, 953, 953, 953,
+ 953, 953, 212, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 209, 62, 63, 64,
+ 65, -1, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 260, -1, -1, -1, -1, -1, 258,
+ -1, -1, -1, -1, 33, 31, 32, 52,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ -1, 954, -1, 954, 954, 954, 954, 954,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 37, 58, 832, 832, 832, 832, 832,
+ 832, 832, 832, 832, 832, 832, 832, 832,
+ 832, 832, 832, 832, 832, 832, 832, 832,
+ 832, 832, -1, 832, 832, 832, 832, 832,
+ 832, -1, 832, 832, 832, 832, -1, 832,
+ -1, 832, 832, 832, -1, 832, 832, 832,
+ 832, 832, 832, -1, 832, 832, 832, 832,
+ 832, 832, 832, 832, 832, 832, 832, 832,
+ 832, 832, 832, -1, 832, 396, 397, -1,
+ -1, 199, 832, 832, 832, 832, 395, -1,
+ 832, 832, -1, 832, 832, 832, 832, 832,
+ 832, 832, 832, 832, 832, 832, 832, -1,
+ -1, -1, -1, -1, 832, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 394, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 832, 832, 832, 832, -1,
+ -1, 832, 832, 832, 832, 832, 832, -1,
+ -1, -1, 832, 832, 832, 832, 832, -1,
+ -1, -1, -1, 832, -1, -1, -1, 832,
+ 832, 832, -1, 832, 832, -1, -1, 832,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 832, 832, 832, 832, 832, -1, 832, 832,
+ 832, -1, -1, 832, 832, 832, 832, 832,
+ 832, 832, 832, -1, 832, 832, 832, -1,
+ -1, -1, 832, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 832, 832, -1,
+ -1, 832, -1, -1, -1, -1, 832, -1,
+ -1, -1, -1, 832, -1, 832, 832, 832,
+ 832, 832, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 832, -1, 832,
+ -1, -1, 832, 832, -1, -1, -1, 832,
+ -1, 832, -1, 832, 778, 778, 778, 778,
+ 778, 778, 778, 778, 778, 778, 778, 778,
+ 778, 778, 778, 778, 778, 778, 778, 778,
+ 778, 778, 778, -1, 778, 778, 778, 778,
+ 778, 778, -1, 778, 778, 778, 778, -1,
+ 778, -1, 778, 778, 778, -1, 778, 778,
+ 778, 778, 778, 778, -1, 778, 778, 778,
+ 778, 778, 778, 778, 778, 778, 955, 778,
+ 778, 778, 778, -1, -1, -1, -1, -1,
+ -1, -1, 778, -1, -1, 778, 168, 169,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 778, 778, 778, 778, 167, -1, 955, 955,
+ 955, 955, 955, 955, 955, 955, 955, 955,
+ 955, 955, 955, 955, 955, -1, 955, 955,
+ 955, 955, 955, 955, 955, -1, -1, -1,
+ -1, -1, -1, -1, 300, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 832, -1, -1, 778, 778, 778, 778,
+ -1, -1, 778, 778, -1, 778, 778, 778,
+ -1, -1, -1, 778, 778, -1, 778, 778,
+ -1, -1, -1, -1, 778, -1, -1, -1,
+ 778, 778, 778, -1, 778, 778, -1, -1,
+ 778, -1, -1, -1, -1, -1, -1, -1,
+ -1, 778, 778, 778, 778, -1, -1, -1,
+ 778, 778, -1, -1, 778, 778, 778, 778,
+ 778, 778, 778, 778, -1, 778, 778, 778,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 955, -1,
+ 955, 955, 955, 955, 955, -1, 778, 778,
+ 778, 778, 778, -1, 48, 49, 50, 51,
+ 77, 78, 79, 80, -1, 76, 778, 34,
+ 35, 38, 36, 778, -1, -1, 100, 96,
+ 98, 94, 92, -1, -1, -1, 39, 40,
+ 41, -1, -1, -1, 87, -1, -1, -1,
+ 88, 85, 84, 86, -1, -1, -1, 72,
+ 73, 74, -1, -1, -1, -1, 56, 71,
+ -1, 104, 106, 108, 110, -1, -1, -1,
+ -1, -1, -1, -1, 75, -1, 259, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 66, 67, 68, 69, -1, -1,
+ 182, 183, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 799, 799, 799, 799, 799, 799, 799, 799,
+ 799, 799, 799, 799, 799, 799, -1, 799,
+ 799, 799, 799, 799, 799, -1, -1, -1,
+ 799, 799, 799, 799, 799, 799, -1, 799,
+ 799, 799, 799, -1, 799, -1, 799, 799,
+ 799, -1, 799, 799, 799, 799, 799, 799,
+ -1, 799, 799, 799, 799, 799, 799, 799,
+ 799, 799, -1, 799, 799, 799, 799, -1,
+ -1, -1, 778, -1, -1, -1, 799, -1,
+ -1, -1, -1, -1, 181, -1, -1, -1,
+ -1, -1, -1, 260, 799, 799, 799, 799,
+ -1, 261, -1, -1, -1, -1, 33, 31,
+ 32, 52, 62, 63, 64, 65, -1, 70,
+ 82, 90, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 102, 89, 81, 37, 58, -1, -1, -1,
+ 799, 799, 799, 799, -1, -1, 799, 799,
+ 799, 799, 799, 799, -1, -1, -1, 799,
+ 799, 799, 799, 799, -1, -1, -1, -1,
+ 799, -1, -1, -1, 799, 799, 799, -1,
+ 799, 799, -1, -1, 799, -1, -1, -1,
+ -1, -1, -1, -1, -1, 799, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 268,
+ 799, 799, 799, 799, 799, 799, 799, 799,
+ -1, 799, 799, 799, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 799, 799, 799, 799, 799, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 799, -1, 799, -1, 779, 779,
+ 779, 779, 779, 779, 779, 779, 779, 779,
+ 779, 779, 779, 779, 779, 779, 779, 779,
+ 779, 779, 779, 779, 779, -1, 779, 779,
+ 779, 779, 779, 779, -1, 779, 779, 779,
+ 779, -1, 779, -1, 779, 779, 779, -1,
+ 779, 779, 779, 779, 779, 779, -1, 779,
+ 779, 779, 779, 779, 779, 779, 779, 779,
+ -1, 779, 779, 779, 779, -1, -1, -1,
+ -1, -1, -1, -1, 779, -1, -1, 779,
+ -1, 678, 678, 678, 678, 678, 678, -1,
+ -1, -1, 779, 779, 779, 779, -1, -1,
+ 182, 183, -1, -1, -1, -1, -1, -1,
+ -1, 678, 678, 678, 678, 678, 678, -1,
+ 678, -1, -1, -1, -1, -1, -1, -1,
+ 678, -1, -1, -1, -1, -1, -1, 678,
+ 678, -1, -1, -1, -1, 678, 678, 678,
+ -1, 678, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 779, 779,
+ 779, 779, -1, -1, 779, 779, 799, 779,
+ 779, 779, -1, -1, -1, 779, 779, -1,
+ 779, 779, -1, -1, -1, -1, 779, -1,
+ -1, -1, 779, 779, 779, -1, 779, 779,
+ -1, -1, 779, -1, -1, -1, -1, -1,
+ -1, -1, -1, 779, 779, 779, 779, -1,
+ -1, -1, 779, 779, -1, -1, 779, 779,
+ 779, 779, 779, 779, 779, 779, -1, 779,
+ 779, 779, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 678, 678, -1, -1, 678,
+ -1, 678, 678, -1, 678, -1, -1, -1,
+ 678, 678, 678, 678, 678, -1, -1, -1,
+ 779, 779, 779, 779, 779, 678, 678, 678,
+ -1, 678, 678, -1, -1, 678, -1, -1,
+ 779, -1, -1, -1, -1, 779, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 678, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 678, 678, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 678, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 260, -1, -1,
+ -1, -1, -1, 261, -1, -1, -1, -1,
+ 33, 31, 32, 52, 62, 63, 64, 65,
+ -1, 70, 82, 90, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 779, -1, -1, -1,
+ -1, -1, 102, 89, 81, 37, 58, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ -1, 847, 847, 847, 847, 847, 847, -1,
+ 847, 847, 847, 847, -1, 847, -1, 847,
+ 847, 847, -1, 847, 847, 847, 847, 847,
+ 847, 268, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847,
+ 847, -1, 847, -1, -1, -1, -1, 847,
+ 847, 847, 847, 847, -1, -1, 847, 847,
+ -1, 847, 847, 847, 847, 847, 847, 847,
+ 847, 847, 847, 847, 847, -1, -1, -1,
+ -1, -1, 847, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 847, 847, 847, 847, -1, -1, 847,
+ 847, 847, 847, 847, 847, -1, -1, -1,
+ 847, 847, 847, 847, 847, -1, -1, -1,
+ -1, 847, -1, -1, -1, 847, 847, 847,
+ -1, 847, 847, -1, -1, 847, -1, -1,
+ -1, -1, -1, -1, -1, -1, 847, 847,
+ 847, 847, 847, -1, 847, 847, 847, -1,
+ -1, 847, 847, 847, 847, 847, 847, 847,
+ 847, -1, 847, 847, 847, -1, -1, -1,
+ 847, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 847, 847, -1, -1, 847,
+ -1, -1, -1, -1, 847, -1, -1, -1,
+ -1, 847, -1, 847, 847, 847, 847, 847,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 847, -1, 847, -1, -1,
+ 847, 847, -1, -1, -1, 847, -1, 847,
+ -1, 847, 48, 49, 50, 51, 77, 78,
+ 79, 80, 985, 76, -1, 34, 35, 38,
+ 36, -1, -1, -1, 100, 96, 98, 94,
+ 92, -1, -1, -1, 39, 40, 41, -1,
+ -1, -1, 87, -1, -1, -1, 88, 85,
+ 84, 86, -1, -1, -1, 72, 73, 74,
+ -1, -1, -1, -1, 56, 71, -1, 104,
+ 106, 108, 110, -1, -1, -1, -1, -1,
+ -1, -1, 75, -1, -1, 985, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 66, 67, 68, 69, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 799, 799,
+ 799, 799, 799, 799, 799, 799, 799, 799,
+ 799, 799, 799, 799, -1, 799, 799, 799,
+ 799, 799, 799, -1, -1, -1, 799, 799,
+ 799, 799, 799, 799, -1, 799, 799, 799,
+ 799, -1, 799, -1, 799, 799, 799, 847,
+ 799, 799, 799, 799, 799, 799, -1, 799,
+ 799, 799, 799, 799, 799, 799, 799, 799,
+ -1, 799, 799, 799, 799, -1, -1, -1,
+ -1, -1, -1, -1, 799, -1, -1, -1,
+ -1, -1, 181, -1, -1, -1, -1, -1,
+ -1, 272, 799, 799, 799, 799, -1, -1,
+ 985, 985, 270, -1, 33, 31, 32, 52,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 37, 58, -1, -1, -1, 799, 799,
+ 799, 799, -1, -1, 799, 799, -1, 799,
+ 799, 799, -1, 271, -1, 799, 799, -1,
+ 799, 799, -1, -1, -1, -1, 799, -1,
+ -1, -1, 799, 799, 799, -1, 799, 799,
+ -1, -1, 799, -1, -1, -1, -1, -1,
+ -1, -1, -1, 799, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 273, 799, 799,
+ 799, 799, 799, 799, 799, 799, -1, 799,
+ 799, 799, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 77, 78, 79, 80,
+ -1, 76, -1, -1, -1, -1, -1, -1,
+ -1, -1, 100, 96, 98, 94, 92, -1,
+ 799, 799, 799, 799, 799, -1, -1, -1,
+ 87, -1, -1, -1, 88, 85, 84, 86,
+ 799, -1, -1, 72, 73, 74, -1, -1,
+ -1, -1, 1006, 71, -1, 104, 106, 108,
+ 110, -1, 77, 78, 79, 80, -1, 76,
+ 75, 788, -1, -1, -1, -1, -1, -1,
+ 100, 96, 98, 94, 92, -1, 66, 67,
+ 68, 69, -1, -1, -1, -1, 87, -1,
+ -1, -1, 88, 85, 84, 86, -1, -1,
+ -1, 72, 73, 74, -1, -1, -1, -1,
+ 1006, 71, -1, 104, 106, 108, 110, -1,
+ -1, -1, -1, -1, -1, -1, 75, 788,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 66, 67, 68, 69,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 275, -1, -1, -1, -1,
+ -1, -1, -1, -1, 799, 209, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 132,
+ 58, 276, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 209, 62, 63, 64, 65,
+ -1, 70, 82, 90, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 102, 89, 81, 132, 58, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 733, 733, 733, 733, 733, 733, 733, 733,
+ 733, 733, 733, 733, 733, 733, -1, 733,
+ 733, 733, 733, 733, 733, -1, -1, -1,
+ 733, 733, 733, 733, 733, 733, -1, 733,
+ 733, 733, 733, -1, 733, -1, 733, 733,
+ 733, -1, 733, 733, 733, 733, 733, 733,
+ 154, 733, 733, 733, 733, 733, 733, 733,
+ 733, 733, 738, 733, 733, 733, 733, -1,
+ -1, -1, -1, -1, -1, -1, 733, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 272, 733, 733, 733, 733,
+ -1, -1, -1, -1, 270, -1, 33, 31,
+ 32, 52, 62, 63, 64, 65, -1, 70,
+ 82, 90, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 102, 89, 81, 37, 58, -1, -1, -1,
+ 733, 733, 733, 733, -1, -1, 733, 733,
+ 733, 733, 733, 733, -1, 271, -1, 733,
+ 733, 733, 733, 733, -1, 279, 153, -1,
+ 733, 733, -1, -1, 733, 733, 733, -1,
+ 733, 733, -1, -1, 733, -1, -1, -1,
+ -1, -1, -1, -1, -1, 733, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 273,
+ 733, 733, 733, 733, 733, 733, 733, 733,
+ -1, 733, 733, 733, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 25, 26, 979, 23, 21, 24, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 733, 733, 733, 733, 733, -1,
+ 729, 729, 729, 729, 729, 30, -1, 43,
+ -1, -1, 733, -1, 733, 733, -1, 44,
+ -1, -1, -1, -1, -1, -1, 22, 27,
+ -1, -1, -1, -1, 59, 60, 61, -1,
+ 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 296, 45, -1, -1, 295, -1,
+ 282, 294, -1, 293, -1, -1, -1, 29,
+ 292, 283, 291, 284, -1, -1, -1, -1,
+ -1, -1, -1, -1, 289, 290, 285, -1,
+ 286, 287, -1, -1, 288, 275, -1, -1,
+ -1, -1, -1, -1, -1, -1, 733, 209,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ 297, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 729, 729, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 132, 58, 276, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 209, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, -1, -1, -1, 281, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 132,
+ 58, 735, 735, 735, 735, 735, 735, 735,
+ 735, 735, 735, 735, 735, 735, 735, -1,
+ 735, 735, 735, 735, 735, 735, -1, -1,
+ -1, 735, 735, 735, 735, 735, 735, -1,
+ 735, 735, 735, 735, -1, 735, -1, 735,
+ 735, 735, -1, 735, 735, 735, 735, 735,
+ 735, 735, 735, 735, 735, 735, 735, 735,
+ 735, 735, 735, 735, 735, 735, 735, 735,
+ -1, -1, -1, -1, -1, -1, -1, 735,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 735, 735, 735,
+ 735, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 735, 735, 735, 735, -1, -1, 735,
+ 735, 735, 735, 735, 735, -1, -1, -1,
+ 735, 735, 735, 735, 735, -1, 735, 735,
+ -1, 735, 735, -1, -1, 735, 735, 735,
+ -1, 735, 735, -1, -1, 735, -1, -1,
+ -1, -1, -1, -1, -1, -1, 735, -1,
+ -1, -1, -1, -1, -1, -1, -1, 279,
+ 153, 735, 735, 735, 735, 735, 735, 735,
+ 735, -1, 735, 735, 735, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 735, 735, 735, 735, 735,
+ -1, 890, 890, 890, 890, -1, 890, -1,
+ -1, -1, -1, 735, -1, 735, 735, 890,
+ 890, 890, 890, 890, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 890, -1, -1,
+ -1, 890, 890, 890, 890, -1, -1, -1,
+ 890, 890, 890, -1, -1, -1, -1, 890,
+ 890, -1, 1004, 1004, 1004, 890, 1003, -1,
+ -1, -1, -1, -1, -1, 890, -1, -1,
+ -1, 77, 78, 79, 80, -1, 76, -1,
+ -1, -1, -1, 890, 890, 890, 890, 100,
+ 96, 98, 94, 92, -1, -1, -1, -1,
+ 1003, -1, -1, -1, -1, 87, -1, -1,
+ -1, 88, 85, 84, 86, -1, -1, -1,
+ 72, 73, 74, -1, -1, -1, -1, 1006,
+ 71, -1, 104, 106, 108, 110, -1, -1,
+ -1, -1, -1, -1, -1, 75, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 66, 67, 68, 69, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 296, 45, -1, -1,
+ 295, -1, 282, 294, -1, 293, -1, 735,
+ -1, 29, 292, 283, 291, 284, -1, -1,
+ -1, -1, -1, -1, -1, -1, 289, 290,
+ 285, -1, 286, 287, -1, -1, 288, -1,
+ -1, -1, 890, 890, 890, 890, 890, -1,
+ 890, 890, 890, -1, -1, -1, -1, -1,
+ -1, -1, 297, -1, -1, -1, -1, -1,
+ -1, 168, 169, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 167,
+ -1, 890, 890, 890, 890, 890, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 313, 62, 63, 64, 65, 314,
+ 70, 82, 90, -1, -1, -1, 281, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 102, 89, 81, 132, 58, 822, 822,
+ 822, 822, 822, 822, 822, 822, 822, 822,
+ 822, 822, 822, 822, 822, 822, 822, 822,
+ 822, 822, 822, 822, 822, -1, 822, 822,
+ 822, 822, 822, 822, -1, 822, 822, 822,
+ 822, -1, 822, -1, 822, 822, 822, -1,
+ 822, 822, 822, 822, 822, 822, -1, 822,
+ 822, 822, 822, 822, 822, 822, 822, 822,
+ 822, 822, 822, 822, 822, 822, -1, 822,
+ -1, -1, -1, -1, 822, 822, 822, 822,
+ 822, -1, -1, 822, 822, -1, 822, 822,
+ 822, 822, 822, 822, 822, 822, 822, 822,
+ 822, 822, -1, -1, -1, -1, -1, 822,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 822, 822,
+ 822, 822, -1, -1, 822, 822, 822, 822,
+ 822, 822, -1, -1, -1, 822, 822, 822,
+ 822, 822, -1, -1, -1, -1, 822, -1,
+ -1, -1, 822, 822, 822, -1, 822, 822,
+ -1, -1, 822, -1, -1, -1, -1, -1,
+ -1, -1, -1, 822, 822, 822, 822, 822,
+ -1, 822, 822, 822, -1, -1, 822, 822,
+ 822, 822, 822, 822, 822, 822, -1, 822,
+ 822, 822, -1, -1, -1, 822, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 822, 822, -1, -1, 822, -1, -1, -1,
+ -1, 822, -1, -1, -1, -1, 822, -1,
+ 822, 822, 822, 822, 822, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 822, -1, 822, -1, -1, 822, 822, -1,
+ -1, -1, 822, -1, 822, -1, 822, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 77, 78, 79, 80, -1, 76, -1, -1,
+ -1, -1, -1, -1, -1, -1, 100, 96,
+ 98, 94, 92, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 87, -1, -1, -1,
+ 88, 85, 84, 86, -1, -1, -1, 72,
+ 73, 74, -1, -1, -1, -1, 1006, 71,
+ -1, 104, 106, 108, 110, -1, -1, -1,
+ -1, -1, -1, -1, 75, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 66, 67, 68, 69, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 822, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 168, 169, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 167, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 324, 64, 65, -1, 70,
+ 82, 90, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 313, 62, 63, 64,
+ 65, 314, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 102, 89, 81, 132, 58, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ 823, 823, 823, 823, 823, 823, 823, 823,
+ 823, 823, 823, 823, 823, 823, 823, 823,
+ 823, 823, 823, 823, 823, 823, 823, -1,
+ 823, 823, 823, 823, 823, 823, -1, 823,
+ 823, 823, 823, -1, 823, -1, 823, 823,
+ 823, -1, 823, 823, 823, 823, 823, 823,
+ -1, 823, 823, 823, 823, 823, 823, 823,
+ 823, 823, 823, 823, 823, 823, 823, 823,
+ -1, 823, -1, -1, -1, -1, 823, 823,
+ 823, 823, 823, -1, -1, 823, 823, -1,
+ 823, 823, 823, 823, 823, 823, 823, 823,
+ 823, 823, 823, 823, -1, -1, -1, -1,
+ -1, 823, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 823, 823, 823, 823, -1, -1, 823, 823,
+ 823, 823, 823, 823, -1, -1, -1, 823,
+ 823, 823, 823, 823, -1, -1, -1, -1,
+ 823, -1, -1, -1, 823, 823, 823, -1,
+ 823, 823, -1, -1, 823, -1, -1, -1,
+ -1, -1, -1, -1, -1, 823, 823, 823,
+ 823, 823, -1, 823, 823, 823, -1, -1,
+ 823, 823, 823, 823, 823, 823, 823, 823,
+ -1, 823, 823, 823, -1, -1, -1, 823,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 823, 823, -1, -1, 823, -1,
+ -1, -1, -1, 823, -1, -1, -1, -1,
+ 823, -1, 823, 823, 823, 823, 823, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 823, -1, 823, -1, -1, 823,
+ 823, -1, -1, -1, 823, -1, 823, -1,
+ 823, 824, 824, 824, 824, 824, 824, 824,
+ 824, 824, 824, 824, 824, 824, 824, 824,
+ 824, 824, 824, 824, 824, 824, 824, 824,
+ -1, 824, 824, 824, 824, 824, 824, -1,
+ 824, 824, 824, 824, -1, 824, -1, 824,
+ 824, 824, -1, 824, 824, 824, 824, 824,
+ 824, -1, 824, 824, 824, 824, 824, 824,
+ 824, 824, 824, 824, 824, 824, 824, 824,
+ 824, -1, 824, -1, -1, -1, -1, 824,
+ 824, 824, 824, 824, -1, -1, 824, 824,
+ -1, 824, 824, 824, 824, 824, 824, 824,
+ 824, 824, 824, 824, 824, -1, -1, -1,
+ -1, -1, 824, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 823, -1,
+ -1, 824, 824, 824, 824, -1, -1, 824,
+ 824, 824, 824, 824, 824, -1, -1, -1,
+ 824, 824, 824, 824, 824, -1, -1, -1,
+ -1, 824, -1, -1, -1, 824, 824, 824,
+ -1, 824, 824, -1, -1, 824, -1, -1,
+ -1, -1, -1, -1, -1, -1, 824, 824,
+ 824, 824, 824, -1, 824, 824, 824, -1,
+ -1, 824, 824, 824, 824, 824, 824, 824,
+ 824, -1, 824, 824, 824, 324, 64, 65,
+ 824, 70, 82, 90, -1, -1, -1, -1,
+ -1, -1, -1, 824, 824, -1, -1, 824,
+ -1, -1, -1, -1, 824, -1, -1, -1,
+ -1, 824, -1, 824, 824, 824, 824, 824,
+ -1, -1, 102, 89, 81, 132, 58, -1,
+ -1, -1, -1, 824, -1, 824, -1, -1,
+ 824, 824, -1, -1, -1, 824, -1, 824,
+ -1, 824, 825, 825, 825, 825, 825, 825,
+ 825, 825, 825, 825, 825, 825, 825, 825,
+ 825, 825, 825, 825, 825, 825, 825, 825,
+ 825, -1, 825, 825, 825, 825, 825, 825,
+ -1, 825, 825, 825, 825, -1, 825, -1,
+ 825, 825, 825, -1, 825, 825, 825, 825,
+ 825, 825, -1, 825, 825, 825, 825, 825,
+ 825, 825, 825, 825, 825, 825, 825, 825,
+ 825, 825, -1, 825, -1, -1, -1, -1,
+ 825, 825, 825, 825, 825, -1, -1, 825,
+ 825, -1, 825, 825, 825, 825, 825, 825,
+ 825, 825, 825, 825, 825, 825, -1, -1,
+ -1, -1, -1, 825, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 824,
+ -1, -1, 825, 825, 825, 825, -1, -1,
+ 825, 825, 825, 825, 825, 825, -1, -1,
+ -1, 825, 825, 825, 825, 825, -1, -1,
+ -1, -1, 825, -1, -1, -1, 825, 825,
+ 825, -1, 825, 825, -1, -1, 825, -1,
+ -1, -1, -1, -1, -1, -1, -1, 825,
+ 825, 825, 825, 825, -1, 825, 825, 825,
+ -1, -1, 825, 825, 825, 825, 825, 825,
+ 825, 825, -1, 825, 825, 825, -1, -1,
+ -1, 825, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 825, 825, -1, -1,
+ 825, -1, -1, -1, -1, 825, -1, -1,
+ -1, -1, 825, -1, 825, 825, 825, 825,
+ 825, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 825, -1, 825, -1,
+ -1, 825, 825, -1, -1, -1, 825, -1,
+ 825, -1, 825, 710, 710, 710, 710, 710,
+ 710, 710, 710, 710, 710, 710, 710, 710,
+ 710, -1, 710, 710, 710, 710, 710, 710,
+ -1, -1, -1, 710, 710, 710, 710, 710,
+ 710, -1, 710, 710, 710, 710, -1, 710,
+ -1, 710, 710, 710, -1, 710, 710, 710,
+ 710, 710, 710, -1, 710, 710, 710, 710,
+ 710, 710, 710, 710, 710, -1, 710, 710,
+ 710, 710, -1, -1, -1, -1, -1, -1,
+ -1, 710, -1, -1, -1, -1, -1, -1,
+ -1, -1, 317, -1, -1, -1, -1, 710,
+ 710, 710, 710, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 825, -1, -1, 710, 710, 710, 710, -1,
+ -1, 710, 710, 710, 710, 710, 710, -1,
+ -1, -1, 710, 710, 710, 710, 710, -1,
+ -1, -1, -1, 710, 710, -1, -1, 710,
+ 710, 710, -1, 710, 710, -1, -1, 710,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 710, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 710, 710, 710, 710, 710,
+ 710, 710, 710, -1, 710, 710, 710, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 710, 710, 710,
+ 710, 710, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 710, -1, 710,
+ 710, -1, -1, -1, 715, 715, 715, 715,
+ 715, 715, 715, 715, 715, 715, 715, 715,
+ 715, 715, -1, 715, 715, 715, 715, 715,
+ 715, -1, -1, -1, 715, 715, 715, 715,
+ 715, 715, -1, 715, 715, 715, 715, -1,
+ 715, -1, 715, 715, 715, -1, 715, 715,
+ 715, 715, 715, 715, -1, 715, 715, 715,
+ 715, 715, 715, 715, 715, 715, -1, 715,
+ 715, 715, 715, -1, -1, -1, -1, -1,
+ -1, -1, 715, -1, -1, -1, -1, -1,
+ -1, -1, -1, 715, -1, -1, -1, -1,
+ 715, 715, 715, 715, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 715, 715, 715, 715,
+ -1, 710, 715, 715, 715, 715, 715, 715,
+ -1, -1, -1, 715, 715, 715, 715, 715,
+ -1, -1, -1, -1, 715, 715, -1, -1,
+ 715, 715, 715, -1, 715, 715, -1, -1,
+ 715, -1, -1, -1, -1, -1, -1, -1,
+ -1, 715, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 715, 715, 715, 715,
+ 715, 715, 715, 715, -1, 715, 715, 715,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 715, 715,
+ 715, 715, 715, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 715, -1,
+ 715, 715, 773, 773, 773, 773, 773, 773,
+ 773, 773, 773, 773, 773, 773, 773, 773,
+ 773, 773, 773, 773, 773, 773, 773, 773,
+ 773, -1, 773, 773, 773, 773, 773, 773,
+ -1, 773, 773, 773, 773, -1, 773, -1,
+ 773, 773, 773, -1, 773, 773, 773, 773,
+ 773, 773, -1, 773, 773, 773, 773, 773,
+ 773, 773, 773, 773, -1, 773, 773, 773,
+ 773, -1, -1, -1, -1, -1, -1, -1,
+ 773, -1, -1, 773, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 773, 773,
+ 773, 773, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 773, 773, 773, 773, -1, -1,
+ 773, 773, 715, 773, 773, 773, -1, -1,
+ -1, 773, 773, -1, 773, 773, -1, -1,
+ -1, -1, 773, -1, -1, -1, 773, 773,
+ 773, -1, 773, 773, -1, -1, 773, -1,
+ -1, -1, -1, -1, -1, -1, -1, 773,
+ 773, 773, 773, -1, -1, -1, 773, 773,
+ -1, -1, 773, 773, 773, 773, 773, 773,
+ 773, 773, -1, 773, 773, 773, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 77, 78, 79, 80, -1,
+ 76, -1, -1, -1, 773, 773, 773, 773,
+ 773, 100, 96, 98, 94, 92, -1, -1,
+ -1, -1, -1, -1, 773, -1, -1, 87,
+ -1, 773, -1, 88, 85, 84, 86, -1,
+ -1, -1, 72, 73, 74, -1, -1, -1,
+ -1, 1006, 71, -1, 104, 106, 108, 110,
+ 77, 78, 79, 80, -1, 76, -1, 75,
+ -1, -1, -1, -1, -1, -1, 100, 96,
+ 98, 94, 92, -1, -1, 66, 67, 68,
+ 69, -1, -1, -1, 87, -1, -1, -1,
+ 88, 85, 84, 86, -1, -1, -1, 72,
+ 73, 74, -1, -1, -1, -1, 1006, 71,
+ -1, 104, 106, 108, 110, -1, -1, -1,
+ -1, -1, -1, -1, 75, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 66, 67, 68, 69, -1, -1,
+ -1, -1, -1, -1, -1, 77, 78, 79,
+ 80, -1, 76, -1, -1, -1, -1, -1,
+ -1, -1, -1, 100, 96, 98, 94, 92,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 87, -1, -1, -1, 88, 85, 84,
+ 86, -1, -1, -1, 72, 73, 74, -1,
+ 773, -1, -1, 1006, 71, -1, 104, 106,
+ 108, 110, -1, -1, 321, 62, 63, 64,
+ 65, 75, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 66,
+ 67, 68, 69, -1, -1, -1, -1, -1,
+ -1, -1, 77, 78, 79, 80, -1, 76,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ 100, 96, 98, 94, 92, -1, -1, -1,
+ -1, -1, 322, 63, 64, 65, 87, 70,
+ 82, 90, 88, 85, 84, 86, -1, -1,
+ -1, 72, 73, 74, -1, -1, -1, -1,
+ 1006, 71, -1, 104, 106, 108, 110, 77,
+ 78, 79, 80, -1, 76, -1, 75, -1,
+ 102, 89, 81, 132, 58, 100, 96, 98,
+ 94, 92, -1, -1, 66, 67, 68, 69,
+ -1, -1, -1, 87, -1, -1, -1, 88,
+ 85, 84, 86, -1, -1, -1, 72, 73,
+ 74, -1, -1, -1, -1, 1006, 71, -1,
+ 104, 106, 108, 110, -1, -1, -1, 323,
+ 63, 64, 65, 75, 70, 82, 90, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 66, 67, 68, 69, -1, -1, -1,
+ -1, -1, -1, -1, 77, 78, 79, 80,
+ -1, 76, -1, -1, -1, 102, 89, 81,
+ 132, 58, 100, 96, 98, 94, 92, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 87, -1, -1, -1, 88, 85, 84, 86,
+ -1, -1, -1, 72, 73, 74, -1, -1,
+ -1, -1, 1006, 71, -1, 104, 106, 108,
+ 110, -1, -1, -1, -1, 325, 64, 65,
+ 75, 70, 82, 90, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 66, 67,
+ 68, 69, -1, -1, -1, -1, -1, -1,
+ -1, 77, 78, 79, 80, -1, 76, -1,
+ -1, -1, 102, 89, 81, 132, 58, 100,
+ 96, 98, 94, 92, -1, -1, -1, -1,
+ -1, -1, 326, 64, 65, 87, 70, 82,
+ 90, 88, 85, 84, 86, -1, -1, -1,
+ 72, 73, 74, -1, -1, -1, -1, 1006,
+ 71, -1, 104, 106, 108, 110, 77, 78,
+ 79, 80, -1, 76, -1, 75, -1, 102,
+ 89, 81, 132, 58, 100, 96, 98, 94,
+ 92, -1, -1, 66, 67, 68, 69, -1,
+ -1, -1, 87, -1, -1, -1, 88, 85,
+ 84, 86, -1, -1, -1, 72, 73, 74,
+ -1, -1, -1, -1, 1006, 71, -1, 104,
+ 106, 108, 110, -1, -1, -1, -1, 327,
+ 64, 65, 75, 70, 82, 90, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 66, 67, 68, 69, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 132,
+ 58, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 77, 78, 79, 80, -1,
+ 76, -1, -1, -1, -1, -1, -1, -1,
+ -1, 100, 96, 98, 94, 92, -1, -1,
+ -1, -1, -1, -1, 328, 64, 65, 87,
+ 70, 82, 90, 88, 85, 84, 86, -1,
+ -1, -1, 72, 73, 74, -1, -1, -1,
+ -1, 1006, 71, -1, 104, 106, 108, 110,
+ -1, -1, -1, -1, -1, -1, -1, 75,
+ -1, 102, 89, 81, 132, 58, -1, -1,
+ -1, -1, -1, -1, -1, 66, 67, 68,
+ 69, 329, 64, 65, -1, 70, 82, 90,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 132, 58, -1, -1, -1, 321, 62,
+ 63, 64, 65, -1, 70, 82, 90, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 102, 89, 81,
+ 132, 58, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 322, 63, 64, 65,
+ -1, 70, 82, 90, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 330,
+ 65, -1, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 102, 89, 81, 132, 58, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 323, 63, 64, 65, -1, 70, 82,
+ 90, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 77, 78, 79, 80,
+ -1, 76, -1, -1, -1, -1, -1, -1,
+ -1, -1, 100, 96, 98, 94, 92, 102,
+ 89, 81, 132, 58, -1, -1, -1, -1,
+ 87, -1, -1, -1, 88, 85, 84, 86,
+ -1, -1, -1, 72, 73, 74, -1, -1,
+ -1, -1, 1006, 71, -1, 104, 106, 108,
+ 110, -1, -1, -1, -1, -1, -1, -1,
+ 75, -1, -1, -1, -1, -1, -1, 325,
+ 64, 65, -1, 70, 82, 90, 66, 67,
+ 68, 69, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 132,
+ 58, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 326, 64, 65, -1,
+ 70, 82, 90, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 77, 78,
+ 79, 80, -1, 76, -1, -1, -1, -1,
+ -1, -1, -1, -1, 100, 96, 98, 94,
+ 92, 102, 89, 81, 132, 58, -1, -1,
+ -1, -1, 87, -1, -1, -1, 88, 85,
+ 84, 86, -1, -1, -1, 72, 73, 74,
+ -1, -1, -1, -1, 1006, 71, -1, 104,
+ 106, 108, 110, -1, -1, -1, -1, -1,
+ 331, 65, 75, 70, 82, 90, -1, -1,
+ -1, 327, 64, 65, -1, 70, 82, 90,
+ 66, 67, 68, 69, -1, -1, -1, -1,
+ -1, -1, -1, 77, 78, 79, 80, -1,
+ 76, -1, -1, -1, 102, 89, 81, 132,
+ 58, 100, 96, 98, 94, 92, 102, 89,
+ 81, 132, 58, -1, -1, -1, -1, 87,
+ -1, -1, -1, 88, 85, 84, 86, -1,
+ -1, -1, 72, 73, 74, -1, -1, -1,
+ -1, 1006, 71, -1, 104, 106, 108, 110,
+ -1, -1, -1, -1, -1, -1, -1, 75,
+ -1, -1, -1, -1, -1, -1, 328, 64,
+ 65, -1, 70, 82, 90, 66, 67, 68,
+ 69, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ -1, -1, -1, 333, -1, 70, 82, 90,
+ -1, -1, -1, 329, 64, 65, -1, 70,
+ 82, 90, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 132, 58, -1, -1, -1, -1, -1,
+ 102, 89, 81, 132, 58, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 332, -1, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ -1, 330, 65, -1, 70, 82, 90, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 102, 89, 81,
+ 132, 58, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 860, 860, 860, 860, 860, 860, 860,
+ 860, 860, 860, 860, 860, 860, 860, 860,
+ 860, 860, 860, 860, 860, 860, 860, 860,
+ 860, 860, 860, 860, 860, 860, 860, -1,
+ 860, 860, 860, 860, 860, 860, -1, 860,
+ 860, 860, -1, 860, 860, 860, 860, 860,
+ 860, 860, 860, 860, 860, 860, 860, 860,
+ 860, 860, 860, -1, 860, 860, 860, 860,
+ -1, -1, -1, -1, 336, -1, -1, 860,
+ 860, -1, 860, 337, 339, 860, -1, -1,
+ -1, -1, 860, -1, -1, 860, 860, 860,
+ 860, 338, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 860, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 860, 860, 860, 860, -1, -1, 860,
+ 860, 860, 860, 860, 860, -1, 860, 860,
+ 860, 860, 860, 860, 860, -1, -1, 860,
+ -1, 860, 860, -1, 860, 860, 860, 860,
+ -1, 860, 860, -1, -1, 860, -1, -1,
+ -1, -1, -1, 860, -1, 860, 860, 860,
+ 860, 860, -1, -1, -1, 860, 860, -1,
+ 860, 860, 860, 860, 860, 860, 860, 860,
+ 860, -1, 860, 860, 860, 335, -1, 860,
+ -1, -1, 331, 65, -1, 70, 82, 90,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 860, 860, 860, -1, -1, 860, 860,
+ 860, -1, -1, 860, 860, 860, 860, 860,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 132, 58, 860, -1, 860, 860, 860,
+ 860, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 333, -1, 70,
+ 82, 90, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 102, 89, 81, 132, 58, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 860,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 332, -1, 70, 82, 90, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 102, 89, 81,
+ 132, 58, 929, 929, 929, 929, 929, 929,
+ 929, 929, 929, 929, 929, 929, 929, 929,
+ 929, 929, 929, 929, 929, 929, 929, 929,
+ 929, -1, 929, 929, 929, 929, 929, 929,
+ -1, 929, 929, 929, 929, -1, 929, -1,
+ 929, 929, 929, -1, 929, 929, 929, 929,
+ 929, 929, -1, 929, 929, 929, 929, 929,
+ 929, 929, 929, 929, 929, 929, 929, 929,
+ 929, 929, -1, 929, -1, -1, -1, -1,
+ 929, 929, 929, 929, 929, -1, -1, 929,
+ 929, -1, 929, 929, 929, 929, 929, 929,
+ 929, 929, 929, 929, 929, 929, -1, -1,
+ -1, -1, -1, 929, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 929, 929, 929, 929, -1, -1,
+ 929, 929, 929, 929, 929, 929, -1, -1,
+ -1, 929, 929, 929, 929, 929, -1, -1,
+ -1, -1, 929, -1, -1, -1, 929, 929,
+ 929, -1, 929, 929, -1, -1, 929, -1,
+ -1, -1, -1, -1, -1, -1, -1, 929,
+ 929, 929, 929, 929, -1, 929, 929, 929,
+ -1, -1, 929, 929, 929, 929, 929, 929,
+ 929, 929, -1, 929, 929, 929, -1, -1,
+ -1, 929, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 929, 929, -1, -1,
+ 929, -1, -1, -1, -1, 929, -1, -1,
+ -1, -1, 929, -1, 929, 929, 929, 929,
+ 929, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 929, -1, 929, -1,
+ -1, 929, 929, -1, -1, -1, 929, -1,
+ 929, -1, 929, 77, 78, 79, 80, 335,
+ 76, -1, -1, -1, -1, -1, -1, -1,
+ -1, 100, 96, 98, 94, 92, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 87,
+ -1, -1, -1, 88, 85, 84, 86, -1,
+ -1, -1, 72, 73, 74, -1, -1, -1,
+ -1, 1006, 71, -1, 104, 106, 108, 110,
+ -1, 77, 78, 79, 80, -1, 76, 75,
+ -1, -1, -1, -1, -1, -1, -1, 100,
+ 96, 98, 94, 92, -1, 66, 67, 68,
+ 69, -1, -1, -1, -1, 87, -1, -1,
+ -1, 88, 85, 84, 86, -1, -1, -1,
+ 72, 73, 74, -1, -1, -1, -1, 1006,
+ 71, -1, 104, 106, 108, 110, -1, -1,
+ -1, -1, -1, -1, -1, 75, 788, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 66, 67, 68, 69, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 929, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 341, 62, 63, 64,
+ 65, -1, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ 340, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 209, 62, 63, 64, 65, -1,
+ 70, 82, 90, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 102, 89, 81, 132, 58, 932, 932,
+ 932, 932, 932, 932, 932, 932, 932, 932,
+ 932, 932, 932, 932, 932, 932, 932, 932,
+ 932, 932, 932, 932, 932, -1, 932, 932,
+ 932, 932, 932, 932, -1, 932, 932, 932,
+ 932, -1, 932, -1, 932, 932, 932, -1,
+ 932, 932, 932, 932, 932, 932, -1, 932,
+ 932, 932, 932, 932, 932, 932, 932, 932,
+ 932, 932, 932, 932, 932, 932, -1, 932,
+ -1, -1, 342, 343, 932, 932, 932, 932,
+ 932, -1, 932, 932, 932, -1, 932, 932,
+ 932, 932, 932, 932, 932, 932, 932, 932,
+ 932, 932, -1, -1, -1, -1, -1, 932,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 932, 932,
+ 932, 932, -1, -1, 932, 932, 932, 932,
+ 932, 932, -1, -1, -1, 932, 932, 932,
+ 932, 932, -1, -1, -1, -1, 932, -1,
+ -1, -1, 932, 932, 932, -1, 932, 932,
+ -1, -1, 932, -1, -1, -1, -1, -1,
+ -1, -1, -1, 932, 932, 932, 932, 932,
+ -1, 932, 932, 932, -1, -1, 932, 932,
+ 932, 932, 932, 932, 932, 932, -1, 932,
+ 932, 932, -1, -1, -1, 932, -1, -1,
+ -1, -1, -1, -1, -1, 932, 932, 932,
+ 932, 932, -1, -1, 932, -1, -1, -1,
+ -1, 932, -1, 932, 932, 932, 932, -1,
+ 932, 932, 932, 932, 932, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 932, -1, 932, -1, -1, 932, 932, -1,
+ -1, -1, 932, -1, 932, -1, 932, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 77, 78, 79, 80, -1, 76,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 100, 96, 98, 94, 92, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 87, -1,
+ -1, -1, 88, 85, 84, 86, -1, -1,
+ -1, 72, 73, 74, -1, -1, -1, -1,
+ 1006, 71, -1, 104, 106, 108, 110, -1,
+ -1, -1, -1, -1, -1, -1, 75, 788,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 66, 67, 68, 69,
+ -1, -1, 182, 183, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 932, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 341, 62,
+ 63, 64, 65, -1, 70, 82, 90, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 366, -1, -1, -1, 102, 89, 81,
+ 132, 58, 340, 209, 62, 63, 64, 65,
+ -1, 70, 82, 90, 209, 62, 63, 64,
+ 65, -1, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 102, 89, 81, 132, 58, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ 745, 745, 745, 745, 745, 745, 745, 745,
+ 745, 745, 745, 745, 745, 745, -1, 745,
+ 745, 745, 745, 745, 745, -1, -1, -1,
+ 745, 745, 745, 745, 745, 745, -1, 745,
+ 745, 745, 745, -1, 745, -1, 745, 745,
+ 745, -1, 745, 745, 745, 745, 745, 745,
+ -1, 745, 745, 745, 745, 745, 745, 745,
+ 745, 745, -1, 745, 745, 745, 745, -1,
+ -1, -1, -1, -1, -1, -1, 745, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 745, 745, 745, 745,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 745, 745, 745, 745, -1, -1, 745, 745,
+ 745, 745, 745, 745, -1, -1, -1, 745,
+ 745, 745, 745, 745, -1, -1, -1, -1,
+ 745, 745, -1, -1, 745, 745, 745, -1,
+ 745, 745, -1, -1, 745, -1, -1, -1,
+ -1, -1, -1, -1, -1, 745, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 745, 745, 745, 745, 745, 745, 745, 745,
+ -1, 745, 745, 745, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 745, 745, 745, 745, 745, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 745, -1, 745, 745, -1, -1,
+ -1, 750, 750, 750, 750, 750, 750, 750,
+ 750, 750, 750, 750, 750, 750, 750, -1,
+ 750, 750, 750, 750, 750, 750, -1, -1,
+ -1, 750, 750, 750, 750, 750, 750, -1,
+ 750, 750, 750, 750, -1, 750, -1, 750,
+ 750, 750, -1, 750, 750, 750, 750, 750,
+ 750, -1, 750, 750, 750, 750, 750, 750,
+ 750, 750, 750, -1, 750, 750, 750, 750,
+ -1, -1, -1, -1, -1, -1, -1, 750,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 750, 750, 750,
+ 750, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 750, 750, 750, 750, -1, 745, 750,
+ 750, 750, 750, 750, 750, -1, -1, -1,
+ 750, 750, 750, 750, 750, -1, -1, -1,
+ -1, 750, 750, -1, -1, 750, 750, 750,
+ -1, 750, 750, -1, -1, 750, -1, -1,
+ -1, -1, -1, -1, -1, -1, 750, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 750, 750, 750, 750, 750, 750, 750,
+ 750, -1, 750, 750, 750, -1, -1, -1,
+ -1, -1, -1, 366, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 209, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, -1, -1, 750, 750, 750, 750, 750,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 750, -1, 750, 750, -1,
+ -1, -1, -1, -1, 102, 89, 81, 132,
+ 58, 841, 841, 841, 841, 841, 841, 841,
+ 841, 841, 841, 841, 841, 841, 841, 841,
+ 841, 841, 841, 841, 841, 841, 841, 841,
+ -1, 841, 841, 841, 841, 841, 841, -1,
+ 841, 841, 841, 841, -1, 841, -1, 841,
+ 841, 841, -1, 841, 841, 841, 841, 841,
+ 841, -1, 841, 841, 841, 841, 841, 841,
+ 841, 841, 841, 841, 841, 841, 841, 841,
+ 841, -1, 841, -1, -1, -1, -1, 841,
+ 841, 841, 841, 841, -1, -1, 841, 841,
+ -1, 841, 841, 841, 841, 841, 841, 841,
+ 841, 841, 841, 841, 841, -1, -1, -1,
+ -1, -1, 841, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 750,
+ -1, 841, 841, 841, 841, -1, -1, 841,
+ 841, 841, 841, 841, 841, -1, -1, -1,
+ 841, 841, 841, 841, 841, -1, -1, -1,
+ -1, 841, -1, -1, -1, 841, 841, 841,
+ -1, 841, 841, -1, -1, 841, -1, -1,
+ -1, -1, -1, -1, -1, -1, 841, 841,
+ 841, 841, 841, -1, 841, 841, 841, -1,
+ -1, 841, 841, 841, 841, 841, 841, 841,
+ 841, -1, 841, 841, 841, -1, -1, -1,
+ 841, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 841, 841, -1, -1, 841,
+ -1, -1, -1, -1, 841, -1, -1, -1,
+ -1, 841, -1, 841, 841, 841, 841, 841,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 841, -1, 841, -1, -1,
+ 841, 841, -1, -1, -1, 841, -1, 841,
+ -1, 841, 888, 888, 888, 888, 888, 888,
+ 888, 888, 888, 888, 888, 888, 888, 888,
+ 888, 888, 888, 888, 888, 888, 888, 888,
+ 888, -1, 888, 888, 888, 888, 888, 888,
+ -1, 888, 888, 888, 888, -1, 888, -1,
+ 888, 888, 888, -1, 888, 888, 888, 888,
+ 888, 888, -1, 888, 888, 888, 888, 888,
+ 888, 888, 888, 888, 888, 221, 223, 225,
+ 227, 888, -1, 888, -1, -1, -1, -1,
+ 888, 888, 888, 888, 888, -1, -1, 888,
+ 888, -1, 888, 888, 888, 888, 888, 888,
+ 888, 888, 888, 888, 888, 888, -1, -1,
+ -1, -1, -1, 888, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 841,
+ -1, -1, 888, 888, 888, 888, -1, -1,
+ 888, 888, 888, 888, 888, 888, -1, -1,
+ -1, 888, 888, 888, 888, 888, -1, -1,
+ -1, -1, 888, -1, -1, -1, 888, 888,
+ 888, -1, 888, 888, -1, -1, 888, -1,
+ -1, -1, -1, -1, -1, -1, -1, 888,
+ 888, 888, 888, 888, -1, 888, 888, 888,
+ 888, -1, 888, 888, 888, 888, 888, 888,
+ 888, 888, -1, 888, 888, 888, -1, -1,
+ -1, 888, -1, -1, -1, -1, -1, -1,
+ -1, 387, -1, -1, 888, 888, -1, -1,
+ 888, -1, -1, -1, -1, 888, -1, -1,
+ -1, -1, 888, -1, 888, 888, 888, 888,
+ 888, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 888, -1, 888, -1,
+ -1, 888, 888, -1, -1, -1, 888, -1,
+ 888, -1, 888, 887, 887, 887, 887, 887,
+ 887, 887, 887, 887, 887, 887, 887, 887,
+ 887, 887, 887, 887, 887, 887, 887, 887,
+ 887, 887, -1, 887, 887, 887, 887, 887,
+ 887, -1, 887, 887, 887, 887, -1, 887,
+ -1, 887, 887, 887, -1, 887, 887, 887,
+ 887, 887, 887, -1, 887, 887, 887, 887,
+ 887, 887, 887, 887, 887, 887, 887, 887,
+ 887, 887, 887, -1, 887, -1, -1, -1,
+ -1, 887, 887, 887, 887, 887, -1, -1,
+ 887, 887, -1, 887, 887, 887, 887, 887,
+ 887, 887, 887, 887, 887, 887, 887, -1,
+ -1, -1, -1, -1, 887, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 888, -1, -1, 887, 887, 887, 887, -1,
+ -1, 887, 887, 887, 887, 887, 887, -1,
+ -1, -1, 887, 887, 887, 887, 887, -1,
+ -1, -1, -1, 887, -1, -1, -1, 887,
+ 887, 887, -1, 887, 887, -1, -1, 887,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 887, 887, 887, 887, 887, -1, 887, 887,
+ 887, 887, -1, 887, 887, 887, 887, 887,
+ 887, 887, 887, -1, 887, 887, 887, -1,
+ -1, -1, 887, -1, -1, -1, -1, -1,
+ -1, -1, 887, -1, -1, 887, 887, -1,
+ -1, 887, -1, -1, -1, -1, 887, -1,
+ -1, -1, -1, 887, -1, 887, 887, 887,
+ 887, 887, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 887, -1, 887,
+ -1, -1, 887, 887, -1, -1, -1, 887,
+ -1, 887, -1, 887, 829, 829, 829, 829,
+ 829, 829, 829, 829, 829, 829, 829, 829,
+ 829, 829, 829, 829, 829, 829, 829, 829,
+ 829, 829, 829, -1, 829, 829, 829, 829,
+ 829, 829, -1, 829, 829, 829, 829, -1,
+ 829, -1, 829, 829, 829, 401, 829, 829,
+ 829, 829, 829, 829, -1, 829, 829, 829,
+ 829, 829, 829, 829, 829, 829, 829, 829,
+ 829, 829, 829, 829, -1, 829, -1, -1,
+ 400, -1, 829, 829, 829, 829, 829, -1,
+ -1, 829, 829, -1, 829, 829, 829, 829,
+ 829, 829, 829, 829, 829, 829, 829, 829,
+ -1, -1, -1, -1, -1, 829, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 887, -1, -1, 829, 829, 829, 829,
+ -1, -1, 829, 829, 829, 829, 829, 829,
+ -1, -1, -1, 829, 829, 829, 829, 829,
+ -1, -1, -1, -1, 829, -1, -1, -1,
+ 829, 829, 829, -1, 829, 829, -1, -1,
+ 829, -1, -1, -1, -1, -1, -1, -1,
+ -1, 829, 829, 829, 829, 829, -1, 829,
+ 829, 829, -1, -1, 829, 829, 829, 829,
+ 829, 829, 829, 829, 399, 829, 829, 829,
+ -1, -1, -1, 829, -1, -1, -1, -1,
+ -1, -1, -1, 387, -1, -1, 829, 829,
+ -1, -1, 829, -1, -1, -1, -1, 829,
+ -1, -1, -1, -1, 829, -1, 829, 829,
+ 829, 829, 829, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 829, -1,
+ 829, -1, -1, 829, 829, -1, -1, -1,
+ 829, -1, 829, -1, 829, 918, 918, 918,
+ 918, 918, 918, 918, 918, 918, 918, 918,
+ 918, 918, 918, 918, 918, 918, 918, 918,
+ 918, 918, 918, 918, -1, 918, 918, 918,
+ 918, 918, 918, -1, 918, 918, 918, 918,
+ -1, 918, -1, 918, 918, 918, 918, 918,
+ 918, 918, 918, 918, 918, -1, 918, 918,
+ 918, 918, 918, 918, 918, 918, 918, 918,
+ 918, 918, 918, 918, 918, -1, 918, -1,
+ -1, 918, -1, 918, 918, 918, 918, 918,
+ -1, -1, 918, 918, -1, 918, 918, 918,
+ 918, 918, 918, 918, 918, 918, 918, 918,
+ 918, -1, -1, -1, -1, -1, 918, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 829, -1, -1, 918, 918, 918,
+ 918, -1, -1, 918, 918, 918, 918, 918,
+ 918, -1, -1, -1, 918, 918, 918, 918,
+ 918, -1, -1, -1, -1, 918, -1, -1,
+ -1, 918, 918, 918, -1, 918, 918, -1,
+ -1, 918, -1, -1, -1, -1, -1, -1,
+ -1, -1, 918, 918, 918, 918, 918, -1,
+ 918, 918, 918, -1, -1, 918, 918, 918,
+ 918, 918, 918, 918, 918, 918, 918, 918,
+ 918, -1, -1, -1, 918, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 918,
+ 918, -1, -1, 918, -1, -1, -1, -1,
+ 918, -1, -1, -1, -1, 918, -1, 918,
+ 918, 918, 918, 918, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 918,
+ -1, 918, -1, -1, 918, 918, -1, -1,
+ -1, 918, -1, 918, -1, 918, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 917,
+ 917, 917, 917, 917, 917, 917, 917, 917,
+ 917, 917, 917, 917, 917, 917, 917, 917,
+ 917, 917, 917, 917, 917, 917, -1, 917,
+ 917, 917, 917, 917, 917, -1, 917, 917,
+ 917, 917, -1, 917, -1, 917, 917, 917,
+ 917, 917, 917, 917, 917, 917, 917, -1,
+ 917, 917, 917, 917, 917, 917, 917, 917,
+ 917, 917, 232, 234, 236, 238, 917, -1,
+ 917, -1, -1, 917, -1, 917, 917, 917,
+ 917, 917, -1, -1, 917, 917, -1, 917,
+ 917, 917, 917, 917, 917, 917, 917, 917,
+ 917, 917, 917, -1, -1, -1, -1, -1,
+ 917, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 918, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 917,
+ 917, 917, 917, -1, -1, 917, 917, 917,
+ 917, 917, 917, -1, -1, -1, 917, 917,
+ 917, 917, 917, -1, -1, -1, -1, 917,
+ -1, -1, -1, 917, 917, 917, -1, 917,
+ 917, -1, -1, 917, -1, -1, -1, -1,
+ -1, -1, -1, -1, 917, 917, 917, 917,
+ 917, -1, 917, 917, 917, -1, 399, 917,
+ 917, 917, 917, 917, 917, 917, 917, 917,
+ 917, 917, 917, -1, -1, -1, 917, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 917, 917, -1, -1, 917, -1, -1,
+ -1, -1, 917, -1, 230, 398, -1, 917,
+ -1, 917, 917, 917, 917, 917, -1, -1,
+ 25, 26, 981, 23, 21, 24, -1, -1,
+ -1, 917, -1, 917, -1, -1, 917, 917,
+ 28, -1, -1, 917, -1, 917, -1, 917,
+ 729, 729, 729, 729, 729, 30, -1, 256,
+ -1, -1, -1, -1, 46, -1, -1, 44,
+ -1, -1, -1, -1, -1, -1, 22, 27,
+ -1, -1, -1, -1, 59, 60, 61, 47,
+ 729, 692, 692, 692, 692, 692, 692, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 692, -1, -1, -1, -1, -1, -1,
+ -1, 692, 692, 692, 692, 692, 692, -1,
+ 692, -1, -1, -1, -1, 692, -1, -1,
+ 692, -1, -1, -1, -1, -1, -1, 692,
+ 692, -1, -1, -1, -1, 692, 692, 692,
+ 692, 692, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 255, 253, 45, -1, -1, 252, 254,
+ -1, -1, -1, 251, -1, -1, -1, 29,
+ 250, -1, 248, 242, -1, 917, -1, -1,
+ 249, 240, -1, -1, 246, 247, 241, -1,
+ 243, 244, -1, -1, 245, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 692, 692, 692, -1, -1, 692,
+ 692, -1, 729, 729, 692, -1, -1, -1,
+ 692, 692, -1, 692, 692, -1, -1, -1,
+ -1, 692, 692, -1, -1, 692, 692, 692,
+ -1, 692, 692, -1, -1, 692, -1, -1,
+ -1, -1, -1, -1, -1, -1, 693, 693,
+ 693, 693, 693, 693, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 402, 693, -1,
+ -1, -1, -1, 692, 692, -1, 693, 693,
+ 693, 693, 693, 693, -1, 693, -1, -1,
+ -1, -1, 693, -1, -1, 693, -1, -1,
+ -1, -1, -1, -1, 693, 693, -1, -1,
+ -1, -1, 693, 693, 693, 693, 693, 694,
+ 694, 694, 694, 694, 694, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 692, 694,
+ -1, -1, -1, -1, -1, -1, -1, 694,
+ 694, 694, 694, 694, 694, -1, 694, -1,
+ -1, -1, -1, 694, -1, -1, 694, -1,
+ -1, -1, -1, -1, -1, 694, 694, -1,
+ -1, -1, -1, 694, 694, 694, 694, 694,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 693,
+ 693, 693, -1, -1, 693, 693, -1, -1,
+ -1, 693, -1, -1, -1, 693, 693, -1,
+ 693, 693, -1, -1, -1, -1, 693, 693,
+ -1, -1, 693, 693, 693, -1, 693, 693,
+ -1, -1, 693, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 694, 694, 694, -1, -1, 694, 694, -1,
+ 693, 693, 694, -1, -1, -1, 694, 694,
+ -1, 694, 694, -1, -1, -1, -1, 694,
+ 694, -1, -1, 694, 694, 694, -1, 694,
+ 694, -1, -1, 694, -1, -1, -1, -1,
+ -1, -1, -1, -1, 695, 695, 695, 695,
+ 695, 695, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 693, 695, -1, -1, -1,
+ -1, 694, 694, -1, 695, 695, 695, 695,
+ 695, 695, -1, 695, -1, -1, -1, -1,
+ 695, -1, -1, 695, -1, -1, 230, 398,
+ -1, -1, 695, 695, -1, -1, -1, -1,
+ 695, 695, 695, 695, 695, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 694, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 695, 695, 695,
+ -1, -1, 695, 695, -1, -1, -1, 695,
+ -1, -1, -1, 695, 695, -1, 695, 695,
+ -1, -1, -1, -1, 695, 695, -1, -1,
+ 695, 695, 695, -1, 695, 695, -1, -1,
+ 695, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 255, 253, 45, -1, -1,
+ 252, 254, -1, -1, -1, 251, 695, 695,
+ -1, 29, 250, -1, 248, 242, -1, -1,
+ -1, -1, 249, 240, -1, -1, 246, 247,
+ 241, -1, 243, 244, -1, -1, 245, -1,
+ -1, -1, 696, 696, 696, 696, 696, 696,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 696, -1, -1, -1, -1, -1,
+ -1, 695, 696, 696, 696, 696, 696, 696,
+ -1, 696, -1, -1, -1, -1, 696, -1,
+ -1, 696, -1, -1, -1, -1, -1, -1,
+ 696, 696, -1, -1, -1, -1, 696, 696,
+ 696, 696, 696, 697, 697, 697, 697, 697,
+ 697, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 697, -1, -1, -1, 402,
+ -1, -1, -1, 697, 697, 697, 697, 697,
+ 697, -1, 697, -1, -1, -1, -1, 697,
+ -1, -1, 697, -1, -1, -1, -1, -1,
+ -1, 697, 697, -1, -1, -1, -1, 697,
+ 697, 697, 697, 697, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 696, 696, 696, -1, -1,
+ 696, 696, -1, -1, -1, 696, -1, -1,
+ -1, 696, 696, -1, 696, 696, -1, -1,
+ -1, -1, 696, 696, -1, -1, 696, 696,
+ 696, -1, 696, 696, -1, -1, 696, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 697, 697, 697, -1,
+ -1, 697, 697, -1, 696, 696, 697, -1,
+ -1, -1, 697, 697, -1, 697, 697, -1,
+ -1, -1, -1, 697, 697, -1, -1, 697,
+ 697, 697, -1, 697, 697, -1, -1, 697,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 698, 698, 698, 698, 698, 698, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 696,
+ 698, -1, -1, -1, -1, 697, 697, -1,
+ 698, 698, 698, 698, 698, 698, -1, 698,
+ -1, -1, -1, -1, 698, -1, -1, 698,
+ -1, -1, -1, -1, -1, -1, 698, 698,
+ -1, -1, -1, -1, 698, 698, 698, 698,
+ 698, 699, 699, 699, 699, 699, 699, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 697, 699, -1, -1, -1, -1, -1, -1,
+ -1, 699, 699, 699, 699, 699, 699, -1,
+ 699, -1, -1, -1, -1, 699, -1, -1,
+ 699, -1, -1, -1, -1, -1, -1, 699,
+ 699, -1, -1, -1, -1, 699, 699, 699,
+ 699, 699, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 698, 698, 698, -1, -1, 698, 698,
+ -1, -1, -1, 698, -1, -1, -1, 698,
+ 698, -1, 698, 698, -1, -1, -1, -1,
+ 698, 698, -1, -1, 698, 698, 698, -1,
+ 698, 698, -1, -1, 698, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 699, 699, 699, -1, -1, 699,
+ 699, -1, 698, 698, 699, -1, -1, -1,
+ 699, 699, -1, 699, 699, -1, -1, -1,
+ -1, 699, 699, -1, -1, 699, 699, 699,
+ -1, 699, 699, -1, -1, 699, -1, -1,
+ -1, -1, -1, -1, -1, -1, 700, 700,
+ 700, 700, 700, 700, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 698, 700, -1,
+ -1, -1, -1, 699, 699, -1, 700, 700,
+ 700, 700, 700, 700, -1, 700, -1, -1,
+ -1, -1, 700, -1, -1, 700, -1, -1,
+ -1, -1, -1, -1, 700, 700, -1, -1,
+ -1, -1, 700, 700, 700, 700, 700, 701,
+ 701, 701, 701, 701, 701, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 699, 701,
+ -1, -1, -1, -1, -1, -1, -1, 701,
+ 701, 701, 701, 701, 701, -1, 701, -1,
+ -1, -1, -1, 701, -1, -1, 701, -1,
+ -1, -1, -1, -1, -1, 701, 701, -1,
+ -1, -1, -1, 701, 701, 701, 701, 701,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 700,
+ 700, 700, -1, -1, 700, 700, -1, -1,
+ -1, 700, -1, -1, -1, 700, 700, -1,
+ 700, 700, -1, -1, -1, -1, 700, 700,
+ -1, -1, 700, 700, 700, -1, 700, 700,
+ -1, -1, 700, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 701, 701, 701, -1, -1, 701, 701, -1,
+ 700, 700, 701, -1, -1, -1, 701, 701,
+ -1, 701, 701, -1, -1, -1, -1, 701,
+ 701, -1, -1, 701, 701, 701, -1, 701,
+ 701, -1, -1, 701, -1, -1, -1, -1,
+ -1, -1, -1, -1, 702, 702, 702, 702,
+ 702, 702, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 700, 702, -1, -1, -1,
+ -1, 701, 701, -1, 702, 702, 702, 702,
+ 702, 702, -1, 702, -1, -1, -1, -1,
+ 702, -1, -1, 702, -1, -1, -1, -1,
+ -1, -1, 702, 702, -1, -1, -1, -1,
+ 702, 702, 702, 702, 702, 703, 703, 703,
+ 703, 703, 703, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 701, 703, -1, -1,
+ -1, -1, -1, -1, -1, 703, 703, 703,
+ 703, 703, 703, -1, 703, -1, -1, -1,
+ -1, 703, -1, -1, 703, -1, -1, -1,
+ -1, -1, -1, 703, 703, -1, -1, -1,
+ -1, 703, 703, 703, 703, 703, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 702, 702, 702,
+ -1, -1, 702, 702, -1, -1, -1, 702,
+ -1, -1, -1, 702, 702, -1, 702, 702,
+ -1, -1, -1, -1, 702, 702, -1, -1,
+ 702, 702, 702, -1, 702, 702, -1, -1,
+ 702, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 703, 703,
+ 703, -1, -1, 703, 703, -1, 702, 702,
+ 703, -1, -1, -1, 703, 703, -1, 703,
+ 703, -1, -1, -1, -1, 703, 703, -1,
+ -1, 703, 703, 703, -1, 703, 703, -1,
+ -1, 703, -1, -1, -1, -1, -1, -1,
+ -1, -1, 704, 704, 704, 704, 704, 704,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 702, 704, -1, -1, -1, -1, 703,
+ 703, -1, 704, 704, 704, 704, 704, 704,
+ -1, 704, -1, -1, -1, -1, 704, -1,
+ -1, 704, -1, -1, -1, -1, -1, -1,
+ 704, 704, -1, -1, -1, -1, 704, 704,
+ 704, 704, 704, 705, 705, 705, 705, 705,
+ 705, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 703, 705, -1, -1, -1, -1,
+ -1, -1, -1, 705, 705, 705, 705, 705,
+ 705, -1, 705, -1, -1, -1, -1, 705,
+ -1, -1, 705, -1, -1, -1, -1, -1,
+ -1, 705, 705, -1, -1, -1, -1, 705,
+ 705, 705, 705, 705, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 704, 704, 704, -1, -1,
+ 704, 704, -1, -1, -1, 704, -1, -1,
+ -1, 704, 704, -1, 704, 704, -1, -1,
+ -1, -1, 704, 704, -1, -1, 704, 704,
+ 704, -1, 704, 704, -1, -1, 704, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 705, 705, 705, -1,
+ -1, 705, 705, -1, 704, 704, 705, -1,
+ -1, -1, 705, 705, -1, 705, 705, -1,
+ -1, -1, -1, 705, 705, -1, -1, 705,
+ 705, 705, -1, 705, 705, -1, -1, 705,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 706, 706, 706, 706, 706, 706, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 704,
+ 706, -1, -1, -1, -1, 705, 705, -1,
+ 706, 706, 706, 706, 706, 706, -1, 706,
+ -1, -1, -1, -1, 706, -1, -1, 706,
+ -1, -1, -1, -1, -1, -1, 706, 706,
+ -1, -1, -1, -1, 706, 706, 706, 706,
+ 706, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 705, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 706, 706, 706, -1, -1, 706, 706,
+ -1, -1, -1, 706, -1, -1, -1, 706,
+ 706, -1, 706, 706, -1, -1, -1, -1,
+ 706, 706, -1, -1, 706, 706, 706, -1,
+ 706, 706, -1, -1, 706, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 706, 706, -1, 786, 786, 786,
+ 786, 786, 786, 786, 786, 786, 786, 786,
+ 786, 786, 786, 786, 786, 786, 786, 786,
+ 786, 786, 412, 413, -1, 786, 786, 786,
+ 786, 786, 786, -1, 786, 786, 786, 786,
+ -1, 786, -1, 786, 786, 786, -1, 786,
+ 786, 786, 786, 786, 786, 706, 786, 786,
+ 786, 786, 786, 786, 786, 786, 786, -1,
+ 786, 786, 786, 786, -1, -1, -1, -1,
+ -1, -1, -1, 786, -1, -1, 786, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 786, 786, 786, 786, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 786, 786, 786,
+ 786, -1, -1, 786, 786, -1, 786, 786,
+ 786, -1, -1, -1, 786, 786, -1, 786,
+ 786, -1, -1, -1, -1, 786, -1, -1,
+ -1, 786, 786, 786, -1, 786, 786, -1,
+ -1, 786, -1, -1, -1, -1, -1, -1,
+ -1, -1, 786, 407, 409, 411, -1, -1,
+ -1, 786, 786, -1, -1, 786, 786, 786,
+ 786, 786, 786, 786, 786, -1, 786, 786,
+ 786, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 786,
+ 786, 786, 786, 786, -1, 48, 49, 50,
+ 51, 77, 78, 79, 80, 985, 76, 786,
+ 34, 35, 38, 36, 786, -1, -1, 100,
+ 96, 98, 94, 92, -1, -1, -1, 39,
+ 40, 41, -1, -1, -1, 87, -1, -1,
+ -1, 88, 85, 84, 86, -1, -1, -1,
+ 72, 73, 74, -1, -1, -1, -1, 56,
+ 71, -1, 104, 106, 108, 110, -1, -1,
+ -1, -1, -1, -1, -1, 75, -1, -1,
+ 985, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 66, 67, 68, 69, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 793, 793, 793, 793, 793, 793, 793,
+ 793, 793, 793, 793, 793, 793, 793, 793,
+ 793, 793, 793, 793, 793, 793, 793, 793,
+ -1, 793, 793, 793, 793, 793, 793, -1,
+ 793, 793, 793, 793, -1, 793, -1, 793,
+ 793, 793, -1, 793, 793, 793, 793, 793,
+ 793, -1, 793, 793, 793, 793, 793, 793,
+ 793, 793, 793, -1, 793, 793, 793, 793,
+ -1, -1, -1, 786, -1, -1, -1, 793,
+ -1, -1, 793, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 272, 793, 793, 793,
+ 793, -1, -1, 985, 985, 405, -1, 33,
+ 31, 32, 52, 62, 63, 64, 65, -1,
+ 70, 82, 90, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 102, 89, 81, 37, 58, -1, -1,
+ -1, 793, 793, 793, 793, -1, -1, 793,
+ 793, -1, 793, 793, 793, -1, 271, -1,
+ 793, 793, -1, 793, 793, -1, -1, -1,
+ -1, 793, -1, -1, -1, 793, 793, 793,
+ -1, 793, 793, -1, -1, 793, -1, -1,
+ -1, -1, -1, -1, -1, -1, 793, 793,
+ 793, 793, -1, -1, -1, 793, 793, -1,
+ -1, 793, 793, 793, 793, 793, 793, 793,
+ 793, -1, 793, 793, 793, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 793, 793, 793, 793, 793,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 793, -1, -1, -1, -1,
+ 793, -1, 776, 776, 776, 776, 776, 776,
+ 776, 776, 776, 776, 776, 776, 776, 776,
+ 776, 776, 776, 776, 776, 776, 776, 776,
+ 776, -1, 776, 776, 776, 776, 776, 776,
+ -1, 776, 776, 776, 776, -1, 776, -1,
+ 776, 776, 776, -1, 776, 776, 776, 776,
+ 776, 776, -1, 776, 776, 776, 776, 776,
+ 776, 776, 776, 776, -1, 776, 776, 776,
+ 776, -1, -1, -1, -1, -1, -1, -1,
+ 776, -1, -1, 776, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 776, 776,
+ 776, 776, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 406, 408, 410,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 776, 776, 776, 776, -1, 793,
+ 776, 776, -1, 776, 776, 776, -1, -1,
+ -1, 776, 776, -1, 776, 776, -1, -1,
+ -1, -1, 776, -1, -1, -1, 776, 776,
+ 776, -1, 776, 776, -1, -1, 776, -1,
+ -1, -1, -1, -1, -1, -1, -1, 776,
+ 776, 776, 776, -1, -1, -1, 776, 776,
+ -1, -1, 776, 776, 776, 776, 776, 776,
+ 776, 776, -1, 776, 776, 776, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 776, 776, 776, 776,
+ 776, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 776, -1, -1, -1,
+ -1, 776, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 720, 720, 720, 720, 720,
+ 720, 720, 720, 720, 720, 720, 720, 720,
+ 720, -1, 720, 720, 720, 720, 720, 720,
+ -1, -1, -1, 720, 720, 720, 720, 720,
+ 720, -1, 720, 720, 720, 720, -1, 720,
+ -1, 720, 720, 720, -1, 720, 720, 720,
+ 720, 720, 720, -1, 720, 720, 720, 720,
+ 720, 720, 720, 720, 720, -1, 720, 720,
+ 720, 720, -1, -1, -1, -1, -1, -1,
+ -1, 720, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 272, 720,
+ 720, 720, 720, -1, -1, -1, -1, 405,
+ -1, 33, 31, 32, 52, 62, 63, 64,
+ 65, -1, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 776, -1, -1, 102, 89, 81, 37, 58,
+ -1, -1, -1, 720, 720, 720, 720, -1,
+ -1, 720, 720, 720, 720, 720, 720, -1,
+ 271, -1, 720, 720, 720, 720, 720, -1,
+ -1, -1, -1, 720, -1, -1, -1, 720,
+ 720, 720, -1, 720, 720, -1, -1, 720,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 720, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 720, 720, 720, 720, 720,
+ 720, 720, 720, -1, 720, 720, 720, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 720, 720, 720,
+ 720, 720, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 720, -1, 720,
+ -1, 719, 719, 719, 719, 719, 719, 719,
+ 719, 719, 719, 719, 719, 719, 719, -1,
+ 719, 719, 719, 719, 719, 719, -1, -1,
+ -1, 719, 719, 719, 719, 719, 719, -1,
+ 719, 719, 719, 719, -1, 719, -1, 719,
+ 719, 719, -1, 719, 719, 719, 719, 719,
+ 719, -1, 719, 719, 719, 719, 719, 719,
+ 719, 719, 719, -1, 719, 719, 719, 719,
+ -1, -1, -1, -1, -1, -1, -1, 719,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 719, 719, 719,
+ 719, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 719, 719, 719, 719, -1, -1, 719,
+ 719, 720, 719, 719, 719, -1, -1, -1,
+ 719, 719, -1, 719, 719, -1, -1, -1,
+ -1, 719, 719, -1, -1, 719, 719, 719,
+ -1, 719, 719, -1, -1, 719, -1, -1,
+ -1, -1, -1, -1, -1, -1, 719, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 719, 719, 719, 719, 719, 719, 719,
+ 719, -1, 719, 719, 719, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 719, 719, 719, 719, 719,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 719, -1, -1, 719, 48,
+ 49, 50, 51, 77, 78, 79, 80, 985,
+ 76, -1, 34, 35, 38, 36, -1, -1,
+ -1, 100, 96, 98, 94, 92, -1, -1,
+ -1, 39, 40, 41, -1, -1, -1, 87,
+ -1, -1, -1, 88, 85, 84, 86, -1,
+ -1, -1, 72, 73, 74, -1, -1, -1,
+ -1, 56, 71, -1, 104, 106, 108, 110,
+ -1, -1, -1, -1, -1, -1, -1, 75,
+ -1, -1, 985, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 66, 67, 68,
+ 69, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 719,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 272, -1,
+ -1, -1, -1, -1, -1, 985, 985, -1,
+ -1, 33, 31, 32, 52, 62, 63, 64,
+ 65, -1, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 37, 58,
+ -1, -1, 721, 721, 721, 721, 721, 721,
+ 721, 721, 721, 721, 721, 721, 721, 721,
+ 422, 721, 721, 721, 721, 721, 721, -1,
+ -1, -1, 721, 721, 721, 721, 721, 721,
+ -1, 721, 721, 721, 721, -1, 721, -1,
+ 721, 721, 721, -1, 721, 721, 721, 721,
+ 721, 721, -1, 721, 721, 721, 721, 721,
+ 721, 721, 721, 721, -1, 721, 721, 721,
+ 721, -1, -1, -1, -1, -1, -1, -1,
+ 721, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 721, 721,
+ 721, 721, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 721, 721, 721, 721, -1, -1,
+ 721, 721, -1, 721, 721, 721, -1, -1,
+ -1, 721, 721, -1, 721, 721, -1, -1,
+ -1, -1, 721, -1, -1, -1, 721, 721,
+ 721, -1, 721, 721, -1, -1, 721, -1,
+ -1, -1, -1, -1, -1, -1, -1, 721,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 721, 721, 721, 721, 721, 721,
+ 721, 721, -1, 721, 721, 721, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 721, 721, 721, 721,
+ 721, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 721, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 734, 734, 734, 734, 734, 734, 734,
+ 734, 734, 734, 734, 734, 734, 734, -1,
+ 734, 734, 734, 734, 734, 734, -1, -1,
+ -1, 734, 734, 734, 734, 734, 734, -1,
+ 734, 734, 734, 734, -1, 734, -1, 734,
+ 734, 734, -1, 734, 734, 734, 734, 734,
+ 734, 734, 734, 734, 734, 734, 734, 734,
+ 734, 734, 734, 734, 734, 734, 734, 734,
+ -1, -1, -1, -1, -1, -1, -1, 734,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 734, 734, 734,
+ 734, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 721, 734, 734, 734, 734, -1, -1, 734,
+ 734, 734, 734, 734, 734, -1, -1, -1,
+ 734, 734, 734, 734, 734, -1, 734, 734,
+ -1, 734, 734, -1, -1, 734, 734, 734,
+ -1, 734, 734, -1, -1, 734, -1, -1,
+ -1, -1, -1, -1, -1, -1, 734, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 734, 734, 734, 734, 734, 734, 734,
+ 734, -1, 734, 734, 734, -1, -1, -1,
+ 272, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 33, 31, 32, 52, 62,
+ 63, 64, 65, -1, 70, 82, 90, -1,
+ -1, -1, -1, 734, 734, 734, 734, 734,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 734, -1, 734, 734, -1,
+ -1, -1, -1, -1, -1, 102, 89, 81,
+ 37, 58, -1, -1, 740, 740, 740, 740,
+ 740, 740, 740, 740, 740, 740, 740, 740,
+ 740, 740, 422, 740, 740, 740, 740, 740,
+ 740, -1, -1, -1, 740, 740, 740, 740,
+ 740, 740, -1, 740, 740, 740, 740, -1,
+ 740, -1, 740, 740, 740, -1, 740, 740,
+ 740, 740, 740, 740, 740, 740, 740, 740,
+ 740, 740, 740, 740, 740, 740, 740, 740,
+ 740, 740, 740, -1, -1, -1, -1, -1,
+ -1, -1, 740, -1, -1, -1, -1, 25,
+ 26, 979, 23, 21, 24, -1, -1, -1,
+ 740, 740, 740, 740, -1, 432, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 729,
+ 729, 729, 729, 729, 30, -1, 43, -1,
+ -1, -1, -1, -1, -1, -1, 44, -1,
+ -1, -1, -1, -1, -1, 22, 27, -1,
+ -1, -1, -1, 59, 60, 61, -1, 54,
+ -1, -1, -1, -1, -1, -1, -1, 734,
+ -1, -1, -1, -1, 740, 740, 740, 740,
+ -1, -1, 740, 740, 740, 740, 740, 740,
+ -1, -1, -1, 740, 740, 740, 740, 740,
+ -1, 740, 740, 431, 740, 740, -1, -1,
+ 740, 740, 740, -1, 740, 740, -1, -1,
+ 740, -1, -1, -1, -1, -1, -1, -1,
+ -1, 740, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 740, 740, 740, 740,
+ 740, 740, 740, 740, -1, 740, 740, 740,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 296, 45, -1, -1, 295, -1, 282,
+ 294, -1, 293, -1, -1, -1, 29, 292,
+ 283, 291, 284, -1, -1, -1, 740, 740,
+ 740, 740, 740, 289, 290, 285, -1, 286,
+ 287, -1, -1, 288, -1, -1, 740, -1,
+ 740, 740, -1, 679, 679, 679, 679, 679,
+ 679, -1, -1, -1, -1, -1, -1, 297,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 729, 729, 679, 679, 679, 679, 679,
+ 679, -1, 679, -1, -1, -1, -1, -1,
+ -1, -1, 679, -1, -1, -1, -1, -1,
+ -1, 679, 679, -1, -1, -1, -1, 679,
+ 679, 679, -1, 679, -1, -1, -1, -1,
+ -1, 680, 680, 680, 680, 680, 680, -1,
+ -1, -1, -1, 433, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 680, 680, 680, 680, 680, 680, -1,
+ 680, -1, -1, -1, -1, -1, -1, -1,
+ 680, -1, -1, -1, -1, -1, -1, 680,
+ 680, -1, -1, -1, -1, 680, 680, 680,
+ -1, 680, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 681,
+ 681, 681, 681, 681, 681, 679, 679, -1,
+ -1, 679, 740, 679, 679, -1, 679, -1,
+ -1, -1, 679, 679, 679, 679, 679, 681,
+ 681, 681, 681, 681, 681, -1, 681, 679,
+ 679, 679, -1, 679, 679, -1, 681, 679,
+ -1, -1, -1, -1, -1, 681, 681, -1,
+ -1, -1, -1, 681, 681, 681, -1, 681,
+ -1, -1, -1, 679, -1, 682, 682, 682,
+ 682, 682, 682, 680, 680, 679, 679, 680,
+ -1, 680, 680, -1, 680, -1, -1, -1,
+ 680, 680, 680, 680, 680, 682, 682, 682,
+ 682, 682, 682, -1, 682, 680, 680, 680,
+ -1, 680, 680, -1, 682, 680, -1, -1,
+ -1, -1, -1, 682, 682, -1, -1, -1,
+ -1, 682, 682, 682, -1, 682, -1, 679,
+ -1, 680, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 680, 680, -1, -1, -1,
+ -1, -1, -1, 683, 683, 683, 683, 683,
+ 683, 681, 681, -1, -1, 681, -1, 681,
+ 681, -1, 681, -1, -1, -1, 681, 681,
+ 681, 681, 681, 683, 683, 683, 683, 683,
+ 683, -1, 683, 681, 681, 681, -1, 681,
+ 681, -1, 683, 681, -1, 680, -1, -1,
+ -1, 683, 683, -1, -1, -1, -1, 683,
+ 683, 683, -1, 683, -1, -1, -1, 681,
+ -1, -1, -1, -1, -1, -1, -1, 682,
+ 682, 681, 681, 682, -1, 682, 682, -1,
+ 682, -1, -1, -1, 682, 682, 682, 682,
+ 682, -1, -1, -1, -1, -1, -1, -1,
+ -1, 682, 682, 682, -1, 682, 682, -1,
+ -1, 682, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 681, -1, 682, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 682,
+ 682, -1, -1, -1, -1, -1, -1, 684,
+ 684, 684, 684, 684, 684, 683, 683, -1,
+ -1, 683, -1, 683, 683, -1, 683, -1,
+ -1, -1, 683, 683, 683, 683, 683, 684,
+ 684, 684, 684, 684, 684, 431, 684, 683,
+ 683, 683, -1, 683, 683, -1, 684, 683,
+ -1, 682, -1, -1, -1, 684, 684, -1,
+ -1, -1, -1, 684, 684, 684, -1, 684,
+ -1, -1, -1, 683, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 683, 683, -1,
+ -1, -1, -1, -1, -1, 685, 685, 685,
+ 685, 685, 685, 296, 45, -1, -1, 295,
+ -1, 282, 294, -1, 293, -1, -1, -1,
+ 29, 292, 283, 291, 284, 685, 685, 685,
+ 685, 685, 685, -1, 685, 289, 290, 285,
+ -1, 286, 287, -1, 685, 288, -1, 683,
+ -1, -1, -1, 685, 685, -1, -1, -1,
+ -1, 685, 685, 685, -1, 685, -1, -1,
+ -1, 297, -1, 686, 686, 686, 686, 686,
+ 686, 684, 684, -1, -1, 684, -1, 684,
+ 684, -1, 684, -1, -1, -1, 684, 684,
+ 684, 684, 684, 686, 686, 686, 686, 686,
+ 686, -1, 686, 684, 684, 684, -1, 684,
+ 684, -1, 686, 684, -1, -1, -1, -1,
+ -1, 686, 686, -1, -1, -1, -1, 686,
+ 686, 686, -1, 686, -1, 433, -1, 684,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 684, 684, -1, -1, -1, -1, -1,
+ -1, 687, 687, 687, 687, 687, 687, 685,
+ 685, -1, -1, 685, -1, 685, 685, -1,
+ 685, -1, -1, -1, 685, 685, 685, 685,
+ 685, 687, 687, 687, 687, 687, 687, -1,
+ 687, 685, 685, 685, -1, 685, 685, -1,
+ 687, 685, -1, 684, -1, -1, -1, 687,
+ 687, -1, -1, -1, -1, 687, 687, 687,
+ -1, 687, -1, -1, -1, 685, -1, 688,
+ 688, 688, 688, 688, 688, 686, 686, 685,
+ 685, 686, -1, 686, 686, -1, 686, -1,
+ -1, -1, 686, 686, 686, 686, 686, 688,
+ 688, 688, 688, 688, 688, -1, 688, 686,
+ 686, 686, -1, 686, 686, -1, 688, 686,
+ -1, -1, -1, -1, -1, 688, 688, -1,
+ -1, -1, -1, 688, 688, 688, -1, 688,
+ -1, 685, -1, 686, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 686, 686, -1,
+ -1, -1, -1, -1, -1, 689, 689, 689,
+ 689, 689, 689, 687, 687, -1, -1, 687,
+ -1, 687, 687, -1, 687, -1, -1, -1,
+ 687, 687, 687, 687, 687, 689, 689, 689,
+ 689, 689, 689, -1, 689, 687, 687, 687,
+ -1, 687, 687, -1, 689, 687, -1, 686,
+ -1, -1, -1, 689, 689, -1, -1, -1,
+ -1, 689, 689, 689, -1, 689, -1, -1,
+ -1, 687, -1, 690, 690, 690, 690, 690,
+ 690, 688, 688, 687, 687, 688, -1, 688,
+ 688, -1, 688, -1, -1, -1, 688, 688,
+ 688, 688, 688, 690, 690, 690, 690, 690,
+ 690, -1, 690, 688, 688, 688, -1, 688,
+ 688, -1, 690, 688, -1, -1, -1, -1,
+ -1, 690, 690, -1, -1, -1, -1, 690,
+ 690, 690, -1, 690, -1, 687, -1, 688,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 688, 688, -1, -1, -1, -1, -1,
+ -1, 691, 691, 691, 691, 691, 691, 689,
+ 689, -1, -1, 689, -1, 689, 689, -1,
+ 689, -1, -1, -1, 689, 689, 689, 689,
+ 689, 691, 691, 691, 691, 691, 691, -1,
+ 691, 689, 689, 689, -1, 689, 689, -1,
+ 691, 689, -1, 688, -1, -1, -1, 691,
+ 691, -1, -1, -1, -1, 691, 691, 691,
+ -1, 691, -1, -1, -1, 689, -1, 731,
+ 731, 731, 731, 731, 731, 690, 690, 689,
+ 689, 690, -1, 690, 690, -1, 690, -1,
+ -1, -1, 690, 690, 690, 690, 690, 731,
+ 731, 731, 731, 731, 731, -1, 731, 690,
+ 690, 690, -1, 690, 690, -1, 731, 690,
+ -1, -1, -1, -1, -1, 731, 731, -1,
+ -1, -1, -1, 731, 731, 731, -1, 731,
+ -1, 689, -1, 690, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 690, 690, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 691, 691, -1, -1, 691,
+ -1, 691, 691, -1, 691, -1, -1, -1,
+ 691, 691, 691, 691, 691, -1, -1, -1,
+ -1, -1, -1, -1, -1, 691, 691, 691,
+ -1, 691, 691, -1, -1, 691, -1, 690,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 691, -1, -1, -1, -1, -1, -1,
+ -1, 731, 731, 691, 691, 731, -1, 731,
+ 731, -1, 731, -1, -1, -1, 731, 731,
+ 731, 731, 731, -1, -1, -1, -1, -1,
+ -1, -1, -1, 731, 731, 731, -1, 731,
+ 731, -1, -1, 731, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 691, -1, 731,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 731, 731, -1, -1, -1, -1, -1,
+ -1, -1, 800, 800, 800, 800, 800, 800,
+ 800, 800, 800, 800, 800, 800, 800, 800,
+ 800, 800, 800, 800, 800, 800, 800, 800,
+ 800, -1, 800, 800, 800, 800, 800, 800,
+ -1, 800, 800, 800, 800, 800, 800, -1,
+ 800, 800, 800, 731, 800, 800, 800, 800,
+ 800, 800, 800, 800, 800, 800, 800, 800,
+ 800, 800, 800, 800, -1, 800, 800, 800,
+ 800, -1, -1, -1, -1, -1, -1, -1,
+ 800, -1, -1, 800, -1, -1, 800, -1,
+ -1, -1, -1, -1, -1, -1, 800, 800,
+ 800, 800, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 800, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 800, 800, 800, 800, -1, -1,
+ 800, 800, 800, 800, 800, 800, -1, -1,
+ -1, 800, 800, 800, 800, 800, -1, -1,
+ 800, -1, 800, -1, -1, 800, 800, 800,
+ 800, -1, 800, 800, -1, -1, 800, -1,
+ -1, -1, -1, -1, 800, -1, 800, 800,
+ 800, 800, 800, -1, -1, -1, 800, 800,
+ -1, 800, 800, 800, 800, 800, 800, 800,
+ 800, 800, -1, 800, 800, 800, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 800, 800, 800, 800,
+ 800, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 800, -1, 800, -1,
+ 800, 800, -1, 925, 925, 925, 925, 925,
+ 925, 925, 925, 925, 925, 925, 925, 925,
+ 925, 925, 925, 925, 925, 925, 925, 925,
+ 925, 925, -1, 925, 925, 925, 925, 925,
+ 925, -1, 925, 925, 925, 925, -1, 925,
+ -1, 925, 925, 925, -1, 925, 925, 925,
+ 925, 925, 925, -1, 925, 925, 925, 925,
+ 925, 925, 925, 925, 925, 925, 925, 925,
+ 925, 925, 925, -1, 925, -1, -1, -1,
+ -1, 925, 925, 925, 925, 925, -1, -1,
+ 925, 925, -1, 925, 925, 925, 925, 925,
+ 925, 925, 925, 925, 925, 925, 925, -1,
+ -1, -1, -1, -1, 925, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 925, 925, 925, 925, -1,
+ 800, 925, 925, 925, 925, 925, 925, -1,
+ -1, -1, 925, 925, 925, 925, 925, -1,
+ -1, -1, -1, 925, -1, -1, -1, 925,
+ 925, 925, -1, 925, 925, -1, -1, 925,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 925, 925, 925, 925, 925, -1, 925, 925,
+ 925, -1, -1, 925, 925, 925, 925, 925,
+ 925, 925, 925, -1, 925, 925, 925, -1,
+ -1, -1, 925, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 925, 925, -1,
+ -1, 925, -1, -1, -1, -1, 925, -1,
+ -1, -1, -1, 925, -1, 925, 925, 925,
+ 925, 925, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 925, -1, 925,
+ -1, -1, 925, 925, -1, -1, -1, 925,
+ -1, 925, -1, 925, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, -1, 868, 868, 868, 868,
+ 868, 868, -1, 868, 868, 868, 868, -1,
+ 868, -1, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, -1, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ 868, 868, 868, 868, -1, 868, -1, -1,
+ 868, -1, 868, 868, 868, 868, 868, -1,
+ -1, 868, 868, -1, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ -1, -1, -1, -1, -1, 868, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 925, -1, -1, 868, 868, 868, 868,
+ -1, -1, 868, 868, 868, 868, 868, 868,
+ -1, -1, -1, 868, 868, 868, 868, 868,
+ -1, -1, -1, -1, 868, -1, -1, -1,
+ 868, 868, 868, -1, 868, 868, -1, -1,
+ 868, -1, -1, -1, -1, -1, -1, -1,
+ -1, 868, 868, 868, 868, 868, -1, 868,
+ 868, 868, 868, -1, 868, 868, 868, 868,
+ 868, 868, 868, 868, 868, 868, 868, 868,
+ -1, -1, -1, 868, 868, -1, -1, -1,
+ 868, 868, -1, 868, -1, -1, 868, 868,
+ -1, -1, 868, -1, 868, 868, -1, 868,
+ -1, 868, 868, -1, 868, -1, 868, 868,
+ 868, 868, 868, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 868, -1,
+ 868, -1, -1, 868, 868, -1, 868, -1,
+ 868, -1, 868, -1, 868, 869, 869, 869,
+ 869, 869, 869, 869, 869, 869, 869, 869,
+ 869, 869, 869, 869, 869, 869, 869, 869,
+ 869, 869, 869, 869, -1, 869, 869, 869,
+ 869, 869, 869, -1, 869, 869, 869, 869,
+ -1, 869, -1, 869, 869, 869, 869, 869,
+ 869, 869, 869, 869, 869, -1, 869, 869,
+ 869, 869, 869, 869, 869, 869, 869, 869,
+ 869, 869, 869, 869, 869, -1, 869, -1,
+ -1, 869, -1, 869, 869, 869, 869, 869,
+ -1, -1, 869, 869, -1, 869, 869, 869,
+ 869, 869, 869, 869, 869, 869, 869, 869,
+ 869, -1, -1, -1, -1, -1, 869, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 868, -1, -1, 869, 869, 869,
+ 869, -1, -1, 869, 869, 869, 869, 869,
+ 869, -1, -1, -1, 869, 869, 869, 869,
+ 869, -1, -1, -1, -1, 869, -1, -1,
+ -1, 869, 869, 869, -1, 869, 869, -1,
+ -1, 869, -1, -1, -1, -1, -1, -1,
+ -1, -1, 869, 869, 869, 869, 869, -1,
+ 869, 869, 869, 869, -1, 869, 869, 869,
+ 869, 869, 869, 869, 869, 869, 869, 869,
+ 869, -1, -1, -1, 869, 869, -1, -1,
+ -1, 869, 869, -1, 869, -1, -1, 869,
+ 869, -1, -1, 869, -1, 869, 869, -1,
+ 869, -1, 869, 869, -1, 869, -1, 869,
+ 869, 869, 869, 869, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 869,
+ -1, 869, -1, -1, 869, 869, -1, 869,
+ -1, 869, -1, 869, -1, 869, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, -1, 926, 926,
+ 926, 926, 926, 926, -1, 926, 926, 926,
+ 926, -1, 926, -1, 926, 926, 926, -1,
+ 926, 926, 926, 926, 926, 926, -1, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, 926, -1, 926,
+ -1, -1, -1, -1, 926, 926, 926, 926,
+ 926, -1, -1, 926, 926, -1, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, -1, -1, -1, -1, -1, 926,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 869, -1, -1, 926, 926,
+ 926, 926, -1, -1, 926, 926, 926, 926,
+ 926, 926, -1, -1, -1, 926, 926, 926,
+ 926, 926, -1, -1, -1, -1, 926, -1,
+ -1, -1, 926, 926, 926, -1, 926, 926,
+ -1, -1, 926, -1, -1, -1, -1, -1,
+ -1, -1, -1, 926, 926, 926, 926, 926,
+ -1, 926, 926, 926, -1, -1, 926, 926,
+ 926, 926, 926, 926, 926, 926, -1, 926,
+ 926, 926, -1, -1, -1, 926, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 926, 926, -1, -1, 926, -1, -1, -1,
+ -1, 926, -1, -1, -1, -1, 926, -1,
+ 926, 926, 926, 926, 926, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 926, -1, 926, -1, -1, 926, 926, -1,
+ -1, -1, 926, -1, 926, -1, 926, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, -1, 870,
+ 870, 870, 870, 870, 870, -1, 870, 870,
+ 870, 870, -1, 870, -1, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, -1,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, 870, 870, 870, 870, -1,
+ 870, -1, -1, 870, -1, 870, 870, 870,
+ 870, 870, -1, -1, 870, 870, -1, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, -1, -1, -1, -1, -1,
+ 870, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 926, -1, -1, 870,
+ 870, 870, 870, -1, -1, 870, 870, 870,
+ 870, 870, 870, -1, -1, -1, 870, 870,
+ 870, 870, 870, -1, -1, -1, -1, 870,
+ 870, -1, -1, 870, 870, 870, -1, 870,
+ 870, -1, -1, 870, -1, -1, -1, -1,
+ -1, -1, -1, -1, 870, 870, 870, 870,
+ 870, -1, 870, 870, 870, 870, -1, 870,
+ 870, 870, 870, 870, 870, 870, 870, 870,
+ 870, 870, 870, -1, -1, -1, 870, 870,
+ -1, -1, -1, 870, 870, -1, 870, -1,
+ -1, 870, 870, -1, -1, 870, -1, 870,
+ 870, -1, 870, -1, 870, 870, -1, 870,
+ -1, 870, 870, 870, 870, 870, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 870, -1, 870, 870, -1, 870, 870,
+ -1, 870, -1, 870, -1, 870, -1, 870,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, -1,
+ 871, 871, 871, 871, 871, 871, -1, 871,
+ 871, 871, 871, -1, 871, -1, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ -1, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ -1, 871, -1, -1, 871, -1, 871, 871,
+ 871, 871, 871, -1, -1, 871, 871, -1,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, -1, -1, -1, -1,
+ -1, 871, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 870, -1, -1,
+ 871, 871, 871, 871, -1, -1, 871, 871,
+ 871, 871, 871, 871, -1, -1, -1, 871,
+ 871, 871, 871, 871, -1, -1, -1, -1,
+ 871, 871, -1, -1, 871, 871, 871, -1,
+ 871, 871, -1, -1, 871, -1, -1, -1,
+ -1, -1, -1, -1, -1, 871, 871, 871,
+ 871, 871, -1, 871, 871, 871, 871, -1,
+ 871, 871, 871, 871, 871, 871, 871, 871,
+ 871, 871, 871, 871, -1, -1, -1, 871,
+ 871, -1, -1, -1, 871, 871, -1, 871,
+ -1, -1, 871, 871, -1, -1, 871, -1,
+ 871, 871, -1, 871, -1, 871, 871, -1,
+ 871, -1, 871, 871, 871, 871, 871, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 871, -1, 871, 871, -1, 871,
+ 871, -1, 871, -1, 871, -1, 871, -1,
+ 871, 927, 927, 927, 927, 927, 927, 927,
+ 927, 927, 927, 927, 927, 927, 927, 927,
+ 927, 927, 927, 927, 927, 927, 927, 927,
+ -1, 927, 927, 927, 927, 927, 927, -1,
+ 927, 927, 927, 927, -1, 927, -1, 927,
+ 927, 927, -1, 927, 927, 927, 927, 927,
+ 927, -1, 927, 927, 927, 927, 927, 927,
+ 927, 927, 927, 927, 927, 927, 927, 927,
+ 927, -1, 927, -1, -1, -1, -1, 927,
+ 927, 927, 927, 927, -1, -1, 927, 927,
+ -1, 927, 927, 927, 927, 927, 927, 927,
+ 927, 927, 927, 927, 927, -1, -1, -1,
+ -1, -1, 927, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 871, -1,
+ -1, 927, 927, 927, 927, -1, -1, 927,
+ 927, 927, 927, 927, 927, -1, -1, -1,
+ 927, 927, 927, 927, 927, -1, -1, -1,
+ -1, 927, -1, -1, -1, 927, 927, 927,
+ -1, 927, 927, -1, -1, 927, -1, -1,
+ -1, -1, -1, -1, -1, -1, 927, 927,
+ 927, 927, 927, -1, 927, 927, 927, -1,
+ -1, 927, 927, 927, 927, 927, 927, 927,
+ 927, -1, 927, 927, 927, -1, -1, -1,
+ 927, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 927, 927, -1, -1, 927,
+ -1, -1, -1, -1, 927, -1, -1, -1,
+ -1, 927, -1, 927, 927, 927, 927, 927,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 927, -1, 927, -1, -1,
+ 927, 927, -1, -1, -1, 927, -1, 927,
+ -1, 927, 922, 922, 922, 922, -1, 922,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 922, 922, 922, 922, 922, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 922, -1,
+ -1, -1, 922, 922, 922, 922, -1, -1,
+ -1, 922, 922, 922, -1, -1, -1, -1,
+ 922, 922, -1, 922, 922, 922, 922, 922,
+ -1, -1, -1, -1, -1, -1, 922, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 922, 922, 922, 922,
+ -1, -1, 182, 183, -1, -1, -1, -1,
+ -1, 922, -1, -1, -1, -1, -1, 928,
+ 928, 928, 928, 928, 928, 928, 928, 928,
+ 928, 928, 928, 928, 928, 928, 928, 928,
+ 928, 928, 928, 928, 928, 928, -1, 928,
+ 928, 928, 928, 928, 928, -1, 928, 928,
+ 928, 928, -1, 928, -1, 928, 928, 928,
+ -1, 928, 928, 928, 928, 928, 928, 927,
+ 928, 928, 928, 928, 928, 928, 928, 928,
+ 928, 928, 928, 928, 928, 928, 928, -1,
+ 928, -1, -1, -1, -1, 928, 928, 928,
+ 928, 928, -1, -1, 928, 928, -1, 928,
+ 928, 928, 928, 928, 928, 928, 928, 928,
+ 928, 928, 928, -1, -1, -1, -1, -1,
+ 928, -1, -1, 922, 922, 922, 922, 922,
+ -1, 922, 922, 922, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 922, 922, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 922, -1, 922, 922, 922, 922, 922, 928,
+ 928, 928, 928, -1, -1, 928, 928, 928,
+ 928, 928, 928, -1, -1, -1, 928, 928,
+ 928, 928, 928, -1, -1, -1, -1, 928,
+ 922, -1, -1, 928, 928, 928, -1, 928,
+ 928, -1, -1, 928, -1, -1, -1, -1,
+ -1, -1, -1, -1, 928, 928, 928, 928,
+ 928, -1, 928, 928, 928, -1, -1, 928,
+ 928, 928, 928, 928, 928, 928, 928, -1,
+ 928, 928, 928, -1, -1, -1, 928, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 928, 928, -1, -1, 928, -1, -1,
+ -1, -1, 928, -1, -1, -1, -1, 928,
+ -1, 928, 928, 928, 928, 928, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 928, -1, 928, -1, -1, 928, 928,
+ -1, -1, -1, 928, -1, 928, -1, 928,
+ 836, 836, 836, 836, 836, 836, 836, 836,
+ 836, 836, 836, 836, 836, 836, 836, 836,
+ 836, 836, 836, 836, 836, 836, 836, -1,
+ 836, 836, 836, 836, 836, 836, -1, 836,
+ 836, 836, 836, -1, 836, -1, 836, 836,
+ 836, -1, 836, 836, 836, 836, 836, 836,
+ -1, 836, 836, 836, 836, 836, 836, 836,
+ 836, 836, 836, 836, 836, 836, 836, 836,
+ -1, 836, -1, -1, -1, -1, 836, 836,
+ 836, 836, 836, -1, -1, 836, 836, -1,
+ 836, 836, 836, 836, 836, 836, 836, 836,
+ 836, 836, 836, 836, -1, -1, -1, -1,
+ -1, 836, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 928, -1, -1,
+ 836, 836, 836, 836, -1, -1, 836, 836,
+ 836, 836, 836, 836, -1, -1, -1, 836,
+ 836, 836, 836, 836, -1, -1, -1, -1,
+ 836, -1, -1, -1, 836, 836, 836, -1,
+ 836, 836, -1, -1, 836, -1, -1, -1,
+ -1, -1, -1, -1, -1, 836, 836, 836,
+ 836, 836, -1, 836, 836, 836, -1, -1,
+ 836, 836, 836, 836, 836, 836, 836, 836,
+ -1, 836, 836, 836, -1, -1, -1, 836,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 836, 836, -1, -1, 836, -1,
+ -1, -1, -1, 836, -1, -1, -1, -1,
+ 836, -1, 836, 836, 836, 836, 836, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 836, -1, 836, -1, -1, 836,
+ 836, -1, -1, -1, 836, -1, 836, -1,
+ 836, 716, 716, 716, 716, 716, 716, 716,
+ 716, 716, 716, 716, 716, 716, 716, -1,
+ 716, 716, 716, 716, 716, 716, -1, -1,
+ -1, 716, 716, 716, 716, 716, 716, -1,
+ 716, 716, 716, 716, -1, 716, -1, 716,
+ 716, 716, -1, 716, 716, 716, 716, 716,
+ 716, -1, 716, 716, 716, 716, 716, 716,
+ 716, 716, 716, -1, 716, 716, 716, 716,
+ -1, -1, -1, -1, 336, -1, -1, 716,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 716, -1, -1, -1, -1, 716, 716, 716,
+ 716, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 836, -1,
+ -1, 716, 716, 716, 716, -1, -1, 716,
+ 716, 716, 716, 716, 716, -1, -1, -1,
+ 716, 716, 716, 716, 716, -1, -1, -1,
+ -1, 716, 716, -1, -1, 716, 716, 716,
+ -1, 716, 716, -1, -1, 716, -1, -1,
+ -1, -1, -1, -1, -1, -1, 716, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 716, 716, 716, 716, 716, 716, 716,
+ 716, -1, 716, 716, 716, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 716, 716, 716, 716, 716,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 716, -1, 716, 716, -1,
+ -1, -1, 717, 717, 717, 717, 717, 717,
+ 717, 717, 717, 717, 717, 717, 717, 717,
+ -1, 717, 717, 717, 717, 717, 717, -1,
+ -1, -1, 717, 717, 717, 717, 717, 717,
+ -1, 717, 717, 717, 717, -1, 717, -1,
+ 717, 717, 717, -1, 717, 717, 717, 717,
+ 717, 717, -1, 717, 717, 717, 717, 717,
+ 717, 717, 717, 717, -1, 717, 717, 717,
+ 717, -1, -1, -1, -1, -1, -1, -1,
+ 717, -1, -1, -1, -1, -1, -1, -1,
+ -1, 717, -1, -1, -1, -1, 717, 717,
+ 717, 717, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 717, 717, 717, 717, -1, 716,
+ 717, 717, 717, 717, 717, 717, -1, -1,
+ -1, 717, 717, 717, 717, 717, -1, -1,
+ -1, -1, 717, 717, -1, -1, 717, 717,
+ 717, -1, 717, 717, -1, -1, 717, -1,
+ -1, -1, -1, -1, -1, -1, -1, 717,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 717, 717, 717, 717, 717, 717,
+ 717, 717, -1, 717, 717, 717, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 717, 717, 717, 717,
+ 717, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 717, -1, 717, 717,
+ -1, -1, -1, 798, 798, 798, 798, 798,
+ 798, 798, 798, 798, 798, 798, 798, 798,
+ 798, 798, 798, 798, 798, 798, 798, 798,
+ 798, 798, -1, 798, 798, 798, 798, 798,
+ 798, -1, 798, 798, 798, 798, -1, 798,
+ -1, 798, 798, 798, -1, 798, 798, 798,
+ 798, 798, 798, -1, 798, 798, 798, 798,
+ 798, 798, 798, 798, 798, -1, 798, 798,
+ 798, 798, -1, -1, -1, -1, -1, -1,
+ -1, 798, -1, -1, 798, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 798,
+ 798, 798, 798, -1, -1, 182, 183, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 798, 798, 798, 798, -1,
+ 717, 798, 798, 798, 798, 798, 798, -1,
+ -1, -1, 798, 798, 798, 798, 798, -1,
+ -1, -1, -1, 798, -1, -1, -1, 798,
+ 798, 798, -1, 798, 798, -1, -1, 798,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 798, 798, 798, 798, -1, -1, -1, 798,
+ 798, -1, -1, 798, 798, 798, 798, 798,
+ 798, 798, 798, -1, 798, 798, 798, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 798, 798, 798,
+ 798, 798, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 798, -1, 798,
+ -1, -1, 798, -1, 806, 806, 806, 806,
+ 806, 806, 806, 806, 806, 806, 806, 806,
+ 806, 806, 806, 806, 806, 806, 806, 806,
+ 806, 806, 806, -1, 806, 806, 806, 806,
+ 806, 806, -1, 806, 806, 806, 806, -1,
+ 806, -1, 806, 806, 806, -1, 806, 806,
+ 806, 806, 806, 806, -1, 806, 806, 806,
+ 806, 806, 806, 806, 806, 806, 806, 806,
+ 806, 806, 806, 806, -1, -1, -1, -1,
+ -1, -1, 806, 806, 806, 806, -1, -1,
+ -1, 184, 185, -1, 186, 187, 188, 189,
+ 806, 806, 806, 806, -1, -1, 806, 806,
+ -1, -1, -1, -1, -1, 806, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 806, 806, 806, 806,
+ -1, 798, 806, 806, 806, 806, 806, 806,
+ -1, -1, -1, 806, 806, 806, 806, 806,
+ -1, -1, -1, -1, 806, -1, -1, -1,
+ 806, 806, 806, -1, 806, 806, -1, -1,
+ 806, -1, -1, -1, -1, -1, -1, -1,
+ -1, 806, 806, 806, 806, 806, -1, 806,
+ 806, 806, -1, -1, 806, 806, 806, 806,
+ 806, 806, 806, 806, -1, 806, 806, 806,
+ -1, -1, -1, 806, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 806, 806,
+ -1, -1, 806, -1, -1, -1, -1, 806,
+ -1, -1, -1, -1, 806, -1, 806, 806,
+ 806, 806, 806, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 806, -1,
+ 806, -1, -1, 806, 806, -1, -1, -1,
+ 806, -1, 806, -1, 806, 807, 807, 807,
+ 807, 807, 807, 807, 807, 807, 807, 807,
+ 807, 807, 807, 807, 807, 807, 807, 807,
+ 807, 807, 807, 807, -1, 807, 807, 807,
+ 807, 807, 807, -1, 807, 807, 807, 807,
+ -1, 807, -1, 807, 807, 807, -1, 807,
+ 807, 807, 807, 807, 807, -1, 807, 807,
+ 807, 807, 807, 807, 807, 807, 807, 807,
+ 807, 807, 807, 807, 807, -1, -1, -1,
+ -1, -1, -1, 807, 807, 807, 807, -1,
+ -1, -1, 184, 185, -1, 186, 187, 188,
+ 189, 807, 807, 807, 807, -1, -1, 807,
+ 807, -1, -1, -1, -1, -1, 807, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 806, -1, -1, 807, 807, 807,
+ 807, -1, -1, 807, 807, 807, 807, 807,
+ 807, -1, -1, -1, 807, 807, 807, 807,
+ 807, -1, -1, -1, -1, 807, -1, -1,
+ -1, 807, 807, 807, -1, 807, 807, -1,
+ -1, 807, -1, -1, -1, -1, -1, -1,
+ -1, -1, 807, 807, 807, 807, 807, -1,
+ 807, 807, 807, -1, -1, 807, 807, 807,
+ 807, 807, 807, 807, 807, -1, 807, 807,
+ 807, -1, -1, -1, 807, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 807,
+ 807, -1, -1, 807, -1, -1, -1, -1,
+ 807, -1, -1, -1, -1, 807, -1, 807,
+ 807, 807, 807, 807, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 807,
+ -1, 807, -1, -1, 807, 807, -1, -1,
+ -1, 807, -1, 807, -1, 807, 809, 809,
+ 809, 809, 809, 809, 809, 809, 809, 809,
+ 809, 809, 809, 809, 809, 809, 809, 809,
+ 809, 809, 809, 809, 809, -1, 809, 809,
+ 809, 809, 809, 809, -1, 809, 809, 809,
+ 809, -1, 809, -1, 809, 809, 809, -1,
+ 809, 809, 809, 809, 809, 809, -1, 809,
+ 809, 809, 809, 809, 809, 809, 809, 809,
+ 809, 809, 809, 809, 809, 809, -1, -1,
+ -1, -1, -1, -1, 809, 809, 809, 809,
+ -1, -1, -1, 809, 809, -1, 809, 809,
+ 809, 809, 809, 809, 809, 809, 190, 191,
+ 809, 809, -1, -1, -1, -1, -1, 809,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 807, -1, -1, 809, 809,
+ 809, 809, -1, -1, 809, 809, 809, 809,
+ 809, 809, -1, -1, -1, 809, 809, 809,
+ 809, 809, -1, -1, -1, -1, 809, -1,
+ -1, -1, 809, 809, 809, -1, 809, 809,
+ -1, -1, 809, -1, -1, -1, -1, -1,
+ -1, -1, -1, 809, 809, 809, 809, 809,
+ -1, 809, 809, 809, -1, -1, 809, 809,
+ 809, 809, 809, 809, 809, 809, -1, 809,
+ 809, 809, -1, -1, -1, 809, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 809, 809, -1, -1, 809, -1, -1, -1,
+ -1, 809, -1, -1, -1, -1, 809, -1,
+ 809, 809, 809, 809, 809, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 809, -1, 809, -1, -1, 809, 809, -1,
+ -1, -1, 809, -1, 809, -1, 809, 810,
+ 810, 810, 810, 810, 810, 810, 810, 810,
+ 810, 810, 810, 810, 810, 810, 810, 810,
+ 810, 810, 810, 810, 810, 810, -1, 810,
+ 810, 810, 810, 810, 810, -1, 810, 810,
+ 810, 810, -1, 810, -1, 810, 810, 810,
+ -1, 810, 810, 810, 810, 810, 810, -1,
+ 810, 810, 810, 810, 810, 810, 810, 810,
+ 810, 810, 810, 810, 810, 810, 810, -1,
+ -1, -1, -1, -1, -1, 810, 810, 810,
+ 810, -1, -1, -1, 810, 810, -1, 810,
+ 810, 810, 810, 810, 810, 810, 810, 190,
+ 191, 810, 810, -1, -1, -1, -1, -1,
+ 810, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 809, -1, -1, 810,
+ 810, 810, 810, -1, -1, 810, 810, 810,
+ 810, 810, 810, -1, -1, -1, 810, 810,
+ 810, 810, 810, -1, -1, -1, -1, 810,
+ -1, -1, -1, 810, 810, 810, -1, 810,
+ 810, -1, -1, 810, -1, -1, -1, -1,
+ -1, -1, -1, -1, 810, 810, 810, 810,
+ 810, -1, 810, 810, 810, -1, -1, 810,
+ 810, 810, 810, 810, 810, 810, 810, -1,
+ 810, 810, 810, -1, -1, -1, 810, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 810, 810, -1, -1, 810, -1, -1,
+ -1, -1, 810, -1, -1, -1, -1, 810,
+ -1, 810, 810, 810, 810, 810, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 810, -1, 810, -1, -1, 810, 810,
+ -1, -1, -1, 810, -1, 810, -1, 810,
+ 811, 811, 811, 811, 811, 811, 811, 811,
+ 811, 811, 811, 811, 811, 811, 811, 811,
+ 811, 811, 811, 811, 811, 811, 811, -1,
+ 811, 811, 811, 811, 811, 811, -1, 811,
+ 811, 811, 811, -1, 811, -1, 811, 811,
+ 811, -1, 811, 811, 811, 811, 811, 811,
+ -1, 811, 811, 811, 811, 811, 811, 811,
+ 811, 811, 811, 811, 811, 811, 811, 811,
+ -1, -1, -1, -1, -1, -1, 811, 811,
+ 811, 811, -1, -1, -1, 811, 811, -1,
+ 811, 811, 811, 811, 811, 811, 811, 811,
+ 190, 191, 811, 811, -1, -1, -1, -1,
+ -1, 811, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 810, -1, -1,
+ 811, 811, 811, 811, -1, -1, 811, 811,
+ 811, 811, 811, 811, -1, -1, -1, 811,
+ 811, 811, 811, 811, -1, -1, -1, -1,
+ 811, -1, -1, -1, 811, 811, 811, -1,
+ 811, 811, -1, -1, 811, -1, -1, -1,
+ -1, -1, -1, -1, -1, 811, 811, 811,
+ 811, 811, -1, 811, 811, 811, -1, -1,
+ 811, 811, 811, 811, 811, 811, 811, 811,
+ -1, 811, 811, 811, -1, -1, -1, 811,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 811, 811, -1, -1, 811, -1,
+ -1, -1, -1, 811, -1, -1, -1, -1,
+ 811, -1, 811, 811, 811, 811, 811, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 811, -1, 811, -1, -1, 811,
+ 811, -1, -1, -1, 811, -1, 811, -1,
+ 811, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812,
+ -1, 812, 812, 812, 812, 812, 812, -1,
+ 812, 812, 812, 812, -1, 812, -1, 812,
+ 812, 812, -1, 812, 812, 812, 812, 812,
+ 812, -1, 812, 812, 812, 812, 812, 812,
+ 812, 812, 812, 812, 812, 812, 812, 812,
+ 812, -1, -1, -1, -1, -1, -1, 812,
+ 812, 812, 812, -1, -1, -1, 812, 812,
+ -1, 812, 812, 812, 812, 812, 812, 812,
+ 812, 190, 191, 812, 812, -1, -1, -1,
+ -1, -1, 812, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 811, -1,
+ -1, 812, 812, 812, 812, -1, -1, 812,
+ 812, 812, 812, 812, 812, -1, -1, -1,
+ 812, 812, 812, 812, 812, -1, -1, -1,
+ -1, 812, -1, -1, -1, 812, 812, 812,
+ -1, 812, 812, -1, -1, 812, -1, -1,
+ -1, -1, -1, -1, -1, -1, 812, 812,
+ 812, 812, 812, -1, 812, 812, 812, -1,
+ -1, 812, 812, 812, 812, 812, 812, 812,
+ 812, -1, 812, 812, 812, -1, -1, -1,
+ 812, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 812, 812, -1, -1, 812,
+ -1, -1, -1, -1, 812, -1, -1, -1,
+ -1, 812, -1, 812, 812, 812, 812, 812,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 812, -1, 812, -1, -1,
+ 812, 812, -1, -1, -1, 812, -1, 812,
+ -1, 812, 813, 813, 813, 813, 813, 813,
+ 813, 813, 813, 813, 813, 813, 813, 813,
+ 813, 813, 813, 813, 813, 813, 813, 813,
+ 813, -1, 813, 813, 813, 813, 813, 813,
+ -1, 813, 813, 813, 813, -1, 813, -1,
+ 813, 813, 813, -1, 813, 813, 813, 813,
+ 813, 813, -1, 813, 813, 813, 813, 813,
+ 813, 813, 813, 813, 813, 813, 813, 813,
+ 813, 813, -1, -1, -1, -1, -1, -1,
+ 813, 813, 813, 813, -1, -1, -1, 813,
+ 813, -1, 813, 813, 813, 813, 813, 813,
+ 813, 813, 190, 191, 813, 813, -1, -1,
+ -1, -1, -1, 813, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 812,
+ -1, -1, 813, 813, 813, 813, -1, -1,
+ 813, 813, 813, 813, 813, 813, -1, -1,
+ -1, 813, 813, 813, 813, 813, -1, -1,
+ -1, -1, 813, -1, -1, -1, 813, 813,
+ 813, -1, 813, 813, -1, -1, 813, -1,
+ -1, -1, -1, -1, -1, -1, -1, 813,
+ 813, 813, 813, 813, -1, 813, 813, 813,
+ -1, -1, 813, 813, 813, 813, 813, 813,
+ 813, 813, -1, 813, 813, 813, -1, -1,
+ -1, 813, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 813, 813, -1, -1,
+ 813, -1, -1, -1, -1, 813, -1, -1,
+ -1, -1, 813, -1, 813, 813, 813, 813,
+ 813, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 813, -1, 813, -1,
+ -1, 813, 813, -1, -1, -1, 813, -1,
+ 813, -1, 813, 814, 814, 814, 814, 814,
+ 814, 814, 814, 814, 814, 814, 814, 814,
+ 814, 814, 814, 814, 814, 814, 814, 814,
+ 814, 814, -1, 814, 814, 814, 814, 814,
+ 814, -1, 814, 814, 814, 814, -1, 814,
+ -1, 814, 814, 814, -1, 814, 814, 814,
+ 814, 814, 814, -1, 814, 814, 814, 814,
+ 814, 814, 814, 814, 814, 814, 814, 814,
+ 814, 814, 814, -1, -1, -1, -1, -1,
+ -1, 814, 814, 814, 814, -1, -1, -1,
+ 814, 814, -1, 814, 814, 814, 814, 814,
+ 814, 814, 814, 190, 191, 814, 814, -1,
+ -1, -1, -1, -1, 814, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 813, -1, -1, 814, 814, 814, 814, -1,
+ -1, 814, 814, 814, 814, 814, 814, -1,
+ -1, -1, 814, 814, 814, 814, 814, -1,
+ -1, -1, -1, 814, -1, -1, -1, 814,
+ 814, 814, -1, 814, 814, -1, -1, 814,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 814, 814, 814, 814, 814, -1, 814, 814,
+ 814, -1, -1, 814, 814, 814, 814, 814,
+ 814, 814, 814, -1, 814, 814, 814, -1,
+ -1, -1, 814, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 814, 814, -1,
+ -1, 814, -1, -1, -1, -1, 814, -1,
+ -1, -1, -1, 814, -1, 814, 814, 814,
+ 814, 814, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 814, -1, 814,
+ -1, -1, 814, 814, -1, -1, -1, 814,
+ -1, 814, -1, 814, 816, 816, 816, 816,
+ 816, 816, 816, 816, 816, 816, 816, 816,
+ 816, 816, 816, 816, 816, 816, 816, 816,
+ 816, 816, 816, -1, 816, 816, 816, 816,
+ 816, 816, -1, 816, 816, 816, 816, -1,
+ 816, -1, 816, 816, 816, -1, 816, 816,
+ 816, 816, 816, 816, -1, 816, 816, 816,
+ 816, 816, 816, 816, 816, 816, 816, 816,
+ 816, 816, 816, 816, -1, 193, -1, -1,
+ -1, -1, 816, 816, 816, 816, 192, -1,
+ -1, 816, 816, -1, 816, 816, 816, 816,
+ 816, 816, 816, 816, 816, 816, 816, 816,
+ -1, -1, -1, -1, -1, 816, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 814, -1, -1, 816, 816, 816, 816,
+ -1, -1, 816, 816, 816, 816, 816, 816,
+ -1, -1, -1, 816, 816, 816, 816, 816,
+ -1, -1, -1, -1, 816, -1, -1, -1,
+ 816, 816, 816, -1, 816, 816, -1, -1,
+ 816, -1, -1, -1, -1, -1, -1, -1,
+ -1, 816, 816, 816, 816, 816, -1, 816,
+ 816, 816, -1, -1, 816, 816, 816, 816,
+ 816, 816, 816, 816, -1, 816, 816, 816,
+ -1, -1, -1, 816, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 816, 816,
+ -1, -1, 816, -1, -1, -1, -1, 816,
+ -1, -1, -1, -1, 816, -1, 816, 816,
+ 816, 816, 816, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 816, -1,
+ 816, -1, -1, 816, 816, -1, -1, -1,
+ 816, -1, 816, -1, 816, 817, 817, 817,
+ 817, 817, 817, 817, 817, 817, 817, 817,
+ 817, 817, 817, 817, 817, 817, 817, 817,
+ 817, 817, 817, 817, -1, 817, 817, 817,
+ 817, 817, 817, -1, 817, 817, 817, 817,
+ -1, 817, -1, 817, 817, 817, -1, 817,
+ 817, 817, 817, 817, 817, -1, 817, 817,
+ 817, 817, 817, 817, 817, 817, 817, 817,
+ 817, 817, 817, 817, 817, -1, 193, -1,
+ -1, -1, -1, 817, 817, 817, 817, 192,
+ -1, -1, 817, 817, -1, 817, 817, 817,
+ 817, 817, 817, 817, 817, 817, 817, 817,
+ 817, -1, -1, -1, -1, -1, 817, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 816, -1, -1, 817, 817, 817,
+ 817, -1, -1, 817, 817, 817, 817, 817,
+ 817, -1, -1, -1, 817, 817, 817, 817,
+ 817, -1, -1, -1, -1, 817, -1, -1,
+ -1, 817, 817, 817, -1, 817, 817, -1,
+ -1, 817, -1, -1, -1, -1, -1, -1,
+ -1, -1, 817, 817, 817, 817, 817, -1,
+ 817, 817, 817, -1, -1, 817, 817, 817,
+ 817, 817, 817, 817, 817, -1, 817, 817,
+ 817, -1, -1, -1, 817, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 817,
+ 817, -1, -1, 817, -1, -1, -1, -1,
+ 817, -1, -1, -1, -1, 817, -1, 817,
+ 817, 817, 817, 817, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 817,
+ -1, 817, -1, -1, 817, 817, -1, -1,
+ -1, 817, -1, 817, -1, 817, 820, 820,
+ 820, 820, 820, 820, 820, 820, 820, 820,
+ 820, 820, 820, 820, 820, 820, 820, 820,
+ 820, 820, 820, 820, 820, -1, 820, 820,
+ 820, 820, 820, 820, -1, 820, 820, 820,
+ 820, -1, 820, -1, 820, 820, 820, -1,
+ 820, 820, 820, 820, 820, 820, -1, 820,
+ 820, 820, 820, 820, 820, 820, 820, 820,
+ 820, 820, 820, 820, 820, 820, -1, 820,
+ -1, -1, -1, -1, 820, 820, 820, 820,
+ 820, -1, -1, 820, 820, -1, 820, 820,
+ 820, 820, 820, 820, 820, 820, 820, 820,
+ 820, 820, -1, -1, -1, -1, -1, 820,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 817, -1, -1, 820, 820,
+ 820, 820, -1, -1, 820, 820, 820, 820,
+ 820, 820, -1, -1, -1, 820, 820, 820,
+ 820, 820, -1, -1, -1, -1, 820, -1,
+ -1, -1, 820, 820, 820, -1, 820, 820,
+ -1, -1, 820, -1, -1, -1, -1, -1,
+ -1, -1, -1, 820, 820, 820, 820, 820,
+ -1, 820, 820, 820, -1, -1, 820, 820,
+ 820, 820, 820, 820, 820, 820, -1, 820,
+ 820, 820, -1, -1, -1, 820, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 820, 820, -1, -1, 820, -1, -1, -1,
+ -1, 820, -1, -1, -1, -1, 820, -1,
+ 820, 820, 820, 820, 820, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 820, -1, 820, -1, -1, 820, 820, -1,
+ -1, -1, 820, -1, 820, -1, 820, 819,
+ 819, 819, 819, 819, 819, 819, 819, 819,
+ 819, 819, 819, 819, 819, 819, 819, 819,
+ 819, 819, 819, 819, 819, 819, -1, 819,
+ 819, 819, 819, 819, 819, -1, 819, 819,
+ 819, 819, -1, 819, -1, 819, 819, 819,
+ -1, 819, 819, 819, 819, 819, 819, -1,
+ 819, 819, 819, 819, 819, 819, 819, 819,
+ 819, 819, 819, 819, 819, 819, 819, -1,
+ 819, -1, -1, -1, -1, 819, 819, 819,
+ 819, 819, -1, -1, 819, 819, -1, 819,
+ 819, 819, 819, 819, 819, 819, 819, 819,
+ 819, 819, 819, -1, -1, -1, -1, -1,
+ 819, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 820, -1, -1, 819,
+ 819, 819, 819, -1, -1, 819, 819, 819,
+ 819, 819, 819, -1, -1, -1, 819, 819,
+ 819, 819, 819, -1, -1, -1, -1, 819,
+ -1, -1, -1, 819, 819, 819, -1, 819,
+ 819, -1, -1, 819, -1, -1, -1, -1,
+ -1, -1, -1, -1, 819, 819, 819, 819,
+ 819, -1, 819, 819, 819, -1, -1, 819,
+ 819, 819, 819, 819, 819, 819, 819, -1,
+ 819, 819, 819, -1, -1, -1, 819, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 819, 819, -1, -1, 819, -1, -1,
+ -1, -1, 819, -1, -1, -1, -1, 819,
+ -1, 819, 819, 819, 819, 819, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 819, -1, 819, -1, -1, 819, 819,
+ -1, -1, -1, 819, -1, 819, -1, 819,
+ 843, 843, 843, 843, 843, 843, 843, 843,
+ 843, 843, 843, 843, 843, 843, 843, 843,
+ 843, 843, 843, 843, 843, 843, 843, -1,
+ 843, 843, 843, 843, 843, 843, -1, 843,
+ 843, 843, 843, -1, 843, -1, 843, 843,
+ 843, -1, 843, 843, 843, 843, 843, 843,
+ -1, 843, 843, 843, 843, 843, 843, 843,
+ 843, 843, 843, 843, 843, 843, 843, 843,
+ -1, 843, -1, -1, -1, -1, 843, 843,
+ 843, 843, 843, -1, -1, 843, 843, -1,
+ 843, 843, 843, 843, 843, 843, 843, 843,
+ 843, 843, 843, 843, -1, -1, -1, -1,
+ -1, 843, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 819, -1, -1,
+ 843, 843, 843, 843, -1, -1, 843, 843,
+ 843, 843, 843, 843, -1, -1, -1, 843,
+ 843, 843, 843, 843, -1, -1, -1, -1,
+ 843, -1, -1, -1, 843, 843, 843, -1,
+ 843, 843, -1, -1, 843, -1, -1, -1,
+ -1, -1, -1, -1, -1, 843, 843, 843,
+ 843, 843, -1, 843, 843, 843, -1, -1,
+ 843, 843, 843, 843, 843, 843, 843, 843,
+ -1, 843, 843, 843, -1, -1, -1, 843,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 843, 843, -1, -1, 843, -1,
+ -1, -1, -1, 843, -1, -1, -1, -1,
+ 843, -1, 843, 843, 843, 843, 843, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 843, -1, 843, -1, -1, 843,
+ 843, -1, -1, -1, 843, -1, 843, -1,
+ 843, 849, 849, 849, 849, 849, 849, 849,
+ 849, 849, 849, 849, 849, 849, 849, 849,
+ 849, 849, 849, 849, 849, 849, 849, 849,
+ 849, 849, 849, 849, 849, 849, 849, -1,
+ 849, 849, 849, 849, 849, 849, -1, 849,
+ 849, 849, -1, 849, 849, 849, 849, 849,
+ 849, 849, 849, 849, 849, 849, 849, 849,
+ 849, 849, 849, -1, 849, 849, 849, 849,
+ -1, -1, -1, -1, -1, -1, -1, 849,
+ 849, -1, 849, -1, -1, 849, -1, -1,
+ -1, -1, 849, -1, -1, 849, 849, 849,
+ 849, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 849, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 843, -1,
+ -1, 849, 849, 849, 849, -1, -1, 849,
+ 849, 849, 849, 849, 849, -1, 849, 849,
+ 849, 849, 849, 849, 849, -1, -1, 849,
+ -1, 849, 849, -1, 849, 849, 849, 849,
+ -1, 849, 849, -1, -1, 849, -1, -1,
+ -1, -1, -1, 849, -1, 849, 849, 849,
+ 849, 849, -1, -1, -1, 849, 849, -1,
+ 849, 849, 849, 849, 849, 849, 849, 849,
+ 849, -1, 849, 849, 849, -1, -1, 849,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 849, 849, 849, -1, -1, 849, 849,
+ 849, -1, -1, 849, 849, 849, 849, 849,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 849, -1, 849, 849, 849,
+ 849, -1, 857, 857, 857, 857, 857, 857,
+ 857, 857, 857, 857, 857, 857, 857, 857,
+ 857, 857, 857, 857, 857, 857, 857, 857,
+ 857, 857, 857, 857, 857, 857, 857, 857,
+ -1, 857, 857, 857, 857, 857, 857, -1,
+ 857, 857, 857, -1, 857, 857, 857, 857,
+ 857, 857, 857, 857, 857, 857, 857, 857,
+ 857, 857, 857, 857, 857, 857, 857, 857,
+ 857, 857, -1, -1, -1, -1, -1, -1,
+ 857, 857, -1, 857, -1, -1, 857, -1,
+ -1, -1, -1, 857, -1, -1, 857, 857,
+ 857, 857, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 857, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 857, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 857, 857, 857, 857, -1, 849,
+ 857, 857, 857, 857, 857, 857, -1, 857,
+ 857, 857, 857, 857, 857, 857, -1, -1,
+ 857, -1, 857, 857, -1, 857, 857, 857,
+ 857, -1, 857, 857, -1, -1, 857, 857,
+ 857, -1, -1, -1, 857, -1, 857, 857,
+ 857, 857, 857, -1, -1, -1, 857, 857,
+ -1, 857, 857, 857, 857, 857, 857, 857,
+ 857, 857, -1, 857, 857, 857, -1, -1,
+ 857, -1, 857, -1, -1, -1, 857, 857,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 857, 857, 857, -1, -1, 857,
+ 857, 857, -1, -1, 857, 857, 857, 857,
+ 857, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 857, -1, 857, 857,
+ 857, 857, -1, -1, 857, -1, -1, -1,
+ -1, 858, 858, 858, 858, 858, 858, 858,
+ 858, 858, 858, 858, 858, 858, 858, 858,
+ 858, 858, 858, 858, 858, 858, 858, 858,
+ 858, 858, 858, 858, 858, 858, 858, -1,
+ 858, 858, 858, 858, 858, 858, -1, 858,
+ 858, 858, -1, 858, 858, 858, 858, 858,
+ 858, 858, 858, 858, 858, 858, 858, 858,
+ 858, 858, 858, 858, 858, 858, 858, 858,
+ 858, -1, -1, -1, -1, -1, -1, 858,
+ 858, -1, 858, -1, -1, 858, -1, -1,
+ -1, -1, 858, -1, -1, 858, 858, 858,
+ 858, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 858, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 858, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 857, 858, 858, 858, 858, -1, -1, 858,
+ 858, 858, 858, 858, 858, -1, 858, 858,
+ 858, 858, 858, 858, 858, -1, -1, 858,
+ -1, 858, 858, -1, 858, 858, 858, 858,
+ -1, 858, 858, -1, -1, 858, 858, 858,
+ -1, -1, -1, 858, -1, 858, 858, 858,
+ 858, 858, -1, -1, -1, 858, 858, -1,
+ 858, 858, 858, 858, 858, 858, 858, 858,
+ 858, -1, 858, 858, 858, -1, -1, 858,
+ -1, 858, -1, -1, -1, 858, 858, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 858, 858, 858, -1, -1, 858, 858,
+ 858, -1, -1, 858, 858, 858, 858, 858,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 858, -1, 858, 858, 858,
+ 858, -1, -1, 858, -1, -1, -1, -1,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, -1, 859,
+ 859, 859, 859, 859, 859, -1, 859, 859,
+ 859, -1, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ -1, -1, -1, -1, -1, -1, 859, 859,
+ -1, 859, -1, -1, 859, -1, -1, -1,
+ -1, 859, -1, -1, 859, 859, 859, 859,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 859, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 859, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 858,
+ 859, 859, 859, 859, -1, -1, 859, 859,
+ 859, 859, 859, 859, -1, 859, 859, 859,
+ 859, 859, 859, 859, -1, -1, 859, -1,
+ 859, 859, -1, 859, 859, 859, 859, -1,
+ 859, 859, -1, -1, 859, 859, 859, -1,
+ -1, -1, 859, -1, 859, 859, 859, 859,
+ 859, -1, -1, -1, 859, 859, -1, 859,
+ 859, 859, 859, 859, 859, 859, 859, 859,
+ -1, 859, 859, 859, -1, -1, 859, -1,
+ 859, -1, -1, -1, 859, 859, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 859, 859, 859, -1, -1, 859, 859, 859,
+ -1, -1, 859, 859, 859, 859, 859, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 859, -1, 859, 859, 859, 859,
+ -1, -1, 859, -1, -1, -1, -1, 777,
+ 777, 777, 777, 777, 777, 777, 777, 777,
+ 777, 777, 777, 777, 777, 777, 777, 777,
+ 777, 777, 777, 777, 777, 777, -1, 777,
+ 777, 777, 777, 777, 777, -1, 777, 777,
+ 777, 777, -1, 777, -1, 777, 777, 777,
+ -1, 777, 777, 777, 777, 777, 777, -1,
+ 777, 777, 777, 777, 777, 777, 777, 777,
+ 777, -1, 777, 777, 777, 777, -1, -1,
+ -1, -1, -1, -1, -1, 777, -1, -1,
+ 777, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 777, 777, 777, 777, -1,
+ -1, 182, 183, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 859, 777,
+ 777, 777, 777, -1, -1, 777, 777, -1,
+ 777, 777, 777, -1, -1, -1, 777, 777,
+ -1, 777, 777, -1, -1, -1, -1, 777,
+ -1, -1, -1, 777, 777, 777, -1, 777,
+ 777, -1, -1, 777, -1, -1, -1, -1,
+ -1, -1, -1, -1, 777, 777, 777, 777,
+ -1, -1, -1, 777, 777, -1, -1, 777,
+ 777, 777, 777, 777, 777, 777, 777, -1,
+ 777, 777, 777, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 777, 777, 777, 777, 777, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 777, -1, -1, -1, -1, 777, -1,
+ 801, 801, 801, 801, 801, 801, 801, 801,
+ 801, 801, 801, 801, 801, 801, 801, 801,
+ 801, 801, 801, 801, 801, 801, 801, -1,
+ 801, 801, 801, 801, 801, 801, -1, 801,
+ 801, 801, 801, -1, 801, -1, 801, 801,
+ 801, -1, 801, 801, 801, 801, 801, 801,
+ -1, 801, 801, 801, 801, 801, 801, 801,
+ 801, 801, -1, 801, 801, 801, 801, -1,
+ -1, -1, -1, -1, -1, -1, 801, -1,
+ -1, 801, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 801, 801, 801, 801,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 801, 801, 801, 801, -1, 777, 801, 801,
+ -1, 801, 801, 801, -1, -1, -1, 801,
+ 801, -1, 801, 801, -1, -1, -1, -1,
+ 801, -1, -1, -1, 801, 801, 801, -1,
+ 801, 801, -1, -1, 801, -1, -1, -1,
+ -1, -1, -1, -1, -1, 801, 801, 801,
+ 801, -1, -1, -1, 801, 801, -1, -1,
+ 801, 801, 801, 801, 801, 801, 801, 801,
+ -1, 801, 801, 801, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 801, 801, 801, 801, 801, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 801, -1, -1, -1, -1, 801,
+ -1, 802, 802, 802, 802, 802, 802, 802,
+ 802, 802, 802, 802, 802, 802, 802, 802,
+ 802, 802, 802, 802, 802, 802, 802, 802,
+ -1, 802, 802, 802, 802, 802, 802, -1,
+ 802, 802, 802, 802, -1, 802, -1, 802,
+ 802, 802, -1, 802, 802, 802, 802, 802,
+ 802, -1, 802, 802, 802, 802, 802, 802,
+ 802, 802, 802, -1, 802, 802, 802, 802,
+ -1, -1, -1, -1, -1, -1, -1, 802,
+ -1, -1, 802, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 802, 802, 802,
+ 802, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 802, 802, 802, 802, -1, 801, 802,
+ 802, -1, 802, 802, 802, -1, -1, -1,
+ 802, 802, -1, 802, 802, -1, -1, -1,
+ -1, 802, -1, -1, -1, 802, 802, 802,
+ -1, 802, 802, -1, -1, 802, -1, -1,
+ -1, -1, -1, -1, -1, -1, 802, 802,
+ 802, 802, -1, -1, -1, 802, 802, -1,
+ -1, 802, 802, 802, 802, 802, 802, 802,
+ 802, -1, 802, 802, 802, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 802, 802, 802, 802, 802,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 802, -1, -1, -1, -1,
+ 802, -1, 803, 803, 803, 803, 803, 803,
+ 803, 803, 803, 803, 803, 803, 803, 803,
+ 803, 803, 803, 803, 803, 803, 803, 803,
+ 803, -1, 803, 803, 803, 803, 803, 803,
+ -1, 803, 803, 803, 803, -1, 803, -1,
+ 803, 803, 803, -1, 803, 803, 803, 803,
+ 803, 803, -1, 803, 803, 803, 803, 803,
+ 803, 803, 803, 803, -1, 803, 803, 803,
+ 803, -1, -1, -1, -1, -1, -1, -1,
+ 803, -1, -1, 803, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 803, 803,
+ 803, 803, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 803, 803, 803, 803, -1, 802,
+ 803, 803, -1, 803, 803, 803, -1, -1,
+ -1, 803, 803, -1, 803, 803, -1, -1,
+ -1, -1, 803, -1, -1, -1, 803, 803,
+ 803, -1, 803, 803, -1, -1, 803, -1,
+ -1, -1, -1, -1, -1, -1, -1, 803,
+ 803, 803, 803, -1, -1, -1, 803, 803,
+ -1, -1, 803, 803, 803, 803, 803, 803,
+ 803, 803, -1, 803, 803, 803, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 803, 803, 803, 803,
+ 803, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 803, -1, -1, -1,
+ -1, 803, -1, 804, 804, 804, 804, 804,
+ 804, 804, 804, 804, 804, 804, 804, 804,
+ 804, 804, 804, 804, 804, 804, 804, 804,
+ 804, 804, -1, 804, 804, 804, 804, 804,
+ 804, -1, 804, 804, 804, 804, -1, 804,
+ -1, 804, 804, 804, -1, 804, 804, 804,
+ 804, 804, 804, -1, 804, 804, 804, 804,
+ 804, 804, 804, 804, 804, -1, 804, 804,
+ 804, 804, -1, -1, -1, -1, -1, -1,
+ -1, 804, -1, -1, 804, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 804,
+ 804, 804, 804, 77, 78, 79, 80, -1,
+ 76, -1, -1, -1, -1, -1, -1, -1,
+ -1, 100, 96, 98, 94, 92, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 87,
+ -1, -1, -1, 88, 85, 84, 86, -1,
+ -1, -1, 72, 73, 74, -1, -1, -1,
+ -1, 1006, 71, -1, 104, 106, 108, 110,
+ -1, -1, -1, 804, 804, 804, 804, 75,
+ 803, 804, 804, -1, 804, 804, 804, -1,
+ -1, -1, 804, 804, -1, 804, 804, -1,
+ -1, -1, -1, 804, -1, -1, -1, 804,
+ 804, 804, -1, 804, 804, -1, -1, 804,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 804, 804, 804, 804, -1, -1, -1, 804,
+ 804, -1, -1, 804, 804, 804, 804, 804,
+ 804, 804, 804, -1, 804, 804, 804, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 77, 78, 79, 80,
+ -1, 76, -1, -1, -1, 804, 804, 804,
+ 804, 804, 100, 96, 98, 94, 92, -1,
+ -1, -1, -1, -1, -1, 804, -1, -1,
+ 87, -1, 804, -1, 88, 85, 84, 86,
+ -1, -1, -1, 72, 73, 74, -1, -1,
+ -1, -1, 1006, 71, -1, 104, 106, 108,
+ 110, -1, 521, 82, 90, -1, -1, -1,
+ 75, 987, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 66, 67,
+ 68, 69, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 804, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 470, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, 469, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 132,
+ 58, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 468, 886, 886, 886, 886, 886,
+ 886, 886, 886, 886, 886, 886, 886, 886,
+ 886, 886, 886, 886, 886, 886, 886, 886,
+ 886, 886, -1, 886, 886, 886, 886, 886,
+ 886, -1, 886, 886, 886, 886, -1, 886,
+ -1, 886, 886, 886, -1, 886, 886, 886,
+ 886, 886, 886, -1, 886, 886, 886, 886,
+ 886, 886, 886, 886, 886, 886, 886, 886,
+ 886, 886, 886, -1, 886, -1, -1, -1,
+ -1, 886, 886, 886, 886, 886, -1, -1,
+ 886, 886, -1, 886, 886, 886, 886, 886,
+ 886, 886, 886, 886, 886, 886, 886, -1,
+ -1, -1, -1, -1, 886, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 886, 886, 886, 886, -1,
+ -1, 886, 886, 886, 886, 886, 886, -1,
+ -1, -1, 886, 886, 886, 886, 886, -1,
+ -1, -1, -1, 886, -1, -1, -1, 886,
+ 886, 886, -1, 886, 886, -1, -1, 886,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 886, 886, 886, 886, 886, -1, 886, 886,
+ 886, 886, -1, 886, 886, 886, 886, 886,
+ 886, 886, 886, -1, 886, 886, 886, -1,
+ -1, -1, 886, -1, -1, -1, -1, -1,
+ -1, -1, 886, -1, -1, 886, 886, -1,
+ -1, 886, -1, -1, -1, -1, 886, -1,
+ -1, -1, -1, 886, -1, 886, 886, 886,
+ 886, 886, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 886, -1, 886,
+ -1, -1, 886, 886, -1, -1, -1, 886,
+ -1, 886, -1, 886, -1, -1, -1, -1,
+ 890, 890, 890, 890, -1, 890, -1, -1,
+ -1, -1, -1, -1, -1, -1, 890, 890,
+ 890, 890, 890, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 890, -1, -1, -1,
+ 890, 890, 890, 890, -1, -1, -1, 890,
+ 890, 890, -1, -1, -1, -1, 890, 890,
+ -1, 1004, 1004, 1004, 890, -1, -1, -1,
+ -1, -1, -1, -1, 890, -1, -1, -1,
+ -1, -1, -1, -1, 521, 82, 90, -1,
+ -1, -1, 890, 890, 890, 890, 890, 890,
+ 890, 890, -1, 890, -1, -1, -1, 999,
+ -1, -1, -1, -1, 890, 890, 890, 890,
+ 890, -1, -1, -1, -1, 102, 89, 81,
+ 132, 58, 890, -1, -1, -1, 890, 890,
+ 890, 890, -1, -1, -1, 890, 890, 890,
+ -1, -1, -1, -1, 890, 890, -1, 1004,
+ 1004, 1004, 890, 999, -1, -1, -1, -1,
+ -1, 886, 890, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 890, 890, 890, 890, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 999, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 890, 890, 890, 890, 890, -1, 890,
+ 890, 890, -1, -1, -1, -1, -1, 470,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ 396, 397, -1, 469, -1, -1, -1, -1,
+ -1, 395, -1, -1, -1, -1, -1, -1,
+ 890, 890, 890, 890, 890, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 132, 58, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 497, -1, -1, -1,
+ -1, -1, -1, -1, 468, -1, -1, 890,
+ 890, 890, 890, 890, -1, 890, 890, 890,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 396, 397,
+ -1, -1, -1, -1, -1, -1, -1, 395,
+ -1, -1, -1, -1, -1, -1, 890, 890,
+ 890, 890, 890, 77, 78, 79, 80, -1,
+ 76, -1, -1, -1, -1, -1, -1, -1,
+ -1, 100, 96, 98, 94, 92, -1, -1,
+ -1, -1, 506, -1, -1, -1, -1, 87,
+ -1, -1, -1, 88, 85, 84, 86, -1,
+ -1, -1, 72, 73, 74, -1, -1, -1,
+ -1, 1006, 71, -1, 104, 106, 108, 110,
+ -1, -1, -1, -1, -1, -1, -1, 75,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 66, 67, 68,
+ 69, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 916, 916, 916, 916, 916, 916, 916, 916,
+ 916, 916, 916, 916, 916, 916, 916, 916,
+ 916, 916, 916, 916, 916, 916, 916, -1,
+ 916, 916, 916, 916, 916, 916, -1, 916,
+ 916, 916, 916, -1, 916, -1, 916, 916,
+ 916, 916, 916, 916, 916, 916, 916, 916,
+ -1, 916, 916, 916, 916, 916, 916, 916,
+ 916, 916, 916, 916, 916, 916, 916, 916,
+ -1, 916, -1, -1, 916, -1, 916, 916,
+ 916, 916, 916, -1, -1, 916, 916, -1,
+ 916, 916, 916, 916, 916, 916, 916, 916,
+ 916, 916, 916, 916, -1, -1, -1, -1,
+ -1, 916, -1, -1, 505, 62, 63, 64,
+ 65, -1, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ 916, 916, 916, 916, -1, -1, 916, 916,
+ 916, 916, 916, 916, -1, -1, -1, 916,
+ 916, 916, 916, 916, -1, -1, -1, -1,
+ 916, -1, -1, -1, 916, 916, 916, -1,
+ 916, 916, -1, -1, 916, -1, -1, -1,
+ -1, -1, -1, -1, -1, 916, 916, 916,
+ 916, 916, -1, 916, 916, 916, -1, -1,
+ 916, 916, 916, 916, 916, 916, 916, 916,
+ 916, 916, 916, 916, -1, -1, -1, 916,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 916, 916, -1, -1, 916, -1,
+ -1, -1, -1, 916, -1, -1, -1, -1,
+ 916, -1, 916, 916, 916, 916, 916, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 916, -1, 916, -1, -1, 916,
+ 916, -1, -1, -1, 916, -1, 916, -1,
+ 916, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 865, 865, 865, 865,
+ -1, 865, -1, -1, -1, -1, -1, -1,
+ -1, -1, 865, 865, 865, 865, 865, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 865, -1, -1, -1, 865, 865, 865, 865,
+ -1, -1, -1, 865, 865, 865, -1, -1,
+ -1, -1, 865, 865, -1, 865, 865, 865,
+ 865, -1, -1, -1, -1, -1, -1, -1,
+ 865, 865, -1, -1, -1, -1, -1, -1,
+ -1, -1, 396, 397, -1, -1, 865, 865,
+ 865, 865, -1, 395, 182, 183, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 497, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 916, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 396, 397, -1, -1, -1, -1, -1, -1,
+ -1, 395, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 506, 865, 865, 865,
+ 865, 865, -1, 865, 865, 865, -1, -1,
+ -1, 865, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 865, 865, 865, 865,
+ 865, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 865, -1, -1, -1, -1, -1,
+ -1, -1, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, -1, 837, 837, 837, 837, 837, 837,
+ -1, 837, 837, 837, 837, -1, 837, -1,
+ 837, 837, 837, -1, 837, 837, 837, 837,
+ 837, 837, -1, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, -1, 837, -1, -1, -1, -1,
+ 837, 837, 837, 837, 837, -1, -1, 837,
+ 837, -1, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 837, 837, -1, -1,
+ -1, -1, -1, 837, -1, -1, 505, 62,
+ 63, 64, 65, -1, 70, 82, 90, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 102, 89, 81,
+ 132, 58, 837, 837, 837, 837, -1, -1,
+ 837, 837, 837, 837, 837, 837, -1, -1,
+ -1, 837, 837, 837, 837, 837, -1, -1,
+ -1, -1, 837, -1, -1, -1, 837, 837,
+ 837, -1, 837, 837, -1, -1, 837, -1,
+ -1, -1, -1, -1, -1, -1, -1, 837,
+ 837, 837, 837, 837, -1, 837, 837, 837,
+ -1, -1, 837, 837, 837, 837, 837, 837,
+ 837, 837, -1, 837, 837, 837, -1, -1,
+ -1, 837, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 837, 837, -1, -1,
+ 837, -1, -1, -1, -1, 837, -1, -1,
+ -1, -1, 837, -1, 837, 837, 837, 837,
+ 837, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 837, -1, 837, -1,
+ -1, 837, 837, -1, -1, -1, 837, -1,
+ 837, -1, 837, 827, 827, 827, 827, 827,
+ 827, 827, 827, 827, 827, 827, 827, 827,
+ 827, 827, 827, 827, 827, 827, 827, 827,
+ 827, 827, -1, 827, 827, 827, 827, 827,
+ 827, -1, 827, 827, 827, 827, -1, 827,
+ -1, 827, 827, 827, -1, 827, 827, 827,
+ 827, 827, 827, -1, 827, 827, 827, 827,
+ 827, 827, 827, 827, 827, 827, 827, 827,
+ 827, 827, 827, -1, 827, -1, -1, -1,
+ -1, 827, 827, 827, 827, 827, -1, -1,
+ 827, 827, -1, 827, 827, 827, 827, 827,
+ 827, 827, 827, 827, 827, 827, 827, -1,
+ -1, -1, -1, -1, 827, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 837, -1, -1, 827, 827, 827, 827, -1,
+ -1, 827, 827, 827, 827, 827, 827, -1,
+ -1, -1, 827, 827, 827, 827, 827, -1,
+ -1, -1, -1, 827, -1, -1, -1, 827,
+ 827, 827, -1, 827, 827, -1, -1, 827,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 827, 827, 827, 827, 827, -1, 827, 827,
+ 827, -1, -1, 827, 827, 827, 827, 827,
+ 827, 827, 827, -1, 827, 827, 827, -1,
+ -1, -1, 827, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 827, 827, -1,
+ -1, 827, -1, -1, -1, -1, 827, -1,
+ -1, -1, -1, 827, -1, 827, 827, 827,
+ 827, 827, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 827, -1, 827,
+ -1, -1, 827, 827, -1, -1, -1, 827,
+ -1, 827, -1, 827, 828, 828, 828, 828,
+ 828, 828, 828, 828, 828, 828, 828, 828,
+ 828, 828, 828, 828, 828, 828, 828, 828,
+ 828, 828, 828, -1, 828, 828, 828, 828,
+ 828, 828, -1, 828, 828, 828, 828, -1,
+ 828, -1, 828, 828, 828, -1, 828, 828,
+ 828, 828, 828, 828, -1, 828, 828, 828,
+ 828, 828, 828, 828, 828, 828, 828, 828,
+ 828, 828, 828, 828, -1, 828, -1, -1,
+ -1, -1, 828, 828, 828, 828, 828, -1,
+ -1, 828, 828, -1, 828, 828, 828, 828,
+ 828, 828, 828, 828, 828, 828, 828, 828,
+ -1, -1, -1, -1, -1, 828, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 827, -1, -1, 828, 828, 828, 828,
+ -1, -1, 828, 828, 828, 828, 828, 828,
+ -1, -1, -1, 828, 828, 828, 828, 828,
+ -1, -1, -1, -1, 828, -1, -1, -1,
+ 828, 828, 828, -1, 828, 828, -1, -1,
+ 828, -1, -1, -1, -1, -1, -1, -1,
+ -1, 828, 828, 828, 828, 828, -1, 828,
+ 828, 828, -1, -1, 828, 828, 828, 828,
+ 828, 828, 828, 828, -1, 828, 828, 828,
+ -1, -1, -1, 828, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 828, 828,
+ -1, -1, 828, -1, -1, -1, -1, 828,
+ -1, -1, -1, -1, 828, -1, 828, 828,
+ 828, 828, 828, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 828, -1,
+ 828, -1, -1, 828, 828, -1, -1, -1,
+ 828, -1, 828, -1, 828, 741, 741, 741,
+ 741, 741, 741, 741, 741, 741, 741, 741,
+ 741, 741, 741, -1, 741, 741, 741, 741,
+ 741, 741, -1, -1, -1, 741, 741, 741,
+ 741, 741, 741, -1, 741, 741, 741, 741,
+ -1, 741, -1, 741, 741, 741, -1, 741,
+ 741, 741, 741, 741, 741, -1, 741, 741,
+ 741, 741, 741, 741, 741, 741, 741, -1,
+ 741, 741, 741, 741, -1, -1, -1, -1,
+ -1, -1, -1, 741, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 741, 741, 741, 741, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 828, -1, -1, 741, 741, 741,
+ 741, -1, -1, 741, 741, -1, 741, 741,
+ 741, -1, -1, -1, 741, 741, -1, 741,
+ 741, -1, -1, -1, -1, 741, 741, -1,
+ -1, 741, 741, 741, -1, 741, 741, -1,
+ -1, 741, -1, -1, -1, -1, -1, -1,
+ -1, -1, 741, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 741, 741, 741,
+ 741, 741, 741, 741, 741, -1, 741, 741,
+ 741, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 741,
+ 741, 741, 741, 741, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 741,
+ -1, -1, 741, 775, 775, 775, 775, 775,
+ 775, 775, 775, 775, 775, 775, 775, 775,
+ 775, 775, 775, 775, 775, 775, 775, 775,
+ 775, 775, -1, 775, 775, 775, 775, 775,
+ 775, -1, 775, 775, 775, 775, -1, 775,
+ -1, 775, 775, 775, -1, 775, 775, 775,
+ 775, 775, 775, -1, 775, 775, 775, 775,
+ 775, 775, 775, 775, 775, -1, 775, 775,
+ 775, 775, -1, -1, -1, -1, -1, -1,
+ -1, 775, -1, -1, 775, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 775,
+ 775, 775, 775, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 775, 775, 775, 775, -1,
+ -1, 775, 775, 741, 775, 775, 775, -1,
+ -1, -1, 775, 775, -1, 775, 775, -1,
+ -1, -1, -1, 775, -1, -1, -1, 775,
+ 775, 775, -1, 775, 775, -1, -1, 775,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 775, 775, 775, 775, -1, -1, -1, 775,
+ 775, -1, -1, 775, 775, 775, 775, 775,
+ 775, 775, 775, -1, 775, 775, 775, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 775, 775, 775,
+ 775, 775, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 775, -1, -1,
+ -1, -1, 775, -1, 786, 786, 786, 786,
+ 786, 786, 786, 786, 786, 786, 786, 786,
+ 786, 786, 786, 786, 786, 786, 786, 786,
+ 786, 412, 413, -1, 786, 786, 786, 786,
+ 786, 786, -1, 786, 786, 786, 786, -1,
+ 786, -1, 786, 786, 786, -1, 786, 786,
+ 786, 786, 786, 786, -1, 786, 786, 786,
+ 786, 786, 786, 786, 786, 786, -1, 786,
+ 786, 786, 786, -1, -1, -1, -1, -1,
+ -1, -1, 786, -1, -1, 786, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 786, 786, 786, 786, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 786, 786, 786, 786,
+ -1, 775, 786, 786, -1, 786, 786, 786,
+ -1, -1, -1, 786, 786, -1, 786, 786,
+ -1, -1, -1, -1, 786, -1, -1, -1,
+ 786, 786, 786, -1, 786, 786, -1, -1,
+ 786, -1, -1, -1, -1, -1, -1, -1,
+ -1, 786, 513, 409, 411, -1, -1, -1,
+ 786, 786, -1, -1, 786, 786, 786, 786,
+ 786, 786, 786, 786, -1, 786, 786, 786,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 786, 786,
+ 786, 786, 786, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 786, -1,
+ -1, -1, -1, 786, -1, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, 783,
+ 783, 783, 783, 783, -1, 783, 783, 783,
+ 783, 783, 783, -1, 783, 783, 783, 783,
+ -1, 783, -1, 783, 783, 783, -1, 783,
+ 783, 783, 783, 783, 783, -1, 783, 783,
+ 783, 783, 783, 783, 783, 783, 783, -1,
+ 783, 783, 783, 783, -1, -1, -1, -1,
+ -1, -1, -1, 783, -1, -1, 783, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 783, 783, 783, 783, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 783, 783, 783,
+ 783, -1, 786, 783, 783, -1, 783, 783,
+ 783, -1, -1, -1, 783, 783, -1, 783,
+ 783, -1, -1, -1, -1, 783, -1, -1,
+ -1, 783, 783, 783, -1, 783, 783, -1,
+ -1, 783, -1, -1, -1, -1, -1, -1,
+ -1, -1, 783, 783, 783, 783, -1, -1,
+ -1, 783, 783, -1, -1, 783, 783, 783,
+ 783, 783, 783, 783, 783, -1, 783, 783,
+ 783, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 77, 78,
+ 79, 80, -1, 76, -1, -1, -1, 783,
+ 783, 783, 783, 783, 100, 96, 98, 94,
+ 92, -1, -1, -1, -1, -1, -1, 783,
+ -1, -1, 87, -1, 783, -1, 88, 85,
+ 84, 86, -1, -1, -1, 72, 73, 74,
+ -1, -1, -1, -1, 1006, 71, -1, 104,
+ 106, 108, 110, -1, -1, -1, -1, -1,
+ -1, -1, 75, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 66, 67, 68, 69, 48, 49, 50, 51,
+ 77, 78, 79, 80, -1, 76, -1, 34,
+ 35, 38, 36, -1, -1, -1, 100, 96,
+ 98, 94, 92, -1, -1, -1, 39, 40,
+ 41, -1, -1, -1, 87, -1, -1, -1,
+ 88, 85, 84, 86, -1, -1, -1, 72,
+ 73, 74, -1, -1, -1, -1, 56, 71,
+ -1, 104, 106, 108, 110, -1, -1, -1,
+ -1, -1, -1, -1, 75, -1, 259, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 66, 67, 68, 69, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 783, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 510,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 132, 58, -1, 512, 408, 410, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 260, -1, -1, -1, -1,
+ -1, 511, -1, -1, -1, -1, 33, 31,
+ 32, 52, 62, 63, 64, 65, -1, 70,
+ 82, 90, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 102, 89, 81, 37, 58, 854, 854, 854,
+ 854, 854, 854, 854, 854, 854, 854, 854,
+ 854, 854, 854, 854, 854, 854, 854, 854,
+ 854, 854, 854, 854, 854, 854, 854, 854,
+ 854, 854, 854, -1, 854, 854, 854, 854,
+ 854, 854, -1, 854, 854, 854, -1, 854,
+ 854, 854, 854, 854, 854, 854, 854, 854,
+ 854, 854, 854, 854, 854, 854, 854, -1,
+ 854, 854, 854, 854, -1, -1, -1, -1,
+ -1, -1, -1, 854, 854, -1, 854, -1,
+ -1, 854, -1, -1, -1, -1, 854, -1,
+ -1, 854, 854, 854, 854, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 854,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 854, 854, 854,
+ 854, -1, -1, 854, 854, 854, 854, 854,
+ 854, -1, 854, 854, 854, 854, 854, 854,
+ 854, -1, -1, 854, -1, 854, 854, -1,
+ 854, 854, 854, 854, -1, 854, 854, -1,
+ -1, 854, -1, -1, -1, -1, -1, 854,
+ -1, 854, 854, 854, 854, 854, -1, -1,
+ -1, 854, 854, -1, 854, 854, 854, 854,
+ 854, 854, 854, 854, 854, -1, 854, 854,
+ 854, -1, -1, 854, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 854, 854, 854,
+ -1, -1, 854, 854, 854, -1, -1, 854,
+ 854, 854, 854, 854, -1, -1, -1, -1,
+ 909, 909, 909, 909, -1, 909, -1, 854,
+ -1, 854, 854, 854, 854, -1, 909, 909,
+ 909, 909, 909, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 909, -1, -1, -1,
+ 909, 909, 909, 909, -1, -1, -1, 909,
+ 909, 909, -1, -1, -1, -1, 909, 909,
+ -1, 909, 909, 909, 909, 909, -1, -1,
+ -1, -1, -1, -1, 909, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 909, 909, 909, 909, -1, -1,
+ 182, 183, -1, -1, -1, -1, -1, 909,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 854, -1, -1, -1, -1,
+ -1, 510, 62, 63, 64, 65, -1, 70,
+ 82, 90, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 909, 909, 909, 909, 909, -1, 909,
+ 909, 909, -1, -1, -1, -1, -1, -1,
+ 102, 89, 81, 132, 58, -1, -1, -1,
+ 909, 909, -1, -1, -1, -1, -1, -1,
+ -1, 909, -1, -1, -1, -1, -1, -1,
+ 909, 909, 909, 909, 909, 260, -1, -1,
+ -1, -1, -1, 511, -1, -1, -1, -1,
+ 33, 31, 32, 52, 62, 63, 64, 65,
+ -1, 70, 82, 90, 909, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 102, 89, 81, 37, 58, 852,
+ 852, 852, 852, 852, 852, 852, 852, 852,
+ 852, 852, 852, 852, 852, 852, 852, 852,
+ 852, 852, 852, 852, 852, 852, 852, 852,
+ 852, 852, 852, 852, 852, -1, 852, 852,
+ 852, 852, 852, 852, -1, 852, 852, 852,
+ -1, 852, 852, 852, 852, 852, 852, 852,
+ 852, 852, 852, 852, 852, 852, 852, 852,
+ 852, -1, 852, 852, 852, 852, -1, -1,
+ -1, -1, -1, -1, -1, 852, 852, -1,
+ 852, -1, -1, 852, -1, -1, -1, -1,
+ 852, -1, -1, 852, 852, 852, 852, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 852, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 852,
+ 852, 852, 852, -1, -1, 852, 852, 852,
+ 852, 852, 852, -1, 852, 852, 852, 852,
+ 852, 852, 852, -1, -1, 852, -1, 852,
+ 852, -1, 852, 852, 852, 852, -1, 852,
+ 852, -1, -1, 852, -1, -1, -1, -1,
+ -1, 852, -1, 852, 852, 852, 852, 852,
+ -1, -1, -1, 852, 852, -1, 852, 852,
+ 852, 852, 852, 852, 852, 852, 852, -1,
+ 852, 852, 852, -1, -1, 852, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 852,
+ 852, 852, -1, -1, 852, 852, 852, -1,
+ -1, 852, 852, 852, 852, 852, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 852, -1, 852, 852, 852, 852, -1,
+ 853, 853, 853, 853, 853, 853, 853, 853,
+ 853, 853, 853, 853, 853, 853, 853, 853,
+ 853, 853, 853, 853, 853, 853, 853, 853,
+ 853, 853, 853, 853, 853, 853, -1, 853,
+ 853, 853, 853, 853, 853, -1, 853, 853,
+ 853, -1, 853, 853, 853, 853, 853, 853,
+ 853, 853, 853, 853, 853, 853, 853, 853,
+ 853, 853, -1, 853, 853, 853, 853, -1,
+ -1, -1, -1, -1, -1, -1, 853, 853,
+ -1, 853, -1, -1, 853, -1, -1, -1,
+ -1, 853, -1, -1, 853, 853, 853, 853,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 853, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 853, 853, 853, 853, -1, 852, 853, 853,
+ 853, 853, 853, 853, -1, 853, 853, 853,
+ 853, 853, 853, 853, -1, -1, 853, -1,
+ 853, 853, -1, 853, 853, 853, 853, -1,
+ 853, 853, -1, -1, 853, -1, -1, -1,
+ -1, -1, 853, -1, 853, 853, 853, 853,
+ 853, -1, -1, -1, 853, 853, -1, 853,
+ 853, 853, 853, 853, 853, 853, 853, 853,
+ -1, 853, 853, 853, -1, -1, 853, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 853, 853, 853, -1, -1, 853, 853, 853,
+ -1, -1, 853, 853, 853, 853, 853, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 853, -1, 853, 853, 853, 853,
+ -1, 718, 718, 718, 718, 718, 718, 718,
+ 718, 718, 718, 718, 718, 718, 718, -1,
+ 718, 718, 718, 718, 718, 718, -1, -1,
+ -1, 718, 718, 718, 718, 718, 718, -1,
+ 718, 718, 718, 718, -1, 718, -1, 718,
+ 718, 718, -1, 718, 718, 718, 718, 718,
+ 718, -1, 718, 718, 718, 718, 718, 718,
+ 718, 718, 718, -1, 718, 718, 718, 718,
+ -1, -1, -1, -1, -1, -1, -1, 718,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 718, 718, 718,
+ 718, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 718, 718, 718, 718, -1, 853, 718,
+ 718, 718, 718, 718, 718, -1, -1, -1,
+ 718, 718, 718, 718, 718, -1, -1, -1,
+ -1, 718, 718, -1, -1, 718, 718, 718,
+ -1, 718, 718, -1, -1, 718, -1, -1,
+ -1, -1, -1, -1, -1, -1, 718, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 718, 718, 718, 718, 718, 718, 718,
+ 718, -1, 718, 718, 718, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 718, 718, 718, 718, 718,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 718, -1, 718, 718, 48,
+ 49, 50, 51, 77, 78, 79, 80, 985,
+ 76, -1, 34, 35, 38, 36, -1, -1,
+ -1, 100, 96, 98, 94, 92, -1, -1,
+ -1, 39, 40, 41, -1, -1, -1, 87,
+ -1, -1, -1, 88, 85, 84, 86, -1,
+ -1, -1, 72, 73, 74, -1, -1, -1,
+ -1, 56, 71, -1, 104, 106, 108, 110,
+ -1, -1, -1, -1, -1, -1, -1, 75,
+ -1, -1, 985, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 66, 67, 68,
+ 69, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 718,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 272, -1,
+ -1, -1, -1, -1, -1, 985, 985, 520,
+ -1, 33, 31, 32, 52, 62, 63, 64,
+ 65, -1, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 37, 58,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 271, 845, 845, 845, 845, 845, 845, 845,
+ 845, 845, 845, 845, 845, 845, 845, 845,
+ 845, 845, 845, 845, 845, 845, 845, 845,
+ -1, 845, 845, 845, 845, 845, 845, -1,
+ 845, 845, 845, 845, -1, 845, -1, 845,
+ 845, 845, -1, 845, 845, 845, 845, 845,
+ 845, -1, 845, 845, 845, 845, 845, 845,
+ 845, 845, 845, 845, 845, 845, 845, 845,
+ 845, -1, 845, -1, -1, -1, -1, 845,
+ 845, 845, 845, 845, -1, -1, 845, 845,
+ -1, 845, 845, 845, 845, 845, 845, 845,
+ 845, 845, 845, 845, 845, -1, -1, -1,
+ -1, -1, 845, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 845, 845, 845, 845, -1, -1, 845,
+ 845, 845, 845, 845, 845, -1, -1, -1,
+ 845, 845, 845, 845, 845, -1, -1, -1,
+ -1, 845, -1, -1, -1, 845, 845, 845,
+ -1, 845, 845, -1, -1, 845, -1, -1,
+ -1, -1, -1, -1, -1, -1, 845, 845,
+ 845, 845, 845, -1, 845, 845, 845, -1,
+ -1, 845, 845, 845, 845, 845, 845, 845,
+ 845, -1, 845, 845, 845, -1, -1, -1,
+ 845, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 845, 845, -1, -1, 845,
+ -1, -1, -1, -1, 845, -1, -1, -1,
+ -1, 845, -1, 845, 845, 845, 845, 845,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 845, -1, 845, -1, -1,
+ 845, 845, -1, -1, -1, 845, -1, 845,
+ -1, 845, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 845,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 272, -1, -1, -1, -1, -1, -1, -1,
+ -1, 520, -1, 33, 31, 32, 52, 62,
+ 63, 64, 65, -1, 70, 82, 90, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 102, 89, 81,
+ 37, 58, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 271, 844, 844, 844, 844, 844,
+ 844, 844, 844, 844, 844, 844, 844, 844,
+ 844, 844, 844, 844, 844, 844, 844, 844,
+ 844, 844, -1, 844, 844, 844, 844, 844,
+ 844, -1, 844, 844, 844, 844, -1, 844,
+ -1, 844, 844, 844, -1, 844, 844, 844,
+ 844, 844, 844, -1, 844, 844, 844, 844,
+ 844, 844, 844, 844, 844, 844, 844, 844,
+ 844, 844, 844, -1, 844, -1, -1, -1,
+ -1, 844, 844, 844, 844, 844, -1, -1,
+ 844, 844, -1, 844, 844, 844, 844, 844,
+ 844, 844, 844, 844, 844, 844, 844, -1,
+ -1, -1, -1, -1, 844, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 844, 844, 844, 844, -1,
+ -1, 844, 844, 844, 844, 844, 844, -1,
+ -1, -1, 844, 844, 844, 844, 844, -1,
+ -1, -1, -1, 844, -1, -1, -1, 844,
+ 844, 844, -1, 844, 844, -1, -1, 844,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 844, 844, 844, 844, 844, -1, 844, 844,
+ 844, -1, -1, 844, 844, 844, 844, 844,
+ 844, 844, 844, -1, 844, 844, 844, -1,
+ -1, -1, 844, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 844, 844, -1,
+ -1, 844, -1, -1, -1, -1, 844, -1,
+ -1, -1, -1, 844, -1, 844, 844, 844,
+ 844, 844, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 844, -1, 844,
+ -1, -1, 844, 844, -1, -1, -1, 844,
+ -1, 844, -1, 844, 846, 846, 846, 846,
+ 846, 846, 846, 846, 846, 846, 846, 846,
+ 846, 846, 846, 846, 846, 846, 846, 846,
+ 846, 846, 846, -1, 846, 846, 846, 846,
+ 846, 846, -1, 846, 846, 846, 846, -1,
+ 846, -1, 846, 846, 846, -1, 846, 846,
+ 846, 846, 846, 846, -1, 846, 846, 846,
+ 846, 846, 846, 846, 846, 846, 846, 846,
+ 846, 846, 846, 846, -1, 846, -1, -1,
+ -1, -1, 846, 846, 846, 846, 846, -1,
+ -1, 846, 846, -1, 846, 846, 846, 846,
+ 846, 846, 846, 846, 846, 846, 846, 846,
+ -1, -1, -1, -1, -1, 846, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 844, -1, -1, 846, 846, 846, 846,
+ -1, -1, 846, 846, 846, 846, 846, 846,
+ -1, -1, -1, 846, 846, 846, 846, 846,
+ -1, -1, -1, -1, 846, -1, -1, -1,
+ 846, 846, 846, -1, 846, 846, -1, -1,
+ 846, -1, -1, -1, -1, -1, -1, -1,
+ -1, 846, 846, 846, 846, 846, -1, 846,
+ 846, 846, -1, -1, 846, 846, 846, 846,
+ 846, 846, 846, 846, -1, 846, 846, 846,
+ -1, -1, -1, 846, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 846, 846,
+ -1, -1, 846, -1, -1, -1, -1, 846,
+ -1, -1, -1, -1, 846, -1, 846, 846,
+ 846, 846, 846, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 846, -1,
+ 846, -1, -1, 846, 846, -1, -1, -1,
+ 846, -1, 846, -1, 846, 736, 736, 736,
+ 736, 736, 736, 736, 736, 736, 736, 736,
+ 736, 736, 736, -1, 736, 736, 736, 736,
+ 736, 736, -1, -1, -1, 736, 736, 736,
+ 736, 736, 736, -1, 736, 736, 736, 736,
+ -1, 736, -1, 736, 736, 736, -1, 736,
+ 736, 736, 736, 736, 736, 736, 736, 736,
+ 736, 736, 736, 736, 736, 736, 736, 736,
+ 736, 736, 736, 736, -1, -1, -1, -1,
+ -1, -1, -1, 736, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 736, 736, 736, 736, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 846, -1, -1, 736, 736, 736,
+ 736, -1, -1, 736, 736, 736, 736, 736,
+ 736, -1, -1, -1, 736, 736, 736, 736,
+ 736, -1, 736, 736, -1, 736, 736, -1,
+ -1, 736, 736, 736, -1, 736, 736, -1,
+ -1, 736, -1, -1, -1, -1, -1, -1,
+ -1, -1, 736, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 736, 736, 736,
+ 736, 736, 736, 736, 736, -1, 736, 736,
+ 736, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 736,
+ 736, 736, 736, 736, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 736,
+ -1, 736, 736, -1, -1, -1, 732, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ 732, 732, 732, 732, -1, 732, 732, 732,
+ 732, 732, 732, -1, -1, -1, 732, 732,
+ 732, 732, 732, 732, -1, 732, 732, 732,
+ 732, -1, 732, -1, 732, 732, 732, -1,
+ 732, 732, 732, 732, 732, 732, -1, 732,
+ 732, 732, 732, 732, 732, 732, 732, 732,
+ -1, 732, 732, 732, 732, -1, -1, -1,
+ -1, -1, -1, -1, 732, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 732, 732, 732, 732, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 732, 732,
+ 732, 732, -1, 736, 732, 732, 732, 732,
+ 732, 732, -1, -1, -1, 732, 732, 732,
+ 732, 732, -1, -1, -1, -1, 732, 732,
+ -1, -1, 732, 732, 732, -1, 732, 732,
+ -1, -1, 732, -1, -1, -1, -1, -1,
+ -1, -1, -1, 732, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 732, 732,
+ 732, 732, 732, 732, 732, 732, -1, 732,
+ 732, 732, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 732, 732, 732, 732, 732, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 732, -1, 732, 732, 709, 709, 709, 709,
+ 709, 709, 709, 709, 709, 709, 709, 709,
+ 709, 709, -1, 709, 709, 709, 709, 709,
+ 709, -1, -1, -1, 709, 709, 709, 709,
+ 709, 709, -1, 709, 709, 709, 709, -1,
+ 709, -1, 709, 709, 709, -1, 709, 709,
+ 709, 709, 709, 709, -1, 709, 709, 709,
+ 709, 709, 709, 709, 709, 709, -1, 709,
+ 709, 709, 709, -1, -1, -1, -1, -1,
+ -1, -1, 709, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 709, 709, 709, 709, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 709, 709, 709, 709,
+ -1, -1, 709, 709, 732, 709, 709, 709,
+ -1, -1, -1, 709, 709, -1, 709, 709,
+ -1, -1, -1, -1, 709, 709, -1, -1,
+ 709, 709, 709, -1, 709, 709, -1, -1,
+ 709, -1, -1, -1, -1, -1, -1, -1,
+ -1, 709, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 709, 709, 709, 709,
+ 709, 709, 709, 709, -1, 709, 709, 709,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 709, 709,
+ 709, 709, 709, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 709, -1,
+ -1, 709, -1, -1, -1, 714, 714, 714,
+ 714, 714, 714, 714, 714, 714, 714, 714,
+ 714, 714, 714, -1, 714, 714, 714, 714,
+ 714, 714, -1, -1, -1, 714, 714, 714,
+ 714, 714, 714, -1, 714, 714, 714, 714,
+ -1, 714, -1, 714, 714, 714, -1, 714,
+ 714, 714, 714, 714, 714, -1, 714, 714,
+ 714, 714, 714, 714, 714, 714, 714, -1,
+ 714, 714, 714, 714, -1, -1, -1, -1,
+ -1, -1, -1, 714, -1, -1, -1, -1,
+ -1, -1, -1, -1, 714, -1, -1, -1,
+ -1, 714, 714, 714, 714, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 714, 714, 714,
+ 714, -1, 709, 714, 714, 714, 714, 714,
+ 714, -1, -1, -1, 714, 714, 714, 714,
+ 714, -1, -1, -1, -1, 714, 714, -1,
+ -1, 714, 714, 714, -1, 714, 714, -1,
+ -1, 714, -1, -1, -1, -1, -1, -1,
+ -1, -1, 714, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 714, 714, 714,
+ 714, 714, 714, 714, 714, -1, 714, 714,
+ 714, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 714,
+ 714, 714, 714, 714, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 714,
+ -1, 714, 714, -1, -1, -1, 831, 831,
+ 831, 831, 831, 831, 831, 831, 831, 831,
+ 831, 831, 831, 831, 831, 831, 831, 831,
+ 831, 831, 831, 831, 831, -1, 831, 831,
+ 831, 831, 831, 831, -1, 831, 831, 831,
+ 831, -1, 831, -1, 831, 831, 831, -1,
+ 831, 831, 831, 831, 831, 831, -1, 831,
+ 831, 831, 831, 831, 831, 831, 831, 831,
+ 831, 831, 831, 831, 831, 831, -1, 831,
+ -1, -1, -1, -1, 831, 831, 831, 831,
+ 831, -1, -1, 831, 831, -1, 831, 831,
+ 831, 831, 831, 831, 831, 831, 831, 831,
+ 831, 831, -1, -1, -1, -1, -1, 831,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 831, 831,
+ 831, 831, -1, 714, 831, 831, 831, 831,
+ 831, 831, -1, -1, -1, 831, 831, 831,
+ 831, 831, -1, -1, -1, -1, 831, -1,
+ -1, -1, 831, 831, 831, -1, 831, 831,
+ -1, -1, 831, -1, -1, -1, -1, -1,
+ -1, -1, -1, 831, 831, 831, 831, 831,
+ -1, 831, 831, 831, -1, -1, 831, 831,
+ 831, 831, 831, 831, 831, 831, -1, 831,
+ 831, 831, -1, -1, -1, 831, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 831, 831, -1, -1, 831, -1, -1, -1,
+ -1, 831, -1, -1, -1, -1, 831, -1,
+ 831, 831, 831, 831, 831, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 831, -1, 831, -1, -1, 831, 831, -1,
+ -1, -1, 831, -1, 831, -1, 831, 744,
+ 744, 744, 744, 744, 744, 744, 744, 744,
+ 744, 744, 744, 744, 744, -1, 744, 744,
+ 744, 744, 744, 744, -1, -1, -1, 744,
+ 744, 744, 744, 744, 744, -1, 744, 744,
+ 744, 744, -1, 744, -1, 744, 744, 744,
+ -1, 744, 744, 744, 744, 744, 744, -1,
+ 744, 744, 744, 744, 744, 744, 744, 744,
+ 744, -1, 744, 744, 744, 744, -1, 528,
+ -1, -1, -1, -1, -1, 744, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 744, 744, 744, 744, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 831, -1, -1, 744,
+ 744, 744, 744, -1, -1, 744, 744, 744,
+ 744, 744, 744, -1, -1, -1, 744, 744,
+ 744, 744, 744, -1, -1, -1, -1, 744,
+ 744, -1, -1, 744, 744, 744, -1, 744,
+ 744, -1, -1, 744, -1, -1, -1, -1,
+ -1, -1, -1, -1, 744, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 744,
+ 744, 744, 744, 744, 744, 744, 744, -1,
+ 744, 744, 744, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 744, 744, 744, 744, 744, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 744, -1, 744, 744, -1, -1, -1,
+ 770, 770, 770, 770, 770, 770, 770, 770,
+ 770, 770, 770, 770, 770, 770, -1, 770,
+ 770, 770, 770, 770, 770, -1, -1, -1,
+ 770, 770, 770, 770, 770, 770, -1, 770,
+ 770, 770, 770, -1, 770, -1, 770, 770,
+ 770, -1, 770, 770, 770, 770, 770, 770,
+ -1, 770, 770, 770, 770, 770, 770, 770,
+ 770, 770, -1, 770, 770, 770, 770, -1,
+ 770, -1, -1, -1, -1, -1, 770, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 770, 770, 770, 770,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 770, 770, 770, 770, -1, 744, 770, 770,
+ 770, 770, 770, 770, -1, -1, -1, 770,
+ 770, 770, 770, 770, -1, -1, -1, -1,
+ 770, 770, -1, -1, 770, 770, 770, -1,
+ 770, 770, -1, -1, 770, -1, -1, -1,
+ -1, -1, -1, -1, -1, 770, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 770, 770, 770, 770, 770, 770, 770, 770,
+ -1, 770, 770, 770, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 770, 770, 770, 770, 770, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 770, -1, 770, 770, -1, -1,
+ -1, 746, 746, 746, 746, 746, 746, 746,
+ 746, 746, 746, 746, 746, 746, 746, -1,
+ 746, 746, 746, 746, 746, 746, -1, -1,
+ -1, 746, 746, 746, 746, 746, 746, -1,
+ 746, 746, 746, 746, -1, 746, -1, 746,
+ 746, 746, -1, 746, 746, 746, 746, 746,
+ 746, -1, 746, 746, 746, 746, 746, 746,
+ 746, 746, 746, -1, 746, 746, 746, 746,
+ -1, -1, -1, -1, -1, -1, -1, 746,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 746, 746, 746,
+ 746, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 746, 746, 746, 746, -1, 770, 746,
+ 746, 746, 746, 746, 746, -1, -1, -1,
+ 746, 746, 746, 746, 746, -1, -1, -1,
+ -1, 746, 746, -1, -1, 746, 746, 746,
+ -1, 746, 746, -1, -1, 746, -1, -1,
+ -1, -1, -1, -1, -1, -1, 746, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 746, 746, 746, 746, 746, 746, 746,
+ 746, -1, 746, 746, 746, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 746, 746, 746, 746, 746,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 746, -1, 746, 746, -1,
+ -1, -1, 755, 755, 755, 755, 755, 755,
+ 755, 755, 755, 755, 755, 755, 755, 755,
+ -1, 755, 755, 755, 755, 755, 755, -1,
+ -1, -1, 755, 755, 755, 755, 755, 755,
+ -1, 755, 755, 755, 755, -1, 755, -1,
+ 755, 755, 755, -1, 755, 755, 755, 755,
+ 755, 755, -1, 755, 755, 755, 755, 755,
+ 755, 755, 755, 755, -1, 755, 755, 755,
+ 755, -1, -1, -1, -1, -1, -1, -1,
+ 755, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 755, 755,
+ 755, 755, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 755, 755, 755, 755, -1, 746,
+ 755, 755, 755, 755, 755, 755, -1, -1,
+ -1, 755, 755, 755, 755, 755, -1, -1,
+ -1, -1, 755, 755, -1, -1, 755, 755,
+ 755, -1, 755, 755, -1, -1, 755, -1,
+ -1, -1, -1, -1, -1, -1, -1, 755,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 755, 755, 755, 755, 755, 755,
+ 755, 755, -1, 755, 755, 755, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 77, 78, 79, 80,
+ -1, 76, -1, -1, 755, 755, 755, 755,
+ 755, -1, 100, 96, 98, 94, 92, -1,
+ -1, -1, -1, -1, 755, -1, 755, 755,
+ 87, -1, -1, -1, 88, 85, 84, 86,
+ -1, -1, -1, 72, 73, 74, -1, -1,
+ -1, -1, 1006, 71, -1, 104, 106, 108,
+ 110, -1, -1, -1, -1, -1, -1, -1,
+ 75, 987, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 66, 67,
+ 68, 69, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 755, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 470, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, 469, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 132,
+ 58, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 549, 838, 838, 838, 838, 838,
+ 838, 838, 838, 838, 838, 838, 838, 838,
+ 838, 838, 838, 838, 838, 838, 838, 838,
+ 838, 838, -1, 838, 838, 838, 838, 838,
+ 838, -1, 838, 838, 838, 838, -1, 838,
+ -1, 838, 838, 838, -1, 838, 838, 838,
+ 838, 838, 838, -1, 838, 838, 838, 838,
+ 838, 838, 838, 838, 838, 838, 838, 838,
+ 838, 838, 838, -1, 838, -1, -1, -1,
+ -1, 838, 838, 838, 838, 838, -1, -1,
+ 838, 838, -1, 838, 838, 838, 838, 838,
+ 838, 838, 838, 838, 838, 838, 838, -1,
+ -1, -1, -1, -1, 838, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 838, 838, 838, 838, -1,
+ -1, 838, 838, 838, 838, 838, 838, -1,
+ -1, -1, 838, 838, 838, 838, 838, -1,
+ -1, -1, -1, 838, -1, -1, -1, 838,
+ 838, 838, -1, 838, 838, -1, -1, 838,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 838, 838, 838, 838, 838, -1, 838, 838,
+ 838, -1, -1, 838, 838, 838, 838, 838,
+ 838, 838, 838, -1, 838, 838, 838, -1,
+ -1, -1, 838, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 838, 838, -1,
+ -1, 838, -1, -1, -1, -1, 838, -1,
+ -1, -1, -1, 838, -1, 838, 838, 838,
+ 838, 838, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 838, -1, 838,
+ -1, -1, 838, 838, -1, -1, -1, 838,
+ -1, 838, -1, 838, -1, -1, -1, -1,
+ 890, 890, 890, 890, -1, 890, -1, -1,
+ -1, -1, -1, -1, -1, -1, 890, 890,
+ 890, 890, 890, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 890, -1, -1, -1,
+ 890, 890, 890, 890, -1, -1, -1, 890,
+ 890, 890, -1, -1, -1, -1, 1004, 890,
+ 889, 1004, 1004, 1004, 890, 995, -1, -1,
+ -1, -1, -1, -1, 890, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 890, 890, 890, 890, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 838, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 890, 890, 890, 890, 890, -1, 890,
+ 890, 1004, -1, -1, -1, -1, -1, 470,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ 559, 560, -1, 469, 558, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 890, 890, 890, 890, 890, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 132, 58, -1, -1, -1, -1, -1,
+ -1, -1, 557, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 549, 839, 839, 839,
+ 839, 839, 839, 839, 839, 839, 839, 839,
+ 839, 839, 839, 839, 839, 839, 839, 839,
+ 839, 839, 839, 839, -1, 839, 839, 839,
+ 839, 839, 839, -1, 839, 839, 839, 839,
+ -1, 839, -1, 839, 839, 839, -1, 839,
+ 839, 839, 839, 839, 839, -1, 839, 839,
+ 839, 839, 839, 839, 839, 839, 839, 839,
+ 839, 839, 839, 839, 839, -1, 839, -1,
+ -1, -1, -1, 839, 839, 839, 839, 839,
+ -1, -1, 839, 839, -1, 839, 839, 839,
+ 839, 839, 839, 839, 839, 839, 839, 839,
+ 839, -1, -1, -1, -1, -1, 839, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 839, 839, 839,
+ 839, -1, -1, 839, 839, 839, 839, 839,
+ 839, -1, -1, -1, 839, 839, 839, 839,
+ 839, -1, -1, -1, -1, 839, -1, -1,
+ -1, 839, 839, 839, -1, 839, 839, -1,
+ -1, 839, -1, -1, -1, -1, -1, -1,
+ -1, -1, 839, 839, 839, 839, 839, -1,
+ 839, 839, 839, -1, -1, 839, 839, 839,
+ 839, 839, 839, 839, 839, -1, 839, 839,
+ 839, -1, -1, -1, 839, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 839,
+ 839, -1, -1, 839, -1, -1, -1, -1,
+ 839, -1, -1, -1, -1, 839, -1, 839,
+ 839, 839, 839, 839, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 839,
+ -1, 839, -1, -1, 839, 839, -1, -1,
+ -1, 839, -1, 839, -1, 839, 840, 840,
+ 840, 840, 840, 840, 840, 840, 840, 840,
+ 840, 840, 840, 840, 840, 840, 840, 840,
+ 840, 840, 840, 840, 840, -1, 840, 840,
+ 840, 840, 840, 840, -1, 840, 840, 840,
+ 840, -1, 840, -1, 840, 840, 840, -1,
+ 840, 840, 840, 840, 840, 840, -1, 840,
+ 840, 840, 840, 840, 840, 840, 840, 840,
+ 840, 840, 840, 840, 840, 840, -1, 840,
+ -1, -1, -1, -1, 840, 840, 840, 840,
+ 840, -1, -1, 840, 840, -1, 840, 840,
+ 840, 840, 840, 840, 840, 840, 840, 840,
+ 840, 840, -1, -1, -1, -1, -1, 840,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 839, -1, -1, 840, 840,
+ 840, 840, -1, -1, 840, 840, 840, 840,
+ 840, 840, -1, -1, -1, 840, 840, 840,
+ 840, 840, -1, -1, -1, -1, 840, -1,
+ -1, -1, 840, 840, 840, -1, 840, 840,
+ -1, -1, 840, -1, -1, -1, -1, -1,
+ -1, -1, -1, 840, 840, 840, 840, 840,
+ -1, 840, 840, 840, -1, -1, 840, 840,
+ 840, 840, 840, 840, 840, 840, -1, 840,
+ 840, 840, -1, -1, -1, 840, -1, -1,
+ -1, -1, 559, 560, -1, -1, 558, -1,
+ 840, 840, -1, -1, 840, -1, -1, -1,
+ -1, 840, -1, -1, -1, -1, 840, -1,
+ 840, 840, 840, 840, 840, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 840, -1, 840, -1, 557, 840, 840, -1,
+ -1, -1, 840, -1, 840, -1, 840, 905,
+ 905, 905, 905, 905, 905, 905, 905, 905,
+ 905, 905, 905, 905, 905, 905, 905, 905,
+ 905, 905, 905, 905, 905, 905, -1, 905,
+ 905, 905, 905, 905, 905, -1, 905, 905,
+ 905, 905, -1, 905, -1, 905, 905, 905,
+ -1, 905, 905, 905, 905, 905, 905, -1,
+ 905, 905, 905, 905, 905, 905, 905, 905,
+ 905, 905, 905, 905, 905, 905, 905, -1,
+ 905, -1, -1, -1, -1, 905, 905, 905,
+ 905, 905, -1, -1, 905, 905, -1, 905,
+ 905, 905, 905, 905, 905, 905, 905, 905,
+ 905, 905, 905, -1, -1, -1, -1, -1,
+ 905, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 840, -1, -1, 905,
+ 905, 905, 905, -1, -1, 905, 905, 905,
+ 905, 905, 905, -1, -1, -1, 905, 905,
+ 905, 905, 905, -1, -1, -1, -1, 905,
+ -1, -1, -1, 905, 905, 905, -1, 905,
+ 905, -1, -1, 905, -1, -1, -1, -1,
+ -1, -1, -1, -1, 905, 905, 905, 905,
+ 905, -1, 905, 905, 905, -1, -1, 905,
+ 905, 905, 905, 905, 905, 905, 905, -1,
+ 905, 905, 905, -1, -1, -1, 905, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 905, 905, -1, -1, 905, -1, -1,
+ -1, -1, 905, -1, -1, -1, -1, 905,
+ -1, 905, 905, 905, 905, 905, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 905, -1, 905, -1, -1, 905, 905,
+ -1, -1, -1, 905, -1, 905, -1, 905,
+ 904, 904, 904, 904, 904, 904, 904, 904,
+ 904, 904, 904, 904, 904, 904, 904, 904,
+ 904, 904, 904, 904, 904, 904, 904, -1,
+ 904, 904, 904, 904, 904, 904, -1, 904,
+ 904, 904, 904, -1, 904, -1, 904, 904,
+ 904, -1, 904, 904, 904, 904, 904, 904,
+ -1, 904, 904, 904, 904, 904, 904, 904,
+ 904, 904, 904, 477, 479, 481, 483, 904,
+ -1, 904, -1, -1, -1, -1, 904, 904,
+ 904, 904, 904, -1, -1, 904, 904, -1,
+ 904, 904, 904, 904, 904, 904, 904, 904,
+ 904, 904, 904, 904, -1, -1, -1, -1,
+ -1, 904, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 905, -1, -1,
+ 904, 904, 904, 904, -1, -1, 904, 904,
+ 904, 904, 904, 904, -1, -1, -1, 904,
+ 904, 904, 904, 904, -1, -1, -1, -1,
+ 904, -1, -1, -1, 904, 904, 904, -1,
+ 904, 904, -1, -1, 904, -1, -1, -1,
+ -1, -1, -1, -1, -1, 904, 904, 904,
+ 904, 904, -1, 904, 904, 904, -1, -1,
+ 904, 904, 904, 904, 904, 904, 904, 904,
+ -1, 904, 904, 904, -1, -1, -1, 904,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 904, 904, -1, -1, 904, -1,
+ 475, 561, -1, 904, -1, -1, -1, -1,
+ 904, -1, 904, 904, 904, 904, 904, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 904, -1, 904, -1, -1, 904,
+ 904, -1, -1, -1, 904, -1, 904, -1,
+ 904, 882, 882, 882, 882, 882, 882, 882,
+ 882, 882, 882, 882, 882, 882, 882, 882,
+ 882, 882, 882, 882, 882, 882, 882, 882,
+ -1, 882, 882, 882, 882, 882, 882, -1,
+ 882, 882, 882, 882, -1, 882, -1, 882,
+ 882, 882, -1, 882, 882, 882, 882, 882,
+ 882, -1, 882, 882, 882, 882, 882, 882,
+ 882, 882, 882, 882, 882, 882, 882, 882,
+ 882, -1, 882, -1, -1, -1, -1, 882,
+ 882, 882, 882, 882, -1, -1, 882, 882,
+ -1, 882, 882, 882, 882, 882, 882, 882,
+ 882, 882, 882, 882, 882, -1, -1, -1,
+ -1, -1, 882, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 904, -1,
+ -1, 882, 882, 882, 882, -1, -1, 882,
+ 882, 882, 882, 882, 882, -1, -1, -1,
+ 882, 882, 882, 882, 882, -1, -1, -1,
+ -1, 882, -1, -1, -1, 882, 882, 882,
+ -1, 882, 882, -1, -1, 882, -1, -1,
+ -1, -1, -1, -1, -1, -1, 882, 882,
+ 882, 882, 882, -1, 882, 882, 882, 882,
+ -1, 882, 882, 882, 882, 882, 882, 882,
+ 882, -1, 882, 882, 882, -1, -1, -1,
+ 882, -1, -1, -1, -1, -1, -1, -1,
+ 882, -1, -1, 882, 882, -1, -1, 882,
+ -1, -1, -1, -1, 882, -1, -1, -1,
+ -1, 882, -1, 882, 882, 882, 882, 882,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 882, -1, 882, -1, -1,
+ 882, 882, -1, -1, -1, 882, -1, 882,
+ -1, 882, 883, 883, 883, 883, 883, 883,
+ 883, 883, 883, 883, 883, 883, 883, 883,
+ 883, 883, 883, 883, 883, 883, 883, 883,
+ 883, -1, 883, 883, 883, 883, 883, 883,
+ -1, 883, 883, 883, 883, -1, 883, -1,
+ 883, 883, 883, -1, 883, 883, 883, 883,
+ 883, 883, -1, 883, 883, 883, 883, 883,
+ 883, 883, 883, 883, 883, 883, 883, 883,
+ 883, 883, -1, 883, -1, -1, -1, -1,
+ 883, 883, 883, 883, 883, -1, -1, 883,
+ 883, -1, 883, 883, 883, 883, 883, 883,
+ 883, 883, 883, 883, 883, 883, -1, -1,
+ -1, -1, -1, 883, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 882,
+ -1, -1, 883, 883, 883, 883, -1, -1,
+ 883, 883, 883, 883, 883, 883, -1, -1,
+ -1, 883, 883, 883, 883, 883, -1, -1,
+ -1, -1, 883, -1, -1, -1, 883, 883,
+ 883, -1, 883, 883, -1, -1, 883, -1,
+ -1, -1, -1, -1, -1, -1, -1, 883,
+ 883, 883, 883, 883, -1, 883, 883, 883,
+ 883, -1, 883, 883, 883, 883, 883, 883,
+ 883, 883, -1, 883, 883, 883, -1, -1,
+ -1, 883, -1, -1, -1, -1, -1, -1,
+ -1, 883, -1, -1, 883, 883, -1, -1,
+ 883, -1, 475, 561, -1, 883, -1, -1,
+ -1, -1, 883, -1, 883, 883, 883, 883,
+ 883, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 883, -1, 883, -1,
+ -1, 883, 883, -1, -1, -1, 883, -1,
+ 883, -1, 883, 884, 884, 884, 884, 884,
+ 884, 884, 884, 884, 884, 884, 884, 884,
+ 884, 884, 884, 884, 884, 884, 884, 884,
+ 884, 884, -1, 884, 884, 884, 884, 884,
+ 884, -1, 884, 884, 884, 884, -1, 884,
+ -1, 884, 884, 884, -1, 884, 884, 884,
+ 884, 884, 884, -1, 884, 884, 884, 884,
+ 884, 884, 884, 884, 884, 884, 884, 884,
+ 884, 884, 884, -1, 884, -1, -1, -1,
+ -1, 884, 884, 884, 884, 884, -1, -1,
+ 884, 884, -1, 884, 884, 884, 884, 884,
+ 884, 884, 884, 884, 884, 884, 884, -1,
+ -1, -1, -1, -1, 884, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 883, -1, -1, 884, 884, 884, 884, -1,
+ -1, 884, 884, 884, 884, 884, 884, -1,
+ -1, -1, 884, 884, 884, 884, 884, -1,
+ -1, -1, -1, 884, -1, -1, -1, 884,
+ 884, 884, -1, 884, 884, -1, -1, 884,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 884, 884, 884, 884, 884, -1, 884, 884,
+ 884, 884, -1, 884, 884, 884, 884, 884,
+ 884, 884, 884, -1, 884, 884, 884, -1,
+ -1, -1, 884, -1, -1, -1, -1, -1,
+ -1, -1, 884, -1, -1, 884, 884, -1,
+ -1, 884, -1, -1, -1, -1, 884, -1,
+ -1, -1, -1, 884, -1, 884, 884, 884,
+ 884, 884, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 884, -1, 884,
+ -1, -1, 884, 884, -1, -1, -1, 884,
+ -1, 884, -1, 884, 885, 885, 885, 885,
+ 885, 885, 885, 885, 885, 885, 885, 885,
+ 885, 885, 885, 885, 885, 885, 885, 885,
+ 885, 885, 885, -1, 885, 885, 885, 885,
+ 885, 885, -1, 885, 885, 885, 885, -1,
+ 885, -1, 885, 885, 885, -1, 885, 885,
+ 885, 885, 885, 885, -1, 885, 885, 885,
+ 885, 885, 885, 885, 885, 885, 885, 885,
+ 885, 885, 885, 885, -1, 885, -1, -1,
+ -1, -1, 885, 885, 885, 885, 885, -1,
+ -1, 885, 885, -1, 885, 885, 885, 885,
+ 885, 885, 885, 885, 885, 885, 885, 885,
+ -1, -1, -1, -1, -1, 885, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 884, -1, -1, 885, 885, 885, 885,
+ -1, -1, 885, 885, 885, 885, 885, 885,
+ -1, -1, -1, 885, 885, 885, 885, 885,
+ -1, -1, -1, -1, 885, -1, -1, -1,
+ 885, 885, 885, -1, 885, 885, -1, -1,
+ 885, -1, -1, -1, -1, -1, -1, -1,
+ -1, 885, 885, 885, 885, 885, -1, 885,
+ 885, 885, 885, -1, 885, 885, 885, 885,
+ 885, 885, 885, 885, -1, 885, 885, 885,
+ -1, -1, -1, 885, -1, -1, -1, -1,
+ -1, -1, -1, 885, -1, -1, 885, 885,
+ -1, -1, 885, -1, -1, -1, -1, 885,
+ -1, -1, -1, -1, 885, -1, 885, 885,
+ 885, 885, 885, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 885, -1,
+ 885, -1, -1, 885, 885, -1, -1, -1,
+ 885, -1, 885, -1, 885, 912, 912, 912,
+ 912, 912, 912, 912, 912, 912, 912, 912,
+ 912, 912, 912, 912, 912, 912, 912, 912,
+ 912, 912, 912, 912, -1, 912, 912, 912,
+ 912, 912, 912, -1, 912, 912, 912, 912,
+ -1, 912, -1, 912, 912, 912, 912, 912,
+ 912, 912, 912, 912, 912, -1, 912, 912,
+ 912, 912, 912, 912, 912, 912, 912, 912,
+ 912, 912, 912, 912, 912, -1, 912, -1,
+ -1, 912, -1, 912, 912, 912, 912, 912,
+ -1, -1, 912, 912, -1, 912, 912, 912,
+ 912, 912, 912, 912, 912, 912, 912, 912,
+ 912, -1, -1, -1, -1, -1, 912, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 885, -1, -1, 912, 912, 912,
+ 912, -1, -1, 912, 912, 912, 912, 912,
+ 912, -1, -1, -1, 912, 912, 912, 912,
+ 912, -1, -1, -1, -1, 912, -1, -1,
+ -1, 912, 912, 912, -1, 912, 912, -1,
+ -1, 912, -1, -1, -1, -1, -1, -1,
+ -1, -1, 912, 912, 912, 912, 912, -1,
+ 912, 912, 912, -1, -1, 912, 912, 912,
+ 912, 912, 912, 912, 912, 912, 912, 912,
+ 912, -1, -1, -1, 912, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 912,
+ 912, -1, -1, 912, -1, -1, -1, -1,
+ 912, -1, 912, 912, -1, 912, -1, 912,
+ 912, 912, 912, 912, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 912,
+ -1, 912, -1, -1, 912, 912, -1, -1,
+ -1, 912, -1, 912, -1, 912, 913, 913,
+ 913, 913, 913, 913, 913, 913, 913, 913,
+ 913, 913, 913, 913, 913, 913, 913, 913,
+ 913, 913, 913, 913, 913, -1, 913, 913,
+ 913, 913, 913, 913, -1, 913, 913, 913,
+ 913, -1, 913, -1, 913, 913, 913, 913,
+ 913, 913, 913, 913, 913, 913, -1, 913,
+ 913, 913, 913, 913, 913, 913, 913, 913,
+ 913, 913, 913, 913, 913, 913, -1, 913,
+ -1, -1, 913, -1, 913, 913, 913, 913,
+ 913, -1, -1, 913, 913, -1, 913, 913,
+ 913, 913, 913, 913, 913, 913, 913, 913,
+ 913, 913, -1, -1, -1, -1, -1, 913,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 912, -1, -1, 913, 913,
+ 913, 913, -1, -1, 913, 913, 913, 913,
+ 913, 913, -1, -1, -1, 913, 913, 913,
+ 913, 913, -1, -1, -1, -1, 913, -1,
+ -1, -1, 913, 913, 913, -1, 913, 913,
+ -1, -1, 913, -1, -1, -1, -1, -1,
+ -1, -1, -1, 913, 913, 913, 913, 913,
+ -1, 913, 913, 913, -1, -1, 913, 913,
+ 913, 913, 913, 913, 913, 913, 913, 913,
+ 913, 913, -1, -1, -1, 913, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 913, 913, -1, -1, 913, -1, -1, -1,
+ -1, 913, -1, 913, 913, -1, 913, -1,
+ 913, 913, 913, 913, 913, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 913, -1, 913, -1, -1, 913, 913, -1,
+ -1, -1, 913, -1, 913, -1, 913, 914,
+ 914, 914, 914, 914, 914, 914, 914, 914,
+ 914, 914, 914, 914, 914, 914, 914, 914,
+ 914, 914, 914, 914, 914, 914, -1, 914,
+ 914, 914, 914, 914, 914, -1, 914, 914,
+ 914, 914, -1, 914, -1, 914, 914, 914,
+ 914, 914, 914, 914, 914, 914, 914, -1,
+ 914, 914, 914, 914, 914, 914, 914, 914,
+ 914, 914, 914, 914, 914, 914, 914, -1,
+ 914, -1, -1, 914, -1, 914, 914, 914,
+ 914, 914, -1, -1, 914, 914, -1, 914,
+ 914, 914, 914, 914, 914, 914, 914, 914,
+ 914, 914, 914, -1, -1, -1, -1, -1,
+ 914, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 913, -1, -1, 914,
+ 914, 914, 914, -1, -1, 914, 914, 914,
+ 914, 914, 914, -1, -1, -1, 914, 914,
+ 914, 914, 914, -1, -1, -1, -1, 914,
+ -1, -1, -1, 914, 914, 914, -1, 914,
+ 914, -1, -1, 914, -1, -1, -1, -1,
+ -1, -1, -1, -1, 914, 914, 914, 914,
+ 914, -1, 914, 914, 914, -1, -1, 914,
+ 914, 914, 914, 914, 914, 914, 914, 914,
+ 914, 914, 914, -1, -1, -1, 914, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 914, 914, -1, -1, 914, -1, -1,
+ -1, -1, 914, -1, 914, 914, -1, 914,
+ -1, 914, 914, 914, 914, 914, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 914, -1, 914, -1, -1, 914, 914,
+ -1, -1, -1, 914, -1, 914, -1, 914,
+ 915, 915, 915, 915, 915, 915, 915, 915,
+ 915, 915, 915, 915, 915, 915, 915, 915,
+ 915, 915, 915, 915, 915, 915, 915, -1,
+ 915, 915, 915, 915, 915, 915, -1, 915,
+ 915, 915, 915, -1, 915, -1, 915, 915,
+ 915, 915, 915, 915, 915, 915, 915, 915,
+ -1, 915, 915, 915, 915, 915, 915, 915,
+ 915, 915, 915, 915, 915, 915, 915, 915,
+ -1, 915, -1, -1, 915, -1, 915, 915,
+ 915, 915, 915, -1, -1, 915, 915, -1,
+ 915, 915, 915, 915, 915, 915, 915, 915,
+ 915, 915, 915, 915, -1, -1, -1, -1,
+ -1, 915, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 914, -1, -1,
+ 915, 915, 915, 915, -1, -1, 915, 915,
+ 915, 915, 915, 915, -1, -1, -1, 915,
+ 915, 915, 915, 915, -1, -1, -1, -1,
+ 915, -1, -1, -1, 915, 915, 915, -1,
+ 915, 915, -1, -1, 915, -1, -1, -1,
+ -1, -1, -1, -1, -1, 915, 915, 915,
+ 915, 915, -1, 915, 915, 915, -1, -1,
+ 915, 915, 915, 915, 915, 915, 915, 915,
+ 915, 915, 915, 915, -1, -1, -1, 915,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 915, 915, -1, -1, 915, -1,
+ -1, -1, -1, 915, -1, 915, 915, -1,
+ 915, -1, 915, 915, 915, 915, 915, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 915, -1, 915, -1, -1, 915,
+ 915, -1, -1, -1, 915, -1, 915, -1,
+ 915, 891, 891, 891, 891, -1, 891, -1,
+ -1, -1, -1, -1, -1, -1, -1, 891,
+ 891, 891, 891, 891, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 891, -1, -1,
+ -1, 891, 891, 891, 891, -1, -1, -1,
+ 891, 891, 891, -1, -1, -1, -1, 1009,
+ 891, -1, 891, 891, 891, 891, -1, -1,
+ -1, -1, -1, -1, -1, 891, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 891, 891, 891, 891, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 792, 792,
+ 792, 792, 792, 792, 792, 792, 792, 792,
+ 792, 792, 792, 792, 792, 792, 792, 792,
+ 792, 792, 792, 792, 792, -1, 792, 792,
+ 792, 792, 792, 792, -1, 792, 792, 792,
+ 792, -1, 792, -1, 792, 792, 792, -1,
+ 792, 792, 792, 792, 792, 792, 915, 792,
+ 792, 792, 792, 792, 792, 792, 792, 792,
+ -1, 792, 792, 792, 792, -1, -1, -1,
+ -1, -1, -1, -1, 792, -1, -1, 792,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 792, 792, 792, 792, -1, -1,
+ -1, 572, -1, -1, -1, -1, -1, -1,
+ -1, -1, 891, 891, 891, 891, 891, -1,
+ 891, 891, 891, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 573, 574, 575, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 891, 891, 891, 1005, 1005, 792, 792,
+ 792, 792, -1, -1, 792, 792, -1, 792,
+ 792, 792, -1, -1, -1, 792, 792, -1,
+ 792, 792, -1, -1, -1, -1, 792, -1,
+ -1, -1, 792, 792, 792, -1, 792, 792,
+ -1, -1, 792, -1, -1, -1, -1, -1,
+ -1, -1, -1, 792, 792, 792, 792, -1,
+ -1, -1, 792, 792, -1, -1, 792, 792,
+ 792, 792, 792, 792, 792, 792, -1, 792,
+ 792, 792, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 792, 792, 792, 792, 792, -1, 48, 49,
+ 50, 51, 77, 78, 79, 80, -1, 76,
+ 792, 34, 35, 38, 36, 792, -1, -1,
+ 100, 96, 98, 94, 92, -1, -1, -1,
+ 39, 40, 41, -1, -1, -1, 87, -1,
+ -1, -1, 88, 85, 84, 86, -1, -1,
+ -1, 72, 73, 74, -1, -1, -1, -1,
+ 56, 71, -1, 104, 106, 108, 110, -1,
+ -1, -1, -1, -1, -1, -1, 75, -1,
+ 259, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 66, 67, 68, 69,
+ -1, -1, 182, 183, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, 785, 785, 785, 785,
+ 785, -1, 785, 785, 785, 785, 785, 785,
+ -1, 785, 785, 785, 785, -1, 785, -1,
+ 785, 785, 785, -1, 785, 785, 785, 785,
+ 785, 785, -1, 785, 785, 785, 785, 785,
+ 785, 785, 785, 785, -1, 785, 785, 785,
+ 785, -1, -1, -1, 792, -1, -1, -1,
+ 785, -1, -1, 785, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 260, 785, 785,
+ 785, 785, -1, 576, -1, -1, -1, -1,
+ 33, 31, 32, 52, 62, 63, 64, 65,
+ -1, 70, 82, 90, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 102, 89, 81, 37, 58, -1,
+ -1, -1, 785, 785, 785, 785, -1, -1,
+ 785, 785, -1, 785, 785, 785, -1, -1,
+ -1, 785, 785, -1, 785, 785, -1, -1,
+ -1, -1, 785, -1, -1, -1, 785, 785,
+ 785, -1, 785, 785, -1, -1, 785, -1,
+ -1, -1, -1, -1, -1, -1, -1, 785,
+ 785, 785, 785, -1, -1, -1, 785, 785,
+ -1, -1, 785, 785, 785, 785, 785, 785,
+ 785, 785, -1, 785, 785, 785, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 785, 785, 785, 785,
+ 785, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 785, -1, -1, -1,
+ -1, 785, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 572, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 573, 574, 575, 782, 782,
+ 782, 782, 782, 782, 782, 782, 782, 782,
+ 782, 782, 782, 782, 782, 782, 782, 782,
+ 782, 782, 782, 782, 782, -1, 782, 782,
+ 782, 782, 782, 782, -1, 782, 782, 782,
+ 782, -1, 782, -1, 782, 782, 782, -1,
+ 782, 782, 782, 782, 782, 782, -1, 782,
+ 782, 782, 782, 782, 782, 782, 782, 782,
+ -1, 782, 782, 782, 782, -1, -1, -1,
+ -1, -1, -1, -1, 782, -1, -1, 782,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 782, 782, 782, 782, -1, -1,
+ 785, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 782, 782,
+ 782, 782, -1, -1, 782, 782, -1, 782,
+ 782, 782, -1, -1, -1, 782, 782, -1,
+ 782, 782, -1, -1, -1, -1, 782, -1,
+ -1, -1, 782, 782, 782, -1, 782, 782,
+ -1, -1, 782, -1, -1, -1, -1, -1,
+ -1, -1, -1, 782, 782, 782, 782, -1,
+ -1, -1, 782, 782, -1, -1, 782, 782,
+ 782, 782, 782, 782, 782, 782, -1, 782,
+ 782, 782, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 782, 782, 782, 782, 782, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 782, -1, -1, -1, -1, 782, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 260,
+ -1, -1, -1, -1, -1, 576, -1, -1,
+ -1, -1, 33, 31, 32, 52, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 37,
+ 58, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 851, 851, 851, 851, 851,
+ 851, 851, 851, 851, 851, 851, 851, 851,
+ 851, 851, 851, 851, 851, 851, 851, 851,
+ 851, 851, 851, 851, 851, 851, 851, 851,
+ 851, -1, 851, 851, 851, 851, 851, 851,
+ -1, 851, 851, 851, 782, 851, 851, 851,
+ 851, 851, 851, 851, 851, 851, 851, 851,
+ 851, 851, 851, 851, 851, -1, 851, 851,
+ 851, 851, -1, -1, -1, -1, -1, -1,
+ -1, 851, 851, -1, 851, -1, -1, 851,
+ -1, -1, -1, -1, 851, -1, -1, 851,
+ 851, 851, 851, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 851, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 851, 851, 851, 851, -1,
+ -1, 851, 851, 851, 851, 851, 851, -1,
+ 851, 851, 851, 851, 851, 851, 851, -1,
+ -1, 851, -1, 851, 851, -1, 851, 851,
+ 851, 851, -1, 851, 851, -1, -1, 851,
+ -1, -1, -1, -1, -1, 851, -1, 851,
+ 851, 851, 851, 851, -1, -1, -1, 851,
+ 851, -1, 851, 851, 851, 851, 851, 851,
+ 851, 851, 851, -1, 851, 851, 851, -1,
+ -1, 851, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 851, 851, 851, -1, -1,
+ 851, 851, 851, -1, -1, 851, 851, 851,
+ 851, 851, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 851, -1, 851,
+ 851, 851, 851, -1, 848, 848, 848, 848,
+ 848, 848, 848, 848, 848, 848, 848, 848,
+ 848, 848, 848, 848, 848, 848, 848, 848,
+ 848, 848, 848, -1, 848, 848, 848, 848,
+ 848, 848, -1, 848, 848, 848, 848, -1,
+ 848, -1, 848, 848, 848, -1, 848, 848,
+ 848, 848, 848, 848, -1, 848, 848, 848,
+ 848, 848, 848, 848, 848, 848, 848, 848,
+ 848, 848, 848, 848, -1, 848, -1, -1,
+ -1, -1, 848, 848, 848, 848, 848, -1,
+ -1, 848, 848, -1, 848, 848, 848, 848,
+ 848, 848, 848, 848, 848, 848, 848, 848,
+ -1, -1, -1, -1, -1, 848, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 848, 848, 848, 848,
+ -1, 851, 848, 848, 848, 848, 848, 848,
+ -1, -1, -1, 848, 848, 848, 848, 848,
+ -1, -1, -1, -1, 848, -1, -1, -1,
+ 848, 848, 848, -1, 848, 848, -1, -1,
+ 848, -1, -1, -1, -1, -1, -1, -1,
+ -1, 848, 848, 848, 848, 848, -1, 848,
+ 848, 848, -1, -1, 848, 848, 848, 848,
+ 848, 848, 848, 848, -1, 848, 848, 848,
+ -1, -1, -1, 848, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 848, 848,
+ -1, -1, 848, -1, -1, -1, -1, 848,
+ -1, -1, -1, -1, 848, -1, 848, 848,
+ 848, 848, 848, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 848, -1,
+ 848, -1, -1, 848, 848, -1, -1, -1,
+ 848, -1, 848, -1, 848, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, -1, 739, 739, 739, 739,
+ 739, 739, -1, -1, -1, 739, 739, 739,
+ 739, 739, 739, -1, 739, 739, 739, 739,
+ -1, 739, -1, 739, 739, 739, -1, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, 739, 739, 739, 739, 739,
+ 739, 739, 739, 739, -1, -1, -1, -1,
+ -1, -1, -1, 739, -1, 739, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 739, 739, 739, 739, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 848, -1, -1, 739, 739, 739,
+ 739, -1, -1, 739, 739, 739, 739, 739,
+ 739, -1, -1, -1, 739, 739, 739, 739,
+ 739, -1, 739, 739, -1, 739, 739, -1,
+ -1, 739, 739, 739, -1, 739, 739, 739,
+ -1, 739, -1, -1, -1, -1, -1, -1,
+ -1, -1, 739, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 739, 739, 739,
+ 739, 739, 739, 739, 739, -1, 739, 739,
+ 739, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 919,
+ 919, 919, 919, -1, 919, -1, -1, 739,
+ 739, 739, 739, 739, -1, 919, 919, 919,
+ 919, 919, -1, -1, -1, -1, -1, 739,
+ -1, 739, 739, 919, -1, -1, -1, 919,
+ 919, 919, 919, -1, -1, -1, 919, 919,
+ 919, -1, -1, -1, -1, 919, 919, -1,
+ 919, 919, 919, 919, 919, -1, -1, -1,
+ -1, -1, -1, 919, -1, -1, -1, 920,
+ 920, 920, 920, -1, 920, -1, -1, -1,
+ -1, 919, 919, 919, 919, 920, 920, 920,
+ 920, 920, -1, -1, -1, -1, 919, -1,
+ -1, -1, -1, 920, -1, -1, -1, 920,
+ 920, 920, 920, -1, -1, -1, 920, 920,
+ 920, -1, -1, -1, -1, 920, 920, -1,
+ 920, 920, 920, 920, 920, -1, -1, -1,
+ -1, -1, -1, 920, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 920, 920, 920, 920, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 920, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 739, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 919, 919, 919, 919, 919, -1, 919, 919,
+ 919, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 919,
+ 919, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 919, -1, 919,
+ 919, 919, 919, 919, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 920, 920, 920, 920, 920, 919, 920, 920,
+ 920, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 920,
+ 920, -1, -1, -1, -1, -1, -1, 921,
+ 921, 921, 921, -1, 921, 920, -1, 920,
+ 920, 920, 920, 920, -1, 921, 921, 921,
+ 921, 921, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 921, -1, -1, -1, 921,
+ 921, 921, 921, -1, -1, 920, 921, 921,
+ 921, -1, -1, -1, -1, 921, 921, -1,
+ 921, 921, 921, 921, 921, -1, -1, -1,
+ -1, -1, -1, 921, -1, -1, -1, 890,
+ 890, 890, 890, -1, 890, -1, -1, -1,
+ -1, 921, 921, 921, 921, 890, 890, 890,
+ 890, 890, -1, -1, -1, -1, 921, -1,
+ -1, -1, -1, 890, -1, -1, -1, 890,
+ 890, 890, 890, -1, -1, -1, 890, 890,
+ 890, -1, -1, -1, -1, 1004, 890, 889,
+ 1004, 1004, 1004, 890, -1, -1, -1, -1,
+ -1, -1, -1, 890, -1, -1, -1, -1,
+ -1, -1, 890, 890, 890, 890, -1, 890,
+ -1, 890, 890, 890, 890, -1, -1, -1,
+ 890, 890, 890, 890, 890, -1, 995, -1,
+ -1, -1, -1, -1, -1, -1, 890, -1,
+ -1, -1, 890, 890, 890, 890, -1, -1,
+ -1, 890, 890, 890, -1, -1, -1, -1,
+ 1004, 890, 889, 1004, 1004, 1004, 890, 995,
+ -1, -1, -1, -1, -1, -1, 890, -1,
+ 921, 921, 921, 921, 921, -1, 921, 921,
+ 921, -1, -1, -1, 890, 890, 890, 890,
+ -1, -1, -1, -1, -1, -1, -1, 921,
+ 921, 995, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 921, -1, 921,
+ 921, 921, 921, 921, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 890, 890, 890, 890, 890, 921, 890, 890,
+ 1004, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 559,
+ 560, -1, -1, 558, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 890,
+ 890, 890, 890, 890, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 594, -1, 890, 890, 890, 890, 890,
+ -1, 890, 890, 1004, -1, -1, -1, -1,
+ -1, -1, -1, -1, 77, 78, 79, 80,
+ -1, 76, 559, 560, -1, -1, 558, -1,
+ -1, -1, 100, 96, 98, 94, 92, -1,
+ -1, -1, 890, 890, 890, 890, 890, -1,
+ 87, -1, -1, -1, 88, 85, 84, 86,
+ -1, -1, -1, 72, 73, 74, -1, -1,
+ -1, -1, 1006, 71, 604, 104, 106, 108,
+ 110, -1, -1, -1, -1, -1, -1, -1,
+ 75, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 66, 67,
+ 68, 69, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 903, 903, 903, 903, 903, 903, 903,
+ 903, 903, 903, 903, 903, 903, 903, 903,
+ 903, 903, 903, 903, 903, 903, 903, 903,
+ -1, 903, 903, 903, 903, 903, 903, -1,
+ 903, 903, 903, 903, -1, 903, -1, 903,
+ 903, 903, -1, 903, 903, 903, 903, 903,
+ 903, -1, 903, 903, 903, 903, 903, 903,
+ 903, 903, 903, 903, 903, 903, 903, 903,
+ 903, -1, 903, -1, -1, -1, -1, 903,
+ 903, 903, 903, 903, -1, -1, 903, 903,
+ -1, 903, 903, 903, 903, 903, 903, 903,
+ 903, 903, 903, 903, 903, -1, -1, -1,
+ -1, -1, 903, -1, -1, 603, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 132,
+ 58, 903, 903, 903, 903, -1, -1, 903,
+ 903, 903, 903, 903, 903, -1, -1, -1,
+ 903, 903, 903, 903, 903, -1, -1, -1,
+ -1, 903, -1, -1, -1, 903, 903, 903,
+ -1, 903, 903, -1, -1, 903, -1, -1,
+ -1, -1, -1, -1, -1, -1, 903, 903,
+ 903, 903, 903, -1, 903, 903, 903, -1,
+ -1, 903, 903, 903, 903, 903, 903, 903,
+ 903, -1, 903, 903, 903, -1, -1, -1,
+ 903, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 903, 903, -1, -1, 903,
+ -1, -1, -1, -1, 903, -1, -1, -1,
+ -1, 903, -1, 903, 903, 903, 903, 903,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 903, -1, 903, -1, -1,
+ 903, 903, -1, -1, -1, 903, -1, 903,
+ -1, 903, 48, 49, 50, 51, 77, 78,
+ 79, 80, -1, 76, -1, 34, 35, 38,
+ 36, -1, -1, -1, 100, 96, 98, 94,
+ 92, -1, -1, -1, 39, 40, 41, -1,
+ -1, -1, 87, -1, -1, -1, 88, 85,
+ 84, 86, -1, -1, -1, 72, 73, 74,
+ -1, -1, -1, -1, 56, 71, -1, 104,
+ 106, 108, 110, 77, 78, 79, 80, -1,
+ 76, -1, 75, -1, 259, -1, -1, -1,
+ -1, 100, 96, 98, 94, 92, -1, -1,
+ 66, 67, 68, 69, -1, -1, -1, 87,
+ -1, -1, -1, 88, 85, 84, 86, -1,
+ -1, -1, 72, 73, 74, -1, -1, -1,
+ -1, 1006, 71, -1, 104, 106, 108, 110,
+ -1, -1, -1, -1, -1, -1, -1, 75,
+ -1, 559, 560, -1, -1, 558, -1, -1,
+ -1, -1, -1, -1, -1, 66, 67, 68,
+ 69, -1, -1, -1, -1, -1, -1, 903,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 594, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 260, -1, -1, 559, 560, -1, 611,
+ 558, -1, -1, -1, 33, 31, 32, 52,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 604, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 37, 58, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 614, 62, 63, 64,
+ 65, -1, 70, 82, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 102, 89, 81, 132, 58,
+ -1, -1, -1, -1, 784, 784, 784, 784,
+ 784, 784, 784, 784, 784, 784, 784, 784,
+ 784, 784, 784, 784, 784, 784, 784, 784,
+ 784, 784, 784, -1, 784, 784, 784, 784,
+ 784, 784, -1, 784, 784, 784, 784, -1,
+ 784, -1, 784, 784, 784, -1, 784, 784,
+ 784, 784, 784, 784, -1, 784, 784, 784,
+ 784, 784, 784, 784, 784, 784, -1, 784,
+ 784, 784, 784, -1, -1, -1, -1, -1,
+ -1, -1, 784, -1, -1, 784, -1, 603,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ 784, 784, 784, 784, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 102, 89,
+ 81, 132, 58, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 784, 784, 784, 784,
+ -1, -1, 784, 784, -1, 784, 784, 784,
+ -1, -1, -1, 784, 784, -1, 784, 784,
+ -1, -1, -1, -1, 784, -1, -1, -1,
+ 784, 784, 784, -1, 784, 784, -1, -1,
+ 784, -1, -1, -1, -1, -1, -1, -1,
+ -1, 784, 784, 784, 784, -1, -1, -1,
+ 784, 784, -1, -1, 784, 784, 784, 784,
+ 784, 784, 784, 784, -1, 784, 784, 784,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 784, 784,
+ 784, 784, 784, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 784, -1,
+ -1, -1, -1, 784, -1, -1, -1, -1,
+ -1, -1, -1, 48, 49, 50, 51, 77,
+ 78, 79, 80, 985, 76, -1, 34, 35,
+ 38, 36, -1, -1, -1, 100, 96, 98,
+ 94, 92, -1, -1, -1, 39, 40, 41,
+ -1, -1, -1, 87, -1, -1, -1, 88,
+ 85, 84, 86, -1, -1, -1, 72, 73,
+ 74, -1, -1, -1, -1, 56, 71, -1,
+ 104, 106, 108, 110, -1, -1, -1, -1,
+ -1, -1, -1, 75, -1, -1, 985, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 66, 67, 68, 69, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 784, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 260, -1, -1, -1, -1,
+ -1, 611, -1, -1, -1, -1, 33, 31,
+ 32, 52, 62, 63, 64, 65, -1, 70,
+ 82, 90, 272, -1, -1, -1, -1, -1,
+ -1, 985, 985, 616, -1, 33, 31, 32,
+ 52, 62, 63, 64, 65, -1, 70, 82,
+ 90, -1, -1, -1, -1, -1, -1, -1,
+ 102, 89, 81, 37, 58, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 614, 62,
+ 63, 64, 65, -1, 70, 82, 90, 102,
+ 89, 81, 37, 58, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 271, -1, -1, -1,
+ -1, -1, -1, -1, -1, 102, 89, 81,
+ 132, 58, 850, 850, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 850,
+ -1, 850, 850, 850, 850, 850, 850, -1,
+ 850, 850, 850, -1, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 850,
+ 850, 850, 850, 850, -1, 850, 850, 850,
+ 850, -1, -1, -1, -1, -1, -1, -1,
+ 850, 850, -1, 850, -1, -1, 850, -1,
+ -1, -1, -1, 850, -1, -1, 850, 850,
+ 850, 850, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 850, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 850, 850, 850, 850, -1, -1,
+ 850, 850, 850, 850, 850, 850, -1, 850,
+ 850, 850, 850, 850, 850, 850, -1, -1,
+ 850, -1, 850, 850, -1, 850, 850, 850,
+ 850, -1, 850, 850, -1, -1, 850, -1,
+ -1, -1, -1, -1, 850, -1, 850, 850,
+ 850, 850, 850, -1, -1, -1, 850, 850,
+ -1, 850, 850, 850, 850, 850, 850, 850,
+ 850, 850, -1, 850, 850, 850, -1, -1,
+ 850, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 850, 850, 850, -1, -1, 850,
+ 850, 850, -1, -1, 850, 850, 850, 850,
+ 850, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 850, -1, 850, 850,
+ 850, 850, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 794, 794, 794, 794,
+ 794, 794, 794, 794, 794, 794, -1, 794,
+ 794, 794, 794, -1, -1, -1, 794, 794,
+ 794, 794, 794, -1, -1, -1, 794, 794,
+ 794, -1, -1, -1, 794, -1, -1, -1,
+ 794, 794, 794, 794, -1, -1, -1, 794,
+ 794, 794, -1, -1, -1, -1, 794, 794,
+ -1, 794, 794, 794, 794, -1, -1, -1,
+ -1, -1, -1, -1, 794, -1, -1, 794,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 794, 794, 794, 794, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 850, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 272, -1, -1, -1,
+ -1, -1, -1, -1, -1, 616, -1, 33,
+ 31, 32, 52, 62, 63, 64, 65, -1,
+ 70, 82, 90, 794, -1, -1, -1, -1,
+ -1, -1, 794, 794, 794, -1, 794, 794,
+ 794, 794, 794, 794, 794, 794, -1, 794,
+ 794, 794, -1, -1, -1, -1, -1, -1,
+ -1, 102, 89, 81, 37, 58, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 271, -1,
+ 794, 794, 794, 794, 794, -1, -1, 765,
+ 765, 765, 765, 765, 765, 765, 765, 765,
+ 765, 765, 765, 765, 765, 794, 765, 765,
+ 765, 765, 765, 765, -1, -1, -1, 765,
+ 765, 765, 765, 765, 765, -1, 765, 765,
+ 765, 765, -1, 765, 765, 765, 765, 765,
+ -1, 765, 765, 765, 765, 765, 765, -1,
+ 765, 765, 765, 765, 765, 765, 765, 765,
+ 765, -1, 765, 765, 765, 765, -1, 765,
+ -1, 620, -1, -1, -1, 765, -1, 765,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 765, 765, 765, 765, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 765,
+ 765, 765, 765, -1, -1, 765, 765, 765,
+ 765, 765, 765, -1, -1, -1, 765, 765,
+ 765, 765, 765, -1, -1, -1, -1, 765,
+ 765, -1, -1, 765, 765, 765, -1, 765,
+ 765, -1, -1, 765, -1, -1, -1, 765,
+ 619, -1, 765, -1, 765, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 765,
+ 765, 765, 765, 765, 765, 765, 765, -1,
+ 765, 765, 765, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 765, 765, 765, 765, 765, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 765, -1, 765, 765, -1, -1, -1,
+ 769, 769, 769, 769, 769, 769, 769, 769,
+ 769, 769, 769, 769, 769, 769, -1, 769,
+ 769, 769, 769, 769, 769, -1, -1, -1,
+ 769, 769, 769, 769, 769, 769, -1, 769,
+ 769, 769, 769, -1, 769, -1, 769, 769,
+ 769, -1, 769, 769, 769, 769, 769, 769,
+ -1, 769, 769, 769, 769, 769, 769, 769,
+ 769, 769, -1, 769, 769, 769, 769, -1,
+ 769, -1, -1, -1, -1, -1, 769, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 769, 769, 769, 769,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 769, 769, 769, 769, -1, 765, 769, 769,
+ 769, 769, 769, 769, -1, -1, -1, 769,
+ 769, 769, 769, 769, -1, -1, -1, -1,
+ 769, 769, -1, -1, 769, 769, 769, -1,
+ 769, 769, -1, -1, 769, -1, -1, -1,
+ -1, -1, -1, -1, -1, 769, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 769, 769, 769, 769, 769, 769, 769, 769,
+ -1, 769, 769, 769, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 769, 769, 769, 769, 769, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 769, -1, 769, 769, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 740,
+ 740, 740, 740, 740, 740, 740, 740, 740,
+ 740, 740, 740, 740, 740, -1, 740, 740,
+ 740, 740, 740, 740, -1, -1, -1, 740,
+ 740, 740, 740, 740, 740, -1, 740, 740,
+ 740, 740, -1, 740, -1, 740, 740, 740,
+ -1, 740, 740, 740, 740, 740, 740, -1,
+ 740, 740, 740, 740, 740, 740, 740, 740,
+ 740, -1, 740, 740, 740, 740, -1, -1,
+ -1, -1, -1, -1, -1, 740, -1, 740,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 740, 740, 740, 740, -1,
+ 432, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 769, 740,
+ 740, 740, 740, -1, -1, 740, 740, 740,
+ 740, 740, 740, -1, -1, -1, 740, 740,
+ 740, 740, 740, -1, -1, -1, 622, 740,
+ 740, -1, -1, 740, 740, 740, -1, 740,
+ 740, 740, -1, 740, -1, -1, -1, -1,
+ -1, -1, -1, -1, 740, -1, -1, -1,
+ -1, -1, 619, -1, -1, -1, -1, 740,
+ 740, 740, 740, 740, 740, 740, 740, -1,
+ 740, 740, 740, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 740, 740, 740, 740, 740, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 740, -1, 740, 740, -1, -1, -1,
+ 899, 899, 899, 899, 899, 899, 899, 899,
+ 899, 899, 899, 899, 899, 899, 899, 899,
+ 899, 899, 899, 899, 899, 899, 899, -1,
+ 899, 899, 899, 899, 899, 899, -1, 899,
+ 899, 899, 899, -1, 899, -1, 899, 899,
+ 899, -1, 899, 899, 899, 899, 899, 899,
+ -1, 899, 899, 899, 899, 899, 899, 899,
+ 899, 899, 899, 899, 899, 899, 899, 899,
+ -1, 899, -1, -1, -1, -1, 899, 899,
+ 899, 899, 899, -1, -1, 899, 899, -1,
+ 899, 899, 899, 899, 899, 899, 899, 899,
+ 899, 899, 899, 899, -1, -1, -1, -1,
+ -1, 899, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 899, 899, 899, 899, -1, 740, 899, 899,
+ 899, 899, 899, 899, -1, -1, -1, 899,
+ 899, 899, 899, 899, -1, -1, -1, -1,
+ 899, -1, -1, -1, 899, 899, 899, -1,
+ 899, 899, -1, -1, 899, -1, -1, -1,
+ -1, -1, -1, -1, -1, 899, 899, 899,
+ 899, 899, -1, 899, 899, 899, -1, -1,
+ 899, 899, 899, 899, 899, 899, 899, 899,
+ -1, 899, 899, 899, -1, -1, -1, 899,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 899, 899, -1, -1, 899, -1,
+ 899, 899, -1, 899, -1, -1, -1, -1,
+ 899, -1, 899, 899, 899, 899, 899, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 899, -1, 899, -1, -1, 899,
+ 899, -1, -1, -1, 899, -1, 899, -1,
+ 899, 900, 900, 900, 900, 900, 900, 900,
+ 900, 900, 900, 900, 900, 900, 900, 900,
+ 900, 900, 900, 900, 900, 900, 900, 900,
+ -1, 900, 900, 900, 900, 900, 900, -1,
+ 900, 900, 900, 900, -1, 900, -1, 900,
+ 900, 900, -1, 900, 900, 900, 900, 900,
+ 900, -1, 900, 900, 900, 900, 900, 900,
+ 900, 900, 900, 900, 900, 900, 900, 900,
+ 900, -1, 900, -1, -1, -1, -1, 900,
+ 900, 900, 900, 900, -1, -1, 900, 900,
+ -1, 900, 900, 900, 900, 900, 900, 900,
+ 900, 900, 900, 900, 900, -1, -1, -1,
+ -1, -1, 900, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 899, -1,
+ -1, 900, 900, 900, 900, -1, -1, 900,
+ 900, 900, 900, 900, 900, -1, -1, -1,
+ 900, 900, 900, 900, 900, -1, -1, -1,
+ -1, 900, -1, -1, -1, 900, 900, 900,
+ 622, 900, 900, -1, -1, 900, -1, -1,
+ -1, -1, -1, -1, -1, -1, 900, 900,
+ 900, 900, 900, -1, 900, 900, 900, -1,
+ -1, 900, 900, 900, 900, 900, 900, 900,
+ 900, -1, 900, 900, 900, -1, -1, -1,
+ 900, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 900, 900, -1, -1, 900,
+ -1, 900, 900, -1, 900, -1, -1, -1,
+ -1, 900, -1, 900, 900, 900, 900, 900,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 900, -1, 900, -1, -1,
+ 900, 900, -1, -1, -1, 900, -1, 900,
+ -1, 900, 901, 901, 901, 901, 901, 901,
+ 901, 901, 901, 901, 901, 901, 901, 901,
+ 901, 901, 901, 901, 901, 901, 901, 901,
+ 901, -1, 901, 901, 901, 901, 901, 901,
+ -1, 901, 901, 901, 901, -1, 901, -1,
+ 901, 901, 901, -1, 901, 901, 901, 901,
+ 901, 901, -1, 901, 901, 901, 901, 901,
+ 901, 901, 901, 901, 901, 901, 901, 901,
+ 901, 901, -1, 901, -1, -1, -1, -1,
+ 901, 901, 901, 901, 901, -1, -1, 901,
+ 901, -1, 901, 901, 901, 901, 901, 901,
+ 901, 901, 901, 901, 901, 901, -1, -1,
+ -1, -1, -1, 901, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 900,
+ -1, -1, 901, 901, 901, 901, -1, -1,
+ 901, 901, 901, 901, 901, 901, -1, -1,
+ -1, 901, 901, 901, 901, 901, -1, -1,
+ -1, -1, 901, -1, -1, -1, 901, 901,
+ 901, -1, 901, 901, -1, -1, 901, -1,
+ -1, -1, -1, -1, -1, -1, -1, 901,
+ 901, 901, 901, 901, -1, 901, 901, 901,
+ -1, -1, 901, 901, 901, 901, 901, 901,
+ 901, 901, -1, 901, 901, 901, -1, -1,
+ -1, 901, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 901, 901, -1, -1,
+ 901, -1, 901, 901, -1, 901, -1, -1,
+ -1, -1, 901, -1, 901, 901, 901, 901,
+ 901, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 901, -1, 901, -1,
+ -1, 901, 901, -1, -1, -1, 901, -1,
+ 901, -1, 901, 896, 896, 896, 896, -1,
+ 896, -1, -1, -1, -1, -1, -1, -1,
+ -1, 896, 896, 896, 896, 896, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 896,
+ -1, -1, -1, 896, 896, 896, 896, -1,
+ -1, -1, 896, 896, 896, -1, -1, -1,
+ -1, 896, 896, 896, 896, 896, 896, 896,
+ 896, -1, -1, -1, -1, -1, -1, 896,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 896, 896, 896,
+ 896, -1, -1, 182, 183, -1, -1, -1,
+ -1, -1, 896, -1, -1, -1, -1, -1,
+ 902, 902, 902, 902, 902, 902, 902, 902,
+ 902, 902, 902, 902, 902, 902, 902, 902,
+ 902, 902, 902, 902, 902, 902, 902, -1,
+ 902, 902, 902, 902, 902, 902, -1, 902,
+ 902, 902, 902, -1, 902, -1, 902, 902,
+ 902, -1, 902, 902, 902, 902, 902, 902,
+ 901, 902, 902, 902, 902, 902, 902, 902,
+ 902, 902, 902, 902, 902, 902, 902, 902,
+ -1, 902, -1, -1, -1, -1, 902, 902,
+ 902, 902, 902, -1, -1, 902, 902, -1,
+ 902, 902, 902, 902, 902, 902, 902, 902,
+ 902, 902, 902, 902, -1, -1, -1, -1,
+ -1, 902, -1, -1, 896, 896, 896, 896,
+ 896, -1, 896, 896, 896, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 896, 896, -1, -1, 896,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 896, 896, 896, 896, 896,
+ 902, 902, 902, 902, -1, -1, 902, 902,
+ 902, 902, 902, 902, -1, -1, -1, 902,
+ 902, 902, 902, 902, -1, 896, -1, -1,
+ 902, -1, -1, -1, 902, 902, 902, -1,
+ 902, 902, -1, -1, 902, -1, -1, -1,
+ -1, -1, -1, -1, -1, 902, 902, 902,
+ 902, 902, -1, 902, 902, 902, -1, -1,
+ 902, 902, 902, 902, 902, 902, 902, 902,
+ -1, 902, 902, 902, -1, -1, -1, 902,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 902, 902, -1, -1, 902, -1,
+ 902, 902, -1, 902, -1, -1, -1, -1,
+ 902, -1, 902, 902, 902, 902, 902, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 902, -1, 902, -1, -1, 902,
+ 902, -1, -1, -1, 902, -1, 902, -1,
+ 902, 906, 906, 906, 906, -1, 906, -1,
+ -1, -1, -1, -1, -1, -1, -1, 906,
+ 906, 906, 906, 906, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 906, -1, -1,
+ -1, 906, 906, 906, 906, -1, -1, -1,
+ 906, 906, 906, -1, -1, -1, -1, 906,
+ 906, -1, 906, 906, 906, 906, 906, -1,
+ -1, -1, -1, -1, -1, 906, -1, -1,
+ -1, -1, -1, -1, -1, 907, 907, 907,
+ 907, -1, 907, 906, 906, 906, 906, -1,
+ -1, -1, -1, 907, 907, 907, 907, 907,
+ 906, -1, -1, -1, -1, -1, -1, -1,
+ -1, 907, -1, -1, -1, 907, 907, 907,
+ 907, -1, -1, -1, 907, 907, 907, -1,
+ -1, -1, -1, 907, 907, -1, 907, 907,
+ 907, 907, 907, -1, -1, -1, -1, -1,
+ -1, 907, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 902, 907,
+ 907, 907, 907, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 907, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 906, 906, 906, 906, 906, -1,
+ 906, 906, 906, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 906, 906, -1, -1, -1, -1, -1,
+ -1, -1, 906, -1, -1, -1, -1, -1,
+ -1, 906, 906, 906, 906, 906, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 906, 907, 907,
+ 907, 907, 907, -1, 907, 907, 907, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 907, 907, -1,
+ -1, -1, -1, -1, -1, -1, 907, -1,
+ -1, -1, -1, -1, -1, 907, 907, 907,
+ 907, 907, 908, 908, 908, 908, -1, 908,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 908, 908, 908, 908, 908, -1, -1, -1,
+ -1, 907, -1, -1, -1, -1, 908, -1,
+ -1, -1, 908, 908, 908, 908, -1, -1,
+ -1, 908, 908, 908, -1, -1, -1, -1,
+ 908, 908, -1, 908, 908, 908, 908, 908,
+ -1, -1, -1, -1, -1, -1, 908, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 908, 908, 908, 908,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 908, -1, -1, -1, -1, -1, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, 774, 774, 774, 774, 774, -1, 774,
+ 774, 774, 774, 774, 774, -1, 774, 774,
+ 774, 774, -1, 774, -1, 774, 774, 774,
+ -1, 774, 774, 774, 774, 774, 774, -1,
+ 774, 774, 774, 774, 774, 774, 774, 774,
+ 774, -1, 774, 774, 774, 774, -1, -1,
+ -1, -1, -1, -1, -1, 774, -1, -1,
+ 774, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 774, 774, 774, 774, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 908, 908, 908, 908, 908,
+ -1, 908, 908, 908, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 908, 908, -1, -1, -1, -1,
+ -1, -1, -1, 908, -1, -1, -1, -1,
+ -1, -1, 908, 908, 908, 908, 908, 774,
+ 774, 774, 774, -1, -1, 774, 774, -1,
+ 774, 774, 774, -1, -1, -1, 774, 774,
+ -1, 774, 774, -1, -1, -1, 908, 774,
+ -1, -1, -1, 774, 774, 774, -1, 774,
+ 774, -1, -1, 774, -1, -1, -1, -1,
+ -1, -1, -1, -1, 774, 774, 774, 774,
+ -1, -1, -1, 774, 774, -1, -1, 774,
+ 774, 774, 774, 774, 774, 774, 774, -1,
+ 774, 774, 774, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 774, 774, 774, 774, 774, -1, 790,
+ 790, 790, 790, 790, 790, 790, 790, -1,
+ 790, 774, 790, 790, 790, 790, 774, -1,
+ -1, 790, 790, 790, 790, 790, -1, -1,
+ -1, 790, 790, 790, -1, -1, -1, 790,
+ -1, -1, -1, 790, 790, 790, 790, -1,
+ -1, -1, 790, 790, 790, -1, -1, -1,
+ -1, 790, 790, -1, 790, 790, 790, 790,
+ -1, -1, -1, -1, -1, -1, -1, 790,
+ -1, 790, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 790, 790, 790,
+ 790, -1, 791, 791, 791, 791, 791, 791,
+ 791, 791, -1, 791, -1, 791, 791, 791,
+ 791, -1, -1, -1, 791, 791, 791, 791,
+ 791, -1, -1, -1, 791, 791, 791, -1,
+ -1, -1, 791, -1, -1, -1, 791, 791,
+ 791, 791, -1, -1, -1, 791, 791, 791,
+ -1, -1, -1, -1, 791, 791, -1, 791,
+ 791, 791, 791, -1, -1, -1, -1, -1,
+ -1, -1, 791, -1, 791, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 791, 791, 791, 791, -1, 774, 182, 183,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 790, -1,
+ -1, -1, -1, -1, 790, -1, -1, -1,
+ -1, 790, 790, 790, 790, 790, 790, 790,
+ 790, -1, 790, 790, 790, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 790, 790, 790, 790, 790,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 791, -1, -1, -1, -1, -1, 791,
+ -1, -1, -1, -1, 791, 791, 791, 791,
+ 791, 791, 791, 791, -1, 791, 791, 791,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 791, 791,
+ 791, 791, 791, 48, 49, 50, 51, 77,
+ 78, 79, 80, 985, 76, -1, 34, 35,
+ 38, 36, -1, -1, -1, 100, 96, 98,
+ 94, 92, -1, -1, -1, 39, 40, 41,
+ -1, -1, -1, 87, -1, -1, -1, 88,
+ 85, 84, 86, -1, -1, -1, 72, 73,
+ 74, -1, -1, -1, -1, 56, 71, -1,
+ 104, 106, 108, 110, -1, -1, -1, -1,
+ -1, -1, -1, 75, -1, -1, 985, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 66, 67, 68, 69, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, -1, 763, 763,
+ 763, 763, 763, 763, -1, -1, -1, 763,
+ 763, 763, 763, 763, 763, -1, 763, 763,
+ 763, 763, -1, 763, 639, 763, 763, 763,
+ -1, 763, 763, 763, 763, 763, 763, -1,
+ 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, -1, 763, 763, 763, 763, -1, 763,
+ -1, -1, -1, -1, -1, 763, -1, 763,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 272, 763, 763, 763, 763, -1,
+ -1, 985, 985, 636, -1, 33, 31, 32,
+ 52, 62, 63, 64, 65, -1, 70, 82,
+ 90, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 102,
+ 89, 81, 37, 58, -1, -1, -1, 763,
+ 763, 763, 763, -1, -1, 763, 763, 763,
+ 763, 763, 763, -1, 271, -1, 763, 763,
+ 763, 763, 763, -1, -1, -1, -1, 763,
+ 763, -1, -1, 763, 763, 763, -1, 763,
+ 763, -1, -1, 763, -1, -1, -1, 638,
+ -1, -1, 763, -1, 763, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 763,
+ 763, 763, 763, 763, 763, 763, 763, -1,
+ 763, 763, 763, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 763, 763, 763, 763, 763, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 763, -1, 763, 763, -1, -1, -1,
+ 752, 752, 752, 752, 752, 752, 752, 752,
+ 752, 752, 752, 752, 752, 752, -1, 752,
+ 752, 752, 752, 752, 752, -1, -1, -1,
+ 752, 752, 752, 752, 752, 752, -1, 752,
+ 752, 752, 752, -1, 752, -1, 752, 752,
+ 752, -1, 752, 752, 752, 752, 752, 752,
+ -1, 752, 752, 752, 752, 752, 752, 752,
+ 752, 752, -1, 752, 752, 752, 752, -1,
+ -1, -1, -1, -1, -1, -1, 752, -1,
+ 643, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 752, 752, 752, 752,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 752, 752, 752, 752, -1, 763, 752, 752,
+ 752, 752, 752, 752, -1, -1, -1, 752,
+ 752, 752, 752, 752, -1, -1, -1, -1,
+ 752, 752, -1, -1, 752, 752, 752, -1,
+ 752, 752, 642, -1, 752, -1, -1, -1,
+ -1, -1, -1, -1, -1, 752, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 752, 752, 752, 752, 752, 752, 752, 752,
+ -1, 752, 752, 752, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 892, 892, 892, 892, -1, 892,
+ -1, -1, 752, 752, 752, 752, 752, -1,
+ 892, 892, 892, 892, 892, -1, -1, -1,
+ -1, -1, 752, -1, 752, 752, 892, -1,
+ -1, -1, 892, 892, 892, 892, -1, -1,
+ -1, 892, 892, 892, -1, -1, -1, -1,
+ 892, 892, 892, 892, 892, 892, 892, 892,
+ -1, -1, -1, -1, -1, -1, 892, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 892, 892, 892, 892,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 892, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 272, -1, -1, -1,
+ -1, -1, -1, -1, -1, 636, -1, 33,
+ 31, 32, 52, 62, 63, 64, 65, -1,
+ 70, 82, 90, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 752, -1,
+ -1, 102, 89, 81, 37, 58, -1, -1,
+ -1, -1, -1, 892, 892, 892, 892, 892,
+ -1, 892, 892, 892, -1, -1, 271, -1,
+ -1, -1, -1, -1, 77, 78, 79, 80,
+ -1, 76, 892, 892, -1, -1, 892, -1,
+ -1, -1, 100, 96, 98, 94, 92, -1,
+ -1, 638, 892, 892, 892, 892, 892, -1,
+ 87, -1, -1, -1, 88, 85, 84, 86,
+ -1, -1, -1, 72, 73, 74, -1, -1,
+ -1, -1, 1006, 71, 892, 104, 106, 108,
+ 110, -1, -1, -1, -1, -1, -1, -1,
+ 75, 788, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 66, 67,
+ 68, 69, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 722, 722, 722, 722, 722, 722, 722,
+ 722, 722, 722, 722, 722, 722, 722, -1,
+ 722, 722, 722, 722, 722, 722, -1, -1,
+ -1, 722, 722, 722, 722, 722, 722, -1,
+ 722, 722, 722, 722, -1, 722, -1, 722,
+ 722, 722, -1, 722, 722, 722, 722, 722,
+ 722, -1, 722, 722, 722, 722, 722, 722,
+ 722, 722, 722, -1, 722, 722, 722, 722,
+ -1, -1, -1, -1, -1, -1, -1, 722,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 722, 722, 722,
+ 722, -1, -1, 648, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 209, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 132,
+ 58, 722, 722, 722, 722, -1, -1, 722,
+ 722, 722, 722, 722, 722, -1, -1, -1,
+ 722, 722, 722, 722, 722, -1, -1, -1,
+ -1, 722, 722, -1, -1, 722, 722, 722,
+ -1, 722, 722, -1, -1, 722, -1, -1,
+ -1, -1, -1, -1, 642, -1, 722, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 722, 722, 722, 722, 722, 722, 722,
+ 722, -1, 722, 722, 722, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 722, 722, 722, 722, 722,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 722, -1, 722, 722, -1,
+ -1, -1, 764, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, 764, 764, 764, 764,
+ -1, 764, 764, 764, 764, 764, 764, -1,
+ -1, -1, 764, 764, 764, 764, 764, 764,
+ -1, 764, 764, 764, 764, -1, 764, 764,
+ 764, 764, 764, -1, 764, 764, 764, 764,
+ 764, 764, -1, 764, 764, 764, 764, 764,
+ 764, 764, 764, 764, -1, 764, 764, 764,
+ 764, -1, 764, -1, -1, -1, -1, -1,
+ 764, -1, 764, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 764, 764,
+ 764, 764, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 764, 764, 764, 764, -1, 722,
+ 764, 764, 764, 764, 764, 764, -1, -1,
+ -1, 764, 764, 764, 764, 764, -1, -1,
+ -1, -1, 764, 764, -1, -1, 764, 764,
+ 764, -1, 764, 764, -1, -1, 764, -1,
+ -1, -1, 764, -1, -1, 764, -1, 764,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 764, 764, 764, 764, 764, 764,
+ 764, 764, -1, 764, 764, 764, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 764, 764, 764, 764,
+ 764, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 764, -1, 764, 764,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 768, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, 768, 768, 768,
+ 768, -1, 768, 768, 768, 768, 768, 768,
+ -1, -1, -1, 768, 768, 768, 768, 768,
+ 768, -1, 768, 768, 768, 768, -1, 768,
+ -1, 768, 768, 768, -1, 768, 768, 768,
+ 768, 768, 768, -1, 768, 768, 768, 768,
+ 768, 768, 768, 768, 768, -1, 768, 768,
+ 768, 768, -1, 768, -1, -1, -1, -1,
+ -1, 768, -1, 652, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 768,
+ 768, 768, 768, -1, -1, 648, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 209,
+ 62, 63, 64, 65, -1, 70, 82, 90,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 764, -1, -1, -1, -1, -1, 102, 89,
+ 81, 132, 58, 768, 768, 768, 768, -1,
+ -1, 768, 768, 768, 768, 768, 768, -1,
+ -1, -1, 768, 768, 768, 768, 768, -1,
+ -1, -1, -1, 768, 768, -1, -1, 768,
+ 768, 768, -1, 768, 768, -1, -1, 768,
+ -1, -1, -1, -1, -1, -1, 651, -1,
+ 768, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 768, 768, 768, 768, 768,
+ 768, 768, 768, -1, 768, 768, 768, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 768, 768, 768,
+ 768, 768, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 768, -1, 768,
+ 768, -1, -1, -1, 762, 762, 762, 762,
+ 762, 762, 762, 762, 762, 762, 762, 762,
+ 762, 762, -1, 762, 762, 762, 762, 762,
+ 762, -1, -1, -1, 762, 762, 762, 762,
+ 762, 762, -1, 762, 762, 762, 762, -1,
+ 762, -1, 762, 762, 762, -1, 762, 762,
+ 762, 762, 762, 762, -1, 762, 762, 762,
+ 762, 762, 762, 762, 762, 762, -1, 762,
+ 762, 762, 762, -1, 762, -1, -1, -1,
+ -1, -1, 762, -1, 762, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 762, 762, 762, 762, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 762, 762, 762, 762,
+ -1, 768, 762, 762, 762, 762, 762, 762,
+ -1, -1, -1, 762, 762, 762, 762, 762,
+ -1, -1, -1, -1, 762, 762, -1, -1,
+ 762, 762, 762, -1, 762, 762, -1, -1,
+ 762, -1, -1, -1, -1, -1, -1, 762,
+ -1, 762, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 762, 762, 762, 762,
+ 762, 762, 762, 762, -1, 762, 762, 762,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 762, 762,
+ 762, 762, 762, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 762, -1,
+ 762, 762, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 749, 749, 749, 749, 749,
+ 749, 749, 749, 749, 749, 749, 749, 749,
+ 749, -1, 749, 749, 749, 749, 749, 749,
+ -1, -1, -1, 749, 749, 749, 749, 749,
+ 749, -1, 749, 749, 749, 749, -1, 749,
+ -1, 749, 749, 749, -1, 749, 749, 749,
+ 749, 749, 749, -1, 749, 749, 749, 749,
+ 749, 749, 749, 749, 749, -1, 749, 749,
+ 749, 749, -1, -1, -1, -1, -1, -1,
+ -1, 749, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 749,
+ 749, 749, 749, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 762, 749, 749, 749, 749, -1,
+ -1, 749, 749, 749, 749, 749, 749, -1,
+ -1, -1, 749, 749, 749, 749, 749, -1,
+ -1, -1, -1, 749, 749, -1, -1, 749,
+ 749, 749, -1, 749, 749, -1, -1, 749,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 749, -1, -1, -1, -1, -1, -1, -1,
+ 651, -1, -1, 749, 749, 749, 749, 749,
+ 749, 749, 749, -1, 749, 749, 749, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 749, 749, 749,
+ 749, 749, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 749, -1, 749,
+ 749, 48, 49, 50, 51, 77, 78, 79,
+ 80, 985, 76, -1, 34, 35, 38, 36,
+ -1, -1, -1, 100, 96, 98, 94, 92,
+ -1, -1, -1, 39, 40, 41, -1, -1,
+ -1, 87, -1, -1, -1, 88, 85, 84,
+ 86, -1, -1, -1, 72, 73, 74, -1,
+ -1, -1, -1, 56, 71, -1, 104, 106,
+ 108, 110, -1, -1, -1, -1, -1, -1,
+ -1, 75, -1, -1, 985, 893, 893, 893,
+ 893, -1, 893, -1, -1, -1, -1, 66,
+ 67, 68, 69, 893, 893, 893, 893, 893,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 893, -1, -1, -1, 893, 893, 893,
+ 893, -1, -1, -1, 893, 893, 893, -1,
+ -1, -1, -1, 893, 893, 893, 893, 893,
+ 893, 893, 893, -1, -1, -1, -1, -1,
+ -1, 893, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 893,
+ 893, 893, 893, -1, -1, -1, -1, -1,
+ -1, 749, -1, -1, 893, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 272, -1, -1, -1, -1, -1, -1, 985,
+ 985, 655, -1, 33, 31, 32, 52, 62,
+ 63, 64, 65, -1, 70, 82, 90, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 102, 89, 81,
+ 37, 58, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 271, -1, -1, -1, 893, 893,
+ 893, 893, 893, -1, 893, 893, 893, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 893, 893, -1,
+ -1, 893, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 893, 893, 893,
+ 893, 893, 894, 894, 894, 894, -1, 894,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 894, 894, 894, 894, 894, -1, -1, 893,
+ -1, -1, -1, -1, -1, -1, 894, -1,
+ -1, -1, 894, 894, 894, 894, -1, -1,
+ -1, 894, 894, 894, -1, -1, -1, -1,
+ 894, 894, 894, 894, 894, 894, 894, 894,
+ -1, -1, -1, -1, -1, -1, 894, -1,
+ -1, -1, -1, -1, 895, 895, 895, 895,
+ -1, 895, -1, -1, 894, 894, 894, 894,
+ -1, -1, 895, 895, 895, 895, 895, -1,
+ -1, 894, -1, -1, -1, -1, -1, -1,
+ 895, -1, -1, -1, 895, 895, 895, 895,
+ -1, -1, -1, 895, 895, 895, -1, -1,
+ -1, -1, 895, 895, 895, 895, 895, 895,
+ 895, 895, -1, -1, -1, -1, -1, -1,
+ 895, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 895, 895,
+ 895, 895, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 895, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 894, 894, 894, 894, 894,
+ -1, 894, 894, 894, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 894, 894, -1, -1, 894, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 894, 894, 894, 894, 894, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 894, 895, 895, 895,
+ 895, 895, -1, 895, 895, 895, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 895, 895, -1, -1,
+ 895, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 895, 895, 895, 895,
+ 895, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 895, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 730,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, 730, 730, 730, 730, -1, 730, 730,
+ 730, 730, 730, 730, -1, -1, -1, 730,
+ 730, 730, 730, 730, 730, -1, 730, 730,
+ 730, 730, -1, 730, -1, 730, 730, 730,
+ -1, 730, 730, 730, 730, 730, 730, -1,
+ 730, 730, 730, 730, 730, 730, 730, 730,
+ 730, -1, 730, 730, 730, 730, -1, -1,
+ -1, -1, -1, -1, -1, 730, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 272, 730, 730, 730, 730, -1,
+ -1, -1, -1, 655, -1, 33, 31, 32,
+ 52, 62, 63, 64, 65, -1, 70, 82,
+ 90, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 102,
+ 89, 81, 37, 58, -1, -1, -1, 730,
+ 730, 730, 730, -1, -1, 730, 730, 730,
+ 730, 730, 730, -1, 271, -1, 730, 730,
+ 730, 730, 730, -1, -1, -1, -1, 730,
+ 730, -1, -1, 730, 730, 730, -1, 730,
+ 730, -1, -1, 730, -1, -1, -1, -1,
+ -1, -1, -1, -1, 730, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 730,
+ 730, 730, 730, 730, 730, 730, 730, -1,
+ 730, 730, 730, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 730, 730, 730, 730, 730, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 730, -1, 730, 730, -1, -1, -1,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, 766, 766, 766, 766, -1, 766,
+ 766, 766, 766, 766, 766, -1, -1, -1,
+ 766, 766, 766, 766, 766, 766, -1, 766,
+ 766, 766, 766, -1, 766, -1, 766, 766,
+ 766, -1, 766, 766, 766, 766, 766, 766,
+ -1, 766, 766, 766, 766, 766, 766, 766,
+ 766, 766, -1, 766, 766, 766, 766, -1,
+ 766, -1, -1, -1, -1, -1, 766, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 766, 766, 766, 766,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 766, 766, 766, 766, -1, 730, 766, 766,
+ 766, 766, 766, 766, -1, -1, -1, 766,
+ 766, 766, 766, 766, -1, -1, -1, -1,
+ 766, 766, -1, -1, 766, 766, 766, -1,
+ 766, 766, -1, -1, 766, -1, -1, -1,
+ -1, -1, -1, -1, -1, 766, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 766, 766, 766, 766, 766, 766, 766, 766,
+ -1, 766, 766, 766, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 766, 766, 766, 766, 766, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 766, -1, 766, 766, 48, 49,
+ 50, 51, 77, 78, 79, 80, 985, 76,
+ -1, 34, 35, 38, 36, -1, -1, -1,
+ 100, 96, 98, 94, 92, -1, -1, -1,
+ 39, 40, 41, -1, -1, -1, 87, -1,
+ -1, -1, 88, 85, 84, 86, -1, -1,
+ -1, 72, 73, 74, -1, -1, -1, -1,
+ 56, 71, -1, 104, 106, 108, 110, -1,
+ -1, -1, -1, -1, -1, -1, 75, -1,
+ -1, 985, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 66, 67, 68, 69,
+ 789, 789, 789, 789, 789, 789, 789, 789,
+ -1, 789, -1, 789, 789, 789, 789, -1,
+ -1, -1, 789, 789, 789, 789, 789, -1,
+ -1, -1, 789, 789, 789, -1, -1, -1,
+ 789, -1, -1, -1, 789, 789, 789, 789,
+ -1, -1, -1, 789, 789, 789, -1, -1,
+ -1, -1, 789, 789, -1, 789, 789, 789,
+ 789, -1, -1, -1, -1, -1, -1, -1,
+ 789, -1, 789, -1, -1, -1, 766, -1,
+ -1, -1, -1, -1, -1, -1, 789, 789,
+ 789, 789, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 272, -1, -1,
+ -1, -1, -1, -1, 985, 985, 657, -1,
+ 33, 31, 32, 52, 62, 63, 64, 65,
+ -1, 70, 82, 90, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 102, 89, 81, 37, 58, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 271,
+ -1, -1, -1, -1, -1, -1, -1, 789,
+ -1, -1, -1, -1, -1, 789, -1, -1,
+ -1, -1, 789, 789, 789, 789, 789, 789,
+ 789, 789, -1, 789, 789, 789, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 789, 789, 789, 789,
+ 789, 751, 751, 751, 751, 751, 751, 751,
+ 751, 751, 751, 751, 751, 751, 751, -1,
+ 751, 751, 751, 751, 751, 751, -1, -1,
+ -1, 751, 751, 751, 751, 751, 751, -1,
+ 751, 751, 751, 751, -1, 751, -1, 751,
+ 751, 751, -1, 751, 751, 751, 751, 751,
+ 751, -1, 751, 751, 751, 751, 751, 751,
+ 751, 751, 751, -1, 751, 751, 751, 751,
+ -1, -1, -1, -1, -1, -1, -1, 751,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 751, 751, 751,
+ 751, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 751, 751, 751, 751, -1, -1, 751,
+ 751, 751, 751, 751, 751, -1, -1, -1,
+ 751, 751, 751, 751, 751, -1, -1, -1,
+ -1, 751, 751, -1, -1, 751, 751, 751,
+ -1, 751, 751, -1, -1, 751, -1, -1,
+ -1, -1, -1, -1, -1, -1, 751, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 751, 751, 751, 751, 751, 751, 751,
+ 751, -1, 751, 751, 751, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 751, 751, 751, 751, 751,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 751, -1, 751, 751, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 767, 767, 767, 767,
+ 767, 767, 767, 767, 767, 767, 767, 767,
+ 767, 767, -1, 767, 767, 767, 767, 767,
+ 767, -1, -1, -1, 767, 767, 767, 767,
+ 767, 767, -1, 767, 767, 767, 767, -1,
+ 767, -1, 767, 767, 767, -1, 767, 767,
+ 767, 767, 767, 767, -1, 767, 767, 767,
+ 767, 767, 767, 767, 767, 767, -1, 767,
+ 767, 767, 767, -1, 767, -1, -1, -1,
+ -1, -1, 767, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 272,
+ 767, 767, 767, 767, -1, -1, -1, 751,
+ 657, -1, 33, 31, 32, 52, 62, 63,
+ 64, 65, -1, 70, 82, 90, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 102, 89, 81, 37,
+ 58, -1, -1, -1, 767, 767, 767, 767,
+ -1, -1, 767, 767, 767, 767, 767, 767,
+ -1, 271, -1, 767, 767, 767, 767, 767,
+ -1, -1, -1, -1, 767, 767, -1, -1,
+ 767, 767, 767, -1, 767, 767, -1, -1,
+ 767, -1, -1, -1, -1, -1, -1, -1,
+ -1, 767, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 767, 767, 767, 767,
+ 767, 767, 767, 767, -1, 767, 767, 767,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 767, 767,
+ 767, 767, 767, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 767, -1,
+ 767, 767, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 767
+};
+
+static int pid_0_parser_owners[] = {
+ 0, 0, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2, 0,
+ 0, 0, 0, 0, 0, 3, 23, 25,
+ 0, 0, 0, 0, 0, 0, 27, 0,
+ 0, 0, 0, 26, 0, 29, 0, 0,
+ 0, 30, 0, 0, 0, 0, 0, 0,
+ 24, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 24, 0, 0, 0, 0, 31,
+ 31, 31, 31, 31, 32, 36, 0, 40,
+ 44, 46, 48, 49, 50, 47, 51, 47,
+ 52, 53, 55, 56, 0, 0, 0, 0,
+ 80, 81, 82, 83, 85, 87, 88, 31,
+ 89, 90, 57, 91, 57, 26, 58, 92,
+ 58, 98, 100, 102, 103, 104, 110, 96,
+ 96, 116, 126, 139, 140, 150, 151, 152,
+ 161, 125, 156, 165, 144, 144, 154, 154,
+ 154, 59, 193, 59, 95, 95, 95, 195,
+ 74, 142, 142, 142, 196, 156, 156, 0,
+ 0, 0, 0, 0, 78, 197, 0, 0,
+ 216, 0, 0, 0, 239, 240, 26, 0,
+ 0, 241, 0, 0, 24, 24, 24, 243,
+ 0, 47, 47, 180, 0, 0, 0, 247,
+ 0, 0, 251, 252, 0, 45, 45, 45,
+ 45, 45, 164, 253, 164, 0, 57, 57,
+ 254, 258, 58, 58, 277, 297, 317, 99,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 319, 0, 0, 0, 320, 45, 148, 148,
+ 44, 207, 207, 324, 99, 59, 59, 335,
+ 340, 189, 99, 313, 96, 313, 278, 278,
+ 47, 94, 94, 94, 343, 94, 113, 113,
+ 113, 113, 0, 0, 0, 0, 0, 144,
+ 356, 31, 31, 95, 357, 57, 214, 214,
+ 142, 58, 0, 322, 40, 40, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 125, 4, 4, 4,
+ 4, 4, 4, 1, 59, 363, 4, 4,
+ 4, 4, 4, 4, 95, 4, 4, 4,
+ 4, 142, 4, 189, 4, 4, 4, 323,
+ 4, 4, 4, 4, 4, 4, 291, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 255, 4, 4, 4, 4, 74, 74, 75,
+ 75, 75, 75, 75, 4, 148, 207, 99,
+ 370, 78, 78, 114, 114, 114, 114, 189,
+ 291, 371, 4, 4, 4, 4, 99, 379,
+ 99, 278, 381, 382, 94, 45, 391, 75,
+ 180, 180, 393, 395, 99, 398, 406, 45,
+ 45, 282, 282, 214, 407, 76, 76, 76,
+ 76, 76, 413, 442, 94, 454, 462, 322,
+ 255, 322, 465, 146, 146, 146, 467, 146,
+ 373, 373, 373, 484, 486, 421, 421, 421,
+ 487, 421, 113, 113, 113, 76, 4, 4,
+ 4, 4, 94, 421, 4, 4, 0, 4,
+ 4, 4, 289, 289, 465, 4, 4, 439,
+ 4, 4, 99, 323, 489, 323, 4, 495,
+ 423, 423, 4, 4, 4, 498, 4, 4,
+ 455, 455, 4, 77, 77, 77, 77, 77,
+ 101, 439, 400, 4, 464, 248, 464, 513,
+ 101, 145, 145, 145, 518, 145, 4, 4,
+ 4, 4, 4, 4, 4, 4, 512, 4,
+ 4, 4, 497, 77, 512, 109, 109, 109,
+ 109, 109, 525, 111, 111, 111, 111, 111,
+ 282, 101, 526, 112, 112, 112, 112, 112,
+ 149, 149, 149, 121, 121, 121, 121, 121,
+ 4, 4, 4, 4, 4, 109, 146, 244,
+ 248, 75, 75, 111, 75, 114, 114, 114,
+ 4, 540, 101, 112, 275, 275, 244, 206,
+ 206, 206, 321, 121, 161, 476, 146, 289,
+ 543, 64, 64, 64, 64, 549, 64, 321,
+ 468, 468, 394, 552, 1, 556, 559, 64,
+ 64, 64, 64, 64, 560, 321, 423, 76,
+ 76, 394, 76, 455, 146, 64, 101, 476,
+ 563, 64, 64, 64, 64, 568, 581, 568,
+ 64, 64, 64, 585, 145, 186, 562, 64,
+ 64, 589, 64, 64, 64, 64, 122, 122,
+ 122, 122, 122, 501, 501, 64, 497, 573,
+ 101, 564, 564, 595, 145, 325, 325, 325,
+ 186, 599, 351, 351, 244, 244, 562, 149,
+ 600, 321, 325, 325, 603, 605, 122, 198,
+ 198, 198, 198, 198, 617, 77, 77, 624,
+ 77, 573, 145, 248, 248, 362, 362, 400,
+ 400, 355, 355, 275, 626, -1, 206, 394,
+ 394, -1, 233, 233, 233, 233, 233, 198,
+ 149, 502, 502, 502, -1, 321, 101, 109,
+ 109, -1, 321, 468, -1, 111, 111, 123,
+ 123, 123, 123, 123, 4, 112, 112, -1,
+ -1, 321, 233, 321, -1, 121, 121, 206,
+ -1, 0, 0, 0, 0, 0, 369, 369,
+ 0, 0, -1, 0, 0, 0, 542, 123,
+ 26, 0, 0, -1, 0, 0, 24, 24,
+ 24, -1, 0, 47, 47, 186, 0, 0,
+ 0, 501, 0, 0, 564, -1, 0, 124,
+ 124, 124, 124, 124, 186, 351, 186, 0,
+ 64, 64, 64, -1, 212, 212, 212, 547,
+ 212, -1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 362, 0, 0, 0, 547, 124,
+ 355, 294, 44, 294, 199, 199, 199, 199,
+ -1, 64, 64, 64, 64, 64, 96, 199,
+ 122, 122, 47, 129, 129, 129, 129, 129,
+ 502, -1, 336, 336, 0, 0, 0, 0,
+ 0, 144, -1, 31, 31, -1, 337, 337,
+ 65, 65, 65, 65, 0, 65, 40, 40,
+ -1, 198, 198, 129, -1, 369, 65, 65,
+ 65, 65, 65, 213, 213, 213, 125, 353,
+ 353, 353, -1, 353, 65, 590, -1, 590,
+ 65, 65, 65, 65, 233, 233, 95, 65,
+ 65, 65, -1, 142, 547, 547, 65, 65,
+ -1, 65, 65, 65, 65, -1, 294, 365,
+ 365, 123, 123, 396, 65, 592, 592, 212,
+ -1, 200, 200, 200, 200, 424, 424, 74,
+ 74, 341, 341, 341, 200, 412, 412, 148,
+ 207, -1, 212, 78, 78, -1, 341, 341,
+ -1, 189, -1, 542, 542, 411, 411, -1,
+ -1, -1, -1, 460, 460, -1, 587, 45,
+ 587, -1, 180, 180, -1, -1, 99, 336,
+ 336, 124, 124, 212, 294, 214, 396, 199,
+ -1, 452, 452, 337, 337, -1, 94, -1,
+ -1, 322, -1, 322, -1, 459, -1, 459,
+ -1, -1, 213, -1, -1, -1, 199, 199,
+ 199, -1, 353, -1, 113, 113, 113, 353,
+ 4, 4, 4, 4, 94, -1, 4, 4,
+ -1, 4, 4, 4, -1, 129, 129, 4,
+ 4, -1, 4, 4, 99, -1, -1, -1,
+ 4, -1, 365, 213, 4, 4, 4, -1,
+ 4, 4, -1, 592, 4, 133, 133, 133,
+ 133, 133, 353, 424, 412, 4, -1, 65,
+ 65, 65, 287, 287, 287, -1, 287, -1,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 411, 4, 4, 4, 200, 133, 460, 191,
+ 191, 191, 191, -1, 288, 288, 288, 191,
+ 65, 65, 65, 65, 65, 191, 452, 191,
+ 191, 396, 396, 200, 200, 200, 361, 361,
+ 361, -1, 4, 4, 4, 4, 4, 461,
+ 461, 587, 347, 347, 347, 347, 75, 114,
+ 114, 114, 4, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 289, 5, 5, 5, 5, 5, 5,
+ 459, -1, -1, 5, 5, 5, 5, 5,
+ 5, 459, 5, 5, 5, 5, -1, 5,
+ 423, 5, 5, 5, 76, 5, 5, 5,
+ 5, 5, 5, -1, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 287, 5, 5,
+ 5, 5, 201, 201, 201, 201, -1, -1,
+ -1, 5, 359, -1, 359, 201, -1, -1,
+ 497, -1, 101, 288, -1, 287, 145, 5,
+ 5, 5, 5, -1, -1, -1, 244, 244,
+ -1, -1, -1, -1, -1, 361, 191, -1,
+ 191, 191, 191, 191, 191, 191, 461, 133,
+ 133, -1, 77, 287, 145, 248, 248, 392,
+ -1, 400, 400, -1, 288, 275, 392, 392,
+ -1, 394, 394, -1, -1, 392, 520, 520,
+ -1, -1, 149, -1, 392, -1, 361, -1,
+ 101, 109, 109, 5, 5, 5, 5, 111,
+ 111, 5, 5, -1, 5, 5, 5, 112,
+ 112, -1, 5, 5, -1, 5, 5, 121,
+ 121, 206, -1, 5, 347, 347, 347, 5,
+ 5, 5, -1, 5, 5, -1, -1, 5,
+ 136, 136, 136, 136, 136, 474, 474, -1,
+ 5, 143, 143, 143, 143, 143, -1, 186,
+ 538, 538, -1, 5, 5, 5, 5, 5,
+ 5, 5, 5, -1, 5, 5, 5, 351,
+ 136, -1, 64, 64, 64, 201, 410, 410,
+ 410, 143, 410, 524, 524, 359, 440, 440,
+ 440, 205, 205, 205, 362, 205, 359, 201,
+ 201, 201, 355, 571, 571, 5, 5, 5,
+ 5, 5, -1, 64, 64, 64, 64, 64,
+ -1, 520, 122, 122, -1, 5, 539, 539,
+ 392, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, -1,
+ 6, 6, 6, 6, 6, 6, -1, 548,
+ -1, 6, 6, 6, 6, 6, 6, 369,
+ 6, 6, 6, 6, -1, 6, 548, 6,
+ 6, 6, 474, 6, 6, 6, 6, 6,
+ 6, -1, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 538, 6, 6, 6, 6,
+ 415, -1, 488, 488, 488, 488, -1, 6,
+ 294, -1, -1, 123, 123, -1, 555, 415,
+ 555, 410, 524, -1, -1, 6, 6, 6,
+ 6, -1, -1, -1, 205, -1, -1, -1,
+ 571, 205, -1, -1, 212, -1, 451, 451,
+ 451, 410, 136, 136, -1, 542, 542, -1,
+ -1, 440, 440, 143, 143, 539, 367, 367,
+ 367, -1, 367, -1, 548, 548, -1, -1,
+ -1, 336, -1, 124, 124, 212, 294, 410,
+ -1, 199, -1, -1, 205, 337, -1, -1,
+ -1, 6, 6, 6, 6, -1, -1, 6,
+ 6, 5, 6, 6, 6, -1, -1, -1,
+ 6, 6, -1, 6, 6, 415, 415, -1,
+ -1, 6, -1, -1, -1, 6, 6, 6,
+ -1, 6, 6, -1, -1, 6, -1, 129,
+ 129, 598, 598, -1, -1, -1, 6, 234,
+ 234, 234, 234, 234, 365, 213, -1, -1,
+ -1, 6, 6, 6, 6, 6, 6, 6,
+ 6, -1, 6, 6, 6, 424, 412, -1,
+ -1, 65, 65, 65, -1, 451, -1, 234,
+ -1, 242, 242, 242, 242, 242, 488, 488,
+ 488, 555, 411, -1, -1, -1, 200, -1,
+ 460, 367, -1, 6, 6, 6, 6, 6,
+ -1, -1, 65, 65, 65, 65, 65, -1,
+ 452, 242, -1, 6, 367, -1, 451, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, -1, 7, 7,
+ 7, 7, 7, 7, -1, -1, -1, 7,
+ 7, 7, 7, 7, 7, 367, 7, 7,
+ 7, 7, -1, 7, -1, 7, 7, 7,
+ 598, 7, 7, 7, 7, 7, 7, -1,
+ 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, -1, 7, 7, 7, 7, 597, 597,
+ 329, 329, 329, 329, -1, 7, -1, -1,
+ 329, -1, -1, -1, -1, -1, 329, -1,
+ 329, 329, -1, 7, 7, 7, 7, -1,
+ 326, 326, 326, 326, 326, 326, 326, 326,
+ 326, 326, -1, -1, -1, -1, 326, 287,
+ 326, 326, 326, 326, 326, 326, 326, -1,
+ -1, 234, 234, -1, -1, -1, -1, -1,
+ 191, -1, 191, 191, 191, 191, 191, 191,
+ 461, 133, 133, -1, -1, 287, -1, -1,
+ -1, -1, -1, -1, -1, -1, 288, 7,
+ 7, 7, 7, 242, 242, 7, 7, 6,
+ 7, 7, 7, -1, -1, -1, 7, 7,
+ 361, 7, 7, -1, -1, -1, -1, 7,
+ -1, -1, -1, 7, 7, 7, -1, 7,
+ 7, -1, -1, 7, 349, 349, 349, 349,
+ -1, 597, -1, -1, 7, -1, 347, 347,
+ 347, 350, 350, 350, 350, -1, -1, 7,
+ 7, 7, 7, 7, 7, 7, 7, -1,
+ 7, 7, 7, 329, 329, 329, 329, -1,
+ 208, -1, 208, 208, 208, 208, 528, 208,
+ 528, 528, 528, 528, -1, 352, 352, 352,
+ 326, 352, 326, 326, 326, 326, 326, 201,
+ -1, 7, 7, 7, 7, 7, -1, 359,
+ 419, -1, 419, -1, -1, -1, -1, 419,
+ 359, 7, -1, -1, -1, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 520, 8, 8, 8, 8,
+ 8, 8, 392, 618, -1, 8, 8, 8,
+ 8, 8, 8, -1, 8, 8, 8, 8,
+ -1, 8, 618, 8, 8, 8, -1, 8,
+ 8, 8, 8, 8, 8, -1, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, -1,
+ 8, 8, 8, 8, 474, -1, -1, -1,
+ 360, 360, 360, 8, 360, -1, -1, -1,
+ -1, -1, 473, 473, 473, 538, -1, -1,
+ -1, 8, 8, 8, 8, -1, -1, -1,
+ 352, -1, -1, -1, -1, 352, 349, 349,
+ 349, -1, -1, -1, 524, -1, 350, 350,
+ 350, -1, -1, 208, -1, 419, 419, 419,
+ 208, 528, 571, 205, 208, 208, -1, -1,
+ 618, 618, -1, -1, 136, 136, -1, -1,
+ -1, -1, -1, 440, 440, 143, 143, 539,
+ 352, -1, -1, 419, -1, 8, 8, 8,
+ 8, -1, -1, 8, 8, 7, 8, 8,
+ 8, -1, -1, -1, 8, 8, 205, 8,
+ 8, -1, 208, -1, -1, 8, -1, -1,
+ -1, 8, 8, 8, -1, 8, 8, -1,
+ -1, 8, 327, -1, -1, -1, -1, 415,
+ 415, -1, 8, 360, -1, -1, -1, -1,
+ 360, 473, -1, -1, -1, 8, 8, 8,
+ 8, 8, 8, 8, 8, -1, 8, 8,
+ 8, -1, 327, 327, 327, 327, 327, 327,
+ 327, 327, 327, 327, 327, 327, 327, 327,
+ 327, -1, 327, 327, 327, 327, 327, 327,
+ 327, -1, 473, 360, -1, -1, -1, 8,
+ 8, 8, 8, 8, -1, -1, -1, -1,
+ 488, 488, 488, 555, -1, -1, -1, 8,
+ -1, -1, -1, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, -1, 9, 9, 9, 9, 9, 9,
+ 451, -1, -1, 9, 9, 9, 9, 9,
+ 9, -1, 9, 9, 9, 9, -1, 9,
+ -1, 9, 9, 9, -1, 9, 9, 9,
+ 9, 9, 9, -1, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, -1, 9, 9,
+ 9, 9, 598, -1, -1, 434, 434, 434,
+ 434, 9, 328, -1, -1, 434, -1, -1,
+ -1, -1, -1, 434, -1, 434, 434, 9,
+ 9, 9, 9, -1, -1, -1, -1, -1,
+ -1, -1, 327, -1, 327, 327, 327, 327,
+ 327, -1, 328, 328, 328, 328, 328, 328,
+ 328, 328, 328, 328, 328, 328, 328, 328,
+ 328, -1, 328, 328, 328, 328, 328, 328,
+ 328, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 234, 234, -1, -1, -1,
+ -1, -1, -1, 9, 9, 9, 9, -1,
+ -1, 9, 9, 8, 9, 9, 9, -1,
+ -1, -1, 9, 9, -1, 9, 9, 519,
+ 519, 519, 519, 9, -1, 242, 242, 9,
+ 9, 9, -1, 9, 9, -1, -1, 9,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 9, 584, 584, 584, 584, 584, -1, -1,
+ -1, -1, -1, 9, 9, 9, 9, 9,
+ 9, 9, 9, 597, 9, 9, 9, 434,
+ 434, 434, 434, 434, 531, 531, 531, -1,
+ 531, 584, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 329, 329, 329,
+ 329, -1, -1, -1, -1, 9, 9, 9,
+ 9, 9, 328, -1, 328, 328, 328, 328,
+ 328, -1, 326, -1, -1, 9, -1, -1,
+ -1, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, -1,
+ 10, 10, 10, 10, 10, 10, -1, -1,
+ -1, 10, 10, 10, 10, 10, 10, -1,
+ 10, 10, 10, 10, -1, 10, -1, 10,
+ 10, 10, -1, 10, 10, 10, 10, 10,
+ 10, -1, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 330, 10, 10, 10, 10,
+ -1, -1, -1, 496, -1, 496, -1, 10,
+ -1, 553, 496, 553, 519, 519, 519, 531,
+ 553, 519, 519, 519, 531, 10, 10, 10,
+ 10, -1, -1, 330, 330, 330, 330, 330,
+ 330, 330, 330, 330, 330, 330, 330, 330,
+ 330, 330, -1, 330, 330, 330, 330, 330,
+ 330, 330, -1, 584, 584, -1, -1, 352,
+ 349, 349, 349, -1, -1, -1, -1, 531,
+ 350, 350, 350, -1, -1, -1, -1, -1,
+ -1, 419, 208, 528, -1, -1, -1, 208,
+ -1, 10, 10, 10, 10, -1, -1, 10,
+ 10, 9, 10, 10, 10, -1, -1, -1,
+ 10, 10, 352, 10, 10, -1, -1, -1,
+ -1, 10, -1, -1, -1, 10, 10, 10,
+ -1, 10, 10, -1, 463, 10, 463, 463,
+ 463, 463, -1, 463, 208, -1, 10, -1,
+ 496, 496, -1, -1, -1, -1, 553, 553,
+ -1, 10, 10, 10, 10, 10, 10, 10,
+ 10, -1, 10, 10, 10, -1, -1, 522,
+ 522, 522, 360, 522, -1, 463, 496, 570,
+ 570, 570, -1, -1, 553, -1, -1, -1,
+ -1, -1, -1, 330, -1, 330, 330, 330,
+ 330, 330, -1, 10, 10, 10, 10, 10,
+ -1, -1, -1, -1, -1, 537, 537, 537,
+ -1, 537, -1, 10, 473, 360, -1, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, -1, 11, 11,
+ 11, 11, 11, 11, -1, -1, -1, 11,
+ 11, 11, 11, 11, 11, -1, 11, 11,
+ 11, 11, -1, 11, -1, 11, 11, 11,
+ -1, 11, 11, 11, 11, 11, 11, -1,
+ 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 331, 11, 11, 11, 11, -1, -1,
+ -1, 622, -1, 622, 623, 11, 623, 463,
+ 622, -1, 522, 623, 463, -1, 570, -1,
+ 463, 463, -1, 11, 11, 11, 11, -1,
+ 522, 331, 331, 331, 331, 331, 331, 331,
+ 331, 331, 331, 331, 331, 331, 331, 331,
+ 331, 331, 331, 331, 331, 331, 331, 331,
+ 537, -1, -1, -1, -1, -1, -1, 570,
+ -1, -1, -1, -1, 522, -1, 463, -1,
+ -1, -1, -1, 537, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 11,
+ 11, 11, 11, -1, -1, 11, 11, 10,
+ 11, 11, 11, -1, -1, -1, 11, 11,
+ -1, 11, 11, -1, 537, -1, -1, 11,
+ -1, -1, -1, 11, 11, 11, -1, 11,
+ 11, -1, 532, 11, 532, 532, 532, 532,
+ -1, 532, -1, -1, 11, -1, 622, 622,
+ -1, 623, 623, -1, -1, -1, -1, 11,
+ 11, 11, 11, 11, 11, 11, 11, -1,
+ 11, 11, 11, -1, 596, 596, 596, -1,
+ 596, -1, -1, 532, 622, -1, -1, 623,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 331, -1, 331, 331, 331, 331, 331,
+ -1, 11, 11, 11, 11, 11, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 11, -1, -1, -1, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, -1, 12, 12, 12, 12,
+ 12, 12, -1, -1, -1, 12, 12, 12,
+ 12, 12, 12, -1, 12, 12, 12, 12,
+ -1, 12, -1, 12, 12, 12, -1, 12,
+ 12, 12, 12, 12, 12, -1, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 332,
+ 12, 12, 12, 12, -1, -1, -1, -1,
+ -1, -1, -1, 12, -1, 532, -1, 596,
+ -1, -1, 532, -1, -1, -1, 532, 532,
+ -1, 12, 12, 12, 12, 596, -1, 332,
+ 332, 332, 332, 332, 332, 332, 332, 332,
+ 332, 332, 332, 332, 332, 332, -1, 332,
+ 332, 332, 332, 332, 332, 332, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 596, -1, -1, 532, -1, -1, -1,
+ -1, -1, -1, -1, -1, 584, 584, -1,
+ -1, -1, -1, -1, -1, 12, 12, 12,
+ 12, -1, -1, 12, 12, 11, 12, 12,
+ 12, -1, -1, -1, 12, 12, -1, 12,
+ 12, -1, -1, -1, -1, 12, -1, -1,
+ -1, 12, 12, 12, -1, 12, 12, -1,
+ 533, 12, 533, 533, 533, 533, -1, 533,
+ -1, -1, 12, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 12, 12, 12,
+ 12, 12, 12, 12, 12, -1, 12, 12,
+ 12, -1, 496, 496, -1, -1, -1, -1,
+ -1, 533, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 332,
+ -1, 332, 332, 332, 332, 332, -1, 12,
+ 12, 12, 12, 12, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 12,
+ -1, -1, -1, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, -1, 13, 13, 13, 13, 13, 13,
+ -1, -1, -1, 13, 13, 13, 13, 13,
+ 13, -1, 13, 13, 13, 13, -1, 13,
+ -1, 13, 13, 13, -1, 13, 13, 13,
+ 13, 13, 13, -1, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 333, 13, 13,
+ 13, 13, -1, -1, -1, -1, -1, -1,
+ -1, 13, -1, 533, -1, -1, -1, -1,
+ 533, -1, -1, -1, 533, 533, -1, 13,
+ 13, 13, 13, -1, -1, 333, 333, 333,
+ 333, 333, 333, 333, 333, 333, 333, 333,
+ 333, 333, 333, 333, 333, 333, 333, 333,
+ 333, 333, 333, 333, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 533, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 570, -1, 13, 13, 13, 13, -1,
+ -1, 13, 13, 12, 13, 13, 13, -1,
+ -1, -1, 13, 13, -1, 13, 13, -1,
+ -1, -1, -1, 13, -1, -1, -1, 13,
+ 13, 13, -1, 13, 13, -1, 354, 13,
+ 354, 354, 354, 354, -1, -1, -1, -1,
+ 13, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 13, 13, 13, 13, 13,
+ 13, 13, 13, -1, 13, 13, 13, -1,
+ -1, -1, -1, -1, -1, -1, -1, 354,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 333, -1, 333,
+ 333, 333, 333, 333, -1, 13, 13, 13,
+ 13, 13, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 13, -1, -1,
+ -1, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, -1,
+ 14, 14, 14, 14, 14, 14, -1, -1,
+ -1, 14, 14, 14, 14, 14, 14, -1,
+ 14, 14, 14, 14, -1, 14, -1, 14,
+ 14, 14, -1, 14, 14, 14, 14, 14,
+ 14, -1, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 334, 14, 14, 14, 14,
+ -1, -1, -1, -1, -1, -1, -1, 14,
+ -1, 354, -1, -1, -1, -1, 354, -1,
+ -1, -1, 354, 354, -1, 14, 14, 14,
+ 14, -1, -1, 334, 334, 334, 334, 334,
+ 334, 334, 334, 334, 334, 334, 334, 334,
+ 334, 334, 334, 334, 334, 334, 334, 334,
+ 334, 334, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 354, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 14, 14, 14, 14, -1, -1, 14,
+ 14, 13, 14, 14, 14, -1, -1, -1,
+ 14, 14, -1, 14, 14, -1, -1, -1,
+ -1, 14, -1, -1, -1, 14, 14, 14,
+ -1, 14, 14, -1, -1, 14, -1, -1,
+ -1, -1, -1, -1, -1, -1, 14, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 14, 14, 14, 14, 14, 14, 14,
+ 14, -1, 14, 14, 14, 338, 338, 338,
+ 338, -1, -1, -1, -1, 338, 366, 366,
+ 366, -1, 366, 338, -1, 338, 338, -1,
+ -1, -1, -1, 334, -1, 334, 334, 334,
+ 334, 334, -1, 14, 14, 14, 14, 14,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 14, -1, -1, -1, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, -1, 15, 15,
+ 15, 15, 15, 15, -1, -1, -1, 15,
+ 15, 15, 15, 15, 15, -1, 15, 15,
+ 15, 15, -1, 15, -1, 15, 15, 15,
+ -1, 15, 15, 15, 15, 15, 15, -1,
+ 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, -1, 15, 15, 15, 15, -1, -1,
+ -1, -1, -1, -1, -1, 15, 339, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 366, -1, 15, 15, 15, 15, -1,
+ -1, -1, -1, -1, 338, -1, 338, 338,
+ 338, 338, 338, 338, 366, -1, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, 339, 339, 339,
+ 339, 339, 339, 339, 339, -1, -1, -1,
+ -1, -1, -1, -1, -1, 366, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 15,
+ 15, 15, 15, -1, -1, 15, 15, 14,
+ 15, 15, 15, -1, -1, -1, 15, 15,
+ -1, 15, 15, -1, -1, -1, -1, 15,
+ -1, -1, -1, 15, 15, 15, -1, 15,
+ 15, -1, 358, 15, 358, 358, 358, 358,
+ -1, 358, -1, -1, 15, 534, -1, 534,
+ 534, 534, 534, -1, 534, -1, -1, 15,
+ 15, 15, 15, 15, 15, 15, 15, -1,
+ 15, 15, 15, -1, -1, -1, 450, 450,
+ 450, -1, 450, 358, -1, 426, 426, 426,
+ 426, -1, -1, -1, -1, 426, 534, -1,
+ -1, -1, -1, 426, -1, 426, 426, -1,
+ -1, 15, 15, 15, 15, 15, 339, -1,
+ 339, 339, 339, 339, 339, -1, -1, -1,
+ -1, 15, -1, -1, -1, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, -1, 16, 16, 16, 16,
+ 16, 16, -1, -1, -1, 16, 16, 16,
+ 16, 16, 16, -1, 16, 16, 16, 16,
+ -1, 16, -1, 16, 16, 16, -1, 16,
+ 16, 16, 16, 16, 16, -1, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, -1,
+ 16, 16, 16, 16, -1, -1, -1, -1,
+ -1, -1, -1, 16, -1, 358, -1, -1,
+ -1, 450, 358, -1, -1, -1, 358, 358,
+ 534, 16, 16, 16, 16, 534, -1, 450,
+ -1, 534, 534, -1, -1, -1, -1, -1,
+ 354, -1, -1, -1, -1, 354, 426, 426,
+ 426, 426, 426, 426, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 450, 358, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 534,
+ -1, -1, -1, -1, -1, 16, 16, 16,
+ 16, -1, 354, 16, 16, 15, 16, 16,
+ 16, -1, -1, -1, 16, 16, -1, 16,
+ 16, -1, -1, -1, -1, 16, -1, -1,
+ -1, 16, 16, 16, -1, 16, 16, -1,
+ -1, 16, 422, -1, -1, -1, -1, -1,
+ -1, -1, 16, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 16, 16, 16,
+ 16, 16, 16, 16, 16, -1, 16, 16,
+ 16, -1, 422, 422, 422, 422, 422, 422,
+ 422, 422, 422, 422, 422, 422, 422, 422,
+ 422, -1, 422, 422, 422, 422, 422, 422,
+ 422, -1, -1, -1, -1, -1, -1, 16,
+ 16, 16, 16, 16, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 16,
+ -1, -1, -1, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, -1, 17, 17, 17, 17, 17, 17,
+ -1, -1, -1, 17, 17, 17, 17, 17,
+ 17, -1, 17, 17, 17, 17, -1, 17,
+ -1, 17, 17, 17, -1, 17, 17, 17,
+ 17, 17, 17, -1, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, -1, 17, 17,
+ 17, 17, -1, -1, -1, 430, 430, 430,
+ 430, 17, 610, -1, 610, 430, -1, -1,
+ -1, 610, -1, 430, -1, 430, 430, 17,
+ 17, 17, 17, -1, 610, 610, -1, -1,
+ -1, -1, 422, -1, 422, 422, 422, 422,
+ 422, -1, 610, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 338, -1,
+ 338, 338, 338, 338, 338, 338, 366, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 17, 17, 17, 17, -1,
+ -1, 17, 17, 16, 17, 17, 17, 366,
+ -1, -1, 17, 17, -1, 17, 17, -1,
+ -1, -1, -1, 17, -1, -1, -1, 17,
+ 17, 17, -1, 17, 17, -1, -1, 17,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 17, -1, -1, -1, -1, -1, -1, 610,
+ 610, -1, -1, 17, 17, 17, 17, 17,
+ 17, 17, 17, -1, 17, 17, 17, 430,
+ 430, 430, 430, 430, -1, -1, -1, -1,
+ -1, 427, 427, 427, 427, 610, 610, -1,
+ -1, 427, -1, -1, -1, -1, -1, 427,
+ -1, 427, 427, -1, -1, 17, 17, 17,
+ 17, 17, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 17, -1, -1,
+ -1, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, -1,
+ 18, 18, 18, 18, 18, 18, -1, -1,
+ -1, 18, 18, 18, 18, 18, 18, -1,
+ 18, 18, 18, 18, -1, 18, -1, 18,
+ 18, 18, -1, 18, 18, 18, 18, 18,
+ 18, -1, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, -1, 18, 18, 18, 18,
+ -1, -1, -1, -1, -1, -1, -1, 18,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 428, 428, 428, 428, 18, 18, 18,
+ 18, 428, -1, -1, -1, -1, -1, 428,
+ -1, 428, 428, -1, 358, -1, -1, -1,
+ -1, 358, 427, 427, 427, 427, 427, 427,
+ -1, 450, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 426, 426, 426, 426, 426, 426, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 18, 18, 18, 18, 450, 358, 18,
+ 18, 17, 18, 18, 18, -1, -1, -1,
+ 18, 18, -1, 18, 18, -1, -1, -1,
+ -1, 18, -1, -1, -1, 18, 18, 18,
+ -1, 18, 18, -1, -1, 18, -1, -1,
+ -1, -1, -1, -1, -1, -1, 18, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 18, 18, 18, 18, 18, 18, 18,
+ 18, -1, 18, 18, 18, -1, -1, 472,
+ 472, 472, -1, 472, -1, -1, -1, -1,
+ -1, -1, 428, 428, 428, 428, 428, 428,
+ -1, -1, 429, 429, 429, 429, -1, -1,
+ -1, -1, 429, 18, 18, 18, 18, 18,
+ 429, -1, 429, 429, -1, -1, -1, -1,
+ -1, -1, -1, 18, -1, -1, -1, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, -1, 19, 19,
+ 19, 19, 19, 19, -1, -1, -1, 19,
+ 19, 19, 19, 19, 19, -1, 19, 19,
+ 19, 19, -1, 19, -1, 19, 19, 19,
+ -1, 19, 19, 19, 19, 19, 19, -1,
+ 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, -1, 19, 19, 19, 19, -1, -1,
+ -1, 431, 431, 431, 431, 19, -1, -1,
+ -1, 431, 472, -1, -1, -1, -1, 431,
+ -1, 431, 431, 19, 19, 19, 19, -1,
+ -1, -1, -1, -1, -1, 472, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 429, 429, 429, 429, 429,
+ 429, -1, -1, -1, -1, -1, 472, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 19,
+ 19, 19, 19, -1, -1, 19, 19, 18,
+ 19, 19, 19, -1, -1, -1, 19, 19,
+ -1, 19, 19, -1, -1, -1, -1, 19,
+ -1, -1, -1, 19, 19, 19, -1, 19,
+ 19, -1, -1, 19, -1, -1, -1, -1,
+ -1, -1, -1, -1, 19, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 19,
+ 19, 19, 19, 19, 19, 19, 19, -1,
+ 19, 19, 19, 431, 431, 431, 431, 431,
+ -1, 575, -1, 575, 575, 575, 575, -1,
+ 575, -1, -1, -1, -1, -1, -1, -1,
+ -1, 430, 430, 430, 430, 430, -1, -1,
+ -1, 19, 19, 19, 19, 19, -1, -1,
+ 610, -1, -1, -1, -1, -1, -1, -1,
+ -1, 19, 575, -1, -1, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, -1, 20, 20, 20, 20,
+ 20, 20, -1, -1, -1, 20, 20, 20,
+ 20, 20, 20, -1, 20, 20, 20, 20,
+ -1, 20, -1, 20, 20, 20, -1, 20,
+ 20, 20, 20, 20, 20, -1, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, -1,
+ 20, 20, 20, 20, -1, -1, -1, 432,
+ 432, 432, 432, 20, -1, -1, -1, 432,
+ -1, -1, -1, -1, -1, 432, -1, 432,
+ 432, 20, 20, 20, 20, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 575, -1, -1, -1,
+ -1, 575, -1, -1, -1, 575, 575, -1,
+ -1, -1, -1, -1, 427, 427, 427, 427,
+ 427, 427, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 20, 20, 20,
+ 20, -1, -1, 20, 20, 19, 20, 20,
+ 20, -1, -1, -1, 20, 20, -1, 20,
+ 20, -1, -1, 575, -1, 20, -1, -1,
+ -1, 20, 20, 20, -1, 20, 20, -1,
+ -1, 20, -1, -1, -1, -1, -1, -1,
+ -1, -1, 20, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 20, 20, 20,
+ 20, 20, 20, 20, 20, -1, 20, 20,
+ 20, 432, 432, 432, 432, 432, -1, -1,
+ -1, 433, 433, 433, 433, -1, -1, -1,
+ -1, 433, -1, -1, -1, -1, -1, 433,
+ -1, 433, 433, -1, -1, -1, -1, 20,
+ 20, 20, 20, 20, 428, 428, 428, 428,
+ 428, 428, -1, -1, -1, -1, -1, 20,
+ -1, -1, -1, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, -1, 21, 21, 21, 21, 21, 21,
+ -1, -1, -1, 21, 21, 21, 21, 21,
+ 21, -1, 21, 21, 21, 21, -1, 21,
+ -1, 21, 21, 21, -1, 21, 21, 21,
+ 21, 21, 21, -1, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, -1, 21, 21,
+ 21, 21, -1, -1, -1, -1, -1, -1,
+ -1, 21, -1, -1, -1, 504, 504, 504,
+ 504, 504, 504, 504, 504, 504, 504, 21,
+ 21, 21, 21, 504, -1, 504, 504, 504,
+ 504, 504, 504, 504, -1, -1, -1, -1,
+ -1, -1, -1, 433, 433, 433, 433, 433,
+ -1, -1, -1, -1, -1, -1, -1, 472,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 429, 429, 429,
+ 429, 429, 429, 21, 21, 21, 21, -1,
+ 472, 21, 21, 20, 21, 21, 21, -1,
+ -1, -1, 21, 21, -1, 21, 21, -1,
+ -1, -1, -1, 21, -1, -1, -1, 21,
+ 21, 21, -1, 21, 21, -1, -1, 21,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 21, 576, -1, 576, 576, 576, 576, -1,
+ 576, -1, -1, 21, 21, 21, 21, 21,
+ 21, 21, 21, -1, 21, 21, 21, -1,
+ -1, -1, -1, -1, -1, 504, -1, 504,
+ 504, 504, 504, 504, -1, -1, -1, -1,
+ -1, -1, 576, -1, -1, 431, 431, 431,
+ 431, 431, -1, -1, -1, 21, 21, 21,
+ 21, 21, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 21, -1, -1,
+ -1, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, -1,
+ 22, 22, 22, 22, 22, 22, -1, -1,
+ -1, 22, 22, 22, 22, 22, 22, -1,
+ 22, 22, 22, 22, -1, 22, -1, 22,
+ 22, 22, -1, 22, 22, 22, 22, 22,
+ 22, -1, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, -1, 22, 22, 22, 22,
+ -1, -1, -1, -1, -1, -1, -1, 22,
+ 435, -1, -1, -1, 521, 521, 521, -1,
+ 521, -1, -1, -1, 576, 22, 22, 22,
+ 22, 576, -1, -1, -1, 576, 576, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 435, 435, 435, 435, 435, 435, 435, 435,
+ 435, 435, 435, 435, 435, 435, 435, -1,
+ 435, 435, 435, 435, 435, 435, 435, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 576, -1, -1, -1, -1,
+ -1, 22, 22, 22, 22, -1, -1, 22,
+ 22, 21, 22, 22, 22, -1, -1, -1,
+ 22, 22, -1, 22, 22, -1, -1, -1,
+ -1, 22, -1, -1, -1, 22, 22, 22,
+ -1, 22, 22, -1, -1, 22, -1, -1,
+ -1, -1, -1, -1, -1, -1, 22, -1,
+ -1, -1, -1, -1, -1, -1, -1, 521,
+ -1, 22, 22, 22, 22, 22, 22, 22,
+ 22, -1, 22, 22, 22, 521, -1, -1,
+ -1, -1, -1, -1, -1, 569, 569, 569,
+ -1, 569, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 432, 432, 432, 432, 432,
+ -1, -1, -1, 22, 22, 22, 22, 22,
+ 435, 521, 435, 435, 435, 435, 435, -1,
+ -1, -1, -1, 22, -1, -1, -1, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, -1, 28, 28,
+ 28, 28, 28, 28, -1, -1, -1, 28,
+ 28, 28, 28, 28, 28, -1, 28, 28,
+ 28, 28, -1, 28, -1, 28, 28, 28,
+ -1, 28, 28, 28, 28, 28, 28, -1,
+ 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, -1, 28, 28, 28, 28, -1, -1,
+ -1, -1, -1, -1, -1, 28, -1, 535,
+ -1, 535, 535, 535, 535, -1, 535, -1,
+ 569, -1, 535, 28, 28, 28, 28, -1,
+ -1, 535, 535, -1, -1, -1, 569, -1,
+ -1, -1, -1, -1, -1, -1, -1, 535,
+ -1, -1, 192, 192, 192, 192, -1, -1,
+ 535, -1, 192, -1, -1, -1, -1, -1,
+ 192, -1, 192, 192, 192, 433, 433, 433,
+ 433, 433, 569, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 28,
+ 28, 28, 28, -1, -1, 28, 28, 22,
+ 28, 28, 28, -1, -1, -1, 28, 28,
+ -1, 28, 28, -1, -1, -1, -1, 28,
+ -1, -1, -1, 28, 28, 28, -1, 28,
+ 28, 192, -1, 28, -1, -1, -1, -1,
+ -1, -1, -1, -1, 28, 485, 485, 485,
+ 485, 485, -1, 485, -1, -1, -1, 28,
+ 28, 28, 28, 28, 28, 28, 28, -1,
+ 28, 28, 28, -1, -1, -1, -1, -1,
+ -1, -1, -1, 187, -1, 485, -1, -1,
+ -1, -1, 535, 535, -1, -1, -1, 535,
+ 187, -1, -1, 535, 535, -1, -1, 504,
+ 187, 28, 28, 28, 28, 28, 187, -1,
+ -1, 192, -1, 192, 192, 192, 192, 192,
+ 192, 28, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 535, 33, 33, 33, 33, 33, 33,
+ -1, 33, 33, 33, 33, -1, 33, -1,
+ 33, 33, 33, -1, 33, 33, 33, 33,
+ 33, 33, 187, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, -1, 33, 33, 33,
+ 33, 485, -1, -1, -1, -1, -1, -1,
+ 33, -1, -1, 33, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 33, 33,
+ 33, 33, -1, -1, -1, -1, 187, -1,
+ -1, -1, -1, 187, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 187, -1, 187, -1, -1, 485,
+ 485, -1, -1, -1, -1, -1, -1, -1,
+ 187, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 33, 33, 33, 33, -1, -1,
+ 33, 33, -1, 33, 33, 33, -1, -1,
+ -1, 33, 33, -1, 33, 33, -1, -1,
+ -1, -1, 33, -1, -1, -1, 33, 33,
+ 33, -1, 33, 33, -1, -1, 33, -1,
+ -1, -1, -1, -1, -1, -1, 187, 33,
+ 33, 33, 33, -1, -1, -1, 33, 33,
+ -1, -1, 33, 33, 33, 33, 33, 33,
+ 33, 33, -1, 33, 33, 33, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 115, 115, 115, 115, 115,
+ 115, -1, -1, -1, -1, -1, -1, 521,
+ -1, -1, -1, 115, 33, 33, 33, 33,
+ 33, -1, -1, 115, 115, 115, 115, 115,
+ 115, -1, 115, -1, 33, -1, -1, 115,
+ -1, 33, 115, -1, -1, -1, -1, -1,
+ -1, 115, 115, 521, -1, -1, -1, 115,
+ 115, 115, 115, 115, -1, -1, 37, 37,
+ 37, 37, -1, 37, -1, -1, -1, -1,
+ -1, -1, -1, -1, 37, 37, 37, 37,
+ 37, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 37, -1, -1, -1, 37, 37,
+ 37, 37, -1, -1, -1, 37, 37, 37,
+ -1, -1, -1, -1, 37, 37, -1, 37,
+ 37, 37, 37, -1, -1, -1, -1, -1,
+ -1, -1, 37, 609, -1, 609, -1, -1,
+ -1, -1, 609, -1, -1, -1, 609, -1,
+ 37, 37, 37, 37, -1, 609, 609, -1,
+ -1, -1, -1, -1, 115, 115, 115, -1,
+ -1, 115, 115, 609, -1, -1, 115, -1,
+ 569, -1, 115, 115, -1, 115, 115, -1,
+ -1, -1, -1, 115, 115, -1, -1, 115,
+ 115, 115, -1, 115, 115, -1, -1, 115,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 33, -1, -1, -1, 569, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 28, 28, 28, 28, 115, 115, 28,
+ 28, -1, 28, 28, 28, -1, -1, -1,
+ 28, 28, -1, 28, 28, -1, -1, -1,
+ -1, 28, -1, -1, -1, 28, 28, 28,
+ -1, 28, 28, 192, -1, 28, -1, -1,
+ 609, 609, -1, -1, -1, -1, 28, 37,
+ 37, 37, 37, 37, -1, 37, 37, 37,
+ 115, 28, 28, 28, 28, 28, 28, 28,
+ 28, -1, 28, 28, 28, -1, 609, 609,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 535, 37, 37,
+ 37, 37, 37, -1, -1, -1, -1, -1,
+ -1, -1, -1, 28, 28, 28, 28, 28,
+ -1, -1, -1, 192, -1, 192, 192, 192,
+ 192, 192, 192, 28, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, -1, 34, 34, 34, 34,
+ 34, 34, -1, 34, 34, 34, 34, -1,
+ 34, -1, 34, 34, 34, -1, 34, 34,
+ 34, 34, 34, 34, -1, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 436, 34,
+ 34, 34, 34, 485, -1, -1, -1, -1,
+ -1, -1, 34, -1, -1, 34, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 34, 34, 34, 34, -1, -1, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, -1, 436, 436,
+ 436, 436, 436, 436, 436, -1, -1, -1,
+ -1, 485, 485, -1, -1, -1, -1, -1,
+ -1, -1, 187, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 34, 34, 34, 34,
+ -1, -1, 34, 34, -1, 34, 34, 34,
+ -1, -1, -1, 34, 34, -1, 34, 34,
+ -1, -1, -1, -1, 34, -1, -1, -1,
+ 34, 34, 34, -1, 34, 34, -1, -1,
+ 34, -1, -1, -1, -1, -1, -1, -1,
+ 187, 34, 34, 34, 34, -1, -1, -1,
+ 34, 34, -1, -1, 34, 34, 34, 34,
+ 34, 34, 34, 34, -1, 34, 34, 34,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 436, -1,
+ 436, 436, 436, 436, 436, -1, 34, 34,
+ 34, 34, 34, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 34, -1,
+ -1, -1, -1, 34, -1, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, -1, 35, 35, 35,
+ 35, 35, 35, -1, 35, 35, 35, 35,
+ -1, 35, -1, 35, 35, 35, -1, 35,
+ 35, 35, 35, 35, 35, -1, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, -1,
+ 35, 35, 35, 35, -1, -1, -1, -1,
+ -1, -1, -1, 35, -1, -1, 35, -1,
+ -1, 35, -1, -1, -1, -1, -1, -1,
+ -1, 35, 35, 35, 35, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 115, 115,
+ 115, -1, -1, 115, 115, -1, -1, -1,
+ 115, -1, -1, -1, 115, 115, -1, 115,
+ 115, -1, -1, -1, -1, 115, 115, -1,
+ -1, 115, 115, 115, -1, 115, 115, -1,
+ -1, 115, -1, -1, -1, 35, 35, 35,
+ 35, -1, 34, 35, 35, -1, 35, 35,
+ 35, -1, -1, -1, 35, 35, -1, 35,
+ 35, -1, -1, -1, -1, 35, -1, -1,
+ -1, 35, 35, 35, -1, 35, 35, -1,
+ -1, 35, -1, -1, -1, -1, -1, -1,
+ -1, -1, 35, 35, 35, 35, -1, -1,
+ -1, 35, 35, -1, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, -1, 35, 35,
+ 35, 37, 37, 37, 37, 37, -1, 37,
+ 37, 37, 115, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 609, -1, -1, -1, -1, -1, 35,
+ 35, 35, 35, 35, -1, -1, -1, -1,
+ 37, 37, 37, 37, 37, -1, -1, 35,
+ 38, 38, 38, 38, 35, 38, -1, -1,
+ -1, -1, -1, -1, -1, -1, 38, 38,
+ 38, 38, 38, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 38, -1, -1, -1,
+ 38, 38, 38, 38, -1, -1, -1, 38,
+ 38, 38, -1, -1, -1, -1, 38, 38,
+ -1, 38, 38, 38, 38, -1, -1, -1,
+ -1, -1, -1, -1, 38, -1, -1, -1,
+ -1, 420, 420, 420, 420, -1, -1, -1,
+ -1, 420, 38, 38, 38, 38, -1, 420,
+ -1, 420, 420, 420, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 66, 66, 66, 66, -1, 66,
+ 420, -1, -1, -1, -1, -1, -1, -1,
+ 66, 66, 66, 66, 66, -1, -1, -1,
+ -1, -1, -1, 35, -1, -1, 66, -1,
+ -1, -1, 66, 66, 66, 66, -1, -1,
+ -1, 66, 66, 66, -1, -1, -1, -1,
+ 66, 66, -1, 66, 66, 66, 66, -1,
+ 536, -1, 536, 536, 536, 536, 66, 536,
+ -1, 38, 38, 38, 38, 38, -1, 38,
+ 38, 38, 536, 536, -1, -1, -1, -1,
+ 420, -1, 420, 420, 420, 420, 420, 420,
+ 536, -1, -1, -1, -1, -1, -1, -1,
+ -1, 536, -1, -1, -1, -1, -1, -1,
+ 38, 38, 38, 38, 38, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, -1, 39, 39, 39,
+ 39, 39, 39, -1, 39, 39, 39, 39,
+ -1, 39, -1, 39, 39, 39, -1, 39,
+ 39, 39, 39, 39, 39, -1, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, -1, 39, -1,
+ -1, -1, -1, 39, 39, 39, 39, 39,
+ -1, 39, 39, 39, -1, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 66, 66, 66, -1, -1, 39, -1,
+ -1, -1, -1, 536, 536, -1, -1, -1,
+ 536, -1, -1, -1, 536, 536, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 66, 66, 66, 66, 66, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 39, 39, 39,
+ 39, -1, -1, 39, 39, 39, 39, 39,
+ 39, -1, 536, -1, 39, 39, 39, 39,
+ 39, -1, -1, -1, -1, 39, -1, -1,
+ -1, 39, 39, 39, -1, 39, 39, -1,
+ -1, 39, -1, -1, -1, -1, -1, -1,
+ -1, -1, 39, 39, 39, 39, 39, -1,
+ 39, 39, 39, -1, -1, 39, 39, 39,
+ 39, 39, 39, 39, 39, -1, 39, 39,
+ 39, -1, -1, -1, 39, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 39,
+ 39, -1, -1, 39, -1, -1, -1, -1,
+ 39, -1, -1, -1, -1, 39, -1, 39,
+ 39, 39, 39, 39, -1, -1, 35, -1,
+ -1, -1, -1, -1, -1, -1, -1, 39,
+ -1, 39, -1, -1, 39, 39, -1, -1,
+ -1, 39, -1, 39, -1, 39, -1, -1,
+ -1, -1, -1, -1, 41, 41, 41, 41,
+ -1, 41, -1, -1, -1, -1, -1, -1,
+ -1, -1, 41, 41, 41, 41, 41, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 41, -1, -1, -1, 41, 41, 41, 41,
+ -1, -1, -1, 41, 41, 41, -1, -1,
+ -1, -1, 41, 41, -1, 41, 41, 41,
+ 41, -1, -1, -1, -1, -1, -1, -1,
+ 41, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 437, -1, -1, -1, 41, 41,
+ 41, 41, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 437, 437, 437, 437, 437, 437,
+ 437, 437, 437, 437, 437, 437, 437, 437,
+ 437, -1, 437, 437, 437, 437, 437, 437,
+ 437, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 39, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 420, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 41, 41, 41,
+ 41, 41, -1, 41, 41, 41, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 38, 38, 38, 38, 38,
+ -1, 38, 38, 38, 41, 41, 41, 41,
+ 41, -1, 420, -1, 420, 420, 420, 420,
+ 420, 420, 437, -1, 437, 437, 437, 437,
+ 437, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 38, 38, 38, 38, 38, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, -1, 42,
+ 42, 42, 42, 42, 42, -1, 42, 42,
+ 42, 42, -1, 42, -1, 42, 42, 42,
+ -1, 42, 42, 42, 42, 42, 42, -1,
+ 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, -1, 42, 42, 42, 42, -1, -1,
+ -1, -1, -1, -1, -1, 42, -1, -1,
+ 42, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 42, 42, 42, 42, -1,
+ -1, -1, -1, 66, 66, 66, -1, -1,
+ -1, -1, -1, -1, -1, -1, 536, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 66, 66, 66, 66,
+ 66, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 42,
+ 42, 42, 42, -1, -1, 42, 42, -1,
+ 42, 42, 42, -1, -1, -1, 42, 42,
+ -1, 42, 42, -1, -1, -1, -1, 42,
+ -1, -1, -1, 42, 42, 42, -1, 42,
+ 42, -1, -1, 42, 438, -1, -1, -1,
+ -1, -1, -1, -1, 42, 42, 42, 42,
+ -1, -1, -1, 42, 42, -1, -1, 42,
+ 42, 42, 42, 42, 42, 42, 42, -1,
+ 42, 42, 42, -1, 438, 438, 438, 438,
+ 438, 438, 438, 438, 438, 438, 438, 438,
+ 438, 438, 438, -1, 438, 438, 438, 438,
+ 438, 438, 438, -1, -1, -1, -1, -1,
+ -1, 42, 42, 42, 42, 42, -1, -1,
+ -1, 67, 67, 67, 67, -1, 67, -1,
+ -1, 42, -1, -1, -1, -1, 42, 67,
+ 67, 67, 67, 67, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 67, -1, -1,
+ -1, 67, 67, 67, 67, 499, -1, -1,
+ 67, 67, 67, -1, -1, -1, -1, 67,
+ 67, -1, 67, 67, 67, 67, -1, -1,
+ -1, -1, -1, -1, -1, 67, -1, -1,
+ -1, -1, -1, -1, -1, 499, 499, 499,
+ 499, 499, 499, 499, 499, 499, 499, 499,
+ 499, 499, 499, 499, -1, 499, 499, 499,
+ 499, 499, 499, 499, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 438, -1, 438, 438,
+ 438, 438, 438, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, -1, 43, 43, 43, 43,
+ 43, 43, -1, 43, 43, 43, 43, -1,
+ 43, -1, 43, 43, 43, 42, 43, 43,
+ 43, 43, 43, 43, -1, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, -1, 43,
+ 43, 43, 43, -1, -1, -1, -1, -1,
+ -1, -1, 43, -1, -1, 43, -1, -1,
+ 67, 67, 67, -1, -1, -1, -1, -1,
+ 43, 43, 43, 43, -1, 499, -1, 499,
+ 499, 499, 499, 499, -1, -1, -1, 41,
+ 41, 41, 41, 41, -1, 41, 41, 41,
+ -1, 67, 67, 67, 67, 67, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 41, 41,
+ 41, 41, 41, -1, 43, 43, 43, 43,
+ -1, -1, 43, 43, -1, 43, 43, 43,
+ -1, -1, -1, 43, 43, -1, 43, 43,
+ -1, -1, -1, -1, 43, -1, -1, -1,
+ 43, 43, 43, -1, 43, 43, -1, -1,
+ 43, 500, -1, -1, -1, -1, -1, -1,
+ -1, 43, 43, 43, 43, -1, -1, -1,
+ 43, 43, -1, -1, 43, 43, 43, 43,
+ 43, 43, 43, 43, -1, 43, 43, 43,
+ -1, 500, 500, 500, 500, 500, 500, 500,
+ 500, 500, 500, 500, 500, 500, 500, 500,
+ -1, 500, 500, 500, 500, 500, 500, 500,
+ -1, -1, -1, -1, -1, -1, 43, 43,
+ 43, 43, 43, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 43, -1,
+ -1, -1, -1, 43, -1, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, -1, 54, 54, 54,
+ 54, 54, 54, -1, 54, 54, 54, 54,
+ -1, 54, -1, 54, 54, 54, -1, 54,
+ 54, 54, 54, 54, 54, -1, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, -1,
+ 54, 54, 54, 54, -1, -1, -1, -1,
+ -1, -1, -1, 54, 503, -1, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 54, 54, 54, 54, -1, -1, 54,
+ 54, 500, -1, 500, 500, 500, 500, 500,
+ -1, -1, -1, -1, 503, 503, 503, 503,
+ 503, 503, 503, 503, 503, 503, 503, 503,
+ 503, 503, 503, -1, 503, 503, 503, 503,
+ 503, 503, 503, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 54, 54, 54,
+ 54, -1, 43, 54, 54, -1, 54, 54,
+ 54, -1, -1, -1, 54, 54, -1, 54,
+ 54, -1, -1, -1, -1, 54, -1, -1,
+ -1, 54, 54, 54, -1, 54, 54, -1,
+ -1, 54, -1, -1, -1, -1, -1, -1,
+ -1, -1, 54, 54, 54, 54, -1, -1,
+ -1, 54, 54, -1, -1, 54, 54, 54,
+ 54, 54, 54, 54, 54, -1, 54, 54,
+ 54, -1, -1, -1, -1, -1, 505, 505,
+ 505, 505, 505, 505, 505, 505, 505, 505,
+ -1, -1, -1, -1, 505, -1, 505, 505,
+ 505, 505, 505, 505, 505, -1, -1, 54,
+ 54, 54, 54, 54, 503, -1, 503, 503,
+ 503, 503, 503, -1, -1, -1, -1, 54,
+ -1, -1, -1, -1, 54, -1, 60, 60,
+ 60, 60, 60, 60, 60, 60, 60, 60,
+ 60, 60, 60, 60, 60, 60, 60, 60,
+ 60, 60, 60, 60, 60, -1, 60, 60,
+ 60, 60, 60, 60, -1, 60, 60, 60,
+ 60, -1, 60, -1, 60, 60, 60, -1,
+ 60, 60, 60, 60, 60, 60, -1, 60,
+ 60, 60, 60, 60, 60, 60, 60, 60,
+ 60, 60, 60, 60, 60, 60, -1, -1,
+ -1, -1, -1, -1, 60, 60, 60, 60,
+ -1, -1, -1, 60, 60, -1, 60, 60,
+ 60, 60, 60, 60, 60, 60, -1, -1,
+ 60, 60, 67, 67, 67, -1, 505, 60,
+ 505, 505, 505, 505, 505, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 67, 67, 67, 67, 67,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 60, 60,
+ 60, 60, -1, 54, 60, 60, 60, 60,
+ 60, 60, -1, -1, -1, 60, 60, 60,
+ 60, 60, -1, -1, -1, -1, 60, -1,
+ -1, -1, 60, 60, 60, -1, 60, 60,
+ -1, -1, 60, -1, -1, -1, -1, -1,
+ -1, -1, -1, 60, 60, 60, 60, 60,
+ -1, 60, 60, 60, -1, -1, 60, 60,
+ 60, 60, 60, 60, 60, 60, -1, 60,
+ 60, 60, -1, -1, -1, 60, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 60, 60, -1, -1, 60, -1, -1, -1,
+ -1, 60, -1, -1, -1, -1, 60, -1,
+ 60, 60, 60, 60, 60, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 60, -1, 60, -1, -1, 60, 60, -1,
+ -1, -1, 60, -1, 60, -1, 60, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, -1, 61,
+ 61, 61, 61, 61, 61, -1, 61, 61,
+ 61, 61, -1, 61, -1, 61, 61, 61,
+ -1, 61, 61, 61, 61, 61, 61, -1,
+ 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, -1,
+ -1, -1, -1, -1, -1, 61, 61, 61,
+ 61, -1, -1, -1, 61, 61, -1, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, -1, -1, -1, -1, -1,
+ 61, -1, -1, -1, -1, -1, 506, 506,
+ 506, 506, 506, 506, 506, 506, 506, 506,
+ -1, -1, -1, -1, 506, -1, 506, 506,
+ 506, 506, 506, 506, 506, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 60, -1, -1, 61,
+ 61, 61, 61, -1, -1, 61, 61, 61,
+ 61, 61, 61, -1, -1, -1, 61, 61,
+ 61, 61, 61, -1, -1, -1, -1, 61,
+ -1, -1, -1, 61, 61, 61, -1, 61,
+ 61, -1, -1, 61, -1, -1, -1, -1,
+ -1, -1, -1, -1, 61, 61, 61, 61,
+ 61, -1, 61, 61, 61, -1, -1, 61,
+ 61, 61, 61, 61, 61, 61, 61, -1,
+ 61, 61, 61, -1, -1, -1, 61, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 61, 61, -1, -1, 61, -1, -1,
+ -1, -1, 61, -1, -1, -1, -1, 61,
+ -1, 61, 61, 61, 61, 61, 506, -1,
+ 506, 506, 506, 506, 506, -1, -1, -1,
+ -1, 61, -1, 61, -1, -1, 61, 61,
+ -1, -1, -1, 61, -1, 61, -1, 61,
+ 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, -1,
+ 62, 62, 62, 62, 62, 62, -1, 62,
+ 62, 62, 62, -1, 62, -1, 62, 62,
+ 62, -1, 62, 62, 62, 62, 62, 62,
+ -1, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62,
+ -1, 62, -1, -1, -1, -1, 62, 62,
+ 62, 62, 62, -1, -1, 62, 62, -1,
+ 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, -1, -1, -1, -1,
+ 505, 62, -1, -1, -1, -1, -1, 507,
+ 507, 507, 507, 507, 507, 507, 507, 507,
+ 507, -1, -1, -1, -1, 507, -1, 507,
+ 507, 507, 507, 507, 507, 507, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 61, -1, -1,
+ 62, 62, 62, 62, -1, -1, 62, 62,
+ 62, 62, 62, 62, -1, -1, -1, 62,
+ 62, 62, 62, 62, -1, -1, -1, -1,
+ 62, -1, -1, -1, 62, 62, 62, -1,
+ 62, 62, -1, -1, 62, -1, -1, -1,
+ -1, -1, -1, -1, -1, 62, 62, 62,
+ 62, 62, -1, 62, 62, 62, -1, -1,
+ 62, 62, 62, 62, 62, 62, 62, 62,
+ -1, 62, 62, 62, -1, -1, -1, 62,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 62, 62, -1, -1, 62, -1,
+ -1, -1, -1, 62, -1, -1, -1, -1,
+ 62, -1, 62, 62, 62, 62, 62, 507,
+ -1, 507, 507, 507, 507, 507, -1, -1,
+ -1, -1, 62, -1, 62, -1, -1, 62,
+ 62, -1, -1, -1, 62, -1, 62, -1,
+ 62, 63, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63,
+ -1, 63, 63, 63, 63, 63, 63, -1,
+ 63, 63, 63, 63, -1, 63, -1, 63,
+ 63, 63, -1, 63, 63, 63, 63, 63,
+ 63, -1, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63,
+ 63, -1, 63, -1, -1, -1, -1, 63,
+ 63, 63, 63, 63, 508, -1, 63, 63,
+ -1, 63, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 63, -1, -1, -1,
+ -1, -1, 63, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 508, 508, 508, 508,
+ 508, 508, 508, 508, 508, 508, 508, 508,
+ 508, 508, 508, -1, 508, 508, 508, 508,
+ 508, 508, 508, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 62, -1,
+ -1, 63, 63, 63, 63, -1, -1, 63,
+ 63, 63, 63, 63, 63, -1, -1, -1,
+ 63, 63, 63, 63, 63, -1, -1, -1,
+ -1, 63, -1, -1, -1, 63, 63, 63,
+ -1, 63, 63, -1, -1, 63, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, 63,
+ 63, 63, 63, -1, 63, 63, 63, -1,
+ -1, 63, 63, 63, 63, 63, 63, 63,
+ 63, -1, 63, 63, 63, -1, -1, -1,
+ 63, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 63, 63, -1, -1, 63,
+ -1, -1, -1, -1, 63, -1, -1, -1,
+ -1, 63, -1, 63, 63, 63, 63, 63,
+ 506, -1, -1, -1, 508, -1, 508, 508,
+ 508, 508, 508, 63, -1, 63, -1, -1,
+ 63, 63, -1, -1, -1, 63, -1, 63,
+ -1, 63, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, -1, 68, 68, 68, 68, 68, 68,
+ -1, 68, 68, 68, 68, -1, 68, -1,
+ 68, 68, 68, -1, 68, 68, 68, 68,
+ 68, 68, -1, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, -1, 68, -1, -1, -1, -1,
+ 68, 68, 68, 68, 68, 509, -1, 68,
+ 68, -1, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, -1, -1,
+ -1, -1, -1, 68, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 509, 509, 509,
+ 509, 509, 509, 509, 509, 509, 509, 509,
+ 509, 509, 509, 509, -1, 509, 509, 509,
+ 509, 509, 509, 509, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 63,
+ -1, -1, 68, 68, 68, 68, -1, -1,
+ 68, 68, 68, 68, 68, 68, -1, -1,
+ -1, 68, 68, 68, 68, 68, -1, -1,
+ -1, -1, 68, -1, -1, -1, 68, 68,
+ 68, -1, 68, 68, -1, -1, 68, -1,
+ -1, -1, -1, -1, -1, -1, -1, 68,
+ 68, 68, 68, 68, -1, 68, 68, 68,
+ -1, -1, 68, 68, 68, 68, 68, 68,
+ 68, 68, -1, 68, 68, 68, -1, -1,
+ -1, 68, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 68, 68, -1, -1,
+ 68, -1, -1, -1, -1, 68, -1, -1,
+ -1, -1, 68, -1, 68, 68, 68, 68,
+ 68, 507, -1, -1, -1, 509, -1, 509,
+ 509, 509, 509, 509, 68, -1, 68, -1,
+ -1, 68, 68, -1, -1, -1, 68, -1,
+ 68, -1, 68, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 69, 69, 69,
+ 69, 69, -1, 69, 69, 69, 69, 69,
+ 69, -1, 69, 69, 69, 69, -1, 69,
+ -1, 69, 69, 69, -1, 69, 69, 69,
+ 69, 69, 69, -1, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 69, 69, 69,
+ 69, 69, 69, -1, 69, -1, -1, -1,
+ -1, 69, 69, 69, 69, 69, 510, -1,
+ 69, 69, -1, 69, 69, 69, 69, 69,
+ 69, 69, 69, 69, 69, 69, 69, -1,
+ -1, -1, -1, -1, 69, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 510, 510,
+ 510, 510, 510, 510, 510, 510, 510, 510,
+ 510, 510, 510, 510, 510, -1, 510, 510,
+ 510, 510, 510, 510, 510, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 68, -1, -1, 69, 69, 69, 69, -1,
+ -1, 69, 69, 69, 69, 69, 69, -1,
+ -1, -1, 69, 69, 69, 69, 69, -1,
+ -1, -1, -1, 69, -1, -1, -1, 69,
+ 69, 69, -1, 69, 69, -1, -1, 69,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 69, 69, 69, 69, 69, -1, 69, 69,
+ 69, -1, -1, 69, 69, 69, 69, 69,
+ 69, 69, 69, -1, 69, 69, 69, -1,
+ -1, -1, 69, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 69, 69, -1,
+ -1, 69, -1, -1, -1, -1, 69, -1,
+ -1, -1, -1, 69, -1, 69, 69, 69,
+ 69, 69, -1, -1, -1, -1, 510, -1,
+ 510, 510, 510, 510, 510, 69, -1, 69,
+ -1, -1, 69, 69, -1, -1, -1, 69,
+ -1, 69, -1, 69, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, -1, 70, 70, 70, 70,
+ 70, 70, -1, 70, 70, 70, 70, -1,
+ 70, -1, 70, 70, 70, -1, 70, 70,
+ 70, 70, 70, 70, -1, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, -1, 70, -1, -1,
+ -1, -1, 70, 70, 70, 70, 70, 511,
+ -1, 70, 70, -1, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70,
+ -1, -1, -1, -1, -1, 70, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 511,
+ 511, 511, 511, 511, 511, 511, 511, 511,
+ 511, 511, 511, 511, 511, 511, -1, 511,
+ 511, 511, 511, 511, 511, 511, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 69, -1, -1, 70, 70, 70, 70,
+ -1, -1, 70, 70, 70, 70, 70, 70,
+ -1, -1, -1, 70, 70, 70, 70, 70,
+ -1, -1, -1, -1, 70, -1, -1, -1,
+ 70, 70, 70, -1, 70, 70, -1, -1,
+ 70, -1, -1, -1, -1, -1, -1, -1,
+ -1, 70, 70, 70, 70, 70, -1, 70,
+ 70, 70, -1, -1, 70, 70, 70, 70,
+ 70, 70, 70, 70, -1, 70, 70, 70,
+ -1, -1, -1, 70, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 70, 70,
+ -1, -1, 70, -1, -1, -1, -1, 70,
+ -1, -1, -1, -1, 70, -1, 70, 70,
+ 70, 70, 70, -1, -1, -1, -1, 511,
+ -1, 511, 511, 511, 511, 511, 70, -1,
+ 70, -1, -1, 70, 70, -1, -1, -1,
+ 70, -1, 70, -1, 70, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, -1, 71, 71, 71,
+ 71, 71, 71, -1, 71, 71, 71, 71,
+ -1, 71, -1, 71, 71, 71, -1, 71,
+ 71, 71, 71, 71, 71, -1, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, -1, 71, -1,
+ -1, -1, -1, 71, 71, 71, 71, 71,
+ 514, -1, 71, 71, -1, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, -1, -1, -1, -1, -1, 71, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 514, 514, 514, 514, 514, 514, 514, 514,
+ 514, 514, 514, 514, 514, 514, 514, -1,
+ 514, 514, 514, 514, 514, 514, 514, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 70, -1, -1, 71, 71, 71,
+ 71, -1, -1, 71, 71, 71, 71, 71,
+ 71, -1, -1, -1, 71, 71, 71, 71,
+ 71, -1, -1, -1, -1, 71, -1, -1,
+ -1, 71, 71, 71, -1, 71, 71, -1,
+ -1, 71, -1, -1, -1, -1, -1, -1,
+ -1, -1, 71, 71, 71, 71, 71, -1,
+ 71, 71, 71, -1, -1, 71, 71, 71,
+ 71, 71, 71, 71, 71, -1, 71, 71,
+ 71, -1, -1, -1, 71, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 71,
+ 71, -1, -1, 71, -1, -1, -1, -1,
+ 71, -1, -1, -1, -1, 71, -1, 71,
+ 71, 71, 71, 71, -1, -1, -1, -1,
+ 514, -1, 514, 514, 514, 514, 514, 71,
+ -1, 71, -1, -1, 71, 71, -1, -1,
+ -1, 71, -1, 71, -1, 71, 72, 72,
+ 72, 72, 72, 72, 72, 72, 72, 72,
+ 72, 72, 72, 72, 72, 72, 72, 72,
+ 72, 72, 72, 72, 72, -1, 72, 72,
+ 72, 72, 72, 72, -1, 72, 72, 72,
+ 72, -1, 72, -1, 72, 72, 72, -1,
+ 72, 72, 72, 72, 72, 72, -1, 72,
+ 72, 72, 72, 72, 72, 72, 72, 72,
+ 72, 72, 72, 72, 72, 72, -1, 72,
+ -1, -1, -1, -1, 72, 72, 72, 72,
+ 72, 515, -1, 72, 72, -1, 72, 72,
+ 72, 72, 72, 72, 72, 72, 72, 72,
+ 72, 72, -1, -1, -1, -1, -1, 72,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 515, 515, 515, 515, 515, 515, 515,
+ 515, 515, 515, 515, 515, 515, 515, 515,
+ -1, 515, 515, 515, 515, 515, 515, 515,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 71, -1, -1, 72, 72,
+ 72, 72, -1, -1, 72, 72, 72, 72,
+ 72, 72, -1, -1, -1, 72, 72, 72,
+ 72, 72, -1, -1, -1, -1, 72, -1,
+ -1, -1, 72, 72, 72, -1, 72, 72,
+ -1, -1, 72, -1, -1, -1, -1, -1,
+ -1, -1, -1, 72, 72, 72, 72, 72,
+ -1, 72, 72, 72, -1, -1, 72, 72,
+ 72, 72, 72, 72, 72, 72, -1, 72,
+ 72, 72, -1, -1, -1, 72, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 72, 72, -1, -1, 72, -1, -1, -1,
+ -1, 72, -1, -1, -1, -1, 72, -1,
+ 72, 72, 72, 72, 72, -1, -1, -1,
+ -1, 515, -1, 515, 515, 515, 515, 515,
+ 72, -1, 72, -1, -1, 72, 72, -1,
+ -1, -1, 72, -1, 72, -1, 72, 73,
+ 73, 73, 73, -1, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, 73, 73, 73,
+ 73, 73, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 73, -1, -1, -1, 73,
+ 73, 73, 73, -1, -1, -1, 73, 73,
+ 73, -1, -1, -1, -1, 73, 73, -1,
+ 73, 73, 73, 73, -1, -1, -1, -1,
+ -1, -1, -1, 73, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 73, 73, 73, 73, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 79, 79, 79, 79,
+ 79, 79, 79, 79, 79, 79, 79, 79,
+ 79, 79, 79, 79, 79, 79, 79, 79,
+ 79, 79, 79, -1, 79, 79, 79, 79,
+ 79, 79, -1, 79, 79, 79, 79, -1,
+ 79, -1, 79, 79, 79, -1, 79, 79,
+ 79, 79, 79, 79, 72, 79, 79, 79,
+ 79, 79, 79, 79, 79, 79, 79, 79,
+ 79, 79, 79, 79, -1, 79, -1, -1,
+ -1, -1, 79, 79, 79, 79, 79, -1,
+ -1, 79, 79, -1, 79, 79, 79, 79,
+ 79, 79, 79, 79, 79, 79, 79, 79,
+ -1, -1, -1, -1, -1, 79, -1, -1,
+ 73, 73, 73, 73, 73, -1, 73, 73,
+ 73, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 73,
+ 73, 73, 73, 73, 79, 79, 79, 79,
+ -1, -1, 79, 79, 79, 79, 79, 79,
+ -1, -1, -1, 79, 79, 79, 79, 79,
+ -1, -1, -1, -1, 79, -1, -1, -1,
+ 79, 79, 79, -1, 79, 79, -1, -1,
+ 79, -1, -1, -1, -1, -1, -1, -1,
+ -1, 79, 79, 79, 79, 79, -1, 79,
+ 79, 79, -1, -1, 79, 79, 79, 79,
+ 79, 79, 79, 79, -1, 79, 79, 79,
+ -1, -1, -1, 79, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 79, 79,
+ -1, -1, 79, -1, -1, -1, -1, 79,
+ -1, -1, -1, -1, 79, -1, 79, 79,
+ 79, 79, 79, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 79, -1,
+ 79, -1, -1, 79, 79, -1, -1, -1,
+ 79, -1, 79, -1, 79, 84, 84, 84,
+ 84, -1, 84, -1, -1, -1, -1, -1,
+ -1, -1, -1, 84, 84, 84, 84, 84,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 84, 516, -1, -1, 84, 84, 84,
+ 84, -1, -1, -1, 84, 84, 84, -1,
+ -1, -1, -1, 84, 84, -1, 84, 84,
+ 84, 84, -1, -1, -1, -1, -1, -1,
+ -1, 84, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, 516, 516, 516, 516, 516, 516, 516,
+ 516, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, -1, 86, 86, 86, 86, 86, 86,
+ -1, 86, 86, 86, 86, -1, 86, -1,
+ 86, 86, 86, -1, 86, 86, 86, 86,
+ 86, 86, 79, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, -1, 86, -1, -1, -1, -1,
+ 86, 86, 86, 86, 86, -1, -1, 86,
+ 86, -1, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, -1, -1,
+ -1, -1, -1, 86, -1, -1, -1, -1,
+ -1, -1, -1, -1, 84, 84, 84, -1,
+ -1, -1, 516, -1, 516, 516, 516, 516,
+ 516, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 84, 84, 84,
+ 84, 84, 86, 86, 86, 86, -1, -1,
+ 86, 86, 86, 86, 86, 86, -1, -1,
+ -1, 86, 86, 86, 86, 86, -1, -1,
+ -1, -1, 86, -1, -1, -1, 86, 86,
+ 86, -1, 86, 86, -1, -1, 86, -1,
+ -1, -1, -1, -1, -1, -1, -1, 86,
+ 86, 86, 86, 86, -1, 86, 86, 86,
+ -1, -1, 86, 86, 86, 86, 86, 86,
+ 86, 86, -1, 86, 86, 86, -1, -1,
+ -1, 86, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 86, 86, -1, -1,
+ 86, -1, -1, -1, -1, 86, -1, -1,
+ -1, -1, 86, -1, 86, 86, 86, 86,
+ 86, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 517, 86, -1, 86, -1,
+ -1, 86, 86, -1, -1, -1, 86, -1,
+ 86, -1, 86, -1, -1, -1, -1, -1,
+ -1, -1, 73, 73, 73, 73, 73, -1,
+ 73, 73, 73, 517, 517, 517, 517, 517,
+ 517, 517, 517, 517, 517, 517, 517, 517,
+ 517, 517, 517, 517, 517, 517, 517, 517,
+ 517, 517, -1, -1, -1, -1, -1, -1,
+ -1, 73, 73, 73, 73, 73, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93,
+ -1, 93, 93, 93, 93, 93, 93, -1,
+ 93, 93, 93, 93, -1, 93, -1, 93,
+ 93, 93, -1, 93, 93, 93, 93, 93,
+ 93, -1, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, -1, 93, -1, -1, -1, -1, 93,
+ 93, 93, 93, 93, 561, -1, 93, 93,
+ 86, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 93, 93, -1, -1, -1,
+ -1, -1, 93, 517, -1, 517, 517, 517,
+ 517, 517, -1, -1, 561, 561, 561, 561,
+ 561, 561, 561, 561, 561, 561, 561, 561,
+ 561, 561, 561, -1, 561, 561, 561, 561,
+ 561, 561, 561, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 93, 93, 93, 93, -1, -1, 93,
+ 93, 93, 93, 93, 93, -1, -1, -1,
+ 93, 93, 93, 93, 93, -1, -1, -1,
+ -1, 93, -1, -1, -1, 93, 93, 93,
+ -1, 93, 93, -1, -1, 93, -1, -1,
+ -1, -1, -1, -1, -1, -1, 93, 93,
+ 93, 93, 93, -1, 93, 93, 93, -1,
+ -1, 93, 93, 93, 93, 93, 93, 93,
+ 93, -1, 93, 93, 93, -1, -1, -1,
+ 93, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 93, 93, -1, -1, 93,
+ -1, -1, -1, -1, 93, -1, -1, -1,
+ -1, 93, -1, 93, 93, 93, 93, 93,
+ -1, -1, -1, -1, 561, -1, 561, 561,
+ 561, 561, 561, 93, -1, 93, -1, -1,
+ 93, 93, -1, -1, -1, 93, -1, 93,
+ -1, 93, -1, -1, -1, -1, -1, -1,
+ -1, -1, 97, 97, 97, 97, -1, 97,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 97, 97, 97, 97, 97, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 97, -1,
+ -1, -1, 97, 97, 97, 97, 84, 84,
+ 84, 97, 97, 97, -1, -1, -1, -1,
+ 97, 97, -1, 97, 97, 97, 97, 97,
+ -1, -1, -1, -1, -1, -1, 97, -1,
+ -1, -1, -1, -1, -1, -1, -1, 84,
+ 84, 84, 84, 84, 97, 97, 97, 97,
+ 105, 105, 105, 105, -1, 105, -1, -1,
+ -1, -1, -1, -1, -1, -1, 105, 105,
+ 105, 105, 105, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 105, -1, -1, -1,
+ 105, 105, 105, 105, -1, -1, -1, 105,
+ 105, 105, -1, -1, -1, -1, 105, 105,
+ -1, 105, 105, 105, 105, -1, -1, 93,
+ -1, -1, -1, -1, 105, 105, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 105, 105, 105, 105, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 97, 97, 97, 97, 97,
+ -1, 97, 97, 97, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 97, 97, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 97, -1, 97, 97, 97, 97, 97, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 105,
+ 97, -1, -1, -1, -1, -1, -1, -1,
+ -1, 105, 105, 105, 105, 105, -1, 105,
+ 105, 105, -1, -1, -1, -1, -1, -1,
+ -1, 106, 106, 106, 106, -1, 106, -1,
+ -1, -1, -1, -1, -1, -1, -1, 106,
+ 106, 106, 106, 106, -1, -1, -1, -1,
+ 105, 105, 105, 105, 105, 106, -1, -1,
+ -1, 106, 106, 106, 106, -1, -1, -1,
+ 106, 106, 106, -1, -1, -1, -1, 106,
+ 106, -1, 106, 106, 106, 106, -1, 107,
+ 107, 107, 107, -1, 107, 106, 106, -1,
+ -1, -1, -1, -1, -1, 107, 107, 107,
+ 107, 107, -1, 106, 106, 106, 106, -1,
+ -1, -1, -1, 107, -1, -1, -1, 107,
+ 107, 107, 107, -1, -1, -1, 107, 107,
+ 107, -1, -1, -1, -1, 107, 107, -1,
+ 107, 107, 107, 107, -1, -1, -1, -1,
+ -1, -1, -1, 107, 107, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 107, 107, 107, 107, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 106, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 106, 106, 106, 106, 106, -1,
+ 106, 106, 106, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 93, 93, -1,
+ -1, 108, 108, 108, 108, -1, 108, -1,
+ -1, 106, 106, 106, 106, 106, 107, 108,
+ 108, 108, 108, 108, -1, -1, -1, -1,
+ 107, 107, 107, 107, 107, 108, 107, 107,
+ 107, 108, 108, 108, 108, -1, -1, -1,
+ 108, 108, 108, -1, -1, -1, -1, 108,
+ 108, -1, 108, 108, 108, 108, -1, -1,
+ -1, -1, -1, -1, -1, 108, 108, 107,
+ 107, 107, 107, 107, -1, -1, -1, -1,
+ -1, -1, -1, 108, 108, 108, 108, -1,
+ 117, 117, 117, 117, 117, 117, 117, 117,
+ -1, 117, -1, 117, 117, 117, 117, -1,
+ -1, -1, 117, 117, 117, 117, 117, -1,
+ -1, -1, 117, 117, 117, -1, -1, -1,
+ 117, -1, -1, -1, 117, 117, 117, 117,
+ -1, -1, -1, 117, 117, 117, -1, -1,
+ -1, -1, 117, 117, -1, 117, 117, 117,
+ 117, -1, -1, -1, -1, -1, -1, -1,
+ 117, -1, 117, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 117, 117,
+ 117, 117, -1, -1, 117, 117, -1, -1,
+ -1, -1, -1, 215, 215, 215, 215, -1,
+ 215, -1, -1, -1, -1, -1, -1, -1,
+ 108, 215, 215, 215, 215, 215, -1, -1,
+ -1, -1, 108, 108, 108, 108, 108, 215,
+ 108, 108, 108, 215, 215, 215, 215, -1,
+ -1, -1, 215, 215, 215, -1, -1, -1,
+ -1, 215, 215, -1, 215, 215, 215, 215,
+ 215, -1, -1, -1, -1, -1, -1, 215,
+ -1, 108, 108, 108, 108, 108, -1, -1,
+ -1, -1, -1, -1, -1, 215, 215, 215,
+ 215, -1, -1, -1, 97, 97, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 117,
+ -1, -1, 97, -1, -1, 117, -1, -1,
+ -1, -1, 117, 117, 117, 117, 117, 117,
+ 117, 117, -1, 117, 117, 117, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 105, 97, -1, -1, -1, -1, -1,
+ -1, -1, -1, 105, 105, 105, 105, 105,
+ -1, 105, 105, 105, 117, 117, 117, 117,
+ 117, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 105, 105, 105, 105, 105, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 215, 215, 215, 215,
+ 215, -1, 215, 215, 215, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 215, 215, -1, -1, -1,
+ -1, -1, -1, -1, 215, -1, -1, -1,
+ -1, -1, -1, 215, 215, 215, 215, 215,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 215,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 147, 147, 147, 147,
+ -1, 147, -1, -1, -1, -1, -1, -1,
+ -1, -1, 147, 147, 147, 147, 147, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 147, -1, -1, -1, 147, 147, 147, 147,
+ -1, -1, -1, 147, 147, 147, -1, -1,
+ -1, -1, 147, 147, -1, 147, 147, 147,
+ 147, -1, 106, -1, -1, -1, -1, -1,
+ 147, -1, -1, -1, 106, 106, 106, 106,
+ 106, -1, 106, 106, 106, -1, 147, 147,
+ 147, 147, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 147, -1, -1, -1, -1,
+ -1, -1, -1, 593, -1, -1, -1, -1,
+ -1, -1, -1, 106, 106, 106, 106, 106,
+ 107, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 107, 107, 107, 107, 107, -1,
+ 107, 107, 107, 593, 593, 593, 593, 593,
+ 593, 593, 593, 593, 593, 593, 593, 593,
+ 593, 593, -1, 593, 593, 593, 593, 593,
+ 593, 593, -1, -1, -1, -1, -1, -1,
+ -1, 107, 107, 107, 107, 107, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 147, 147, 147,
+ 147, 147, -1, 147, 147, 147, -1, -1,
+ -1, 594, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 147, 147, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 147, -1, 147, 147, 147, 147,
+ 147, 594, 594, 594, 594, 594, 594, 594,
+ 594, 594, 594, 594, 594, 594, 594, 594,
+ -1, 594, 594, 594, 594, 594, 594, 594,
+ -1, -1, 147, -1, -1, -1, -1, -1,
+ -1, -1, -1, 593, -1, 593, 593, 593,
+ 593, 593, 108, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 108, 108, 108, 108,
+ 108, -1, 108, 108, 108, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 108, 108, 108, 108, 108,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 117, -1, -1, -1, -1, -1, 117,
+ -1, -1, -1, -1, 117, 117, 117, 117,
+ 117, 117, 117, 117, -1, 117, 117, 117,
+ -1, 594, -1, 594, 594, 594, 594, 594,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 117, 117,
+ 117, 117, 117, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, -1, 118, 118, 118, 118, 118,
+ 118, -1, 118, 118, 118, 118, -1, 118,
+ -1, 118, 118, 118, -1, 118, 118, 118,
+ 118, 118, 118, -1, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, -1, 118, 215, 215, -1,
+ -1, 118, 118, 118, 118, 118, 215, -1,
+ 118, 118, -1, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, -1,
+ -1, -1, -1, -1, 118, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 215, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 118, 118, 118, 118, -1,
+ -1, 118, 118, 118, 118, 118, 118, -1,
+ -1, -1, 118, 118, 118, 118, 118, -1,
+ -1, -1, -1, 118, -1, -1, -1, 118,
+ 118, 118, -1, 118, 118, -1, -1, 118,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 118, 118, 118, 118, 118, -1, 118, 118,
+ 118, -1, -1, 118, 118, 118, 118, 118,
+ 118, 118, 118, -1, 118, 118, 118, -1,
+ -1, -1, 118, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 118, 118, -1,
+ -1, 118, -1, -1, -1, -1, 118, -1,
+ -1, -1, -1, 118, -1, 118, 118, 118,
+ 118, 118, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 118, -1, 118,
+ -1, -1, 118, 118, -1, -1, -1, 118,
+ -1, 118, -1, 118, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, -1, 119, 119, 119, 119,
+ 119, 119, -1, 119, 119, 119, 119, -1,
+ 119, -1, 119, 119, 119, -1, 119, 119,
+ 119, 119, 119, 119, -1, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 613, 119,
+ 119, 119, 119, -1, -1, -1, -1, -1,
+ -1, -1, 119, -1, -1, 119, 147, 147,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 119, 119, 119, 119, 147, -1, 613, 613,
+ 613, 613, 613, 613, 613, 613, 613, 613,
+ 613, 613, 613, 613, 613, -1, 613, 613,
+ 613, 613, 613, 613, 613, -1, -1, -1,
+ -1, -1, -1, -1, 147, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 118, -1, -1, 119, 119, 119, 119,
+ -1, -1, 119, 119, -1, 119, 119, 119,
+ -1, -1, -1, 119, 119, -1, 119, 119,
+ -1, -1, -1, -1, 119, -1, -1, -1,
+ 119, 119, 119, -1, 119, 119, -1, -1,
+ 119, -1, -1, -1, -1, -1, -1, -1,
+ -1, 119, 119, 119, 119, -1, -1, -1,
+ 119, 119, -1, -1, 119, 119, 119, 119,
+ 119, 119, 119, 119, -1, 119, 119, 119,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 613, -1,
+ 613, 613, 613, 613, 613, -1, 119, 119,
+ 119, 119, 119, -1, 120, 120, 120, 120,
+ 120, 120, 120, 120, -1, 120, 119, 120,
+ 120, 120, 120, 119, -1, -1, 120, 120,
+ 120, 120, 120, -1, -1, -1, 120, 120,
+ 120, -1, -1, -1, 120, -1, -1, -1,
+ 120, 120, 120, 120, -1, -1, -1, 120,
+ 120, 120, -1, -1, -1, -1, 120, 120,
+ -1, 120, 120, 120, 120, -1, -1, -1,
+ -1, -1, -1, -1, 120, -1, 120, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 120, 120, 120, 120, -1, -1,
+ 120, 120, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 127, 127, 127, 127, 127, 127, 127, 127,
+ 127, 127, 127, 127, 127, 127, -1, 127,
+ 127, 127, 127, 127, 127, -1, -1, -1,
+ 127, 127, 127, 127, 127, 127, -1, 127,
+ 127, 127, 127, -1, 127, -1, 127, 127,
+ 127, -1, 127, 127, 127, 127, 127, 127,
+ -1, 127, 127, 127, 127, 127, 127, 127,
+ 127, 127, -1, 127, 127, 127, 127, -1,
+ -1, -1, 119, -1, -1, -1, 127, -1,
+ -1, -1, -1, -1, 127, -1, -1, -1,
+ -1, -1, -1, 120, 127, 127, 127, 127,
+ -1, 120, -1, -1, -1, -1, 120, 120,
+ 120, 120, 120, 120, 120, 120, -1, 120,
+ 120, 120, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 120, 120, 120, 120, 120, -1, -1, -1,
+ 127, 127, 127, 127, -1, -1, 127, 127,
+ 127, 127, 127, 127, -1, -1, -1, 127,
+ 127, 127, 127, 127, -1, -1, -1, -1,
+ 127, -1, -1, -1, 127, 127, 127, -1,
+ 127, 127, -1, -1, 127, -1, -1, -1,
+ -1, -1, -1, -1, -1, 127, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 127,
+ 127, 127, 127, 127, 127, 127, 127, 127,
+ -1, 127, 127, 127, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 127, 127, 127, 127, 127, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 127, -1, 127, -1, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, -1, 128, 128,
+ 128, 128, 128, 128, -1, 128, 128, 128,
+ 128, -1, 128, -1, 128, 128, 128, -1,
+ 128, 128, 128, 128, 128, 128, -1, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128,
+ -1, 128, 128, 128, 128, -1, -1, -1,
+ -1, -1, -1, -1, 128, -1, -1, 128,
+ -1, 260, 260, 260, 260, 260, 260, -1,
+ -1, -1, 128, 128, 128, 128, -1, -1,
+ 128, 128, -1, -1, -1, -1, -1, -1,
+ -1, 260, 260, 260, 260, 260, 260, -1,
+ 260, -1, -1, -1, -1, -1, -1, -1,
+ 260, -1, -1, -1, -1, -1, -1, 260,
+ 260, -1, -1, -1, -1, 260, 260, 260,
+ -1, 260, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 128, 128,
+ 128, 128, -1, -1, 128, 128, 127, 128,
+ 128, 128, -1, -1, -1, 128, 128, -1,
+ 128, 128, -1, -1, -1, -1, 128, -1,
+ -1, -1, 128, 128, 128, -1, 128, 128,
+ -1, -1, 128, -1, -1, -1, -1, -1,
+ -1, -1, -1, 128, 128, 128, 128, -1,
+ -1, -1, 128, 128, -1, -1, 128, 128,
+ 128, 128, 128, 128, 128, 128, -1, 128,
+ 128, 128, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 260, 260, -1, -1, 260,
+ -1, 260, 260, -1, 260, -1, -1, -1,
+ 260, 260, 260, 260, 260, -1, -1, -1,
+ 128, 128, 128, 128, 128, 260, 260, 260,
+ -1, 260, 260, -1, -1, 260, -1, -1,
+ 128, -1, -1, -1, -1, 128, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 260, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 260, 260, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 260, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 120, -1, -1,
+ -1, -1, -1, 120, -1, -1, -1, -1,
+ 120, 120, 120, 120, 120, 120, 120, 120,
+ -1, 120, 120, 120, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 128, -1, -1, -1,
+ -1, -1, 120, 120, 120, 120, 120, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 130, 130, 130, 130, 130, 130, 130,
+ 130, 130, 130, 130, 130, 130, 130, 130,
+ 130, 130, 130, 130, 130, 130, 130, 130,
+ -1, 130, 130, 130, 130, 130, 130, -1,
+ 130, 130, 130, 130, -1, 130, -1, 130,
+ 130, 130, -1, 130, 130, 130, 130, 130,
+ 130, 127, 130, 130, 130, 130, 130, 130,
+ 130, 130, 130, 130, 130, 130, 130, 130,
+ 130, -1, 130, -1, -1, -1, -1, 130,
+ 130, 130, 130, 130, -1, -1, 130, 130,
+ -1, 130, 130, 130, 130, 130, 130, 130,
+ 130, 130, 130, 130, 130, -1, -1, -1,
+ -1, -1, 130, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 130, 130, 130, 130, -1, -1, 130,
+ 130, 130, 130, 130, 130, -1, -1, -1,
+ 130, 130, 130, 130, 130, -1, -1, -1,
+ -1, 130, -1, -1, -1, 130, 130, 130,
+ -1, 130, 130, -1, -1, 130, -1, -1,
+ -1, -1, -1, -1, -1, -1, 130, 130,
+ 130, 130, 130, -1, 130, 130, 130, -1,
+ -1, 130, 130, 130, 130, 130, 130, 130,
+ 130, -1, 130, 130, 130, -1, -1, -1,
+ 130, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 130, 130, -1, -1, 130,
+ -1, -1, -1, -1, 130, -1, -1, -1,
+ -1, 130, -1, 130, 130, 130, 130, 130,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 130, -1, 130, -1, -1,
+ 130, 130, -1, -1, -1, 130, -1, 130,
+ -1, 130, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, -1, 131, 131, 131,
+ 131, -1, -1, -1, 131, 131, 131, 131,
+ 131, -1, -1, -1, 131, 131, 131, -1,
+ -1, -1, 131, -1, -1, -1, 131, 131,
+ 131, 131, -1, -1, -1, 131, 131, 131,
+ -1, -1, -1, -1, 131, 131, -1, 131,
+ 131, 131, 131, -1, -1, -1, -1, -1,
+ -1, -1, 131, -1, -1, 131, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 131, 131, 131, 131, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 132, 132,
+ 132, 132, 132, 132, 132, 132, 132, 132,
+ 132, 132, 132, 132, -1, 132, 132, 132,
+ 132, 132, 132, -1, -1, -1, 132, 132,
+ 132, 132, 132, 132, -1, 132, 132, 132,
+ 132, -1, 132, -1, 132, 132, 132, 130,
+ 132, 132, 132, 132, 132, 132, -1, 132,
+ 132, 132, 132, 132, 132, 132, 132, 132,
+ -1, 132, 132, 132, 132, -1, -1, -1,
+ -1, -1, -1, -1, 132, -1, -1, -1,
+ -1, -1, 132, -1, -1, -1, -1, -1,
+ -1, 131, 132, 132, 132, 132, -1, -1,
+ 131, 131, 131, -1, 131, 131, 131, 131,
+ 131, 131, 131, 131, -1, 131, 131, 131,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 131, 131,
+ 131, 131, 131, -1, -1, -1, 132, 132,
+ 132, 132, -1, -1, 132, 132, -1, 132,
+ 132, 132, -1, 131, -1, 132, 132, -1,
+ 132, 132, -1, -1, -1, -1, 132, -1,
+ -1, -1, 132, 132, 132, -1, 132, 132,
+ -1, -1, 132, -1, -1, -1, -1, -1,
+ -1, -1, -1, 132, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 132, 132, 132,
+ 132, 132, 132, 132, 132, 132, -1, 132,
+ 132, 132, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 134, 134, 134, 134,
+ -1, 134, -1, -1, -1, -1, -1, -1,
+ -1, -1, 134, 134, 134, 134, 134, -1,
+ 132, 132, 132, 132, 132, -1, -1, -1,
+ 134, -1, -1, -1, 134, 134, 134, 134,
+ 132, -1, -1, 134, 134, 134, -1, -1,
+ -1, -1, 134, 134, -1, 134, 134, 134,
+ 134, -1, 135, 135, 135, 135, -1, 135,
+ 134, 134, -1, -1, -1, -1, -1, -1,
+ 135, 135, 135, 135, 135, -1, 134, 134,
+ 134, 134, -1, -1, -1, -1, 135, -1,
+ -1, -1, 135, 135, 135, 135, -1, -1,
+ -1, 135, 135, 135, -1, -1, -1, -1,
+ 135, 135, -1, 135, 135, 135, 135, -1,
+ -1, -1, -1, -1, -1, -1, 135, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, 135, 135, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 134, -1, -1, -1, -1,
+ -1, -1, -1, -1, 132, 134, 134, 134,
+ 134, 134, -1, 134, 134, 134, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 134, 134, 134, 134,
+ 134, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, 135, 135, 135, 135,
+ -1, 135, 135, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, 135, 135, 135, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 137, 137, 137, 137, 137, 137, 137, 137,
+ 137, 137, 137, 137, 137, 137, -1, 137,
+ 137, 137, 137, 137, 137, -1, -1, -1,
+ 137, 137, 137, 137, 137, 137, -1, 137,
+ 137, 137, 137, -1, 137, -1, 137, 137,
+ 137, -1, 137, 137, 137, 137, 137, 137,
+ 137, 137, 137, 137, 137, 137, 137, 137,
+ 137, 137, 137, 137, 137, 137, 137, -1,
+ -1, -1, -1, -1, -1, -1, 137, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 131, 137, 137, 137, 137,
+ -1, -1, -1, -1, 131, -1, 131, 131,
+ 131, 131, 131, 131, 131, 131, -1, 131,
+ 131, 131, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 131, 131, 131, 131, 131, -1, -1, -1,
+ 137, 137, 137, 137, -1, -1, 137, 137,
+ 137, 137, 137, 137, -1, 131, -1, 137,
+ 137, 137, 137, 137, -1, 137, 137, -1,
+ 137, 137, -1, -1, 137, 137, 137, -1,
+ 137, 137, -1, -1, 137, -1, -1, -1,
+ -1, -1, -1, -1, -1, 137, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 132,
+ 137, 137, 137, 137, 137, 137, 137, 137,
+ -1, 137, 137, 137, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 141, 141, 141, 141, 141, 141, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 137, 137, 137, 137, 137, -1,
+ 141, 141, 141, 141, 141, 141, -1, 141,
+ -1, -1, 137, -1, 137, 137, -1, 141,
+ -1, -1, -1, -1, -1, -1, 141, 141,
+ -1, -1, -1, -1, 141, 141, 141, -1,
+ 141, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 141, 141, -1, -1, 141, -1,
+ 141, 141, -1, 141, -1, -1, -1, 141,
+ 141, 141, 141, 141, -1, -1, -1, -1,
+ -1, -1, -1, -1, 141, 141, 141, -1,
+ 141, 141, -1, -1, 141, 134, -1, -1,
+ -1, -1, -1, -1, -1, -1, 137, 134,
+ 134, 134, 134, 134, -1, 134, 134, 134,
+ 141, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 141, 141, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 134, 134,
+ 134, 134, 134, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, 135, 135,
+ 135, 135, -1, 135, 135, 135, -1, -1,
+ -1, -1, -1, -1, 141, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, 135, 135, 135,
+ 135, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, -1,
+ 138, 138, 138, 138, 138, 138, -1, -1,
+ -1, 138, 138, 138, 138, 138, 138, -1,
+ 138, 138, 138, 138, -1, 138, -1, 138,
+ 138, 138, -1, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138,
+ -1, -1, -1, -1, -1, -1, -1, 138,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 138, 138, 138,
+ 138, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 138, 138, 138, 138, -1, -1, 138,
+ 138, 138, 138, 138, 138, -1, -1, -1,
+ 138, 138, 138, 138, 138, -1, 138, 138,
+ -1, 138, 138, -1, -1, 138, 138, 138,
+ -1, 138, 138, -1, -1, 138, -1, -1,
+ -1, -1, -1, -1, -1, -1, 138, -1,
+ -1, -1, -1, -1, -1, -1, -1, 137,
+ 137, 138, 138, 138, 138, 138, 138, 138,
+ 138, -1, 138, 138, 138, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 138, 138, 138, 138, 138,
+ -1, 153, 153, 153, 153, -1, 153, -1,
+ -1, -1, -1, 138, -1, 138, 138, 153,
+ 153, 153, 153, 153, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 153, -1, -1,
+ -1, 153, 153, 153, 153, -1, -1, -1,
+ 153, 153, 153, -1, -1, -1, -1, 153,
+ 153, -1, 153, 153, 153, 153, 153, -1,
+ -1, -1, -1, -1, -1, 153, -1, -1,
+ -1, 155, 155, 155, 155, -1, 155, -1,
+ -1, -1, -1, 153, 153, 153, 153, 155,
+ 155, 155, 155, 155, -1, -1, -1, -1,
+ 153, -1, -1, -1, -1, 155, -1, -1,
+ -1, 155, 155, 155, 155, -1, -1, -1,
+ 155, 155, 155, -1, -1, -1, -1, 155,
+ 155, -1, 155, 155, 155, 155, -1, -1,
+ -1, -1, -1, -1, -1, 155, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 155, 155, 155, 155, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 141, 141, -1, -1,
+ 141, -1, 141, 141, -1, 141, -1, 138,
+ -1, 141, 141, 141, 141, 141, -1, -1,
+ -1, -1, -1, -1, -1, -1, 141, 141,
+ 141, -1, 141, 141, -1, -1, 141, -1,
+ -1, -1, 153, 153, 153, 153, 153, -1,
+ 153, 153, 153, -1, -1, -1, -1, -1,
+ -1, -1, 141, -1, -1, -1, -1, -1,
+ -1, 153, 153, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 153,
+ -1, 153, 153, 153, 153, 153, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 155, 155, 155, 155, 155, 153,
+ 155, 155, 155, -1, -1, -1, 141, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 155, 155, 155, 155, 155, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, -1, 157, 157,
+ 157, 157, 157, 157, -1, 157, 157, 157,
+ 157, -1, 157, -1, 157, 157, 157, -1,
+ 157, 157, 157, 157, 157, 157, -1, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, -1, 157,
+ -1, -1, -1, -1, 157, 157, 157, 157,
+ 157, -1, -1, 157, 157, -1, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, -1, -1, -1, -1, -1, 157,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 157, 157,
+ 157, 157, -1, -1, 157, 157, 157, 157,
+ 157, 157, -1, -1, -1, 157, 157, 157,
+ 157, 157, -1, -1, -1, -1, 157, -1,
+ -1, -1, 157, 157, 157, -1, 157, 157,
+ -1, -1, 157, -1, -1, -1, -1, -1,
+ -1, -1, -1, 157, 157, 157, 157, 157,
+ -1, 157, 157, 157, -1, -1, 157, 157,
+ 157, 157, 157, 157, 157, 157, -1, 157,
+ 157, 157, -1, -1, -1, 157, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 157, 157, -1, -1, 157, -1, -1, -1,
+ -1, 157, -1, -1, -1, -1, 157, -1,
+ 157, 157, 157, 157, 157, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 157, -1, 157, -1, -1, 157, 157, -1,
+ -1, -1, 157, -1, 157, -1, 157, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 170, 170, 170, 170, -1, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, 170, 170,
+ 170, 170, 170, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 170, -1, -1, -1,
+ 170, 170, 170, 170, -1, -1, -1, 170,
+ 170, 170, -1, -1, -1, -1, 170, 170,
+ -1, 170, 170, 170, 170, -1, -1, -1,
+ -1, -1, -1, -1, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 170, 170, 170, 170, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 157, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 153, 153, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 153, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 170, 170, 170, -1, 170,
+ 170, 170, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 155, 155, 155, 155,
+ 155, 153, 155, 155, 155, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 170, 170, 170, 170, 170, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 155, 155, 155, 155, 155,
+ 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, -1,
+ 158, 158, 158, 158, 158, 158, -1, 158,
+ 158, 158, 158, -1, 158, -1, 158, 158,
+ 158, -1, 158, 158, 158, 158, 158, 158,
+ -1, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158,
+ -1, 158, -1, -1, -1, -1, 158, 158,
+ 158, 158, 158, -1, -1, 158, 158, -1,
+ 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, -1, -1, -1, -1,
+ -1, 158, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 158, 158, 158, 158, -1, -1, 158, 158,
+ 158, 158, 158, 158, -1, -1, -1, 158,
+ 158, 158, 158, 158, -1, -1, -1, -1,
+ 158, -1, -1, -1, 158, 158, 158, -1,
+ 158, 158, -1, -1, 158, -1, -1, -1,
+ -1, -1, -1, -1, -1, 158, 158, 158,
+ 158, 158, -1, 158, 158, 158, -1, -1,
+ 158, 158, 158, 158, 158, 158, 158, 158,
+ -1, 158, 158, 158, -1, -1, -1, 158,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 158, 158, -1, -1, 158, -1,
+ -1, -1, -1, 158, -1, -1, -1, -1,
+ 158, -1, 158, 158, 158, 158, 158, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 158, -1, 158, -1, -1, 158,
+ 158, -1, -1, -1, 158, -1, 158, -1,
+ 158, 159, 159, 159, 159, 159, 159, 159,
+ 159, 159, 159, 159, 159, 159, 159, 159,
+ 159, 159, 159, 159, 159, 159, 159, 159,
+ -1, 159, 159, 159, 159, 159, 159, -1,
+ 159, 159, 159, 159, -1, 159, -1, 159,
+ 159, 159, -1, 159, 159, 159, 159, 159,
+ 159, -1, 159, 159, 159, 159, 159, 159,
+ 159, 159, 159, 159, 159, 159, 159, 159,
+ 159, -1, 159, -1, -1, -1, -1, 159,
+ 159, 159, 159, 159, -1, -1, 159, 159,
+ -1, 159, 159, 159, 159, 159, 159, 159,
+ 159, 159, 159, 159, 159, -1, -1, -1,
+ -1, -1, 159, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 158, -1,
+ -1, 159, 159, 159, 159, -1, -1, 159,
+ 159, 159, 159, 159, 159, -1, -1, -1,
+ 159, 159, 159, 159, 159, -1, -1, -1,
+ -1, 159, -1, -1, -1, 159, 159, 159,
+ -1, 159, 159, -1, -1, 159, -1, -1,
+ -1, -1, -1, -1, -1, -1, 159, 159,
+ 159, 159, 159, -1, 159, 159, 159, -1,
+ -1, 159, 159, 159, 159, 159, 159, 159,
+ 159, -1, 159, 159, 159, 170, 170, 170,
+ 159, 170, 170, 170, -1, -1, -1, -1,
+ -1, -1, -1, 159, 159, -1, -1, 159,
+ -1, -1, -1, -1, 159, -1, -1, -1,
+ -1, 159, -1, 159, 159, 159, 159, 159,
+ -1, -1, 170, 170, 170, 170, 170, -1,
+ -1, -1, -1, 159, -1, 159, -1, -1,
+ 159, 159, -1, -1, -1, 159, -1, 159,
+ -1, 159, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, -1, 160, 160, 160, 160, 160, 160,
+ -1, 160, 160, 160, 160, -1, 160, -1,
+ 160, 160, 160, -1, 160, 160, 160, 160,
+ 160, 160, -1, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, -1, 160, -1, -1, -1, -1,
+ 160, 160, 160, 160, 160, -1, -1, 160,
+ 160, -1, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, -1, -1,
+ -1, -1, -1, 160, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 159,
+ -1, -1, 160, 160, 160, 160, -1, -1,
+ 160, 160, 160, 160, 160, 160, -1, -1,
+ -1, 160, 160, 160, 160, 160, -1, -1,
+ -1, -1, 160, -1, -1, -1, 160, 160,
+ 160, -1, 160, 160, -1, -1, 160, -1,
+ -1, -1, -1, -1, -1, -1, -1, 160,
+ 160, 160, 160, 160, -1, 160, 160, 160,
+ -1, -1, 160, 160, 160, 160, 160, 160,
+ 160, 160, -1, 160, 160, 160, -1, -1,
+ -1, 160, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 160, 160, -1, -1,
+ 160, -1, -1, -1, -1, 160, -1, -1,
+ -1, -1, 160, -1, 160, 160, 160, 160,
+ 160, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 160, -1, 160, -1,
+ -1, 160, 160, -1, -1, -1, 160, -1,
+ 160, -1, 160, 162, 162, 162, 162, 162,
+ 162, 162, 162, 162, 162, 162, 162, 162,
+ 162, -1, 162, 162, 162, 162, 162, 162,
+ -1, -1, -1, 162, 162, 162, 162, 162,
+ 162, -1, 162, 162, 162, 162, -1, 162,
+ -1, 162, 162, 162, -1, 162, 162, 162,
+ 162, 162, 162, -1, 162, 162, 162, 162,
+ 162, 162, 162, 162, 162, -1, 162, 162,
+ 162, 162, -1, -1, -1, -1, -1, -1,
+ -1, 162, -1, -1, -1, -1, -1, -1,
+ -1, -1, 162, -1, -1, -1, -1, 162,
+ 162, 162, 162, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 160, -1, -1, 162, 162, 162, 162, -1,
+ -1, 162, 162, 162, 162, 162, 162, -1,
+ -1, -1, 162, 162, 162, 162, 162, -1,
+ -1, -1, -1, 162, 162, -1, -1, 162,
+ 162, 162, -1, 162, 162, -1, -1, 162,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 162, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 162, 162, 162, 162, 162,
+ 162, 162, 162, -1, 162, 162, 162, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 162, 162, 162,
+ 162, 162, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 162, -1, 162,
+ 162, -1, -1, -1, 163, 163, 163, 163,
+ 163, 163, 163, 163, 163, 163, 163, 163,
+ 163, 163, -1, 163, 163, 163, 163, 163,
+ 163, -1, -1, -1, 163, 163, 163, 163,
+ 163, 163, -1, 163, 163, 163, 163, -1,
+ 163, -1, 163, 163, 163, -1, 163, 163,
+ 163, 163, 163, 163, -1, 163, 163, 163,
+ 163, 163, 163, 163, 163, 163, -1, 163,
+ 163, 163, 163, -1, -1, -1, -1, -1,
+ -1, -1, 163, -1, -1, -1, -1, -1,
+ -1, -1, -1, 163, -1, -1, -1, -1,
+ 163, 163, 163, 163, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 163, 163, 163, 163,
+ -1, 162, 163, 163, 163, 163, 163, 163,
+ -1, -1, -1, 163, 163, 163, 163, 163,
+ -1, -1, -1, -1, 163, 163, -1, -1,
+ 163, 163, 163, -1, 163, 163, -1, -1,
+ 163, -1, -1, -1, -1, -1, -1, -1,
+ -1, 163, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 163, 163, 163, 163,
+ 163, 163, 163, 163, -1, 163, 163, 163,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 163, 163,
+ 163, 163, 163, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 163, -1,
+ 163, 163, 166, 166, 166, 166, 166, 166,
+ 166, 166, 166, 166, 166, 166, 166, 166,
+ 166, 166, 166, 166, 166, 166, 166, 166,
+ 166, -1, 166, 166, 166, 166, 166, 166,
+ -1, 166, 166, 166, 166, -1, 166, -1,
+ 166, 166, 166, -1, 166, 166, 166, 166,
+ 166, 166, -1, 166, 166, 166, 166, 166,
+ 166, 166, 166, 166, -1, 166, 166, 166,
+ 166, -1, -1, -1, -1, -1, -1, -1,
+ 166, -1, -1, 166, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 166, 166,
+ 166, 166, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 166, 166, 166, 166, -1, -1,
+ 166, 166, 163, 166, 166, 166, -1, -1,
+ -1, 166, 166, -1, 166, 166, -1, -1,
+ -1, -1, 166, -1, -1, -1, 166, 166,
+ 166, -1, 166, 166, -1, -1, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 166,
+ 166, 166, 166, -1, -1, -1, 166, 166,
+ -1, -1, 166, 166, 166, 166, 166, 166,
+ 166, 166, -1, 166, 166, 166, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 167, 167, 167, 167, -1,
+ 167, -1, -1, -1, 166, 166, 166, 166,
+ 166, 167, 167, 167, 167, 167, -1, -1,
+ -1, -1, -1, -1, 166, -1, -1, 167,
+ -1, 166, -1, 167, 167, 167, 167, -1,
+ -1, -1, 167, 167, 167, -1, -1, -1,
+ -1, 167, 167, -1, 167, 167, 167, 167,
+ 168, 168, 168, 168, -1, 168, -1, 167,
+ -1, -1, -1, -1, -1, -1, 168, 168,
+ 168, 168, 168, -1, -1, 167, 167, 167,
+ 167, -1, -1, -1, 168, -1, -1, -1,
+ 168, 168, 168, 168, -1, -1, -1, 168,
+ 168, 168, -1, -1, -1, -1, 168, 168,
+ -1, 168, 168, 168, 168, -1, -1, -1,
+ -1, -1, -1, -1, 168, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 168, 168, 168, 168, -1, -1,
+ -1, -1, -1, -1, -1, 169, 169, 169,
+ 169, -1, 169, -1, -1, -1, -1, -1,
+ -1, -1, -1, 169, 169, 169, 169, 169,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 169, -1, -1, -1, 169, 169, 169,
+ 169, -1, -1, -1, 169, 169, 169, -1,
+ 166, -1, -1, 169, 169, -1, 169, 169,
+ 169, 169, -1, -1, 167, 167, 167, 167,
+ 167, 169, 167, 167, 167, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 169,
+ 169, 169, 169, -1, -1, -1, -1, -1,
+ -1, -1, 171, 171, 171, 171, -1, 171,
+ -1, -1, -1, 167, 167, 167, 167, 167,
+ 171, 171, 171, 171, 171, -1, -1, -1,
+ -1, -1, 168, 168, 168, 168, 171, 168,
+ 168, 168, 171, 171, 171, 171, -1, -1,
+ -1, 171, 171, 171, -1, -1, -1, -1,
+ 171, 171, -1, 171, 171, 171, 171, 172,
+ 172, 172, 172, -1, 172, -1, 171, -1,
+ 168, 168, 168, 168, 168, 172, 172, 172,
+ 172, 172, -1, -1, 171, 171, 171, 171,
+ -1, -1, -1, 172, -1, -1, -1, 172,
+ 172, 172, 172, -1, -1, -1, 172, 172,
+ 172, -1, -1, -1, -1, 172, 172, -1,
+ 172, 172, 172, 172, -1, -1, -1, 169,
+ 169, 169, 169, 172, 169, 169, 169, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 172, 172, 172, 172, -1, -1, -1,
+ -1, -1, -1, -1, 173, 173, 173, 173,
+ -1, 173, -1, -1, -1, 169, 169, 169,
+ 169, 169, 173, 173, 173, 173, 173, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 173, -1, -1, -1, 173, 173, 173, 173,
+ -1, -1, -1, 173, 173, 173, -1, -1,
+ -1, -1, 173, 173, -1, 173, 173, 173,
+ 173, -1, -1, -1, -1, 171, 171, 171,
+ 173, 171, 171, 171, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 173, 173,
+ 173, 173, -1, -1, -1, -1, -1, -1,
+ -1, 174, 174, 174, 174, -1, 174, -1,
+ -1, -1, 171, 171, 171, 171, 171, 174,
+ 174, 174, 174, 174, -1, -1, -1, -1,
+ -1, -1, 172, 172, 172, 174, 172, 172,
+ 172, 174, 174, 174, 174, -1, -1, -1,
+ 174, 174, 174, -1, -1, -1, -1, 174,
+ 174, -1, 174, 174, 174, 174, 175, 175,
+ 175, 175, -1, 175, -1, 174, -1, 172,
+ 172, 172, 172, 172, 175, 175, 175, 175,
+ 175, -1, -1, 174, 174, 174, 174, -1,
+ -1, -1, 175, -1, -1, -1, 175, 175,
+ 175, 175, -1, -1, -1, 175, 175, 175,
+ -1, -1, -1, -1, 175, 175, -1, 175,
+ 175, 175, 175, -1, -1, -1, -1, 173,
+ 173, 173, 175, 173, 173, 173, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 175, 175, 175, 175, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 173, 173, 173, 173,
+ 173, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 176, 176, 176, 176, -1,
+ 176, -1, -1, -1, -1, -1, -1, -1,
+ -1, 176, 176, 176, 176, 176, -1, -1,
+ -1, -1, -1, -1, 174, 174, 174, 176,
+ 174, 174, 174, 176, 176, 176, 176, -1,
+ -1, -1, 176, 176, 176, -1, -1, -1,
+ -1, 176, 176, -1, 176, 176, 176, 176,
+ -1, -1, -1, -1, -1, -1, -1, 176,
+ -1, 174, 174, 174, 174, 174, -1, -1,
+ -1, -1, -1, -1, -1, 176, 176, 176,
+ 176, 175, 175, 175, -1, 175, 175, 175,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 175, 175,
+ 175, 175, 175, -1, -1, -1, 167, 167,
+ 167, 167, 167, -1, 167, 167, 167, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 167, 167, 167,
+ 167, 167, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 168, 168, 168, 168,
+ -1, 168, 168, 168, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 176,
+ 176, -1, 176, 176, 176, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 168, 168, 168, 168, 168, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 176, 176, 176, 176, 176,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 169, 169, 169, 169, -1, 169, 169,
+ 169, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 177, 177, 177, 177,
+ -1, 177, -1, -1, -1, -1, -1, -1,
+ -1, -1, 177, 177, 177, 177, 177, 169,
+ 169, 169, 169, 169, -1, -1, -1, -1,
+ 177, -1, -1, -1, 177, 177, 177, 177,
+ -1, -1, -1, 177, 177, 177, -1, -1,
+ -1, -1, 177, 177, -1, 177, 177, 177,
+ 177, -1, -1, -1, -1, -1, -1, -1,
+ 177, -1, -1, -1, -1, -1, -1, 171,
+ 171, 171, -1, 171, 171, 171, 177, 177,
+ 177, 177, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 171, 171, 171, 171,
+ 171, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 172, 172, 172, -1,
+ 172, 172, 172, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 178, 178,
+ 178, 178, -1, 178, -1, -1, -1, -1,
+ -1, -1, -1, -1, 178, 178, 178, 178,
+ 178, 172, 172, 172, 172, 172, -1, -1,
+ -1, -1, 178, -1, -1, -1, 178, 178,
+ 178, 178, -1, -1, -1, 178, 178, 178,
+ -1, -1, -1, -1, 178, 178, -1, 178,
+ 178, 178, 178, -1, -1, -1, -1, -1,
+ 177, 177, 178, 177, 177, 177, -1, -1,
+ -1, 173, 173, 173, -1, 173, 173, 173,
+ 178, 178, 178, 178, -1, -1, -1, -1,
+ -1, -1, -1, 179, 179, 179, 179, -1,
+ 179, -1, -1, -1, 177, 177, 177, 177,
+ 177, 179, 179, 179, 179, 179, 173, 173,
+ 173, 173, 173, -1, -1, -1, -1, 179,
+ -1, -1, -1, 179, 179, 179, 179, -1,
+ -1, -1, 179, 179, 179, -1, -1, -1,
+ -1, 179, 179, -1, 179, 179, 179, 179,
+ -1, -1, -1, -1, -1, -1, -1, 179,
+ -1, -1, -1, -1, -1, -1, 174, 174,
+ 174, -1, 174, 174, 174, 179, 179, 179,
+ 179, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 174, 174, 174, 174, 174,
+ -1, -1, -1, 178, -1, 178, 178, 178,
+ -1, -1, -1, 175, 175, 175, -1, 175,
+ 175, 175, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 178, 178,
+ 178, 178, 178, -1, -1, -1, -1, -1,
+ 175, 175, 175, 175, 175, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 179, -1, 179, 179, 179, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 179, 179, 179, 179, 179,
+ -1, 176, 176, -1, 176, 176, 176, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 176, 176, 176,
+ 176, 176, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 181, 181, 181, 181, 181, 181, 181,
+ 181, 181, 181, 181, 181, 181, 181, 181,
+ 181, 181, 181, 181, 181, 181, 181, 181,
+ 181, 181, 181, 181, 181, 181, 181, -1,
+ 181, 181, 181, 181, 181, 181, -1, 181,
+ 181, 181, -1, 181, 181, 181, 181, 181,
+ 181, 181, 181, 181, 181, 181, 181, 181,
+ 181, 181, 181, -1, 181, 181, 181, 181,
+ -1, -1, -1, -1, 181, -1, -1, 181,
+ 181, -1, 181, 181, 181, 181, -1, -1,
+ -1, -1, 181, -1, -1, 181, 181, 181,
+ 181, 181, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 181, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 181, 181, 181, 181, -1, -1, 181,
+ 181, 181, 181, 181, 181, -1, 181, 181,
+ 181, 181, 181, 181, 181, -1, -1, 181,
+ -1, 181, 181, -1, 181, 181, 181, 181,
+ -1, 181, 181, -1, -1, 181, -1, -1,
+ -1, -1, -1, 181, -1, 181, 181, 181,
+ 181, 181, -1, -1, -1, 181, 181, -1,
+ 181, 181, 181, 181, 181, 181, 181, 181,
+ 181, -1, 181, 181, 181, 181, -1, 181,
+ -1, -1, 177, 177, -1, 177, 177, 177,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 181, 181, 181, -1, -1, 181, 181,
+ 181, -1, -1, 181, 181, 181, 181, 181,
+ -1, -1, -1, -1, -1, -1, 177, 177,
+ 177, 177, 177, 181, -1, 181, 181, 181,
+ 181, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 178, -1, 178,
+ 178, 178, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 178, 178, 178, 178, 178, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 181,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 179, -1, 179, 179, 179, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 179, 179, 179,
+ 179, 179, 182, 182, 182, 182, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182,
+ 182, -1, 182, 182, 182, 182, 182, 182,
+ -1, 182, 182, 182, 182, -1, 182, -1,
+ 182, 182, 182, -1, 182, 182, 182, 182,
+ 182, 182, -1, 182, 182, 182, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182,
+ 182, 182, -1, 182, -1, -1, -1, -1,
+ 182, 182, 182, 182, 182, -1, -1, 182,
+ 182, -1, 182, 182, 182, 182, 182, 182,
+ 182, 182, 182, 182, 182, 182, -1, -1,
+ -1, -1, -1, 182, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 182, 182, 182, 182, -1, -1,
+ 182, 182, 182, 182, 182, 182, -1, -1,
+ -1, 182, 182, 182, 182, 182, -1, -1,
+ -1, -1, 182, -1, -1, -1, 182, 182,
+ 182, -1, 182, 182, -1, -1, 182, -1,
+ -1, -1, -1, -1, -1, -1, -1, 182,
+ 182, 182, 182, 182, -1, 182, 182, 182,
+ -1, -1, 182, 182, 182, 182, 182, 182,
+ 182, 182, -1, 182, 182, 182, -1, -1,
+ -1, 182, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 182, 182, -1, -1,
+ 182, -1, -1, -1, -1, 182, -1, -1,
+ -1, -1, 182, -1, 182, 182, 182, 182,
+ 182, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 182, -1, 182, -1,
+ -1, 182, 182, -1, -1, -1, 182, -1,
+ 182, -1, 182, 183, 183, 183, 183, 181,
+ 183, -1, -1, -1, -1, -1, -1, -1,
+ -1, 183, 183, 183, 183, 183, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 183,
+ -1, -1, -1, 183, 183, 183, 183, -1,
+ -1, -1, 183, 183, 183, -1, -1, -1,
+ -1, 183, 183, -1, 183, 183, 183, 183,
+ -1, 184, 184, 184, 184, -1, 184, 183,
+ -1, -1, -1, -1, -1, -1, -1, 184,
+ 184, 184, 184, 184, -1, 183, 183, 183,
+ 183, -1, -1, -1, -1, 184, -1, -1,
+ -1, 184, 184, 184, 184, -1, -1, -1,
+ 184, 184, 184, -1, -1, -1, -1, 184,
+ 184, -1, 184, 184, 184, 184, -1, -1,
+ -1, -1, -1, -1, -1, 184, 184, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 184, 184, 184, 184, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 182, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 183, 183, 183, 183,
+ 183, -1, 183, 183, 183, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 183, 183, 183, 183, 183,
+ 184, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 184, 184, 184, 184, 184, -1,
+ 184, 184, 184, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 184, 184, 184, 184, 184, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, -1, 185, 185,
+ 185, 185, 185, 185, -1, 185, 185, 185,
+ 185, -1, 185, -1, 185, 185, 185, -1,
+ 185, 185, 185, 185, 185, 185, -1, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, -1, 185,
+ -1, -1, 185, 185, 185, 185, 185, 185,
+ 185, -1, 185, 185, 185, -1, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185,
+ 185, 185, -1, -1, -1, -1, -1, 185,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 185, 185,
+ 185, 185, -1, -1, 185, 185, 185, 185,
+ 185, 185, -1, -1, -1, 185, 185, 185,
+ 185, 185, -1, -1, -1, -1, 185, -1,
+ -1, -1, 185, 185, 185, -1, 185, 185,
+ -1, -1, 185, -1, -1, -1, -1, -1,
+ -1, -1, -1, 185, 185, 185, 185, 185,
+ -1, 185, 185, 185, -1, -1, 185, 185,
+ 185, 185, 185, 185, 185, 185, -1, 185,
+ 185, 185, -1, -1, -1, 185, -1, -1,
+ -1, -1, -1, -1, -1, 185, 185, 185,
+ 185, 185, -1, -1, 185, -1, -1, -1,
+ -1, 185, -1, 185, 185, 185, 185, -1,
+ 185, 185, 185, 185, 185, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 185, -1, 185, -1, -1, 185, 185, -1,
+ -1, -1, 185, -1, 185, -1, 185, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 194, 194, 194, 194, -1, 194,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 194, 194, 194, 194, 194, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 194, -1,
+ -1, -1, 194, 194, 194, 194, -1, -1,
+ -1, 194, 194, 194, -1, -1, -1, -1,
+ 194, 194, -1, 194, 194, 194, 194, -1,
+ -1, -1, -1, -1, -1, -1, 194, 194,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 194, 194, 194, 194,
+ -1, -1, 194, 194, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 185, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 183, 183,
+ 183, 183, 183, -1, 183, 183, 183, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 194, -1, -1, -1, 183, 183, 183,
+ 183, 183, 184, 194, 194, 194, 194, 194,
+ -1, 194, 194, 194, 184, 184, 184, 184,
+ 184, -1, 184, 184, 184, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 194, 194, 194, 194, 194, -1,
+ -1, -1, -1, 184, 184, 184, 184, 184,
+ 188, 188, 188, 188, 188, 188, 188, 188,
+ 188, 188, 188, 188, 188, 188, -1, 188,
+ 188, 188, 188, 188, 188, -1, -1, -1,
+ 188, 188, 188, 188, 188, 188, -1, 188,
+ 188, 188, 188, -1, 188, -1, 188, 188,
+ 188, -1, 188, 188, 188, 188, 188, 188,
+ -1, 188, 188, 188, 188, 188, 188, 188,
+ 188, 188, -1, 188, 188, 188, 188, -1,
+ -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 188, 188, 188, 188,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, 188, 188, 188, -1, -1, 188, 188,
+ 188, 188, 188, 188, -1, -1, -1, 188,
+ 188, 188, 188, 188, -1, -1, -1, -1,
+ 188, 188, -1, -1, 188, 188, 188, -1,
+ 188, 188, -1, -1, 188, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, 188, 188, 188, 188, 188, 188, 188,
+ -1, 188, 188, 188, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, 188, 188, 188, 188, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, -1, 188, 188, -1, -1,
+ -1, 190, 190, 190, 190, 190, 190, 190,
+ 190, 190, 190, 190, 190, 190, 190, -1,
+ 190, 190, 190, 190, 190, 190, -1, -1,
+ -1, 190, 190, 190, 190, 190, 190, -1,
+ 190, 190, 190, 190, -1, 190, -1, 190,
+ 190, 190, -1, 190, 190, 190, 190, 190,
+ 190, -1, 190, 190, 190, 190, 190, 190,
+ 190, 190, 190, -1, 190, 190, 190, 190,
+ -1, -1, -1, -1, -1, -1, -1, 190,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 190, 190, 190,
+ 190, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 190, 190, 190, 190, -1, 188, 190,
+ 190, 190, 190, 190, 190, -1, -1, -1,
+ 190, 190, 190, 190, 190, -1, -1, -1,
+ -1, 190, 190, -1, -1, 190, 190, 190,
+ -1, 190, 190, -1, -1, 190, -1, -1,
+ -1, -1, -1, -1, -1, -1, 190, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 190, 190, 190, 190, 190, 190, 190,
+ 190, -1, 190, 190, 190, -1, -1, -1,
+ -1, -1, -1, 194, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 194, 194, 194,
+ 194, 194, -1, 194, 194, 194, -1, -1,
+ -1, -1, -1, 190, 190, 190, 190, 190,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 190, -1, 190, 190, -1,
+ -1, -1, -1, -1, 194, 194, 194, 194,
+ 194, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ -1, 202, 202, 202, 202, 202, 202, -1,
+ 202, 202, 202, 202, -1, 202, -1, 202,
+ 202, 202, -1, 202, 202, 202, 202, 202,
+ 202, -1, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, 202, 202, 202,
+ 202, -1, 202, -1, -1, -1, -1, 202,
+ 202, 202, 202, 202, -1, -1, 202, 202,
+ -1, 202, 202, 202, 202, 202, 202, 202,
+ 202, 202, 202, 202, 202, -1, -1, -1,
+ -1, -1, 202, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 190,
+ -1, 202, 202, 202, 202, -1, -1, 202,
+ 202, 202, 202, 202, 202, -1, -1, -1,
+ 202, 202, 202, 202, 202, -1, -1, -1,
+ -1, 202, -1, -1, -1, 202, 202, 202,
+ -1, 202, 202, -1, -1, 202, -1, -1,
+ -1, -1, -1, -1, -1, -1, 202, 202,
+ 202, 202, 202, -1, 202, 202, 202, -1,
+ -1, 202, 202, 202, 202, 202, 202, 202,
+ 202, -1, 202, 202, 202, -1, -1, -1,
+ 202, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 202, 202, -1, -1, 202,
+ -1, -1, -1, -1, 202, -1, -1, -1,
+ -1, 202, -1, 202, 202, 202, 202, 202,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 202, -1, 202, -1, -1,
+ 202, 202, -1, -1, -1, 202, -1, 202,
+ -1, 202, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, -1, 203, 203, 203, 203, 203, 203,
+ -1, 203, 203, 203, 203, -1, 203, -1,
+ 203, 203, 203, -1, 203, 203, 203, 203,
+ 203, 203, -1, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, 203, 203,
+ 203, 203, -1, 203, -1, -1, -1, -1,
+ 203, 203, 203, 203, 203, -1, -1, 203,
+ 203, -1, 203, 203, 203, 203, 203, 203,
+ 203, 203, 203, 203, 203, 203, -1, -1,
+ -1, -1, -1, 203, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 202,
+ -1, -1, 203, 203, 203, 203, -1, -1,
+ 203, 203, 203, 203, 203, 203, -1, -1,
+ -1, 203, 203, 203, 203, 203, -1, -1,
+ -1, -1, 203, -1, -1, -1, 203, 203,
+ 203, -1, 203, 203, -1, -1, 203, -1,
+ -1, -1, -1, -1, -1, -1, -1, 203,
+ 203, 203, 203, 203, -1, 203, 203, 203,
+ 203, -1, 203, 203, 203, 203, 203, 203,
+ 203, 203, -1, 203, 203, 203, -1, -1,
+ -1, 203, -1, -1, -1, -1, -1, -1,
+ -1, 203, -1, -1, 203, 203, -1, -1,
+ 203, -1, -1, -1, -1, 203, -1, -1,
+ -1, -1, 203, -1, 203, 203, 203, 203,
+ 203, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 203, -1, 203, -1,
+ -1, 203, 203, -1, -1, -1, 203, -1,
+ 203, -1, 203, 204, 204, 204, 204, 204,
+ 204, 204, 204, 204, 204, 204, 204, 204,
+ 204, 204, 204, 204, 204, 204, 204, 204,
+ 204, 204, -1, 204, 204, 204, 204, 204,
+ 204, -1, 204, 204, 204, 204, -1, 204,
+ -1, 204, 204, 204, -1, 204, 204, 204,
+ 204, 204, 204, -1, 204, 204, 204, 204,
+ 204, 204, 204, 204, 204, 204, 204, 204,
+ 204, 204, 204, -1, 204, -1, -1, -1,
+ -1, 204, 204, 204, 204, 204, -1, -1,
+ 204, 204, -1, 204, 204, 204, 204, 204,
+ 204, 204, 204, 204, 204, 204, 204, -1,
+ -1, -1, -1, -1, 204, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 203, -1, -1, 204, 204, 204, 204, -1,
+ -1, 204, 204, 204, 204, 204, 204, -1,
+ -1, -1, 204, 204, 204, 204, 204, -1,
+ -1, -1, -1, 204, -1, -1, -1, 204,
+ 204, 204, -1, 204, 204, -1, -1, 204,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 204, 204, 204, 204, 204, -1, 204, 204,
+ 204, 204, -1, 204, 204, 204, 204, 204,
+ 204, 204, 204, -1, 204, 204, 204, -1,
+ -1, -1, 204, -1, -1, -1, -1, -1,
+ -1, -1, 204, -1, -1, 204, 204, -1,
+ -1, 204, -1, -1, -1, -1, 204, -1,
+ -1, -1, -1, 204, -1, 204, 204, 204,
+ 204, 204, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 204, -1, 204,
+ -1, -1, 204, 204, -1, -1, -1, 204,
+ -1, 204, -1, 204, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, -1, 209, 209, 209, 209,
+ 209, 209, -1, 209, 209, 209, 209, -1,
+ 209, -1, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, -1, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, -1, 209, -1, -1,
+ 209, -1, 209, 209, 209, 209, 209, -1,
+ -1, 209, 209, -1, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209,
+ -1, -1, -1, -1, -1, 209, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 204, -1, -1, 209, 209, 209, 209,
+ -1, -1, 209, 209, 209, 209, 209, 209,
+ -1, -1, -1, 209, 209, 209, 209, 209,
+ -1, -1, -1, -1, 209, -1, -1, -1,
+ 209, 209, 209, -1, 209, 209, -1, -1,
+ 209, -1, -1, -1, -1, -1, -1, -1,
+ -1, 209, 209, 209, 209, 209, -1, 209,
+ 209, 209, -1, -1, 209, 209, 209, 209,
+ 209, 209, 209, 209, 209, 209, 209, 209,
+ -1, -1, -1, 209, -1, -1, -1, -1,
+ -1, -1, -1, 203, -1, -1, 209, 209,
+ -1, -1, 209, -1, -1, -1, -1, 209,
+ -1, -1, -1, -1, 209, -1, 209, 209,
+ 209, 209, 209, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 209, -1,
+ 209, -1, -1, 209, 209, -1, -1, -1,
+ 209, -1, 209, -1, 209, 210, 210, 210,
+ 210, 210, 210, 210, 210, 210, 210, 210,
+ 210, 210, 210, 210, 210, 210, 210, 210,
+ 210, 210, 210, 210, -1, 210, 210, 210,
+ 210, 210, 210, -1, 210, 210, 210, 210,
+ -1, 210, -1, 210, 210, 210, 210, 210,
+ 210, 210, 210, 210, 210, -1, 210, 210,
+ 210, 210, 210, 210, 210, 210, 210, 210,
+ 210, 210, 210, 210, 210, -1, 210, -1,
+ -1, 210, -1, 210, 210, 210, 210, 210,
+ -1, -1, 210, 210, -1, 210, 210, 210,
+ 210, 210, 210, 210, 210, 210, 210, 210,
+ 210, -1, -1, -1, -1, -1, 210, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 209, -1, -1, 210, 210, 210,
+ 210, -1, -1, 210, 210, 210, 210, 210,
+ 210, -1, -1, -1, 210, 210, 210, 210,
+ 210, -1, -1, -1, -1, 210, -1, -1,
+ -1, 210, 210, 210, -1, 210, 210, -1,
+ -1, 210, -1, -1, -1, -1, -1, -1,
+ -1, -1, 210, 210, 210, 210, 210, -1,
+ 210, 210, 210, -1, -1, 210, 210, 210,
+ 210, 210, 210, 210, 210, 210, 210, 210,
+ 210, -1, -1, -1, 210, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 210,
+ 210, -1, -1, 210, -1, -1, -1, -1,
+ 210, -1, -1, -1, -1, 210, -1, 210,
+ 210, 210, 210, 210, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 210,
+ -1, 210, -1, -1, 210, 210, -1, -1,
+ -1, 210, -1, 210, -1, 210, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 211,
+ 211, 211, 211, 211, 211, 211, 211, 211,
+ 211, 211, 211, 211, 211, 211, 211, 211,
+ 211, 211, 211, 211, 211, 211, -1, 211,
+ 211, 211, 211, 211, 211, -1, 211, 211,
+ 211, 211, -1, 211, -1, 211, 211, 211,
+ 211, 211, 211, 211, 211, 211, 211, -1,
+ 211, 211, 211, 211, 211, 211, 211, 211,
+ 211, 211, 211, 211, 211, 211, 211, -1,
+ 211, -1, -1, 211, -1, 211, 211, 211,
+ 211, 211, -1, -1, 211, 211, -1, 211,
+ 211, 211, 211, 211, 211, 211, 211, 211,
+ 211, 211, 211, -1, -1, -1, -1, -1,
+ 211, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 210, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 211,
+ 211, 211, 211, -1, -1, 211, 211, 211,
+ 211, 211, 211, -1, -1, -1, 211, 211,
+ 211, 211, 211, -1, -1, -1, -1, 211,
+ -1, -1, -1, 211, 211, 211, -1, 211,
+ 211, -1, -1, 211, -1, -1, -1, -1,
+ -1, -1, -1, -1, 211, 211, 211, 211,
+ 211, -1, 211, 211, 211, -1, 209, 211,
+ 211, 211, 211, 211, 211, 211, 211, 211,
+ 211, 211, 211, -1, -1, -1, 211, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 211, 211, -1, -1, 211, -1, -1,
+ -1, -1, 211, -1, 211, 211, -1, 211,
+ -1, 211, 211, 211, 211, 211, -1, -1,
+ 217, 217, 217, 217, 217, 217, -1, -1,
+ -1, 211, -1, 211, -1, -1, 211, 211,
+ 217, -1, -1, 211, -1, 211, -1, 211,
+ 217, 217, 217, 217, 217, 217, -1, 217,
+ -1, -1, -1, -1, 217, -1, -1, 217,
+ -1, -1, -1, -1, -1, -1, 217, 217,
+ -1, -1, -1, -1, 217, 217, 217, 217,
+ 217, 218, 218, 218, 218, 218, 218, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -1, -1, -1, -1, -1, -1,
+ -1, 218, 218, 218, 218, 218, 218, -1,
+ 218, -1, -1, -1, -1, 218, -1, -1,
+ 218, -1, -1, -1, -1, -1, -1, 218,
+ 218, -1, -1, -1, -1, 218, 218, 218,
+ 218, 218, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 217, 217, 217, -1, -1, 217, 217,
+ -1, -1, -1, 217, -1, -1, -1, 217,
+ 217, -1, 217, 217, -1, 211, -1, -1,
+ 217, 217, -1, -1, 217, 217, 217, -1,
+ 217, 217, -1, -1, 217, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, 218, 218, -1, -1, 218,
+ 218, -1, 217, 217, 218, -1, -1, -1,
+ 218, 218, -1, 218, 218, -1, -1, -1,
+ -1, 218, 218, -1, -1, 218, 218, 218,
+ -1, 218, 218, -1, -1, 218, -1, -1,
+ -1, -1, -1, -1, -1, -1, 219, 219,
+ 219, 219, 219, 219, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 217, 219, -1,
+ -1, -1, -1, 218, 218, -1, 219, 219,
+ 219, 219, 219, 219, -1, 219, -1, -1,
+ -1, -1, 219, -1, -1, 219, -1, -1,
+ -1, -1, -1, -1, 219, 219, -1, -1,
+ -1, -1, 219, 219, 219, 219, 219, 220,
+ 220, 220, 220, 220, 220, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, 220,
+ -1, -1, -1, -1, -1, -1, -1, 220,
+ 220, 220, 220, 220, 220, -1, 220, -1,
+ -1, -1, -1, 220, -1, -1, 220, -1,
+ -1, -1, -1, -1, -1, 220, 220, -1,
+ -1, -1, -1, 220, 220, 220, 220, 220,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 219,
+ 219, 219, -1, -1, 219, 219, -1, -1,
+ -1, 219, -1, -1, -1, 219, 219, -1,
+ 219, 219, -1, -1, -1, -1, 219, 219,
+ -1, -1, 219, 219, 219, -1, 219, 219,
+ -1, -1, 219, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 220, 220, 220, -1, -1, 220, 220, -1,
+ 219, 219, 220, -1, -1, -1, 220, 220,
+ -1, 220, 220, -1, -1, -1, -1, 220,
+ 220, -1, -1, 220, 220, 220, -1, 220,
+ 220, -1, -1, 220, -1, -1, -1, -1,
+ -1, -1, -1, -1, 221, 221, 221, 221,
+ 221, 221, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 219, 221, -1, -1, -1,
+ -1, 220, 220, -1, 221, 221, 221, 221,
+ 221, 221, -1, 221, -1, -1, -1, -1,
+ 221, -1, -1, 221, -1, -1, 211, 211,
+ -1, -1, 221, 221, -1, -1, -1, -1,
+ 221, 221, 221, 221, 221, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 220, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 221, 221, 221,
+ -1, -1, 221, 221, -1, -1, -1, 221,
+ -1, -1, -1, 221, 221, -1, 221, 221,
+ -1, -1, -1, -1, 221, 221, -1, -1,
+ 221, 221, 221, -1, 221, 221, -1, -1,
+ 221, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 217, 217, 217, -1, -1,
+ 217, 217, -1, -1, -1, 217, 221, 221,
+ -1, 217, 217, -1, 217, 217, -1, -1,
+ -1, -1, 217, 217, -1, -1, 217, 217,
+ 217, -1, 217, 217, -1, -1, 217, -1,
+ -1, -1, 222, 222, 222, 222, 222, 222,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 222, -1, -1, -1, -1, -1,
+ -1, 221, 222, 222, 222, 222, 222, 222,
+ -1, 222, -1, -1, -1, -1, 222, -1,
+ -1, 222, -1, -1, -1, -1, -1, -1,
+ 222, 222, -1, -1, -1, -1, 222, 222,
+ 222, 222, 222, 223, 223, 223, 223, 223,
+ 223, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 223, -1, -1, -1, 217,
+ -1, -1, -1, 223, 223, 223, 223, 223,
+ 223, -1, 223, -1, -1, -1, -1, 223,
+ -1, -1, 223, -1, -1, -1, -1, -1,
+ -1, 223, 223, -1, -1, -1, -1, 223,
+ 223, 223, 223, 223, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 222, 222, 222, -1, -1,
+ 222, 222, -1, -1, -1, 222, -1, -1,
+ -1, 222, 222, -1, 222, 222, -1, -1,
+ -1, -1, 222, 222, -1, -1, 222, 222,
+ 222, -1, 222, 222, -1, -1, 222, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 223, 223, 223, -1,
+ -1, 223, 223, -1, 222, 222, 223, -1,
+ -1, -1, 223, 223, -1, 223, 223, -1,
+ -1, -1, -1, 223, 223, -1, -1, 223,
+ 223, 223, -1, 223, 223, -1, -1, 223,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 224, 224, 224, 224, 224, 224, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 222,
+ 224, -1, -1, -1, -1, 223, 223, -1,
+ 224, 224, 224, 224, 224, 224, -1, 224,
+ -1, -1, -1, -1, 224, -1, -1, 224,
+ -1, -1, -1, -1, -1, -1, 224, 224,
+ -1, -1, -1, -1, 224, 224, 224, 224,
+ 224, 225, 225, 225, 225, 225, 225, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 223, 225, -1, -1, -1, -1, -1, -1,
+ -1, 225, 225, 225, 225, 225, 225, -1,
+ 225, -1, -1, -1, -1, 225, -1, -1,
+ 225, -1, -1, -1, -1, -1, -1, 225,
+ 225, -1, -1, -1, -1, 225, 225, 225,
+ 225, 225, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 224, 224, 224, -1, -1, 224, 224,
+ -1, -1, -1, 224, -1, -1, -1, 224,
+ 224, -1, 224, 224, -1, -1, -1, -1,
+ 224, 224, -1, -1, 224, 224, 224, -1,
+ 224, 224, -1, -1, 224, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 225, 225, 225, -1, -1, 225,
+ 225, -1, 224, 224, 225, -1, -1, -1,
+ 225, 225, -1, 225, 225, -1, -1, -1,
+ -1, 225, 225, -1, -1, 225, 225, 225,
+ -1, 225, 225, -1, -1, 225, -1, -1,
+ -1, -1, -1, -1, -1, -1, 226, 226,
+ 226, 226, 226, 226, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 224, 226, -1,
+ -1, -1, -1, 225, 225, -1, 226, 226,
+ 226, 226, 226, 226, -1, 226, -1, -1,
+ -1, -1, 226, -1, -1, 226, -1, -1,
+ -1, -1, -1, -1, 226, 226, -1, -1,
+ -1, -1, 226, 226, 226, 226, 226, 227,
+ 227, 227, 227, 227, 227, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 225, 227,
+ -1, -1, -1, -1, -1, -1, -1, 227,
+ 227, 227, 227, 227, 227, -1, 227, -1,
+ -1, -1, -1, 227, -1, -1, 227, -1,
+ -1, -1, -1, -1, -1, 227, 227, -1,
+ -1, -1, -1, 227, 227, 227, 227, 227,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 226,
+ 226, 226, -1, -1, 226, 226, -1, -1,
+ -1, 226, -1, -1, -1, 226, 226, -1,
+ 226, 226, -1, -1, -1, -1, 226, 226,
+ -1, -1, 226, 226, 226, -1, 226, 226,
+ -1, -1, 226, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 227, 227, 227, -1, -1, 227, 227, -1,
+ 226, 226, 227, -1, -1, -1, 227, 227,
+ -1, 227, 227, -1, -1, -1, -1, 227,
+ 227, -1, -1, 227, 227, 227, -1, 227,
+ 227, -1, -1, 227, -1, -1, -1, -1,
+ -1, -1, -1, -1, 228, 228, 228, 228,
+ 228, 228, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 226, 228, -1, -1, -1,
+ -1, 227, 227, -1, 228, 228, 228, 228,
+ 228, 228, -1, 228, -1, -1, -1, -1,
+ 228, -1, -1, 228, -1, -1, -1, -1,
+ -1, -1, 228, 228, -1, -1, -1, -1,
+ 228, 228, 228, 228, 228, 229, 229, 229,
+ 229, 229, 229, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 227, 229, -1, -1,
+ -1, -1, -1, -1, -1, 229, 229, 229,
+ 229, 229, 229, -1, 229, -1, -1, -1,
+ -1, 229, -1, -1, 229, -1, -1, -1,
+ -1, -1, -1, 229, 229, -1, -1, -1,
+ -1, 229, 229, 229, 229, 229, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 228, 228, 228,
+ -1, -1, 228, 228, -1, -1, -1, 228,
+ -1, -1, -1, 228, 228, -1, 228, 228,
+ -1, -1, -1, -1, 228, 228, -1, -1,
+ 228, 228, 228, -1, 228, 228, -1, -1,
+ 228, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 229, 229,
+ 229, -1, -1, 229, 229, -1, 228, 228,
+ 229, -1, -1, -1, 229, 229, -1, 229,
+ 229, -1, -1, -1, -1, 229, 229, -1,
+ -1, 229, 229, 229, -1, 229, 229, -1,
+ -1, 229, -1, -1, -1, -1, -1, -1,
+ -1, -1, 230, 230, 230, 230, 230, 230,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 228, 230, -1, -1, -1, -1, 229,
+ 229, -1, 230, 230, 230, 230, 230, 230,
+ -1, 230, -1, -1, -1, -1, 230, -1,
+ -1, 230, -1, -1, -1, -1, -1, -1,
+ 230, 230, -1, -1, -1, -1, 230, 230,
+ 230, 230, 230, 231, 231, 231, 231, 231,
+ 231, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 229, 231, -1, -1, -1, -1,
+ -1, -1, -1, 231, 231, 231, 231, 231,
+ 231, -1, 231, -1, -1, -1, -1, 231,
+ -1, -1, 231, -1, -1, -1, -1, -1,
+ -1, 231, 231, -1, -1, -1, -1, 231,
+ 231, 231, 231, 231, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 230, 230, 230, -1, -1,
+ 230, 230, -1, -1, -1, 230, -1, -1,
+ -1, 230, 230, -1, 230, 230, -1, -1,
+ -1, -1, 230, 230, -1, -1, 230, 230,
+ 230, -1, 230, 230, -1, -1, 230, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 231, 231, 231, -1,
+ -1, 231, 231, -1, 230, 230, 231, -1,
+ -1, -1, 231, 231, -1, 231, 231, -1,
+ -1, -1, -1, 231, 231, -1, -1, 231,
+ 231, 231, -1, 231, 231, -1, -1, 231,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 232, 232, 232, 232, 232, 232, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 230,
+ 232, -1, -1, -1, -1, 231, 231, -1,
+ 232, 232, 232, 232, 232, 232, -1, 232,
+ -1, -1, -1, -1, 232, -1, -1, 232,
+ -1, -1, -1, -1, -1, -1, 232, 232,
+ -1, -1, -1, -1, 232, 232, 232, 232,
+ 232, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 231, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 232, 232, 232, -1, -1, 232, 232,
+ -1, -1, -1, 232, -1, -1, -1, 232,
+ 232, -1, 232, 232, -1, -1, -1, -1,
+ 232, 232, -1, -1, 232, 232, 232, -1,
+ 232, 232, -1, -1, 232, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 232, 232, -1, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 235, -1, 235, 235, 235,
+ 235, 235, 235, -1, 235, 235, 235, 235,
+ -1, 235, -1, 235, 235, 235, -1, 235,
+ 235, 235, 235, 235, 235, 232, 235, 235,
+ 235, 235, 235, 235, 235, 235, 235, -1,
+ 235, 235, 235, 235, -1, -1, -1, -1,
+ -1, -1, -1, 235, -1, -1, 235, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 235, 235, 235, 235, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 235, 235, 235,
+ 235, -1, -1, 235, 235, -1, 235, 235,
+ 235, -1, -1, -1, 235, 235, -1, 235,
+ 235, -1, -1, -1, -1, 235, -1, -1,
+ -1, 235, 235, 235, -1, 235, 235, -1,
+ -1, 235, -1, -1, -1, -1, -1, -1,
+ -1, -1, 235, 235, 235, 235, -1, -1,
+ -1, 235, 235, -1, -1, 235, 235, 235,
+ 235, 235, 235, 235, 235, -1, 235, 235,
+ 235, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 235,
+ 235, 235, 235, 235, -1, 236, 236, 236,
+ 236, 236, 236, 236, 236, 236, 236, 235,
+ 236, 236, 236, 236, 235, -1, -1, 236,
+ 236, 236, 236, 236, -1, -1, -1, 236,
+ 236, 236, -1, -1, -1, 236, -1, -1,
+ -1, 236, 236, 236, 236, -1, -1, -1,
+ 236, 236, 236, -1, -1, -1, -1, 236,
+ 236, -1, 236, 236, 236, 236, -1, -1,
+ -1, -1, -1, -1, -1, 236, -1, -1,
+ 236, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 236, 236, 236, 236, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ -1, 237, 237, 237, 237, 237, 237, -1,
+ 237, 237, 237, 237, -1, 237, -1, 237,
+ 237, 237, -1, 237, 237, 237, 237, 237,
+ 237, -1, 237, 237, 237, 237, 237, 237,
+ 237, 237, 237, -1, 237, 237, 237, 237,
+ -1, -1, -1, 235, -1, -1, -1, 237,
+ -1, -1, 237, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 236, 237, 237, 237,
+ 237, -1, -1, 236, 236, 236, -1, 236,
+ 236, 236, 236, 236, 236, 236, 236, -1,
+ 236, 236, 236, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 236, 236, 236, 236, 236, -1, -1,
+ -1, 237, 237, 237, 237, -1, -1, 237,
+ 237, -1, 237, 237, 237, -1, 236, -1,
+ 237, 237, -1, 237, 237, -1, -1, -1,
+ -1, 237, -1, -1, -1, 237, 237, 237,
+ -1, 237, 237, -1, -1, 237, -1, -1,
+ -1, -1, -1, -1, -1, -1, 237, 237,
+ 237, 237, -1, -1, -1, 237, 237, -1,
+ -1, 237, 237, 237, 237, 237, 237, 237,
+ 237, -1, 237, 237, 237, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 237, 237, 237, 237, 237,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 237, -1, -1, -1, -1,
+ 237, -1, 238, 238, 238, 238, 238, 238,
+ 238, 238, 238, 238, 238, 238, 238, 238,
+ 238, 238, 238, 238, 238, 238, 238, 238,
+ 238, -1, 238, 238, 238, 238, 238, 238,
+ -1, 238, 238, 238, 238, -1, 238, -1,
+ 238, 238, 238, -1, 238, 238, 238, 238,
+ 238, 238, -1, 238, 238, 238, 238, 238,
+ 238, 238, 238, 238, -1, 238, 238, 238,
+ 238, -1, -1, -1, -1, -1, -1, -1,
+ 238, -1, -1, 238, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 238, 238,
+ 238, 238, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 235, 235, 235,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 238, 238, 238, 238, -1, 237,
+ 238, 238, -1, 238, 238, 238, -1, -1,
+ -1, 238, 238, -1, 238, 238, -1, -1,
+ -1, -1, 238, -1, -1, -1, 238, 238,
+ 238, -1, 238, 238, -1, -1, 238, -1,
+ -1, -1, -1, -1, -1, -1, -1, 238,
+ 238, 238, 238, -1, -1, -1, 238, 238,
+ -1, -1, 238, 238, 238, 238, 238, 238,
+ 238, 238, -1, 238, 238, 238, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 238, 238, 238, 238,
+ 238, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 238, -1, -1, -1,
+ -1, 238, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 245, 245, 245, 245, 245,
+ 245, 245, 245, 245, 245, 245, 245, 245,
+ 245, -1, 245, 245, 245, 245, 245, 245,
+ -1, -1, -1, 245, 245, 245, 245, 245,
+ 245, -1, 245, 245, 245, 245, -1, 245,
+ -1, 245, 245, 245, -1, 245, 245, 245,
+ 245, 245, 245, -1, 245, 245, 245, 245,
+ 245, 245, 245, 245, 245, -1, 245, 245,
+ 245, 245, -1, -1, -1, -1, -1, -1,
+ -1, 245, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 236, 245,
+ 245, 245, 245, -1, -1, -1, -1, 236,
+ -1, 236, 236, 236, 236, 236, 236, 236,
+ 236, -1, 236, 236, 236, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 238, -1, -1, 236, 236, 236, 236, 236,
+ -1, -1, -1, 245, 245, 245, 245, -1,
+ -1, 245, 245, 245, 245, 245, 245, -1,
+ 236, -1, 245, 245, 245, 245, 245, -1,
+ -1, -1, -1, 245, -1, -1, -1, 245,
+ 245, 245, -1, 245, 245, -1, -1, 245,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 245, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 245, 245, 245, 245, 245,
+ 245, 245, 245, -1, 245, 245, 245, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 245, 245, 245,
+ 245, 245, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 245, -1, 245,
+ -1, 246, 246, 246, 246, 246, 246, 246,
+ 246, 246, 246, 246, 246, 246, 246, -1,
+ 246, 246, 246, 246, 246, 246, -1, -1,
+ -1, 246, 246, 246, 246, 246, 246, -1,
+ 246, 246, 246, 246, -1, 246, -1, 246,
+ 246, 246, -1, 246, 246, 246, 246, 246,
+ 246, -1, 246, 246, 246, 246, 246, 246,
+ 246, 246, 246, -1, 246, 246, 246, 246,
+ -1, -1, -1, -1, -1, -1, -1, 246,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 246, 246, 246,
+ 246, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 246, 246, 246, 246, -1, -1, 246,
+ 246, 245, 246, 246, 246, -1, -1, -1,
+ 246, 246, -1, 246, 246, -1, -1, -1,
+ -1, 246, 246, -1, -1, 246, 246, 246,
+ -1, 246, 246, -1, -1, 246, -1, -1,
+ -1, -1, -1, -1, -1, -1, 246, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 246, 246, 246, 246, 246, 246, 246,
+ 246, -1, 246, 246, 246, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 246, 246, 246, 246, 246,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 246, -1, -1, 246, 249,
+ 249, 249, 249, 249, 249, 249, 249, 249,
+ 249, -1, 249, 249, 249, 249, -1, -1,
+ -1, 249, 249, 249, 249, 249, -1, -1,
+ -1, 249, 249, 249, -1, -1, -1, 249,
+ -1, -1, -1, 249, 249, 249, 249, -1,
+ -1, -1, 249, 249, 249, -1, -1, -1,
+ -1, 249, 249, -1, 249, 249, 249, 249,
+ -1, -1, -1, -1, -1, -1, -1, 249,
+ -1, -1, 249, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 249, 249, 249,
+ 249, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 246,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 249, -1,
+ -1, -1, -1, -1, -1, 249, 249, -1,
+ -1, 249, 249, 249, 249, 249, 249, 249,
+ 249, -1, 249, 249, 249, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 249, 249, 249, 249, 249,
+ -1, -1, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250,
+ 249, 250, 250, 250, 250, 250, 250, -1,
+ -1, -1, 250, 250, 250, 250, 250, 250,
+ -1, 250, 250, 250, 250, -1, 250, -1,
+ 250, 250, 250, -1, 250, 250, 250, 250,
+ 250, 250, -1, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, -1, 250, 250, 250,
+ 250, -1, -1, -1, -1, -1, -1, -1,
+ 250, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 250, 250,
+ 250, 250, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 250, 250, 250, 250, -1, -1,
+ 250, 250, -1, 250, 250, 250, -1, -1,
+ -1, 250, 250, -1, 250, 250, -1, -1,
+ -1, -1, 250, -1, -1, -1, 250, 250,
+ 250, -1, 250, 250, -1, -1, 250, -1,
+ -1, -1, -1, -1, -1, -1, -1, 250,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 250, 250, 250, 250, 250, 250,
+ 250, 250, -1, 250, 250, 250, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 250, 250, 250, 250,
+ 250, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 250, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 256, 256, 256, 256, 256, 256, 256,
+ 256, 256, 256, 256, 256, 256, 256, -1,
+ 256, 256, 256, 256, 256, 256, -1, -1,
+ -1, 256, 256, 256, 256, 256, 256, -1,
+ 256, 256, 256, 256, -1, 256, -1, 256,
+ 256, 256, -1, 256, 256, 256, 256, 256,
+ 256, 256, 256, 256, 256, 256, 256, 256,
+ 256, 256, 256, 256, 256, 256, 256, 256,
+ -1, -1, -1, -1, -1, -1, -1, 256,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 256, 256, 256,
+ 256, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 250, 256, 256, 256, 256, -1, -1, 256,
+ 256, 256, 256, 256, 256, -1, -1, -1,
+ 256, 256, 256, 256, 256, -1, 256, 256,
+ -1, 256, 256, -1, -1, 256, 256, 256,
+ -1, 256, 256, -1, -1, 256, -1, -1,
+ -1, -1, -1, -1, -1, -1, 256, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 256, 256, 256, 256, 256, 256, 256,
+ 256, -1, 256, 256, 256, -1, -1, -1,
+ 249, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 249, 249, 249, 249, 249,
+ 249, 249, 249, -1, 249, 249, 249, -1,
+ -1, -1, -1, 256, 256, 256, 256, 256,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 256, -1, 256, 256, -1,
+ -1, -1, -1, -1, -1, 249, 249, 249,
+ 249, 249, -1, -1, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 249, 257, 257, 257, 257, 257,
+ 257, -1, -1, -1, 257, 257, 257, 257,
+ 257, 257, -1, 257, 257, 257, 257, -1,
+ 257, -1, 257, 257, 257, -1, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, -1, -1, -1, -1, -1,
+ -1, -1, 257, -1, -1, -1, -1, 259,
+ 259, 259, 259, 259, 259, -1, -1, -1,
+ 257, 257, 257, 257, -1, 257, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 259,
+ 259, 259, 259, 259, 259, -1, 259, -1,
+ -1, -1, -1, -1, -1, -1, 259, -1,
+ -1, -1, -1, -1, -1, 259, 259, -1,
+ -1, -1, -1, 259, 259, 259, -1, 259,
+ -1, -1, -1, -1, -1, -1, -1, 256,
+ -1, -1, -1, -1, 257, 257, 257, 257,
+ -1, -1, 257, 257, 257, 257, 257, 257,
+ -1, -1, -1, 257, 257, 257, 257, 257,
+ -1, 257, 257, 257, 257, 257, -1, -1,
+ 257, 257, 257, -1, 257, 257, -1, -1,
+ 257, -1, -1, -1, -1, -1, -1, -1,
+ -1, 257, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 257, 257, 257, 257,
+ 257, 257, 257, 257, -1, 257, 257, 257,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 259, 259, -1, -1, 259, -1, 259,
+ 259, -1, 259, -1, -1, -1, 259, 259,
+ 259, 259, 259, -1, -1, -1, 257, 257,
+ 257, 257, 257, 259, 259, 259, -1, 259,
+ 259, -1, -1, 259, -1, -1, 257, -1,
+ 257, 257, -1, 261, 261, 261, 261, 261,
+ 261, -1, -1, -1, -1, -1, -1, 259,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 259, 259, 261, 261, 261, 261, 261,
+ 261, -1, 261, -1, -1, -1, -1, -1,
+ -1, -1, 261, -1, -1, -1, -1, -1,
+ -1, 261, 261, -1, -1, -1, -1, 261,
+ 261, 261, -1, 261, -1, -1, -1, -1,
+ -1, 262, 262, 262, 262, 262, 262, -1,
+ -1, -1, -1, 259, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 262, 262, 262, 262, 262, 262, -1,
+ 262, -1, -1, -1, -1, -1, -1, -1,
+ 262, -1, -1, -1, -1, -1, -1, 262,
+ 262, -1, -1, -1, -1, 262, 262, 262,
+ -1, 262, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 263,
+ 263, 263, 263, 263, 263, 261, 261, -1,
+ -1, 261, 257, 261, 261, -1, 261, -1,
+ -1, -1, 261, 261, 261, 261, 261, 263,
+ 263, 263, 263, 263, 263, -1, 263, 261,
+ 261, 261, -1, 261, 261, -1, 263, 261,
+ -1, -1, -1, -1, -1, 263, 263, -1,
+ -1, -1, -1, 263, 263, 263, -1, 263,
+ -1, -1, -1, 261, -1, 264, 264, 264,
+ 264, 264, 264, 262, 262, 261, 261, 262,
+ -1, 262, 262, -1, 262, -1, -1, -1,
+ 262, 262, 262, 262, 262, 264, 264, 264,
+ 264, 264, 264, -1, 264, 262, 262, 262,
+ -1, 262, 262, -1, 264, 262, -1, -1,
+ -1, -1, -1, 264, 264, -1, -1, -1,
+ -1, 264, 264, 264, -1, 264, -1, 261,
+ -1, 262, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 262, 262, -1, -1, -1,
+ -1, -1, -1, 265, 265, 265, 265, 265,
+ 265, 263, 263, -1, -1, 263, -1, 263,
+ 263, -1, 263, -1, -1, -1, 263, 263,
+ 263, 263, 263, 265, 265, 265, 265, 265,
+ 265, -1, 265, 263, 263, 263, -1, 263,
+ 263, -1, 265, 263, -1, 262, -1, -1,
+ -1, 265, 265, -1, -1, -1, -1, 265,
+ 265, 265, -1, 265, -1, -1, -1, 263,
+ -1, -1, -1, -1, -1, -1, -1, 264,
+ 264, 263, 263, 264, -1, 264, 264, -1,
+ 264, -1, -1, -1, 264, 264, 264, 264,
+ 264, -1, -1, -1, -1, -1, -1, -1,
+ -1, 264, 264, 264, -1, 264, 264, -1,
+ -1, 264, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 263, -1, 264, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 264,
+ 264, -1, -1, -1, -1, -1, -1, 266,
+ 266, 266, 266, 266, 266, 265, 265, -1,
+ -1, 265, -1, 265, 265, -1, 265, -1,
+ -1, -1, 265, 265, 265, 265, 265, 266,
+ 266, 266, 266, 266, 266, 257, 266, 265,
+ 265, 265, -1, 265, 265, -1, 266, 265,
+ -1, 264, -1, -1, -1, 266, 266, -1,
+ -1, -1, -1, 266, 266, 266, -1, 266,
+ -1, -1, -1, 265, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 265, 265, -1,
+ -1, -1, -1, -1, -1, 267, 267, 267,
+ 267, 267, 267, 259, 259, -1, -1, 259,
+ -1, 259, 259, -1, 259, -1, -1, -1,
+ 259, 259, 259, 259, 259, 267, 267, 267,
+ 267, 267, 267, -1, 267, 259, 259, 259,
+ -1, 259, 259, -1, 267, 259, -1, 265,
+ -1, -1, -1, 267, 267, -1, -1, -1,
+ -1, 267, 267, 267, -1, 267, -1, -1,
+ -1, 259, -1, 268, 268, 268, 268, 268,
+ 268, 266, 266, -1, -1, 266, -1, 266,
+ 266, -1, 266, -1, -1, -1, 266, 266,
+ 266, 266, 266, 268, 268, 268, 268, 268,
+ 268, -1, 268, 266, 266, 266, -1, 266,
+ 266, -1, 268, 266, -1, -1, -1, -1,
+ -1, 268, 268, -1, -1, -1, -1, 268,
+ 268, 268, -1, 268, -1, 259, -1, 266,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 266, 266, -1, -1, -1, -1, -1,
+ -1, 269, 269, 269, 269, 269, 269, 267,
+ 267, -1, -1, 267, -1, 267, 267, -1,
+ 267, -1, -1, -1, 267, 267, 267, 267,
+ 267, 269, 269, 269, 269, 269, 269, -1,
+ 269, 267, 267, 267, -1, 267, 267, -1,
+ 269, 267, -1, 266, -1, -1, -1, 269,
+ 269, -1, -1, -1, -1, 269, 269, 269,
+ -1, 269, -1, -1, -1, 267, -1, 270,
+ 270, 270, 270, 270, 270, 268, 268, 267,
+ 267, 268, -1, 268, 268, -1, 268, -1,
+ -1, -1, 268, 268, 268, 268, 268, 270,
+ 270, 270, 270, 270, 270, -1, 270, 268,
+ 268, 268, -1, 268, 268, -1, 270, 268,
+ -1, -1, -1, -1, -1, 270, 270, -1,
+ -1, -1, -1, 270, 270, 270, -1, 270,
+ -1, 267, -1, 268, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 268, 268, -1,
+ -1, -1, -1, -1, -1, 271, 271, 271,
+ 271, 271, 271, 269, 269, -1, -1, 269,
+ -1, 269, 269, -1, 269, -1, -1, -1,
+ 269, 269, 269, 269, 269, 271, 271, 271,
+ 271, 271, 271, -1, 271, 269, 269, 269,
+ -1, 269, 269, -1, 271, 269, -1, 268,
+ -1, -1, -1, 271, 271, -1, -1, -1,
+ -1, 271, 271, 271, -1, 271, -1, -1,
+ -1, 269, -1, 272, 272, 272, 272, 272,
+ 272, 270, 270, 269, 269, 270, -1, 270,
+ 270, -1, 270, -1, -1, -1, 270, 270,
+ 270, 270, 270, 272, 272, 272, 272, 272,
+ 272, -1, 272, 270, 270, 270, -1, 270,
+ 270, -1, 272, 270, -1, -1, -1, -1,
+ -1, 272, 272, -1, -1, -1, -1, 272,
+ 272, 272, -1, 272, -1, 269, -1, 270,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 270, 270, -1, -1, -1, -1, -1,
+ -1, 273, 273, 273, 273, 273, 273, 271,
+ 271, -1, -1, 271, -1, 271, 271, -1,
+ 271, -1, -1, -1, 271, 271, 271, 271,
+ 271, 273, 273, 273, 273, 273, 273, -1,
+ 273, 271, 271, 271, -1, 271, 271, -1,
+ 273, 271, -1, 270, -1, -1, -1, 273,
+ 273, -1, -1, -1, -1, 273, 273, 273,
+ -1, 273, -1, -1, -1, 271, -1, 274,
+ 274, 274, 274, 274, 274, 272, 272, 271,
+ 271, 272, -1, 272, 272, -1, 272, -1,
+ -1, -1, 272, 272, 272, 272, 272, 274,
+ 274, 274, 274, 274, 274, -1, 274, 272,
+ 272, 272, -1, 272, 272, -1, 274, 272,
+ -1, -1, -1, -1, -1, 274, 274, -1,
+ -1, -1, -1, 274, 274, 274, -1, 274,
+ -1, 271, -1, 272, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 272, 272, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 273, 273, -1, -1, 273,
+ -1, 273, 273, -1, 273, -1, -1, -1,
+ 273, 273, 273, 273, 273, -1, -1, -1,
+ -1, -1, -1, -1, -1, 273, 273, 273,
+ -1, 273, 273, -1, -1, 273, -1, 272,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 273, -1, -1, -1, -1, -1, -1,
+ -1, 274, 274, 273, 273, 274, -1, 274,
+ 274, -1, 274, -1, -1, -1, 274, 274,
+ 274, 274, 274, -1, -1, -1, -1, -1,
+ -1, -1, -1, 274, 274, 274, -1, 274,
+ 274, -1, -1, 274, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 273, -1, 274,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 274, 274, -1, -1, -1, -1, -1,
+ -1, -1, 276, 276, 276, 276, 276, 276,
+ 276, 276, 276, 276, 276, 276, 276, 276,
+ 276, 276, 276, 276, 276, 276, 276, 276,
+ 276, -1, 276, 276, 276, 276, 276, 276,
+ -1, 276, 276, 276, 276, 276, 276, -1,
+ 276, 276, 276, 274, 276, 276, 276, 276,
+ 276, 276, 276, 276, 276, 276, 276, 276,
+ 276, 276, 276, 276, -1, 276, 276, 276,
+ 276, -1, -1, -1, -1, -1, -1, -1,
+ 276, -1, -1, 276, -1, -1, 276, -1,
+ -1, -1, -1, -1, -1, -1, 276, 276,
+ 276, 276, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 276, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 276, 276, 276, 276, -1, -1,
+ 276, 276, 276, 276, 276, 276, -1, -1,
+ -1, 276, 276, 276, 276, 276, -1, -1,
+ 276, -1, 276, -1, -1, 276, 276, 276,
+ 276, -1, 276, 276, -1, -1, 276, -1,
+ -1, -1, -1, -1, 276, -1, 276, 276,
+ 276, 276, 276, -1, -1, -1, 276, 276,
+ -1, 276, 276, 276, 276, 276, 276, 276,
+ 276, 276, -1, 276, 276, 276, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 276, 276, 276, 276,
+ 276, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 276, -1, 276, -1,
+ 276, 276, -1, 279, 279, 279, 279, 279,
+ 279, 279, 279, 279, 279, 279, 279, 279,
+ 279, 279, 279, 279, 279, 279, 279, 279,
+ 279, 279, -1, 279, 279, 279, 279, 279,
+ 279, -1, 279, 279, 279, 279, -1, 279,
+ -1, 279, 279, 279, -1, 279, 279, 279,
+ 279, 279, 279, -1, 279, 279, 279, 279,
+ 279, 279, 279, 279, 279, 279, 279, 279,
+ 279, 279, 279, -1, 279, -1, -1, -1,
+ -1, 279, 279, 279, 279, 279, -1, -1,
+ 279, 279, -1, 279, 279, 279, 279, 279,
+ 279, 279, 279, 279, 279, 279, 279, -1,
+ -1, -1, -1, -1, 279, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 279, 279, 279, 279, -1,
+ 276, 279, 279, 279, 279, 279, 279, -1,
+ -1, -1, 279, 279, 279, 279, 279, -1,
+ -1, -1, -1, 279, -1, -1, -1, 279,
+ 279, 279, -1, 279, 279, -1, -1, 279,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 279, 279, 279, 279, 279, -1, 279, 279,
+ 279, -1, -1, 279, 279, 279, 279, 279,
+ 279, 279, 279, -1, 279, 279, 279, -1,
+ -1, -1, 279, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 279, 279, -1,
+ -1, 279, -1, -1, -1, -1, 279, -1,
+ -1, -1, -1, 279, -1, 279, 279, 279,
+ 279, 279, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 279, -1, 279,
+ -1, -1, 279, 279, -1, -1, -1, 279,
+ -1, 279, -1, 279, 280, 280, 280, 280,
+ 280, 280, 280, 280, 280, 280, 280, 280,
+ 280, 280, 280, 280, 280, 280, 280, 280,
+ 280, 280, 280, -1, 280, 280, 280, 280,
+ 280, 280, -1, 280, 280, 280, 280, -1,
+ 280, -1, 280, 280, 280, 280, 280, 280,
+ 280, 280, 280, 280, -1, 280, 280, 280,
+ 280, 280, 280, 280, 280, 280, 280, 280,
+ 280, 280, 280, 280, -1, 280, -1, -1,
+ 280, -1, 280, 280, 280, 280, 280, -1,
+ -1, 280, 280, -1, 280, 280, 280, 280,
+ 280, 280, 280, 280, 280, 280, 280, 280,
+ -1, -1, -1, -1, -1, 280, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 279, -1, -1, 280, 280, 280, 280,
+ -1, -1, 280, 280, 280, 280, 280, 280,
+ -1, -1, -1, 280, 280, 280, 280, 280,
+ -1, -1, -1, -1, 280, -1, -1, -1,
+ 280, 280, 280, -1, 280, 280, -1, -1,
+ 280, -1, -1, -1, -1, -1, -1, -1,
+ -1, 280, 280, 280, 280, 280, -1, 280,
+ 280, 280, 280, -1, 280, 280, 280, 280,
+ 280, 280, 280, 280, 280, 280, 280, 280,
+ -1, -1, -1, 280, 280, -1, -1, -1,
+ 280, 280, -1, 280, -1, -1, 280, 280,
+ -1, -1, 280, -1, 280, 280, -1, 280,
+ -1, 280, 280, -1, 280, -1, 280, 280,
+ 280, 280, 280, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 280, -1,
+ 280, -1, -1, 280, 280, -1, 280, -1,
+ 280, -1, 280, -1, 280, 281, 281, 281,
+ 281, 281, 281, 281, 281, 281, 281, 281,
+ 281, 281, 281, 281, 281, 281, 281, 281,
+ 281, 281, 281, 281, -1, 281, 281, 281,
+ 281, 281, 281, -1, 281, 281, 281, 281,
+ -1, 281, -1, 281, 281, 281, 281, 281,
+ 281, 281, 281, 281, 281, -1, 281, 281,
+ 281, 281, 281, 281, 281, 281, 281, 281,
+ 281, 281, 281, 281, 281, -1, 281, -1,
+ -1, 281, -1, 281, 281, 281, 281, 281,
+ -1, -1, 281, 281, -1, 281, 281, 281,
+ 281, 281, 281, 281, 281, 281, 281, 281,
+ 281, -1, -1, -1, -1, -1, 281, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 280, -1, -1, 281, 281, 281,
+ 281, -1, -1, 281, 281, 281, 281, 281,
+ 281, -1, -1, -1, 281, 281, 281, 281,
+ 281, -1, -1, -1, -1, 281, -1, -1,
+ -1, 281, 281, 281, -1, 281, 281, -1,
+ -1, 281, -1, -1, -1, -1, -1, -1,
+ -1, -1, 281, 281, 281, 281, 281, -1,
+ 281, 281, 281, 281, -1, 281, 281, 281,
+ 281, 281, 281, 281, 281, 281, 281, 281,
+ 281, -1, -1, -1, 281, 281, -1, -1,
+ -1, 281, 281, -1, 281, -1, -1, 281,
+ 281, -1, -1, 281, -1, 281, 281, -1,
+ 281, -1, 281, 281, -1, 281, -1, 281,
+ 281, 281, 281, 281, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 281,
+ -1, 281, -1, -1, 281, 281, -1, 281,
+ -1, 281, -1, 281, -1, 281, 283, 283,
+ 283, 283, 283, 283, 283, 283, 283, 283,
+ 283, 283, 283, 283, 283, 283, 283, 283,
+ 283, 283, 283, 283, 283, -1, 283, 283,
+ 283, 283, 283, 283, -1, 283, 283, 283,
+ 283, -1, 283, -1, 283, 283, 283, -1,
+ 283, 283, 283, 283, 283, 283, -1, 283,
+ 283, 283, 283, 283, 283, 283, 283, 283,
+ 283, 283, 283, 283, 283, 283, -1, 283,
+ -1, -1, -1, -1, 283, 283, 283, 283,
+ 283, -1, -1, 283, 283, -1, 283, 283,
+ 283, 283, 283, 283, 283, 283, 283, 283,
+ 283, 283, -1, -1, -1, -1, -1, 283,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 281, -1, -1, 283, 283,
+ 283, 283, -1, -1, 283, 283, 283, 283,
+ 283, 283, -1, -1, -1, 283, 283, 283,
+ 283, 283, -1, -1, -1, -1, 283, -1,
+ -1, -1, 283, 283, 283, -1, 283, 283,
+ -1, -1, 283, -1, -1, -1, -1, -1,
+ -1, -1, -1, 283, 283, 283, 283, 283,
+ -1, 283, 283, 283, -1, -1, 283, 283,
+ 283, 283, 283, 283, 283, 283, -1, 283,
+ 283, 283, -1, -1, -1, 283, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 283, 283, -1, -1, 283, -1, -1, -1,
+ -1, 283, -1, -1, -1, -1, 283, -1,
+ 283, 283, 283, 283, 283, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 283, -1, 283, -1, -1, 283, 283, -1,
+ -1, -1, 283, -1, 283, -1, 283, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, -1, 284,
+ 284, 284, 284, 284, 284, -1, 284, 284,
+ 284, 284, -1, 284, -1, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, -1,
+ 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, 284, 284, 284, 284, -1,
+ 284, -1, -1, 284, -1, 284, 284, 284,
+ 284, 284, -1, -1, 284, 284, -1, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, -1, -1, -1, -1, -1,
+ 284, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 283, -1, -1, 284,
+ 284, 284, 284, -1, -1, 284, 284, 284,
+ 284, 284, 284, -1, -1, -1, 284, 284,
+ 284, 284, 284, -1, -1, -1, -1, 284,
+ 284, -1, -1, 284, 284, 284, -1, 284,
+ 284, -1, -1, 284, -1, -1, -1, -1,
+ -1, -1, -1, -1, 284, 284, 284, 284,
+ 284, -1, 284, 284, 284, 284, -1, 284,
+ 284, 284, 284, 284, 284, 284, 284, 284,
+ 284, 284, 284, -1, -1, -1, 284, 284,
+ -1, -1, -1, 284, 284, -1, 284, -1,
+ -1, 284, 284, -1, -1, 284, -1, 284,
+ 284, -1, 284, -1, 284, 284, -1, 284,
+ -1, 284, 284, 284, 284, 284, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 284, -1, 284, 284, -1, 284, 284,
+ -1, 284, -1, 284, -1, 284, -1, 284,
+ 285, 285, 285, 285, 285, 285, 285, 285,
+ 285, 285, 285, 285, 285, 285, 285, 285,
+ 285, 285, 285, 285, 285, 285, 285, -1,
+ 285, 285, 285, 285, 285, 285, -1, 285,
+ 285, 285, 285, -1, 285, -1, 285, 285,
+ 285, 285, 285, 285, 285, 285, 285, 285,
+ -1, 285, 285, 285, 285, 285, 285, 285,
+ 285, 285, 285, 285, 285, 285, 285, 285,
+ -1, 285, -1, -1, 285, -1, 285, 285,
+ 285, 285, 285, -1, -1, 285, 285, -1,
+ 285, 285, 285, 285, 285, 285, 285, 285,
+ 285, 285, 285, 285, -1, -1, -1, -1,
+ -1, 285, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 284, -1, -1,
+ 285, 285, 285, 285, -1, -1, 285, 285,
+ 285, 285, 285, 285, -1, -1, -1, 285,
+ 285, 285, 285, 285, -1, -1, -1, -1,
+ 285, 285, -1, -1, 285, 285, 285, -1,
+ 285, 285, -1, -1, 285, -1, -1, -1,
+ -1, -1, -1, -1, -1, 285, 285, 285,
+ 285, 285, -1, 285, 285, 285, 285, -1,
+ 285, 285, 285, 285, 285, 285, 285, 285,
+ 285, 285, 285, 285, -1, -1, -1, 285,
+ 285, -1, -1, -1, 285, 285, -1, 285,
+ -1, -1, 285, 285, -1, -1, 285, -1,
+ 285, 285, -1, 285, -1, 285, 285, -1,
+ 285, -1, 285, 285, 285, 285, 285, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 285, -1, 285, 285, -1, 285,
+ 285, -1, 285, -1, 285, -1, 285, -1,
+ 285, 286, 286, 286, 286, 286, 286, 286,
+ 286, 286, 286, 286, 286, 286, 286, 286,
+ 286, 286, 286, 286, 286, 286, 286, 286,
+ -1, 286, 286, 286, 286, 286, 286, -1,
+ 286, 286, 286, 286, -1, 286, -1, 286,
+ 286, 286, -1, 286, 286, 286, 286, 286,
+ 286, -1, 286, 286, 286, 286, 286, 286,
+ 286, 286, 286, 286, 286, 286, 286, 286,
+ 286, -1, 286, -1, -1, -1, -1, 286,
+ 286, 286, 286, 286, -1, -1, 286, 286,
+ -1, 286, 286, 286, 286, 286, 286, 286,
+ 286, 286, 286, 286, 286, -1, -1, -1,
+ -1, -1, 286, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 285, -1,
+ -1, 286, 286, 286, 286, -1, -1, 286,
+ 286, 286, 286, 286, 286, -1, -1, -1,
+ 286, 286, 286, 286, 286, -1, -1, -1,
+ -1, 286, -1, -1, -1, 286, 286, 286,
+ -1, 286, 286, -1, -1, 286, -1, -1,
+ -1, -1, -1, -1, -1, -1, 286, 286,
+ 286, 286, 286, -1, 286, 286, 286, -1,
+ -1, 286, 286, 286, 286, 286, 286, 286,
+ 286, -1, 286, 286, 286, -1, -1, -1,
+ 286, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 286, 286, -1, -1, 286,
+ -1, -1, -1, -1, 286, -1, -1, -1,
+ -1, 286, -1, 286, 286, 286, 286, 286,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 286, -1, 286, -1, -1,
+ 286, 286, -1, -1, -1, 286, -1, 286,
+ -1, 286, 290, 290, 290, 290, -1, 290,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 290, 290, 290, 290, 290, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 290, -1,
+ -1, -1, 290, 290, 290, 290, -1, -1,
+ -1, 290, 290, 290, -1, -1, -1, -1,
+ 290, 290, -1, 290, 290, 290, 290, 290,
+ -1, -1, -1, -1, -1, -1, 290, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 290, 290, 290, 290,
+ -1, -1, 290, 290, -1, -1, -1, -1,
+ -1, 290, -1, -1, -1, -1, -1, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, -1, 292,
+ 292, 292, 292, 292, 292, -1, 292, 292,
+ 292, 292, -1, 292, -1, 292, 292, 292,
+ -1, 292, 292, 292, 292, 292, 292, 286,
+ 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, -1,
+ 292, -1, -1, -1, -1, 292, 292, 292,
+ 292, 292, -1, -1, 292, 292, -1, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, -1, -1, -1, -1, -1,
+ 292, -1, -1, 290, 290, 290, 290, 290,
+ -1, 290, 290, 290, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 290, 290, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 290, -1, 290, 290, 290, 290, 290, 292,
+ 292, 292, 292, -1, -1, 292, 292, 292,
+ 292, 292, 292, -1, -1, -1, 292, 292,
+ 292, 292, 292, -1, -1, -1, -1, 292,
+ 290, -1, -1, 292, 292, 292, -1, 292,
+ 292, -1, -1, 292, -1, -1, -1, -1,
+ -1, -1, -1, -1, 292, 292, 292, 292,
+ 292, -1, 292, 292, 292, -1, -1, 292,
+ 292, 292, 292, 292, 292, 292, 292, -1,
+ 292, 292, 292, -1, -1, -1, 292, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 292, 292, -1, -1, 292, -1, -1,
+ -1, -1, 292, -1, -1, -1, -1, 292,
+ -1, 292, 292, 292, 292, 292, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 292, -1, 292, -1, -1, 292, 292,
+ -1, -1, -1, 292, -1, 292, -1, 292,
+ 293, 293, 293, 293, 293, 293, 293, 293,
+ 293, 293, 293, 293, 293, 293, 293, 293,
+ 293, 293, 293, 293, 293, 293, 293, -1,
+ 293, 293, 293, 293, 293, 293, -1, 293,
+ 293, 293, 293, -1, 293, -1, 293, 293,
+ 293, -1, 293, 293, 293, 293, 293, 293,
+ -1, 293, 293, 293, 293, 293, 293, 293,
+ 293, 293, 293, 293, 293, 293, 293, 293,
+ -1, 293, -1, -1, -1, -1, 293, 293,
+ 293, 293, 293, -1, -1, 293, 293, -1,
+ 293, 293, 293, 293, 293, 293, 293, 293,
+ 293, 293, 293, 293, -1, -1, -1, -1,
+ -1, 293, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 292, -1, -1,
+ 293, 293, 293, 293, -1, -1, 293, 293,
+ 293, 293, 293, 293, -1, -1, -1, 293,
+ 293, 293, 293, 293, -1, -1, -1, -1,
+ 293, -1, -1, -1, 293, 293, 293, -1,
+ 293, 293, -1, -1, 293, -1, -1, -1,
+ -1, -1, -1, -1, -1, 293, 293, 293,
+ 293, 293, -1, 293, 293, 293, -1, -1,
+ 293, 293, 293, 293, 293, 293, 293, 293,
+ -1, 293, 293, 293, -1, -1, -1, 293,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 293, 293, -1, -1, 293, -1,
+ -1, -1, -1, 293, -1, -1, -1, -1,
+ 293, -1, 293, 293, 293, 293, 293, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 293, -1, 293, -1, -1, 293,
+ 293, -1, -1, -1, 293, -1, 293, -1,
+ 293, 295, 295, 295, 295, 295, 295, 295,
+ 295, 295, 295, 295, 295, 295, 295, -1,
+ 295, 295, 295, 295, 295, 295, -1, -1,
+ -1, 295, 295, 295, 295, 295, 295, -1,
+ 295, 295, 295, 295, -1, 295, -1, 295,
+ 295, 295, -1, 295, 295, 295, 295, 295,
+ 295, -1, 295, 295, 295, 295, 295, 295,
+ 295, 295, 295, -1, 295, 295, 295, 295,
+ -1, -1, -1, -1, 295, -1, -1, 295,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 295, -1, -1, -1, -1, 295, 295, 295,
+ 295, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 293, -1,
+ -1, 295, 295, 295, 295, -1, -1, 295,
+ 295, 295, 295, 295, 295, -1, -1, -1,
+ 295, 295, 295, 295, 295, -1, -1, -1,
+ -1, 295, 295, -1, -1, 295, 295, 295,
+ -1, 295, 295, -1, -1, 295, -1, -1,
+ -1, -1, -1, -1, -1, -1, 295, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 295, 295, 295, 295, 295, 295, 295,
+ 295, -1, 295, 295, 295, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 295, 295, 295, 295, 295,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 295, -1, 295, 295, -1,
+ -1, -1, 296, 296, 296, 296, 296, 296,
+ 296, 296, 296, 296, 296, 296, 296, 296,
+ -1, 296, 296, 296, 296, 296, 296, -1,
+ -1, -1, 296, 296, 296, 296, 296, 296,
+ -1, 296, 296, 296, 296, -1, 296, -1,
+ 296, 296, 296, -1, 296, 296, 296, 296,
+ 296, 296, -1, 296, 296, 296, 296, 296,
+ 296, 296, 296, 296, -1, 296, 296, 296,
+ 296, -1, -1, -1, -1, -1, -1, -1,
+ 296, -1, -1, -1, -1, -1, -1, -1,
+ -1, 296, -1, -1, -1, -1, 296, 296,
+ 296, 296, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 296, 296, 296, 296, -1, 295,
+ 296, 296, 296, 296, 296, 296, -1, -1,
+ -1, 296, 296, 296, 296, 296, -1, -1,
+ -1, -1, 296, 296, -1, -1, 296, 296,
+ 296, -1, 296, 296, -1, -1, 296, -1,
+ -1, -1, -1, -1, -1, -1, -1, 296,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 296, 296, 296, 296, 296, 296,
+ 296, 296, -1, 296, 296, 296, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 296, 296, 296, 296,
+ 296, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 296, -1, 296, 296,
+ -1, -1, -1, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 298,
+ 298, 298, -1, 298, 298, 298, 298, 298,
+ 298, -1, 298, 298, 298, 298, -1, 298,
+ -1, 298, 298, 298, -1, 298, 298, 298,
+ 298, 298, 298, -1, 298, 298, 298, 298,
+ 298, 298, 298, 298, 298, -1, 298, 298,
+ 298, 298, -1, -1, -1, -1, -1, -1,
+ -1, 298, -1, -1, 298, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 298,
+ 298, 298, 298, -1, -1, 298, 298, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 298, 298, 298, 298, -1,
+ 296, 298, 298, 298, 298, 298, 298, -1,
+ -1, -1, 298, 298, 298, 298, 298, -1,
+ -1, -1, -1, 298, -1, -1, -1, 298,
+ 298, 298, -1, 298, 298, -1, -1, 298,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 298, 298, 298, 298, -1, -1, -1, 298,
+ 298, -1, -1, 298, 298, 298, 298, 298,
+ 298, 298, 298, -1, 298, 298, 298, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 298, 298, 298,
+ 298, 298, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 298, -1, 298,
+ -1, -1, 298, -1, 299, 299, 299, 299,
+ 299, 299, 299, 299, 299, 299, 299, 299,
+ 299, 299, 299, 299, 299, 299, 299, 299,
+ 299, 299, 299, -1, 299, 299, 299, 299,
+ 299, 299, -1, 299, 299, 299, 299, -1,
+ 299, -1, 299, 299, 299, -1, 299, 299,
+ 299, 299, 299, 299, -1, 299, 299, 299,
+ 299, 299, 299, 299, 299, 299, 299, 299,
+ 299, 299, 299, 299, -1, -1, -1, -1,
+ -1, -1, 299, 299, 299, 299, -1, -1,
+ -1, 299, 299, -1, 299, 299, 299, 299,
+ 299, 299, 299, 299, -1, -1, 299, 299,
+ -1, -1, -1, -1, -1, 299, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 299, 299, 299, 299,
+ -1, 298, 299, 299, 299, 299, 299, 299,
+ -1, -1, -1, 299, 299, 299, 299, 299,
+ -1, -1, -1, -1, 299, -1, -1, -1,
+ 299, 299, 299, -1, 299, 299, -1, -1,
+ 299, -1, -1, -1, -1, -1, -1, -1,
+ -1, 299, 299, 299, 299, 299, -1, 299,
+ 299, 299, -1, -1, 299, 299, 299, 299,
+ 299, 299, 299, 299, -1, 299, 299, 299,
+ -1, -1, -1, 299, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 299, 299,
+ -1, -1, 299, -1, -1, -1, -1, 299,
+ -1, -1, -1, -1, 299, -1, 299, 299,
+ 299, 299, 299, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 299, -1,
+ 299, -1, -1, 299, 299, -1, -1, -1,
+ 299, -1, 299, -1, 299, 300, 300, 300,
+ 300, 300, 300, 300, 300, 300, 300, 300,
+ 300, 300, 300, 300, 300, 300, 300, 300,
+ 300, 300, 300, 300, -1, 300, 300, 300,
+ 300, 300, 300, -1, 300, 300, 300, 300,
+ -1, 300, -1, 300, 300, 300, -1, 300,
+ 300, 300, 300, 300, 300, -1, 300, 300,
+ 300, 300, 300, 300, 300, 300, 300, 300,
+ 300, 300, 300, 300, 300, -1, -1, -1,
+ -1, -1, -1, 300, 300, 300, 300, -1,
+ -1, -1, 300, 300, -1, 300, 300, 300,
+ 300, 300, 300, 300, 300, -1, -1, 300,
+ 300, -1, -1, -1, -1, -1, 300, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 299, -1, -1, 300, 300, 300,
+ 300, -1, -1, 300, 300, 300, 300, 300,
+ 300, -1, -1, -1, 300, 300, 300, 300,
+ 300, -1, -1, -1, -1, 300, -1, -1,
+ -1, 300, 300, 300, -1, 300, 300, -1,
+ -1, 300, -1, -1, -1, -1, -1, -1,
+ -1, -1, 300, 300, 300, 300, 300, -1,
+ 300, 300, 300, -1, -1, 300, 300, 300,
+ 300, 300, 300, 300, 300, -1, 300, 300,
+ 300, -1, -1, -1, 300, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 300,
+ 300, -1, -1, 300, -1, -1, -1, -1,
+ 300, -1, -1, -1, -1, 300, -1, 300,
+ 300, 300, 300, 300, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 300,
+ -1, 300, -1, -1, 300, 300, -1, -1,
+ -1, 300, -1, 300, -1, 300, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, -1, 301, 301,
+ 301, 301, 301, 301, -1, 301, 301, 301,
+ 301, -1, 301, -1, 301, 301, 301, -1,
+ 301, 301, 301, 301, 301, 301, -1, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, 301, 301, 301, 301, -1, -1,
+ -1, -1, -1, -1, 301, 301, 301, 301,
+ -1, -1, -1, 301, 301, -1, 301, 301,
+ 301, 301, 301, 301, 301, 301, 301, 301,
+ 301, 301, -1, -1, -1, -1, -1, 301,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 300, -1, -1, 301, 301,
+ 301, 301, -1, -1, 301, 301, 301, 301,
+ 301, 301, -1, -1, -1, 301, 301, 301,
+ 301, 301, -1, -1, -1, -1, 301, -1,
+ -1, -1, 301, 301, 301, -1, 301, 301,
+ -1, -1, 301, -1, -1, -1, -1, -1,
+ -1, -1, -1, 301, 301, 301, 301, 301,
+ -1, 301, 301, 301, -1, -1, 301, 301,
+ 301, 301, 301, 301, 301, 301, -1, 301,
+ 301, 301, -1, -1, -1, 301, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 301, 301, -1, -1, 301, -1, -1, -1,
+ -1, 301, -1, -1, -1, -1, 301, -1,
+ 301, 301, 301, 301, 301, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 301, -1, 301, -1, -1, 301, 301, -1,
+ -1, -1, 301, -1, 301, -1, 301, 302,
+ 302, 302, 302, 302, 302, 302, 302, 302,
+ 302, 302, 302, 302, 302, 302, 302, 302,
+ 302, 302, 302, 302, 302, 302, -1, 302,
+ 302, 302, 302, 302, 302, -1, 302, 302,
+ 302, 302, -1, 302, -1, 302, 302, 302,
+ -1, 302, 302, 302, 302, 302, 302, -1,
+ 302, 302, 302, 302, 302, 302, 302, 302,
+ 302, 302, 302, 302, 302, 302, 302, -1,
+ -1, -1, -1, -1, -1, 302, 302, 302,
+ 302, -1, -1, -1, 302, 302, -1, 302,
+ 302, 302, 302, 302, 302, 302, 302, 302,
+ 302, 302, 302, -1, -1, -1, -1, -1,
+ 302, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 301, -1, -1, 302,
+ 302, 302, 302, -1, -1, 302, 302, 302,
+ 302, 302, 302, -1, -1, -1, 302, 302,
+ 302, 302, 302, -1, -1, -1, -1, 302,
+ -1, -1, -1, 302, 302, 302, -1, 302,
+ 302, -1, -1, 302, -1, -1, -1, -1,
+ -1, -1, -1, -1, 302, 302, 302, 302,
+ 302, -1, 302, 302, 302, -1, -1, 302,
+ 302, 302, 302, 302, 302, 302, 302, -1,
+ 302, 302, 302, -1, -1, -1, 302, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 302, 302, -1, -1, 302, -1, -1,
+ -1, -1, 302, -1, -1, -1, -1, 302,
+ -1, 302, 302, 302, 302, 302, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 302, -1, 302, -1, -1, 302, 302,
+ -1, -1, -1, 302, -1, 302, -1, 302,
+ 303, 303, 303, 303, 303, 303, 303, 303,
+ 303, 303, 303, 303, 303, 303, 303, 303,
+ 303, 303, 303, 303, 303, 303, 303, -1,
+ 303, 303, 303, 303, 303, 303, -1, 303,
+ 303, 303, 303, -1, 303, -1, 303, 303,
+ 303, -1, 303, 303, 303, 303, 303, 303,
+ -1, 303, 303, 303, 303, 303, 303, 303,
+ 303, 303, 303, 303, 303, 303, 303, 303,
+ -1, -1, -1, -1, -1, -1, 303, 303,
+ 303, 303, -1, -1, -1, 303, 303, -1,
+ 303, 303, 303, 303, 303, 303, 303, 303,
+ 303, 303, 303, 303, -1, -1, -1, -1,
+ -1, 303, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 302, -1, -1,
+ 303, 303, 303, 303, -1, -1, 303, 303,
+ 303, 303, 303, 303, -1, -1, -1, 303,
+ 303, 303, 303, 303, -1, -1, -1, -1,
+ 303, -1, -1, -1, 303, 303, 303, -1,
+ 303, 303, -1, -1, 303, -1, -1, -1,
+ -1, -1, -1, -1, -1, 303, 303, 303,
+ 303, 303, -1, 303, 303, 303, -1, -1,
+ 303, 303, 303, 303, 303, 303, 303, 303,
+ -1, 303, 303, 303, -1, -1, -1, 303,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 303, 303, -1, -1, 303, -1,
+ -1, -1, -1, 303, -1, -1, -1, -1,
+ 303, -1, 303, 303, 303, 303, 303, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 303, -1, 303, -1, -1, 303,
+ 303, -1, -1, -1, 303, -1, 303, -1,
+ 303, 304, 304, 304, 304, 304, 304, 304,
+ 304, 304, 304, 304, 304, 304, 304, 304,
+ 304, 304, 304, 304, 304, 304, 304, 304,
+ -1, 304, 304, 304, 304, 304, 304, -1,
+ 304, 304, 304, 304, -1, 304, -1, 304,
+ 304, 304, -1, 304, 304, 304, 304, 304,
+ 304, -1, 304, 304, 304, 304, 304, 304,
+ 304, 304, 304, 304, 304, 304, 304, 304,
+ 304, -1, -1, -1, -1, -1, -1, 304,
+ 304, 304, 304, -1, -1, -1, 304, 304,
+ -1, 304, 304, 304, 304, 304, 304, 304,
+ 304, 304, 304, 304, 304, -1, -1, -1,
+ -1, -1, 304, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 303, -1,
+ -1, 304, 304, 304, 304, -1, -1, 304,
+ 304, 304, 304, 304, 304, -1, -1, -1,
+ 304, 304, 304, 304, 304, -1, -1, -1,
+ -1, 304, -1, -1, -1, 304, 304, 304,
+ -1, 304, 304, -1, -1, 304, -1, -1,
+ -1, -1, -1, -1, -1, -1, 304, 304,
+ 304, 304, 304, -1, 304, 304, 304, -1,
+ -1, 304, 304, 304, 304, 304, 304, 304,
+ 304, -1, 304, 304, 304, -1, -1, -1,
+ 304, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 304, 304, -1, -1, 304,
+ -1, -1, -1, -1, 304, -1, -1, -1,
+ -1, 304, -1, 304, 304, 304, 304, 304,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 304, -1, 304, -1, -1,
+ 304, 304, -1, -1, -1, 304, -1, 304,
+ -1, 304, 305, 305, 305, 305, 305, 305,
+ 305, 305, 305, 305, 305, 305, 305, 305,
+ 305, 305, 305, 305, 305, 305, 305, 305,
+ 305, -1, 305, 305, 305, 305, 305, 305,
+ -1, 305, 305, 305, 305, -1, 305, -1,
+ 305, 305, 305, -1, 305, 305, 305, 305,
+ 305, 305, -1, 305, 305, 305, 305, 305,
+ 305, 305, 305, 305, 305, 305, 305, 305,
+ 305, 305, -1, -1, -1, -1, -1, -1,
+ 305, 305, 305, 305, -1, -1, -1, 305,
+ 305, -1, 305, 305, 305, 305, 305, 305,
+ 305, 305, 305, 305, 305, 305, -1, -1,
+ -1, -1, -1, 305, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 304,
+ -1, -1, 305, 305, 305, 305, -1, -1,
+ 305, 305, 305, 305, 305, 305, -1, -1,
+ -1, 305, 305, 305, 305, 305, -1, -1,
+ -1, -1, 305, -1, -1, -1, 305, 305,
+ 305, -1, 305, 305, -1, -1, 305, -1,
+ -1, -1, -1, -1, -1, -1, -1, 305,
+ 305, 305, 305, 305, -1, 305, 305, 305,
+ -1, -1, 305, 305, 305, 305, 305, 305,
+ 305, 305, -1, 305, 305, 305, -1, -1,
+ -1, 305, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 305, 305, -1, -1,
+ 305, -1, -1, -1, -1, 305, -1, -1,
+ -1, -1, 305, -1, 305, 305, 305, 305,
+ 305, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 305, -1, 305, -1,
+ -1, 305, 305, -1, -1, -1, 305, -1,
+ 305, -1, 305, 306, 306, 306, 306, 306,
+ 306, 306, 306, 306, 306, 306, 306, 306,
+ 306, 306, 306, 306, 306, 306, 306, 306,
+ 306, 306, -1, 306, 306, 306, 306, 306,
+ 306, -1, 306, 306, 306, 306, -1, 306,
+ -1, 306, 306, 306, -1, 306, 306, 306,
+ 306, 306, 306, -1, 306, 306, 306, 306,
+ 306, 306, 306, 306, 306, 306, 306, 306,
+ 306, 306, 306, -1, -1, -1, -1, -1,
+ -1, 306, 306, 306, 306, -1, -1, -1,
+ 306, 306, -1, 306, 306, 306, 306, 306,
+ 306, 306, 306, 306, 306, 306, 306, -1,
+ -1, -1, -1, -1, 306, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 305, -1, -1, 306, 306, 306, 306, -1,
+ -1, 306, 306, 306, 306, 306, 306, -1,
+ -1, -1, 306, 306, 306, 306, 306, -1,
+ -1, -1, -1, 306, -1, -1, -1, 306,
+ 306, 306, -1, 306, 306, -1, -1, 306,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 306, 306, 306, 306, 306, -1, 306, 306,
+ 306, -1, -1, 306, 306, 306, 306, 306,
+ 306, 306, 306, -1, 306, 306, 306, -1,
+ -1, -1, 306, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 306, 306, -1,
+ -1, 306, -1, -1, -1, -1, 306, -1,
+ -1, -1, -1, 306, -1, 306, 306, 306,
+ 306, 306, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 306, -1, 306,
+ -1, -1, 306, 306, -1, -1, -1, 306,
+ -1, 306, -1, 306, 307, 307, 307, 307,
+ 307, 307, 307, 307, 307, 307, 307, 307,
+ 307, 307, 307, 307, 307, 307, 307, 307,
+ 307, 307, 307, -1, 307, 307, 307, 307,
+ 307, 307, -1, 307, 307, 307, 307, -1,
+ 307, -1, 307, 307, 307, -1, 307, 307,
+ 307, 307, 307, 307, -1, 307, 307, 307,
+ 307, 307, 307, 307, 307, 307, 307, 307,
+ 307, 307, 307, 307, -1, 307, -1, -1,
+ -1, -1, 307, 307, 307, 307, 307, -1,
+ -1, 307, 307, -1, 307, 307, 307, 307,
+ 307, 307, 307, 307, 307, 307, 307, 307,
+ -1, -1, -1, -1, -1, 307, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 306, -1, -1, 307, 307, 307, 307,
+ -1, -1, 307, 307, 307, 307, 307, 307,
+ -1, -1, -1, 307, 307, 307, 307, 307,
+ -1, -1, -1, -1, 307, -1, -1, -1,
+ 307, 307, 307, -1, 307, 307, -1, -1,
+ 307, -1, -1, -1, -1, -1, -1, -1,
+ -1, 307, 307, 307, 307, 307, -1, 307,
+ 307, 307, -1, -1, 307, 307, 307, 307,
+ 307, 307, 307, 307, -1, 307, 307, 307,
+ -1, -1, -1, 307, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 307, 307,
+ -1, -1, 307, -1, -1, -1, -1, 307,
+ -1, -1, -1, -1, 307, -1, 307, 307,
+ 307, 307, 307, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 307, -1,
+ 307, -1, -1, 307, 307, -1, -1, -1,
+ 307, -1, 307, -1, 307, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, -1, 308, 308, 308,
+ 308, 308, 308, -1, 308, 308, 308, 308,
+ -1, 308, -1, 308, 308, 308, -1, 308,
+ 308, 308, 308, 308, 308, -1, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, 308, 308, 308, 308, -1, 308, -1,
+ -1, -1, -1, 308, 308, 308, 308, 308,
+ -1, -1, 308, 308, -1, 308, 308, 308,
+ 308, 308, 308, 308, 308, 308, 308, 308,
+ 308, -1, -1, -1, -1, -1, 308, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 307, -1, -1, 308, 308, 308,
+ 308, -1, -1, 308, 308, 308, 308, 308,
+ 308, -1, -1, -1, 308, 308, 308, 308,
+ 308, -1, -1, -1, -1, 308, -1, -1,
+ -1, 308, 308, 308, -1, 308, 308, -1,
+ -1, 308, -1, -1, -1, -1, -1, -1,
+ -1, -1, 308, 308, 308, 308, 308, -1,
+ 308, 308, 308, -1, -1, 308, 308, 308,
+ 308, 308, 308, 308, 308, -1, 308, 308,
+ 308, -1, -1, -1, 308, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 308,
+ 308, -1, -1, 308, -1, -1, -1, -1,
+ 308, -1, -1, -1, -1, 308, -1, 308,
+ 308, 308, 308, 308, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 308,
+ -1, 308, -1, -1, 308, 308, -1, -1,
+ -1, 308, -1, 308, -1, 308, 309, 309,
+ 309, 309, 309, 309, 309, 309, 309, 309,
+ 309, 309, 309, 309, 309, 309, 309, 309,
+ 309, 309, 309, 309, 309, -1, 309, 309,
+ 309, 309, 309, 309, -1, 309, 309, 309,
+ 309, -1, 309, -1, 309, 309, 309, -1,
+ 309, 309, 309, 309, 309, 309, -1, 309,
+ 309, 309, 309, 309, 309, 309, 309, 309,
+ 309, 309, 309, 309, 309, 309, -1, 309,
+ -1, -1, -1, -1, 309, 309, 309, 309,
+ 309, -1, -1, 309, 309, -1, 309, 309,
+ 309, 309, 309, 309, 309, 309, 309, 309,
+ 309, 309, -1, -1, -1, -1, -1, 309,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 308, -1, -1, 309, 309,
+ 309, 309, -1, -1, 309, 309, 309, 309,
+ 309, 309, -1, -1, -1, 309, 309, 309,
+ 309, 309, -1, -1, -1, -1, 309, -1,
+ -1, -1, 309, 309, 309, -1, 309, 309,
+ -1, -1, 309, -1, -1, -1, -1, -1,
+ -1, -1, -1, 309, 309, 309, 309, 309,
+ -1, 309, 309, 309, -1, -1, 309, 309,
+ 309, 309, 309, 309, 309, 309, -1, 309,
+ 309, 309, -1, -1, -1, 309, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 309, 309, -1, -1, 309, -1, -1, -1,
+ -1, 309, -1, -1, -1, -1, 309, -1,
+ 309, 309, 309, 309, 309, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 309, -1, 309, -1, -1, 309, 309, -1,
+ -1, -1, 309, -1, 309, -1, 309, 310,
+ 310, 310, 310, 310, 310, 310, 310, 310,
+ 310, 310, 310, 310, 310, 310, 310, 310,
+ 310, 310, 310, 310, 310, 310, -1, 310,
+ 310, 310, 310, 310, 310, -1, 310, 310,
+ 310, 310, -1, 310, -1, 310, 310, 310,
+ -1, 310, 310, 310, 310, 310, 310, -1,
+ 310, 310, 310, 310, 310, 310, 310, 310,
+ 310, 310, 310, 310, 310, 310, 310, -1,
+ 310, -1, -1, -1, -1, 310, 310, 310,
+ 310, 310, -1, -1, 310, 310, -1, 310,
+ 310, 310, 310, 310, 310, 310, 310, 310,
+ 310, 310, 310, -1, -1, -1, -1, -1,
+ 310, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 309, -1, -1, 310,
+ 310, 310, 310, -1, -1, 310, 310, 310,
+ 310, 310, 310, -1, -1, -1, 310, 310,
+ 310, 310, 310, -1, -1, -1, -1, 310,
+ -1, -1, -1, 310, 310, 310, -1, 310,
+ 310, -1, -1, 310, -1, -1, -1, -1,
+ -1, -1, -1, -1, 310, 310, 310, 310,
+ 310, -1, 310, 310, 310, -1, -1, 310,
+ 310, 310, 310, 310, 310, 310, 310, -1,
+ 310, 310, 310, -1, -1, -1, 310, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 310, 310, -1, -1, 310, -1, -1,
+ -1, -1, 310, -1, -1, -1, -1, 310,
+ -1, 310, 310, 310, 310, 310, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 310, -1, 310, -1, -1, 310, 310,
+ -1, -1, -1, 310, -1, 310, -1, 310,
+ 311, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 311, 311, -1,
+ 311, 311, 311, 311, 311, 311, -1, 311,
+ 311, 311, 311, -1, 311, -1, 311, 311,
+ 311, -1, 311, 311, 311, 311, 311, 311,
+ -1, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, 311, 311, 311, 311,
+ -1, 311, -1, -1, -1, -1, 311, 311,
+ 311, 311, 311, -1, -1, 311, 311, -1,
+ 311, 311, 311, 311, 311, 311, 311, 311,
+ 311, 311, 311, 311, -1, -1, -1, -1,
+ -1, 311, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 310, -1, -1,
+ 311, 311, 311, 311, -1, -1, 311, 311,
+ 311, 311, 311, 311, -1, -1, -1, 311,
+ 311, 311, 311, 311, -1, -1, -1, -1,
+ 311, -1, -1, -1, 311, 311, 311, -1,
+ 311, 311, -1, -1, 311, -1, -1, -1,
+ -1, -1, -1, -1, -1, 311, 311, 311,
+ 311, 311, -1, 311, 311, 311, -1, -1,
+ 311, 311, 311, 311, 311, 311, 311, 311,
+ -1, 311, 311, 311, -1, -1, -1, 311,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 311, 311, -1, -1, 311, -1,
+ -1, -1, -1, 311, -1, -1, -1, -1,
+ 311, -1, 311, 311, 311, 311, 311, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 311, -1, 311, -1, -1, 311,
+ 311, -1, -1, -1, 311, -1, 311, -1,
+ 311, 312, 312, 312, 312, 312, 312, 312,
+ 312, 312, 312, 312, 312, 312, 312, 312,
+ 312, 312, 312, 312, 312, 312, 312, 312,
+ 312, 312, 312, 312, 312, 312, 312, -1,
+ 312, 312, 312, 312, 312, 312, -1, 312,
+ 312, 312, -1, 312, 312, 312, 312, 312,
+ 312, 312, 312, 312, 312, 312, 312, 312,
+ 312, 312, 312, -1, 312, 312, 312, 312,
+ -1, -1, -1, -1, -1, -1, -1, 312,
+ 312, -1, 312, -1, -1, 312, -1, -1,
+ -1, -1, 312, -1, -1, 312, 312, 312,
+ 312, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 312, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 311, -1,
+ -1, 312, 312, 312, 312, -1, -1, 312,
+ 312, 312, 312, 312, 312, -1, 312, 312,
+ 312, 312, 312, 312, 312, -1, -1, 312,
+ -1, 312, 312, -1, 312, 312, 312, 312,
+ -1, 312, 312, -1, -1, 312, -1, -1,
+ -1, -1, -1, 312, -1, 312, 312, 312,
+ 312, 312, -1, -1, -1, 312, 312, -1,
+ 312, 312, 312, 312, 312, 312, 312, 312,
+ 312, -1, 312, 312, 312, -1, -1, 312,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 312, 312, 312, -1, -1, 312, 312,
+ 312, -1, -1, 312, 312, 312, 312, 312,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 312, -1, 312, 312, 312,
+ 312, -1, 314, 314, 314, 314, 314, 314,
+ 314, 314, 314, 314, 314, 314, 314, 314,
+ 314, 314, 314, 314, 314, 314, 314, 314,
+ 314, 314, 314, 314, 314, 314, 314, 314,
+ -1, 314, 314, 314, 314, 314, 314, -1,
+ 314, 314, 314, -1, 314, 314, 314, 314,
+ 314, 314, 314, 314, 314, 314, 314, 314,
+ 314, 314, 314, 314, 314, 314, 314, 314,
+ 314, 314, -1, -1, -1, -1, -1, -1,
+ 314, 314, -1, 314, -1, -1, 314, -1,
+ -1, -1, -1, 314, -1, -1, 314, 314,
+ 314, 314, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 314, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 314, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 314, 314, 314, 314, -1, 312,
+ 314, 314, 314, 314, 314, 314, -1, 314,
+ 314, 314, 314, 314, 314, 314, -1, -1,
+ 314, -1, 314, 314, -1, 314, 314, 314,
+ 314, -1, 314, 314, -1, -1, 314, 314,
+ 314, -1, -1, -1, 314, -1, 314, 314,
+ 314, 314, 314, -1, -1, -1, 314, 314,
+ -1, 314, 314, 314, 314, 314, 314, 314,
+ 314, 314, -1, 314, 314, 314, -1, -1,
+ 314, -1, 314, -1, -1, -1, 314, 314,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 314, 314, 314, -1, -1, 314,
+ 314, 314, -1, -1, 314, 314, 314, 314,
+ 314, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 314, -1, 314, 314,
+ 314, 314, -1, -1, 314, -1, -1, -1,
+ -1, 315, 315, 315, 315, 315, 315, 315,
+ 315, 315, 315, 315, 315, 315, 315, 315,
+ 315, 315, 315, 315, 315, 315, 315, 315,
+ 315, 315, 315, 315, 315, 315, 315, -1,
+ 315, 315, 315, 315, 315, 315, -1, 315,
+ 315, 315, -1, 315, 315, 315, 315, 315,
+ 315, 315, 315, 315, 315, 315, 315, 315,
+ 315, 315, 315, 315, 315, 315, 315, 315,
+ 315, -1, -1, -1, -1, -1, -1, 315,
+ 315, -1, 315, -1, -1, 315, -1, -1,
+ -1, -1, 315, -1, -1, 315, 315, 315,
+ 315, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 315, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 315, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 314, 315, 315, 315, 315, -1, -1, 315,
+ 315, 315, 315, 315, 315, -1, 315, 315,
+ 315, 315, 315, 315, 315, -1, -1, 315,
+ -1, 315, 315, -1, 315, 315, 315, 315,
+ -1, 315, 315, -1, -1, 315, 315, 315,
+ -1, -1, -1, 315, -1, 315, 315, 315,
+ 315, 315, -1, -1, -1, 315, 315, -1,
+ 315, 315, 315, 315, 315, 315, 315, 315,
+ 315, -1, 315, 315, 315, -1, -1, 315,
+ -1, 315, -1, -1, -1, 315, 315, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 315, 315, 315, -1, -1, 315, 315,
+ 315, -1, -1, 315, 315, 315, 315, 315,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 315, -1, 315, 315, 315,
+ 315, -1, -1, 315, -1, -1, -1, -1,
+ 316, 316, 316, 316, 316, 316, 316, 316,
+ 316, 316, 316, 316, 316, 316, 316, 316,
+ 316, 316, 316, 316, 316, 316, 316, 316,
+ 316, 316, 316, 316, 316, 316, -1, 316,
+ 316, 316, 316, 316, 316, -1, 316, 316,
+ 316, -1, 316, 316, 316, 316, 316, 316,
+ 316, 316, 316, 316, 316, 316, 316, 316,
+ 316, 316, 316, 316, 316, 316, 316, 316,
+ -1, -1, -1, -1, -1, -1, 316, 316,
+ -1, 316, -1, -1, 316, -1, -1, -1,
+ -1, 316, -1, -1, 316, 316, 316, 316,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 316, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 316, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 315,
+ 316, 316, 316, 316, -1, -1, 316, 316,
+ 316, 316, 316, 316, -1, 316, 316, 316,
+ 316, 316, 316, 316, -1, -1, 316, -1,
+ 316, 316, -1, 316, 316, 316, 316, -1,
+ 316, 316, -1, -1, 316, 316, 316, -1,
+ -1, -1, 316, -1, 316, 316, 316, 316,
+ 316, -1, -1, -1, 316, 316, -1, 316,
+ 316, 316, 316, 316, 316, 316, 316, 316,
+ -1, 316, 316, 316, -1, -1, 316, -1,
+ 316, -1, -1, -1, 316, 316, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 316, 316, 316, -1, -1, 316, 316, 316,
+ -1, -1, 316, 316, 316, 316, 316, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 316, -1, 316, 316, 316, 316,
+ -1, -1, 316, -1, -1, -1, -1, 318,
+ 318, 318, 318, 318, 318, 318, 318, 318,
+ 318, 318, 318, 318, 318, 318, 318, 318,
+ 318, 318, 318, 318, 318, 318, -1, 318,
+ 318, 318, 318, 318, 318, -1, 318, 318,
+ 318, 318, -1, 318, -1, 318, 318, 318,
+ -1, 318, 318, 318, 318, 318, 318, -1,
+ 318, 318, 318, 318, 318, 318, 318, 318,
+ 318, -1, 318, 318, 318, 318, -1, -1,
+ -1, -1, -1, -1, -1, 318, -1, -1,
+ 318, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 318, 318, 318, 318, -1,
+ -1, 318, 318, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 316, 318,
+ 318, 318, 318, -1, -1, 318, 318, -1,
+ 318, 318, 318, -1, -1, -1, 318, 318,
+ -1, 318, 318, -1, -1, -1, -1, 318,
+ -1, -1, -1, 318, 318, 318, -1, 318,
+ 318, -1, -1, 318, -1, -1, -1, -1,
+ -1, -1, -1, -1, 318, 318, 318, 318,
+ -1, -1, -1, 318, 318, -1, -1, 318,
+ 318, 318, 318, 318, 318, 318, 318, -1,
+ 318, 318, 318, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 318, 318, 318, 318, 318, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 318, -1, -1, -1, -1, 318, -1,
+ 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, 342, 342, 342, 342, 342, -1,
+ 342, 342, 342, 342, 342, 342, -1, 342,
+ 342, 342, 342, -1, 342, -1, 342, 342,
+ 342, -1, 342, 342, 342, 342, 342, 342,
+ -1, 342, 342, 342, 342, 342, 342, 342,
+ 342, 342, -1, 342, 342, 342, 342, -1,
+ -1, -1, -1, -1, -1, -1, 342, -1,
+ -1, 342, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 342, 342, 342, 342,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 342, 342, 342, 342, -1, 318, 342, 342,
+ -1, 342, 342, 342, -1, -1, -1, 342,
+ 342, -1, 342, 342, -1, -1, -1, -1,
+ 342, -1, -1, -1, 342, 342, 342, -1,
+ 342, 342, -1, -1, 342, -1, -1, -1,
+ -1, -1, -1, -1, -1, 342, 342, 342,
+ 342, -1, -1, -1, 342, 342, -1, -1,
+ 342, 342, 342, 342, 342, 342, 342, 342,
+ -1, 342, 342, 342, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 342, 342, 342, 342, 342, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 342, -1, -1, -1, -1, 342,
+ -1, 344, 344, 344, 344, 344, 344, 344,
+ 344, 344, 344, 344, 344, 344, 344, 344,
+ 344, 344, 344, 344, 344, 344, 344, 344,
+ -1, 344, 344, 344, 344, 344, 344, -1,
+ 344, 344, 344, 344, -1, 344, -1, 344,
+ 344, 344, -1, 344, 344, 344, 344, 344,
+ 344, -1, 344, 344, 344, 344, 344, 344,
+ 344, 344, 344, -1, 344, 344, 344, 344,
+ -1, -1, -1, -1, -1, -1, -1, 344,
+ -1, -1, 344, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 344, 344, 344,
+ 344, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 344, 344, 344, 344, -1, 342, 344,
+ 344, -1, 344, 344, 344, -1, -1, -1,
+ 344, 344, -1, 344, 344, -1, -1, -1,
+ -1, 344, -1, -1, -1, 344, 344, 344,
+ -1, 344, 344, -1, -1, 344, -1, -1,
+ -1, -1, -1, -1, -1, -1, 344, 344,
+ 344, 344, -1, -1, -1, 344, 344, -1,
+ -1, 344, 344, 344, 344, 344, 344, 344,
+ 344, -1, 344, 344, 344, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 344, 344, 344, 344, 344,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 344, -1, -1, -1, -1,
+ 344, -1, 345, 345, 345, 345, 345, 345,
+ 345, 345, 345, 345, 345, 345, 345, 345,
+ 345, 345, 345, 345, 345, 345, 345, 345,
+ 345, -1, 345, 345, 345, 345, 345, 345,
+ -1, 345, 345, 345, 345, -1, 345, -1,
+ 345, 345, 345, -1, 345, 345, 345, 345,
+ 345, 345, -1, 345, 345, 345, 345, 345,
+ 345, 345, 345, 345, -1, 345, 345, 345,
+ 345, -1, -1, -1, -1, -1, -1, -1,
+ 345, -1, -1, 345, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 345, 345,
+ 345, 345, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 345, 345, 345, 345, -1, 344,
+ 345, 345, -1, 345, 345, 345, -1, -1,
+ -1, 345, 345, -1, 345, 345, -1, -1,
+ -1, -1, 345, -1, -1, -1, 345, 345,
+ 345, -1, 345, 345, -1, -1, 345, -1,
+ -1, -1, -1, -1, -1, -1, -1, 345,
+ 345, 345, 345, -1, -1, -1, 345, 345,
+ -1, -1, 345, 345, 345, 345, 345, 345,
+ 345, 345, -1, 345, 345, 345, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 345, 345, 345, 345,
+ 345, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 345, -1, -1, -1,
+ -1, 345, -1, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, 346, 346, 346,
+ 346, 346, -1, 346, 346, 346, 346, 346,
+ 346, -1, 346, 346, 346, 346, -1, 346,
+ -1, 346, 346, 346, -1, 346, 346, 346,
+ 346, 346, 346, -1, 346, 346, 346, 346,
+ 346, 346, 346, 346, 346, -1, 346, 346,
+ 346, 346, -1, -1, -1, -1, -1, -1,
+ -1, 346, -1, -1, 346, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 346,
+ 346, 346, 346, 401, 401, 401, 401, -1,
+ 401, -1, -1, -1, -1, -1, -1, -1,
+ -1, 401, 401, 401, 401, 401, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 401,
+ -1, -1, -1, 401, 401, 401, 401, -1,
+ -1, -1, 401, 401, 401, -1, -1, -1,
+ -1, 401, 401, -1, 401, 401, 401, 401,
+ -1, -1, -1, 346, 346, 346, 346, 401,
+ 345, 346, 346, -1, 346, 346, 346, -1,
+ -1, -1, 346, 346, -1, 346, 346, -1,
+ -1, -1, -1, 346, -1, -1, -1, 346,
+ 346, 346, -1, 346, 346, -1, -1, 346,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 346, 346, 346, 346, -1, -1, -1, 346,
+ 346, -1, -1, 346, 346, 346, 346, 346,
+ 346, 346, 346, -1, 346, 346, 346, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 348, 348, 348, 348,
+ -1, 348, -1, -1, -1, 346, 346, 346,
+ 346, 346, 348, 348, 348, 348, 348, -1,
+ -1, -1, -1, -1, -1, 346, -1, -1,
+ 348, -1, 346, -1, 348, 348, 348, 348,
+ -1, -1, -1, 348, 348, 348, -1, -1,
+ -1, -1, 348, 348, -1, 348, 348, 348,
+ 348, -1, 401, 401, 401, -1, -1, -1,
+ 348, 348, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 348, 348,
+ 348, 348, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 401, 401, 401, 401, 401,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 346, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 348, 348, 348,
+ 348, 348, -1, 348, 348, 348, -1, -1,
+ -1, 348, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 348, 348, 348, 348,
+ 348, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 348, 364, 364, 364, 364, 364,
+ 364, 364, 364, 364, 364, 364, 364, 364,
+ 364, 364, 364, 364, 364, 364, 364, 364,
+ 364, 364, -1, 364, 364, 364, 364, 364,
+ 364, -1, 364, 364, 364, 364, -1, 364,
+ -1, 364, 364, 364, -1, 364, 364, 364,
+ 364, 364, 364, -1, 364, 364, 364, 364,
+ 364, 364, 364, 364, 364, 364, 364, 364,
+ 364, 364, 364, -1, 364, -1, -1, -1,
+ -1, 364, 364, 364, 364, 364, -1, -1,
+ 364, 364, -1, 364, 364, 364, 364, 364,
+ 364, 364, 364, 364, 364, 364, 364, -1,
+ -1, -1, -1, -1, 364, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 364, 364, 364, 364, -1,
+ -1, 364, 364, 364, 364, 364, 364, -1,
+ -1, -1, 364, 364, 364, 364, 364, -1,
+ -1, -1, -1, 364, -1, -1, -1, 364,
+ 364, 364, -1, 364, 364, -1, -1, 364,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 364, 364, 364, 364, 364, -1, 364, 364,
+ 364, 364, -1, 364, 364, 364, 364, 364,
+ 364, 364, 364, -1, 364, 364, 364, -1,
+ -1, -1, 364, -1, -1, -1, -1, -1,
+ -1, -1, 364, -1, -1, 364, 364, -1,
+ -1, 364, -1, -1, -1, -1, 364, -1,
+ -1, -1, -1, 364, -1, 364, 364, 364,
+ 364, 364, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 364, -1, 364,
+ -1, -1, 364, 364, -1, -1, -1, 364,
+ -1, 364, -1, 364, -1, -1, -1, -1,
+ 368, 368, 368, 368, -1, 368, -1, -1,
+ -1, -1, -1, -1, -1, -1, 368, 368,
+ 368, 368, 368, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 368, -1, -1, -1,
+ 368, 368, 368, 368, -1, -1, -1, 368,
+ 368, 368, -1, -1, -1, -1, 368, 368,
+ -1, 368, 368, 368, 368, -1, -1, -1,
+ -1, -1, -1, -1, 368, -1, -1, -1,
+ -1, -1, -1, -1, 401, 401, 401, -1,
+ -1, -1, 368, 368, 368, 368, 372, 372,
+ 372, 372, -1, 372, -1, -1, -1, 368,
+ -1, -1, -1, -1, 372, 372, 372, 372,
+ 372, -1, -1, -1, -1, 401, 401, 401,
+ 401, 401, 372, -1, -1, -1, 372, 372,
+ 372, 372, -1, -1, -1, 372, 372, 372,
+ -1, -1, -1, -1, 372, 372, -1, 372,
+ 372, 372, 372, 372, -1, -1, -1, -1,
+ -1, 364, 372, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 372, 372, 372, 372, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 372, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 368, 368, 368, 368, 368, -1, 368,
+ 368, 368, -1, -1, -1, -1, -1, 348,
+ 348, 348, 348, 348, -1, 348, 348, 348,
+ 368, 368, -1, 348, -1, -1, -1, -1,
+ -1, 368, -1, -1, -1, -1, -1, -1,
+ 368, 368, 368, 368, 368, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 348, 348,
+ 348, 348, 348, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 368, -1, -1, -1,
+ -1, -1, -1, -1, 348, -1, -1, 372,
+ 372, 372, 372, 372, -1, 372, 372, 372,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 372, 372,
+ -1, -1, -1, -1, -1, -1, -1, 372,
+ -1, -1, -1, -1, -1, -1, 372, 372,
+ 372, 372, 372, 374, 374, 374, 374, -1,
+ 374, -1, -1, -1, -1, -1, -1, -1,
+ -1, 374, 374, 374, 374, 374, -1, -1,
+ -1, -1, 372, -1, -1, -1, -1, 374,
+ -1, -1, -1, 374, 374, 374, 374, -1,
+ -1, -1, 374, 374, 374, -1, -1, -1,
+ -1, 374, 374, -1, 374, 374, 374, 374,
+ -1, -1, -1, -1, -1, -1, -1, 374,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 374, 374, 374,
+ 374, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, -1,
+ 375, 375, 375, 375, 375, 375, -1, 375,
+ 375, 375, 375, -1, 375, -1, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375,
+ -1, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, 375, 375, 375, 375,
+ -1, 375, -1, -1, 375, -1, 375, 375,
+ 375, 375, 375, -1, -1, 375, 375, -1,
+ 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, -1, -1, -1, -1,
+ -1, 375, -1, -1, 374, 374, 374, 374,
+ 374, -1, 374, 374, 374, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 374, 374, 374, 374, 374,
+ 375, 375, 375, 375, -1, -1, 375, 375,
+ 375, 375, 375, 375, -1, -1, -1, 375,
+ 375, 375, 375, 375, -1, -1, -1, -1,
+ 375, -1, -1, -1, 375, 375, 375, -1,
+ 375, 375, -1, -1, 375, -1, -1, -1,
+ -1, -1, -1, -1, -1, 375, 375, 375,
+ 375, 375, -1, 375, 375, 375, -1, -1,
+ 375, 375, 375, 375, 375, 375, 375, 375,
+ 375, 375, 375, 375, -1, -1, -1, 375,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 375, 375, -1, -1, 375, -1,
+ -1, -1, -1, 375, -1, -1, -1, -1,
+ 375, -1, 375, 375, 375, 375, 375, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 375, -1, 375, -1, -1, 375,
+ 375, -1, -1, -1, 375, -1, 375, -1,
+ 375, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 444, 444, 444, 444,
+ -1, 444, -1, -1, -1, -1, -1, -1,
+ -1, -1, 444, 444, 444, 444, 444, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 444, -1, -1, -1, 444, 444, 444, 444,
+ -1, -1, -1, 444, 444, 444, -1, -1,
+ -1, -1, 444, 444, -1, 444, 444, 444,
+ 444, -1, -1, -1, -1, -1, -1, -1,
+ 444, 444, -1, -1, -1, -1, -1, -1,
+ -1, -1, 368, 368, -1, -1, 444, 444,
+ 444, 444, -1, 368, 444, 444, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 368, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 375, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 372, 372, -1, -1, -1, -1, -1, -1,
+ -1, 372, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 372, 444, 444, 444,
+ 444, 444, -1, 444, 444, 444, -1, -1,
+ -1, 444, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 444, 444, 444, 444,
+ 444, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 444, -1, -1, -1, -1, -1,
+ -1, -1, 376, 376, 376, 376, 376, 376,
+ 376, 376, 376, 376, 376, 376, 376, 376,
+ 376, 376, 376, 376, 376, 376, 376, 376,
+ 376, -1, 376, 376, 376, 376, 376, 376,
+ -1, 376, 376, 376, 376, -1, 376, -1,
+ 376, 376, 376, -1, 376, 376, 376, 376,
+ 376, 376, -1, 376, 376, 376, 376, 376,
+ 376, 376, 376, 376, 376, 376, 376, 376,
+ 376, 376, -1, 376, -1, -1, -1, -1,
+ 376, 376, 376, 376, 376, -1, -1, 376,
+ 376, -1, 376, 376, 376, 376, 376, 376,
+ 376, 376, 376, 376, 376, 376, -1, -1,
+ -1, -1, -1, 376, -1, -1, 374, 374,
+ 374, 374, 374, -1, 374, 374, 374, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 374, 374, 374,
+ 374, 374, 376, 376, 376, 376, -1, -1,
+ 376, 376, 376, 376, 376, 376, -1, -1,
+ -1, 376, 376, 376, 376, 376, -1, -1,
+ -1, -1, 376, -1, -1, -1, 376, 376,
+ 376, -1, 376, 376, -1, -1, 376, -1,
+ -1, -1, -1, -1, -1, -1, -1, 376,
+ 376, 376, 376, 376, -1, 376, 376, 376,
+ -1, -1, 376, 376, 376, 376, 376, 376,
+ 376, 376, -1, 376, 376, 376, -1, -1,
+ -1, 376, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 376, 376, -1, -1,
+ 376, -1, -1, -1, -1, 376, -1, -1,
+ -1, -1, 376, -1, 376, 376, 376, 376,
+ 376, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 376, -1, 376, -1,
+ -1, 376, 376, -1, -1, -1, 376, -1,
+ 376, -1, 376, 377, 377, 377, 377, 377,
+ 377, 377, 377, 377, 377, 377, 377, 377,
+ 377, 377, 377, 377, 377, 377, 377, 377,
+ 377, 377, -1, 377, 377, 377, 377, 377,
+ 377, -1, 377, 377, 377, 377, -1, 377,
+ -1, 377, 377, 377, -1, 377, 377, 377,
+ 377, 377, 377, -1, 377, 377, 377, 377,
+ 377, 377, 377, 377, 377, 377, 377, 377,
+ 377, 377, 377, -1, 377, -1, -1, -1,
+ -1, 377, 377, 377, 377, 377, -1, -1,
+ 377, 377, -1, 377, 377, 377, 377, 377,
+ 377, 377, 377, 377, 377, 377, 377, -1,
+ -1, -1, -1, -1, 377, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 376, -1, -1, 377, 377, 377, 377, -1,
+ -1, 377, 377, 377, 377, 377, 377, -1,
+ -1, -1, 377, 377, 377, 377, 377, -1,
+ -1, -1, -1, 377, -1, -1, -1, 377,
+ 377, 377, -1, 377, 377, -1, -1, 377,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 377, 377, 377, 377, 377, -1, 377, 377,
+ 377, -1, -1, 377, 377, 377, 377, 377,
+ 377, 377, 377, -1, 377, 377, 377, -1,
+ -1, -1, 377, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 377, 377, -1,
+ -1, 377, -1, -1, -1, -1, 377, -1,
+ -1, -1, -1, 377, -1, 377, 377, 377,
+ 377, 377, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 377, -1, 377,
+ -1, -1, 377, 377, -1, -1, -1, 377,
+ -1, 377, -1, 377, 378, 378, 378, 378,
+ 378, 378, 378, 378, 378, 378, 378, 378,
+ 378, 378, 378, 378, 378, 378, 378, 378,
+ 378, 378, 378, -1, 378, 378, 378, 378,
+ 378, 378, -1, 378, 378, 378, 378, -1,
+ 378, -1, 378, 378, 378, -1, 378, 378,
+ 378, 378, 378, 378, -1, 378, 378, 378,
+ 378, 378, 378, 378, 378, 378, 378, 378,
+ 378, 378, 378, 378, -1, 378, -1, -1,
+ -1, -1, 378, 378, 378, 378, 378, -1,
+ -1, 378, 378, -1, 378, 378, 378, 378,
+ 378, 378, 378, 378, 378, 378, 378, 378,
+ -1, -1, -1, -1, -1, 378, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 377, -1, -1, 378, 378, 378, 378,
+ -1, -1, 378, 378, 378, 378, 378, 378,
+ -1, -1, -1, 378, 378, 378, 378, 378,
+ -1, -1, -1, -1, 378, -1, -1, -1,
+ 378, 378, 378, -1, 378, 378, -1, -1,
+ 378, -1, -1, -1, -1, -1, -1, -1,
+ -1, 378, 378, 378, 378, 378, -1, 378,
+ 378, 378, -1, -1, 378, 378, 378, 378,
+ 378, 378, 378, 378, -1, 378, 378, 378,
+ -1, -1, -1, 378, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 378, 378,
+ -1, -1, 378, -1, -1, -1, -1, 378,
+ -1, -1, -1, -1, 378, -1, 378, 378,
+ 378, 378, 378, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 378, -1,
+ 378, -1, -1, 378, 378, -1, -1, -1,
+ 378, -1, 378, -1, 378, 380, 380, 380,
+ 380, 380, 380, 380, 380, 380, 380, 380,
+ 380, 380, 380, -1, 380, 380, 380, 380,
+ 380, 380, -1, -1, -1, 380, 380, 380,
+ 380, 380, 380, -1, 380, 380, 380, 380,
+ -1, 380, -1, 380, 380, 380, -1, 380,
+ 380, 380, 380, 380, 380, -1, 380, 380,
+ 380, 380, 380, 380, 380, 380, 380, -1,
+ 380, 380, 380, 380, -1, -1, -1, -1,
+ -1, -1, -1, 380, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 380, 380, 380, 380, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 378, -1, -1, 380, 380, 380,
+ 380, -1, -1, 380, 380, -1, 380, 380,
+ 380, -1, -1, -1, 380, 380, -1, 380,
+ 380, -1, -1, -1, -1, 380, 380, -1,
+ -1, 380, 380, 380, -1, 380, 380, -1,
+ -1, 380, -1, -1, -1, -1, -1, -1,
+ -1, -1, 380, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 380, 380, 380,
+ 380, 380, 380, 380, 380, -1, 380, 380,
+ 380, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 380,
+ 380, 380, 380, 380, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 380,
+ -1, -1, 380, 383, 383, 383, 383, 383,
+ 383, 383, 383, 383, 383, 383, 383, 383,
+ 383, 383, 383, 383, 383, 383, 383, 383,
+ 383, 383, -1, 383, 383, 383, 383, 383,
+ 383, -1, 383, 383, 383, 383, -1, 383,
+ -1, 383, 383, 383, -1, 383, 383, 383,
+ 383, 383, 383, -1, 383, 383, 383, 383,
+ 383, 383, 383, 383, 383, -1, 383, 383,
+ 383, 383, -1, -1, -1, -1, -1, -1,
+ -1, 383, -1, -1, 383, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 383,
+ 383, 383, 383, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 383, 383, 383, 383, -1,
+ -1, 383, 383, 380, 383, 383, 383, -1,
+ -1, -1, 383, 383, -1, 383, 383, -1,
+ -1, -1, -1, 383, -1, -1, -1, 383,
+ 383, 383, -1, 383, 383, -1, -1, 383,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 383, 383, 383, 383, -1, -1, -1, 383,
+ 383, -1, -1, 383, 383, 383, 383, 383,
+ 383, 383, 383, -1, 383, 383, 383, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 383, 383, 383,
+ 383, 383, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 383, -1, -1,
+ -1, -1, 383, -1, 384, 384, 384, 384,
+ 384, 384, 384, 384, 384, 384, 384, 384,
+ 384, 384, 384, 384, 384, 384, 384, 384,
+ 384, 384, 384, -1, 384, 384, 384, 384,
+ 384, 384, -1, 384, 384, 384, 384, -1,
+ 384, -1, 384, 384, 384, -1, 384, 384,
+ 384, 384, 384, 384, -1, 384, 384, 384,
+ 384, 384, 384, 384, 384, 384, -1, 384,
+ 384, 384, 384, -1, -1, -1, -1, -1,
+ -1, -1, 384, -1, -1, 384, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 384, 384, 384, 384, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 384, 384, 384, 384,
+ -1, 383, 384, 384, -1, 384, 384, 384,
+ -1, -1, -1, 384, 384, -1, 384, 384,
+ -1, -1, -1, -1, 384, -1, -1, -1,
+ 384, 384, 384, -1, 384, 384, -1, -1,
+ 384, -1, -1, -1, -1, -1, -1, -1,
+ -1, 384, 384, 384, 384, -1, -1, -1,
+ 384, 384, -1, -1, 384, 384, 384, 384,
+ 384, 384, 384, 384, -1, 384, 384, 384,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 384, 384,
+ 384, 384, 384, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 384, -1,
+ -1, -1, -1, 384, -1, 385, 385, 385,
+ 385, 385, 385, 385, 385, 385, 385, 385,
+ 385, 385, 385, 385, 385, 385, 385, 385,
+ 385, 385, 385, 385, -1, 385, 385, 385,
+ 385, 385, 385, -1, 385, 385, 385, 385,
+ -1, 385, -1, 385, 385, 385, -1, 385,
+ 385, 385, 385, 385, 385, -1, 385, 385,
+ 385, 385, 385, 385, 385, 385, 385, -1,
+ 385, 385, 385, 385, -1, -1, -1, -1,
+ -1, -1, -1, 385, -1, -1, 385, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 385, 385, 385, 385, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 385, 385, 385,
+ 385, -1, 384, 385, 385, -1, 385, 385,
+ 385, -1, -1, -1, 385, 385, -1, 385,
+ 385, -1, -1, -1, -1, 385, -1, -1,
+ -1, 385, 385, 385, -1, 385, 385, -1,
+ -1, 385, -1, -1, -1, -1, -1, -1,
+ -1, -1, 385, 385, 385, 385, -1, -1,
+ -1, 385, 385, -1, -1, 385, 385, 385,
+ 385, 385, 385, 385, 385, -1, 385, 385,
+ 385, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 386, 386,
+ 386, 386, -1, 386, -1, -1, -1, 385,
+ 385, 385, 385, 385, 386, 386, 386, 386,
+ 386, -1, -1, -1, -1, -1, -1, 385,
+ -1, -1, 386, -1, 385, -1, 386, 386,
+ 386, 386, -1, -1, -1, 386, 386, 386,
+ -1, -1, -1, -1, 386, 386, -1, 386,
+ 386, 386, 386, -1, -1, -1, -1, -1,
+ -1, -1, 386, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 386, 386, 386, 386, 387, 387, 387, 387,
+ 387, 387, 387, 387, -1, 387, -1, 387,
+ 387, 387, 387, -1, -1, -1, 387, 387,
+ 387, 387, 387, -1, -1, -1, 387, 387,
+ 387, -1, -1, -1, 387, -1, -1, -1,
+ 387, 387, 387, 387, -1, -1, -1, 387,
+ 387, 387, -1, -1, -1, -1, 387, 387,
+ -1, 387, 387, 387, 387, -1, -1, -1,
+ -1, -1, -1, -1, 387, -1, 387, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 387, 387, 387, 387, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 385, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 386,
+ 386, 386, 386, 386, -1, 386, 386, 386,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 386, 386,
+ 386, 386, 386, -1, 384, 384, 384, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 387, -1, -1, -1, -1,
+ -1, 387, -1, -1, -1, -1, 387, 387,
+ 387, 387, 387, 387, 387, 387, -1, 387,
+ 387, 387, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 387, 387, 387, 387, 387, 388, 388, 388,
+ 388, 388, 388, 388, 388, 388, 388, 388,
+ 388, 388, 388, 388, 388, 388, 388, 388,
+ 388, 388, 388, 388, 388, 388, 388, 388,
+ 388, 388, 388, -1, 388, 388, 388, 388,
+ 388, 388, -1, 388, 388, 388, -1, 388,
+ 388, 388, 388, 388, 388, 388, 388, 388,
+ 388, 388, 388, 388, 388, 388, 388, -1,
+ 388, 388, 388, 388, -1, -1, -1, -1,
+ -1, -1, -1, 388, 388, -1, 388, -1,
+ -1, 388, -1, -1, -1, -1, 388, -1,
+ -1, 388, 388, 388, 388, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 388,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 388, 388, 388,
+ 388, -1, -1, 388, 388, 388, 388, 388,
+ 388, -1, 388, 388, 388, 388, 388, 388,
+ 388, -1, -1, 388, -1, 388, 388, -1,
+ 388, 388, 388, 388, -1, 388, 388, -1,
+ -1, 388, -1, -1, -1, -1, -1, 388,
+ -1, 388, 388, 388, 388, 388, -1, -1,
+ -1, 388, 388, -1, 388, 388, 388, 388,
+ 388, 388, 388, 388, 388, -1, 388, 388,
+ 388, -1, -1, 388, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 388, 388, 388,
+ -1, -1, 388, 388, 388, -1, -1, 388,
+ 388, 388, 388, 388, -1, -1, -1, -1,
+ 475, 475, 475, 475, -1, 475, -1, 388,
+ -1, 388, 388, 388, 388, -1, 475, 475,
+ 475, 475, 475, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 475, -1, -1, -1,
+ 475, 475, 475, 475, -1, -1, -1, 475,
+ 475, 475, -1, -1, -1, -1, 475, 475,
+ -1, 475, 475, 475, 475, 475, -1, -1,
+ -1, -1, -1, -1, 475, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 475, 475, 475, 475, -1, -1,
+ 475, 475, -1, -1, -1, -1, -1, 475,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 388, -1, -1, -1, -1,
+ -1, 386, 386, 386, 386, 386, -1, 386,
+ 386, 386, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 475, 475, 475, 475, 475, -1, 475,
+ 475, 475, -1, -1, -1, -1, -1, -1,
+ 386, 386, 386, 386, 386, -1, -1, -1,
+ 475, 475, -1, -1, -1, -1, -1, -1,
+ -1, 475, -1, -1, -1, -1, -1, -1,
+ 475, 475, 475, 475, 475, 387, -1, -1,
+ -1, -1, -1, 387, -1, -1, -1, -1,
+ 387, 387, 387, 387, 387, 387, 387, 387,
+ -1, 387, 387, 387, 475, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 387, 387, 387, 387, 387, 389,
+ 389, 389, 389, 389, 389, 389, 389, 389,
+ 389, 389, 389, 389, 389, 389, 389, 389,
+ 389, 389, 389, 389, 389, 389, 389, 389,
+ 389, 389, 389, 389, 389, -1, 389, 389,
+ 389, 389, 389, 389, -1, 389, 389, 389,
+ -1, 389, 389, 389, 389, 389, 389, 389,
+ 389, 389, 389, 389, 389, 389, 389, 389,
+ 389, -1, 389, 389, 389, 389, -1, -1,
+ -1, -1, -1, -1, -1, 389, 389, -1,
+ 389, -1, -1, 389, -1, -1, -1, -1,
+ 389, -1, -1, 389, 389, 389, 389, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 389, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 389,
+ 389, 389, 389, -1, -1, 389, 389, 389,
+ 389, 389, 389, -1, 389, 389, 389, 389,
+ 389, 389, 389, -1, -1, 389, -1, 389,
+ 389, -1, 389, 389, 389, 389, -1, 389,
+ 389, -1, -1, 389, -1, -1, -1, -1,
+ -1, 389, -1, 389, 389, 389, 389, 389,
+ -1, -1, -1, 389, 389, -1, 389, 389,
+ 389, 389, 389, 389, 389, 389, 389, -1,
+ 389, 389, 389, -1, -1, 389, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 389,
+ 389, 389, -1, -1, 389, 389, 389, -1,
+ -1, 389, 389, 389, 389, 389, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 389, -1, 389, 389, 389, 389, -1,
+ 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, -1, 390,
+ 390, 390, 390, 390, 390, -1, 390, 390,
+ 390, -1, 390, 390, 390, 390, 390, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390,
+ 390, 390, -1, 390, 390, 390, 390, -1,
+ -1, -1, -1, -1, -1, -1, 390, 390,
+ -1, 390, -1, -1, 390, -1, -1, -1,
+ -1, 390, -1, -1, 390, 390, 390, 390,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 390, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 390, 390, 390, 390, -1, 389, 390, 390,
+ 390, 390, 390, 390, -1, 390, 390, 390,
+ 390, 390, 390, 390, -1, -1, 390, -1,
+ 390, 390, -1, 390, 390, 390, 390, -1,
+ 390, 390, -1, -1, 390, -1, -1, -1,
+ -1, -1, 390, -1, 390, 390, 390, 390,
+ 390, -1, -1, -1, 390, 390, -1, 390,
+ 390, 390, 390, 390, 390, 390, 390, 390,
+ -1, 390, 390, 390, -1, -1, 390, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 390, 390, 390, -1, -1, 390, 390, 390,
+ -1, -1, 390, 390, 390, 390, 390, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 390, -1, 390, 390, 390, 390,
+ -1, 397, 397, 397, 397, 397, 397, 397,
+ 397, 397, 397, 397, 397, 397, 397, -1,
+ 397, 397, 397, 397, 397, 397, -1, -1,
+ -1, 397, 397, 397, 397, 397, 397, -1,
+ 397, 397, 397, 397, -1, 397, -1, 397,
+ 397, 397, -1, 397, 397, 397, 397, 397,
+ 397, -1, 397, 397, 397, 397, 397, 397,
+ 397, 397, 397, -1, 397, 397, 397, 397,
+ -1, -1, -1, -1, -1, -1, -1, 397,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 397, 397, 397,
+ 397, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 397, 397, 397, 397, -1, 390, 397,
+ 397, 397, 397, 397, 397, -1, -1, -1,
+ 397, 397, 397, 397, 397, -1, -1, -1,
+ -1, 397, 397, -1, -1, 397, 397, 397,
+ -1, 397, 397, -1, -1, 397, -1, -1,
+ -1, -1, -1, -1, -1, -1, 397, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 397, 397, 397, 397, 397, 397, 397,
+ 397, -1, 397, 397, 397, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 397, 397, 397, 397, 397,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 397, -1, 397, 397, 399,
+ 399, 399, 399, 399, 399, 399, 399, 399,
+ 399, -1, 399, 399, 399, 399, -1, -1,
+ -1, 399, 399, 399, 399, 399, -1, -1,
+ -1, 399, 399, 399, -1, -1, -1, 399,
+ -1, -1, -1, 399, 399, 399, 399, -1,
+ -1, -1, 399, 399, 399, -1, -1, -1,
+ -1, 399, 399, -1, 399, 399, 399, 399,
+ -1, -1, -1, -1, -1, -1, -1, 399,
+ -1, -1, 399, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 399, 399, 399,
+ 399, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 397,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 399, -1,
+ -1, -1, -1, -1, -1, 399, 399, 399,
+ -1, 399, 399, 399, 399, 399, 399, 399,
+ 399, -1, 399, 399, 399, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 399, 399, 399, 399, 399,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 399, 402, 402, 402, 402, 402, 402, 402,
+ 402, 402, 402, 402, 402, 402, 402, 402,
+ 402, 402, 402, 402, 402, 402, 402, 402,
+ -1, 402, 402, 402, 402, 402, 402, -1,
+ 402, 402, 402, 402, -1, 402, -1, 402,
+ 402, 402, -1, 402, 402, 402, 402, 402,
+ 402, -1, 402, 402, 402, 402, 402, 402,
+ 402, 402, 402, 402, 402, 402, 402, 402,
+ 402, -1, 402, -1, -1, -1, -1, 402,
+ 402, 402, 402, 402, -1, -1, 402, 402,
+ -1, 402, 402, 402, 402, 402, 402, 402,
+ 402, 402, 402, 402, 402, -1, -1, -1,
+ -1, -1, 402, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 402, 402, 402, 402, -1, -1, 402,
+ 402, 402, 402, 402, 402, -1, -1, -1,
+ 402, 402, 402, 402, 402, -1, -1, -1,
+ -1, 402, -1, -1, -1, 402, 402, 402,
+ -1, 402, 402, -1, -1, 402, -1, -1,
+ -1, -1, -1, -1, -1, -1, 402, 402,
+ 402, 402, 402, -1, 402, 402, 402, -1,
+ -1, 402, 402, 402, 402, 402, 402, 402,
+ 402, -1, 402, 402, 402, -1, -1, -1,
+ 402, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 402, 402, -1, -1, 402,
+ -1, -1, -1, -1, 402, -1, -1, -1,
+ -1, 402, -1, 402, 402, 402, 402, 402,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 402, -1, 402, -1, -1,
+ 402, 402, -1, -1, -1, 402, -1, 402,
+ -1, 402, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 402,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 399, -1, -1, -1, -1, -1, -1, -1,
+ -1, 399, -1, 399, 399, 399, 399, 399,
+ 399, 399, 399, -1, 399, 399, 399, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 399, 399, 399,
+ 399, 399, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 399, 403, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 403, 403, 403,
+ 403, 403, -1, 403, 403, 403, 403, 403,
+ 403, -1, 403, 403, 403, 403, -1, 403,
+ -1, 403, 403, 403, -1, 403, 403, 403,
+ 403, 403, 403, -1, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 403, 403, 403,
+ 403, 403, 403, -1, 403, -1, -1, -1,
+ -1, 403, 403, 403, 403, 403, -1, -1,
+ 403, 403, -1, 403, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 403, 403, -1,
+ -1, -1, -1, -1, 403, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 403, 403, 403, 403, -1,
+ -1, 403, 403, 403, 403, 403, 403, -1,
+ -1, -1, 403, 403, 403, 403, 403, -1,
+ -1, -1, -1, 403, -1, -1, -1, 403,
+ 403, 403, -1, 403, 403, -1, -1, 403,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 403, 403, 403, 403, 403, -1, 403, 403,
+ 403, -1, -1, 403, 403, 403, 403, 403,
+ 403, 403, 403, -1, 403, 403, 403, -1,
+ -1, -1, 403, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 403, 403, -1,
+ -1, 403, -1, -1, -1, -1, 403, -1,
+ -1, -1, -1, 403, -1, 403, 403, 403,
+ 403, 403, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 403, -1, 403,
+ -1, -1, 403, 403, -1, -1, -1, 403,
+ -1, 403, -1, 403, 404, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 404, -1, 404, 404, 404, 404,
+ 404, 404, -1, 404, 404, 404, 404, -1,
+ 404, -1, 404, 404, 404, -1, 404, 404,
+ 404, 404, 404, 404, -1, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ 404, 404, 404, 404, -1, 404, -1, -1,
+ -1, -1, 404, 404, 404, 404, 404, -1,
+ -1, 404, 404, -1, 404, 404, 404, 404,
+ 404, 404, 404, 404, 404, 404, 404, 404,
+ -1, -1, -1, -1, -1, 404, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 403, -1, -1, 404, 404, 404, 404,
+ -1, -1, 404, 404, 404, 404, 404, 404,
+ -1, -1, -1, 404, 404, 404, 404, 404,
+ -1, -1, -1, -1, 404, -1, -1, -1,
+ 404, 404, 404, -1, 404, 404, -1, -1,
+ 404, -1, -1, -1, -1, -1, -1, -1,
+ -1, 404, 404, 404, 404, 404, -1, 404,
+ 404, 404, -1, -1, 404, 404, 404, 404,
+ 404, 404, 404, 404, -1, 404, 404, 404,
+ -1, -1, -1, 404, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 404, 404,
+ -1, -1, 404, -1, -1, -1, -1, 404,
+ -1, -1, -1, -1, 404, -1, 404, 404,
+ 404, 404, 404, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 404, -1,
+ 404, -1, -1, 404, 404, -1, -1, -1,
+ 404, -1, 404, -1, 404, 405, 405, 405,
+ 405, 405, 405, 405, 405, 405, 405, 405,
+ 405, 405, 405, -1, 405, 405, 405, 405,
+ 405, 405, -1, -1, -1, 405, 405, 405,
+ 405, 405, 405, -1, 405, 405, 405, 405,
+ -1, 405, -1, 405, 405, 405, -1, 405,
+ 405, 405, 405, 405, 405, 405, 405, 405,
+ 405, 405, 405, 405, 405, 405, 405, 405,
+ 405, 405, 405, 405, -1, -1, -1, -1,
+ -1, -1, -1, 405, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 405, 405, 405, 405, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 404, -1, -1, 405, 405, 405,
+ 405, -1, -1, 405, 405, 405, 405, 405,
+ 405, -1, -1, -1, 405, 405, 405, 405,
+ 405, -1, 405, 405, -1, 405, 405, -1,
+ -1, 405, 405, 405, -1, 405, 405, -1,
+ -1, 405, -1, -1, -1, -1, -1, -1,
+ -1, -1, 405, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 405, 405, 405,
+ 405, 405, 405, 405, 405, -1, 405, 405,
+ 405, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 405,
+ 405, 405, 405, 405, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 405,
+ -1, 405, 405, -1, -1, -1, 408, 408,
+ 408, 408, 408, 408, 408, 408, 408, 408,
+ 408, 408, 408, 408, -1, 408, 408, 408,
+ 408, 408, 408, -1, -1, -1, 408, 408,
+ 408, 408, 408, 408, -1, 408, 408, 408,
+ 408, -1, 408, -1, 408, 408, 408, -1,
+ 408, 408, 408, 408, 408, 408, -1, 408,
+ 408, 408, 408, 408, 408, 408, 408, 408,
+ -1, 408, 408, 408, 408, -1, -1, -1,
+ -1, -1, -1, -1, 408, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 408, 408, 408, 408, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 408, 408,
+ 408, 408, -1, 405, 408, 408, 408, 408,
+ 408, 408, -1, -1, -1, 408, 408, 408,
+ 408, 408, -1, -1, -1, -1, 408, 408,
+ -1, -1, 408, 408, 408, -1, 408, 408,
+ -1, -1, 408, -1, -1, -1, -1, -1,
+ -1, -1, -1, 408, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 408, 408,
+ 408, 408, 408, 408, 408, 408, -1, 408,
+ 408, 408, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 408, 408, 408, 408, 408, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 408, -1, 408, 408, 409, 409, 409, 409,
+ 409, 409, 409, 409, 409, 409, 409, 409,
+ 409, 409, -1, 409, 409, 409, 409, 409,
+ 409, -1, -1, -1, 409, 409, 409, 409,
+ 409, 409, -1, 409, 409, 409, 409, -1,
+ 409, -1, 409, 409, 409, -1, 409, 409,
+ 409, 409, 409, 409, -1, 409, 409, 409,
+ 409, 409, 409, 409, 409, 409, -1, 409,
+ 409, 409, 409, -1, -1, -1, -1, -1,
+ -1, -1, 409, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 409, 409, 409, 409, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 409, 409, 409, 409,
+ -1, -1, 409, 409, 408, 409, 409, 409,
+ -1, -1, -1, 409, 409, -1, 409, 409,
+ -1, -1, -1, -1, 409, 409, -1, -1,
+ 409, 409, 409, -1, 409, 409, -1, -1,
+ 409, -1, -1, -1, -1, -1, -1, -1,
+ -1, 409, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 409, 409, 409, 409,
+ 409, 409, 409, 409, -1, 409, 409, 409,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 409, 409,
+ 409, 409, 409, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 409, -1,
+ -1, 409, -1, -1, -1, 414, 414, 414,
+ 414, 414, 414, 414, 414, 414, 414, 414,
+ 414, 414, 414, -1, 414, 414, 414, 414,
+ 414, 414, -1, -1, -1, 414, 414, 414,
+ 414, 414, 414, -1, 414, 414, 414, 414,
+ -1, 414, -1, 414, 414, 414, -1, 414,
+ 414, 414, 414, 414, 414, -1, 414, 414,
+ 414, 414, 414, 414, 414, 414, 414, -1,
+ 414, 414, 414, 414, -1, -1, -1, -1,
+ -1, -1, -1, 414, -1, -1, -1, -1,
+ -1, -1, -1, -1, 414, -1, -1, -1,
+ -1, 414, 414, 414, 414, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 414, 414, 414,
+ 414, -1, 409, 414, 414, 414, 414, 414,
+ 414, -1, -1, -1, 414, 414, 414, 414,
+ 414, -1, -1, -1, -1, 414, 414, -1,
+ -1, 414, 414, 414, -1, 414, 414, -1,
+ -1, 414, -1, -1, -1, -1, -1, -1,
+ -1, -1, 414, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 414, 414, 414,
+ 414, 414, 414, 414, 414, -1, 414, 414,
+ 414, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 414,
+ 414, 414, 414, 414, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 414,
+ -1, 414, 414, -1, -1, -1, 416, 416,
+ 416, 416, 416, 416, 416, 416, 416, 416,
+ 416, 416, 416, 416, 416, 416, 416, 416,
+ 416, 416, 416, 416, 416, -1, 416, 416,
+ 416, 416, 416, 416, -1, 416, 416, 416,
+ 416, -1, 416, -1, 416, 416, 416, -1,
+ 416, 416, 416, 416, 416, 416, -1, 416,
+ 416, 416, 416, 416, 416, 416, 416, 416,
+ 416, 416, 416, 416, 416, 416, -1, 416,
+ -1, -1, -1, -1, 416, 416, 416, 416,
+ 416, -1, -1, 416, 416, -1, 416, 416,
+ 416, 416, 416, 416, 416, 416, 416, 416,
+ 416, 416, -1, -1, -1, -1, -1, 416,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 416, 416,
+ 416, 416, -1, 414, 416, 416, 416, 416,
+ 416, 416, -1, -1, -1, 416, 416, 416,
+ 416, 416, -1, -1, -1, -1, 416, -1,
+ -1, -1, 416, 416, 416, -1, 416, 416,
+ -1, -1, 416, -1, -1, -1, -1, -1,
+ -1, -1, -1, 416, 416, 416, 416, 416,
+ -1, 416, 416, 416, -1, -1, 416, 416,
+ 416, 416, 416, 416, 416, 416, -1, 416,
+ 416, 416, -1, -1, -1, 416, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 416, 416, -1, -1, 416, -1, -1, -1,
+ -1, 416, -1, -1, -1, -1, 416, -1,
+ 416, 416, 416, 416, 416, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 416, -1, 416, -1, -1, 416, 416, -1,
+ -1, -1, 416, -1, 416, -1, 416, 417,
+ 417, 417, 417, 417, 417, 417, 417, 417,
+ 417, 417, 417, 417, 417, -1, 417, 417,
+ 417, 417, 417, 417, -1, -1, -1, 417,
+ 417, 417, 417, 417, 417, -1, 417, 417,
+ 417, 417, -1, 417, -1, 417, 417, 417,
+ -1, 417, 417, 417, 417, 417, 417, -1,
+ 417, 417, 417, 417, 417, 417, 417, 417,
+ 417, -1, 417, 417, 417, 417, -1, 417,
+ -1, -1, -1, -1, -1, 417, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 417, 417, 417, 417, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 416, -1, -1, 417,
+ 417, 417, 417, -1, -1, 417, 417, 417,
+ 417, 417, 417, -1, -1, -1, 417, 417,
+ 417, 417, 417, -1, -1, -1, -1, 417,
+ 417, -1, -1, 417, 417, 417, -1, 417,
+ 417, -1, -1, 417, -1, -1, -1, -1,
+ -1, -1, -1, -1, 417, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 417,
+ 417, 417, 417, 417, 417, 417, 417, -1,
+ 417, 417, 417, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 417, 417, 417, 417, 417, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 417, -1, 417, 417, -1, -1, -1,
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, -1, 418,
+ 418, 418, 418, 418, 418, -1, -1, -1,
+ 418, 418, 418, 418, 418, 418, -1, 418,
+ 418, 418, 418, -1, 418, -1, 418, 418,
+ 418, -1, 418, 418, 418, 418, 418, 418,
+ -1, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, -1, 418, 418, 418, 418, -1,
+ 418, -1, -1, -1, -1, -1, 418, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 418, 418, 418, 418,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 418, 418, 418, 418, -1, 417, 418, 418,
+ 418, 418, 418, 418, -1, -1, -1, 418,
+ 418, 418, 418, 418, -1, -1, -1, -1,
+ 418, 418, -1, -1, 418, 418, 418, -1,
+ 418, 418, -1, -1, 418, -1, -1, -1,
+ -1, -1, -1, -1, -1, 418, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 418, 418, 418, 418, 418, 418, 418, 418,
+ -1, 418, 418, 418, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 418, 418, 418, 418, 418, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 418, -1, 418, 418, -1, -1,
+ -1, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, -1,
+ 425, 425, 425, 425, 425, 425, -1, -1,
+ -1, 425, 425, 425, 425, 425, 425, -1,
+ 425, 425, 425, 425, -1, 425, -1, 425,
+ 425, 425, -1, 425, 425, 425, 425, 425,
+ 425, -1, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, -1, 425, 425, 425, 425,
+ -1, -1, -1, -1, -1, -1, -1, 425,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 425, 425, 425,
+ 425, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 425, 425, 425, 425, -1, 418, 425,
+ 425, 425, 425, 425, 425, -1, -1, -1,
+ 425, 425, 425, 425, 425, -1, -1, -1,
+ -1, 425, 425, -1, -1, 425, 425, 425,
+ -1, 425, 425, -1, -1, 425, -1, -1,
+ -1, -1, -1, -1, -1, -1, 425, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 425, 425, 425, 425, 425, 425, 425,
+ 425, -1, 425, 425, 425, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 425, 425, 425, 425, 425,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 425, -1, 425, 425, -1,
+ -1, -1, 441, 441, 441, 441, 441, 441,
+ 441, 441, 441, 441, 441, 441, 441, 441,
+ -1, 441, 441, 441, 441, 441, 441, -1,
+ -1, -1, 441, 441, 441, 441, 441, 441,
+ -1, 441, 441, 441, 441, -1, 441, -1,
+ 441, 441, 441, -1, 441, 441, 441, 441,
+ 441, 441, -1, 441, 441, 441, 441, 441,
+ 441, 441, 441, 441, -1, 441, 441, 441,
+ 441, -1, -1, -1, -1, -1, -1, -1,
+ 441, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 441, 441,
+ 441, 441, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 441, 441, 441, 441, -1, 425,
+ 441, 441, 441, 441, 441, 441, -1, -1,
+ -1, 441, 441, 441, 441, 441, -1, -1,
+ -1, -1, 441, 441, -1, -1, 441, 441,
+ 441, -1, 441, 441, -1, -1, 441, -1,
+ -1, -1, -1, -1, -1, -1, -1, 441,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 441, 441, 441, 441, 441, 441,
+ 441, 441, -1, 441, 441, 441, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 443, 443, 443, 443,
+ -1, 443, -1, -1, 441, 441, 441, 441,
+ 441, -1, 443, 443, 443, 443, 443, -1,
+ -1, -1, -1, -1, 441, -1, 441, 441,
+ 443, -1, -1, -1, 443, 443, 443, 443,
+ -1, -1, -1, 443, 443, 443, -1, -1,
+ -1, -1, 443, 443, -1, 443, 443, 443,
+ 443, -1, -1, -1, -1, -1, -1, -1,
+ 443, 443, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 443, 443,
+ 443, 443, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 441, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 443, 443, 443,
+ 443, 443, -1, 443, 443, 443, -1, -1,
+ -1, 443, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 443, 443, 443, 443,
+ 443, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 443, 445, 445, 445, 445, 445,
+ 445, 445, 445, 445, 445, 445, 445, 445,
+ 445, 445, 445, 445, 445, 445, 445, 445,
+ 445, 445, -1, 445, 445, 445, 445, 445,
+ 445, -1, 445, 445, 445, 445, -1, 445,
+ -1, 445, 445, 445, -1, 445, 445, 445,
+ 445, 445, 445, -1, 445, 445, 445, 445,
+ 445, 445, 445, 445, 445, 445, 445, 445,
+ 445, 445, 445, -1, 445, -1, -1, -1,
+ -1, 445, 445, 445, 445, 445, -1, -1,
+ 445, 445, -1, 445, 445, 445, 445, 445,
+ 445, 445, 445, 445, 445, 445, 445, -1,
+ -1, -1, -1, -1, 445, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 445, 445, 445, 445, -1,
+ -1, 445, 445, 445, 445, 445, 445, -1,
+ -1, -1, 445, 445, 445, 445, 445, -1,
+ -1, -1, -1, 445, -1, -1, -1, 445,
+ 445, 445, -1, 445, 445, -1, -1, 445,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 445, 445, 445, 445, 445, -1, 445, 445,
+ 445, -1, -1, 445, 445, 445, 445, 445,
+ 445, 445, 445, -1, 445, 445, 445, -1,
+ -1, -1, 445, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 445, 445, -1,
+ -1, 445, -1, -1, -1, -1, 445, -1,
+ -1, -1, -1, 445, -1, 445, 445, 445,
+ 445, 445, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 445, -1, 445,
+ -1, -1, 445, 445, -1, -1, -1, 445,
+ -1, 445, -1, 445, -1, -1, -1, -1,
+ 453, 453, 453, 453, -1, 453, -1, -1,
+ -1, -1, -1, -1, -1, -1, 453, 453,
+ 453, 453, 453, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 453, -1, -1, -1,
+ 453, 453, 453, 453, -1, -1, -1, 453,
+ 453, 453, -1, -1, -1, -1, 453, 453,
+ 453, 453, 453, 453, 453, 453, -1, -1,
+ -1, -1, -1, -1, 453, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 453, 453, 453, 453, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 445, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 453, 453, 453, 453, 453, -1, 453,
+ 453, 453, -1, -1, -1, -1, -1, 443,
+ 443, 443, 443, 443, -1, 443, 443, 443,
+ 453, 453, -1, 443, 453, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 453, 453, 453, 453, 453, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 443, 443,
+ 443, 443, 443, -1, -1, -1, -1, -1,
+ -1, -1, 453, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 443, 446, 446, 446,
+ 446, 446, 446, 446, 446, 446, 446, 446,
+ 446, 446, 446, 446, 446, 446, 446, 446,
+ 446, 446, 446, 446, -1, 446, 446, 446,
+ 446, 446, 446, -1, 446, 446, 446, 446,
+ -1, 446, -1, 446, 446, 446, -1, 446,
+ 446, 446, 446, 446, 446, -1, 446, 446,
+ 446, 446, 446, 446, 446, 446, 446, 446,
+ 446, 446, 446, 446, 446, -1, 446, -1,
+ -1, -1, -1, 446, 446, 446, 446, 446,
+ -1, -1, 446, 446, -1, 446, 446, 446,
+ 446, 446, 446, 446, 446, 446, 446, 446,
+ 446, -1, -1, -1, -1, -1, 446, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 446, 446, 446,
+ 446, -1, -1, 446, 446, 446, 446, 446,
+ 446, -1, -1, -1, 446, 446, 446, 446,
+ 446, -1, -1, -1, -1, 446, -1, -1,
+ -1, 446, 446, 446, -1, 446, 446, -1,
+ -1, 446, -1, -1, -1, -1, -1, -1,
+ -1, -1, 446, 446, 446, 446, 446, -1,
+ 446, 446, 446, -1, -1, 446, 446, 446,
+ 446, 446, 446, 446, 446, -1, 446, 446,
+ 446, -1, -1, -1, 446, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 446,
+ 446, -1, -1, 446, -1, -1, -1, -1,
+ 446, -1, -1, -1, -1, 446, -1, 446,
+ 446, 446, 446, 446, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 446,
+ -1, 446, -1, -1, 446, 446, -1, -1,
+ -1, 446, -1, 446, -1, 446, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, -1, 447, 447,
+ 447, 447, 447, 447, -1, 447, 447, 447,
+ 447, -1, 447, -1, 447, 447, 447, -1,
+ 447, 447, 447, 447, 447, 447, -1, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, -1, 447,
+ -1, -1, -1, -1, 447, 447, 447, 447,
+ 447, -1, -1, 447, 447, -1, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, -1, -1, -1, -1, -1, 447,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 446, -1, -1, 447, 447,
+ 447, 447, -1, -1, 447, 447, 447, 447,
+ 447, 447, -1, -1, -1, 447, 447, 447,
+ 447, 447, -1, -1, -1, -1, 447, -1,
+ -1, -1, 447, 447, 447, -1, 447, 447,
+ -1, -1, 447, -1, -1, -1, -1, -1,
+ -1, -1, -1, 447, 447, 447, 447, 447,
+ -1, 447, 447, 447, -1, -1, 447, 447,
+ 447, 447, 447, 447, 447, 447, -1, 447,
+ 447, 447, -1, -1, -1, 447, -1, -1,
+ -1, -1, 453, 453, -1, -1, 453, -1,
+ 447, 447, -1, -1, 447, -1, -1, -1,
+ -1, 447, -1, -1, -1, -1, 447, -1,
+ 447, 447, 447, 447, 447, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 447, -1, 447, -1, 453, 447, 447, -1,
+ -1, -1, 447, -1, 447, -1, 447, 448,
+ 448, 448, 448, 448, 448, 448, 448, 448,
+ 448, 448, 448, 448, 448, 448, 448, 448,
+ 448, 448, 448, 448, 448, 448, -1, 448,
+ 448, 448, 448, 448, 448, -1, 448, 448,
+ 448, 448, -1, 448, -1, 448, 448, 448,
+ -1, 448, 448, 448, 448, 448, 448, -1,
+ 448, 448, 448, 448, 448, 448, 448, 448,
+ 448, 448, 448, 448, 448, 448, 448, -1,
+ 448, -1, -1, -1, -1, 448, 448, 448,
+ 448, 448, -1, -1, 448, 448, -1, 448,
+ 448, 448, 448, 448, 448, 448, 448, 448,
+ 448, 448, 448, -1, -1, -1, -1, -1,
+ 448, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 447, -1, -1, 448,
+ 448, 448, 448, -1, -1, 448, 448, 448,
+ 448, 448, 448, -1, -1, -1, 448, 448,
+ 448, 448, 448, -1, -1, -1, -1, 448,
+ -1, -1, -1, 448, 448, 448, -1, 448,
+ 448, -1, -1, 448, -1, -1, -1, -1,
+ -1, -1, -1, -1, 448, 448, 448, 448,
+ 448, -1, 448, 448, 448, -1, -1, 448,
+ 448, 448, 448, 448, 448, 448, 448, -1,
+ 448, 448, 448, -1, -1, -1, 448, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 448, 448, -1, -1, 448, -1, -1,
+ -1, -1, 448, -1, -1, -1, -1, 448,
+ -1, 448, 448, 448, 448, 448, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 448, -1, 448, -1, -1, 448, 448,
+ -1, -1, -1, 448, -1, 448, -1, 448,
+ 449, 449, 449, 449, 449, 449, 449, 449,
+ 449, 449, 449, 449, 449, 449, 449, 449,
+ 449, 449, 449, 449, 449, 449, 449, -1,
+ 449, 449, 449, 449, 449, 449, -1, 449,
+ 449, 449, 449, -1, 449, -1, 449, 449,
+ 449, -1, 449, 449, 449, 449, 449, 449,
+ -1, 449, 449, 449, 449, 449, 449, 449,
+ 449, 449, 449, 449, 449, 449, 449, 449,
+ -1, 449, -1, -1, -1, -1, 449, 449,
+ 449, 449, 449, -1, -1, 449, 449, -1,
+ 449, 449, 449, 449, 449, 449, 449, 449,
+ 449, 449, 449, 449, -1, -1, -1, -1,
+ -1, 449, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 448, -1, -1,
+ 449, 449, 449, 449, -1, -1, 449, 449,
+ 449, 449, 449, 449, -1, -1, -1, 449,
+ 449, 449, 449, 449, -1, -1, -1, -1,
+ 449, -1, -1, -1, 449, 449, 449, -1,
+ 449, 449, -1, -1, 449, -1, -1, -1,
+ -1, -1, -1, -1, -1, 449, 449, 449,
+ 449, 449, -1, 449, 449, 449, -1, -1,
+ 449, 449, 449, 449, 449, 449, 449, 449,
+ -1, 449, 449, 449, -1, -1, -1, 449,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 449, 449, -1, -1, 449, -1,
+ 449, 449, -1, 449, -1, -1, -1, -1,
+ 449, -1, 449, 449, 449, 449, 449, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 449, -1, 449, -1, -1, 449,
+ 449, -1, -1, -1, 449, -1, 449, -1,
+ 449, 456, 456, 456, 456, 456, 456, 456,
+ 456, 456, 456, 456, 456, 456, 456, 456,
+ 456, 456, 456, 456, 456, 456, 456, 456,
+ -1, 456, 456, 456, 456, 456, 456, -1,
+ 456, 456, 456, 456, -1, 456, -1, 456,
+ 456, 456, -1, 456, 456, 456, 456, 456,
+ 456, -1, 456, 456, 456, 456, 456, 456,
+ 456, 456, 456, 456, 456, 456, 456, 456,
+ 456, -1, 456, -1, -1, -1, -1, 456,
+ 456, 456, 456, 456, -1, -1, 456, 456,
+ -1, 456, 456, 456, 456, 456, 456, 456,
+ 456, 456, 456, 456, 456, -1, -1, -1,
+ -1, -1, 456, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 449, -1,
+ -1, 456, 456, 456, 456, -1, -1, 456,
+ 456, 456, 456, 456, 456, -1, -1, -1,
+ 456, 456, 456, 456, 456, -1, -1, -1,
+ -1, 456, -1, -1, -1, 456, 456, 456,
+ -1, 456, 456, -1, -1, 456, -1, -1,
+ -1, -1, -1, -1, -1, -1, 456, 456,
+ 456, 456, 456, -1, 456, 456, 456, 456,
+ -1, 456, 456, 456, 456, 456, 456, 456,
+ 456, -1, 456, 456, 456, -1, -1, -1,
+ 456, -1, -1, -1, -1, -1, -1, -1,
+ 456, -1, -1, 456, 456, -1, -1, 456,
+ -1, -1, -1, -1, 456, -1, -1, -1,
+ -1, 456, -1, 456, 456, 456, 456, 456,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 456, -1, 456, -1, -1,
+ 456, 456, -1, -1, -1, 456, -1, 456,
+ -1, 456, 457, 457, 457, 457, 457, 457,
+ 457, 457, 457, 457, 457, 457, 457, 457,
+ 457, 457, 457, 457, 457, 457, 457, 457,
+ 457, -1, 457, 457, 457, 457, 457, 457,
+ -1, 457, 457, 457, 457, -1, 457, -1,
+ 457, 457, 457, -1, 457, 457, 457, 457,
+ 457, 457, -1, 457, 457, 457, 457, 457,
+ 457, 457, 457, 457, 457, 457, 457, 457,
+ 457, 457, -1, 457, -1, -1, -1, -1,
+ 457, 457, 457, 457, 457, -1, -1, 457,
+ 457, -1, 457, 457, 457, 457, 457, 457,
+ 457, 457, 457, 457, 457, 457, -1, -1,
+ -1, -1, -1, 457, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 456,
+ -1, -1, 457, 457, 457, 457, -1, -1,
+ 457, 457, 457, 457, 457, 457, -1, -1,
+ -1, 457, 457, 457, 457, 457, -1, -1,
+ -1, -1, 457, -1, -1, -1, 457, 457,
+ 457, -1, 457, 457, -1, -1, 457, -1,
+ -1, -1, -1, -1, -1, -1, -1, 457,
+ 457, 457, 457, 457, -1, 457, 457, 457,
+ 457, -1, 457, 457, 457, 457, 457, 457,
+ 457, 457, -1, 457, 457, 457, -1, -1,
+ -1, 457, -1, -1, -1, -1, -1, -1,
+ -1, 457, -1, -1, 457, 457, -1, -1,
+ 457, -1, 449, 449, -1, 457, -1, -1,
+ -1, -1, 457, -1, 457, 457, 457, 457,
+ 457, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 457, -1, 457, -1,
+ -1, 457, 457, -1, -1, -1, 457, -1,
+ 457, -1, 457, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, -1, 458, 458, 458, 458, 458,
+ 458, -1, 458, 458, 458, 458, -1, 458,
+ -1, 458, 458, 458, -1, 458, 458, 458,
+ 458, 458, 458, -1, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, 458,
+ 458, 458, 458, -1, 458, -1, -1, -1,
+ -1, 458, 458, 458, 458, 458, -1, -1,
+ 458, 458, -1, 458, 458, 458, 458, 458,
+ 458, 458, 458, 458, 458, 458, 458, -1,
+ -1, -1, -1, -1, 458, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 457, -1, -1, 458, 458, 458, 458, -1,
+ -1, 458, 458, 458, 458, 458, 458, -1,
+ -1, -1, 458, 458, 458, 458, 458, -1,
+ -1, -1, -1, 458, -1, -1, -1, 458,
+ 458, 458, -1, 458, 458, -1, -1, 458,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 458, 458, 458, 458, 458, -1, 458, 458,
+ 458, 458, -1, 458, 458, 458, 458, 458,
+ 458, 458, 458, -1, 458, 458, 458, -1,
+ -1, -1, 458, -1, -1, -1, -1, -1,
+ -1, -1, 458, -1, -1, 458, 458, -1,
+ -1, 458, -1, -1, -1, -1, 458, -1,
+ -1, -1, -1, 458, -1, 458, 458, 458,
+ 458, 458, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 458, -1, 458,
+ -1, -1, 458, 458, -1, -1, -1, 458,
+ -1, 458, -1, 458, 466, 466, 466, 466,
+ 466, 466, 466, 466, 466, 466, 466, 466,
+ 466, 466, 466, 466, 466, 466, 466, 466,
+ 466, 466, 466, -1, 466, 466, 466, 466,
+ 466, 466, -1, 466, 466, 466, 466, -1,
+ 466, -1, 466, 466, 466, -1, 466, 466,
+ 466, 466, 466, 466, -1, 466, 466, 466,
+ 466, 466, 466, 466, 466, 466, 466, 466,
+ 466, 466, 466, 466, -1, 466, -1, -1,
+ -1, -1, 466, 466, 466, 466, 466, -1,
+ -1, 466, 466, -1, 466, 466, 466, 466,
+ 466, 466, 466, 466, 466, 466, 466, 466,
+ -1, -1, -1, -1, -1, 466, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 458, -1, -1, 466, 466, 466, 466,
+ -1, -1, 466, 466, 466, 466, 466, 466,
+ -1, -1, -1, 466, 466, 466, 466, 466,
+ -1, -1, -1, -1, 466, -1, -1, -1,
+ 466, 466, 466, -1, 466, 466, -1, -1,
+ 466, -1, -1, -1, -1, -1, -1, -1,
+ -1, 466, 466, 466, 466, 466, -1, 466,
+ 466, 466, 466, -1, 466, 466, 466, 466,
+ 466, 466, 466, 466, -1, 466, 466, 466,
+ -1, -1, -1, 466, -1, -1, -1, -1,
+ -1, -1, -1, 466, -1, -1, 466, 466,
+ -1, -1, 466, -1, -1, -1, -1, 466,
+ -1, -1, -1, -1, 466, -1, 466, 466,
+ 466, 466, 466, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 466, -1,
+ 466, -1, -1, 466, 466, -1, -1, -1,
+ 466, -1, 466, -1, 466, 469, 469, 469,
+ 469, 469, 469, 469, 469, 469, 469, 469,
+ 469, 469, 469, 469, 469, 469, 469, 469,
+ 469, 469, 469, 469, -1, 469, 469, 469,
+ 469, 469, 469, -1, 469, 469, 469, 469,
+ -1, 469, -1, 469, 469, 469, 469, 469,
+ 469, 469, 469, 469, 469, -1, 469, 469,
+ 469, 469, 469, 469, 469, 469, 469, 469,
+ 469, 469, 469, 469, 469, -1, 469, -1,
+ -1, 469, -1, 469, 469, 469, 469, 469,
+ -1, -1, 469, 469, -1, 469, 469, 469,
+ 469, 469, 469, 469, 469, 469, 469, 469,
+ 469, -1, -1, -1, -1, -1, 469, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 466, -1, -1, 469, 469, 469,
+ 469, -1, -1, 469, 469, 469, 469, 469,
+ 469, -1, -1, -1, 469, 469, 469, 469,
+ 469, -1, -1, -1, -1, 469, -1, -1,
+ -1, 469, 469, 469, -1, 469, 469, -1,
+ -1, 469, -1, -1, -1, -1, -1, -1,
+ -1, -1, 469, 469, 469, 469, 469, -1,
+ 469, 469, 469, -1, -1, 469, 469, 469,
+ 469, 469, 469, 469, 469, 469, 469, 469,
+ 469, -1, -1, -1, 469, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 469,
+ 469, -1, -1, 469, -1, -1, -1, -1,
+ 469, -1, 469, 469, -1, 469, -1, 469,
+ 469, 469, 469, 469, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 469,
+ -1, 469, -1, -1, 469, 469, -1, -1,
+ -1, 469, -1, 469, -1, 469, 470, 470,
+ 470, 470, 470, 470, 470, 470, 470, 470,
+ 470, 470, 470, 470, 470, 470, 470, 470,
+ 470, 470, 470, 470, 470, -1, 470, 470,
+ 470, 470, 470, 470, -1, 470, 470, 470,
+ 470, -1, 470, -1, 470, 470, 470, 470,
+ 470, 470, 470, 470, 470, 470, -1, 470,
+ 470, 470, 470, 470, 470, 470, 470, 470,
+ 470, 470, 470, 470, 470, 470, -1, 470,
+ -1, -1, 470, -1, 470, 470, 470, 470,
+ 470, -1, -1, 470, 470, -1, 470, 470,
+ 470, 470, 470, 470, 470, 470, 470, 470,
+ 470, 470, -1, -1, -1, -1, -1, 470,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 469, -1, -1, 470, 470,
+ 470, 470, -1, -1, 470, 470, 470, 470,
+ 470, 470, -1, -1, -1, 470, 470, 470,
+ 470, 470, -1, -1, -1, -1, 470, -1,
+ -1, -1, 470, 470, 470, -1, 470, 470,
+ -1, -1, 470, -1, -1, -1, -1, -1,
+ -1, -1, -1, 470, 470, 470, 470, 470,
+ -1, 470, 470, 470, -1, -1, 470, 470,
+ 470, 470, 470, 470, 470, 470, 470, 470,
+ 470, 470, -1, -1, -1, 470, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 470, 470, -1, -1, 470, -1, -1, -1,
+ -1, 470, -1, 470, 470, -1, 470, -1,
+ 470, 470, 470, 470, 470, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 470, -1, 470, -1, -1, 470, 470, -1,
+ -1, -1, 470, -1, 470, -1, 470, 471,
+ 471, 471, 471, 471, 471, 471, 471, 471,
+ 471, 471, 471, 471, 471, 471, 471, 471,
+ 471, 471, 471, 471, 471, 471, -1, 471,
+ 471, 471, 471, 471, 471, -1, 471, 471,
+ 471, 471, -1, 471, -1, 471, 471, 471,
+ 471, 471, 471, 471, 471, 471, 471, -1,
+ 471, 471, 471, 471, 471, 471, 471, 471,
+ 471, 471, 471, 471, 471, 471, 471, -1,
+ 471, -1, -1, 471, -1, 471, 471, 471,
+ 471, 471, -1, -1, 471, 471, -1, 471,
+ 471, 471, 471, 471, 471, 471, 471, 471,
+ 471, 471, 471, -1, -1, -1, -1, -1,
+ 471, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 470, -1, -1, 471,
+ 471, 471, 471, -1, -1, 471, 471, 471,
+ 471, 471, 471, -1, -1, -1, 471, 471,
+ 471, 471, 471, -1, -1, -1, -1, 471,
+ -1, -1, -1, 471, 471, 471, -1, 471,
+ 471, -1, -1, 471, -1, -1, -1, -1,
+ -1, -1, -1, -1, 471, 471, 471, 471,
+ 471, -1, 471, 471, 471, -1, -1, 471,
+ 471, 471, 471, 471, 471, 471, 471, 471,
+ 471, 471, 471, -1, -1, -1, 471, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 471, 471, -1, -1, 471, -1, -1,
+ -1, -1, 471, -1, 471, 471, -1, 471,
+ -1, 471, 471, 471, 471, 471, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 471, -1, 471, -1, -1, 471, 471,
+ -1, -1, -1, 471, -1, 471, -1, 471,
+ 477, 477, 477, 477, 477, 477, 477, 477,
+ 477, 477, 477, 477, 477, 477, 477, 477,
+ 477, 477, 477, 477, 477, 477, 477, -1,
+ 477, 477, 477, 477, 477, 477, -1, 477,
+ 477, 477, 477, -1, 477, -1, 477, 477,
+ 477, 477, 477, 477, 477, 477, 477, 477,
+ -1, 477, 477, 477, 477, 477, 477, 477,
+ 477, 477, 477, 477, 477, 477, 477, 477,
+ -1, 477, -1, -1, 477, -1, 477, 477,
+ 477, 477, 477, -1, -1, 477, 477, -1,
+ 477, 477, 477, 477, 477, 477, 477, 477,
+ 477, 477, 477, 477, -1, -1, -1, -1,
+ -1, 477, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 471, -1, -1,
+ 477, 477, 477, 477, -1, -1, 477, 477,
+ 477, 477, 477, 477, -1, -1, -1, 477,
+ 477, 477, 477, 477, -1, -1, -1, -1,
+ 477, -1, -1, -1, 477, 477, 477, -1,
+ 477, 477, -1, -1, 477, -1, -1, -1,
+ -1, -1, -1, -1, -1, 477, 477, 477,
+ 477, 477, -1, 477, 477, 477, -1, -1,
+ 477, 477, 477, 477, 477, 477, 477, 477,
+ 477, 477, 477, 477, -1, -1, -1, 477,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 477, 477, -1, -1, 477, -1,
+ -1, -1, -1, 477, -1, 477, 477, -1,
+ 477, -1, 477, 477, 477, 477, 477, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 477, -1, 477, -1, -1, 477,
+ 477, -1, -1, -1, 477, -1, 477, -1,
+ 477, 478, 478, 478, 478, -1, 478, -1,
+ -1, -1, -1, -1, -1, -1, -1, 478,
+ 478, 478, 478, 478, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 478, -1, -1,
+ -1, 478, 478, 478, 478, -1, -1, -1,
+ 478, 478, 478, -1, -1, -1, -1, 478,
+ 478, -1, 478, 478, 478, 478, -1, -1,
+ -1, -1, -1, -1, -1, 478, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 478, 478, 478, 478, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 479, 479,
+ 479, 479, 479, 479, 479, 479, 479, 479,
+ 479, 479, 479, 479, 479, 479, 479, 479,
+ 479, 479, 479, 479, 479, -1, 479, 479,
+ 479, 479, 479, 479, -1, 479, 479, 479,
+ 479, -1, 479, -1, 479, 479, 479, -1,
+ 479, 479, 479, 479, 479, 479, 477, 479,
+ 479, 479, 479, 479, 479, 479, 479, 479,
+ -1, 479, 479, 479, 479, -1, -1, -1,
+ -1, -1, -1, -1, 479, -1, -1, 479,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 479, 479, 479, 479, -1, -1,
+ -1, 478, -1, -1, -1, -1, -1, -1,
+ -1, -1, 478, 478, 478, 478, 478, -1,
+ 478, 478, 478, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 478, 478, 478, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 478, 478, 478, 478, 478, 479, 479,
+ 479, 479, -1, -1, 479, 479, -1, 479,
+ 479, 479, -1, -1, -1, 479, 479, -1,
+ 479, 479, -1, -1, -1, -1, 479, -1,
+ -1, -1, 479, 479, 479, -1, 479, 479,
+ -1, -1, 479, -1, -1, -1, -1, -1,
+ -1, -1, -1, 479, 479, 479, 479, -1,
+ -1, -1, 479, 479, -1, -1, 479, 479,
+ 479, 479, 479, 479, 479, 479, -1, 479,
+ 479, 479, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 479, 479, 479, 479, 479, -1, 480, 480,
+ 480, 480, 480, 480, 480, 480, -1, 480,
+ 479, 480, 480, 480, 480, 479, -1, -1,
+ 480, 480, 480, 480, 480, -1, -1, -1,
+ 480, 480, 480, -1, -1, -1, 480, -1,
+ -1, -1, 480, 480, 480, 480, -1, -1,
+ -1, 480, 480, 480, -1, -1, -1, -1,
+ 480, 480, -1, 480, 480, 480, 480, -1,
+ -1, -1, -1, -1, -1, -1, 480, -1,
+ 480, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 480, 480, 480, 480,
+ -1, -1, 480, 480, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, -1, 481, 481, 481, 481, 481, 481,
+ -1, 481, 481, 481, 481, -1, 481, -1,
+ 481, 481, 481, -1, 481, 481, 481, 481,
+ 481, 481, -1, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, -1, 481, 481, 481,
+ 481, -1, -1, -1, 479, -1, -1, -1,
+ 481, -1, -1, 481, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 480, 481, 481,
+ 481, 481, -1, 480, -1, -1, -1, -1,
+ 480, 480, 480, 480, 480, 480, 480, 480,
+ -1, 480, 480, 480, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 480, 480, 480, 480, 480, -1,
+ -1, -1, 481, 481, 481, 481, -1, -1,
+ 481, 481, -1, 481, 481, 481, -1, -1,
+ -1, 481, 481, -1, 481, 481, -1, -1,
+ -1, -1, 481, -1, -1, -1, 481, 481,
+ 481, -1, 481, 481, -1, -1, 481, -1,
+ -1, -1, -1, -1, -1, -1, -1, 481,
+ 481, 481, 481, -1, -1, -1, 481, 481,
+ -1, -1, 481, 481, 481, 481, 481, 481,
+ 481, 481, -1, 481, 481, 481, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 481, 481, 481, 481,
+ 481, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 481, -1, -1, -1,
+ -1, 481, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 478, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 478, 478, 478, 482, 482,
+ 482, 482, 482, 482, 482, 482, 482, 482,
+ 482, 482, 482, 482, 482, 482, 482, 482,
+ 482, 482, 482, 482, 482, -1, 482, 482,
+ 482, 482, 482, 482, -1, 482, 482, 482,
+ 482, -1, 482, -1, 482, 482, 482, -1,
+ 482, 482, 482, 482, 482, 482, -1, 482,
+ 482, 482, 482, 482, 482, 482, 482, 482,
+ -1, 482, 482, 482, 482, -1, -1, -1,
+ -1, -1, -1, -1, 482, -1, -1, 482,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 482, 482, 482, 482, -1, -1,
+ 481, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 482, 482,
+ 482, 482, -1, -1, 482, 482, -1, 482,
+ 482, 482, -1, -1, -1, 482, 482, -1,
+ 482, 482, -1, -1, -1, -1, 482, -1,
+ -1, -1, 482, 482, 482, -1, 482, 482,
+ -1, -1, 482, -1, -1, -1, -1, -1,
+ -1, -1, -1, 482, 482, 482, 482, -1,
+ -1, -1, 482, 482, -1, -1, 482, 482,
+ 482, 482, 482, 482, 482, 482, -1, 482,
+ 482, 482, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 482, 482, 482, 482, 482, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 482, -1, -1, -1, -1, 482, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 480,
+ -1, -1, -1, -1, -1, 480, -1, -1,
+ -1, -1, 480, 480, 480, 480, 480, 480,
+ 480, 480, -1, 480, 480, 480, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 480, 480, 480, 480,
+ 480, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 483, 483, 483, 483, 483,
+ 483, 483, 483, 483, 483, 483, 483, 483,
+ 483, 483, 483, 483, 483, 483, 483, 483,
+ 483, 483, 483, 483, 483, 483, 483, 483,
+ 483, -1, 483, 483, 483, 483, 483, 483,
+ -1, 483, 483, 483, 482, 483, 483, 483,
+ 483, 483, 483, 483, 483, 483, 483, 483,
+ 483, 483, 483, 483, 483, -1, 483, 483,
+ 483, 483, -1, -1, -1, -1, -1, -1,
+ -1, 483, 483, -1, 483, -1, -1, 483,
+ -1, -1, -1, -1, 483, -1, -1, 483,
+ 483, 483, 483, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 483, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 483, 483, 483, 483, -1,
+ -1, 483, 483, 483, 483, 483, 483, -1,
+ 483, 483, 483, 483, 483, 483, 483, -1,
+ -1, 483, -1, 483, 483, -1, 483, 483,
+ 483, 483, -1, 483, 483, -1, -1, 483,
+ -1, -1, -1, -1, -1, 483, -1, 483,
+ 483, 483, 483, 483, -1, -1, -1, 483,
+ 483, -1, 483, 483, 483, 483, 483, 483,
+ 483, 483, 483, -1, 483, 483, 483, -1,
+ -1, 483, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 483, 483, 483, -1, -1,
+ 483, 483, 483, -1, -1, 483, 483, 483,
+ 483, 483, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 483, -1, 483,
+ 483, 483, 483, -1, 490, 490, 490, 490,
+ 490, 490, 490, 490, 490, 490, 490, 490,
+ 490, 490, 490, 490, 490, 490, 490, 490,
+ 490, 490, 490, -1, 490, 490, 490, 490,
+ 490, 490, -1, 490, 490, 490, 490, -1,
+ 490, -1, 490, 490, 490, -1, 490, 490,
+ 490, 490, 490, 490, -1, 490, 490, 490,
+ 490, 490, 490, 490, 490, 490, 490, 490,
+ 490, 490, 490, 490, -1, 490, -1, -1,
+ -1, -1, 490, 490, 490, 490, 490, -1,
+ -1, 490, 490, -1, 490, 490, 490, 490,
+ 490, 490, 490, 490, 490, 490, 490, 490,
+ -1, -1, -1, -1, -1, 490, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 490, 490, 490, 490,
+ -1, 483, 490, 490, 490, 490, 490, 490,
+ -1, -1, -1, 490, 490, 490, 490, 490,
+ -1, -1, -1, -1, 490, -1, -1, -1,
+ 490, 490, 490, -1, 490, 490, -1, -1,
+ 490, -1, -1, -1, -1, -1, -1, -1,
+ -1, 490, 490, 490, 490, 490, -1, 490,
+ 490, 490, -1, -1, 490, 490, 490, 490,
+ 490, 490, 490, 490, -1, 490, 490, 490,
+ -1, -1, -1, 490, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 490, 490,
+ -1, -1, 490, -1, -1, -1, -1, 490,
+ -1, -1, -1, -1, 490, -1, 490, 490,
+ 490, 490, 490, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 490, -1,
+ 490, -1, -1, 490, 490, -1, -1, -1,
+ 490, -1, 490, -1, 490, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, -1, 491, 491, 491, 491,
+ 491, 491, -1, -1, -1, 491, 491, 491,
+ 491, 491, 491, -1, 491, 491, 491, 491,
+ -1, 491, -1, 491, 491, 491, -1, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, 491, 491, 491, 491,
+ 491, 491, 491, 491, -1, -1, -1, -1,
+ -1, -1, -1, 491, -1, 491, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 491, 491, 491, 491, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 490, -1, -1, 491, 491, 491,
+ 491, -1, -1, 491, 491, 491, 491, 491,
+ 491, -1, -1, -1, 491, 491, 491, 491,
+ 491, -1, 491, 491, -1, 491, 491, -1,
+ -1, 491, 491, 491, -1, 491, 491, 491,
+ -1, 491, -1, -1, -1, -1, -1, -1,
+ -1, -1, 491, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 491, 491, 491,
+ 491, 491, 491, 491, 491, -1, 491, 491,
+ 491, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 492,
+ 492, 492, 492, -1, 492, -1, -1, 491,
+ 491, 491, 491, 491, -1, 492, 492, 492,
+ 492, 492, -1, -1, -1, -1, -1, 491,
+ -1, 491, 491, 492, -1, -1, -1, 492,
+ 492, 492, 492, -1, -1, -1, 492, 492,
+ 492, -1, -1, -1, -1, 492, 492, -1,
+ 492, 492, 492, 492, 492, -1, -1, -1,
+ -1, -1, -1, 492, -1, -1, -1, 493,
+ 493, 493, 493, -1, 493, -1, -1, -1,
+ -1, 492, 492, 492, 492, 493, 493, 493,
+ 493, 493, -1, -1, -1, -1, 492, -1,
+ -1, -1, -1, 493, -1, -1, -1, 493,
+ 493, 493, 493, -1, -1, -1, 493, 493,
+ 493, -1, -1, -1, -1, 493, 493, -1,
+ 493, 493, 493, 493, 493, -1, -1, -1,
+ -1, -1, -1, 493, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 493, 493, 493, 493, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 493, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 491, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 492, 492, 492, 492, 492, -1, 492, 492,
+ 492, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 492,
+ 492, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 492, -1, 492,
+ 492, 492, 492, 492, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 493, 493, 493, 493, 493, 492, 493, 493,
+ 493, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 493,
+ 493, -1, -1, -1, -1, -1, -1, 494,
+ 494, 494, 494, -1, 494, 493, -1, 493,
+ 493, 493, 493, 493, -1, 494, 494, 494,
+ 494, 494, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 494, -1, -1, -1, 494,
+ 494, 494, 494, -1, -1, 493, 494, 494,
+ 494, -1, -1, -1, -1, 494, 494, -1,
+ 494, 494, 494, 494, 494, -1, -1, -1,
+ -1, -1, -1, 494, -1, -1, -1, 523,
+ 523, 523, 523, -1, 523, -1, -1, -1,
+ -1, 494, 494, 494, 494, 523, 523, 523,
+ 523, 523, -1, -1, -1, -1, 494, -1,
+ -1, -1, -1, 523, -1, -1, -1, 523,
+ 523, 523, 523, -1, -1, -1, 523, 523,
+ 523, -1, -1, -1, -1, 523, 523, 523,
+ 523, 523, 523, 523, -1, -1, -1, -1,
+ -1, -1, -1, 523, -1, -1, -1, -1,
+ -1, -1, 527, 527, 527, 527, -1, 527,
+ -1, 523, 523, 523, 523, -1, -1, -1,
+ 527, 527, 527, 527, 527, -1, 523, -1,
+ -1, -1, -1, -1, -1, -1, 527, -1,
+ -1, -1, 527, 527, 527, 527, -1, -1,
+ -1, 527, 527, 527, -1, -1, -1, -1,
+ 527, 527, 527, 527, 527, 527, 527, 527,
+ -1, -1, -1, -1, -1, -1, 527, -1,
+ 494, 494, 494, 494, 494, -1, 494, 494,
+ 494, -1, -1, -1, 527, 527, 527, 527,
+ -1, -1, -1, -1, -1, -1, -1, 494,
+ 494, 527, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 494, -1, 494,
+ 494, 494, 494, 494, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 523, 523, 523, 523, 523, 494, 523, 523,
+ 523, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 523,
+ 523, -1, -1, 523, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 523,
+ 523, 523, 523, 523, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 523, -1, 527, 527, 527, 527, 527,
+ -1, 527, 527, 527, -1, -1, -1, -1,
+ -1, -1, -1, -1, 529, 529, 529, 529,
+ -1, 529, 527, 527, -1, -1, 527, -1,
+ -1, -1, 529, 529, 529, 529, 529, -1,
+ -1, -1, 527, 527, 527, 527, 527, -1,
+ 529, -1, -1, -1, 529, 529, 529, 529,
+ -1, -1, -1, 529, 529, 529, -1, -1,
+ -1, -1, 529, 529, 527, 529, 529, 529,
+ 529, -1, -1, -1, -1, -1, -1, -1,
+ 529, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 529, 529,
+ 529, 529, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 530, 530, 530, 530, 530, 530, 530,
+ 530, 530, 530, 530, 530, 530, 530, 530,
+ 530, 530, 530, 530, 530, 530, 530, 530,
+ -1, 530, 530, 530, 530, 530, 530, -1,
+ 530, 530, 530, 530, -1, 530, -1, 530,
+ 530, 530, -1, 530, 530, 530, 530, 530,
+ 530, -1, 530, 530, 530, 530, 530, 530,
+ 530, 530, 530, 530, 530, 530, 530, 530,
+ 530, -1, 530, -1, -1, -1, -1, 530,
+ 530, 530, 530, 530, -1, -1, 530, 530,
+ -1, 530, 530, 530, 530, 530, 530, 530,
+ 530, 530, 530, 530, 530, -1, -1, -1,
+ -1, -1, 530, -1, -1, 529, 529, 529,
+ 529, 529, -1, 529, 529, 529, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 529, 529, 529, 529,
+ 529, 530, 530, 530, 530, -1, -1, 530,
+ 530, 530, 530, 530, 530, -1, -1, -1,
+ 530, 530, 530, 530, 530, -1, -1, -1,
+ -1, 530, -1, -1, -1, 530, 530, 530,
+ -1, 530, 530, -1, -1, 530, -1, -1,
+ -1, -1, -1, -1, -1, -1, 530, 530,
+ 530, 530, 530, -1, 530, 530, 530, -1,
+ -1, 530, 530, 530, 530, 530, 530, 530,
+ 530, -1, 530, 530, 530, -1, -1, -1,
+ 530, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 530, 530, -1, -1, 530,
+ -1, -1, -1, -1, 530, -1, -1, -1,
+ -1, 530, -1, 530, 530, 530, 530, 530,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 530, -1, 530, -1, -1,
+ 530, 530, -1, -1, -1, 530, -1, 530,
+ -1, 530, 541, 541, 541, 541, 541, 541,
+ 541, 541, -1, 541, -1, 541, 541, 541,
+ 541, -1, -1, -1, 541, 541, 541, 541,
+ 541, -1, -1, -1, 541, 541, 541, -1,
+ -1, -1, 541, -1, -1, -1, 541, 541,
+ 541, 541, -1, -1, -1, 541, 541, 541,
+ -1, -1, -1, -1, 541, 541, -1, 541,
+ 541, 541, 541, 544, 544, 544, 544, -1,
+ 544, -1, 541, -1, 541, -1, -1, -1,
+ -1, 544, 544, 544, 544, 544, -1, -1,
+ 541, 541, 541, 541, -1, -1, -1, 544,
+ -1, -1, -1, 544, 544, 544, 544, -1,
+ -1, -1, 544, 544, 544, -1, -1, -1,
+ -1, 544, 544, -1, 544, 544, 544, 544,
+ -1, -1, -1, -1, -1, -1, -1, 544,
+ -1, 523, 523, -1, -1, 523, -1, -1,
+ -1, -1, -1, -1, -1, 544, 544, 544,
+ 544, -1, -1, -1, -1, -1, -1, 530,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 523, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 541, -1, -1, 527, 527, -1, 541,
+ 527, -1, -1, -1, 541, 541, 541, 541,
+ 541, 541, 541, 541, -1, 541, 541, 541,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 527, -1,
+ -1, -1, -1, -1, -1, -1, 541, 541,
+ 541, 541, 541, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 544, 544, 544, 544,
+ 544, -1, 544, 544, 544, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 544, 544, 544, 544, 544,
+ -1, -1, -1, -1, 545, 545, 545, 545,
+ 545, 545, 545, 545, 545, 545, 545, 545,
+ 545, 545, 545, 545, 545, 545, 545, 545,
+ 545, 545, 545, -1, 545, 545, 545, 545,
+ 545, 545, -1, 545, 545, 545, 545, -1,
+ 545, -1, 545, 545, 545, -1, 545, 545,
+ 545, 545, 545, 545, -1, 545, 545, 545,
+ 545, 545, 545, 545, 545, 545, -1, 545,
+ 545, 545, 545, -1, -1, -1, -1, -1,
+ -1, -1, 545, -1, -1, 545, -1, 529,
+ 529, 529, 529, 529, -1, 529, 529, 529,
+ 545, 545, 545, 545, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 529, 529,
+ 529, 529, 529, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 545, 545, 545, 545,
+ -1, -1, 545, 545, -1, 545, 545, 545,
+ -1, -1, -1, 545, 545, -1, 545, 545,
+ -1, -1, -1, -1, 545, -1, -1, -1,
+ 545, 545, 545, -1, 545, 545, -1, -1,
+ 545, -1, -1, -1, -1, -1, -1, -1,
+ -1, 545, 545, 545, 545, -1, -1, -1,
+ 545, 545, -1, -1, 545, 545, 545, 545,
+ 545, 545, 545, 545, -1, 545, 545, 545,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 545, 545,
+ 545, 545, 545, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 545, -1,
+ -1, -1, -1, 545, -1, -1, -1, -1,
+ -1, -1, -1, 550, 550, 550, 550, 550,
+ 550, 550, 550, 550, 550, -1, 550, 550,
+ 550, 550, -1, -1, -1, 550, 550, 550,
+ 550, 550, -1, -1, -1, 550, 550, 550,
+ -1, -1, -1, 550, -1, -1, -1, 550,
+ 550, 550, 550, -1, -1, -1, 550, 550,
+ 550, -1, -1, -1, -1, 550, 550, -1,
+ 550, 550, 550, 550, -1, -1, -1, -1,
+ -1, -1, -1, 550, -1, -1, 550, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 550, 550, 550, 550, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 545, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 541, -1, -1, -1, -1,
+ -1, 541, -1, -1, -1, -1, 541, 541,
+ 541, 541, 541, 541, 541, 541, -1, 541,
+ 541, 541, 550, -1, -1, -1, -1, -1,
+ -1, 550, 550, 550, -1, 550, 550, 550,
+ 550, 550, 550, 550, 550, -1, 550, 550,
+ 550, -1, -1, -1, -1, -1, -1, -1,
+ 541, 541, 541, 541, 541, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 544, 544,
+ 544, 544, 544, -1, 544, 544, 544, 550,
+ 550, 550, 550, 550, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 550, -1, -1, -1,
+ -1, -1, -1, -1, -1, 544, 544, 544,
+ 544, 544, 546, 546, 546, 546, 546, 546,
+ 546, 546, 546, 546, 546, 546, 546, 546,
+ 546, 546, 546, 546, 546, 546, 546, 546,
+ 546, 546, 546, 546, 546, 546, 546, 546,
+ -1, 546, 546, 546, 546, 546, 546, -1,
+ 546, 546, 546, -1, 546, 546, 546, 546,
+ 546, 546, 546, 546, 546, 546, 546, 546,
+ 546, 546, 546, 546, -1, 546, 546, 546,
+ 546, -1, -1, -1, -1, -1, -1, -1,
+ 546, 546, -1, 546, -1, -1, 546, -1,
+ -1, -1, -1, 546, -1, -1, 546, 546,
+ 546, 546, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 546, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 546, 546, 546, 546, -1, -1,
+ 546, 546, 546, 546, 546, 546, -1, 546,
+ 546, 546, 546, 546, 546, 546, -1, -1,
+ 546, -1, 546, 546, -1, 546, 546, 546,
+ 546, -1, 546, 546, -1, -1, 546, -1,
+ -1, -1, -1, -1, 546, -1, 546, 546,
+ 546, 546, 546, -1, -1, -1, 546, 546,
+ -1, 546, 546, 546, 546, 546, 546, 546,
+ 546, 546, -1, 546, 546, 546, -1, -1,
+ 546, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 546, 546, 546, -1, -1, 546,
+ 546, 546, -1, -1, 546, 546, 546, 546,
+ 546, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 546, -1, 546, 546,
+ 546, 546, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 551, 551, 551, 551,
+ 551, 551, 551, 551, 551, 551, -1, 551,
+ 551, 551, 551, -1, -1, -1, 551, 551,
+ 551, 551, 551, -1, -1, -1, 551, 551,
+ 551, -1, -1, -1, 551, -1, -1, -1,
+ 551, 551, 551, 551, -1, -1, -1, 551,
+ 551, 551, -1, -1, -1, -1, 551, 551,
+ -1, 551, 551, 551, 551, -1, -1, -1,
+ -1, -1, -1, -1, 551, -1, -1, 551,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 551, 551, 551, 551, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 546, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 550, -1, -1, -1,
+ -1, -1, -1, -1, -1, 550, -1, 550,
+ 550, 550, 550, 550, 550, 550, 550, -1,
+ 550, 550, 550, 551, -1, -1, -1, -1,
+ -1, -1, 551, 551, 551, -1, 551, 551,
+ 551, 551, 551, 551, 551, 551, -1, 551,
+ 551, 551, -1, -1, -1, -1, -1, -1,
+ -1, 550, 550, 550, 550, 550, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 550, -1,
+ 551, 551, 551, 551, 551, -1, -1, 554,
+ 554, 554, 554, 554, 554, 554, 554, 554,
+ 554, 554, 554, 554, 554, 551, 554, 554,
+ 554, 554, 554, 554, -1, -1, -1, 554,
+ 554, 554, 554, 554, 554, -1, 554, 554,
+ 554, 554, -1, 554, 554, 554, 554, 554,
+ -1, 554, 554, 554, 554, 554, 554, -1,
+ 554, 554, 554, 554, 554, 554, 554, 554,
+ 554, -1, 554, 554, 554, 554, -1, 554,
+ -1, 554, -1, -1, -1, 554, -1, 554,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 554, 554, 554, 554, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 554,
+ 554, 554, 554, -1, -1, 554, 554, 554,
+ 554, 554, 554, -1, -1, -1, 554, 554,
+ 554, 554, 554, -1, -1, -1, -1, 554,
+ 554, -1, -1, 554, 554, 554, -1, 554,
+ 554, -1, -1, 554, -1, -1, -1, 554,
+ 554, -1, 554, -1, 554, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 554,
+ 554, 554, 554, 554, 554, 554, 554, -1,
+ 554, 554, 554, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 554, 554, 554, 554, 554, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 554, -1, 554, 554, -1, -1, -1,
+ 557, 557, 557, 557, 557, 557, 557, 557,
+ 557, 557, 557, 557, 557, 557, -1, 557,
+ 557, 557, 557, 557, 557, -1, -1, -1,
+ 557, 557, 557, 557, 557, 557, -1, 557,
+ 557, 557, 557, -1, 557, -1, 557, 557,
+ 557, -1, 557, 557, 557, 557, 557, 557,
+ -1, 557, 557, 557, 557, 557, 557, 557,
+ 557, 557, -1, 557, 557, 557, 557, -1,
+ 557, -1, -1, -1, -1, -1, 557, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 557, 557, 557, 557,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 557, 557, 557, 557, -1, 554, 557, 557,
+ 557, 557, 557, 557, -1, -1, -1, 557,
+ 557, 557, 557, 557, -1, -1, -1, -1,
+ 557, 557, -1, -1, 557, 557, 557, -1,
+ 557, 557, -1, -1, 557, -1, -1, -1,
+ -1, -1, -1, -1, -1, 557, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 557, 557, 557, 557, 557, 557, 557, 557,
+ -1, 557, 557, 557, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 557, 557, 557, 557, 557, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 557, -1, 557, 557, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 558,
+ 558, 558, 558, 558, 558, 558, 558, 558,
+ 558, 558, 558, 558, 558, -1, 558, 558,
+ 558, 558, 558, 558, -1, -1, -1, 558,
+ 558, 558, 558, 558, 558, -1, 558, 558,
+ 558, 558, -1, 558, -1, 558, 558, 558,
+ -1, 558, 558, 558, 558, 558, 558, -1,
+ 558, 558, 558, 558, 558, 558, 558, 558,
+ 558, -1, 558, 558, 558, 558, -1, -1,
+ -1, -1, -1, -1, -1, 558, -1, 558,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 558, 558, 558, 558, -1,
+ 558, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 557, 558,
+ 558, 558, 558, -1, -1, 558, 558, 558,
+ 558, 558, 558, -1, -1, -1, 558, 558,
+ 558, 558, 558, -1, -1, -1, 558, 558,
+ 558, -1, -1, 558, 558, 558, -1, 558,
+ 558, 558, -1, 558, -1, -1, -1, -1,
+ -1, -1, -1, -1, 558, -1, -1, -1,
+ -1, -1, 554, -1, -1, -1, -1, 558,
+ 558, 558, 558, 558, 558, 558, 558, -1,
+ 558, 558, 558, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 558, 558, 558, 558, 558, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 558, -1, 558, 558, -1, -1, -1,
+ 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, -1,
+ 565, 565, 565, 565, 565, 565, -1, 565,
+ 565, 565, 565, -1, 565, -1, 565, 565,
+ 565, -1, 565, 565, 565, 565, 565, 565,
+ -1, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565,
+ -1, 565, -1, -1, -1, -1, 565, 565,
+ 565, 565, 565, -1, -1, 565, 565, -1,
+ 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, -1, -1, -1, -1,
+ -1, 565, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 565, 565, 565, 565, -1, 558, 565, 565,
+ 565, 565, 565, 565, -1, -1, -1, 565,
+ 565, 565, 565, 565, -1, -1, -1, -1,
+ 565, -1, -1, -1, 565, 565, 565, -1,
+ 565, 565, -1, -1, 565, -1, -1, -1,
+ -1, -1, -1, -1, -1, 565, 565, 565,
+ 565, 565, -1, 565, 565, 565, -1, -1,
+ 565, 565, 565, 565, 565, 565, 565, 565,
+ -1, 565, 565, 565, -1, -1, -1, 565,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 565, 565, -1, -1, 565, -1,
+ 565, 565, -1, 565, -1, -1, -1, -1,
+ 565, -1, 565, 565, 565, 565, 565, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 565, -1, 565, -1, -1, 565,
+ 565, -1, -1, -1, 565, -1, 565, -1,
+ 565, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566,
+ -1, 566, 566, 566, 566, 566, 566, -1,
+ 566, 566, 566, 566, -1, 566, -1, 566,
+ 566, 566, -1, 566, 566, 566, 566, 566,
+ 566, -1, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, -1, 566, -1, -1, -1, -1, 566,
+ 566, 566, 566, 566, -1, -1, 566, 566,
+ -1, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, -1, -1, -1,
+ -1, -1, 566, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 565, -1,
+ -1, 566, 566, 566, 566, -1, -1, 566,
+ 566, 566, 566, 566, 566, -1, -1, -1,
+ 566, 566, 566, 566, 566, -1, -1, -1,
+ -1, 566, -1, -1, -1, 566, 566, 566,
+ 558, 566, 566, -1, -1, 566, -1, -1,
+ -1, -1, -1, -1, -1, -1, 566, 566,
+ 566, 566, 566, -1, 566, 566, 566, -1,
+ -1, 566, 566, 566, 566, 566, 566, 566,
+ 566, -1, 566, 566, 566, -1, -1, -1,
+ 566, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 566, 566, -1, -1, 566,
+ -1, 566, 566, -1, 566, -1, -1, -1,
+ -1, 566, -1, 566, 566, 566, 566, 566,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 566, -1, 566, -1, -1,
+ 566, 566, -1, -1, -1, 566, -1, 566,
+ -1, 566, 567, 567, 567, 567, 567, 567,
+ 567, 567, 567, 567, 567, 567, 567, 567,
+ 567, 567, 567, 567, 567, 567, 567, 567,
+ 567, -1, 567, 567, 567, 567, 567, 567,
+ -1, 567, 567, 567, 567, -1, 567, -1,
+ 567, 567, 567, -1, 567, 567, 567, 567,
+ 567, 567, -1, 567, 567, 567, 567, 567,
+ 567, 567, 567, 567, 567, 567, 567, 567,
+ 567, 567, -1, 567, -1, -1, -1, -1,
+ 567, 567, 567, 567, 567, -1, -1, 567,
+ 567, -1, 567, 567, 567, 567, 567, 567,
+ 567, 567, 567, 567, 567, 567, -1, -1,
+ -1, -1, -1, 567, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 566,
+ -1, -1, 567, 567, 567, 567, -1, -1,
+ 567, 567, 567, 567, 567, 567, -1, -1,
+ -1, 567, 567, 567, 567, 567, -1, -1,
+ -1, -1, 567, -1, -1, -1, 567, 567,
+ 567, -1, 567, 567, -1, -1, 567, -1,
+ -1, -1, -1, -1, -1, -1, -1, 567,
+ 567, 567, 567, 567, -1, 567, 567, 567,
+ -1, -1, 567, 567, 567, 567, 567, 567,
+ 567, 567, -1, 567, 567, 567, -1, -1,
+ -1, 567, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 567, 567, -1, -1,
+ 567, -1, 567, 567, -1, 567, -1, -1,
+ -1, -1, 567, -1, 567, 567, 567, 567,
+ 567, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 567, -1, 567, -1,
+ -1, 567, 567, -1, -1, -1, 567, -1,
+ 567, -1, 567, 572, 572, 572, 572, -1,
+ 572, -1, -1, -1, -1, -1, -1, -1,
+ -1, 572, 572, 572, 572, 572, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 572,
+ -1, -1, -1, 572, 572, 572, 572, -1,
+ -1, -1, 572, 572, 572, -1, -1, -1,
+ -1, 572, 572, 572, 572, 572, 572, 572,
+ 572, -1, -1, -1, -1, -1, -1, 572,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 572, 572, 572,
+ 572, -1, -1, 572, 572, -1, -1, -1,
+ -1, -1, 572, -1, -1, -1, -1, -1,
+ 574, 574, 574, 574, 574, 574, 574, 574,
+ 574, 574, 574, 574, 574, 574, 574, 574,
+ 574, 574, 574, 574, 574, 574, 574, -1,
+ 574, 574, 574, 574, 574, 574, -1, 574,
+ 574, 574, 574, -1, 574, -1, 574, 574,
+ 574, -1, 574, 574, 574, 574, 574, 574,
+ 567, 574, 574, 574, 574, 574, 574, 574,
+ 574, 574, 574, 574, 574, 574, 574, 574,
+ -1, 574, -1, -1, -1, -1, 574, 574,
+ 574, 574, 574, -1, -1, 574, 574, -1,
+ 574, 574, 574, 574, 574, 574, 574, 574,
+ 574, 574, 574, 574, -1, -1, -1, -1,
+ -1, 574, -1, -1, 572, 572, 572, 572,
+ 572, -1, 572, 572, 572, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 572, 572, -1, -1, 572,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 572, 572, 572, 572, 572,
+ 574, 574, 574, 574, -1, -1, 574, 574,
+ 574, 574, 574, 574, -1, -1, -1, 574,
+ 574, 574, 574, 574, -1, 572, -1, -1,
+ 574, -1, -1, -1, 574, 574, 574, -1,
+ 574, 574, -1, -1, 574, -1, -1, -1,
+ -1, -1, -1, -1, -1, 574, 574, 574,
+ 574, 574, -1, 574, 574, 574, -1, -1,
+ 574, 574, 574, 574, 574, 574, 574, 574,
+ -1, 574, 574, 574, -1, -1, -1, 574,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 574, 574, -1, -1, 574, -1,
+ 574, 574, -1, 574, -1, -1, -1, -1,
+ 574, -1, 574, 574, 574, 574, 574, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 574, -1, 574, -1, -1, 574,
+ 574, -1, -1, -1, 574, -1, 574, -1,
+ 574, 577, 577, 577, 577, -1, 577, -1,
+ -1, -1, -1, -1, -1, -1, -1, 577,
+ 577, 577, 577, 577, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 577, -1, -1,
+ -1, 577, 577, 577, 577, -1, -1, -1,
+ 577, 577, 577, -1, -1, -1, -1, 577,
+ 577, -1, 577, 577, 577, 577, 577, -1,
+ -1, -1, -1, -1, -1, 577, -1, -1,
+ -1, -1, -1, -1, -1, 578, 578, 578,
+ 578, -1, 578, 577, 577, 577, 577, -1,
+ -1, -1, -1, 578, 578, 578, 578, 578,
+ 577, -1, -1, -1, -1, -1, -1, -1,
+ -1, 578, -1, -1, -1, 578, 578, 578,
+ 578, -1, -1, -1, 578, 578, 578, -1,
+ -1, -1, -1, 578, 578, -1, 578, 578,
+ 578, 578, 578, -1, -1, -1, -1, -1,
+ -1, 578, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 574, 578,
+ 578, 578, 578, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 578, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 577, 577, 577, 577, 577, -1,
+ 577, 577, 577, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 577, 577, -1, -1, -1, -1, -1,
+ -1, -1, 577, -1, -1, -1, -1, -1,
+ -1, 577, 577, 577, 577, 577, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 577, 578, 578,
+ 578, 578, 578, -1, 578, 578, 578, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 578, 578, -1,
+ -1, -1, -1, -1, -1, -1, 578, -1,
+ -1, -1, -1, -1, -1, 578, 578, 578,
+ 578, 578, 579, 579, 579, 579, -1, 579,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 579, 579, 579, 579, 579, -1, -1, -1,
+ -1, 578, -1, -1, -1, -1, 579, -1,
+ -1, -1, 579, 579, 579, 579, -1, -1,
+ -1, 579, 579, 579, -1, -1, -1, -1,
+ 579, 579, -1, 579, 579, 579, 579, 579,
+ -1, -1, -1, -1, -1, -1, 579, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 579, 579, 579, 579,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 579, -1, -1, -1, -1, -1, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, -1, 580,
+ 580, 580, 580, 580, 580, -1, 580, 580,
+ 580, 580, -1, 580, -1, 580, 580, 580,
+ -1, 580, 580, 580, 580, 580, 580, -1,
+ 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, -1, 580, 580, 580, 580, -1, -1,
+ -1, -1, -1, -1, -1, 580, -1, -1,
+ 580, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 580, 580, 580, 580, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 579, 579, 579, 579, 579,
+ -1, 579, 579, 579, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 579, 579, -1, -1, -1, -1,
+ -1, -1, -1, 579, -1, -1, -1, -1,
+ -1, -1, 579, 579, 579, 579, 579, 580,
+ 580, 580, 580, -1, -1, 580, 580, -1,
+ 580, 580, 580, -1, -1, -1, 580, 580,
+ -1, 580, 580, -1, -1, -1, 579, 580,
+ -1, -1, -1, 580, 580, 580, -1, 580,
+ 580, -1, -1, 580, -1, -1, -1, -1,
+ -1, -1, -1, -1, 580, 580, 580, 580,
+ -1, -1, -1, 580, 580, -1, -1, 580,
+ 580, 580, 580, 580, 580, 580, 580, -1,
+ 580, 580, 580, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 580, 580, 580, 580, 580, -1, 582,
+ 582, 582, 582, 582, 582, 582, 582, -1,
+ 582, 580, 582, 582, 582, 582, 580, -1,
+ -1, 582, 582, 582, 582, 582, -1, -1,
+ -1, 582, 582, 582, -1, -1, -1, 582,
+ -1, -1, -1, 582, 582, 582, 582, -1,
+ -1, -1, 582, 582, 582, -1, -1, -1,
+ -1, 582, 582, -1, 582, 582, 582, 582,
+ -1, -1, -1, -1, -1, -1, -1, 582,
+ -1, 582, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 582, 582, 582,
+ 582, -1, 583, 583, 583, 583, 583, 583,
+ 583, 583, -1, 583, -1, 583, 583, 583,
+ 583, -1, -1, -1, 583, 583, 583, 583,
+ 583, -1, -1, -1, 583, 583, 583, -1,
+ -1, -1, 583, -1, -1, -1, 583, 583,
+ 583, 583, -1, -1, -1, 583, 583, 583,
+ -1, -1, -1, -1, 583, 583, -1, 583,
+ 583, 583, 583, -1, -1, -1, -1, -1,
+ -1, -1, 583, -1, 583, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 583, 583, 583, 583, -1, 580, 583, 583,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 582, -1,
+ -1, -1, -1, -1, 582, -1, -1, -1,
+ -1, 582, 582, 582, 582, 582, 582, 582,
+ 582, -1, 582, 582, 582, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 582, 582, 582, 582, 582,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 583, -1, -1, -1, -1, -1, 583,
+ -1, -1, -1, -1, 583, 583, 583, 583,
+ 583, 583, 583, 583, -1, 583, 583, 583,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 583, 583,
+ 583, 583, 583, 586, 586, 586, 586, 586,
+ 586, 586, 586, 586, 586, -1, 586, 586,
+ 586, 586, -1, -1, -1, 586, 586, 586,
+ 586, 586, -1, -1, -1, 586, 586, 586,
+ -1, -1, -1, 586, -1, -1, -1, 586,
+ 586, 586, 586, -1, -1, -1, 586, 586,
+ 586, -1, -1, -1, -1, 586, 586, -1,
+ 586, 586, 586, 586, -1, -1, -1, -1,
+ -1, -1, -1, 586, -1, -1, 586, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 586, 586, 586, 586, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 588,
+ 588, 588, 588, 588, 588, 588, 588, 588,
+ 588, 588, 588, 588, 588, -1, 588, 588,
+ 588, 588, 588, 588, -1, -1, -1, 588,
+ 588, 588, 588, 588, 588, -1, 588, 588,
+ 588, 588, -1, 588, 588, 588, 588, 588,
+ -1, 588, 588, 588, 588, 588, 588, -1,
+ 588, 588, 588, 588, 588, 588, 588, 588,
+ 588, -1, 588, 588, 588, 588, -1, 588,
+ -1, -1, -1, -1, -1, 588, -1, 588,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 586, 588, 588, 588, 588, -1,
+ -1, 586, 586, 586, -1, 586, 586, 586,
+ 586, 586, 586, 586, 586, -1, 586, 586,
+ 586, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 586,
+ 586, 586, 586, 586, -1, -1, -1, 588,
+ 588, 588, 588, -1, -1, 588, 588, 588,
+ 588, 588, 588, -1, 586, -1, 588, 588,
+ 588, 588, 588, -1, -1, -1, -1, 588,
+ 588, -1, -1, 588, 588, 588, -1, 588,
+ 588, -1, -1, 588, -1, -1, -1, 588,
+ -1, -1, 588, -1, 588, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 588,
+ 588, 588, 588, 588, 588, 588, 588, -1,
+ 588, 588, 588, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 588, 588, 588, 588, 588, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 588, -1, 588, 588, -1, -1, -1,
+ 591, 591, 591, 591, 591, 591, 591, 591,
+ 591, 591, 591, 591, 591, 591, -1, 591,
+ 591, 591, 591, 591, 591, -1, -1, -1,
+ 591, 591, 591, 591, 591, 591, -1, 591,
+ 591, 591, 591, -1, 591, -1, 591, 591,
+ 591, -1, 591, 591, 591, 591, 591, 591,
+ -1, 591, 591, 591, 591, 591, 591, 591,
+ 591, 591, -1, 591, 591, 591, 591, -1,
+ -1, -1, -1, -1, -1, -1, 591, -1,
+ 591, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 591, 591, 591, 591,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 591, 591, 591, 591, -1, 588, 591, 591,
+ 591, 591, 591, 591, -1, -1, -1, 591,
+ 591, 591, 591, 591, -1, -1, -1, -1,
+ 591, 591, -1, -1, 591, 591, 591, -1,
+ 591, 591, 591, -1, 591, -1, -1, -1,
+ -1, -1, -1, -1, -1, 591, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 591, 591, 591, 591, 591, 591, 591, 591,
+ -1, 591, 591, 591, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 601, 601, 601, 601, -1, 601,
+ -1, -1, 591, 591, 591, 591, 591, -1,
+ 601, 601, 601, 601, 601, -1, -1, -1,
+ -1, -1, 591, -1, 591, 591, 601, -1,
+ -1, -1, 601, 601, 601, 601, -1, -1,
+ -1, 601, 601, 601, -1, -1, -1, -1,
+ 601, 601, 601, 601, 601, 601, 601, 601,
+ -1, -1, -1, -1, -1, -1, 601, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 601, 601, 601, 601,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 601, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 586, -1, -1, -1,
+ -1, -1, -1, -1, -1, 586, -1, 586,
+ 586, 586, 586, 586, 586, 586, 586, -1,
+ 586, 586, 586, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 591, -1,
+ -1, 586, 586, 586, 586, 586, -1, -1,
+ -1, -1, -1, 601, 601, 601, 601, 601,
+ -1, 601, 601, 601, -1, -1, 586, -1,
+ -1, -1, -1, -1, 602, 602, 602, 602,
+ -1, 602, 601, 601, -1, -1, 601, -1,
+ -1, -1, 602, 602, 602, 602, 602, -1,
+ -1, 588, 601, 601, 601, 601, 601, -1,
+ 602, -1, -1, -1, 602, 602, 602, 602,
+ -1, -1, -1, 602, 602, 602, -1, -1,
+ -1, -1, 602, 602, 601, 602, 602, 602,
+ 602, -1, -1, -1, -1, -1, -1, -1,
+ 602, 602, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 602, 602,
+ 602, 602, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 604, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, 604, 604, 604, 604, -1,
+ 604, 604, 604, 604, 604, 604, -1, -1,
+ -1, 604, 604, 604, 604, 604, 604, -1,
+ 604, 604, 604, 604, -1, 604, -1, 604,
+ 604, 604, -1, 604, 604, 604, 604, 604,
+ 604, -1, 604, 604, 604, 604, 604, 604,
+ 604, 604, 604, -1, 604, 604, 604, 604,
+ -1, -1, -1, -1, -1, -1, -1, 604,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 604, 604, 604,
+ 604, -1, -1, 602, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 602, 602, 602,
+ 602, 602, -1, 602, 602, 602, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 602, 602, 602, 602,
+ 602, 604, 604, 604, 604, -1, -1, 604,
+ 604, 604, 604, 604, 604, -1, -1, -1,
+ 604, 604, 604, 604, 604, -1, -1, -1,
+ -1, 604, 604, -1, -1, 604, 604, 604,
+ -1, 604, 604, -1, -1, 604, -1, -1,
+ -1, -1, -1, -1, 591, -1, 604, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 604, 604, 604, 604, 604, 604, 604,
+ 604, -1, 604, 604, 604, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 604, 604, 604, 604, 604,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 604, -1, 604, 604, -1,
+ -1, -1, 606, 606, 606, 606, 606, 606,
+ 606, 606, 606, 606, 606, 606, 606, 606,
+ -1, 606, 606, 606, 606, 606, 606, -1,
+ -1, -1, 606, 606, 606, 606, 606, 606,
+ -1, 606, 606, 606, 606, -1, 606, 606,
+ 606, 606, 606, -1, 606, 606, 606, 606,
+ 606, 606, -1, 606, 606, 606, 606, 606,
+ 606, 606, 606, 606, -1, 606, 606, 606,
+ 606, -1, 606, -1, -1, -1, -1, -1,
+ 606, -1, 606, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 606, 606,
+ 606, 606, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 606, 606, 606, 606, -1, 604,
+ 606, 606, 606, 606, 606, 606, -1, -1,
+ -1, 606, 606, 606, 606, 606, -1, -1,
+ -1, -1, 606, 606, -1, -1, 606, 606,
+ 606, -1, 606, 606, -1, -1, 606, -1,
+ -1, -1, 606, -1, -1, 606, -1, 606,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 606, 606, 606, 606, 606, 606,
+ 606, 606, -1, 606, 606, 606, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 606, 606, 606, 606,
+ 606, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 606, -1, 606, 606,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 607, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, 607, 607, 607,
+ 607, -1, 607, 607, 607, 607, 607, 607,
+ -1, -1, -1, 607, 607, 607, 607, 607,
+ 607, -1, 607, 607, 607, 607, -1, 607,
+ -1, 607, 607, 607, -1, 607, 607, 607,
+ 607, 607, 607, -1, 607, 607, 607, 607,
+ 607, 607, 607, 607, 607, -1, 607, 607,
+ 607, 607, -1, 607, -1, -1, -1, -1,
+ -1, 607, -1, 607, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 607,
+ 607, 607, 607, -1, -1, 602, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 602,
+ 602, 602, 602, 602, -1, 602, 602, 602,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 606, -1, -1, -1, -1, -1, 602, 602,
+ 602, 602, 602, 607, 607, 607, 607, -1,
+ -1, 607, 607, 607, 607, 607, 607, -1,
+ -1, -1, 607, 607, 607, 607, 607, -1,
+ -1, -1, -1, 607, 607, -1, -1, 607,
+ 607, 607, -1, 607, 607, -1, -1, 607,
+ -1, -1, -1, -1, -1, -1, 607, -1,
+ 607, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 607, 607, 607, 607, 607,
+ 607, 607, 607, -1, 607, 607, 607, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 607, 607, 607,
+ 607, 607, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 607, -1, 607,
+ 607, -1, -1, -1, 608, 608, 608, 608,
+ 608, 608, 608, 608, 608, 608, 608, 608,
+ 608, 608, -1, 608, 608, 608, 608, 608,
+ 608, -1, -1, -1, 608, 608, 608, 608,
+ 608, 608, -1, 608, 608, 608, 608, -1,
+ 608, -1, 608, 608, 608, -1, 608, 608,
+ 608, 608, 608, 608, -1, 608, 608, 608,
+ 608, 608, 608, 608, 608, 608, -1, 608,
+ 608, 608, 608, -1, 608, -1, -1, -1,
+ -1, -1, 608, -1, 608, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 608, 608, 608, 608, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 608, 608, 608, 608,
+ -1, 607, 608, 608, 608, 608, 608, 608,
+ -1, -1, -1, 608, 608, 608, 608, 608,
+ -1, -1, -1, -1, 608, 608, -1, -1,
+ 608, 608, 608, -1, 608, 608, -1, -1,
+ 608, -1, -1, -1, -1, -1, -1, 608,
+ -1, 608, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 608, 608, 608, 608,
+ 608, 608, 608, 608, -1, 608, 608, 608,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 608, 608,
+ 608, 608, 608, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 608, -1,
+ 608, 608, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 611, 611, 611, 611, 611,
+ 611, 611, 611, 611, 611, 611, 611, 611,
+ 611, -1, 611, 611, 611, 611, 611, 611,
+ -1, -1, -1, 611, 611, 611, 611, 611,
+ 611, -1, 611, 611, 611, 611, -1, 611,
+ -1, 611, 611, 611, -1, 611, 611, 611,
+ 611, 611, 611, -1, 611, 611, 611, 611,
+ 611, 611, 611, 611, 611, -1, 611, 611,
+ 611, 611, -1, -1, -1, -1, -1, -1,
+ -1, 611, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 611,
+ 611, 611, 611, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 608, 611, 611, 611, 611, -1,
+ -1, 611, 611, 611, 611, 611, 611, -1,
+ -1, -1, 611, 611, 611, 611, 611, -1,
+ -1, -1, -1, 611, 611, -1, -1, 611,
+ 611, 611, -1, 611, 611, -1, -1, 611,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 611, -1, -1, -1, -1, -1, -1, -1,
+ 607, -1, -1, 611, 611, 611, 611, 611,
+ 611, 611, 611, -1, 611, 611, 611, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 611, 611, 611,
+ 611, 611, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 611, -1, 611,
+ 611, 612, 612, 612, 612, 612, 612, 612,
+ 612, 612, 612, -1, 612, 612, 612, 612,
+ -1, -1, -1, 612, 612, 612, 612, 612,
+ -1, -1, -1, 612, 612, 612, -1, -1,
+ -1, 612, -1, -1, -1, 612, 612, 612,
+ 612, -1, -1, -1, 612, 612, 612, -1,
+ -1, -1, -1, 612, 612, -1, 612, 612,
+ 612, 612, -1, -1, -1, -1, -1, -1,
+ -1, 612, -1, -1, 612, 614, 614, 614,
+ 614, -1, 614, -1, -1, -1, -1, 612,
+ 612, 612, 612, 614, 614, 614, 614, 614,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 614, -1, -1, -1, 614, 614, 614,
+ 614, -1, -1, -1, 614, 614, 614, -1,
+ -1, -1, -1, 614, 614, 614, 614, 614,
+ 614, 614, 614, -1, -1, -1, -1, -1,
+ -1, 614, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 614,
+ 614, 614, 614, -1, -1, -1, -1, -1,
+ -1, 611, -1, -1, 614, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 612, -1, -1, -1, -1, -1, -1, 612,
+ 612, 612, -1, 612, 612, 612, 612, 612,
+ 612, 612, 612, -1, 612, 612, 612, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 612, 612, 612,
+ 612, 612, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 612, -1, -1, -1, 614, 614,
+ 614, 614, 614, -1, 614, 614, 614, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 614, 614, -1,
+ -1, 614, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 614, 614, 614,
+ 614, 614, 615, 615, 615, 615, -1, 615,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 615, 615, 615, 615, 615, -1, -1, 614,
+ -1, -1, -1, -1, -1, -1, 615, -1,
+ -1, -1, 615, 615, 615, 615, -1, -1,
+ -1, 615, 615, 615, -1, -1, -1, -1,
+ 615, 615, 615, 615, 615, 615, 615, 615,
+ -1, -1, -1, -1, -1, -1, 615, -1,
+ -1, -1, -1, -1, 616, 616, 616, 616,
+ -1, 616, -1, -1, 615, 615, 615, 615,
+ -1, -1, 616, 616, 616, 616, 616, -1,
+ -1, 615, -1, -1, -1, -1, -1, -1,
+ 616, -1, -1, -1, 616, 616, 616, 616,
+ -1, -1, -1, 616, 616, 616, -1, -1,
+ -1, -1, 616, 616, 616, 616, 616, 616,
+ 616, 616, -1, -1, -1, -1, -1, -1,
+ 616, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 616, 616,
+ 616, 616, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 616, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 615, 615, 615, 615, 615,
+ -1, 615, 615, 615, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 615, 615, -1, -1, 615, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 615, 615, 615, 615, 615, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 615, 616, 616, 616,
+ 616, 616, -1, 616, 616, 616, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 616, 616, -1, -1,
+ 616, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 616, 616, 616, 616,
+ 616, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 616, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 619,
+ 619, 619, 619, 619, 619, 619, 619, 619,
+ 619, 619, 619, 619, 619, -1, 619, 619,
+ 619, 619, 619, 619, -1, -1, -1, 619,
+ 619, 619, 619, 619, 619, -1, 619, 619,
+ 619, 619, -1, 619, -1, 619, 619, 619,
+ -1, 619, 619, 619, 619, 619, 619, -1,
+ 619, 619, 619, 619, 619, 619, 619, 619,
+ 619, -1, 619, 619, 619, 619, -1, -1,
+ -1, -1, -1, -1, -1, 619, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 612, 619, 619, 619, 619, -1,
+ -1, -1, -1, 612, -1, 612, 612, 612,
+ 612, 612, 612, 612, 612, -1, 612, 612,
+ 612, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 612,
+ 612, 612, 612, 612, -1, -1, -1, 619,
+ 619, 619, 619, -1, -1, 619, 619, 619,
+ 619, 619, 619, -1, 612, -1, 619, 619,
+ 619, 619, 619, -1, -1, -1, -1, 619,
+ 619, -1, -1, 619, 619, 619, -1, 619,
+ 619, -1, -1, 619, -1, -1, -1, -1,
+ -1, -1, -1, -1, 619, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 619,
+ 619, 619, 619, 619, 619, 619, 619, -1,
+ 619, 619, 619, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 619, 619, 619, 619, 619, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 619, -1, 619, 619, -1, -1, -1,
+ 620, 620, 620, 620, 620, 620, 620, 620,
+ 620, 620, 620, 620, 620, 620, -1, 620,
+ 620, 620, 620, 620, 620, -1, -1, -1,
+ 620, 620, 620, 620, 620, 620, -1, 620,
+ 620, 620, 620, -1, 620, -1, 620, 620,
+ 620, -1, 620, 620, 620, 620, 620, 620,
+ -1, 620, 620, 620, 620, 620, 620, 620,
+ 620, 620, -1, 620, 620, 620, 620, -1,
+ 620, -1, -1, -1, -1, -1, 620, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 620, 620, 620, 620,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 620, 620, 620, 620, -1, 619, 620, 620,
+ 620, 620, 620, 620, -1, -1, -1, 620,
+ 620, 620, 620, 620, -1, -1, -1, -1,
+ 620, 620, -1, -1, 620, 620, 620, -1,
+ 620, 620, -1, -1, 620, -1, -1, -1,
+ -1, -1, -1, -1, -1, 620, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ 620, 620, 620, 620, 620, 620, 620, 620,
+ -1, 620, 620, 620, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 620, 620, 620, 620, 620, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 620, -1, 620, 620, 621, 621,
+ 621, 621, 621, 621, 621, 621, 621, 621,
+ -1, 621, 621, 621, 621, -1, -1, -1,
+ 621, 621, 621, 621, 621, -1, -1, -1,
+ 621, 621, 621, -1, -1, -1, 621, -1,
+ -1, -1, 621, 621, 621, 621, -1, -1,
+ -1, 621, 621, 621, -1, -1, -1, -1,
+ 621, 621, -1, 621, 621, 621, 621, -1,
+ -1, -1, -1, -1, -1, -1, 621, -1,
+ -1, 621, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 621, 621, 621, 621,
+ 625, 625, 625, 625, 625, 625, 625, 625,
+ -1, 625, -1, 625, 625, 625, 625, -1,
+ -1, -1, 625, 625, 625, 625, 625, -1,
+ -1, -1, 625, 625, 625, -1, -1, -1,
+ 625, -1, -1, -1, 625, 625, 625, 625,
+ -1, -1, -1, 625, 625, 625, -1, -1,
+ -1, -1, 625, 625, -1, 625, 625, 625,
+ 625, -1, -1, -1, -1, -1, -1, -1,
+ 625, -1, 625, -1, -1, -1, 620, -1,
+ -1, -1, -1, -1, -1, -1, 625, 625,
+ 625, 625, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 621, -1, -1,
+ -1, -1, -1, -1, 621, 621, 621, -1,
+ 621, 621, 621, 621, 621, 621, 621, 621,
+ -1, 621, 621, 621, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 621, 621, 621, 621, 621, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 621,
+ -1, -1, -1, -1, -1, -1, -1, 625,
+ -1, -1, -1, -1, -1, 625, -1, -1,
+ -1, -1, 625, 625, 625, 625, 625, 625,
+ 625, 625, -1, 625, 625, 625, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 625, 625, 625, 625,
+ 625, 627, 627, 627, 627, 627, 627, 627,
+ 627, 627, 627, 627, 627, 627, 627, -1,
+ 627, 627, 627, 627, 627, 627, -1, -1,
+ -1, 627, 627, 627, 627, 627, 627, -1,
+ 627, 627, 627, 627, -1, 627, -1, 627,
+ 627, 627, -1, 627, 627, 627, 627, 627,
+ 627, -1, 627, 627, 627, 627, 627, 627,
+ 627, 627, 627, -1, 627, 627, 627, 627,
+ -1, -1, -1, -1, -1, -1, -1, 627,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 627, 627, 627,
+ 627, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 627, 627, 627, 627, -1, -1, 627,
+ 627, 627, 627, 627, 627, -1, -1, -1,
+ 627, 627, 627, 627, 627, -1, -1, -1,
+ -1, 627, 627, -1, -1, 627, 627, 627,
+ -1, 627, 627, -1, -1, 627, -1, -1,
+ -1, -1, -1, -1, -1, -1, 627, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 627, 627, 627, 627, 627, 627, 627,
+ 627, -1, 627, 627, 627, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 627, 627, 627, 627, 627,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 627, -1, 627, 627, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 628, 628, 628, 628,
+ 628, 628, 628, 628, 628, 628, 628, 628,
+ 628, 628, -1, 628, 628, 628, 628, 628,
+ 628, -1, -1, -1, 628, 628, 628, 628,
+ 628, 628, -1, 628, 628, 628, 628, -1,
+ 628, -1, 628, 628, 628, -1, 628, 628,
+ 628, 628, 628, 628, -1, 628, 628, 628,
+ 628, 628, 628, 628, 628, 628, -1, 628,
+ 628, 628, 628, -1, 628, -1, -1, -1,
+ -1, -1, 628, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 621,
+ 628, 628, 628, 628, -1, -1, -1, 627,
+ 621, -1, 621, 621, 621, 621, 621, 621,
+ 621, 621, -1, 621, 621, 621, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 621, 621, 621, 621,
+ 621, -1, -1, -1, 628, 628, 628, 628,
+ -1, -1, 628, 628, 628, 628, 628, 628,
+ -1, 621, -1, 628, 628, 628, 628, 628,
+ -1, -1, -1, -1, 628, 628, -1, -1,
+ 628, 628, 628, -1, 628, 628, -1, -1,
+ 628, -1, -1, -1, -1, -1, -1, -1,
+ -1, 628, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 628, 628, 628, 628,
+ 628, 628, 628, 628, -1, 628, 628, 628,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 628, 628,
+ 628, 628, 628, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 628, -1,
+ 628, 628, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 628
+};
+
+static int pid_0_parser_keys[] = {
+ 8, 812, 265, 811, 422, 422, 422, 422,
+ 8, 812, 8, 422, 8, 422, 8, 422,
+ 8, 422, 8, 422, 8, 422, 8, 422,
+ 8, 422, 8, 422, 8, 422, 8, 422,
+ 8, 422, 8, 422, 8, 422, 8, 422,
+ 8, 422, 8, 422, 8, 422, 64, 64,
+ 56, 720, 64, 64, 64, 733, 64, 64,
+ 8, 812, 64, 64, 64, 64, 32, 765,
+ 64, 64, 8, 422, 8, 422, 8, 753,
+ 64, 64, 18, 800, 18, 800, 8, 422,
+ 64, 800, 18, 800, 8, 422, 8, 422,
+ 64, 754, 32, 754, 80, 80, 64, 765,
+ 64, 64, 68, 68, 78, 78, 78, 78,
+ 78, 78, 78, 78, 8, 422, 74, 74,
+ 64, 64, 64, 219, 64, 219, 64, 219,
+ 8, 422, 8, 422, 8, 422, 8, 422,
+ 18, 800, 18, 800, 18, 800, 18, 800,
+ 8, 422, 8, 422, 8, 422, 8, 422,
+ 8, 422, 18, 800, 64, 800, 32, 767,
+ 32, 767, 32, 767, 64, 800, 8, 422,
+ 31, 31, 78, 78, 78, 78, 88, 88,
+ 18, 800, 88, 88, 8, 422, 64, 64,
+ 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 8, 797, 102, 825, 107, 813,
+ 110, 773, 18, 826, 546, 546, 43, 816,
+ 10, 10, 56, 816, 130, 130, 130, 130,
+ 130, 130, 18, 800, 18, 800, 18, 800,
+ 18, 800, 32, 765, 74, 74, 32, 765,
+ 32, 765, 67, 779, 67, 793, 8, 815,
+ 74, 74, 14, 800, 8, 422, 8, 422,
+ 14, 800, 32, 765, 32, 765, 32, 765,
+ 32, 765, 64, 765, 78, 78, 8, 753,
+ 8, 422, 32, 765, 8, 422, 14, 817,
+ 8, 753, 32, 765, 18, 800, 18, 800,
+ 32, 765, 8, 720, 8, 422, 66, 66,
+ 97, 97, 8, 814, 107, 813, 32, 765,
+ 102, 771, 102, 825, 102, 279, 18, 826,
+ 107, 772, 107, 813, 110, 110, 110, 110,
+ 71, 71, 18, 826, 67, 69, 18, 800,
+ 79, 99, 8, 422, 8, 422, 8, 422,
+ 8, 422, 10, 422, 8, 422, 8, 422,
+ 64, 66, 64, 64, 8, 422, 18, 800,
+ 18, 800, 18, 800, 18, 800, 18, 800,
+ 18, 800, 18, 800, 18, 800, 18, 800,
+ 18, 800, 18, 800, 18, 800, 18, 800,
+ 64, 800, 8, 766, 8, 422, 18, 800,
+ 18, 800, 8, 422, 43, 725, 43, 816,
+ 8, 422, 56, 720, 8, 422, 112, 808,
+ 112, 808, 79, 79, 18, 800, 79, 79,
+ 79, 79, 79, 79, 32, 219, 67, 768,
+ 67, 768, 67, 768, 8, 422, 8, 777,
+ 8, 422, 102, 819, 107, 813, 110, 773,
+ 64, 820, 8, 762, 8, 422, 8, 792,
+ 102, 823, 107, 813, 110, 773, 18, 824,
+ 10, 10, 8, 815, 8, 269, 8, 269,
+ 8, 269, 8, 269, 8, 269, 8, 269,
+ 8, 269, 8, 269, 8, 269, 8, 269,
+ 8, 269, 8, 269, 8, 269, 8, 269,
+ 8, 269, 32, 219, 32, 765, 8, 746,
+ 14, 817, 8, 422, 8, 422, 89, 89,
+ 89, 89, 89, 89, 32, 765, 64, 64,
+ 64, 712, 8, 422, 8, 422, 81, 81,
+ 22, 751, 14, 817, 8, 422, 89, 89,
+ 79, 79, 79, 79, 89, 89, 66, 130,
+ 8, 422, 8, 721, 10, 10, 8, 814,
+ 8, 268, 8, 268, 8, 268, 8, 268,
+ 8, 268, 8, 268, 8, 268, 8, 268,
+ 8, 268, 8, 268, 8, 268, 8, 268,
+ 8, 268, 8, 268, 8, 268, 107, 772,
+ 8, 422, 105, 105, 102, 225, 8, 422,
+ 8, 422, 8, 422, 107, 226, 8, 422,
+ 8, 422, 8, 422, 8, 422, 102, 825,
+ 107, 813, 110, 773, 18, 280, 71, 105,
+ 8, 422, 8, 422, 64, 765, 8, 422,
+ 8, 422, 78, 78, 8, 422, 8, 422,
+ 8, 422, 8, 422, 8, 422, 8, 422,
+ 8, 422, 8, 422, 8, 422, 8, 422,
+ 8, 422, 8, 422, 8, 422, 8, 422,
+ 8, 422, 64, 66, 8, 422, 8, 422,
+ 8, 422, 79, 79, 8, 422, 64, 64,
+ 64, 64, 43, 196, 70, 742, 70, 196,
+ 130, 130, 117, 131, 112, 802, 80, 262,
+ 80, 262, 112, 808, 80, 262, 80, 262,
+ 80, 262, 80, 262, 80, 262, 127, 127,
+ 138, 809, 138, 809, 112, 808, 80, 262,
+ 130, 130, 117, 131, 8, 422, 79, 79,
+ 8, 422, 8, 422, 8, 422, 67, 793,
+ 18, 818, 67, 793, 67, 788, 102, 771,
+ 102, 819, 102, 273, 64, 820, 107, 772,
+ 110, 110, 71, 71, 64, 820, 64, 774,
+ 102, 819, 107, 813, 110, 773, 74, 74,
+ 8, 422, 102, 771, 102, 823, 102, 277,
+ 18, 824, 107, 772, 110, 110, 71, 71,
+ 18, 824, 67, 69, 18, 800, 8, 422,
+ 8, 422, 8, 422, 8, 422, 10, 10,
+ 8, 422, 31, 31, 81, 81, 8, 422,
+ 8, 746, 8, 422, 18, 800, 14, 800,
+ 8, 422, 8, 422, 8, 422, 89, 89,
+ 75, 766, 79, 79, 64, 712, 74, 74,
+ 22, 205, 8, 422, 81, 81, 14, 817,
+ 64, 800, 18, 800, 8, 422, 8, 422,
+ 8, 422, 8, 422, 56, 56, 10, 10,
+ 8, 422, 8, 422, 102, 279, 102, 771,
+ 107, 772, 110, 110, 8, 422, 64, 712,
+ 8, 422, 8, 422, 8, 422, 64, 737,
+ 112, 808, 117, 131, 80, 262, 138, 810,
+ 138, 810, 8, 422, 112, 808, 112, 808,
+ 112, 808, 112, 808, 112, 808, 112, 808,
+ 112, 808, 112, 808, 112, 262, 80, 262,
+ 80, 262, 80, 262, 80, 262, 87, 113,
+ 113, 807, 8, 422, 79, 79, 18, 818,
+ 18, 272, 8, 422, 8, 422, 8, 422,
+ 8, 422, 8, 787, 102, 821, 107, 813,
+ 110, 773, 18, 822, 105, 105, 102, 225,
+ 8, 422, 8, 422, 8, 422, 64, 228,
+ 102, 771, 107, 772, 110, 110, 64, 274,
+ 64, 66, 71, 105, 8, 422, 105, 105,
+ 102, 225, 8, 422, 8, 422, 8, 422,
+ 102, 823, 107, 813, 110, 773, 18, 278,
+ 71, 105, 8, 422, 18, 782, 8, 422,
+ 14, 800, 8, 422, 8, 422, 8, 422,
+ 89, 89, 32, 765, 80, 80, 79, 79,
+ 67, 779, 81, 81, 8, 422, 8, 422,
+ 18, 280, 18, 280, 18, 280, 79, 79,
+ 64, 736, 70, 740, 130, 130, 80, 262,
+ 80, 262, 138, 264, 137, 264, 80, 262,
+ 112, 802, 112, 802, 112, 802, 112, 802,
+ 80, 262, 80, 262, 80, 262, 80, 262,
+ 81, 87, 113, 113, 80, 262, 80, 262,
+ 80, 262, 80, 262, 79, 79, 67, 247,
+ 102, 771, 102, 821, 102, 275, 18, 822,
+ 107, 772, 110, 110, 71, 71, 18, 822,
+ 64, 765, 18, 800, 8, 422, 102, 273,
+ 64, 274, 64, 274, 64, 274, 64, 766,
+ 64, 766, 102, 277, 102, 771, 107, 772,
+ 110, 110, 14, 800, 64, 800, 64, 64,
+ 18, 800, 8, 422, 8, 422, 64, 166,
+ 64, 166, 88, 88, 14, 817, 14, 271,
+ 80, 80, 64, 219, 8, 739, 64, 765,
+ 74, 74, 8, 422, 8, 721, 138, 138,
+ 81, 81, 80, 262, 81, 113, 105, 105,
+ 102, 225, 8, 422, 8, 422, 8, 422,
+ 64, 66, 102, 821, 107, 813, 110, 773,
+ 18, 276, 71, 105, 8, 422, 64, 274,
+ 64, 274, 18, 278, 18, 278, 18, 278,
+ 8, 422, 78, 78, 14, 254, 14, 254,
+ 32, 765, 81, 81, 14, 817, 64, 219,
+ 8, 738, 64, 64, 64, 66, 8, 732,
+ 138, 264, 80, 262, 80, 262, 81, 81,
+ 102, 275, 102, 771, 107, 772, 110, 110,
+ 75, 75, 18, 276, 18, 800, 89, 89,
+ 8, 422, 81, 81, 8, 422, 8, 741,
+ 8, 422, 64, 766, 64, 766, 8, 422,
+ 14, 817, 80, 262, 18, 276, 18, 276,
+ 18, 276, 79, 79, 64, 166, 8, 422,
+ 8, 422, 14, 817, 64, 219, 64, 219,
+ 81, 81, 14, 254, 81, 81, 8, 422,
+ 8, 422, 0, 0
+};
+
+static unsigned int pid_0_parser_offsets[] = {
+ 0, 2, 14, 21, 262, 1067, 1329, 1591,
+ 1853, 2115, 2377, 2639, 2901, 3163, 3425, 3687,
+ 3949, 4211, 4473, 4735, 4997, 5259, 5521, 22,
+ 48, 23, 35, 30, 5783, 37, 41, 63,
+ 68, 6042, 6588, 6853, 69, 6326, 7112, 7349,
+ 71, 7628, 7895, 8268, 72, 181, 73, 77,
+ 74, 75, 76, 78, 80, 81, 8533, 82,
+ 83, 98, 102, 129, 8798, 9071, 9344, 9617,
+ 537, 800, 7242, 8145, 9890, 10163, 10436, 10709,
+ 10982, 11255, 136, 327, 373, 443, 148, 11348,
+ 88, 89, 90, 91, 11621, 92, 11714, 93,
+ 94, 96, 97, 99, 103, 12049, 233, 132,
+ 111, 12330, 105, 199, 106, 448, 107, 108,
+ 109, 12408, 12617, 12671, 12841, 477, 110, 483,
+ 491, 238, 339, 6267, 113, 12920, 13707, 13980,
+ 14228, 499, 590, 671, 727, 121, 114, 14328,
+ 14590, 779, 15025, 15298, 15398, 989, 15620, 15674,
+ 1248, 15944, 16457, 115, 116, 16168, 137, 1257,
+ 124, 457, 387, 13292, 214, 496, 117, 118,
+ 119, 16705, 126, 16769, 122, 17006, 17552, 17825,
+ 18098, 120, 18371, 18636, 186, 123, 18898, 19131,
+ 19184, 19269, 17296, 19354, 19407, 19492, 19577, 19630,
+ 19747, 20028, 20166, 20251, 171, 20553, 21034, 21307,
+ 21361, 21598, 581, 6003, 22144, 225, 22409, 1023,
+ 5890, 130, 21898, 135, 140, 149, 623, 764,
+ 865, 1130, 22681, 22954, 23227, 1297, 527, 217,
+ 1808, 23500, 23773, 24055, 740, 819, 254, 13011,
+ 152, 24304, 24361, 24550, 24607, 24796, 25034, 25091,
+ 25280, 25337, 25526, 25583, 25772, 25829, 26018, 26075,
+ 26264, 650, 1519, 26477, 26725, 26825, 27090, 156,
+ 157, 161, 1553, 167, 511, 27371, 27633, 175,
+ 453, 27895, 28138, 178, 179, 187, 192, 320,
+ 28409, 28684, 193, 28759, 14665, 28947, 29009, 29087,
+ 29149, 29227, 29367, 29445, 29507, 29585, 29647, 29725,
+ 29787, 29865, 29927, 524, 30146, 196, 230, 30411,
+ 30684, 30957, 369, 31230, 31503, 31776, 32049, 1002,
+ 1028, 418, 32322, 310, 32415, 32688, 761, 32961,
+ 33226, 197, 33491, 33756, 34029, 34302, 34575, 34848,
+ 35121, 35394, 35667, 35940, 36213, 36486, 36759, 37032,
+ 37305, 227, 37570, 37841, 38112, 198, 38383, 208,
+ 212, 530, 259, 303, 219, 605, 1680, 2034,
+ 2186, 1656, 2435, 2697, 2959, 3221, 3483, 223,
+ 786, 798, 3637, 3758, 224, 873, 38648, 236,
+ 38913, 39178, 39443, 1058, 39676, 1772, 1785, 610,
+ 1821, 823, 3342, 641, 248, 252, 3866, 1138,
+ 1920, 1046, 637, 285, 39931, 855, 3646, 1446,
+ 40208, 694, 336, 345, 40286, 392, 40523, 40616,
+ 41162, 41435, 41708, 351, 41981, 354, 355, 42243,
+ 42508, 42773, 43006, 43084, 43325, 43871, 44136, 358,
+ 1183, 362, 546, 363, 859, 44401, 365, 44663,
+ 450, 39531, 44921, 45467, 45740, 46013, 366, 372,
+ 46278, 46540, 1286, 893, 877, 378, 46805, 1392,
+ 47070, 47343, 47608, 1840, 7177, 397, 4130, 432,
+ 869, 47873, 3909, 4433, 4553, 4706, 4277, 4801,
+ 5063, 5217, 2181, 5592, 6646, 7698, 8076, 423,
+ 1294, 48138, 379, 48372, 40900, 48627, 49173, 49446,
+ 49719, 49992, 3902, 1430, 921, 48904, 381, 440,
+ 50265, 50538, 50811, 933, 899, 1055, 382, 2556,
+ 452, 386, 51084, 390, 544, 51357, 51630, 51903,
+ 4687, 1930, 1253, 43576, 533, 52176, 52449, 52542,
+ 52790, 52890, 53214, 53587, 395, 5973, 396, 400,
+ 1394, 428, 53852, 54125, 54359, 54423, 54647, 431,
+ 2443, 474, 437, 8181, 8449, 595, 657, 8604,
+ 5333, 8750, 9174, 9447, 9692, 9965, 10238, 10511,
+ 470, 455, 10784, 11057, 11650, 11971, 460, 2279,
+ 1198, 5596, 2591, 54711, 1291, 482, 490, 54778,
+ 1814, 54988, 55081, 2332, 2818, 3080, 3877, 5855,
+ 7296, 2629, 1264, 1326, 521, 55354, 702, 536,
+ 55411, 55652, 56194, 743, 1351, 541, 55923, 56492,
+ 547, 2449, 56735, 1406, 549, 57000, 57271, 550,
+ 556, 12124, 582, 568, 601, 57536, 57809, 58082,
+ 573, 5741, 2599, 1307, 58355, 599, 58448, 4953,
+ 5449, 58721, 58789, 59026, 59119, 574, 59367, 59450,
+ 2305, 579, 59691, 902, 59791, 585, 829, 60056,
+ 861, 13387, 13497, 603, 2852, 1654, 1513, 609,
+ 616, 60290, 60500, 620, 60593, 621, 60858, 61139,
+ 61404, 6387, 4282, 61675, 61937, 14038, 62005, 62242,
+ 62308, 628, 1875, 62583, 62848, 63110, 2705, 2708,
+ 631, 63192, 644, 63433, 63756, 0
+};
+
+static unsigned int pid_0_parser_targs[] = {
+ 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 55, 55,
+ 55, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 80, 81, 82, 83, 84,
+ 85, 86, 87, 87, 88, 88, 89, 89,
+ 90, 90, 91, 91, 92, 92, 93, 93,
+ 94, 94, 95, 95, 96, 96, 97, 97,
+ 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 182, 183, 184,
+ 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 205, 206, 206,
+ 207, 207, 208, 208, 209, 210, 211, 212,
+ 212, 213, 213, 214, 214, 215, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 383,
+ 384, 384, 385, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 450, 451, 451,
+ 452, 452, 453, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629,
+ 629, 629
+};
+
+static unsigned int pid_0_parser_actInds[] = {
+ 0, 2, 4, 6, 8, 10, 12, 14,
+ 16, 18, 20, 22, 24, 26, 28, 30,
+ 32, 34, 36, 38, 40, 42, 44, 46,
+ 48, 50, 52, 54, 56, 58, 60, 62,
+ 64, 66, 68, 70, 72, 74, 76, 78,
+ 80, 82, 84, 86, 88, 90, 92, 94,
+ 96, 98, 100, 102, 104, 106, 108, 111,
+ 114, 118, 123, 125, 127, 129, 131, 133,
+ 135, 137, 139, 141, 143, 145, 147, 149,
+ 151, 153, 155, 157, 159, 161, 163, 165,
+ 167, 169, 171, 173, 176, 178, 180, 182,
+ 184, 186, 188, 190, 193, 195, 198, 200,
+ 203, 205, 208, 210, 213, 215, 218, 220,
+ 223, 225, 228, 230, 233, 235, 238, 240,
+ 243, 245, 247, 249, 251, 253, 255, 257,
+ 259, 261, 263, 265, 267, 270, 272, 274,
+ 276, 278, 280, 282, 284, 286, 288, 290,
+ 292, 294, 296, 298, 300, 302, 304, 306,
+ 308, 310, 312, 314, 316, 318, 320, 322,
+ 324, 326, 328, 330, 332, 334, 336, 338,
+ 340, 342, 344, 346, 348, 350, 352, 354,
+ 356, 358, 360, 362, 364, 366, 368, 370,
+ 372, 374, 376, 378, 380, 382, 384, 386,
+ 388, 390, 392, 394, 396, 398, 400, 402,
+ 404, 406, 408, 410, 412, 414, 417, 419,
+ 422, 424, 426, 428, 430, 432, 434, 436,
+ 438, 440, 442, 444, 446, 448, 450, 452,
+ 454, 456, 458, 460, 462, 464, 467, 469,
+ 472, 474, 477, 479, 482, 484, 486, 488,
+ 490, 493, 495, 498, 500, 503, 505, 508,
+ 510, 512, 514, 516, 518, 520, 522, 524,
+ 526, 528, 530, 532, 534, 536, 538, 540,
+ 542, 544, 546, 548, 550, 552, 554, 556,
+ 558, 560, 562, 564, 566, 568, 570, 572,
+ 574, 576, 578, 580, 582, 584, 586, 588,
+ 590, 592, 594, 596, 598, 600, 602, 604,
+ 606, 608, 610, 612, 614, 616, 618, 620,
+ 622, 624, 626, 628, 630, 632, 634, 636,
+ 638, 640, 642, 644, 646, 648, 650, 652,
+ 654, 656, 658, 660, 662, 664, 666, 668,
+ 670, 672, 674, 676, 678, 680, 682, 684,
+ 686, 688, 690, 692, 694, 696, 698, 700,
+ 702, 704, 706, 708, 710, 712, 714, 716,
+ 718, 720, 722, 724, 726, 728, 730, 732,
+ 734, 736, 738, 740, 742, 744, 746, 748,
+ 750, 752, 754, 756, 758, 760, 762, 764,
+ 766, 768, 770, 772, 774, 776, 778, 780,
+ 782, 784, 786, 788, 790, 792, 794, 796,
+ 798, 800, 802, 805, 807, 809, 811, 813,
+ 815, 817, 819, 821, 823, 825, 827, 829,
+ 831, 833, 835, 837, 839, 841, 843, 845,
+ 848, 850, 853, 855, 858, 861, 864, 866,
+ 868, 870, 872, 874, 876, 878, 880, 882,
+ 884, 886, 888, 890, 892, 894, 896, 898,
+ 900, 902, 904, 906, 908, 910, 912, 914,
+ 916, 918, 920, 922, 924, 926, 928, 930,
+ 932, 934, 936, 938, 940, 942, 944, 946,
+ 948, 950, 952, 954, 956, 958, 960, 962,
+ 964, 966, 968, 970, 972, 974, 976, 978,
+ 980, 982, 984, 986, 988, 990, 993, 995,
+ 998, 1000, 1003, 1005, 1008, 1010, 1012, 1014,
+ 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030,
+ 1032, 1034, 1036, 1038, 1040, 1042, 1044, 1046,
+ 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062,
+ 1064, 1066, 1069, 1071, 1073, 1075, 1077, 1079,
+ 1081, 1083, 1085, 1087, 1089, 1091, 1093, 1095,
+ 1097, 1099, 1101, 1103, 1105, 1107, 1109, 1111,
+ 1113, 1115, 1117, 1119, 1121, 1123, 1125, 1127,
+ 1129, 1131, 1133, 1135, 1137, 1139, 1141, 1143,
+ 1145, 1147, 1149, 1151, 1153, 1155, 1157, 1159,
+ 1161, 1163, 1165, 1167, 1169, 1171, 1173, 1175,
+ 1177, 1179, 1181, 1183, 1185, 1187, 1189, 1191,
+ 1193, 1195, 1197, 1199, 1201, 1203, 1205, 1207,
+ 1209, 1211, 1213, 1215, 1218, 1220, 1222, 1224,
+ 1226, 1228, 1230, 1232, 1234, 1236, 1238, 1240,
+ 1242, 1244, 1246, 1248, 1250, 1252, 1254, 1256,
+ 1258, 1260, 1262, 1264, 1266, 1268, 1270, 1272,
+ 1274, 1276, 1278, 1280, 1282, 1284, 1286, 1288,
+ 1290, 1292, 1294, 1296, 1298, 1300, 1302, 1304,
+ 1306, 1308, 1310, 1312, 1314, 1316, 1318, 1320,
+ 1322, 1324, 1326, 1328, 1330, 1332, 1334, 1336,
+ 1338, 1340, 1342, 1344, 1346, 1348, 1350, 1352,
+ 1354, 1356, 1358, 1360, 1362, 1364, 1366, 1368,
+ 1370, 1372, 1374, 1376, 1378, 1380, 1382, 1384,
+ 1386, 1388, 1390, 1392, 1394, 1396, 1398, 1400,
+ 1402, 1404, 1406, 1408, 1410, 1412, 1414, 1416,
+ 1418, 1420, 1422, 1424, 1426, 1428, 1430, 1432,
+ 1434, 1436, 1438, 1440, 1442, 1444, 1446, 1448,
+ 1450, 1452, 1454, 1456, 1458, 1460, 1462, 1464,
+ 1466, 1468, 1470, 1472, 1474, 1476, 1478, 1480,
+ 1482, 1484, 1486, 1488, 1490, 1492, 1494, 1496,
+ 1498, 1500, 1502, 1504, 1506, 1508, 1510, 1512,
+ 1514, 1516, 1518, 1520, 1522, 1524, 1526, 1528,
+ 1530, 1532, 1534, 1536, 1538, 1540, 1542, 1544,
+ 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560,
+ 1562, 1564, 1566, 1568, 1570, 1572, 1574, 1576,
+ 1578, 1580, 1582, 1584, 1586, 1588, 1590, 1592,
+ 1594, 1596, 1598, 1600, 1602, 1604, 1606, 1608,
+ 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1624,
+ 1626, 1628, 1630, 1632, 1634, 1636, 1638, 1640,
+ 1642, 1644, 1646, 1648, 1650, 1652, 1654, 1656,
+ 1658, 1660, 1662, 1664, 1666, 1668, 1670, 1672,
+ 1674, 1676, 1678, 1680, 1682, 1684, 1686, 1688,
+ 1690, 1692, 1694, 1696, 1698, 1700, 1702, 1704,
+ 1706, 1708, 1710, 1712, 1714, 1716, 1718, 1720,
+ 1722, 1724, 1726, 1728, 1730, 1732, 1734, 1736,
+ 1738, 1740, 1742, 1744, 1746, 1748, 1750, 1752,
+ 1754, 1756, 1758, 1760, 1762, 1764, 1766, 1768,
+ 1770, 1772, 1774, 1776, 1778, 1780, 1782, 1784,
+ 1786, 1788, 1790, 1792, 1794, 1796, 1798, 1800,
+ 1802, 1804, 1806, 1808, 1810, 1812, 1814, 1816,
+ 1818, 1820, 1822, 1824, 1826, 1828, 1830, 1832,
+ 1834, 1836, 1838, 1840, 1842, 1844, 1846, 1848,
+ 1850, 1852, 1854, 1856, 1858, 1860, 1862, 1864,
+ 1866, 1868, 1870, 1872, 1874, 1876, 1878, 1880,
+ 1882, 1884, 1886, 1888, 1890, 1892, 1894, 1896,
+ 1898, 1900, 1902, 1904, 1906, 1908, 1910, 1912,
+ 1914, 1916, 1918, 1920, 1922, 1924, 1926, 1928,
+ 1930, 1932, 1934, 1936, 1938, 1940, 1942, 1944,
+ 1946, 1948, 1950, 1952, 1954, 1956, 1958, 1960,
+ 1962, 1964, 1966, 1968, 1970, 1972, 1974, 1976,
+ 1978, 1980, 1982, 1984, 1986, 1988, 1990, 1992,
+ 1994, 1996, 1998, 2000, 2002, 2004, 2006, 2008,
+ 2010, 2012, 2014, 2016, 2018, 2020, 2022, 2024,
+ 2026, 2028, 2030, 2032, 2034, 2036, 2038, 2040,
+ 2042, 2044, 2046, 2048, 2050, 2053, 2056, 2059,
+ 2062, 2065
+};
+
+static unsigned int pid_0_parser_actions[] = {
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 214, 0, 210,
+ 1, 0, 1106, 786, 1, 0, 214, 1106,
+ 786, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 214, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 214, 1,
+ 0, 1, 0, 214, 1, 0, 1, 0,
+ 214, 1, 0, 1, 0, 214, 1, 0,
+ 1, 0, 214, 1, 0, 1, 0, 214,
+ 1, 0, 1, 0, 1, 1086, 0, 1,
+ 0, 1, 1086, 0, 1, 0, 1, 1086,
+ 0, 1, 0, 1, 1086, 0, 1, 0,
+ 1, 1086, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 810, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1086, 1,
+ 0, 1, 0, 1, 690, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 914, 0, 1, 0, 1, 914, 0,
+ 1, 0, 1, 914, 0, 1, 0, 1,
+ 914, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 1034, 0, 1, 0, 1,
+ 1034, 0, 1, 0, 1, 1034, 0, 1,
+ 0, 1, 1034, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 830, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 506, 1, 0,
+ 1, 0, 1, 506, 0, 1, 0, 506,
+ 1, 0, 1, 506, 0, 1, 506, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 982,
+ 0, 1, 0, 1, 982, 0, 1, 0,
+ 1, 982, 0, 1, 0, 1, 982, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 506, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 398, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 6, 0, 10, 0, 14, 0,
+ 18, 0, 22, 0, 26, 0, 30, 0,
+ 34, 0, 38, 0, 42, 0, 46, 0,
+ 50, 0, 54, 0, 58, 0, 62, 0,
+ 66, 0, 70, 0, 74, 0, 122, 0,
+ 126, 0, 130, 0, 134, 0, 138, 0,
+ 142, 0, 146, 0, 150, 0, 154, 0,
+ 158, 0, 162, 0, 166, 0, 170, 0,
+ 174, 0, 266, 0, 270, 0, 274, 0,
+ 278, 0, 282, 0, 286, 0, 290, 0,
+ 294, 0, 298, 0, 302, 0, 306, 0,
+ 310, 0, 314, 0, 318, 0, 322, 0,
+ 1, 0, 2, 0, 78, 0, 82, 0,
+ 86, 0, 90, 0, 94, 0, 98, 0,
+ 102, 0, 106, 0, 110, 0, 114, 0,
+ 118, 0, 178, 0, 182, 0, 186, 0,
+ 190, 0, 194, 0, 198, 0, 202, 0,
+ 206, 0, 210, 0, 214, 0, 218, 0,
+ 222, 0, 226, 0, 230, 0, 234, 0,
+ 238, 0, 242, 0, 246, 0, 250, 0,
+ 254, 0, 258, 0, 262, 0, 330, 0,
+ 334, 0, 338, 0, 342, 0, 346, 0,
+ 350, 0, 354, 0, 358, 0, 362, 0,
+ 366, 0, 370, 0, 374, 0, 378, 0,
+ 382, 0, 386, 0, 390, 0, 394, 0,
+ 398, 0, 402, 0, 406, 0, 410, 0,
+ 414, 0, 418, 0, 422, 0, 426, 0,
+ 430, 0, 434, 0, 438, 0, 442, 0,
+ 446, 0, 450, 0, 454, 0, 458, 0,
+ 462, 0, 466, 0, 470, 0, 474, 0,
+ 478, 0, 482, 0, 486, 0, 490, 0,
+ 494, 0, 498, 0, 502, 0, 506, 0,
+ 510, 0, 514, 0, 518, 0, 522, 0,
+ 526, 0, 530, 0, 534, 0, 538, 0,
+ 542, 0, 546, 0, 550, 0, 554, 0,
+ 558, 0, 562, 0, 566, 0, 570, 0,
+ 574, 0, 578, 0, 582, 0, 586, 0,
+ 590, 0, 594, 0, 598, 0, 602, 0,
+ 606, 0, 610, 0, 614, 0, 618, 0,
+ 622, 0, 626, 0, 630, 0, 634, 0,
+ 638, 0, 642, 0, 646, 0, 650, 0,
+ 654, 0, 658, 0, 662, 0, 666, 0,
+ 670, 0, 674, 0, 678, 0, 682, 0,
+ 686, 0, 690, 0, 694, 0, 698, 0,
+ 702, 0, 706, 0, 710, 0, 714, 0,
+ 718, 0, 722, 0, 726, 0, 730, 0,
+ 734, 0, 738, 0, 742, 0, 746, 0,
+ 750, 0, 754, 0, 758, 0, 762, 0,
+ 766, 0, 770, 0, 774, 0, 778, 0,
+ 782, 0, 786, 0, 790, 0, 794, 0,
+ 798, 0, 802, 0, 806, 0, 810, 0,
+ 814, 0, 818, 0, 822, 0, 826, 0,
+ 830, 0, 834, 0, 838, 0, 842, 0,
+ 846, 0, 850, 0, 854, 0, 858, 0,
+ 862, 0, 866, 0, 870, 0, 874, 0,
+ 878, 0, 882, 0, 886, 0, 890, 0,
+ 894, 0, 898, 0, 902, 0, 906, 0,
+ 910, 0, 914, 0, 918, 0, 922, 0,
+ 926, 0, 934, 0, 938, 0, 942, 0,
+ 946, 0, 950, 0, 954, 0, 958, 0,
+ 962, 0, 966, 0, 970, 0, 974, 0,
+ 978, 0, 982, 0, 986, 0, 990, 0,
+ 994, 0, 998, 0, 1002, 0, 1006, 0,
+ 1010, 0, 1014, 0, 1018, 0, 1022, 0,
+ 1026, 0, 1030, 0, 1034, 0, 1038, 0,
+ 1042, 0, 1046, 0, 1050, 0, 1054, 0,
+ 1058, 0, 1062, 0, 1066, 0, 1070, 0,
+ 1074, 0, 1078, 0, 1082, 0, 1086, 0,
+ 1090, 0, 1094, 0, 1098, 0, 1102, 0,
+ 1106, 0, 1110, 0, 1114, 0, 1118, 0,
+ 1122, 0, 1126, 0, 1130, 0, 1134, 0,
+ 1138, 0, 1142, 0, 1146, 0, 1150, 0,
+ 1154, 0, 1158, 0, 1162, 0, 1166, 0,
+ 1170, 0, 1174, 0, 1178, 0, 1182, 0,
+ 1186, 0, 1190, 0, 1194, 0, 1198, 0,
+ 1202, 0, 1206, 0, 1210, 0, 1214, 0,
+ 1218, 0, 1222, 0, 1234, 0, 1238, 0,
+ 1242, 0, 1246, 0, 1250, 0, 1254, 0,
+ 1258, 0, 1262, 0, 1266, 0, 1270, 0,
+ 1274, 0, 1278, 0, 1282, 0, 1286, 0,
+ 1290, 0, 1294, 0, 1298, 0, 1302, 0,
+ 1306, 0, 1310, 0, 1314, 0, 1318, 0,
+ 1322, 0, 1326, 0, 1330, 0, 1334, 0,
+ 1338, 0, 1342, 0, 1346, 0, 1350, 0,
+ 1354, 0, 1358, 0, 1362, 0, 1366, 0,
+ 1370, 0, 1374, 0, 1378, 0, 1382, 0,
+ 1386, 0, 918, 922, 0, 918, 926, 0,
+ 1106, 786, 0, 1226, 1210, 0, 1230, 1214,
+ 0, 918, 922, 926, 0
+};
+
+static int pid_0_parser_commitLen[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0
+};
+
+static int pid_0_parser_tokenRegionInds[] = {
+ 1, 3, 5, 7, 9, 11, 13, 15,
+ 17, 19, 21, 23, 25, 27, 29, 31,
+ 33, 35, 37, 39, 41, 43, 45, 47,
+ 49, 51, 53, 56, 58, 60, 62, 64,
+ 66, 68, 70, 72, 74, 76, 78, 80,
+ 83, 85, 87, 89, 91, 93, 95, 97,
+ 99, 101, 103, 105, 107, 109, 111, 113,
+ 115, 117, 119, 121, 123, 126, 129, 132,
+ 135, 137, 139, 141, 143, 146, 149, 152,
+ 155, 158, 160, 162, 164, 166, 168, 170,
+ 173, 175, 177, 179, 181, 183, 185, 188,
+ 190, 192, 194, 196, 198, 200, 203, 205,
+ 207, 209, 211, 213, 215, 217, 220, 222,
+ 224, 226, 228, 230, 232, 234, 236, 238,
+ 240, 242, 244, 246, 248, 250, 252, 255,
+ 257, 259, 261, 263, 265, 267, 269, 271,
+ 273, 275, 277, 280, 282, 284, 286, 288,
+ 290, 292, 294, 296, 298, 300, 302, 304,
+ 306, 308, 310, 312, 315, 317, 319, 321,
+ 323, 325, 328, 330, 332, 334, 337, 340,
+ 343, 346, 348, 350, 352, 354, 356, 358,
+ 360, 362, 364, 366, 368, 370, 372, 374,
+ 376, 378, 380, 382, 384, 386, 389, 392,
+ 394, 396, 399, 401, 404, 406, 409, 411,
+ 413, 415, 417, 419, 421, 423, 425, 427,
+ 429, 431, 433, 436, 439, 442, 444, 446,
+ 448, 450, 453, 456, 459, 461, 463, 465,
+ 467, 469, 471, 473, 475, 477, 479, 481,
+ 483, 485, 487, 489, 491, 493, 495, 497,
+ 499, 501, 503, 505, 507, 509, 511, 513,
+ 515, 517, 519, 521, 523, 525, 527, 529,
+ 531, 533, 535, 537, 539, 541, 543, 545,
+ 548, 550, 552, 554, 556, 558, 560, 562,
+ 564, 566, 568, 570, 572, 574, 576, 578,
+ 580, 582, 584, 586, 588, 591, 593, 595,
+ 598, 601, 604, 606, 609, 612, 615, 618,
+ 620, 622, 624, 627, 630, 633, 636, 638,
+ 640, 642, 644, 646, 649, 652, 655, 658,
+ 661, 664, 667, 670, 673, 676, 679, 682,
+ 685, 688, 690, 694, 698, 702, 704, 706,
+ 708, 710, 713, 715, 717, 719, 721, 723,
+ 726, 729, 731, 734, 737, 740, 743, 746,
+ 748, 750, 752, 754, 757, 759, 761, 763,
+ 765, 767, 769, 771, 773, 775, 777, 779,
+ 781, 783, 785, 788, 790, 792, 794, 797,
+ 799, 801, 803, 805, 807, 810, 812, 814,
+ 816, 819, 821, 823, 825, 828, 830, 832,
+ 835, 838, 841, 844, 846, 848, 850, 852,
+ 854, 856, 858, 860, 862, 865, 868, 871,
+ 873, 875, 877, 879, 881, 883, 885, 887,
+ 889, 891, 893, 896, 899, 902, 904, 906,
+ 908, 910, 912, 914, 916, 918, 920, 922,
+ 924, 927, 929, 931, 933, 935, 937, 940,
+ 942, 944, 946, 948, 950, 952, 954, 956,
+ 958, 960, 962, 964, 967, 970, 973, 976,
+ 979, 981, 983, 985, 987, 989, 992, 995,
+ 998, 1001, 1004, 1006, 1008, 1010, 1012, 1014,
+ 1016, 1019, 1022, 1025, 1027, 1029, 1031, 1033,
+ 1036, 1038, 1041, 1044, 1046, 1048, 1051, 1054,
+ 1057, 1059, 1061, 1063, 1066, 1069, 1072, 1074,
+ 1076, 1078, 1080, 1082, 1085, 1087, 1089, 1091,
+ 1093, 1095, 1097, 1100, 1102, 1105, 1108, 1111,
+ 1113, 1115, 1117, 1119, 1122, 1125, 1127, 1129,
+ 1132, 1134, 1136, 1138, 1140, 1143, 1146, 1149,
+ 1152, 1154, 1156, 1159, 1162, 1165, 1168, 1170,
+ 1172, 1174, 1176, 1178, 1181, 1183, 1185, 1187,
+ 1190, 1192, 1194, 1197, 1199, 1202, 1205, 1208,
+ 1211, 1214, 1216, 1218, 1220, 1222, 1224, 1226,
+ 1228, 1230, 1232, 1235, 1237, 1239, 1241, 1243,
+ 1245, 1247, 1249, 1251, 1253, 1255, 1257, 1259,
+ 1261, 1263, 1266, 1269, 1271, 1273, 1276, 1279,
+ 1282, 1284, 1286, 1288, 1290, 1293, 1296, 1299,
+ 1302, 1305, 1308, 1311, 1314, 1316, 1318, 1320,
+ 1322, 1324, 1326, 1328, 1330, 1332, 1334, 1336,
+ 1338, 1340, 1343, 1346, 1348, 1350, 1352, 1354,
+ 1356, 1358, 1361, 1363, 1365, 1367, 1369, 1371,
+ 1373, 1375, 1377, 1379, 1381, 1383, 1386, 1389,
+ 1392, 1395, 1397, 1399, 1401, 1403, 1405, 1407,
+ 1409, 1411, 1413, 1415, 1417, 1419
+};
+
+static int pid_0_parser_tokenRegions[] = {
+ 0, 1, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 17, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 5, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 5, 0, 1, 5,
+ 0, 1, 5, 0, 1, 5, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 5, 0, 1, 5, 0, 1, 5, 0,
+ 1, 5, 0, 1, 5, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 5, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 5, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 5, 0, 5, 0, 9, 0, 13,
+ 0, 1, 0, 0, 0, 1, 0, 1,
+ 0, 1, 17, 0, 17, 0, 17, 0,
+ 17, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 5, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 5, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 9, 0,
+ 1, 0, 5, 0, 5, 0, 5, 0,
+ 1, 5, 0, 9, 0, 9, 0, 13,
+ 0, 13, 0, 1, 0, 1, 5, 0,
+ 1, 0, 1, 0, 1, 0, 1, 5,
+ 0, 1, 5, 0, 1, 5, 0, 1,
+ 5, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 17, 0, 1, 5, 0,
+ 1, 0, 1, 0, 1, 5, 0, 1,
+ 0, 1, 17, 0, 1, 0, 1, 17,
+ 0, 1, 0, 17, 0, 17, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 5, 0, 1, 5, 0, 1,
+ 5, 0, 5, 0, 9, 0, 13, 0,
+ 1, 0, 1, 5, 0, 1, 5, 0,
+ 1, 5, 0, 5, 0, 9, 0, 13,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 17, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 9, 0, 1, 17, 0, 5,
+ 0, 5, 0, 1, 5, 0, 1, 5,
+ 0, 1, 5, 0, 9, 0, 1, 5,
+ 0, 1, 5, 0, 1, 5, 0, 1,
+ 5, 0, 5, 0, 9, 0, 13, 0,
+ 1, 5, 0, 1, 5, 0, 1, 5,
+ 0, 1, 5, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 5,
+ 0, 1, 5, 0, 1, 5, 0, 1,
+ 5, 0, 1, 5, 0, 1, 5, 0,
+ 1, 5, 0, 1, 5, 0, 1, 5,
+ 0, 1, 5, 0, 1, 5, 0, 1,
+ 5, 0, 1, 5, 0, 1, 17, 0,
+ 1, 0, 1, 17, 5, 0, 1, 17,
+ 5, 0, 1, 17, 5, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 17,
+ 0, 1, 0, 1, 0, 17, 0, 17,
+ 0, 17, 0, 1, 17, 0, 1, 17,
+ 0, 17, 0, 1, 17, 0, 1, 17,
+ 0, 1, 17, 0, 1, 17, 0, 1,
+ 17, 0, 17, 0, 21, 0, 21, 0,
+ 17, 0, 17, 1, 0, 17, 0, 17,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 5, 0, 5, 0, 5,
+ 0, 1, 5, 0, 9, 0, 13, 0,
+ 1, 0, 1, 5, 0, 1, 0, 5,
+ 0, 9, 0, 13, 0, 1, 0, 1,
+ 5, 0, 5, 0, 5, 0, 5, 0,
+ 1, 5, 0, 9, 0, 13, 0, 1,
+ 0, 1, 5, 0, 1, 0, 1, 0,
+ 1, 5, 0, 1, 5, 0, 1, 5,
+ 0, 1, 5, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 17,
+ 0, 1, 17, 0, 1, 17, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 5, 0,
+ 1, 5, 0, 1, 5, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 5, 0, 5, 0, 9, 0, 13, 0,
+ 1, 0, 1, 0, 1, 5, 0, 1,
+ 0, 1, 0, 1, 0, 17, 0, 17,
+ 0, 1, 17, 0, 21, 0, 21, 0,
+ 1, 0, 17, 0, 17, 0, 17, 0,
+ 17, 0, 17, 0, 17, 0, 17, 0,
+ 17, 0, 17, 0, 17, 1, 0, 17,
+ 1, 0, 17, 1, 0, 17, 1, 0,
+ 17, 1, 0, 17, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 5, 0,
+ 1, 5, 0, 1, 5, 0, 1, 5,
+ 0, 1, 5, 0, 5, 0, 9, 0,
+ 13, 0, 1, 0, 5, 0, 5, 0,
+ 1, 5, 0, 1, 5, 0, 1, 5,
+ 0, 1, 0, 5, 0, 9, 0, 13,
+ 0, 1, 5, 0, 1, 0, 1, 5,
+ 0, 1, 5, 0, 5, 0, 5, 0,
+ 1, 5, 0, 1, 5, 0, 1, 5,
+ 0, 5, 0, 9, 0, 13, 0, 1,
+ 5, 0, 1, 5, 0, 1, 5, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 17, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 5, 0, 1, 0, 1, 5,
+ 0, 1, 5, 0, 1, 5, 0, 1,
+ 0, 1, 0, 1, 0, 17, 0, 1,
+ 17, 0, 1, 17, 0, 21, 0, 21,
+ 0, 1, 17, 0, 17, 0, 17, 0,
+ 17, 0, 17, 0, 17, 1, 0, 17,
+ 1, 0, 17, 1, 0, 17, 1, 0,
+ 1, 0, 17, 0, 1, 17, 0, 1,
+ 17, 0, 1, 17, 0, 1, 17, 0,
+ 1, 0, 1, 0, 5, 0, 5, 0,
+ 5, 0, 1, 5, 0, 9, 0, 13,
+ 0, 1, 0, 1, 5, 0, 1, 0,
+ 1, 0, 1, 5, 0, 5, 0, 1,
+ 5, 0, 1, 5, 0, 1, 5, 0,
+ 1, 5, 0, 1, 5, 0, 5, 0,
+ 5, 0, 9, 0, 13, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 17, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 21, 0, 1, 0, 1,
+ 17, 0, 17, 1, 0, 5, 0, 5,
+ 0, 1, 5, 0, 1, 5, 0, 1,
+ 5, 0, 1, 0, 5, 0, 9, 0,
+ 13, 0, 1, 5, 0, 1, 5, 0,
+ 1, 5, 0, 1, 5, 0, 1, 5,
+ 0, 1, 5, 0, 1, 5, 0, 1,
+ 5, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 1, 0, 1, 0, 1, 0,
+ 1, 0, 21, 0, 1, 17, 0, 1,
+ 17, 0, 1, 0, 5, 0, 5, 0,
+ 9, 0, 13, 0, 1, 0, 1, 5,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 17, 0, 1, 5, 0, 1, 5, 0,
+ 1, 5, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 1, 0, 1, 0, 1,
+ 0, 1, 0, 0
+};
+
+static int pid_0_parser_tokenPreRegions[] = {
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, 3,
+ 0, 3, 0, 3, 0, 3, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0,
+ -1, 0, 3, 0, -1, 0, -1, 0,
+ -1, 0, 3, 0, 3, 0, 3, 0,
+ -1, -1, 0, 3, 0, 3, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, 3,
+ 0, -1, 0, 3, 0, 3, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, -1,
+ 0, 3, 0, -1, 0, 3, 0, 3,
+ 0, 3, 0, -1, -1, 0, -1, -1,
+ 0, -1, -1, 0, -1, -1, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, -1,
+ -1, 0, 3, 3, 0, 3, 3, 0,
+ 3, 3, 0, 3, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, -1, -1, 0, -1, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, 3,
+ 0, -1, -1, 0, -1, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0,
+ -1, -1, 0, -1, 0, -1, 0, -1,
+ 0, 3, 0, -1, 0, 3, 0, -1,
+ 0, 3, 3, 0, 3, 0, -1, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, -1, 0, 3, 0, -1, 0,
+ -1, 0, -1, 0, -1, 0, 3, 0,
+ 3, 0, -1, 0, -1, -1, 0, -1,
+ 0, -1, 0, 3, 0, 3, 0, 3,
+ 0, 3, 0, 3, 0, 3, 0, -1,
+ 0, -1, 0, 3, 0, -1, -1, 0,
+ 3, 0, -1, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, -1, 0, -1, 0,
+ -1, 0, 3, 0, 3, 0, -1, 0,
+ 3, 0, -1, 0, -1, 0, -1, 0,
+ -1, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, -1, 0,
+ -1, 0, -1, 0, -1, 0, -1, -1,
+ 0, -1, -1, 0, -1, -1, 0, -1,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, 0, -1, 0, -1, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 3, 0, -1, -1, 0,
+ 3, 0, 3, 0, 3, 3, 0, -1,
+ 0, -1, -1, 0, 3, 0, -1, -1,
+ 0, 3, 0, 19, 0, 19, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, 3, 0, -1, 0, -1, 0, -1,
+ 0, -1, -1, 0, -1, -1, 0, -1,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ 3, 0, -1, -1, 0, -1, -1, 0,
+ -1, -1, 0, -1, 0, -1, 0, -1,
+ 0, 3, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, 3, 0, 3,
+ 0, -1, 0, 3, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, 3, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, 3, 3, 0, -1, 0, 3, 0,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, 0, -1, 0, -1, -1, 0, -1,
+ 0, -1, 0, -1, -1, 0, -1, -1,
+ 0, -1, -1, 0, -1, 0, -1, -1,
+ 0, -1, -1, 0, -1, -1, 0, -1,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, -1, 0, -1, -1, 0, 3, 3,
+ 0, 3, 3, 0, 3, 0, 3, 0,
+ 3, 0, 3, 0, -1, 0, -1, -1,
+ 0, -1, -1, 0, -1, -1, 0, -1,
+ -1, 0, -1, -1, 0, -1, -1, 0,
+ -1, -1, 0, -1, -1, 0, -1, -1,
+ 0, -1, -1, 0, -1, -1, 0, -1,
+ -1, 0, -1, -1, 0, -1, -1, 0,
+ 3, 0, 3, 3, 3, 0, 3, 3,
+ 3, 0, 3, 3, 3, 0, -1, 0,
+ -1, 0, 3, 0, 3, 0, -1, -1,
+ 0, -1, 0, 3, 0, -1, 0, -1,
+ 0, -1, 0, -1, -1, 0, -1, -1,
+ 0, 19, 0, -1, -1, 0, 19, 19,
+ 0, 19, 19, 0, 19, 19, 0, 19,
+ 19, 0, -1, 0, -1, 0, -1, 0,
+ 19, 0, -1, -1, 0, -1, 0, -1,
+ 0, 3, 0, -1, 0, 3, 0, 3,
+ 0, 3, 0, -1, 0, 3, 0, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, -1, 0, -1, 0, -1, 0,
+ -1, 0, -1, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, 0, 3, 0, -1,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, -1, 0, -1, 0, -1, 0, -1,
+ 0, -1, -1, 0, -1, 0, -1, 0,
+ -1, -1, 0, -1, -1, 0, 3, 3,
+ 0, 3, 3, 0, -1, 0, 3, 0,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, 0, 3, 0, 3, 0, 3, 3,
+ 0, 3, 3, 0, 3, 3, 0, -1,
+ 0, 3, 0, -1, 0, -1, 0, 3,
+ 0, -1, 0, 3, 0, -1, 0, -1,
+ 0, 3, 0, 3, 0, 3, 3, 0,
+ 3, 3, 0, 3, 3, 0, -1, 0,
+ 3, 0, -1, 0, 3, 0, -1, 0,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, 0, 3, 0, 3, 3, 0, -1,
+ 0, -1, 0, 3, 0, 19, 0, -1,
+ 0, -1, -1, 0, -1, 0, -1, 0,
+ 19, 0, 19, 0, 19, 0, 19, 0,
+ 19, 0, -1, 0, 19, 0, 19, 0,
+ 19, 0, 19, 0, 19, 19, 0, 19,
+ 19, 0, 19, 19, 0, 19, 19, 0,
+ 3, 3, 0, 19, 0, 19, 0, -1,
+ 0, -1, 0, -1, 0, -1, -1, 0,
+ -1, -1, 0, -1, -1, 0, -1, -1,
+ 0, -1, -1, 0, -1, 0, -1, 0,
+ -1, 0, 3, 0, -1, 0, -1, 0,
+ -1, -1, 0, -1, -1, 0, -1, -1,
+ 0, 3, 0, -1, 0, -1, 0, -1,
+ 0, -1, -1, 0, -1, 0, -1, -1,
+ 0, 3, 3, 0, -1, 0, -1, 0,
+ -1, -1, 0, -1, -1, 0, -1, -1,
+ 0, -1, 0, -1, 0, -1, 0, -1,
+ -1, 0, -1, -1, 0, 3, 3, 0,
+ 3, 0, 3, 0, -1, 0, -1, 0,
+ -1, 0, 3, 3, 0, -1, 0, 3,
+ 0, 3, 0, -1, 0, -1, 0, -1,
+ 0, -1, -1, 0, 3, 0, -1, -1,
+ 0, -1, -1, 0, -1, -1, 0, -1,
+ 0, -1, 0, 3, 0, -1, 0, 19,
+ 19, 0, -1, -1, 0, -1, 0, -1,
+ 0, -1, -1, 0, -1, 0, -1, 0,
+ -1, 0, -1, 0, -1, -1, 0, -1,
+ -1, 0, -1, -1, 0, -1, -1, 0,
+ 19, 0, 3, 0, -1, -1, 0, 19,
+ 19, 0, 19, 19, 0, 19, 19, 0,
+ -1, 0, 3, 0, -1, 0, -1, 0,
+ -1, 0, -1, -1, 0, -1, 0, -1,
+ 0, -1, 0, -1, -1, 0, -1, 0,
+ -1, 0, -1, -1, 0, -1, 0, -1,
+ -1, 0, -1, -1, 0, -1, -1, 0,
+ 3, 3, 0, 3, 3, 0, -1, 0,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ 3, 3, 0, -1, 0, -1, 0, 3,
+ 0, 3, 0, -1, 0, 3, 0, -1,
+ 0, 3, 0, -1, 0, 3, 0, -1,
+ 0, 19, 0, -1, 0, 19, 0, 3,
+ 3, 0, 3, 3, 0, -1, 0, -1,
+ 0, -1, -1, 0, -1, -1, 0, -1,
+ -1, 0, -1, 0, -1, 0, -1, 0,
+ -1, 0, -1, -1, 0, -1, -1, 0,
+ 3, 3, 0, -1, -1, 0, -1, -1,
+ 0, -1, -1, 0, -1, -1, 0, -1,
+ -1, 0, -1, 0, -1, 0, 3, 0,
+ -1, 0, 3, 0, -1, 0, 3, 0,
+ 3, 0, -1, 0, 3, 0, -1, 0,
+ -1, 0, -1, 0, 3, 3, 0, 3,
+ 3, 0, 19, 0, -1, 0, -1, 0,
+ -1, 0, -1, 0, 3, 0, 3, 3,
+ 0, 3, 0, -1, 0, 3, 0, -1,
+ 0, 3, 0, -1, 0, 3, 0, 3,
+ 0, 3, 0, -1, 0, 3, 0, 3,
+ 3, 0, -1, -1, 0, -1, -1, 0,
+ -1, -1, 0, -1, 0, 3, 0, 3,
+ 0, -1, 0, 3, 0, -1, 0, -1,
+ 0, -1, 0, 3, 0, -1, 0, 3,
+ 0, 3, 0, 0
+};
+
+static PdaTables pid_0_pdaTables =
+{
+ pid_0_parser_indicies,
+ pid_0_parser_owners,
+ pid_0_parser_keys,
+ pid_0_parser_offsets,
+ pid_0_parser_targs,
+ pid_0_parser_actInds,
+ pid_0_parser_actions,
+ pid_0_parser_commitLen,
+ pid_0_parser_tokenRegionInds,
+ pid_0_parser_tokenRegions,
+ pid_0_parser_tokenPreRegions,
+
+ 64171,
+ 1260,
+ 630,
+ 1010,
+ 1010,
+ 2069,
+ 1010,
+ 1420,
+ 1420
+};
+
+static LocalInfo locals_0[] = {
+ { 1, -1 }
+};
+
+static unsigned char copy_0[] = {
+ 0, 0
+};
+
+static unsigned char copy_1[] = {
+ 0, 0
+};
+
+static unsigned char copy_2[] = {
+ 0, 0
+};
+
+static unsigned char copy_3[] = {
+ 0, 0
+};
+
+static unsigned char copy_4[] = {
+ 0, 0
+};
+
+static unsigned char copy_5[] = {
+ 0, 0
+};
+
+static unsigned char copy_6[] = {
+ 0, 0
+};
+
+static unsigned char copy_7[] = {
+ 0, 0
+};
+
+static unsigned char copy_8[] = {
+ 0, 0
+};
+
+static unsigned char copy_9[] = {
+ 0, 0
+};
+
+static unsigned char copy_10[] = {
+ 0, 0
+};
+
+static unsigned char copy_11[] = {
+ 0, 0
+};
+
+static unsigned char copy_12[] = {
+ 0, 0
+};
+
+static unsigned char copy_13[] = {
+ 0, 0
+};
+
+static unsigned char copy_14[] = {
+ 0, 0
+};
+
+static unsigned char copy_15[] = {
+ 0, 0
+};
+
+static unsigned char copy_16[] = {
+ 0, 0
+};
+
+static unsigned char copy_17[] = {
+ 0, 0
+};
+
+static unsigned char copy_18[] = {
+ 0, 0
+};
+
+static unsigned char copy_19[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_20[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_21[] = {
+ 0, 0
+};
+
+static unsigned char copy_22[] = {
+ 0, 0
+};
+
+static unsigned char copy_23[] = {
+ 0, 0
+};
+
+static unsigned char copy_24[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_25[] = {
+ 0, 0
+};
+
+static unsigned char copy_26[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_27[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_28[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_29[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_30[] = {
+ 0, 0
+};
+
+static unsigned char copy_31[] = {
+ 0, 0
+};
+
+static unsigned char copy_32[] = {
+ 0, 0
+};
+
+static unsigned char copy_33[] = {
+ 0, 0
+};
+
+static unsigned char copy_34[] = {
+ 0, 0
+};
+
+static unsigned char copy_35[] = {
+ 0, 0
+};
+
+static unsigned char copy_36[] = {
+ 0, 0
+};
+
+static unsigned char copy_37[] = {
+ 0, 0
+};
+
+static unsigned char copy_38[] = {
+ 0, 0
+};
+
+static unsigned char copy_39[] = {
+ 0, 0
+};
+
+static unsigned char copy_40[] = {
+ 0, 0
+};
+
+static unsigned char copy_41[] = {
+ 0, 0
+};
+
+static unsigned char copy_42[] = {
+ 0, 0
+};
+
+static unsigned char copy_43[] = {
+ 0, 0
+};
+
+static unsigned char copy_44[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_45[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_46[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7
+};
+
+static unsigned char copy_47[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_48[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_50[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_51[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_52[] = {
+ 0, 0
+};
+
+static unsigned char copy_54[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7,
+ 0, 8
+};
+
+static unsigned char copy_55[] = {
+ 0, 0
+};
+
+static unsigned char copy_56[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_57[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_58[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_59[] = {
+ 0, 0
+};
+
+static unsigned char copy_60[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_61[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_63[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_65[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_66[] = {
+ 0, 0
+};
+
+static unsigned char copy_67[] = {
+ 0, 0
+};
+
+static unsigned char copy_68[] = {
+ 0, 0
+};
+
+static unsigned char copy_69[] = {
+ 0, 0
+};
+
+static unsigned char copy_70[] = {
+ 0, 0
+};
+
+static unsigned char copy_71[] = {
+ 0, 0
+};
+
+static unsigned char copy_72[] = {
+ 0, 0
+};
+
+static unsigned char copy_73[] = {
+ 0, 0
+};
+
+static unsigned char copy_74[] = {
+ 0, 0
+};
+
+static unsigned char copy_75[] = {
+ 0, 0
+};
+
+static unsigned char copy_76[] = {
+ 0, 0
+};
+
+static unsigned char copy_77[] = {
+ 0, 0
+};
+
+static unsigned char copy_78[] = {
+ 0, 0
+};
+
+static unsigned char copy_79[] = {
+ 0, 0
+};
+
+static unsigned char copy_80[] = {
+ 0, 0
+};
+
+static unsigned char copy_82[] = {
+ 0, 0
+};
+
+static unsigned char copy_84[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_85[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_86[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_87[] = {
+ 0, 0
+};
+
+static unsigned char copy_89[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7,
+ 0, 8
+};
+
+static unsigned char copy_90[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_91[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_93[] = {
+ 0, 0
+};
+
+static unsigned char copy_95[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_96[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_97[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_98[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_100[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_102[] = {
+ 0, 0
+};
+
+static unsigned char copy_104[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_106[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5
+};
+
+static unsigned char copy_107[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_109[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_110[] = {
+ 0, 0
+};
+
+static unsigned char copy_111[] = {
+ 0, 0
+};
+
+static unsigned char copy_112[] = {
+ 0, 0
+};
+
+static unsigned char copy_113[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_114[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6
+};
+
+static unsigned char copy_115[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_116[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_117[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_118[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_119[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_120[] = {
+ 0, 0
+};
+
+static unsigned char copy_121[] = {
+ 0, 0
+};
+
+static unsigned char copy_122[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_123[] = {
+ 0, 0
+};
+
+static unsigned char copy_124[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_125[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_127[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_129[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_130[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_131[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_132[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_133[] = {
+ 0, 0
+};
+
+static unsigned char copy_134[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_135[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_137[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_138[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_140[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_141[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_142[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_143[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_144[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_145[] = {
+ 0, 0
+};
+
+static unsigned char copy_146[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_147[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_148[] = {
+ 0, 0
+};
+
+static unsigned char copy_149[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_150[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_151[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_152[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_153[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_154[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_155[] = {
+ 0, 0
+};
+
+static unsigned char copy_156[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_157[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_158[] = {
+ 0, 0
+};
+
+static unsigned char copy_159[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_160[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_161[] = {
+ 0, 0
+};
+
+static unsigned char copy_162[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_163[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_164[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_165[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_166[] = {
+ 0, 0
+};
+
+static unsigned char copy_167[] = {
+ 0, 0
+};
+
+static unsigned char copy_168[] = {
+ 0, 0
+};
+
+static unsigned char copy_170[] = {
+ 0, 0
+};
+
+static unsigned char copy_171[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_172[] = {
+ 0, 0
+};
+
+static unsigned char copy_173[] = {
+ 0, 0
+};
+
+static unsigned char copy_174[] = {
+ 0, 0
+};
+
+static unsigned char copy_175[] = {
+ 0, 0
+};
+
+static unsigned char copy_176[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_177[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_178[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_179[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_180[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_181[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_182[] = {
+ 0, 0
+};
+
+static unsigned char copy_183[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_184[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_185[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_186[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_187[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_188[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_189[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_190[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5
+};
+
+static unsigned char copy_191[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_192[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_193[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_194[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_195[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_197[] = {
+ 0, 0
+};
+
+static unsigned char copy_198[] = {
+ 0, 0
+};
+
+static unsigned char copy_199[] = {
+ 0, 0
+};
+
+static unsigned char copy_201[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_203[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_205[] = {
+ 0, 0
+};
+
+static unsigned char copy_206[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_208[] = {
+ 0, 0
+};
+
+static unsigned char copy_209[] = {
+ 0, 0
+};
+
+static unsigned char copy_210[] = {
+ 0, 0
+};
+
+static unsigned char copy_211[] = {
+ 0, 0
+};
+
+static unsigned char copy_212[] = {
+ 0, 0
+};
+
+static unsigned char copy_214[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_215[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_216[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_217[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_218[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_219[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_220[] = {
+ 0, 0
+};
+
+static unsigned char copy_221[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_222[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_223[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_224[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_225[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_226[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_227[] = {
+ 0, 0
+};
+
+static unsigned char copy_228[] = {
+ 0, 0
+};
+
+static unsigned char copy_233[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_234[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_235[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_236[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_237[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_238[] = {
+ 0, 0
+};
+
+static unsigned char copy_239[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_240[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_241[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_242[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_243[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_244[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_245[] = {
+ 0, 0
+};
+
+static unsigned char copy_246[] = {
+ 0, 0
+};
+
+static unsigned char copy_247[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_248[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_249[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_250[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_251[] = {
+ 0, 0
+};
+
+static unsigned char copy_252[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_253[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_254[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_255[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_256[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_257[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_258[] = {
+ 0, 0
+};
+
+static unsigned char copy_259[] = {
+ 0, 0
+};
+
+static unsigned char copy_260[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_261[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_262[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_263[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_264[] = {
+ 0, 0
+};
+
+static unsigned char copy_265[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_266[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_267[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_268[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_269[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_270[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_271[] = {
+ 0, 0
+};
+
+static unsigned char copy_272[] = {
+ 0, 0
+};
+
+static unsigned char copy_273[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_274[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_275[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_277[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_278[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_279[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_280[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_281[] = {
+ 0, 0
+};
+
+static unsigned char copy_282[] = {
+ 0, 0
+};
+
+static unsigned char copy_284[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_285[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_286[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_287[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_288[] = {
+ 0, 0
+};
+
+static unsigned char copy_289[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_290[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_291[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_292[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_293[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3
+};
+
+static unsigned char copy_294[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_295[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4
+};
+
+static unsigned char copy_296[] = {
+ 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5
+};
+
+static unsigned char copy_297[] = {
+ 0, 0
+};
+
+static unsigned char copy_298[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_299[] = {
+ 0, 0
+};
+
+static unsigned char copy_300[] = {
+ 0, 0
+};
+
+static unsigned char copy_301[] = {
+ 0, 0
+};
+
+static unsigned char copy_302[] = {
+ 0, 0
+};
+
+static unsigned char copy_303[] = {
+ 0, 0
+};
+
+static unsigned char copy_304[] = {
+ 0, 0
+};
+
+static unsigned char copy_305[] = {
+ 0, 0
+};
+
+static unsigned char copy_306[] = {
+ 0, 0
+};
+
+static unsigned char copy_307[] = {
+ 0, 0
+};
+
+static unsigned char copy_308[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_309[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_310[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_311[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static unsigned char copy_312[] = {
+ 0, 0, 0, 1
+};
+
+static unsigned char copy_314[] = {
+ 0, 0
+};
+
+static unsigned char copy_315[] = {
+ 0, 0, 0, 1, 0, 2
+};
+
+static Code parser_rootCode[] = {
+ 28, 1, 0, 184, 2, 0, 35, 0,
+ 0, 31, 31, 222, 32, 223, 31, 87,
+ 45, 2, 0, 119, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 180, 32, 224,
+ 168, 29, 31, 160, 162, 0, 0, 177,
+ 163, 160, 171, 0, 0, 177, 172, 29,
+ 31, 91, 1, 0, 226, 91, 0, 0,
+ 31, 39, 255, 255, 29, 37, 255, 255,
+ 87, 49, 0, 0, 85, 204, 87, 49,
+ 1, 0, 144
+};
+
+static LangElInfo parser_lelInfo[] = {
+ { "__UNUSED", "__UNUSED", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { "ptr", "ptr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_void", "void", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_bool", "bool", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_int", "int", 0, 0, 0, 0, -1, 249, 0, 0, 0, 0, -1, 0, 0 },
+ { "str", "str", 0, 0, 0, 0, -1, 250, 0, 0, 0, 0, -1, 0, 0 },
+ { "stream", "stream", 0, 0, 0, 0, -1, 251, 0, 0, 0, 0, -1, 0, 0 },
+ { "il", "il", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "DEF", "DEF", 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX", "LEX", 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, -1, 0, 0 },
+ { "END", "END", 0, 0, 0, 0, -1, 5, 0, 0, 0, 0, -1, 0, 0 },
+ { "TOKEN", "TOKEN", 0, 0, 0, 0, -1, 6, 0, 0, 0, 0, -1, 0, 0 },
+ { "RL", "RL", 0, 0, 0, 0, -1, 7, 0, 0, 0, 0, -1, 0, 0 },
+ { "IGNORE", "IGNORE", 0, 0, 0, 0, -1, 8, 0, 0, 0, 0, -1, 0, 0 },
+ { "PRINT", "PRINT", 0, 0, 0, 0, -1, 9, 0, 0, 0, 0, -1, 0, 0 },
+ { "PRINTS", "PRINTS", 0, 0, 0, 0, -1, 10, 0, 0, 0, 0, -1, 0, 0 },
+ { "PRINT_XML", "PRINT_XML", 0, 0, 0, 0, -1, 11, 0, 0, 0, 0, -1, 0, 0 },
+ { "PRINT_XML_AC", "PRINT_XML_AC", 0, 0, 0, 0, -1, 12, 0, 0, 0, 0, -1, 0, 0 },
+ { "PARSE", "PARSE", 0, 0, 0, 0, -1, 13, 0, 0, 0, 0, -1, 0, 0 },
+ { "PARSE_STOP", "PARSE_STOP", 0, 0, 0, 0, -1, 14, 0, 0, 0, 0, -1, 0, 0 },
+ { "CONS", "CONS", 0, 0, 0, 0, -1, 15, 0, 0, 0, 0, -1, 0, 0 },
+ { "MATCH", "MATCH", 0, 0, 0, 0, -1, 16, 0, 0, 0, 0, -1, 0, 0 },
+ { "REQUIRE", "REQUIRE", 0, 0, 0, 0, -1, 17, 0, 0, 0, 0, -1, 0, 0 },
+ { "SEND", "SEND", 0, 0, 0, 0, -1, 18, 0, 0, 0, 0, -1, 0, 0 },
+ { "NAMESPACE", "NAMESPACE", 0, 0, 0, 0, -1, 19, 0, 0, 0, 0, -1, 0, 0 },
+ { "FOR", "FOR", 0, 0, 0, 0, -1, 20, 0, 0, 0, 0, -1, 0, 0 },
+ { "IF", "IF", 0, 0, 0, 0, -1, 21, 0, 0, 0, 0, -1, 0, 0 },
+ { "YIELD", "YIELD", 0, 0, 0, 0, -1, 22, 0, 0, 0, 0, -1, 0, 0 },
+ { "WHILE", "WHILE", 0, 0, 0, 0, -1, 23, 0, 0, 0, 0, -1, 0, 0 },
+ { "ELSIF", "ELSIF", 0, 0, 0, 0, -1, 24, 0, 0, 0, 0, -1, 0, 0 },
+ { "ELSE", "ELSE", 0, 0, 0, 0, -1, 25, 0, 0, 0, 0, -1, 0, 0 },
+ { "IN", "IN", 0, 0, 0, 0, -1, 26, 0, 0, 0, 0, -1, 0, 0 },
+ { "PARSER", "PARSER", 0, 0, 0, 0, -1, 27, 0, 0, 0, 0, -1, 0, 0 },
+ { "LIST", "LIST", 0, 0, 0, 0, -1, 28, 0, 0, 0, 0, -1, 0, 0 },
+ { "VECTOR", "VECTOR", 0, 0, 0, 0, -1, 29, 0, 0, 0, 0, -1, 0, 0 },
+ { "MAP", "MAP", 0, 0, 0, 0, -1, 30, 0, 0, 0, 0, -1, 0, 0 },
+ { "PTR", "PTR", 0, 0, 0, 0, -1, 31, 0, 0, 0, 0, -1, 0, 0 },
+ { "ITER", "ITER", 0, 0, 0, 0, -1, 32, 0, 0, 0, 0, -1, 0, 0 },
+ { "REF", "REF", 0, 0, 0, 0, -1, 33, 0, 0, 0, 0, -1, 0, 0 },
+ { "EXPORT", "EXPORT", 0, 0, 0, 0, -1, 34, 0, 0, 0, 0, -1, 0, 0 },
+ { "RETURN", "RETURN", 0, 0, 0, 0, -1, 35, 0, 0, 0, 0, -1, 0, 0 },
+ { "BREAK", "BREAK", 0, 0, 0, 0, -1, 36, 0, 0, 0, 0, -1, 0, 0 },
+ { "REJECT", "REJECT", 0, 0, 0, 0, -1, 37, 0, 0, 0, 0, -1, 0, 0 },
+ { "REDUCEFIRST", "REDUCEFIRST", 0, 0, 0, 0, -1, 38, 0, 0, 0, 0, -1, 0, 0 },
+ { "ALIAS", "ALIAS", 0, 0, 0, 0, -1, 39, 0, 0, 0, 0, -1, 0, 0 },
+ { "COMMIT", "COMMIT", 0, 0, 0, 0, -1, 40, 0, 0, 0, 0, -1, 0, 0 },
+ { "NEW", "NEW", 0, 0, 0, 0, -1, 41, 0, 0, 0, 0, -1, 0, 0 },
+ { "PREEOF", "PREEOF", 0, 0, 0, 0, -1, 42, 0, 0, 0, 0, -1, 0, 0 },
+ { "GLOBAL", "GLOBAL", 0, 0, 0, 0, -1, 43, 0, 0, 0, 0, -1, 0, 0 },
+ { "EOS", "EOS", 0, 0, 0, 0, -1, 44, 0, 0, 0, 0, -1, 0, 0 },
+ { "CAST", "CAST", 0, 0, 0, 0, -1, 45, 0, 0, 0, 0, -1, 0, 0 },
+ { "MAKE_TOKEN", "MAKE_TOKEN", 0, 0, 0, 0, -1, 46, 0, 0, 0, 0, -1, 0, 0 },
+ { "MAKE_TREE", "MAKE_TREE", 0, 0, 0, 0, -1, 47, 0, 0, 0, 0, -1, 0, 0 },
+ { "TYPEID", "TYPEID", 0, 0, 0, 0, -1, 48, 0, 0, 0, 0, -1, 0, 0 },
+ { "LITERAL", "LITERAL", 0, 0, 0, 0, -1, 49, 0, 0, 0, 0, -1, 0, 0 },
+ { "CONTEXT", "CONTEXT", 0, 0, 0, 0, -1, 50, 0, 0, 0, 0, -1, 0, 0 },
+ { "NI", "NI", 0, 0, 0, 0, -1, 51, 0, 0, 0, 0, -1, 0, 0 },
+ { "NIL", "NIL", 0, 0, 0, 0, -1, 52, 0, 0, 0, 0, -1, 0, 0 },
+ { "TRUE", "TRUE", 0, 0, 0, 0, -1, 53, 0, 0, 0, 0, -1, 0, 0 },
+ { "FALSE", "FALSE", 0, 0, 0, 0, -1, 54, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEFT", "LEFT", 0, 0, 0, 0, -1, 55, 0, 0, 0, 0, -1, 0, 0 },
+ { "RIGHT", "RIGHT", 0, 0, 0, 0, -1, 56, 0, 0, 0, 0, -1, 0, 0 },
+ { "NONASSOC", "NONASSOC", 0, 0, 0, 0, -1, 57, 0, 0, 0, 0, -1, 0, 0 },
+ { "INCLUDE", "INCLUDE", 0, 0, 0, 0, -1, 58, 0, 0, 0, 0, -1, 0, 0 },
+ { "id", "id", 0, 0, 0, 0, -1, 59, 0, 0, 0, 0, -1, 0, 0 },
+ { "number", "number", 0, 0, 0, 0, -1, 60, 0, 0, 0, 0, -1, 0, 0 },
+ { "backtick_lit", "backtick_lit", 0, 0, 0, 0, -1, 61, 0, 0, 0, 0, -1, 0, 0 },
+ { "DQ", "DQ", 0, 0, 0, 0, -1, 62, 0, 0, 0, 0, -1, 0, 0 },
+ { "SQ", "SQ", 0, 0, 0, 0, -1, 63, 0, 0, 0, 0, -1, 0, 0 },
+ { "TILDE", "TILDE", 0, 0, 0, 0, -1, 64, 0, 0, 0, 0, -1, 0, 0 },
+ { "SQOPEN", "SQOPEN", 0, 0, 0, 0, -1, 65, 0, 0, 0, 0, -1, 0, 0 },
+ { "SQCLOSE", "SQCLOSE", 0, 0, 0, 0, -1, 66, 0, 0, 0, 0, -1, 0, 0 },
+ { "BAR", "BAR", 0, 0, 0, 0, -1, 67, 0, 0, 0, 0, -1, 0, 0 },
+ { "FSLASH", "FSLASH", 0, 0, 0, 0, -1, 68, 0, 0, 0, 0, -1, 0, 0 },
+ { "COLON", "COLON", 0, 0, 0, 0, -1, 69, 0, 0, 0, 0, -1, 0, 0 },
+ { "DOUBLE_COLON", "DOUBLE_COLON", 0, 0, 0, 0, -1, 70, 0, 0, 0, 0, -1, 0, 0 },
+ { "DOT", "DOT", 0, 0, 0, 0, -1, 71, 0, 0, 0, 0, -1, 0, 0 },
+ { "ARROW", "ARROW", 0, 0, 0, 0, -1, 72, 0, 0, 0, 0, -1, 0, 0 },
+ { "POPEN", "POPEN", 0, 0, 0, 0, -1, 73, 0, 0, 0, 0, -1, 0, 0 },
+ { "PCLOSE", "PCLOSE", 0, 0, 0, 0, -1, 74, 0, 0, 0, 0, -1, 0, 0 },
+ { "COPEN", "COPEN", 0, 0, 0, 0, -1, 75, 0, 0, 0, 0, -1, 0, 0 },
+ { "CCLOSE", "CCLOSE", 0, 0, 0, 0, -1, 76, 0, 0, 0, 0, -1, 0, 0 },
+ { "STAR", "STAR", 0, 0, 0, 0, -1, 77, 0, 0, 0, 0, -1, 0, 0 },
+ { "QUESTION", "QUESTION", 0, 0, 0, 0, -1, 78, 0, 0, 0, 0, -1, 0, 0 },
+ { "EQUALS", "EQUALS", 0, 0, 0, 0, -1, 79, 0, 0, 0, 0, -1, 0, 0 },
+ { "EQEQ", "EQEQ", 0, 0, 0, 0, -1, 80, 0, 0, 0, 0, -1, 0, 0 },
+ { "NEQ", "NEQ", 0, 0, 0, 0, -1, 81, 0, 0, 0, 0, -1, 0, 0 },
+ { "COMMA", "COMMA", 0, 0, 0, 0, -1, 82, 0, 0, 0, 0, -1, 0, 0 },
+ { "LT", "LT", 0, 0, 0, 0, -1, 83, 0, 0, 0, 0, -1, 0, 0 },
+ { "GT", "GT", 0, 0, 0, 0, -1, 84, 0, 0, 0, 0, -1, 0, 0 },
+ { "LTEQ", "LTEQ", 0, 0, 0, 0, -1, 85, 0, 0, 0, 0, -1, 0, 0 },
+ { "GTEQ", "GTEQ", 0, 0, 0, 0, -1, 86, 0, 0, 0, 0, -1, 0, 0 },
+ { "BANG", "BANG", 0, 0, 0, 0, -1, 87, 0, 0, 0, 0, -1, 0, 0 },
+ { "DOLLAR", "DOLLAR", 0, 0, 0, 0, -1, 88, 0, 0, 0, 0, -1, 0, 0 },
+ { "CARET", "CARET", 0, 0, 0, 0, -1, 89, 0, 0, 0, 0, -1, 0, 0 },
+ { "PERCENT", "PERCENT", 0, 0, 0, 0, -1, 90, 0, 0, 0, 0, -1, 0, 0 },
+ { "PLUS", "PLUS", 0, 0, 0, 0, -1, 91, 0, 0, 0, 0, -1, 0, 0 },
+ { "MINUS", "MINUS", 0, 0, 0, 0, -1, 92, 0, 0, 0, 0, -1, 0, 0 },
+ { "AMPAMP", "AMPAMP", 0, 0, 0, 0, -1, 93, 0, 0, 0, 0, -1, 0, 0 },
+ { "BARBAR", "BARBAR", 0, 0, 0, 0, -1, 94, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ignore_00b9", "_ignore_00b9", 0, 0, 0, 1, -1, 95, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ignore_00bb", "_ignore_00bb", 0, 0, 0, 1, -1, 96, 0, 0, 0, 0, -1, 0, 0 },
+ { "CONS_DQ", "CONS_DQ", 0, 0, 0, 0, -1, 97, 0, 0, 0, 0, -1, 0, 0 },
+ { "CONS_DQ_NL", "CONS_DQ_NL", 0, 0, 0, 0, -1, 98, 0, 0, 0, 0, -1, 0, 0 },
+ { "CONS_SQOPEN", "CONS_SQOPEN", 0, 0, 0, 0, -1, 99, 0, 0, 0, 0, -1, 0, 0 },
+ { "CONS_SQCLOSE", "CONS_SQCLOSE", 0, 0, 0, 0, -1, 100, 0, 0, 0, 0, -1, 0, 0 },
+ { "dq_cons_data", "dq_cons_data", 0, 0, 0, 0, -1, 101, 0, 0, 0, 0, -1, 0, 0 },
+ { "CONS_SQ", "CONS_SQ", 0, 0, 0, 0, -1, 102, 0, 0, 0, 0, -1, 0, 0 },
+ { "CONS_SQ_NL", "CONS_SQ_NL", 0, 0, 0, 0, -1, 103, 0, 0, 0, 0, -1, 0, 0 },
+ { "sq_cons_data", "sq_cons_data", 0, 0, 0, 0, -1, 104, 0, 0, 0, 0, -1, 0, 0 },
+ { "TILDE_NL", "TILDE_NL", 0, 0, 0, 0, -1, 105, 0, 0, 0, 0, -1, 0, 0 },
+ { "tilde_data", "tilde_data", 0, 0, 0, 0, -1, 106, 0, 0, 0, 0, -1, 0, 0 },
+ { "lex_id", "lex_id", 0, 0, 0, 0, -1, 107, 0, 0, 0, 0, -1, 0, 0 },
+ { "lex_uint", "lex_uint", 0, 0, 0, 0, -1, 108, 0, 0, 0, 0, -1, 0, 0 },
+ { "lex_hex", "lex_hex", 0, 0, 0, 0, -1, 109, 0, 0, 0, 0, -1, 0, 0 },
+ { "lex_lit", "lex_lit", 0, 0, 0, 0, -1, 110, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_DOT", "LEX_DOT", 0, 0, 0, 0, -1, 111, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_BAR", "LEX_BAR", 0, 0, 0, 0, -1, 112, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_AMP", "LEX_AMP", 0, 0, 0, 0, -1, 113, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_DASH", "LEX_DASH", 0, 0, 0, 0, -1, 114, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_POPEN", "LEX_POPEN", 0, 0, 0, 0, -1, 115, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_PCLOSE", "LEX_PCLOSE", 0, 0, 0, 0, -1, 116, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_STAR", "LEX_STAR", 0, 0, 0, 0, -1, 117, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_STARSTAR", "LEX_STARSTAR", 0, 0, 0, 0, -1, 118, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_QUESTION", "LEX_QUESTION", 0, 0, 0, 0, -1, 119, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_PLUS", "LEX_PLUS", 0, 0, 0, 0, -1, 120, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_CARET", "LEX_CARET", 0, 0, 0, 0, -1, 121, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_DOTDOT", "LEX_DOTDOT", 0, 0, 0, 0, -1, 122, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_SQOPEN_POS", "LEX_SQOPEN_POS", 0, 0, 0, 0, -1, 123, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_SQOPEN_NEG", "LEX_SQOPEN_NEG", 0, 0, 0, 0, -1, 124, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_FSLASH", "LEX_FSLASH", 0, 0, 0, 0, -1, 125, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_DASHDASH", "LEX_DASHDASH", 0, 0, 0, 0, -1, 126, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_COLON_GT", "LEX_COLON_GT", 0, 0, 0, 0, -1, 127, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_COLON_GTGT", "LEX_COLON_GTGT", 0, 0, 0, 0, -1, 128, 0, 0, 0, 0, -1, 0, 0 },
+ { "LEX_LT_COLON", "LEX_LT_COLON", 0, 0, 0, 0, -1, 129, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ignore_00ff", "_ignore_00ff", 0, 0, 0, 1, -1, 130, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ignore_0101", "_ignore_0101", 0, 0, 0, 1, -1, 131, 0, 0, 0, 0, -1, 0, 0 },
+ { "RE_DASH", "RE_DASH", 0, 0, 0, 0, -1, 132, 0, 0, 0, 0, -1, 0, 0 },
+ { "RE_CHAR", "RE_CHAR", 0, 0, 0, 0, -1, 133, 0, 0, 0, 0, -1, 0, 0 },
+ { "RE_SQCLOSE", "RE_SQCLOSE", 0, 0, 0, 0, -1, 134, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ign_0xdbb3a0", "_ign_0xdbb3a0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ign_0xde4b20", "_ign_0xde4b20", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ign_0xde7770", "_ign_0xde7770", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ign_0xde9520", "_ign_0xde9520", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ign_0xdea540", "_ign_0xdea540", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_ign_0xdf7df0", "_ign_0xdf7df0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "__0xde4bc0_DEF_PAT_1", "__0xde4bc0_DEF_PAT_1", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "__0xde7810_DEF_PAT_2", "__0xde7810_DEF_PAT_2", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "__0xde95c0_DEF_PAT_3", "__0xde95c0_DEF_PAT_3", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "__0xdf7e90_DEF_PAT_4", "__0xdf7e90_DEF_PAT_4", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_T_any", "_T_any", 0, 0, 0, 0, -1, 0, 0, 0, 696, 0, -1, 0, 0 },
+ { "_T_start", "_T_start", 0, 0, 0, 0, -1, 135, 0, 0, 697, 0, -1, 0, 0 },
+ { "_T_root_item", "_T_root_item", 0, 0, 0, 0, -1, 136, 0, 0, 698, 0, -1, 0, 0 },
+ { "_T_include", "_T_include", 0, 0, 0, 0, -1, 137, 0, 0, 699, 0, -1, 0, 0 },
+ { "_T_precedence_def", "_T_precedence_def", 0, 0, 0, 0, -1, 138, 0, 0, 700, 0, -1, 0, 0 },
+ { "_T_pred_type", "_T_pred_type", 0, 0, 0, 0, -1, 139, 0, 0, 701, 0, -1, 0, 0 },
+ { "_T_pred_token_list", "_T_pred_token_list", 0, 0, 0, 0, -1, 140, 0, 0, 702, 0, -1, 0, 0 },
+ { "_T_pred_token", "_T_pred_token", 0, 0, 0, 0, -1, 141, 0, 0, 703, 0, -1, 0, 0 },
+ { "_T_pre_eof_def", "_T_pre_eof_def", 0, 0, 0, 0, -1, 142, 0, 0, 704, 0, -1, 0, 0 },
+ { "_T_alias_def", "_T_alias_def", 0, 0, 0, 0, -1, 143, 0, 0, 705, 0, -1, 0, 0 },
+ { "_T_context_item", "_T_context_item", 0, 0, 0, 0, -1, 144, 0, 0, 706, 0, -1, 0, 0 },
+ { "_T_export_def", "_T_export_def", 0, 0, 0, 0, -1, 145, 0, 0, 707, 0, -1, 0, 0 },
+ { "_T_global_def", "_T_global_def", 0, 0, 0, 0, -1, 146, 0, 0, 708, 0, -1, 0, 0 },
+ { "_T_iter_def", "_T_iter_def", 0, 0, 0, 0, -1, 147, 0, 0, 709, 0, -1, 0, 0 },
+ { "_T_reference_type_ref", "_T_reference_type_ref", 0, 0, 0, 0, -1, 148, 0, 0, 710, 0, -1, 0, 0 },
+ { "_T_param_var_def_list", "_T_param_var_def_list", 0, 0, 0, 0, -1, 149, 0, 0, 711, 0, -1, 0, 0 },
+ { "_T_param_var_def", "_T_param_var_def", 0, 0, 0, 0, -1, 150, 0, 0, 712, 0, -1, 0, 0 },
+ { "_T_opt_export", "_T_opt_export", 0, 0, 0, 0, -1, 151, 0, 0, 713, 0, -1, 0, 0 },
+ { "_T_function_def", "_T_function_def", 0, 0, 0, 0, -1, 152, 0, 0, 714, 0, -1, 0, 0 },
+ { "_T_context_var_def", "_T_context_var_def", 0, 0, 0, 0, -1, 153, 0, 0, 715, 0, -1, 0, 0 },
+ { "_T_context_def", "_T_context_def", 0, 0, 0, 0, -1, 154, 0, 0, 716, 0, -1, 0, 0 },
+ { "_T_literal_def", "_T_literal_def", 0, 0, 0, 0, -1, 155, 0, 0, 717, 0, -1, 0, 0 },
+ { "_T_literal_list", "_T_literal_list", 0, 0, 0, 0, -1, 156, 0, 0, 718, 0, -1, 0, 0 },
+ { "_T_literal_item", "_T_literal_item", 0, 0, 0, 0, -1, 157, 0, 0, 719, 0, -1, 0, 0 },
+ { "_T_no_ignore_left", "_T_no_ignore_left", 0, 0, 0, 0, -1, 158, 0, 0, 720, 0, -1, 0, 0 },
+ { "_T_no_ignore_right", "_T_no_ignore_right", 0, 0, 0, 0, -1, 159, 0, 0, 721, 0, -1, 0, 0 },
+ { "_T_namespace_def", "_T_namespace_def", 0, 0, 0, 0, -1, 160, 0, 0, 722, 0, -1, 0, 0 },
+ { "_T_namespace_item", "_T_namespace_item", 0, 0, 0, 0, -1, 161, 0, 0, 723, 0, -1, 0, 0 },
+ { "_T_obj_var_list", "_T_obj_var_list", 0, 0, 0, 0, -1, 162, 0, 0, 724, 0, -1, 0, 0 },
+ { "_T_opt_reduce_first", "_T_opt_reduce_first", 0, 0, 0, 0, -1, 163, 0, 0, 725, 0, -1, 0, 0 },
+ { "_T_cfl_def", "_T_cfl_def", 0, 0, 0, 0, -1, 164, 0, 0, 726, 0, -1, 0, 0 },
+ { "_T_region_def", "_T_region_def", 0, 0, 0, 0, -1, 165, 0, 0, 727, 0, -1, 0, 0 },
+ { "_T_rl_def", "_T_rl_def", 0, 0, 0, 0, -1, 166, 0, 0, 728, 0, -1, 0, 0 },
+ { "_T_opt_lex_expr", "_T_opt_lex_expr", 0, 0, 0, 0, -1, 167, 0, 0, 729, 0, -1, 0, 0 },
+ { "_T_token_def", "_T_token_def", 0, 0, 0, 0, -1, 168, 0, 0, 730, 0, -1, 0, 0 },
+ { "_T_ic_def", "_T_ic_def", 0, 0, 0, 0, -1, 169, 0, 0, 731, 0, -1, 0, 0 },
+ { "_T_opt_translate", "_T_opt_translate", 0, 0, 0, 0, -1, 170, 0, 0, 732, 0, -1, 0, 0 },
+ { "_T_opt_id", "_T_opt_id", 0, 0, 0, 0, -1, 171, 0, 0, 733, 0, -1, 0, 0 },
+ { "_T_ignore_def", "_T_ignore_def", 0, 0, 0, 0, -1, 172, 0, 0, 734, 0, -1, 0, 0 },
+ { "_T_prod_el", "_T_prod_el", 0, 0, 0, 0, -1, 173, 0, 0, 735, 0, -1, 0, 0 },
+ { "_T_opt_prod_el_name", "_T_opt_prod_el_name", 0, 0, 0, 0, -1, 174, 0, 0, 736, 0, -1, 0, 0 },
+ { "_T_prod_el_list", "_T_prod_el_list", 0, 0, 0, 0, -1, 175, 0, 0, 737, 0, -1, 0, 0 },
+ { "_T_opt_commit", "_T_opt_commit", 0, 0, 0, 0, -1, 176, 0, 0, 738, 0, -1, 0, 0 },
+ { "_T_opt_prod_name", "_T_opt_prod_name", 0, 0, 0, 0, -1, 177, 0, 0, 739, 0, -1, 0, 0 },
+ { "_T_prod", "_T_prod", 0, 0, 0, 0, -1, 178, 0, 0, 740, 0, -1, 0, 0 },
+ { "_T_opt_reduce", "_T_opt_reduce", 0, 0, 0, 0, -1, 179, 0, 0, 741, 0, -1, 0, 0 },
+ { "_T_prod_list", "_T_prod_list", 0, 0, 0, 0, -1, 180, 0, 0, 742, 0, -1, 0, 0 },
+ { "_T_statement", "_T_statement", 0, 0, 0, 0, -1, 181, 0, 0, 743, 0, -1, 0, 0 },
+ { "_T_elsif_list", "_T_elsif_list", 0, 0, 0, 0, -1, 182, 0, 0, 744, 0, -1, 0, 0 },
+ { "_T_elsif_clause", "_T_elsif_clause", 0, 0, 0, 0, -1, 183, 0, 0, 745, 0, -1, 0, 0 },
+ { "_T_optional_else", "_T_optional_else", 0, 0, 0, 0, -1, 184, 0, 0, 746, 0, -1, 0, 0 },
+ { "_T_call_arg_list", "_T_call_arg_list", 0, 0, 0, 0, -1, 185, 0, 0, 747, 0, -1, 0, 0 },
+ { "_T_iter_call", "_T_iter_call", 0, 0, 0, 0, -1, 186, 0, 0, 748, 0, -1, 0, 0 },
+ { "_T_block_or_single", "_T_block_or_single", 0, 0, 0, 0, -1, 187, 0, 0, 749, 0, -1, 0, 0 },
+ { "_T_require_pattern", "_T_require_pattern", 0, 0, 0, 0, -1, 188, 0, 0, 750, 0, -1, 0, 0 },
+ { "_T_opt_require_stmt", "_T_opt_require_stmt", 0, 0, 0, 0, -1, 189, 0, 0, 751, 0, -1, 0, 0 },
+ { "_T_lang_stmt_list", "_T_lang_stmt_list", 0, 0, 0, 0, -1, 190, 0, 0, 752, 0, -1, 0, 0 },
+ { "_T_opt_def_init", "_T_opt_def_init", 0, 0, 0, 0, -1, 191, 0, 0, 753, 0, -1, 0, 0 },
+ { "_T_var_def", "_T_var_def", 0, 0, 0, 0, -1, 192, 0, 0, 754, 0, -1, 0, 0 },
+ { "_T_print_stmt", "_T_print_stmt", 0, 0, 0, 0, -1, 193, 0, 0, 755, 0, -1, 0, 0 },
+ { "_T_expr_stmt", "_T_expr_stmt", 0, 0, 0, 0, -1, 194, 0, 0, 756, 0, -1, 0, 0 },
+ { "_T_code_expr", "_T_code_expr", 0, 0, 0, 0, -1, 195, 0, 0, 757, 0, -1, 0, 0 },
+ { "_T_code_relational", "_T_code_relational", 0, 0, 0, 0, -1, 196, 0, 0, 758, 0, -1, 0, 0 },
+ { "_T_code_additive", "_T_code_additive", 0, 0, 0, 0, -1, 197, 0, 0, 759, 0, -1, 0, 0 },
+ { "_T_code_multiplicitive", "_T_code_multiplicitive", 0, 0, 0, 0, -1, 198, 0, 0, 760, 0, -1, 0, 0 },
+ { "_T_code_unary", "_T_code_unary", 0, 0, 0, 0, -1, 199, 0, 0, 761, 0, -1, 0, 0 },
+ { "_T_opt_eos", "_T_opt_eos", 0, 0, 0, 0, -1, 200, 0, 0, 762, 0, -1, 0, 0 },
+ { "_T_code_factor", "_T_code_factor", 0, 0, 0, 0, -1, 201, 0, 0, 763, 0, -1, 0, 0 },
+ { "_T_type_ref", "_T_type_ref", 0, 0, 0, 0, -1, 202, 0, 0, 764, 0, -1, 0, 0 },
+ { "_T_region_qual", "_T_region_qual", 0, 0, 0, 0, -1, 203, 0, 0, 765, 0, -1, 0, 0 },
+ { "_T_opt_repeat", "_T_opt_repeat", 0, 0, 0, 0, -1, 204, 0, 0, 766, 0, -1, 0, 0 },
+ { "_T_opt_capture", "_T_opt_capture", 0, 0, 0, 0, -1, 205, 0, 0, 767, 0, -1, 0, 0 },
+ { "_T_opt_field_init", "_T_opt_field_init", 0, 0, 0, 0, -1, 206, 0, 0, 768, 0, -1, 0, 0 },
+ { "_T_field_init", "_T_field_init", 0, 0, 0, 0, -1, 207, 0, 0, 769, 0, -1, 0, 0 },
+ { "_T_opt_label", "_T_opt_label", 0, 0, 0, 0, -1, 208, 0, 0, 770, 0, -1, 0, 0 },
+ { "_T_dq_lit_term", "_T_dq_lit_term", 0, 0, 0, 0, -1, 209, 0, 0, 771, 0, -1, 0, 0 },
+ { "_T_sq_lit_term", "_T_sq_lit_term", 0, 0, 0, 0, -1, 210, 0, 0, 772, 0, -1, 0, 0 },
+ { "_T_opt_tilde_data", "_T_opt_tilde_data", 0, 0, 0, 0, -1, 211, 0, 0, 773, 0, -1, 0, 0 },
+ { "_T_pattern_el_lel", "_T_pattern_el_lel", 0, 0, 0, 0, -1, 212, 0, 0, 774, 0, -1, 0, 0 },
+ { "_T_pattern_el", "_T_pattern_el", 0, 0, 0, 0, -1, 213, 0, 0, 775, 0, -1, 0, 0 },
+ { "_T_litpat_el", "_T_litpat_el", 0, 0, 0, 0, -1, 214, 0, 0, 776, 0, -1, 0, 0 },
+ { "_T_pattern_top_el", "_T_pattern_top_el", 0, 0, 0, 0, -1, 215, 0, 0, 777, 0, -1, 0, 0 },
+ { "_T_pattern_list", "_T_pattern_list", 0, 0, 0, 0, -1, 216, 0, 0, 778, 0, -1, 0, 0 },
+ { "_T_pattern", "_T_pattern", 0, 0, 0, 0, -1, 217, 0, 0, 779, 0, -1, 0, 0 },
+ { "_T_E1", "_T_E1", 0, 0, 0, 0, -1, 218, 0, 0, 780, 0, -1, 0, 0 },
+ { "_T_E2", "_T_E2", 0, 0, 0, 0, -1, 219, 0, 0, 781, 0, -1, 0, 0 },
+ { "_T_E3", "_T_E3", 0, 0, 0, 0, -1, 220, 0, 0, 782, 0, -1, 0, 0 },
+ { "_T_E4", "_T_E4", 0, 0, 0, 0, -1, 221, 0, 0, 783, 0, -1, 0, 0 },
+ { "_T_cons_el", "_T_cons_el", 0, 0, 0, 0, -1, 222, 0, 0, 784, 0, -1, 0, 0 },
+ { "_T_lit_cons_el", "_T_lit_cons_el", 0, 0, 0, 0, -1, 223, 0, 0, 785, 0, -1, 0, 0 },
+ { "_T_cons_top_el", "_T_cons_top_el", 0, 0, 0, 0, -1, 224, 0, 0, 786, 0, -1, 0, 0 },
+ { "_T_cons_list", "_T_cons_list", 0, 0, 0, 0, -1, 225, 0, 0, 787, 0, -1, 0, 0 },
+ { "_T_constructor", "_T_constructor", 0, 0, 0, 0, -1, 226, 0, 0, 788, 0, -1, 0, 0 },
+ { "_T_accum_el", "_T_accum_el", 0, 0, 0, 0, -1, 227, 0, 0, 789, 0, -1, 0, 0 },
+ { "_T_lit_accum_el", "_T_lit_accum_el", 0, 0, 0, 0, -1, 228, 0, 0, 790, 0, -1, 0, 0 },
+ { "_T_accum_top_el", "_T_accum_top_el", 0, 0, 0, 0, -1, 229, 0, 0, 791, 0, -1, 0, 0 },
+ { "_T_accum_list", "_T_accum_list", 0, 0, 0, 0, -1, 230, 0, 0, 792, 0, -1, 0, 0 },
+ { "_T_accumulate", "_T_accumulate", 0, 0, 0, 0, -1, 231, 0, 0, 793, 0, -1, 0, 0 },
+ { "_T_string_el", "_T_string_el", 0, 0, 0, 0, -1, 232, 0, 0, 794, 0, -1, 0, 0 },
+ { "_T_lit_string_el", "_T_lit_string_el", 0, 0, 0, 0, -1, 233, 0, 0, 795, 0, -1, 0, 0 },
+ { "_T_string_top_el", "_T_string_top_el", 0, 0, 0, 0, -1, 234, 0, 0, 796, 0, -1, 0, 0 },
+ { "_T_string_list", "_T_string_list", 0, 0, 0, 0, -1, 235, 0, 0, 797, 0, -1, 0, 0 },
+ { "_T_string", "_T_string", 0, 0, 0, 0, -1, 236, 0, 0, 798, 0, -1, 0, 0 },
+ { "_T_var_ref", "_T_var_ref", 0, 0, 0, 0, -1, 237, 0, 0, 799, 0, -1, 0, 0 },
+ { "_T_qual", "_T_qual", 0, 0, 0, 0, -1, 238, 0, 0, 800, 0, -1, 0, 0 },
+ { "_T_lex_expr", "_T_lex_expr", 0, 0, 0, 0, -1, 239, 0, 0, 801, 0, -1, 0, 0 },
+ { "_T_opt_lex_dot", "_T_opt_lex_dot", 0, 0, 0, 0, -1, 240, 0, 0, 802, 0, -1, 0, 0 },
+ { "_T_lex_term", "_T_lex_term", 0, 0, 0, 0, -1, 241, 0, 0, 803, 0, -1, 0, 0 },
+ { "_T_lex_factor_rep", "_T_lex_factor_rep", 0, 0, 0, 0, -1, 242, 0, 0, 804, 0, -1, 0, 0 },
+ { "_T_lex_factor_neg", "_T_lex_factor_neg", 0, 0, 0, 0, -1, 243, 0, 0, 805, 0, -1, 0, 0 },
+ { "_T_lex_range_lit", "_T_lex_range_lit", 0, 0, 0, 0, -1, 244, 0, 0, 806, 0, -1, 0, 0 },
+ { "_T_lex_num", "_T_lex_num", 0, 0, 0, 0, -1, 245, 0, 0, 807, 0, -1, 0, 0 },
+ { "_T_lex_factor", "_T_lex_factor", 0, 0, 0, 0, -1, 246, 0, 0, 808, 0, -1, 0, 0 },
+ { "_T_reg_or_data", "_T_reg_or_data", 0, 0, 0, 0, -1, 247, 0, 0, 809, 0, -1, 0, 0 },
+ { "_T_reg_or_char", "_T_reg_or_char", 0, 0, 0, 0, -1, 248, 0, 0, 810, 0, -1, 0, 0 },
+ { "_T___accum0", "_T___accum0", 0, 0, 0, 0, -1, 252, 0, 0, 811, 0, -1, 0, 0 },
+ { "_T__repeat_root_item", "_T__repeat_root_item", 0, 0, 0, 0, -1, 0, 0, 0, 812, 0, -1, 0, 0 },
+ { "_T__repeat_sq_cons_data", "_T__repeat_sq_cons_data", 0, 0, 0, 0, -1, 0, 0, 0, 813, 0, -1, 0, 0 },
+ { "_T__repeat_context_item", "_T__repeat_context_item", 0, 0, 0, 0, -1, 0, 0, 0, 814, 0, -1, 0, 0 },
+ { "_T__repeat_namespace_item", "_T__repeat_namespace_item", 0, 0, 0, 0, -1, 0, 0, 0, 815, 0, -1, 0, 0 },
+ { "_T__repeat_var_def", "_T__repeat_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 816, 0, -1, 0, 0 },
+ { "_T__repeat_statement", "_T__repeat_statement", 0, 0, 0, 0, -1, 0, 0, 0, 817, 0, -1, 0, 0 },
+ { "_T__repeat_field_init", "_T__repeat_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 818, 0, -1, 0, 0 },
+ { "_T__repeat_litpat_el", "_T__repeat_litpat_el", 0, 0, 0, 0, -1, 0, 0, 0, 819, 0, -1, 0, 0 },
+ { "_T__repeat_pattern_el", "_T__repeat_pattern_el", 0, 0, 0, 0, -1, 0, 0, 0, 820, 0, -1, 0, 0 },
+ { "_T__repeat_lit_cons_el", "_T__repeat_lit_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 821, 0, -1, 0, 0 },
+ { "_T__repeat_cons_el", "_T__repeat_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 822, 0, -1, 0, 0 },
+ { "_T__repeat_lit_accum_el", "_T__repeat_lit_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 823, 0, -1, 0, 0 },
+ { "_T__repeat_accum_el", "_T__repeat_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 824, 0, -1, 0, 0 },
+ { "_T__repeat_lit_string_el", "_T__repeat_lit_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 825, 0, -1, 0, 0 },
+ { "_T__repeat_string_el", "_T__repeat_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 826, 0, -1, 0, 0 },
+ { "_T___list0", "_T___list0", 0, 0, 0, 0, -1, 253, 0, 0, 827, 0, -1, 0, 0 },
+ { "_eof_ptr", "_eof_ptr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_void", "_eof_void", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_bool", "_eof_bool", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_int", "_eof_int", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_str", "_eof_str", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_stream", "_eof_stream", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_il", "_eof_il", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_any", "_eof_any", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_DEF", "_eof_DEF", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX", "_eof_LEX", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_END", "_eof_END", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_TOKEN", "_eof_TOKEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_RL", "_eof_RL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_IGNORE", "_eof_IGNORE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PRINT", "_eof_PRINT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PRINTS", "_eof_PRINTS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PRINT_XML", "_eof_PRINT_XML", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PRINT_XML_AC", "_eof_PRINT_XML_AC", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PARSE", "_eof_PARSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PARSE_STOP", "_eof_PARSE_STOP", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CONS", "_eof_CONS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_MATCH", "_eof_MATCH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_REQUIRE", "_eof_REQUIRE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_SEND", "_eof_SEND", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_NAMESPACE", "_eof_NAMESPACE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_FOR", "_eof_FOR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_IF", "_eof_IF", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_YIELD", "_eof_YIELD", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_WHILE", "_eof_WHILE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_ELSIF", "_eof_ELSIF", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_ELSE", "_eof_ELSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_IN", "_eof_IN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PARSER", "_eof_PARSER", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LIST", "_eof_LIST", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_VECTOR", "_eof_VECTOR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_MAP", "_eof_MAP", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PTR", "_eof_PTR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_ITER", "_eof_ITER", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_REF", "_eof_REF", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_EXPORT", "_eof_EXPORT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_RETURN", "_eof_RETURN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_BREAK", "_eof_BREAK", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_REJECT", "_eof_REJECT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_REDUCEFIRST", "_eof_REDUCEFIRST", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_ALIAS", "_eof_ALIAS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_COMMIT", "_eof_COMMIT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_NEW", "_eof_NEW", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PREEOF", "_eof_PREEOF", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_GLOBAL", "_eof_GLOBAL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_EOS", "_eof_EOS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CAST", "_eof_CAST", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_MAKE_TOKEN", "_eof_MAKE_TOKEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_MAKE_TREE", "_eof_MAKE_TREE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_TYPEID", "_eof_TYPEID", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LITERAL", "_eof_LITERAL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CONTEXT", "_eof_CONTEXT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_NI", "_eof_NI", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_NIL", "_eof_NIL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_TRUE", "_eof_TRUE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_FALSE", "_eof_FALSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEFT", "_eof_LEFT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_RIGHT", "_eof_RIGHT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_NONASSOC", "_eof_NONASSOC", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_INCLUDE", "_eof_INCLUDE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_id", "_eof_id", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_number", "_eof_number", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_backtick_lit", "_eof_backtick_lit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_DQ", "_eof_DQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_SQ", "_eof_SQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_TILDE", "_eof_TILDE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_SQOPEN", "_eof_SQOPEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_SQCLOSE", "_eof_SQCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_BAR", "_eof_BAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_FSLASH", "_eof_FSLASH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_COLON", "_eof_COLON", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_DOUBLE_COLON", "_eof_DOUBLE_COLON", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_DOT", "_eof_DOT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_ARROW", "_eof_ARROW", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_POPEN", "_eof_POPEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PCLOSE", "_eof_PCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_COPEN", "_eof_COPEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CCLOSE", "_eof_CCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_STAR", "_eof_STAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_QUESTION", "_eof_QUESTION", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_EQUALS", "_eof_EQUALS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_EQEQ", "_eof_EQEQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_NEQ", "_eof_NEQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_COMMA", "_eof_COMMA", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LT", "_eof_LT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_GT", "_eof_GT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LTEQ", "_eof_LTEQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_GTEQ", "_eof_GTEQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_BANG", "_eof_BANG", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_DOLLAR", "_eof_DOLLAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CARET", "_eof_CARET", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PERCENT", "_eof_PERCENT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_PLUS", "_eof_PLUS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_MINUS", "_eof_MINUS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_AMPAMP", "_eof_AMPAMP", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_BARBAR", "_eof_BARBAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ignore_00b9", "_eof__ignore_00b9", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ignore_00bb", "_eof__ignore_00bb", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CONS_DQ", "_eof_CONS_DQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CONS_DQ_NL", "_eof_CONS_DQ_NL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CONS_SQOPEN", "_eof_CONS_SQOPEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CONS_SQCLOSE", "_eof_CONS_SQCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_dq_cons_data", "_eof_dq_cons_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CONS_SQ", "_eof_CONS_SQ", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_CONS_SQ_NL", "_eof_CONS_SQ_NL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_sq_cons_data", "_eof_sq_cons_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_TILDE_NL", "_eof_TILDE_NL", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_tilde_data", "_eof_tilde_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_id", "_eof_lex_id", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_uint", "_eof_lex_uint", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_hex", "_eof_lex_hex", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_lit", "_eof_lex_lit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_DOT", "_eof_LEX_DOT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_BAR", "_eof_LEX_BAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_AMP", "_eof_LEX_AMP", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_DASH", "_eof_LEX_DASH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_POPEN", "_eof_LEX_POPEN", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_PCLOSE", "_eof_LEX_PCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_STAR", "_eof_LEX_STAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_STARSTAR", "_eof_LEX_STARSTAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_QUESTION", "_eof_LEX_QUESTION", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_PLUS", "_eof_LEX_PLUS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_CARET", "_eof_LEX_CARET", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_DOTDOT", "_eof_LEX_DOTDOT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_SQOPEN_POS", "_eof_LEX_SQOPEN_POS", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_SQOPEN_NEG", "_eof_LEX_SQOPEN_NEG", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_FSLASH", "_eof_LEX_FSLASH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_DASHDASH", "_eof_LEX_DASHDASH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_COLON_GT", "_eof_LEX_COLON_GT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_COLON_GTGT", "_eof_LEX_COLON_GTGT", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_LEX_LT_COLON", "_eof_LEX_LT_COLON", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ignore_00ff", "_eof__ignore_00ff", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ignore_0101", "_eof__ignore_0101", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_RE_DASH", "_eof_RE_DASH", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_RE_CHAR", "_eof_RE_CHAR", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_RE_SQCLOSE", "_eof_RE_SQCLOSE", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_start", "_eof_start", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_root_item", "_eof_root_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_include", "_eof_include", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_precedence_def", "_eof_precedence_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_pred_type", "_eof_pred_type", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_pred_token_list", "_eof_pred_token_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_pred_token", "_eof_pred_token", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_pre_eof_def", "_eof_pre_eof_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_alias_def", "_eof_alias_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_context_item", "_eof_context_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_export_def", "_eof_export_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_global_def", "_eof_global_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_iter_def", "_eof_iter_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_reference_type_ref", "_eof_reference_type_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_param_var_def_list", "_eof_param_var_def_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_param_var_def", "_eof_param_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_export", "_eof_opt_export", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_function_def", "_eof_function_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_context_var_def", "_eof_context_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_context_def", "_eof_context_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_literal_def", "_eof_literal_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_literal_list", "_eof_literal_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_literal_item", "_eof_literal_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_no_ignore_left", "_eof_no_ignore_left", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_no_ignore_right", "_eof_no_ignore_right", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_namespace_def", "_eof_namespace_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_namespace_item", "_eof_namespace_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_obj_var_list", "_eof_obj_var_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_reduce_first", "_eof_opt_reduce_first", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_cfl_def", "_eof_cfl_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_region_def", "_eof_region_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_rl_def", "_eof_rl_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_lex_expr", "_eof_opt_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_token_def", "_eof_token_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_ic_def", "_eof_ic_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_translate", "_eof_opt_translate", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_id", "_eof_opt_id", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_ignore_def", "_eof_ignore_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_prod_el", "_eof_prod_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_prod_el_name", "_eof_opt_prod_el_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_prod_el_list", "_eof_prod_el_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_commit", "_eof_opt_commit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_prod_name", "_eof_opt_prod_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_prod", "_eof_prod", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_reduce", "_eof_opt_reduce", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_prod_list", "_eof_prod_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_statement", "_eof_statement", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_elsif_list", "_eof_elsif_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_elsif_clause", "_eof_elsif_clause", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_optional_else", "_eof_optional_else", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_call_arg_list", "_eof_call_arg_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_iter_call", "_eof_iter_call", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_block_or_single", "_eof_block_or_single", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_require_pattern", "_eof_require_pattern", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_require_stmt", "_eof_opt_require_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lang_stmt_list", "_eof_lang_stmt_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_def_init", "_eof_opt_def_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_var_def", "_eof_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_print_stmt", "_eof_print_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_expr_stmt", "_eof_expr_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_code_expr", "_eof_code_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_code_relational", "_eof_code_relational", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_code_additive", "_eof_code_additive", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_code_multiplicitive", "_eof_code_multiplicitive", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_code_unary", "_eof_code_unary", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_eos", "_eof_opt_eos", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_code_factor", "_eof_code_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_type_ref", "_eof_type_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_region_qual", "_eof_region_qual", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_repeat", "_eof_opt_repeat", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_capture", "_eof_opt_capture", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_field_init", "_eof_opt_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_field_init", "_eof_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_label", "_eof_opt_label", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_dq_lit_term", "_eof_dq_lit_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_sq_lit_term", "_eof_sq_lit_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_tilde_data", "_eof_opt_tilde_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_pattern_el_lel", "_eof_pattern_el_lel", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_pattern_el", "_eof_pattern_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_litpat_el", "_eof_litpat_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_pattern_top_el", "_eof_pattern_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_pattern_list", "_eof_pattern_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_pattern", "_eof_pattern", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_E1", "_eof_E1", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_E2", "_eof_E2", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_E3", "_eof_E3", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_E4", "_eof_E4", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_cons_el", "_eof_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lit_cons_el", "_eof_lit_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_cons_top_el", "_eof_cons_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_cons_list", "_eof_cons_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_constructor", "_eof_constructor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_accum_el", "_eof_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lit_accum_el", "_eof_lit_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_accum_top_el", "_eof_accum_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_accum_list", "_eof_accum_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_accumulate", "_eof_accumulate", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_string_el", "_eof_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lit_string_el", "_eof_lit_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_string_top_el", "_eof_string_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_string_list", "_eof_string_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_string", "_eof_string", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_var_ref", "_eof_var_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_qual", "_eof_qual", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_expr", "_eof_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_opt_lex_dot", "_eof_opt_lex_dot", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_term", "_eof_lex_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_factor_rep", "_eof_lex_factor_rep", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_factor_neg", "_eof_lex_factor_neg", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_range_lit", "_eof_lex_range_lit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_num", "_eof_lex_num", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_lex_factor", "_eof_lex_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_reg_or_data", "_eof_reg_or_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof_reg_or_char", "_eof_reg_or_char", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ign_0xdbb3a0", "_eof__ign_0xdbb3a0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ign_0xde4b20", "_eof__ign_0xde4b20", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ign_0xde7770", "_eof__ign_0xde7770", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ign_0xde9520", "_eof__ign_0xde9520", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ign_0xdea540", "_eof__ign_0xdea540", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__ign_0xdf7df0", "_eof__ign_0xdf7df0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof___0xde4bc0_DEF_PAT_1", "_eof___0xde4bc0_DEF_PAT_1", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof___0xde7810_DEF_PAT_2", "_eof___0xde7810_DEF_PAT_2", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof___0xde95c0_DEF_PAT_3", "_eof___0xde95c0_DEF_PAT_3", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof___0xdf7e90_DEF_PAT_4", "_eof___0xdf7e90_DEF_PAT_4", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof___accum0", "_eof___accum0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_root_item", "_eof__repeat_root_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_sq_cons_data", "_eof__repeat_sq_cons_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_context_item", "_eof__repeat_context_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_namespace_item", "_eof__repeat_namespace_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_var_def", "_eof__repeat_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_statement", "_eof__repeat_statement", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_field_init", "_eof__repeat_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_litpat_el", "_eof__repeat_litpat_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_pattern_el", "_eof__repeat_pattern_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_lit_cons_el", "_eof__repeat_lit_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_cons_el", "_eof__repeat_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_lit_accum_el", "_eof__repeat_lit_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_accum_el", "_eof__repeat_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_lit_string_el", "_eof__repeat_lit_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__repeat_string_el", "_eof__repeat_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof___list0", "_eof___list0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_any", "_eof__T_any", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_start", "_eof__T_start", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_root_item", "_eof__T_root_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_include", "_eof__T_include", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_precedence_def", "_eof__T_precedence_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_pred_type", "_eof__T_pred_type", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_pred_token_list", "_eof__T_pred_token_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_pred_token", "_eof__T_pred_token", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_pre_eof_def", "_eof__T_pre_eof_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_alias_def", "_eof__T_alias_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_context_item", "_eof__T_context_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_export_def", "_eof__T_export_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_global_def", "_eof__T_global_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_iter_def", "_eof__T_iter_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_reference_type_ref", "_eof__T_reference_type_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_param_var_def_list", "_eof__T_param_var_def_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_param_var_def", "_eof__T_param_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_export", "_eof__T_opt_export", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_function_def", "_eof__T_function_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_context_var_def", "_eof__T_context_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_context_def", "_eof__T_context_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_literal_def", "_eof__T_literal_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_literal_list", "_eof__T_literal_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_literal_item", "_eof__T_literal_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_no_ignore_left", "_eof__T_no_ignore_left", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_no_ignore_right", "_eof__T_no_ignore_right", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_namespace_def", "_eof__T_namespace_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_namespace_item", "_eof__T_namespace_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_obj_var_list", "_eof__T_obj_var_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_reduce_first", "_eof__T_opt_reduce_first", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_cfl_def", "_eof__T_cfl_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_region_def", "_eof__T_region_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_rl_def", "_eof__T_rl_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_lex_expr", "_eof__T_opt_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_token_def", "_eof__T_token_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_ic_def", "_eof__T_ic_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_translate", "_eof__T_opt_translate", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_id", "_eof__T_opt_id", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_ignore_def", "_eof__T_ignore_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_prod_el", "_eof__T_prod_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_prod_el_name", "_eof__T_opt_prod_el_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_prod_el_list", "_eof__T_prod_el_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_commit", "_eof__T_opt_commit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_prod_name", "_eof__T_opt_prod_name", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_prod", "_eof__T_prod", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_reduce", "_eof__T_opt_reduce", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_prod_list", "_eof__T_prod_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_statement", "_eof__T_statement", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_elsif_list", "_eof__T_elsif_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_elsif_clause", "_eof__T_elsif_clause", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_optional_else", "_eof__T_optional_else", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_call_arg_list", "_eof__T_call_arg_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_iter_call", "_eof__T_iter_call", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_block_or_single", "_eof__T_block_or_single", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_require_pattern", "_eof__T_require_pattern", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_require_stmt", "_eof__T_opt_require_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lang_stmt_list", "_eof__T_lang_stmt_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_def_init", "_eof__T_opt_def_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_var_def", "_eof__T_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_print_stmt", "_eof__T_print_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_expr_stmt", "_eof__T_expr_stmt", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_code_expr", "_eof__T_code_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_code_relational", "_eof__T_code_relational", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_code_additive", "_eof__T_code_additive", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_code_multiplicitive", "_eof__T_code_multiplicitive", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_code_unary", "_eof__T_code_unary", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_eos", "_eof__T_opt_eos", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_code_factor", "_eof__T_code_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_type_ref", "_eof__T_type_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_region_qual", "_eof__T_region_qual", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_repeat", "_eof__T_opt_repeat", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_capture", "_eof__T_opt_capture", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_field_init", "_eof__T_opt_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_field_init", "_eof__T_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_label", "_eof__T_opt_label", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_dq_lit_term", "_eof__T_dq_lit_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_sq_lit_term", "_eof__T_sq_lit_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_tilde_data", "_eof__T_opt_tilde_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_pattern_el_lel", "_eof__T_pattern_el_lel", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_pattern_el", "_eof__T_pattern_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_litpat_el", "_eof__T_litpat_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_pattern_top_el", "_eof__T_pattern_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_pattern_list", "_eof__T_pattern_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_pattern", "_eof__T_pattern", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_E1", "_eof__T_E1", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_E2", "_eof__T_E2", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_E3", "_eof__T_E3", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_E4", "_eof__T_E4", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_cons_el", "_eof__T_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lit_cons_el", "_eof__T_lit_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_cons_top_el", "_eof__T_cons_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_cons_list", "_eof__T_cons_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_constructor", "_eof__T_constructor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_accum_el", "_eof__T_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lit_accum_el", "_eof__T_lit_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_accum_top_el", "_eof__T_accum_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_accum_list", "_eof__T_accum_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_accumulate", "_eof__T_accumulate", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_string_el", "_eof__T_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lit_string_el", "_eof__T_lit_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_string_top_el", "_eof__T_string_top_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_string_list", "_eof__T_string_list", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_string", "_eof__T_string", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_var_ref", "_eof__T_var_ref", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_qual", "_eof__T_qual", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_expr", "_eof__T_lex_expr", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_opt_lex_dot", "_eof__T_opt_lex_dot", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_term", "_eof__T_lex_term", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_factor_rep", "_eof__T_lex_factor_rep", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_factor_neg", "_eof__T_lex_factor_neg", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_range_lit", "_eof__T_lex_range_lit", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_num", "_eof__T_lex_num", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_lex_factor", "_eof__T_lex_factor", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_reg_or_data", "_eof__T_reg_or_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T_reg_or_char", "_eof__T_reg_or_char", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T___accum0", "_eof__T___accum0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_root_item", "_eof__T__repeat_root_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_sq_cons_data", "_eof__T__repeat_sq_cons_data", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_context_item", "_eof__T__repeat_context_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_namespace_item", "_eof__T__repeat_namespace_item", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_var_def", "_eof__T__repeat_var_def", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_statement", "_eof__T__repeat_statement", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_field_init", "_eof__T__repeat_field_init", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_litpat_el", "_eof__T__repeat_litpat_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_pattern_el", "_eof__T__repeat_pattern_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_lit_cons_el", "_eof__T__repeat_lit_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_cons_el", "_eof__T__repeat_cons_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_lit_accum_el", "_eof__T__repeat_lit_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_accum_el", "_eof__T__repeat_accum_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_lit_string_el", "_eof__T__repeat_lit_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T__repeat_string_el", "_eof__T__repeat_string_el", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_eof__T___list0", "_eof__T___list0", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "_notoken", "_notoken", 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -1, 0, 0 },
+ { "any", "any", 0, 0, 0, 0, -1, 0, 0, 0, 150, 0, -1, 0, 0 },
+ { "start", "start", 0, 0, 0, 0, -1, 135, 0, 0, 151, 0, -1, 0, 0 },
+ { "root_item", "root_item", 0, 0, 0, 0, -1, 136, 0, 0, 152, 0, -1, 0, 0 },
+ { "include", "include", 0, 0, 0, 0, -1, 137, 0, 0, 153, 0, -1, 0, 0 },
+ { "precedence_def", "precedence_def", 0, 0, 0, 0, -1, 138, 0, 0, 154, 0, -1, 0, 0 },
+ { "pred_type", "pred_type", 0, 0, 0, 0, -1, 139, 0, 0, 155, 0, -1, 0, 0 },
+ { "pred_token_list", "pred_token_list", 0, 0, 0, 0, -1, 140, 0, 0, 156, 0, -1, 0, 0 },
+ { "pred_token", "pred_token", 0, 0, 0, 0, -1, 141, 0, 0, 157, 0, -1, 0, 0 },
+ { "pre_eof_def", "pre_eof_def", 0, 0, 0, 0, -1, 142, 0, 0, 158, 0, -1, 0, 0 },
+ { "alias_def", "alias_def", 0, 0, 0, 0, -1, 143, 0, 0, 159, 0, -1, 0, 0 },
+ { "context_item", "context_item", 0, 0, 0, 0, -1, 144, 0, 0, 160, 0, -1, 0, 0 },
+ { "export_def", "export_def", 0, 0, 0, 0, -1, 145, 0, 0, 161, 0, -1, 0, 0 },
+ { "global_def", "global_def", 0, 0, 0, 0, -1, 146, 0, 0, 162, 0, -1, 0, 0 },
+ { "iter_def", "iter_def", 0, 0, 0, 0, -1, 147, 0, 0, 163, 0, -1, 0, 0 },
+ { "reference_type_ref", "reference_type_ref", 0, 0, 0, 0, -1, 148, 0, 0, 164, 0, -1, 0, 0 },
+ { "param_var_def_list", "param_var_def_list", 0, 0, 0, 0, -1, 149, 0, 0, 165, 0, -1, 0, 0 },
+ { "param_var_def", "param_var_def", 0, 0, 0, 0, -1, 150, 0, 0, 166, 0, -1, 0, 0 },
+ { "opt_export", "opt_export", 0, 0, 0, 0, -1, 151, 0, 0, 167, 0, -1, 0, 0 },
+ { "function_def", "function_def", 0, 0, 0, 0, -1, 152, 0, 0, 168, 0, -1, 0, 0 },
+ { "context_var_def", "context_var_def", 0, 0, 0, 0, -1, 153, 0, 0, 169, 0, -1, 0, 0 },
+ { "context_def", "context_def", 0, 0, 0, 0, -1, 154, 0, 0, 170, 0, -1, 0, 0 },
+ { "literal_def", "literal_def", 0, 0, 0, 0, -1, 155, 0, 0, 171, 0, -1, 0, 0 },
+ { "literal_list", "literal_list", 0, 0, 0, 0, -1, 156, 0, 0, 172, 0, -1, 0, 0 },
+ { "literal_item", "literal_item", 0, 0, 0, 0, -1, 157, 0, 0, 173, 0, -1, 0, 0 },
+ { "no_ignore_left", "no_ignore_left", 0, 0, 0, 0, -1, 158, 0, 0, 174, 0, -1, 0, 0 },
+ { "no_ignore_right", "no_ignore_right", 0, 0, 0, 0, -1, 159, 0, 0, 175, 0, -1, 0, 0 },
+ { "namespace_def", "namespace_def", 0, 0, 0, 0, -1, 160, 0, 0, 176, 0, -1, 0, 0 },
+ { "namespace_item", "namespace_item", 0, 0, 0, 0, -1, 161, 0, 0, 177, 0, -1, 0, 0 },
+ { "obj_var_list", "obj_var_list", 0, 0, 0, 0, -1, 162, 0, 0, 178, 0, -1, 0, 0 },
+ { "opt_reduce_first", "opt_reduce_first", 0, 0, 0, 0, -1, 163, 0, 0, 179, 0, -1, 0, 0 },
+ { "cfl_def", "cfl_def", 0, 0, 0, 0, -1, 164, 0, 0, 180, 0, -1, 0, 0 },
+ { "region_def", "region_def", 0, 0, 0, 0, -1, 165, 0, 0, 181, 0, -1, 0, 0 },
+ { "rl_def", "rl_def", 0, 0, 0, 0, -1, 166, 0, 0, 182, 0, -1, 0, 0 },
+ { "opt_lex_expr", "opt_lex_expr", 0, 0, 0, 0, -1, 167, 0, 0, 183, 0, -1, 0, 0 },
+ { "token_def", "token_def", 0, 0, 0, 0, -1, 168, 0, 0, 184, 0, -1, 0, 0 },
+ { "ic_def", "ic_def", 0, 0, 0, 0, -1, 169, 0, 0, 185, 0, -1, 0, 0 },
+ { "opt_translate", "opt_translate", 0, 0, 0, 0, -1, 170, 0, 0, 186, 0, -1, 0, 0 },
+ { "opt_id", "opt_id", 0, 0, 0, 0, -1, 171, 0, 0, 187, 0, -1, 0, 0 },
+ { "ignore_def", "ignore_def", 0, 0, 0, 0, -1, 172, 0, 0, 188, 0, -1, 0, 0 },
+ { "prod_el", "prod_el", 0, 0, 0, 0, -1, 173, 0, 0, 189, 0, -1, 0, 0 },
+ { "opt_prod_el_name", "opt_prod_el_name", 0, 0, 0, 0, -1, 174, 0, 0, 190, 0, -1, 0, 0 },
+ { "prod_el_list", "prod_el_list", 0, 0, 0, 0, -1, 175, 0, 0, 191, 0, -1, 0, 0 },
+ { "opt_commit", "opt_commit", 0, 0, 0, 0, -1, 176, 0, 0, 192, 0, -1, 0, 0 },
+ { "opt_prod_name", "opt_prod_name", 0, 0, 0, 0, -1, 177, 0, 0, 193, 0, -1, 0, 0 },
+ { "prod", "prod", 0, 0, 0, 0, -1, 178, 0, 0, 194, 0, -1, 0, 0 },
+ { "opt_reduce", "opt_reduce", 0, 0, 0, 0, -1, 179, 0, 0, 195, 0, -1, 0, 0 },
+ { "prod_list", "prod_list", 0, 0, 0, 0, -1, 180, 0, 0, 196, 0, -1, 0, 0 },
+ { "statement", "statement", 0, 0, 0, 0, -1, 181, 0, 0, 197, 0, -1, 0, 0 },
+ { "elsif_list", "elsif_list", 0, 0, 0, 0, -1, 182, 0, 0, 198, 0, -1, 0, 0 },
+ { "elsif_clause", "elsif_clause", 0, 0, 0, 0, -1, 183, 0, 0, 199, 0, -1, 0, 0 },
+ { "optional_else", "optional_else", 0, 0, 0, 0, -1, 184, 0, 0, 200, 0, -1, 0, 0 },
+ { "call_arg_list", "call_arg_list", 0, 0, 0, 0, -1, 185, 0, 0, 201, 0, -1, 0, 0 },
+ { "iter_call", "iter_call", 0, 0, 0, 0, -1, 186, 0, 0, 202, 0, -1, 0, 0 },
+ { "block_or_single", "block_or_single", 0, 0, 0, 0, -1, 187, 0, 0, 203, 0, -1, 0, 0 },
+ { "require_pattern", "require_pattern", 0, 0, 0, 0, -1, 188, 0, 0, 204, 0, -1, 0, 0 },
+ { "opt_require_stmt", "opt_require_stmt", 0, 0, 0, 0, -1, 189, 0, 0, 205, 0, -1, 0, 0 },
+ { "lang_stmt_list", "lang_stmt_list", 0, 0, 0, 0, -1, 190, 0, 0, 206, 0, -1, 0, 0 },
+ { "opt_def_init", "opt_def_init", 0, 0, 0, 0, -1, 191, 0, 0, 207, 0, -1, 0, 0 },
+ { "var_def", "var_def", 0, 0, 0, 0, -1, 192, 0, 0, 208, 0, -1, 0, 0 },
+ { "print_stmt", "print_stmt", 0, 0, 0, 0, -1, 193, 0, 0, 209, 0, -1, 0, 0 },
+ { "expr_stmt", "expr_stmt", 0, 0, 0, 0, -1, 194, 0, 0, 210, 0, -1, 0, 0 },
+ { "code_expr", "code_expr", 0, 0, 0, 0, -1, 195, 0, 0, 211, 0, -1, 0, 0 },
+ { "code_relational", "code_relational", 0, 0, 0, 0, -1, 196, 0, 0, 212, 0, -1, 0, 0 },
+ { "code_additive", "code_additive", 0, 0, 0, 0, -1, 197, 0, 0, 213, 0, -1, 0, 0 },
+ { "code_multiplicitive", "code_multiplicitive", 0, 0, 0, 0, -1, 198, 0, 0, 214, 0, -1, 0, 0 },
+ { "code_unary", "code_unary", 0, 0, 0, 0, -1, 199, 0, 0, 215, 0, -1, 0, 0 },
+ { "opt_eos", "opt_eos", 0, 0, 0, 0, -1, 200, 0, 0, 216, 0, -1, 0, 0 },
+ { "code_factor", "code_factor", 0, 0, 0, 0, -1, 201, 0, 0, 217, 0, -1, 0, 0 },
+ { "type_ref", "type_ref", 0, 0, 0, 0, -1, 202, 0, 0, 218, 0, -1, 0, 0 },
+ { "region_qual", "region_qual", 0, 0, 0, 0, -1, 203, 0, 0, 219, 0, -1, 0, 0 },
+ { "opt_repeat", "opt_repeat", 0, 0, 0, 0, -1, 204, 0, 0, 220, 0, -1, 0, 0 },
+ { "opt_capture", "opt_capture", 0, 0, 0, 0, -1, 205, 0, 0, 221, 0, -1, 0, 0 },
+ { "opt_field_init", "opt_field_init", 0, 0, 0, 0, -1, 206, 0, 0, 222, 0, -1, 0, 0 },
+ { "field_init", "field_init", 0, 0, 0, 0, -1, 207, 0, 0, 223, 0, -1, 0, 0 },
+ { "opt_label", "opt_label", 0, 0, 0, 0, -1, 208, 0, 0, 224, 0, -1, 0, 0 },
+ { "dq_lit_term", "dq_lit_term", 0, 0, 0, 0, -1, 209, 0, 0, 225, 0, -1, 0, 0 },
+ { "sq_lit_term", "sq_lit_term", 0, 0, 0, 0, -1, 210, 0, 0, 226, 0, -1, 0, 0 },
+ { "opt_tilde_data", "opt_tilde_data", 0, 0, 0, 0, -1, 211, 0, 0, 227, 0, -1, 0, 0 },
+ { "pattern_el_lel", "pattern_el_lel", 0, 0, 0, 0, -1, 212, 0, 0, 228, 0, -1, 0, 0 },
+ { "pattern_el", "pattern_el", 0, 0, 0, 0, -1, 213, 0, 0, 229, 0, -1, 0, 0 },
+ { "litpat_el", "litpat_el", 0, 0, 0, 0, -1, 214, 0, 0, 230, 0, -1, 0, 0 },
+ { "pattern_top_el", "pattern_top_el", 0, 0, 0, 0, -1, 215, 0, 0, 231, 0, -1, 0, 0 },
+ { "pattern_list", "pattern_list", 0, 0, 0, 0, -1, 216, 0, 0, 232, 0, -1, 0, 0 },
+ { "pattern", "pattern", 0, 0, 0, 0, -1, 217, 0, 0, 233, 0, -1, 0, 0 },
+ { "E1", "E1", 0, 0, 0, 0, -1, 218, 0, 0, 234, 0, -1, 0, 0 },
+ { "E2", "E2", 0, 0, 0, 0, -1, 219, 0, 0, 235, 0, -1, 0, 0 },
+ { "E3", "E3", 0, 0, 0, 0, -1, 220, 0, 0, 236, 0, -1, 0, 0 },
+ { "E4", "E4", 0, 0, 0, 0, -1, 221, 0, 0, 237, 0, -1, 0, 0 },
+ { "cons_el", "cons_el", 0, 0, 0, 0, -1, 222, 0, 0, 238, 0, -1, 0, 0 },
+ { "lit_cons_el", "lit_cons_el", 0, 0, 0, 0, -1, 223, 0, 0, 239, 0, -1, 0, 0 },
+ { "cons_top_el", "cons_top_el", 0, 0, 0, 0, -1, 224, 0, 0, 240, 0, -1, 0, 0 },
+ { "cons_list", "cons_list", 0, 0, 0, 0, -1, 225, 0, 0, 241, 0, -1, 0, 0 },
+ { "constructor", "constructor", 0, 0, 0, 0, -1, 226, 0, 0, 242, 0, -1, 0, 0 },
+ { "accum_el", "accum_el", 0, 0, 0, 0, -1, 227, 0, 0, 243, 0, -1, 0, 0 },
+ { "lit_accum_el", "lit_accum_el", 0, 0, 0, 0, -1, 228, 0, 0, 244, 0, -1, 0, 0 },
+ { "accum_top_el", "accum_top_el", 0, 0, 0, 0, -1, 229, 0, 0, 245, 0, -1, 0, 0 },
+ { "accum_list", "accum_list", 0, 0, 0, 0, -1, 230, 0, 0, 246, 0, -1, 0, 0 },
+ { "accumulate", "accumulate", 0, 0, 0, 0, -1, 231, 0, 0, 247, 0, -1, 0, 0 },
+ { "string_el", "string_el", 0, 0, 0, 0, -1, 232, 0, 0, 248, 0, -1, 0, 0 },
+ { "lit_string_el", "lit_string_el", 0, 0, 0, 0, -1, 233, 0, 0, 249, 0, -1, 0, 0 },
+ { "string_top_el", "string_top_el", 0, 0, 0, 0, -1, 234, 0, 0, 250, 0, -1, 0, 0 },
+ { "string_list", "string_list", 0, 0, 0, 0, -1, 235, 0, 0, 251, 0, -1, 0, 0 },
+ { "string", "string", 0, 0, 0, 0, -1, 236, 0, 0, 252, 0, -1, 0, 0 },
+ { "var_ref", "var_ref", 0, 0, 0, 0, -1, 237, 0, 0, 253, 0, -1, 0, 0 },
+ { "qual", "qual", 0, 0, 0, 0, -1, 238, 0, 0, 254, 0, -1, 0, 0 },
+ { "lex_expr", "lex_expr", 0, 0, 0, 0, -1, 239, 0, 0, 255, 0, -1, 0, 0 },
+ { "opt_lex_dot", "opt_lex_dot", 0, 0, 0, 0, -1, 240, 0, 0, 256, 0, -1, 0, 0 },
+ { "lex_term", "lex_term", 0, 0, 0, 0, -1, 241, 0, 0, 257, 0, -1, 0, 0 },
+ { "lex_factor_rep", "lex_factor_rep", 0, 0, 0, 0, -1, 242, 0, 0, 258, 0, -1, 0, 0 },
+ { "lex_factor_neg", "lex_factor_neg", 0, 0, 0, 0, -1, 243, 0, 0, 259, 0, -1, 0, 0 },
+ { "lex_range_lit", "lex_range_lit", 0, 0, 0, 0, -1, 244, 0, 0, 260, 0, -1, 0, 0 },
+ { "lex_num", "lex_num", 0, 0, 0, 0, -1, 245, 0, 0, 261, 0, -1, 0, 0 },
+ { "lex_factor", "lex_factor", 0, 0, 0, 0, -1, 246, 0, 0, 262, 0, -1, 0, 0 },
+ { "reg_or_data", "reg_or_data", 0, 0, 0, 0, -1, 247, 0, 0, 263, 0, -1, 0, 0 },
+ { "reg_or_char", "reg_or_char", 0, 0, 0, 0, -1, 248, 0, 0, 264, 0, -1, 0, 0 },
+ { "__accum0", "__accum0", 0, 0, 0, 0, -1, 252, 0, 0, 265, 1, -1, 0, 0 },
+ { "_repeat_root_item", "_repeat_root_item", 1, 0, 0, 0, -1, 0, 0, 0, 266, 0, -1, 0, 0 },
+ { "_repeat_sq_cons_data", "_repeat_sq_cons_data", 1, 0, 0, 0, -1, 0, 0, 0, 267, 0, -1, 0, 0 },
+ { "_repeat_context_item", "_repeat_context_item", 1, 0, 0, 0, -1, 0, 0, 0, 268, 0, -1, 0, 0 },
+ { "_repeat_namespace_item", "_repeat_namespace_item", 1, 0, 0, 0, -1, 0, 0, 0, 269, 0, -1, 0, 0 },
+ { "_repeat_var_def", "_repeat_var_def", 1, 0, 0, 0, -1, 0, 0, 0, 270, 0, -1, 0, 0 },
+ { "_repeat_statement", "_repeat_statement", 1, 0, 0, 0, -1, 0, 0, 0, 271, 0, -1, 0, 0 },
+ { "_repeat_field_init", "_repeat_field_init", 1, 0, 0, 0, -1, 0, 0, 0, 272, 0, -1, 0, 0 },
+ { "_repeat_litpat_el", "_repeat_litpat_el", 1, 0, 0, 0, -1, 0, 0, 0, 273, 0, -1, 0, 0 },
+ { "_repeat_pattern_el", "_repeat_pattern_el", 1, 0, 0, 0, -1, 0, 0, 0, 274, 0, -1, 0, 0 },
+ { "_repeat_lit_cons_el", "_repeat_lit_cons_el", 1, 0, 0, 0, -1, 0, 0, 0, 275, 0, -1, 0, 0 },
+ { "_repeat_cons_el", "_repeat_cons_el", 1, 0, 0, 0, -1, 0, 0, 0, 276, 0, -1, 0, 0 },
+ { "_repeat_lit_accum_el", "_repeat_lit_accum_el", 1, 0, 0, 0, -1, 0, 0, 0, 277, 0, -1, 0, 0 },
+ { "_repeat_accum_el", "_repeat_accum_el", 1, 0, 0, 0, -1, 0, 0, 0, 278, 0, -1, 0, 0 },
+ { "_repeat_lit_string_el", "_repeat_lit_string_el", 1, 0, 0, 0, -1, 0, 0, 0, 279, 0, -1, 0, 0 },
+ { "_repeat_string_el", "_repeat_string_el", 1, 0, 0, 0, -1, 0, 0, 0, 280, 0, -1, 0, 0 },
+ { "__list0", "__list0", 0, 0, 0, 0, -1, 253, 0, 0, 281, 2, -1, 0, 0 },
+ { "_root", "_root", 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0 }
+};
+
+static FrameInfo parser_frameInfo[] = {
+ { 0, 0, 0, 0, locals_0, 1, 0, 1 }
+};
+
+static ProdInfo parser_prodInfo[] = {
+ { 697, 0, 1, "start-1", -1, 1, copy_0, 1, },
+ { 698, 0, 1, "root_item-1", -1, 1, copy_1, 1, },
+ { 698, 1, 1, "root_item-2", -1, 1, copy_2, 1, },
+ { 698, 2, 1, "root_item-3", -1, 1, copy_3, 1, },
+ { 698, 3, 1, "root_item-4", -1, 1, copy_4, 1, },
+ { 698, 4, 1, "root_item-5", -1, 1, copy_5, 1, },
+ { 698, 5, 1, "root_item-6", -1, 1, copy_6, 1, },
+ { 698, 6, 1, "root_item-7", -1, 1, copy_7, 1, },
+ { 698, 7, 1, "root_item-8", -1, 1, copy_8, 1, },
+ { 698, 8, 1, "root_item-9", -1, 1, copy_9, 1, },
+ { 698, 9, 1, "root_item-10", -1, 1, copy_10, 1, },
+ { 698, 10, 1, "root_item-11", -1, 1, copy_11, 1, },
+ { 698, 11, 1, "root_item-12", -1, 1, copy_12, 1, },
+ { 698, 12, 1, "root_item-13", -1, 1, copy_13, 1, },
+ { 698, 13, 1, "root_item-14", -1, 1, copy_14, 1, },
+ { 698, 14, 1, "root_item-15", -1, 1, copy_15, 1, },
+ { 698, 15, 1, "root_item-16", -1, 1, copy_16, 1, },
+ { 698, 16, 1, "root_item-17", -1, 1, copy_17, 1, },
+ { 698, 17, 1, "root_item-18", -1, 1, copy_18, 1, },
+ { 699, 0, 4, "include-1", -1, 1, copy_19, 4, },
+ { 700, 0, 2, "precedence_def-1", -1, 1, copy_20, 2, },
+ { 701, 0, 1, "pred_type-1", -1, 1, copy_21, 1, },
+ { 701, 1, 1, "pred_type-2", -1, 1, copy_22, 1, },
+ { 701, 2, 1, "pred_type-3", -1, 1, copy_23, 1, },
+ { 702, 0, 3, "pred_token_list-1", -1, 1, copy_24, 3, },
+ { 702, 1, 1, "pred_token_list-2", -1, 1, copy_25, 1, },
+ { 703, 0, 2, "pred_token-1", -1, 1, copy_26, 2, },
+ { 703, 1, 2, "pred_token-2", -1, 1, copy_27, 2, },
+ { 704, 0, 4, "pre_eof_def-1", -1, 1, copy_28, 4, },
+ { 705, 0, 3, "alias_def-1", -1, 1, copy_29, 3, },
+ { 706, 0, 1, "context_item-1", -1, 1, copy_30, 1, },
+ { 706, 1, 1, "context_item-2", -1, 1, copy_31, 1, },
+ { 706, 2, 1, "context_item-3", -1, 1, copy_32, 1, },
+ { 706, 3, 1, "context_item-4", -1, 1, copy_33, 1, },
+ { 706, 4, 1, "context_item-5", -1, 1, copy_34, 1, },
+ { 706, 5, 1, "context_item-6", -1, 1, copy_35, 1, },
+ { 706, 6, 1, "context_item-7", -1, 1, copy_36, 1, },
+ { 706, 7, 1, "context_item-8", -1, 1, copy_37, 1, },
+ { 706, 8, 1, "context_item-9", -1, 1, copy_38, 1, },
+ { 706, 9, 1, "context_item-10", -1, 1, copy_39, 1, },
+ { 706, 10, 1, "context_item-11", -1, 1, copy_40, 1, },
+ { 706, 11, 1, "context_item-12", -1, 1, copy_41, 1, },
+ { 706, 12, 1, "context_item-13", -1, 1, copy_42, 1, },
+ { 706, 13, 1, "context_item-14", -1, 1, copy_43, 1, },
+ { 707, 0, 3, "export_def-1", -1, 1, copy_44, 3, },
+ { 708, 0, 3, "global_def-1", -1, 1, copy_45, 3, },
+ { 709, 0, 8, "iter_def-1", -1, 1, copy_46, 8, },
+ { 710, 0, 4, "reference_type_ref-1", -1, 1, copy_47, 4, },
+ { 711, 0, 2, "param_var_def_list-1", -1, 1, copy_48, 2, },
+ { 711, 1, 0, "param_var_def_list-2", -1, 1, 0, 0, },
+ { 712, 0, 3, "param_var_def-1", -1, 1, copy_50, 3, },
+ { 712, 1, 3, "param_var_def-2", -1, 1, copy_51, 3, },
+ { 713, 0, 1, "opt_export-1", -1, 1, copy_52, 1, },
+ { 713, 1, 0, "opt_export-2", -1, 1, 0, 0, },
+ { 714, 0, 9, "function_def-1", -1, 1, copy_54, 9, },
+ { 715, 0, 1, "context_var_def-1", -1, 1, copy_55, 1, },
+ { 716, 0, 4, "context_def-1", -1, 1, copy_56, 4, },
+ { 717, 0, 2, "literal_def-1", -1, 1, copy_57, 2, },
+ { 718, 0, 2, "literal_list-1", -1, 1, copy_58, 2, },
+ { 718, 1, 1, "literal_list-2", -1, 1, copy_59, 1, },
+ { 719, 0, 3, "literal_item-1", -1, 1, copy_60, 3, },
+ { 720, 0, 2, "no_ignore_left-1", -1, 1, copy_61, 2, },
+ { 720, 1, 0, "no_ignore_left-2", -1, 1, 0, 0, },
+ { 721, 0, 2, "no_ignore_right-1", -1, 1, copy_63, 2, },
+ { 721, 1, 0, "no_ignore_right-2", -1, 1, 0, 0, },
+ { 722, 0, 4, "namespace_def-1", -1, 1, copy_65, 4, },
+ { 723, 0, 1, "namespace_item-1", -1, 1, copy_66, 1, },
+ { 723, 1, 1, "namespace_item-2", -1, 1, copy_67, 1, },
+ { 723, 2, 1, "namespace_item-3", -1, 1, copy_68, 1, },
+ { 723, 3, 1, "namespace_item-4", -1, 1, copy_69, 1, },
+ { 723, 4, 1, "namespace_item-5", -1, 1, copy_70, 1, },
+ { 723, 5, 1, "namespace_item-6", -1, 1, copy_71, 1, },
+ { 723, 6, 1, "namespace_item-7", -1, 1, copy_72, 1, },
+ { 723, 7, 1, "namespace_item-8", -1, 1, copy_73, 1, },
+ { 723, 8, 1, "namespace_item-9", -1, 1, copy_74, 1, },
+ { 723, 9, 1, "namespace_item-10", -1, 1, copy_75, 1, },
+ { 723, 10, 1, "namespace_item-11", -1, 1, copy_76, 1, },
+ { 723, 11, 1, "namespace_item-12", -1, 1, copy_77, 1, },
+ { 723, 12, 1, "namespace_item-13", -1, 1, copy_78, 1, },
+ { 723, 13, 1, "namespace_item-14", -1, 1, copy_79, 1, },
+ { 723, 14, 1, "namespace_item-15", -1, 1, copy_80, 1, },
+ { 724, 0, 0, "obj_var_list-1", -1, 1, 0, 0, },
+ { 725, 0, 1, "opt_reduce_first-1", -1, 1, copy_82, 1, },
+ { 725, 1, 0, "opt_reduce_first-2", -1, 1, 0, 0, },
+ { 726, 0, 5, "cfl_def-1", -1, 1, copy_84, 5, },
+ { 727, 0, 3, "region_def-1", -1, 1, copy_85, 3, },
+ { 728, 0, 5, "rl_def-1", -1, 1, copy_86, 5, },
+ { 729, 0, 1, "opt_lex_expr-1", -1, 1, copy_87, 1, },
+ { 729, 1, 0, "opt_lex_expr-2", -1, 1, 0, 0, },
+ { 730, 0, 9, "token_def-1", -1, 1, copy_89, 9, },
+ { 731, 0, 3, "ic_def-1", -1, 1, copy_90, 3, },
+ { 732, 0, 3, "opt_translate-1", -1, 1, copy_91, 3, },
+ { 732, 1, 0, "opt_translate-2", -1, 1, 0, 0, },
+ { 733, 0, 1, "opt_id-1", -1, 1, copy_93, 1, },
+ { 733, 1, 0, "opt_id-2", -1, 1, 0, 0, },
+ { 734, 0, 5, "ignore_def-1", -1, 1, copy_95, 5, },
+ { 735, 0, 4, "prod_el-1", -1, 1, copy_96, 4, },
+ { 735, 1, 4, "prod_el-2", -1, 1, copy_97, 4, },
+ { 736, 0, 2, "opt_prod_el_name-1", -1, 1, copy_98, 2, },
+ { 736, 1, 0, "opt_prod_el_name-2", -1, 1, 0, 0, },
+ { 737, 0, 2, "prod_el_list-1", -1, 1, copy_100, 2, },
+ { 737, 1, 0, "prod_el_list-2", -1, 1, 0, 0, },
+ { 738, 0, 1, "opt_commit-1", -1, 1, copy_102, 1, },
+ { 738, 1, 0, "opt_commit-2", -1, 1, 0, 0, },
+ { 739, 0, 2, "opt_prod_name-1", -1, 1, copy_104, 2, },
+ { 739, 1, 0, "opt_prod_name-2", -1, 1, 0, 0, },
+ { 740, 0, 6, "prod-1", -1, 1, copy_106, 6, },
+ { 741, 0, 3, "opt_reduce-1", -1, 1, copy_107, 3, },
+ { 741, 1, 0, "opt_reduce-2", -1, 1, 0, 0, },
+ { 742, 0, 3, "prod_list-1", -1, 1, copy_109, 3, },
+ { 742, 1, 1, "prod_list-2", -1, 1, copy_110, 1, },
+ { 743, 0, 1, "statement-1", -1, 1, copy_111, 1, },
+ { 743, 1, 1, "statement-2", -1, 1, copy_112, 1, },
+ { 743, 2, 2, "statement-3", -1, 1, copy_113, 2, },
+ { 743, 3, 7, "statement-4", -1, 1, copy_114, 7, },
+ { 743, 4, 4, "statement-5", -1, 1, copy_115, 4, },
+ { 743, 5, 3, "statement-6", -1, 1, copy_116, 3, },
+ { 743, 6, 3, "statement-7", -1, 1, copy_117, 3, },
+ { 743, 7, 2, "statement-8", -1, 1, copy_118, 2, },
+ { 743, 8, 2, "statement-9", -1, 1, copy_119, 2, },
+ { 743, 9, 1, "statement-10", -1, 1, copy_120, 1, },
+ { 743, 10, 1, "statement-11", -1, 1, copy_121, 1, },
+ { 744, 0, 2, "elsif_list-1", -1, 1, copy_122, 2, },
+ { 744, 1, 1, "elsif_list-2", -1, 1, copy_123, 1, },
+ { 745, 0, 3, "elsif_clause-1", -1, 1, copy_124, 3, },
+ { 746, 0, 2, "optional_else-1", -1, 1, copy_125, 2, },
+ { 746, 1, 0, "optional_else-2", -1, 1, 0, 0, },
+ { 747, 0, 2, "call_arg_list-1", -1, 1, copy_127, 2, },
+ { 747, 1, 0, "call_arg_list-2", -1, 1, 0, 0, },
+ { 748, 0, 5, "iter_call-1", -1, 1, copy_129, 5, },
+ { 748, 1, 2, "iter_call-2", -1, 1, copy_130, 2, },
+ { 748, 2, 2, "iter_call-3", -1, 1, copy_131, 2, },
+ { 749, 0, 3, "block_or_single-1", -1, 1, copy_132, 3, },
+ { 749, 1, 1, "block_or_single-2", -1, 1, copy_133, 1, },
+ { 750, 0, 3, "require_pattern-1", -1, 1, copy_134, 3, },
+ { 751, 0, 2, "opt_require_stmt-1", -1, 1, copy_135, 2, },
+ { 751, 1, 0, "opt_require_stmt-2", -1, 1, 0, 0, },
+ { 752, 0, 2, "lang_stmt_list-1", -1, 1, copy_137, 2, },
+ { 753, 0, 2, "opt_def_init-1", -1, 1, copy_138, 2, },
+ { 753, 1, 0, "opt_def_init-2", -1, 1, 0, 0, },
+ { 754, 0, 3, "var_def-1", -1, 1, copy_140, 3, },
+ { 755, 0, 4, "print_stmt-1", -1, 1, copy_141, 4, },
+ { 755, 1, 4, "print_stmt-2", -1, 1, copy_142, 4, },
+ { 755, 2, 4, "print_stmt-3", -1, 1, copy_143, 4, },
+ { 755, 3, 4, "print_stmt-4", -1, 1, copy_144, 4, },
+ { 756, 0, 1, "expr_stmt-1", -1, 1, copy_145, 1, },
+ { 757, 0, 3, "code_expr-1", -1, 1, copy_146, 3, },
+ { 757, 1, 3, "code_expr-2", -1, 1, copy_147, 3, },
+ { 757, 2, 1, "code_expr-3", -1, 1, copy_148, 1, },
+ { 758, 0, 3, "code_relational-1", -1, 1, copy_149, 3, },
+ { 758, 1, 3, "code_relational-2", -1, 1, copy_150, 3, },
+ { 758, 2, 3, "code_relational-3", -1, 1, copy_151, 3, },
+ { 758, 3, 3, "code_relational-4", -1, 1, copy_152, 3, },
+ { 758, 4, 3, "code_relational-5", -1, 1, copy_153, 3, },
+ { 758, 5, 3, "code_relational-6", -1, 1, copy_154, 3, },
+ { 758, 6, 1, "code_relational-7", -1, 1, copy_155, 1, },
+ { 759, 0, 3, "code_additive-1", -1, 1, copy_156, 3, },
+ { 759, 1, 3, "code_additive-2", -1, 1, copy_157, 3, },
+ { 759, 2, 1, "code_additive-3", -1, 1, copy_158, 1, },
+ { 760, 0, 3, "code_multiplicitive-1", -1, 1, copy_159, 3, },
+ { 760, 1, 3, "code_multiplicitive-2", -1, 1, copy_160, 3, },
+ { 760, 2, 1, "code_multiplicitive-3", -1, 1, copy_161, 1, },
+ { 761, 0, 2, "code_unary-1", -1, 1, copy_162, 2, },
+ { 761, 1, 2, "code_unary-2", -1, 1, copy_163, 2, },
+ { 761, 2, 2, "code_unary-3", -1, 1, copy_164, 2, },
+ { 761, 3, 2, "code_unary-4", -1, 1, copy_165, 2, },
+ { 761, 4, 1, "code_unary-5", -1, 1, copy_166, 1, },
+ { 762, 0, 1, "opt_eos-1", -1, 1, copy_167, 1, },
+ { 762, 1, 1, "opt_eos-2", -1, 1, copy_168, 1, },
+ { 762, 2, 0, "opt_eos-3", -1, 1, 0, 0, },
+ { 763, 0, 1, "code_factor-1", -1, 1, copy_170, 1, },
+ { 763, 1, 4, "code_factor-2", -1, 1, copy_171, 4, },
+ { 763, 2, 1, "code_factor-3", -1, 1, copy_172, 1, },
+ { 763, 3, 1, "code_factor-4", -1, 1, copy_173, 1, },
+ { 763, 4, 1, "code_factor-5", -1, 1, copy_174, 1, },
+ { 763, 5, 1, "code_factor-6", -1, 1, copy_175, 1, },
+ { 763, 6, 3, "code_factor-7", -1, 1, copy_176, 3, },
+ { 763, 7, 4, "code_factor-8", -1, 1, copy_177, 4, },
+ { 763, 8, 5, "code_factor-9", -1, 1, copy_178, 5, },
+ { 763, 9, 5, "code_factor-10", -1, 1, copy_179, 5, },
+ { 763, 10, 5, "code_factor-11", -1, 1, copy_180, 5, },
+ { 763, 11, 3, "code_factor-12", -1, 1, copy_181, 3, },
+ { 763, 12, 1, "code_factor-13", -1, 1, copy_182, 1, },
+ { 763, 13, 3, "code_factor-14", -1, 1, copy_183, 3, },
+ { 763, 14, 4, "code_factor-15", -1, 1, copy_184, 4, },
+ { 763, 15, 4, "code_factor-16", -1, 1, copy_185, 4, },
+ { 763, 16, 4, "code_factor-17", -1, 1, copy_186, 4, },
+ { 763, 17, 2, "code_factor-18", -1, 1, copy_187, 2, },
+ { 763, 18, 5, "code_factor-19", -1, 1, copy_188, 5, },
+ { 764, 0, 3, "type_ref-1", -1, 1, copy_189, 3, },
+ { 764, 1, 6, "type_ref-2", -1, 1, copy_190, 6, },
+ { 764, 2, 5, "type_ref-3", -1, 1, copy_191, 5, },
+ { 764, 3, 4, "type_ref-4", -1, 1, copy_192, 4, },
+ { 764, 4, 4, "type_ref-5", -1, 1, copy_193, 4, },
+ { 764, 5, 4, "type_ref-6", -1, 1, copy_194, 4, },
+ { 765, 0, 3, "region_qual-1", -1, 1, copy_195, 3, },
+ { 765, 1, 0, "region_qual-2", -1, 1, 0, 0, },
+ { 766, 0, 1, "opt_repeat-1", -1, 1, copy_197, 1, },
+ { 766, 1, 1, "opt_repeat-2", -1, 1, copy_198, 1, },
+ { 766, 2, 1, "opt_repeat-3", -1, 1, copy_199, 1, },
+ { 766, 3, 0, "opt_repeat-4", -1, 1, 0, 0, },
+ { 767, 0, 2, "opt_capture-1", -1, 1, copy_201, 2, },
+ { 767, 1, 0, "opt_capture-2", -1, 1, 0, 0, },
+ { 768, 0, 3, "opt_field_init-1", -1, 1, copy_203, 3, },
+ { 768, 1, 0, "opt_field_init-2", -1, 1, 0, 0, },
+ { 769, 0, 1, "field_init-1", -1, 1, copy_205, 1, },
+ { 770, 0, 2, "opt_label-1", -1, 1, copy_206, 2, },
+ { 770, 1, 0, "opt_label-2", -1, 1, 0, 0, },
+ { 771, 0, 1, "dq_lit_term-1", -1, 1, copy_208, 1, },
+ { 771, 1, 1, "dq_lit_term-2", -1, 1, copy_209, 1, },
+ { 772, 0, 1, "sq_lit_term-1", -1, 1, copy_210, 1, },
+ { 772, 1, 1, "sq_lit_term-2", -1, 1, copy_211, 1, },
+ { 773, 0, 1, "opt_tilde_data-1", -1, 1, copy_212, 1, },
+ { 773, 1, 0, "opt_tilde_data-2", -1, 1, 0, 0, },
+ { 774, 0, 3, "pattern_el_lel-1", -1, 1, copy_214, 3, },
+ { 774, 1, 3, "pattern_el_lel-2", -1, 1, copy_215, 3, },
+ { 775, 0, 2, "pattern_el-1", -1, 1, copy_216, 2, },
+ { 775, 1, 3, "pattern_el-2", -1, 1, copy_217, 3, },
+ { 775, 2, 3, "pattern_el-3", -1, 1, copy_218, 3, },
+ { 775, 3, 3, "pattern_el-4", -1, 1, copy_219, 3, },
+ { 776, 0, 1, "litpat_el-1", -1, 1, copy_220, 1, },
+ { 776, 1, 3, "litpat_el-2", -1, 1, copy_221, 3, },
+ { 777, 0, 3, "pattern_top_el-1", -1, 1, copy_222, 3, },
+ { 777, 1, 3, "pattern_top_el-2", -1, 1, copy_223, 3, },
+ { 777, 2, 3, "pattern_top_el-3", -1, 1, copy_224, 3, },
+ { 777, 3, 3, "pattern_top_el-4", -1, 1, copy_225, 3, },
+ { 778, 0, 2, "pattern_list-1", -1, 1, copy_226, 2, },
+ { 778, 1, 1, "pattern_list-2", -1, 1, copy_227, 1, },
+ { 779, 0, 1, "pattern-1", -1, 1, copy_228, 1, },
+ { 780, 0, 0, "E1-1", -1, 1, 0, 0, },
+ { 781, 0, 0, "E2-1", -1, 1, 0, 0, },
+ { 782, 0, 0, "E3-1", -1, 1, 0, 0, },
+ { 783, 0, 0, "E4-1", -1, 1, 0, 0, },
+ { 784, 0, 3, "cons_el-1", -1, 1, copy_233, 3, },
+ { 784, 1, 4, "cons_el-2", -1, 1, copy_234, 4, },
+ { 784, 2, 4, "cons_el-3", -1, 1, copy_235, 4, },
+ { 784, 3, 4, "cons_el-4", -1, 1, copy_236, 4, },
+ { 784, 4, 2, "cons_el-5", -1, 1, copy_237, 2, },
+ { 785, 0, 1, "lit_cons_el-1", -1, 1, copy_238, 1, },
+ { 785, 1, 3, "lit_cons_el-2", -1, 1, copy_239, 3, },
+ { 786, 0, 3, "cons_top_el-1", -1, 1, copy_240, 3, },
+ { 786, 1, 3, "cons_top_el-2", -1, 1, copy_241, 3, },
+ { 786, 2, 3, "cons_top_el-3", -1, 1, copy_242, 3, },
+ { 786, 3, 3, "cons_top_el-4", -1, 1, copy_243, 3, },
+ { 787, 0, 2, "cons_list-1", -1, 1, copy_244, 2, },
+ { 787, 1, 1, "cons_list-2", -1, 1, copy_245, 1, },
+ { 788, 0, 1, "constructor-1", -1, 1, copy_246, 1, },
+ { 789, 0, 4, "accum_el-1", -1, 1, copy_247, 4, },
+ { 789, 1, 4, "accum_el-2", -1, 1, copy_248, 4, },
+ { 789, 2, 4, "accum_el-3", -1, 1, copy_249, 4, },
+ { 789, 3, 2, "accum_el-4", -1, 1, copy_250, 2, },
+ { 790, 0, 1, "lit_accum_el-1", -1, 1, copy_251, 1, },
+ { 790, 1, 3, "lit_accum_el-2", -1, 1, copy_252, 3, },
+ { 791, 0, 3, "accum_top_el-1", -1, 1, copy_253, 3, },
+ { 791, 1, 3, "accum_top_el-2", -1, 1, copy_254, 3, },
+ { 791, 2, 3, "accum_top_el-3", -1, 1, copy_255, 3, },
+ { 791, 3, 3, "accum_top_el-4", -1, 1, copy_256, 3, },
+ { 792, 0, 2, "accum_list-1", -1, 1, copy_257, 2, },
+ { 792, 1, 1, "accum_list-2", -1, 1, copy_258, 1, },
+ { 793, 0, 1, "accumulate-1", -1, 1, copy_259, 1, },
+ { 794, 0, 4, "string_el-1", -1, 1, copy_260, 4, },
+ { 794, 1, 4, "string_el-2", -1, 1, copy_261, 4, },
+ { 794, 2, 4, "string_el-3", -1, 1, copy_262, 4, },
+ { 794, 3, 2, "string_el-4", -1, 1, copy_263, 2, },
+ { 795, 0, 1, "lit_string_el-1", -1, 1, copy_264, 1, },
+ { 795, 1, 3, "lit_string_el-2", -1, 1, copy_265, 3, },
+ { 796, 0, 3, "string_top_el-1", -1, 1, copy_266, 3, },
+ { 796, 1, 3, "string_top_el-2", -1, 1, copy_267, 3, },
+ { 796, 2, 3, "string_top_el-3", -1, 1, copy_268, 3, },
+ { 796, 3, 3, "string_top_el-4", -1, 1, copy_269, 3, },
+ { 797, 0, 2, "string_list-1", -1, 1, copy_270, 2, },
+ { 797, 1, 1, "string_list-2", -1, 1, copy_271, 1, },
+ { 798, 0, 1, "string-1", -1, 1, copy_272, 1, },
+ { 799, 0, 2, "var_ref-1", -1, 1, copy_273, 2, },
+ { 800, 0, 3, "qual-1", -1, 1, copy_274, 3, },
+ { 800, 1, 3, "qual-2", -1, 1, copy_275, 3, },
+ { 800, 2, 0, "qual-3", -1, 1, 0, 0, },
+ { 801, 0, 3, "lex_expr-1", -1, 1, copy_277, 3, },
+ { 801, 1, 3, "lex_expr-2", -1, 1, copy_278, 3, },
+ { 801, 2, 3, "lex_expr-3", -1, 1, copy_279, 3, },
+ { 801, 3, 3, "lex_expr-4", -1, 1, copy_280, 3, },
+ { 801, 4, 1, "lex_expr-5", -1, 1, copy_281, 1, },
+ { 802, 0, 1, "opt_lex_dot-1", -1, 1, copy_282, 1, },
+ { 802, 1, 0, "opt_lex_dot-2", -1, 1, 0, 0, },
+ { 803, 0, 3, "lex_term-1", -1, 1, copy_284, 3, },
+ { 803, 1, 3, "lex_term-2", -1, 1, copy_285, 3, },
+ { 803, 2, 3, "lex_term-3", -1, 1, copy_286, 3, },
+ { 803, 3, 3, "lex_term-4", -1, 1, copy_287, 3, },
+ { 803, 4, 1, "lex_term-5", -1, 1, copy_288, 1, },
+ { 804, 0, 2, "lex_factor_rep-1", -1, 1, copy_289, 2, },
+ { 804, 1, 2, "lex_factor_rep-2", -1, 1, copy_290, 2, },
+ { 804, 2, 2, "lex_factor_rep-3", -1, 1, copy_291, 2, },
+ { 804, 3, 2, "lex_factor_rep-4", -1, 1, copy_292, 2, },
+ { 804, 4, 4, "lex_factor_rep-5", -1, 1, copy_293, 4, },
+ { 804, 5, 5, "lex_factor_rep-6", -1, 1, copy_294, 5, },
+ { 804, 6, 5, "lex_factor_rep-7", -1, 1, copy_295, 5, },
+ { 804, 7, 6, "lex_factor_rep-8", -1, 1, copy_296, 6, },
+ { 804, 8, 1, "lex_factor_rep-9", -1, 1, copy_297, 1, },
+ { 805, 0, 2, "lex_factor_neg-1", -1, 1, copy_298, 2, },
+ { 805, 1, 1, "lex_factor_neg-2", -1, 1, copy_299, 1, },
+ { 806, 0, 1, "lex_range_lit-1", -1, 1, copy_300, 1, },
+ { 806, 1, 1, "lex_range_lit-2", -1, 1, copy_301, 1, },
+ { 807, 0, 1, "lex_num-1", -1, 1, copy_302, 1, },
+ { 807, 1, 1, "lex_num-2", -1, 1, copy_303, 1, },
+ { 808, 0, 1, "lex_factor-1", -1, 1, copy_304, 1, },
+ { 808, 1, 1, "lex_factor-2", -1, 1, copy_305, 1, },
+ { 808, 2, 1, "lex_factor-3", -1, 1, copy_306, 1, },
+ { 808, 3, 1, "lex_factor-4", -1, 1, copy_307, 1, },
+ { 808, 4, 3, "lex_factor-5", -1, 1, copy_308, 3, },
+ { 808, 5, 3, "lex_factor-6", -1, 1, copy_309, 3, },
+ { 808, 6, 3, "lex_factor-7", -1, 1, copy_310, 3, },
+ { 808, 7, 3, "lex_factor-8", -1, 1, copy_311, 3, },
+ { 809, 0, 2, "reg_or_data-1", -1, 1, copy_312, 2, },
+ { 809, 1, 0, "reg_or_data-2", -1, 1, 0, 0, },
+ { 810, 0, 1, "reg_or_char-1", -1, 1, copy_314, 1, },
+ { 810, 1, 3, "reg_or_char-2", -1, 1, copy_315, 3, },
+ { 811, 0, 0, "__accum0-1", -1, 1, 0, 0, },
+ { 812, 0, 2, "_repeat_root_item-1", -1, 1, 0, 0, },
+ { 812, 1, 0, "_repeat_root_item-2", -1, 1, 0, 0, },
+ { 813, 0, 2, "_repeat_sq_cons_data-1", -1, 1, 0, 0, },
+ { 813, 1, 0, "_repeat_sq_cons_data-2", -1, 1, 0, 0, },
+ { 814, 0, 2, "_repeat_context_item-1", -1, 1, 0, 0, },
+ { 814, 1, 0, "_repeat_context_item-2", -1, 1, 0, 0, },
+ { 815, 0, 2, "_repeat_namespace_item-1", -1, 1, 0, 0, },
+ { 815, 1, 0, "_repeat_namespace_item-2", -1, 1, 0, 0, },
+ { 816, 0, 2, "_repeat_var_def-1", -1, 1, 0, 0, },
+ { 816, 1, 0, "_repeat_var_def-2", -1, 1, 0, 0, },
+ { 817, 0, 2, "_repeat_statement-1", -1, 1, 0, 0, },
+ { 817, 1, 0, "_repeat_statement-2", -1, 1, 0, 0, },
+ { 818, 0, 2, "_repeat_field_init-1", -1, 1, 0, 0, },
+ { 818, 1, 0, "_repeat_field_init-2", -1, 1, 0, 0, },
+ { 819, 0, 2, "_repeat_litpat_el-1", -1, 1, 0, 0, },
+ { 819, 1, 0, "_repeat_litpat_el-2", -1, 1, 0, 0, },
+ { 820, 0, 2, "_repeat_pattern_el-1", -1, 1, 0, 0, },
+ { 820, 1, 0, "_repeat_pattern_el-2", -1, 1, 0, 0, },
+ { 821, 0, 2, "_repeat_lit_cons_el-1", -1, 1, 0, 0, },
+ { 821, 1, 0, "_repeat_lit_cons_el-2", -1, 1, 0, 0, },
+ { 822, 0, 2, "_repeat_cons_el-1", -1, 1, 0, 0, },
+ { 822, 1, 0, "_repeat_cons_el-2", -1, 1, 0, 0, },
+ { 823, 0, 2, "_repeat_lit_accum_el-1", -1, 1, 0, 0, },
+ { 823, 1, 0, "_repeat_lit_accum_el-2", -1, 1, 0, 0, },
+ { 824, 0, 2, "_repeat_accum_el-1", -1, 1, 0, 0, },
+ { 824, 1, 0, "_repeat_accum_el-2", -1, 1, 0, 0, },
+ { 825, 0, 2, "_repeat_lit_string_el-1", -1, 1, 0, 0, },
+ { 825, 1, 0, "_repeat_lit_string_el-2", -1, 1, 0, 0, },
+ { 826, 0, 2, "_repeat_string_el-1", -1, 1, 0, 0, },
+ { 826, 1, 0, "_repeat_string_el-2", -1, 1, 0, 0, },
+ { 827, 0, 0, "__list0-1", -1, 1, 0, 0, },
+ { 828, 0, 1, "_root-1", -1, 1, 0, 0, },
+ { 828, 1, 1, "_root-2", -1, 1, 0, 0, },
+ { 828, 2, 1, "_root-3", -1, 1, 0, 0, },
+ { 828, 3, 1, "_root-4", -1, 1, 0, 0, },
+ { 828, 4, 1, "_root-5", -1, 1, 0, 0, },
+ { 828, 5, 1, "_root-6", -1, 1, 0, 0, },
+ { 828, 6, 1, "_root-7", -1, 1, 0, 0, },
+ { 828, 7, 1, "_root-8", -1, 1, 0, 0, },
+ { 828, 8, 1, "_root-9", -1, 1, 0, 0, },
+ { 828, 9, 1, "_root-10", -1, 1, 0, 0, },
+ { 828, 10, 1, "_root-11", -1, 1, 0, 0, },
+ { 828, 11, 1, "_root-12", -1, 1, 0, 0, },
+ { 828, 12, 1, "_root-13", -1, 1, 0, 0, },
+ { 828, 13, 1, "_root-14", -1, 1, 0, 0, },
+ { 828, 14, 1, "_root-15", -1, 1, 0, 0, },
+ { 828, 15, 1, "_root-16", -1, 1, 0, 0, },
+ { 828, 16, 1, "_root-17", -1, 1, 0, 0, },
+ { 828, 17, 1, "_root-18", -1, 1, 0, 0, },
+ { 828, 18, 1, "_root-19", -1, 1, 0, 0, },
+ { 828, 19, 1, "_root-20", -1, 1, 0, 0, },
+ { 828, 20, 1, "_root-21", -1, 1, 0, 0, },
+ { 828, 21, 1, "_root-22", -1, 1, 0, 0, },
+ { 828, 22, 1, "_root-23", -1, 1, 0, 0, },
+ { 828, 23, 1, "_root-24", -1, 1, 0, 0, },
+ { 828, 24, 1, "_root-25", -1, 1, 0, 0, },
+ { 828, 25, 1, "_root-26", -1, 1, 0, 0, },
+ { 828, 26, 1, "_root-27", -1, 1, 0, 0, },
+ { 828, 27, 1, "_root-28", -1, 1, 0, 0, },
+ { 828, 28, 1, "_root-29", -1, 1, 0, 0, },
+ { 828, 29, 1, "_root-30", -1, 1, 0, 0, },
+ { 828, 30, 1, "_root-31", -1, 1, 0, 0, },
+ { 828, 31, 1, "_root-32", -1, 1, 0, 0, },
+ { 828, 32, 1, "_root-33", -1, 1, 0, 0, },
+ { 828, 33, 1, "_root-34", -1, 1, 0, 0, },
+ { 828, 34, 1, "_root-35", -1, 1, 0, 0, },
+ { 828, 35, 1, "_root-36", -1, 1, 0, 0, },
+ { 828, 36, 1, "_root-37", -1, 1, 0, 0, },
+ { 828, 37, 1, "_root-38", -1, 1, 0, 0, },
+ { 828, 38, 1, "_root-39", -1, 1, 0, 0, },
+ { 828, 39, 1, "_root-40", -1, 1, 0, 0, },
+ { 828, 40, 1, "_root-41", -1, 1, 0, 0, },
+ { 828, 41, 1, "_root-42", -1, 1, 0, 0, },
+ { 828, 42, 1, "_root-43", -1, 1, 0, 0, },
+ { 828, 43, 1, "_root-44", -1, 1, 0, 0, },
+ { 828, 44, 1, "_root-45", -1, 1, 0, 0, },
+ { 828, 45, 1, "_root-46", -1, 1, 0, 0, },
+ { 828, 46, 1, "_root-47", -1, 1, 0, 0, },
+ { 828, 47, 1, "_root-48", -1, 1, 0, 0, },
+ { 828, 48, 1, "_root-49", -1, 1, 0, 0, },
+ { 828, 49, 1, "_root-50", -1, 1, 0, 0, },
+ { 828, 50, 1, "_root-51", -1, 1, 0, 0, },
+ { 828, 51, 1, "_root-52", -1, 1, 0, 0, },
+ { 828, 52, 1, "_root-53", -1, 1, 0, 0, },
+ { 828, 53, 1, "_root-54", -1, 1, 0, 0, },
+ { 828, 54, 1, "_root-55", -1, 1, 0, 0, },
+ { 828, 55, 1, "_root-56", -1, 1, 0, 0, },
+ { 828, 56, 1, "_root-57", -1, 1, 0, 0, },
+ { 828, 57, 1, "_root-58", -1, 1, 0, 0, },
+ { 828, 58, 1, "_root-59", -1, 1, 0, 0, },
+ { 828, 59, 1, "_root-60", -1, 1, 0, 0, },
+ { 828, 60, 1, "_root-61", -1, 1, 0, 0, },
+ { 828, 61, 1, "_root-62", -1, 1, 0, 0, },
+ { 828, 62, 1, "_root-63", -1, 1, 0, 0, },
+ { 828, 63, 1, "_root-64", -1, 1, 0, 0, },
+ { 828, 64, 1, "_root-65", -1, 1, 0, 0, },
+ { 828, 65, 1, "_root-66", -1, 1, 0, 0, },
+ { 828, 66, 1, "_root-67", -1, 1, 0, 0, },
+ { 828, 67, 1, "_root-68", -1, 1, 0, 0, },
+ { 828, 68, 1, "_root-69", -1, 1, 0, 0, },
+ { 828, 69, 1, "_root-70", -1, 1, 0, 0, },
+ { 828, 70, 1, "_root-71", -1, 1, 0, 0, },
+ { 828, 71, 1, "_root-72", -1, 1, 0, 0, },
+ { 828, 72, 1, "_root-73", -1, 1, 0, 0, },
+ { 828, 73, 1, "_root-74", -1, 1, 0, 0, },
+ { 828, 74, 1, "_root-75", -1, 1, 0, 0, },
+ { 828, 75, 1, "_root-76", -1, 1, 0, 0, },
+ { 828, 76, 1, "_root-77", -1, 1, 0, 0, },
+ { 828, 77, 1, "_root-78", -1, 1, 0, 0, },
+ { 828, 78, 1, "_root-79", -1, 1, 0, 0, },
+ { 828, 79, 1, "_root-80", -1, 1, 0, 0, },
+ { 828, 80, 1, "_root-81", -1, 1, 0, 0, },
+ { 828, 81, 1, "_root-82", -1, 1, 0, 0, },
+ { 828, 82, 1, "_root-83", -1, 1, 0, 0, },
+ { 828, 83, 1, "_root-84", -1, 1, 0, 0, },
+ { 828, 84, 1, "_root-85", -1, 1, 0, 0, },
+ { 828, 85, 1, "_root-86", -1, 1, 0, 0, },
+ { 828, 86, 1, "_root-87", -1, 1, 0, 0, },
+ { 828, 87, 1, "_root-88", -1, 1, 0, 0, },
+ { 828, 88, 1, "_root-89", -1, 1, 0, 0, },
+ { 828, 89, 1, "_root-90", -1, 1, 0, 0, },
+ { 828, 90, 1, "_root-91", -1, 1, 0, 0, },
+ { 828, 91, 1, "_root-92", -1, 1, 0, 0, },
+ { 828, 92, 1, "_root-93", -1, 1, 0, 0, },
+ { 828, 93, 1, "_root-94", -1, 1, 0, 0, },
+ { 828, 94, 1, "_root-95", -1, 1, 0, 0, },
+ { 828, 95, 1, "_root-96", -1, 1, 0, 0, },
+ { 828, 96, 1, "_root-97", -1, 1, 0, 0, },
+ { 828, 97, 1, "_root-98", -1, 1, 0, 0, },
+ { 828, 98, 1, "_root-99", -1, 1, 0, 0, },
+ { 828, 99, 1, "_root-100", -1, 1, 0, 0, },
+ { 828, 100, 1, "_root-101", -1, 1, 0, 0, },
+ { 828, 101, 1, "_root-102", -1, 1, 0, 0, },
+ { 828, 102, 1, "_root-103", -1, 1, 0, 0, },
+ { 828, 103, 1, "_root-104", -1, 1, 0, 0, },
+ { 828, 104, 1, "_root-105", -1, 1, 0, 0, },
+ { 828, 105, 1, "_root-106", -1, 1, 0, 0, },
+ { 828, 106, 1, "_root-107", -1, 1, 0, 0, },
+ { 828, 107, 1, "_root-108", -1, 1, 0, 0, },
+ { 828, 108, 1, "_root-109", -1, 1, 0, 0, },
+ { 828, 109, 1, "_root-110", -1, 1, 0, 0, },
+ { 828, 110, 1, "_root-111", -1, 1, 0, 0, },
+ { 828, 111, 1, "_root-112", -1, 1, 0, 0, },
+ { 828, 112, 1, "_root-113", -1, 1, 0, 0, },
+ { 828, 113, 1, "_root-114", -1, 1, 0, 0, },
+ { 828, 114, 1, "_root-115", -1, 1, 0, 0, },
+ { 828, 115, 1, "_root-116", -1, 1, 0, 0, },
+ { 828, 116, 1, "_root-117", -1, 1, 0, 0, },
+ { 828, 117, 1, "_root-118", -1, 1, 0, 0, },
+ { 828, 118, 1, "_root-119", -1, 1, 0, 0, },
+ { 828, 119, 1, "_root-120", -1, 1, 0, 0, },
+ { 828, 120, 1, "_root-121", -1, 1, 0, 0, },
+ { 828, 121, 1, "_root-122", -1, 1, 0, 0, },
+ { 828, 122, 1, "_root-123", -1, 1, 0, 0, },
+ { 828, 123, 1, "_root-124", -1, 1, 0, 0, },
+ { 828, 124, 1, "_root-125", -1, 1, 0, 0, },
+ { 828, 125, 1, "_root-126", -1, 1, 0, 0, },
+ { 828, 126, 1, "_root-127", -1, 1, 0, 0, },
+ { 828, 127, 1, "_root-128", -1, 1, 0, 0, },
+ { 828, 128, 1, "_root-129", -1, 1, 0, 0, },
+ { 828, 129, 1, "_root-130", -1, 1, 0, 0, },
+ { 828, 130, 1, "_root-131", -1, 1, 0, 0, },
+ { 828, 131, 1, "_root-132", -1, 1, 0, 0, },
+ { 828, 132, 1, "_root-133", -1, 1, 0, 0, },
+ { 828, 133, 1, "_root-134", -1, 1, 0, 0, },
+ { 828, 134, 1, "_root-135", -1, 1, 0, 0, },
+ { 828, 135, 1, "_root-136", -1, 1, 0, 0, },
+ { 828, 136, 1, "_root-137", -1, 1, 0, 0, },
+ { 828, 137, 1, "_root-138", -1, 1, 0, 0, },
+ { 828, 138, 1, "_root-139", -1, 1, 0, 0, },
+ { 828, 139, 1, "_root-140", -1, 1, 0, 0, },
+ { 828, 140, 1, "_root-141", -1, 1, 0, 0, },
+ { 828, 141, 1, "_root-142", -1, 1, 0, 0, },
+ { 828, 142, 1, "_root-143", -1, 1, 0, 0, },
+ { 828, 143, 1, "_root-144", -1, 1, 0, 0, },
+ { 828, 144, 1, "_root-145", -1, 1, 0, 0, },
+ { 828, 145, 1, "_root-146", -1, 1, 0, 0, },
+ { 828, 146, 1, "_root-147", -1, 1, 0, 0, },
+ { 828, 147, 1, "_root-148", -1, 1, 0, 0, },
+ { 828, 148, 1, "_root-149", -1, 1, 0, 0, },
+ { 828, 149, 1, "_root-150", -1, 1, 0, 0, },
+ { 828, 150, 1, "_root-151", -1, 1, 0, 0, },
+ { 828, 151, 1, "_root-152", -1, 1, 0, 0, },
+ { 828, 152, 1, "_root-153", -1, 1, 0, 0, },
+ { 828, 153, 1, "_root-154", -1, 1, 0, 0, },
+ { 828, 154, 1, "_root-155", -1, 1, 0, 0, },
+ { 828, 155, 1, "_root-156", -1, 1, 0, 0, },
+ { 828, 156, 1, "_root-157", -1, 1, 0, 0, },
+ { 828, 157, 1, "_root-158", -1, 1, 0, 0, },
+ { 828, 158, 1, "_root-159", -1, 1, 0, 0, },
+ { 828, 159, 1, "_root-160", -1, 1, 0, 0, },
+ { 828, 160, 1, "_root-161", -1, 1, 0, 0, },
+ { 828, 161, 1, "_root-162", -1, 1, 0, 0, },
+ { 828, 162, 1, "_root-163", -1, 1, 0, 0, },
+ { 828, 163, 1, "_root-164", -1, 1, 0, 0, },
+ { 828, 164, 1, "_root-165", -1, 1, 0, 0, },
+ { 828, 165, 1, "_root-166", -1, 1, 0, 0, },
+ { 828, 166, 1, "_root-167", -1, 1, 0, 0, },
+ { 828, 167, 1, "_root-168", -1, 1, 0, 0, },
+ { 828, 168, 1, "_root-169", -1, 1, 0, 0, },
+ { 828, 169, 1, "_root-170", -1, 1, 0, 0, },
+ { 828, 170, 1, "_root-171", -1, 1, 0, 0, },
+ { 828, 171, 1, "_root-172", -1, 1, 0, 0, },
+ { 828, 172, 1, "_root-173", -1, 1, 0, 0, },
+ { 828, 173, 1, "_root-174", -1, 1, 0, 0, },
+ { 828, 174, 1, "_root-175", -1, 1, 0, 0, },
+ { 828, 175, 1, "_root-176", -1, 1, 0, 0, },
+ { 828, 176, 1, "_root-177", -1, 1, 0, 0, },
+ { 828, 177, 1, "_root-178", -1, 1, 0, 0, },
+ { 828, 178, 1, "_root-179", -1, 1, 0, 0, },
+ { 828, 179, 1, "_root-180", -1, 1, 0, 0, },
+ { 828, 180, 1, "_root-181", -1, 1, 0, 0, },
+ { 828, 181, 1, "_root-182", -1, 1, 0, 0, },
+ { 828, 182, 1, "_root-183", -1, 1, 0, 0, },
+ { 828, 183, 1, "_root-184", -1, 1, 0, 0, },
+ { 828, 184, 1, "_root-185", -1, 1, 0, 0, },
+ { 828, 185, 1, "_root-186", -1, 1, 0, 0, },
+ { 828, 186, 1, "_root-187", -1, 1, 0, 0, },
+ { 828, 187, 1, "_root-188", -1, 1, 0, 0, },
+ { 828, 188, 1, "_root-189", -1, 1, 0, 0, },
+ { 828, 189, 1, "_root-190", -1, 1, 0, 0, },
+ { 828, 190, 1, "_root-191", -1, 1, 0, 0, },
+ { 828, 191, 1, "_root-192", -1, 1, 0, 0, },
+ { 828, 192, 1, "_root-193", -1, 1, 0, 0, },
+ { 828, 193, 1, "_root-194", -1, 1, 0, 0, },
+ { 828, 194, 1, "_root-195", -1, 1, 0, 0, },
+ { 828, 195, 1, "_root-196", -1, 1, 0, 0, },
+ { 828, 196, 1, "_root-197", -1, 1, 0, 0, },
+ { 828, 197, 1, "_root-198", -1, 1, 0, 0, },
+ { 828, 198, 1, "_root-199", -1, 1, 0, 0, },
+ { 828, 199, 1, "_root-200", -1, 1, 0, 0, },
+ { 828, 200, 1, "_root-201", -1, 1, 0, 0, },
+ { 828, 201, 1, "_root-202", -1, 1, 0, 0, },
+ { 828, 202, 1, "_root-203", -1, 1, 0, 0, },
+ { 828, 203, 1, "_root-204", -1, 1, 0, 0, },
+ { 828, 204, 1, "_root-205", -1, 1, 0, 0, },
+ { 828, 205, 1, "_root-206", -1, 1, 0, 0, },
+ { 828, 206, 1, "_root-207", -1, 1, 0, 0, },
+ { 828, 207, 1, "_root-208", -1, 1, 0, 0, },
+ { 828, 208, 1, "_root-209", -1, 1, 0, 0, },
+ { 828, 209, 1, "_root-210", -1, 1, 0, 0, },
+ { 828, 210, 1, "_root-211", -1, 1, 0, 0, },
+ { 828, 211, 1, "_root-212", -1, 1, 0, 0, },
+ { 828, 212, 1, "_root-213", -1, 1, 0, 0, },
+ { 828, 213, 1, "_root-214", -1, 1, 0, 0, },
+ { 828, 214, 1, "_root-215", -1, 1, 0, 0, },
+ { 828, 215, 1, "_root-216", -1, 1, 0, 0, },
+ { 828, 216, 1, "_root-217", -1, 1, 0, 0, },
+ { 828, 217, 1, "_root-218", -1, 1, 0, 0, },
+ { 828, 218, 1, "_root-219", -1, 1, 0, 0, },
+ { 828, 219, 1, "_root-220", -1, 1, 0, 0, },
+ { 828, 220, 1, "_root-221", -1, 1, 0, 0, },
+ { 828, 221, 1, "_root-222", -1, 1, 0, 0, },
+ { 828, 222, 1, "_root-223", -1, 1, 0, 0, },
+ { 828, 223, 1, "_root-224", -1, 1, 0, 0, },
+ { 828, 224, 1, "_root-225", -1, 1, 0, 0, },
+ { 828, 225, 1, "_root-226", -1, 1, 0, 0, },
+ { 828, 226, 1, "_root-227", -1, 1, 0, 0, },
+ { 828, 227, 1, "_root-228", -1, 1, 0, 0, },
+ { 828, 228, 1, "_root-229", -1, 1, 0, 0, },
+ { 828, 229, 1, "_root-230", -1, 1, 0, 0, },
+ { 828, 230, 1, "_root-231", -1, 1, 0, 0, },
+ { 828, 231, 1, "_root-232", -1, 1, 0, 0, },
+ { 828, 232, 1, "_root-233", -1, 1, 0, 0, },
+ { 828, 233, 1, "_root-234", -1, 1, 0, 0, },
+ { 828, 234, 1, "_root-235", -1, 1, 0, 0, },
+ { 828, 235, 1, "_root-236", -1, 1, 0, 0, },
+ { 828, 236, 1, "_root-237", -1, 1, 0, 0, },
+ { 828, 237, 1, "_root-238", -1, 1, 0, 0, },
+ { 828, 238, 1, "_root-239", -1, 1, 0, 0, },
+ { 828, 239, 1, "_root-240", -1, 1, 0, 0, },
+ { 828, 240, 1, "_root-241", -1, 1, 0, 0, },
+ { 828, 241, 1, "_root-242", -1, 1, 0, 0, },
+ { 828, 242, 1, "_root-243", -1, 1, 0, 0, },
+ { 828, 243, 1, "_root-244", -1, 1, 0, 0, },
+ { 828, 244, 1, "_root-245", -1, 1, 0, 0, },
+ { 828, 245, 1, "_root-246", -1, 1, 0, 0, },
+ { 828, 246, 1, "_root-247", -1, 1, 0, 0, },
+ { 828, 247, 1, "_root-248", -1, 1, 0, 0, },
+ { 828, 248, 1, "_root-249", -1, 1, 0, 0, },
+ { 828, 249, 1, "_root-250", -1, 1, 0, 0, },
+ { 828, 250, 1, "_root-251", -1, 1, 0, 0, },
+ { 828, 251, 1, "_root-252", -1, 1, 0, 0, },
+ { 828, 252, 1, "_root-253", -1, 1, 0, 0, },
+ { 828, 253, 1, "_root-254", -1, 1, 0, 0, },
+ { 828, 254, 1, "_root-255", -1, 1, 0, 0, },
+ { 828, 255, 1, "_root-256", -1, 1, 0, 0, },
+ { 828, 256, 1, "_root-257", -1, 1, 0, 0, },
+ { 828, 257, 1, "_root-258", -1, 1, 0, 0, },
+ { 828, 258, 1, "_root-259", -1, 1, 0, 0, },
+ { 828, 259, 1, "_root-260", -1, 1, 0, 0, },
+ { 828, 260, 1, "_root-261", -1, 1, 0, 0, },
+ { 828, 261, 1, "_root-262", -1, 1, 0, 0, },
+ { 828, 262, 1, "_root-263", -1, 1, 0, 0, },
+ { 828, 263, 1, "_root-264", -1, 1, 0, 0, },
+ { 828, 264, 1, "_root-265", -1, 1, 0, 0, },
+ { 828, 265, 1, "_root-266", -1, 1, 0, 0, },
+ { 828, 266, 1, "_root-267", -1, 1, 0, 0, },
+ { 828, 267, 1, "_root-268", -1, 1, 0, 0, },
+ { 828, 268, 1, "_root-269", -1, 1, 0, 0, },
+ { 828, 269, 1, "_root-270", -1, 1, 0, 0, },
+ { 828, 270, 1, "_root-271", -1, 1, 0, 0, },
+ { 828, 271, 1, "_root-272", -1, 1, 0, 0, },
+ { 828, 272, 1, "_root-273", -1, 1, 0, 0, },
+ { 828, 273, 1, "_root-274", -1, 1, 0, 0, },
+ { 828, 274, 1, "_root-275", -1, 1, 0, 0, },
+ { 828, 275, 1, "_root-276", -1, 1, 0, 0, },
+ { 828, 276, 1, "_root-277", -1, 1, 0, 0, },
+ { 828, 277, 1, "_root-278", -1, 1, 0, 0, },
+ { 828, 278, 1, "_root-279", -1, 1, 0, 0, },
+ { 828, 279, 1, "_root-280", -1, 1, 0, 0, },
+ { 828, 280, 1, "_root-281", -1, 1, 0, 0, },
+ { 828, 281, 1, "_root-282", -1, 1, 0, 0, },
+ { 828, 282, 1, "_root-283", -1, 1, 0, 0, },
+ { 828, 283, 1, "_root-284", -1, 1, 0, 0, },
+ { 828, 284, 1, "_root-285", -1, 1, 0, 0, },
+ { 828, 285, 1, "_root-286", -1, 1, 0, 0, },
+ { 828, 286, 1, "_root-287", -1, 1, 0, 0, },
+ { 828, 287, 1, "_root-288", -1, 1, 0, 0, },
+ { 828, 288, 1, "_root-289", -1, 1, 0, 0, },
+ { 828, 289, 1, "_root-290", -1, 1, 0, 0, },
+ { 828, 290, 1, "_root-291", -1, 1, 0, 0, },
+ { 828, 291, 1, "_root-292", -1, 1, 0, 0, },
+ { 828, 292, 1, "_root-293", -1, 1, 0, 0, },
+ { 828, 293, 1, "_root-294", -1, 1, 0, 0, },
+ { 828, 294, 1, "_root-295", -1, 1, 0, 0, },
+ { 828, 295, 1, "_root-296", -1, 1, 0, 0, },
+ { 828, 296, 1, "_root-297", -1, 1, 0, 0, },
+ { 828, 297, 1, "_root-298", -1, 1, 0, 0, },
+ { 828, 298, 1, "_root-299", -1, 1, 0, 0, },
+ { 828, 299, 1, "_root-300", -1, 1, 0, 0, },
+ { 828, 300, 1, "_root-301", -1, 1, 0, 0, },
+ { 828, 301, 1, "_root-302", -1, 1, 0, 0, },
+ { 828, 302, 1, "_root-303", -1, 1, 0, 0, },
+ { 828, 303, 1, "_root-304", -1, 1, 0, 0, },
+ { 828, 304, 1, "_root-305", -1, 1, 0, 0, },
+ { 828, 305, 1, "_root-306", -1, 1, 0, 0, },
+ { 828, 306, 1, "_root-307", -1, 1, 0, 0, },
+ { 828, 307, 1, "_root-308", -1, 1, 0, 0, },
+ { 828, 308, 1, "_root-309", -1, 1, 0, 0, },
+ { 828, 309, 1, "_root-310", -1, 1, 0, 0, },
+ { 828, 310, 1, "_root-311", -1, 1, 0, 0, },
+ { 828, 311, 1, "_root-312", -1, 1, 0, 0, },
+ { 828, 312, 1, "_root-313", -1, 1, 0, 0, },
+ { 828, 313, 1, "_root-314", -1, 1, 0, 0, },
+ { 828, 314, 1, "_root-315", -1, 1, 0, 0, },
+ { 828, 315, 1, "_root-316", -1, 1, 0, 0, },
+ { 828, 316, 1, "_root-317", -1, 1, 0, 0, },
+ { 828, 317, 1, "_root-318", -1, 1, 0, 0, },
+ { 828, 318, 1, "_root-319", -1, 1, 0, 0, },
+ { 828, 319, 1, "_root-320", -1, 1, 0, 0, },
+ { 828, 320, 1, "_root-321", -1, 1, 0, 0, },
+ { 828, 321, 1, "_root-322", -1, 1, 0, 0, },
+ { 828, 322, 1, "_root-323", -1, 1, 0, 0, },
+ { 828, 323, 1, "_root-324", -1, 1, 0, 0, },
+ { 828, 324, 1, "_root-325", -1, 1, 0, 0, },
+ { 828, 325, 1, "_root-326", -1, 1, 0, 0, },
+ { 828, 326, 1, "_root-327", -1, 1, 0, 0, },
+ { 828, 327, 1, "_root-328", -1, 1, 0, 0, },
+ { 828, 328, 1, "_root-329", -1, 1, 0, 0, },
+ { 828, 329, 1, "_root-330", -1, 1, 0, 0, },
+ { 828, 330, 1, "_root-331", -1, 1, 0, 0, },
+ { 828, 331, 1, "_root-332", -1, 1, 0, 0, },
+ { 828, 332, 1, "_root-333", -1, 1, 0, 0, },
+ { 828, 333, 1, "_root-334", -1, 1, 0, 0, },
+ { 828, 334, 1, "_root-335", -1, 1, 0, 0, },
+ { 828, 335, 1, "_root-336", -1, 1, 0, 0, },
+ { 828, 336, 1, "_root-337", -1, 1, 0, 0, },
+ { 828, 337, 1, "_root-338", -1, 1, 0, 0, },
+ { 828, 338, 1, "_root-339", -1, 1, 0, 0, },
+ { 828, 339, 1, "_root-340", -1, 1, 0, 0, },
+ { 828, 340, 1, "_root-341", -1, 1, 0, 0, },
+ { 828, 341, 1, "_root-342", -1, 1, 0, 0, },
+ { 828, 342, 1, "_root-343", -1, 1, 0, 0, },
+ { 828, 343, 1, "_root-344", -1, 1, 0, 0, },
+ { 828, 344, 1, "_root-345", -1, 1, 0, 0, },
+ { 828, 345, 1, "_root-346", -1, 1, 0, 0, },
+ { 828, 346, 1, "_root-347", -1, 1, 0, 0, },
+ { 828, 347, 1, "_root-348", -1, 1, 0, 0, },
+ { 828, 348, 1, "_root-349", -1, 1, 0, 0, },
+ { 828, 349, 1, "_root-350", -1, 1, 0, 0, },
+ { 828, 350, 1, "_root-351", -1, 1, 0, 0, },
+ { 828, 351, 1, "_root-352", -1, 1, 0, 0, },
+ { 828, 352, 1, "_root-353", -1, 1, 0, 0, },
+ { 828, 353, 1, "_root-354", -1, 1, 0, 0, },
+ { 828, 354, 1, "_root-355", -1, 1, 0, 0, },
+ { 828, 355, 1, "_root-356", -1, 1, 0, 0, },
+ { 828, 356, 1, "_root-357", -1, 1, 0, 0, },
+ { 828, 357, 1, "_root-358", -1, 1, 0, 0, },
+ { 828, 358, 1, "_root-359", -1, 1, 0, 0, },
+ { 828, 359, 1, "_root-360", -1, 1, 0, 0, },
+ { 828, 360, 1, "_root-361", -1, 1, 0, 0, },
+ { 828, 361, 1, "_root-362", -1, 1, 0, 0, },
+ { 828, 362, 1, "_root-363", -1, 1, 0, 0, },
+ { 828, 363, 1, "_root-364", -1, 1, 0, 0, },
+ { 828, 364, 1, "_root-365", -1, 1, 0, 0, },
+ { 828, 365, 1, "_root-366", -1, 1, 0, 0, },
+ { 828, 366, 1, "_root-367", -1, 1, 0, 0, },
+ { 828, 367, 1, "_root-368", -1, 1, 0, 0, },
+ { 828, 368, 1, "_root-369", -1, 1, 0, 0, },
+ { 828, 369, 1, "_root-370", -1, 1, 0, 0, },
+ { 828, 370, 1, "_root-371", -1, 1, 0, 0, },
+ { 828, 371, 1, "_root-372", -1, 1, 0, 0, },
+ { 828, 372, 1, "_root-373", -1, 1, 0, 0, },
+ { 828, 373, 1, "_root-374", -1, 1, 0, 0, },
+ { 828, 374, 1, "_root-375", -1, 1, 0, 0, },
+ { 828, 375, 1, "_root-376", -1, 1, 0, 0, },
+ { 828, 376, 1, "_root-377", -1, 1, 0, 0, },
+ { 828, 377, 1, "_root-378", -1, 1, 0, 0, },
+ { 828, 378, 1, "_root-379", -1, 1, 0, 0, },
+ { 828, 379, 1, "_root-380", -1, 1, 0, 0, },
+ { 828, 380, 1, "_root-381", -1, 1, 0, 0, },
+ { 828, 381, 1, "_root-382", -1, 1, 0, 0, },
+ { 828, 382, 1, "_root-383", -1, 1, 0, 0, },
+ { 828, 383, 1, "_root-384", -1, 1, 0, 0, },
+ { 828, 384, 1, "_root-385", -1, 1, 0, 0, },
+ { 828, 385, 1, "_root-386", -1, 1, 0, 0, },
+ { 828, 386, 1, "_root-387", -1, 1, 0, 0, },
+ { 828, 387, 1, "_root-388", -1, 1, 0, 0, },
+ { 828, 388, 1, "_root-389", -1, 1, 0, 0, },
+ { 828, 389, 1, "_root-390", -1, 1, 0, 0, },
+ { 828, 390, 1, "_root-391", -1, 1, 0, 0, },
+ { 828, 391, 1, "_root-392", -1, 1, 0, 0, },
+ { 828, 392, 1, "_root-393", -1, 1, 0, 0, },
+ { 828, 393, 1, "_root-394", -1, 1, 0, 0, },
+ { 828, 394, 1, "_root-395", -1, 1, 0, 0, },
+ { 828, 395, 1, "_root-396", -1, 1, 0, 0, },
+ { 828, 396, 1, "_root-397", -1, 1, 0, 0, },
+ { 828, 397, 1, "_root-398", -1, 1, 0, 0, },
+ { 828, 398, 1, "_root-399", -1, 1, 0, 0, },
+ { 828, 399, 1, "_root-400", -1, 1, 0, 0, },
+ { 828, 400, 1, "_root-401", -1, 1, 0, 0, },
+ { 828, 401, 1, "_root-402", -1, 1, 0, 0, },
+ { 828, 402, 1, "_root-403", -1, 1, 0, 0, },
+ { 828, 403, 1, "_root-404", -1, 1, 0, 0, },
+ { 828, 404, 1, "_root-405", -1, 1, 0, 0, },
+ { 828, 405, 1, "_root-406", -1, 1, 0, 0, },
+ { 828, 406, 1, "_root-407", -1, 1, 0, 0, },
+ { 828, 407, 1, "_root-408", -1, 1, 0, 0, },
+ { 828, 408, 1, "_root-409", -1, 1, 0, 0, },
+ { 828, 409, 1, "_root-410", -1, 1, 0, 0, },
+ { 828, 410, 1, "_root-411", -1, 1, 0, 0, },
+ { 828, 411, 1, "_root-412", -1, 1, 0, 0, },
+ { 828, 412, 1, "_root-413", -1, 1, 0, 0, },
+ { 828, 413, 1, "_root-414", -1, 1, 0, 0, },
+ { 828, 414, 1, "_root-415", -1, 1, 0, 0, },
+ { 828, 415, 1, "_root-416", -1, 1, 0, 0, },
+ { 828, 416, 1, "_root-417", -1, 1, 0, 0, },
+ { 828, 417, 1, "_root-418", -1, 1, 0, 0, },
+ { 828, 418, 1, "_root-419", -1, 1, 0, 0, },
+ { 828, 419, 1, "_root-420", -1, 1, 0, 0, },
+ { 828, 420, 1, "_root-421", -1, 1, 0, 0, },
+ { 828, 421, 1, "_root-422", -1, 1, 0, 0, },
+ { 828, 422, 1, "_root-423", -1, 1, 0, 0, },
+ { 828, 423, 1, "_root-424", -1, 1, 0, 0, },
+ { 828, 424, 1, "_root-425", -1, 1, 0, 0, },
+ { 828, 425, 1, "_root-426", -1, 1, 0, 0, },
+ { 828, 426, 1, "_root-427", -1, 1, 0, 0, },
+ { 828, 427, 1, "_root-428", -1, 1, 0, 0, },
+ { 828, 428, 1, "_root-429", -1, 1, 0, 0, },
+ { 828, 429, 1, "_root-430", -1, 1, 0, 0, },
+ { 828, 430, 1, "_root-431", -1, 1, 0, 0, },
+ { 828, 431, 1, "_root-432", -1, 1, 0, 0, },
+ { 828, 432, 1, "_root-433", -1, 1, 0, 0, },
+ { 828, 433, 1, "_root-434", -1, 1, 0, 0, },
+ { 828, 434, 1, "_root-435", -1, 1, 0, 0, },
+ { 828, 435, 1, "_root-436", -1, 1, 0, 0, },
+ { 828, 436, 1, "_root-437", -1, 1, 0, 0, },
+ { 828, 437, 1, "_root-438", -1, 1, 0, 0, },
+ { 828, 438, 1, "_root-439", -1, 1, 0, 0, },
+ { 828, 439, 1, "_root-440", -1, 1, 0, 0, },
+ { 828, 440, 1, "_root-441", -1, 1, 0, 0, },
+ { 828, 441, 1, "_root-442", -1, 1, 0, 0, },
+ { 828, 442, 1, "_root-443", -1, 1, 0, 0, },
+ { 828, 443, 1, "_root-444", -1, 1, 0, 0, },
+ { 828, 444, 1, "_root-445", -1, 1, 0, 0, },
+ { 828, 445, 1, "_root-446", -1, 1, 0, 0, },
+ { 828, 446, 1, "_root-447", -1, 1, 0, 0, },
+ { 828, 447, 1, "_root-448", -1, 1, 0, 0, },
+ { 828, 448, 1, "_root-449", -1, 1, 0, 0, },
+ { 828, 449, 1, "_root-450", -1, 1, 0, 0, },
+ { 828, 450, 1, "_root-451", -1, 1, 0, 0, },
+ { 828, 451, 1, "_root-452", -1, 1, 0, 0, },
+ { 828, 452, 1, "_root-453", -1, 1, 0, 0, },
+ { 828, 453, 1, "_root-454", -1, 1, 0, 0, },
+ { 828, 454, 1, "_root-455", -1, 1, 0, 0, },
+ { 828, 455, 1, "_root-456", -1, 1, 0, 0, },
+ { 828, 456, 1, "_root-457", -1, 1, 0, 0, },
+ { 828, 457, 1, "_root-458", -1, 1, 0, 0, },
+ { 828, 458, 1, "_root-459", -1, 1, 0, 0, },
+ { 828, 459, 1, "_root-460", -1, 1, 0, 0, },
+ { 828, 460, 1, "_root-461", -1, 1, 0, 0, },
+ { 828, 461, 1, "_root-462", -1, 1, 0, 0, },
+ { 828, 462, 1, "_root-463", -1, 1, 0, 0, },
+ { 828, 463, 1, "_root-464", -1, 1, 0, 0, },
+ { 828, 464, 1, "_root-465", -1, 1, 0, 0, },
+ { 828, 465, 1, "_root-466", -1, 1, 0, 0, },
+ { 828, 466, 1, "_root-467", -1, 1, 0, 0, },
+ { 828, 467, 1, "_root-468", -1, 1, 0, 0, },
+ { 828, 468, 1, "_root-469", -1, 1, 0, 0, },
+ { 828, 469, 1, "_root-470", -1, 1, 0, 0, },
+ { 828, 470, 1, "_root-471", -1, 1, 0, 0, },
+ { 828, 471, 1, "_root-472", -1, 1, 0, 0, },
+ { 828, 472, 1, "_root-473", -1, 1, 0, 0, },
+ { 828, 473, 1, "_root-474", -1, 1, 0, 0, },
+ { 828, 474, 1, "_root-475", -1, 1, 0, 0, },
+ { 828, 475, 1, "_root-476", -1, 1, 0, 0, },
+ { 828, 476, 1, "_root-477", -1, 1, 0, 0, },
+ { 828, 477, 1, "_root-478", -1, 1, 0, 0, },
+ { 828, 478, 1, "_root-479", -1, 1, 0, 0, },
+ { 828, 479, 1, "_root-480", -1, 1, 0, 0, },
+ { 828, 480, 1, "_root-481", -1, 1, 0, 0, },
+ { 828, 481, 1, "_root-482", -1, 1, 0, 0, },
+ { 828, 482, 1, "_root-483", -1, 1, 0, 0, },
+ { 828, 483, 1, "_root-484", -1, 1, 0, 0, },
+ { 828, 484, 1, "_root-485", -1, 1, 0, 0, },
+ { 828, 485, 1, "_root-486", -1, 1, 0, 0, },
+ { 828, 486, 1, "_root-487", -1, 1, 0, 0, },
+ { 828, 487, 1, "_root-488", -1, 1, 0, 0, },
+ { 828, 488, 1, "_root-489", -1, 1, 0, 0, },
+ { 828, 489, 1, "_root-490", -1, 1, 0, 0, },
+ { 828, 490, 1, "_root-491", -1, 1, 0, 0, },
+ { 828, 491, 1, "_root-492", -1, 1, 0, 0, },
+ { 828, 492, 1, "_root-493", -1, 1, 0, 0, },
+ { 828, 493, 1, "_root-494", -1, 1, 0, 0, },
+ { 828, 494, 1, "_root-495", -1, 1, 0, 0, },
+ { 828, 495, 1, "_root-496", -1, 1, 0, 0, },
+ { 828, 496, 1, "_root-497", -1, 1, 0, 0, },
+ { 828, 497, 1, "_root-498", -1, 1, 0, 0, },
+ { 828, 498, 1, "_root-499", -1, 1, 0, 0, },
+ { 828, 499, 1, "_root-500", -1, 1, 0, 0, },
+ { 828, 500, 1, "_root-501", -1, 1, 0, 0, },
+ { 828, 501, 1, "_root-502", -1, 1, 0, 0, },
+ { 828, 502, 1, "_root-503", -1, 1, 0, 0, },
+ { 828, 503, 1, "_root-504", -1, 1, 0, 0, },
+ { 828, 504, 1, "_root-505", -1, 1, 0, 0, },
+ { 828, 505, 1, "_root-506", -1, 1, 0, 0, },
+ { 828, 506, 1, "_root-507", -1, 1, 0, 0, },
+ { 828, 507, 1, "_root-508", -1, 1, 0, 0, },
+ { 828, 508, 1, "_root-509", -1, 1, 0, 0, },
+ { 828, 509, 1, "_root-510", -1, 1, 0, 0, },
+ { 828, 510, 1, "_root-511", -1, 1, 0, 0, },
+ { 828, 511, 1, "_root-512", -1, 1, 0, 0, },
+ { 828, 512, 1, "_root-513", -1, 1, 0, 0, },
+ { 828, 513, 1, "_root-514", -1, 1, 0, 0, },
+ { 828, 514, 1, "_root-515", -1, 1, 0, 0, },
+ { 828, 515, 1, "_root-516", -1, 1, 0, 0, },
+ { 828, 516, 1, "_root-517", -1, 1, 0, 0, },
+ { 828, 517, 1, "_root-518", -1, 1, 0, 0, },
+ { 828, 518, 1, "_root-519", -1, 1, 0, 0, },
+ { 828, 519, 1, "_root-520", -1, 1, 0, 0, },
+ { 828, 520, 1, "_root-521", -1, 1, 0, 0, },
+ { 828, 521, 1, "_root-522", -1, 1, 0, 0, },
+ { 828, 522, 1, "_root-523", -1, 1, 0, 0, },
+ { 828, 523, 1, "_root-524", -1, 1, 0, 0, },
+ { 828, 524, 1, "_root-525", -1, 1, 0, 0, },
+ { 828, 525, 1, "_root-526", -1, 1, 0, 0, },
+ { 828, 526, 1, "_root-527", -1, 1, 0, 0, },
+ { 828, 527, 1, "_root-528", -1, 1, 0, 0, },
+ { 828, 528, 1, "_root-529", -1, 1, 0, 0, },
+ { 828, 529, 1, "_root-530", -1, 1, 0, 0, },
+ { 828, 530, 1, "_root-531", -1, 1, 0, 0, },
+ { 828, 531, 1, "_root-532", -1, 1, 0, 0, },
+ { 828, 532, 1, "_root-533", -1, 1, 0, 0, },
+ { 828, 533, 1, "_root-534", -1, 1, 0, 0, },
+ { 828, 534, 1, "_root-535", -1, 1, 0, 0, },
+ { 828, 535, 1, "_root-536", -1, 1, 0, 0, },
+ { 828, 536, 1, "_root-537", -1, 1, 0, 0, },
+ { 828, 537, 1, "_root-538", -1, 1, 0, 0, },
+ { 828, 538, 1, "_root-539", -1, 1, 0, 0, },
+ { 828, 539, 1, "_root-540", -1, 1, 0, 0, },
+ { 828, 540, 1, "_root-541", -1, 1, 0, 0, },
+ { 828, 541, 1, "_root-542", -1, 1, 0, 0, },
+ { 828, 542, 1, "_root-543", -1, 1, 0, 0, },
+ { 828, 543, 1, "_root-544", -1, 1, 0, 0, },
+ { 828, 544, 1, "_root-545", -1, 1, 0, 0, },
+ { 828, 545, 1, "_root-546", -1, 1, 0, 0, },
+ { 828, 546, 1, "_root-547", -1, 1, 0, 0, },
+ { 828, 547, 1, "_root-548", -1, 1, 0, 0, },
+ { 828, 548, 1, "_root-549", -1, 1, 0, 0, },
+ { 828, 549, 1, "_root-550", -1, 1, 0, 0, },
+ { 828, 550, 1, "_root-551", -1, 1, 0, 0, },
+ { 828, 551, 1, "_root-552", -1, 1, 0, 0, },
+ { 828, 552, 1, "_root-553", -1, 1, 0, 0, },
+ { 828, 553, 1, "_root-554", -1, 1, 0, 0, },
+ { 828, 554, 1, "_root-555", -1, 1, 0, 0, },
+ { 828, 555, 1, "_root-556", -1, 1, 0, 0, },
+ { 828, 556, 1, "_root-557", -1, 1, 0, 0, },
+ { 828, 557, 1, "_root-558", -1, 1, 0, 0, },
+ { 828, 558, 1, "_root-559", -1, 1, 0, 0, },
+ { 828, 559, 1, "_root-560", -1, 1, 0, 0, },
+ { 828, 560, 1, "_root-561", -1, 1, 0, 0, },
+ { 828, 561, 1, "_root-562", -1, 1, 0, 0, },
+ { 828, 562, 1, "_root-563", -1, 1, 0, 0, },
+ { 828, 563, 1, "_root-564", -1, 1, 0, 0, },
+ { 828, 564, 1, "_root-565", -1, 1, 0, 0, },
+ { 828, 565, 1, "_root-566", -1, 1, 0, 0, },
+ { 828, 566, 1, "_root-567", -1, 1, 0, 0, },
+ { 828, 567, 1, "_root-568", -1, 1, 0, 0, },
+ { 828, 568, 1, "_root-569", -1, 1, 0, 0, },
+ { 828, 569, 1, "_root-570", -1, 1, 0, 0, },
+ { 828, 570, 1, "_root-571", -1, 1, 0, 0, },
+ { 828, 571, 1, "_root-572", -1, 1, 0, 0, },
+ { 828, 572, 1, "_root-573", -1, 1, 0, 0, },
+ { 828, 573, 1, "_root-574", -1, 1, 0, 0, },
+ { 828, 574, 1, "_root-575", -1, 1, 0, 0, },
+ { 828, 575, 1, "_root-576", -1, 1, 0, 0, },
+ { 828, 576, 1, "_root-577", -1, 1, 0, 0, },
+ { 828, 577, 1, "_root-578", -1, 1, 0, 0, },
+ { 828, 578, 1, "_root-579", -1, 1, 0, 0, },
+ { 828, 579, 1, "_root-580", -1, 1, 0, 0, },
+ { 828, 580, 1, "_root-581", -1, 1, 0, 0, },
+ { 828, 581, 1, "_root-582", -1, 1, 0, 0, },
+ { 828, 582, 1, "_root-583", -1, 1, 0, 0, },
+ { 828, 583, 1, "_root-584", -1, 1, 0, 0, },
+ { 828, 584, 1, "_root-585", -1, 1, 0, 0, },
+ { 828, 585, 1, "_root-586", -1, 1, 0, 0, },
+ { 828, 586, 1, "_root-587", -1, 1, 0, 0, },
+ { 828, 587, 1, "_root-588", -1, 1, 0, 0, },
+ { 828, 588, 1, "_root-589", -1, 1, 0, 0, },
+ { 828, 589, 1, "_root-590", -1, 1, 0, 0, },
+ { 828, 590, 1, "_root-591", -1, 1, 0, 0, },
+ { 828, 591, 1, "_root-592", -1, 1, 0, 0, },
+ { 828, 592, 1, "_root-593", -1, 1, 0, 0, },
+ { 828, 593, 1, "_root-594", -1, 1, 0, 0, },
+ { 828, 594, 1, "_root-595", -1, 1, 0, 0, },
+ { 828, 595, 1, "_root-596", -1, 1, 0, 0, },
+ { 828, 596, 1, "_root-597", -1, 1, 0, 0, },
+ { 828, 597, 1, "_root-598", -1, 1, 0, 0, },
+ { 828, 598, 1, "_root-599", -1, 1, 0, 0, },
+ { 828, 599, 1, "_root-600", -1, 1, 0, 0, },
+ { 828, 600, 1, "_root-601", -1, 1, 0, 0, },
+ { 828, 601, 1, "_root-602", -1, 1, 0, 0, },
+ { 828, 602, 1, "_root-603", -1, 1, 0, 0, },
+ { 828, 603, 1, "_root-604", -1, 1, 0, 0, },
+ { 828, 604, 1, "_root-605", -1, 1, 0, 0, },
+ { 828, 605, 1, "_root-606", -1, 1, 0, 0, },
+ { 828, 606, 1, "_root-607", -1, 1, 0, 0, },
+ { 828, 607, 1, "_root-608", -1, 1, 0, 0, },
+ { 828, 608, 1, "_root-609", -1, 1, 0, 0, },
+ { 828, 609, 1, "_root-610", -1, 1, 0, 0, },
+ { 828, 610, 1, "_root-611", -1, 1, 0, 0, },
+ { 828, 611, 1, "_root-612", -1, 1, 0, 0, },
+ { 828, 612, 1, "_root-613", -1, 1, 0, 0, },
+ { 828, 613, 1, "_root-614", -1, 1, 0, 0, },
+ { 828, 614, 1, "_root-615", -1, 1, 0, 0, },
+ { 828, 615, 1, "_root-616", -1, 1, 0, 0, },
+ { 828, 616, 1, "_root-617", -1, 1, 0, 0, },
+ { 828, 617, 1, "_root-618", -1, 1, 0, 0, },
+ { 828, 618, 1, "_root-619", -1, 1, 0, 0, },
+ { 828, 619, 1, "_root-620", -1, 1, 0, 0, },
+ { 828, 620, 1, "_root-621", -1, 1, 0, 0, },
+ { 828, 621, 1, "_root-622", -1, 1, 0, 0, },
+ { 828, 622, 1, "_root-623", -1, 1, 0, 0, },
+ { 828, 623, 1, "_root-624", -1, 1, 0, 0, },
+ { 828, 624, 1, "_root-625", -1, 1, 0, 0, },
+ { 828, 625, 1, "_root-626", -1, 1, 0, 0, },
+ { 828, 626, 1, "_root-627", -1, 1, 0, 0, },
+ { 828, 627, 1, "_root-628", -1, 1, 0, 0, },
+ { 828, 628, 1, "_root-629", -1, 1, 0, 0, },
+ { 828, 629, 1, "_root-630", -1, 1, 0, 0, },
+ { 828, 630, 1, "_root-631", -1, 1, 0, 0, },
+ { 828, 631, 1, "_root-632", -1, 1, 0, 0, },
+ { 828, 632, 1, "_root-633", -1, 1, 0, 0, },
+ { 828, 633, 1, "_root-634", -1, 1, 0, 0, },
+ { 828, 634, 1, "_root-635", -1, 1, 0, 0, },
+ { 828, 635, 1, "_root-636", -1, 1, 0, 0, },
+ { 828, 636, 1, "_root-637", -1, 1, 0, 0, },
+ { 828, 637, 1, "_root-638", -1, 1, 0, 0, },
+ { 828, 638, 1, "_root-639", -1, 1, 0, 0, },
+ { 828, 639, 1, "_root-640", -1, 1, 0, 0, },
+ { 828, 640, 1, "_root-641", -1, 1, 0, 0, },
+ { 828, 641, 1, "_root-642", -1, 1, 0, 0, },
+ { 828, 642, 1, "_root-643", -1, 1, 0, 0, },
+ { 828, 643, 1, "_root-644", -1, 1, 0, 0, },
+ { 828, 644, 1, "_root-645", -1, 1, 0, 0, },
+ { 828, 645, 1, "_root-646", -1, 1, 0, 0, },
+ { 828, 646, 1, "_root-647", -1, 1, 0, 0, },
+ { 828, 647, 1, "_root-648", -1, 1, 0, 0, },
+ { 828, 648, 1, "_root-649", -1, 1, 0, 0, },
+ { 828, 649, 1, "_root-650", -1, 1, 0, 0, },
+ { 828, 650, 1, "_root-651", -1, 1, 0, 0, },
+ { 828, 651, 1, "_root-652", -1, 1, 0, 0, },
+ { 828, 652, 1, "_root-653", -1, 1, 0, 0, },
+ { 828, 653, 1, "_root-654", -1, 1, 0, 0, },
+ { 828, 654, 1, "_root-655", -1, 1, 0, 0, },
+ { 828, 655, 1, "_root-656", -1, 1, 0, 0, },
+ { 828, 656, 1, "_root-657", -1, 1, 0, 0, },
+ { 828, 657, 1, "_root-658", -1, 1, 0, 0, },
+ { 828, 658, 1, "_root-659", -1, 1, 0, 0, },
+ { 828, 659, 1, "_root-660", -1, 1, 0, 0, },
+ { 828, 660, 1, "_root-661", -1, 1, 0, 0, },
+ { 828, 661, 1, "_root-662", -1, 1, 0, 0, },
+ { 828, 662, 1, "_root-663", -1, 1, 0, 0, },
+ { 828, 663, 1, "_root-664", -1, 1, 0, 0, },
+ { 828, 664, 1, "_root-665", -1, 1, 0, 0, },
+ { 828, 665, 1, "_root-666", -1, 1, 0, 0, },
+ { 828, 666, 1, "_root-667", -1, 1, 0, 0, },
+ { 828, 667, 1, "_root-668", -1, 1, 0, 0, },
+ { 828, 668, 1, "_root-669", -1, 1, 0, 0, },
+ { 828, 669, 1, "_root-670", -1, 1, 0, 0, },
+ { 828, 670, 1, "_root-671", -1, 1, 0, 0, },
+ { 828, 671, 1, "_root-672", -1, 1, 0, 0, },
+ { 828, 672, 1, "_root-673", -1, 1, 0, 0, },
+ { 828, 673, 1, "_root-674", -1, 1, 0, 0, },
+ { 828, 674, 1, "_root-675", -1, 1, 0, 0, },
+ { 828, 675, 1, "_root-676", -1, 1, 0, 0, },
+ { 828, 676, 1, "_root-677", -1, 1, 0, 0, },
+ { 828, 677, 1, "_root-678", -1, 1, 0, 0, },
+ { 828, 678, 1, "_root-679", -1, 1, 0, 0, },
+ { 828, 679, 1, "_root-680", -1, 1, 0, 0, },
+ { 828, 680, 1, "_root-681", -1, 1, 0, 0, },
+ { 828, 681, 1, "_root-682", -1, 1, 0, 0, },
+ { 828, 682, 1, "_root-683", -1, 1, 0, 0, },
+ { 828, 683, 1, "_root-684", -1, 1, 0, 0, },
+ { 828, 684, 1, "_root-685", -1, 1, 0, 0, },
+ { 828, 685, 1, "_root-686", -1, 1, 0, 0, },
+ { 828, 686, 1, "_root-687", -1, 1, 0, 0, },
+ { 828, 687, 1, "_root-688", -1, 1, 0, 0, },
+ { 828, 688, 1, "_root-689", -1, 1, 0, 0, },
+ { 828, 689, 1, "_root-690", -1, 1, 0, 0, },
+ { 828, 690, 1, "_root-691", -1, 1, 0, 0, },
+ { 828, 691, 1, "_root-692", -1, 1, 0, 0, },
+ { 828, 692, 1, "_root-693", -1, 1, 0, 0, },
+ { 828, 693, 1, "_root-694", -1, 1, 0, 0, },
+ { 828, 694, 1, "_root-695", -1, 1, 0, 0, },
+ { 828, 695, 1, "_root-696", -1, 1, 0, 0, },
+ { 828, 696, 1, "_root-697", -1, 1, 0, 0, },
+ { 828, 697, 1, "_root-698", -1, 1, 0, 0, },
+ { 828, 698, 1, "_root-699", -1, 1, 0, 0, },
+ { 828, 699, 1, "_root-700", -1, 1, 0, 0, },
+ { 828, 700, 1, "_root-701", -1, 1, 0, 0, },
+ { 828, 701, 1, "_root-702", -1, 1, 0, 0, },
+ { 828, 702, 1, "_root-703", -1, 1, 0, 0, },
+ { 828, 703, 1, "_root-704", -1, 1, 0, 0, },
+ { 828, 704, 1, "_root-705", -1, 1, 0, 0, },
+ { 828, 705, 1, "_root-706", -1, 1, 0, 0, },
+ { 828, 706, 1, "_root-707", -1, 1, 0, 0, },
+ { 828, 707, 1, "_root-708", -1, 1, 0, 0, },
+ { 828, 708, 1, "_root-709", -1, 1, 0, 0, },
+ { 828, 709, 1, "_root-710", -1, 1, 0, 0, },
+ { 828, 710, 1, "_root-711", -1, 1, 0, 0, },
+ { 828, 711, 1, "_root-712", -1, 1, 0, 0, },
+ { 828, 712, 1, "_root-713", -1, 1, 0, 0, },
+ { 828, 713, 1, "_root-714", -1, 1, 0, 0, },
+ { 828, 714, 1, "_root-715", -1, 1, 0, 0, },
+ { 828, 715, 1, "_root-716", -1, 1, 0, 0, },
+ { 828, 716, 1, "_root-717", -1, 1, 0, 0, },
+ { 828, 717, 1, "_root-718", -1, 1, 0, 0, },
+ { 828, 718, 1, "_root-719", -1, 1, 0, 0, },
+ { 828, 719, 1, "_root-720", -1, 1, 0, 0, },
+ { 828, 720, 1, "_root-721", -1, 1, 0, 0, },
+ { 828, 721, 1, "_root-722", -1, 1, 0, 0, },
+ { 828, 722, 1, "_root-723", -1, 1, 0, 0, },
+ { 828, 723, 1, "_root-724", -1, 1, 0, 0, },
+ { 828, 724, 1, "_root-725", -1, 1, 0, 0, },
+ { 828, 725, 1, "_root-726", -1, 1, 0, 0, },
+ { 828, 726, 1, "_root-727", -1, 1, 0, 0, },
+ { 828, 727, 1, "_root-728", -1, 1, 0, 0, },
+ { 828, 728, 1, "_root-729", -1, 1, 0, 0, },
+ { 828, 729, 1, "_root-730", -1, 1, 0, 0, },
+ { 828, 730, 1, "_root-731", -1, 1, 0, 0, },
+ { 828, 731, 1, "_root-732", -1, 1, 0, 0, },
+ { 828, 732, 1, "_root-733", -1, 1, 0, 0, },
+ { 828, 733, 1, "_root-734", -1, 1, 0, 0, },
+ { 828, 734, 1, "_root-735", -1, 1, 0, 0, },
+ { 828, 735, 1, "_root-736", -1, 1, 0, 0, },
+ { 828, 736, 1, "_root-737", -1, 1, 0, 0, },
+ { 828, 737, 1, "_root-738", -1, 1, 0, 0, },
+ { 828, 738, 1, "_root-739", -1, 1, 0, 0, },
+ { 828, 739, 1, "_root-740", -1, 1, 0, 0, },
+ { 828, 740, 1, "_root-741", -1, 1, 0, 0, },
+ { 828, 741, 1, "_root-742", -1, 1, 0, 0, },
+ { 828, 742, 1, "_root-743", -1, 1, 0, 0, },
+ { 828, 743, 1, "_root-744", -1, 1, 0, 0, },
+ { 828, 744, 1, "_root-745", -1, 1, 0, 0, },
+ { 828, 745, 1, "_root-746", -1, 1, 0, 0, },
+ { 828, 746, 1, "_root-747", -1, 1, 0, 0, },
+ { 828, 747, 1, "_root-748", -1, 1, 0, 0, },
+ { 828, 748, 1, "_root-749", -1, 1, 0, 0, },
+ { 828, 749, 1, "_root-750", -1, 1, 0, 0, },
+ { 828, 750, 1, "_root-751", -1, 1, 0, 0, },
+ { 828, 751, 1, "_root-752", -1, 1, 0, 0, },
+ { 828, 752, 1, "_root-753", -1, 1, 0, 0, },
+ { 828, 753, 1, "_root-754", -1, 1, 0, 0, },
+ { 828, 754, 1, "_root-755", -1, 1, 0, 0, },
+ { 828, 755, 1, "_root-756", -1, 1, 0, 0, },
+ { 828, 756, 1, "_root-757", -1, 1, 0, 0, },
+ { 828, 757, 1, "_root-758", -1, 1, 0, 0, },
+ { 828, 758, 1, "_root-759", -1, 1, 0, 0, },
+ { 828, 759, 1, "_root-760", -1, 1, 0, 0, },
+ { 828, 760, 1, "_root-761", -1, 1, 0, 0, },
+ { 828, 761, 1, "_root-762", -1, 1, 0, 0, },
+ { 828, 762, 1, "_root-763", -1, 1, 0, 0, },
+ { 828, 763, 1, "_root-764", -1, 1, 0, 0, },
+ { 828, 764, 1, "_root-765", -1, 1, 0, 0, },
+ { 828, 765, 1, "_root-766", -1, 1, 0, 0, },
+ { 828, 766, 1, "_root-767", -1, 1, 0, 0, },
+ { 828, 767, 1, "_root-768", -1, 1, 0, 0, },
+ { 828, 768, 1, "_root-769", -1, 1, 0, 0, },
+ { 828, 769, 1, "_root-770", -1, 1, 0, 0, },
+ { 828, 770, 1, "_root-771", -1, 1, 0, 0, },
+ { 828, 771, 1, "_root-772", -1, 1, 0, 0, },
+ { 828, 772, 1, "_root-773", -1, 1, 0, 0, },
+ { 828, 773, 1, "_root-774", -1, 1, 0, 0, },
+ { 828, 774, 1, "_root-775", -1, 1, 0, 0, },
+ { 828, 775, 1, "_root-776", -1, 1, 0, 0, },
+ { 828, 776, 1, "_root-777", -1, 1, 0, 0, },
+ { 828, 777, 1, "_root-778", -1, 1, 0, 0, },
+ { 828, 778, 1, "_root-779", -1, 1, 0, 0, },
+ { 828, 779, 1, "_root-780", -1, 1, 0, 0, },
+ { 828, 780, 1, "_root-781", -1, 1, 0, 0, },
+ { 828, 781, 1, "_root-782", -1, 1, 0, 0, },
+ { 828, 782, 1, "_root-783", -1, 1, 0, 0, },
+ { 828, 783, 1, "_root-784", -1, 1, 0, 0, },
+ { 828, 784, 1, "_root-785", -1, 1, 0, 0, },
+ { 828, 785, 1, "_root-786", -1, 1, 0, 0, },
+ { 828, 786, 1, "_root-787", -1, 1, 0, 0, },
+ { 828, 787, 1, "_root-788", -1, 1, 0, 0, },
+ { 828, 788, 1, "_root-789", -1, 1, 0, 0, },
+ { 828, 789, 1, "_root-790", -1, 1, 0, 0, },
+ { 828, 790, 1, "_root-791", -1, 1, 0, 0, },
+ { 828, 791, 1, "_root-792", -1, 1, 0, 0, },
+ { 828, 792, 1, "_root-793", -1, 1, 0, 0, },
+ { 828, 793, 1, "_root-794", -1, 1, 0, 0, },
+ { 828, 794, 1, "_root-795", -1, 1, 0, 0, },
+ { 828, 795, 1, "_root-796", -1, 1, 0, 0, },
+ { 828, 796, 1, "_root-797", -1, 1, 0, 0, },
+ { 828, 797, 1, "_root-798", -1, 1, 0, 0, },
+ { 828, 798, 1, "_root-799", -1, 1, 0, 0, },
+ { 828, 799, 1, "_root-800", -1, 1, 0, 0, },
+ { 828, 800, 1, "_root-801", -1, 1, 0, 0, },
+ { 828, 801, 1, "_root-802", -1, 1, 0, 0, },
+ { 828, 802, 1, "_root-803", -1, 1, 0, 0, },
+ { 828, 803, 1, "_root-804", -1, 1, 0, 0, },
+ { 828, 804, 1, "_root-805", -1, 1, 0, 0, },
+ { 828, 805, 1, "_root-806", -1, 1, 0, 0, },
+ { 828, 806, 1, "_root-807", -1, 1, 0, 0, },
+ { 828, 807, 1, "_root-808", -1, 1, 0, 0, },
+ { 828, 808, 1, "_root-809", -1, 1, 0, 0, },
+ { 828, 809, 1, "_root-810", -1, 1, 0, 0, },
+ { 828, 810, 1, "_root-811", -1, 1, 0, 0, },
+ { 828, 811, 1, "_root-812", -1, 1, 0, 0, },
+ { 828, 812, 1, "_root-813", -1, 1, 0, 0, },
+ { 828, 813, 1, "_root-814", -1, 1, 0, 0, },
+ { 828, 814, 1, "_root-815", -1, 1, 0, 0, },
+ { 828, 815, 1, "_root-816", -1, 1, 0, 0, },
+ { 828, 816, 1, "_root-817", -1, 1, 0, 0, },
+ { 828, 817, 1, "_root-818", -1, 1, 0, 0, },
+ { 828, 818, 1, "_root-819", -1, 1, 0, 0, },
+ { 828, 819, 1, "_root-820", -1, 1, 0, 0, },
+ { 828, 820, 1, "_root-821", -1, 1, 0, 0, },
+ { 828, 821, 1, "_root-822", -1, 1, 0, 0, },
+ { 828, 822, 1, "_root-823", -1, 1, 0, 0, },
+ { 828, 823, 1, "_root-824", -1, 1, 0, 0, },
+ { 828, 824, 1, "_root-825", -1, 1, 0, 0, },
+ { 828, 825, 1, "_root-826", -1, 1, 0, 0, },
+ { 828, 826, 1, "_root-827", -1, 1, 0, 0, },
+ { 828, 827, 1, "_root-828", -1, 1, 0, 0, }
+};
+
+static PatConsInfo parser_patReplInfo[] = {
+ { 0, 0 },
+};
+
+static PatConsNode parser_patReplNodes[] = {
+ { 811, 0, -1, -1, 0, 0, 0, -1, -1, 0 },
+};
+
+static FunctionInfo parser_functionInfo[] = {
+
+};
+
+static RegionInfo parser_regionInfo[] = {
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 140 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 141 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 142 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 143 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 144 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 0 },
+ { -1, -1, 145 }
+};
+
+static GenericInfo parser_genericInfo[] = {
+ { 0, 0, 0, 0, 0, 0 },
+ { 19, 2, 0, 0, 811, 0 },
+ { 16, 2, 0, 0, 827, -1 },
+};
+
+static const char *parser_litdata[] = {
+ "r",
+};
+
+static long parser_litlen[] = {
+ 1, };
+
+static Head *parser_literals[] = {
+ 0, };
+
+static int startStates[] = {
+ 0, 1, };
+
+static int eofLelIds[] = {
+ 422, 546, };
+
+static int parserLelIds[] = {
+ 697, 811, };
+
+static CaptureAttr captureAttr[] = {
+};
+
+RuntimeData colm_object =
+{
+ parser_lelInfo,
+ 829,
+
+ parser_prodInfo,
+ 1176,
+
+ parser_regionInfo,
+ 25,
+
+ parser_rootCode,
+ 75,
+ 0,
+
+ parser_frameInfo,
+ 1,
+
+ parser_functionInfo,
+ 0,
+
+ parser_patReplInfo,
+ 1,
+
+ parser_patReplNodes,
+ 1,
+
+ parser_genericInfo,
+ 3,
+ 2,
+
+ parser_litdata,
+ parser_litlen,
+ parser_literals,
+ 1,
+
+ captureAttr,
+ 0,
+
+ &fsmTables_start,
+ &pid_0_pdaTables,
+ startStates, eofLelIds, parserLelIds, 2,
+
+ 3,
+
+ 696,
+ 4,
+ 5,
+ 696,
+ 0,
+ 695,
+ &fsmExecute,
+ &sendNamedLangEl,
+ &initBindings,
+ &popBinding,
+};
+
diff --git a/src/parsedata.h b/src/parsedata.h
new file mode 100644
index 0000000..cbbe5b9
--- /dev/null
+++ b/src/parsedata.h
@@ -0,0 +1,1022 @@
+/*
+ * Copyright 2001-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _PARSEDATA_H
+#define _PARSEDATA_H
+
+#include <iostream>
+#include <limits.h>
+#include "bstset.h"
+#include "global.h"
+#include "avlmap.h"
+#include "avlset.h"
+#include "bstmap.h"
+#include "vector.h"
+#include "dlist.h"
+#include "dlistmel.h"
+#include "fsmgraph.h"
+#include "compare.h"
+#include "vector.h"
+#include "keyops.h"
+#include "parsetree.h"
+#include "cstring.h"
+#include "pdagraph.h"
+#include "compare.h"
+#include "pdarun.h"
+#include "bytecode.h"
+#include "program.h"
+
+using std::ostream;
+
+struct exit_object { };
+extern exit_object endp;
+void operator<<( std::ostream &out, exit_object & );
+
+/* Forwards. */
+struct RedFsm;
+struct LangEl;
+struct Compiler;
+struct PdaCodeGen;
+struct FsmCodeGen;
+
+#define SHIFT_CODE 0x1
+#define REDUCE_CODE 0x2
+#define SHIFT_REDUCE_CODE 0x3
+
+/* This is used for tracking the current stack of include file/machine pairs. It is
+ * is used to detect and recursive include structure. */
+struct IncludeStackItem
+{
+ IncludeStackItem( const char *fileName )
+ : fileName(fileName) {}
+
+ const char *fileName;
+};
+
+typedef Vector<IncludeStackItem> IncludeStack;
+typedef Vector<const char *> ArgsVector;
+
+extern ArgsVector includePaths;
+
+inline long makeReduceCode( long reduction, bool isShiftReduce )
+{
+ return ( isShiftReduce ? SHIFT_REDUCE_CODE : REDUCE_CODE ) |
+ ( reduction << 2 );
+}
+
+struct ProdEl;
+struct ProdElList;
+struct PdaLiteral;
+struct Production;
+
+/* A pointer to this is in PdaRun, but it's specification is not known by the
+ * runtime code. The runtime functions that access it are defined in
+ * ctinput.cpp and stubbed in fsmcodegen.cpp */
+struct Bindings
+ : public Vector<ParseTree*>
+{};
+
+struct DefListEl { Production *prev, *next; };
+struct LelDefListEl { Production *prev, *next; };
+typedef Vector< LangEl* > LangElVect;
+typedef Vector< ProdEl* > FactorVect;
+
+typedef AvlMap<String, long, CmpStr> StringMap;
+typedef AvlMapEl<String, long> StringMapEl;
+
+enum PredType {
+ PredLeft,
+ PredRight,
+ PredNonassoc,
+ PredNone
+};
+
+struct PredDecl
+{
+ PredDecl( TypeRef *typeRef, long predValue )
+ : typeRef(typeRef), predValue(predValue)
+ {}
+
+ TypeRef *typeRef;
+ PredType predType;
+ long predValue;
+
+ PredDecl *prev, *next;
+};
+
+typedef DList<PredDecl> PredDeclList;
+
+/* Graph dictionary. */
+struct Production
+:
+ public DefListEl, public LelDefListEl
+{
+ Production()
+ :
+ loc(loc), prodName(0), prodElList(0), prodCommit(false), redBlock(0),
+ prodId(0), prodNum(0), fsm(0), fsmLength(0), uniqueEmptyLeader(0),
+ isLeftRec(false), localFrame(0), lhsField(0), predOf(0) {}
+
+ static Production* cons( const InputLoc &loc, LangEl *prodName, ProdElList *prodElList,
+ String name, bool prodCommit, CodeBlock *redBlock, int prodId, int prodNum )
+ {
+ Production *p = new Production;
+ p->loc = loc;
+ p->prodName = prodName;
+ p->name = name;
+ p->prodElList = prodElList;
+ p->prodCommit = prodCommit;
+ p->redBlock = redBlock;
+ p->prodId = prodId;
+ p->prodNum = prodNum;
+ return p;
+ }
+
+ InputLoc loc;
+ LangEl *prodName;
+ ProdElList *prodElList;
+ String name;
+ bool prodCommit;
+
+ CodeBlock *redBlock;
+
+ int prodId;
+ int prodNum;
+
+ PdaGraph *fsm;
+ int fsmLength;
+ String data;
+ LongSet reducesTo;
+
+ LangEl *uniqueEmptyLeader;
+
+ ProdIdSet nonTermFirstSet;
+ AlphSet firstSet;
+ bool isLeftRec;
+
+ ObjectDef *localFrame;
+ ObjectField *lhsField;
+
+ LangEl *predOf;
+
+ UnsignedCharVect copy;
+};
+
+struct CmpDefById
+{
+ static int compare( Production *d1, Production *d2 )
+ {
+ if ( d1->prodId < d2->prodId )
+ return -1;
+ else if ( d1->prodId > d2->prodId )
+ return 1;
+ else
+ return 0;
+ }
+};
+
+
+/* Map dotItems to productions. */
+typedef BstMap< int, Production*, CmpOrd<int> > DotItemIndex;
+typedef BstMapEl< int, Production*> DotItemIndexEl;
+
+struct DefList
+:
+ public DListMel<Production, DefListEl>
+{};
+
+/* A vector of production vectors. Each non terminal can have many productions. */
+struct LelDefList
+:
+ public DListMel<Production, LelDefListEl>
+{};
+
+/* A set of machines made during a closure round. */
+typedef Vector< PdaGraph* > Machines;
+
+/* List of language elements. */
+typedef DList<LangEl> LelList;
+
+typedef Vector< TokenInstance* > TokenInstanceVect;
+
+struct UniqueType;
+
+typedef Vector<LangEl*> LangElVect;
+typedef BstSet<LangEl*> LangElSet;
+
+/* A language element class. Can be a nonTerm or a term. */
+struct LangEl : public DListEl<LangEl>
+{
+ enum Type { Unknown, Term, NonTerm };
+
+ LangEl( Namespace *nspace, const String &name, Type type );
+ ~LangEl();
+
+ /* The region the language element was defined in. */
+ Namespace *nspace;
+
+ String name;
+ String lit;
+
+ String fullName;
+ String fullLit;
+
+ /* For referencing the type. */
+ String refName;
+
+ /* For declaring things inside the type. */
+ String declName;
+
+ String xmlTag;
+
+ Type type;
+ long id;
+ bool isContext;
+ String displayString;
+ long numAppearances;
+ bool commit;
+ bool isIgnore;
+ bool reduceFirst;
+ bool isLiteral;
+ bool isRepeat;
+ bool isList;
+ bool isOpt;
+ bool parseStop;
+ bool isEOF;
+
+ LangEl *repeatOf;
+
+ /* Productions from the language element if it is a non-terminal. */
+ LelDefList defList;
+
+ TokenDef *tokenDef;
+ Production *rootDef;
+ LangEl *termDup;
+ LangEl *eofLel;
+
+ PdaGraph *pdaGraph;
+ PdaTables *pdaTables;
+
+ PdaState *startState;
+
+ CodeBlock *transBlock;
+
+ ObjectDef *objectDef;
+
+ long thisSize;
+ long ofiOffset;
+
+ GenericType *generic;
+
+ long parserId;
+
+ PredType predType;
+ long predValue;
+
+ Context *contextDef;
+ Context *contextIn;
+ bool noPreIgnore;
+ bool noPostIgnore;
+ bool isZero;
+ RegionSet *regionSet;
+};
+
+struct ProdEl
+{
+ /* Language elements a factor node can be. */
+ enum Type {
+ LiteralType,
+ ReferenceType
+ };
+
+ /* Construct with a reference to a var def. */
+ ProdEl( Type type, const InputLoc &loc, ObjectField *captureField,
+ bool commit, TypeRef *typeRef, int priorVal )
+ :
+ type(type),
+ production(0),
+ captureField(captureField),
+ rhsElField(0),
+ commit(commit),
+ typeRef(typeRef),
+ langEl(0),
+ priorVal(priorVal)
+ {}
+
+ ProdEl( const InputLoc &loc, TypeRef *typeRef )
+ :
+ type(ReferenceType),
+ production(0),
+ captureField(0),
+ rhsElField(0),
+ commit(false),
+ typeRef(typeRef),
+ langEl(0),
+ priorVal(0)
+ {}
+
+ Type type;
+ Production *production;
+ int pos;
+ ObjectField *captureField;
+ ObjectField *rhsElField;
+ bool commit;
+ TypeRef *typeRef;
+ LangEl *langEl;
+ int priorVal;
+
+ ProdEl *prev, *next;
+};
+
+struct ProdElList : public DList<ProdEl>
+{
+ PdaGraph *walk( Compiler *pd, Production *prod );
+};
+
+/* This should be renamed. It is a literal string in a type reference. */
+struct PdaLiteral
+{
+ PdaLiteral( const InputLoc &loc, const String &data )
+ : loc(loc), data(data), value(0) { }
+
+ InputLoc loc;
+ String data;
+ long value;
+};
+
+/* Nodes in the tree that use this action. */
+typedef Vector<NameInst*> ActionRefs;
+
+/* Element in list of actions. Contains the string for the code to exectute. */
+struct Action
+:
+ public DListEl<Action>,
+ public AvlTreeEl<Action>
+{
+public:
+
+ static Action *cons( const InputLoc &loc, const String &name, InlineList *inlineList )
+ {
+ Action *a = new Action;
+ a->loc = (loc);
+ a->name = (name);
+ a->markType = (MarkNone);
+ a->objField = (0);
+ a->markId = (-1);
+ a->inlineList = (inlineList);
+ a->actionId = (-1);
+ a->numTransRefs = (0);
+ a->numToStateRefs = (0);
+ a->numFromStateRefs = (0);
+ a->numEofRefs = (0);
+ a->numCondRefs = (0);
+ a->anyCall = (false);
+ a->isLmAction = (false);
+ return a;
+ }
+
+ static Action *cons( MarkType markType, long markId )
+ {
+ Action *a = new Action;
+ a->name = ("mark");
+ a->markType = (markType);
+ a->objField = (0);
+ a->markId = (markId);
+ a->inlineList = (InlineList::cons());
+ a->actionId = (-1);
+ a->numTransRefs = (0);
+ a->numToStateRefs = (0);
+ a->numFromStateRefs = (0);
+ a->numEofRefs = (0);
+ a->numCondRefs = (0);
+ a->anyCall = (false);
+ a->isLmAction = (false);
+ return a;
+ }
+
+ /* Key for action dictionary. */
+ const String &getKey() const { return name; }
+
+ /* Data collected during parse. */
+ InputLoc loc;
+ String name;
+
+ MarkType markType;
+ ObjectField *objField;
+ long markId;
+
+ InlineList *inlineList;
+ int actionId;
+
+ void actionName( ostream &out )
+ {
+ if ( name != 0 )
+ out << name;
+ else
+ out << loc.line << ":" << loc.col;
+ }
+
+ /* Places in the input text that reference the action. */
+ ActionRefs actionRefs;
+
+ /* Number of references in the final machine. */
+ bool numRefs()
+ { return numTransRefs + numToStateRefs + numFromStateRefs + numEofRefs; }
+ int numTransRefs;
+ int numToStateRefs;
+ int numFromStateRefs;
+ int numEofRefs;
+ int numCondRefs;
+ bool anyCall;
+
+ bool isLmAction;
+};
+
+/* A list of actions. */
+typedef DList<Action> ActionList;
+
+struct VarDef;
+struct LexJoin;
+struct LexTerm;
+struct FactorAug;
+struct FactorLabel;
+struct FactorRep;
+struct FactorNeg;
+struct Factor;
+struct Literal;
+struct Range;
+struct RegExpr;
+struct ReItem;
+struct ReOrBlock;
+struct ReOrItem;
+struct TokenRegion;
+
+/* Tree of instantiated names. */
+typedef BstMapEl<String, NameInst*> NameMapEl;
+typedef BstMap<String, NameInst*, CmpStr> NameMap;
+typedef Vector<NameInst*> NameVect;
+typedef BstSet<NameInst*> NameSet;
+
+/* Node in the tree of instantiated names. */
+struct NameInst
+{
+ NameInst( int id )
+ : id(id) {}
+
+ int id;
+
+ /* Pointers for the name search queue. */
+ NameInst *prev, *next;
+};
+
+typedef DList<NameInst> NameInstList;
+
+/* Stack frame used in walking the name tree. */
+struct NameFrame
+{
+ NameInst *prevNameInst;
+ int prevNameChild;
+ NameInst *prevLocalScope;
+};
+
+/* Class to collect information about the machine during the
+ * parse of input. */
+struct Compiler
+{
+ /* Create a new parse data object. This is done at the beginning of every
+ * fsm specification. */
+ Compiler();
+ ~Compiler();
+
+ /*
+ * Setting up the graph dict.
+ */
+
+ void compileLiteralTokens();
+ void initEmptyScanners();
+ void initEmptyScanner( RegionSet *regionSet, TokenRegion *reg );
+ void initUniqueTypes();
+
+ /* Initialize a graph dict with the basic fsms. */
+ void initGraphDict();
+ void createBuiltin( const char *name, BuiltinMachine builtin );
+
+ /* Make a name id in the current name instantiation scope if it is not
+ * already there. */
+ NameInst *makeJoinNameTree( LexJoin *join );
+ NameInst *makeNameTree();
+ NameInst **makeNameIndex();
+
+ void printNameTree( NameInst *rootName );
+ void printNameIndex( NameInst **nameIndex );
+
+ /* Resove name references in action code and epsilon transitions. */
+ NameSet resolvePart( NameInst *refFrom, const char *data, bool recLabelsOnly );
+ void resolveFrom( NameSet &result, NameInst *refFrom,
+ const NameRef &nameRef, int namePos );
+
+ /* Set the alphabet type. If type types are not valid returns false. */
+ bool setAlphType( char *s1, char *s2 );
+ bool setAlphType( char *s1 );
+
+ /* Unique actions. */
+ void removeDups( ActionTable &actionTable );
+ void removeActionDups( FsmGraph *graph );
+
+ /* Dumping the name instantiation tree. */
+ void printNameInst( NameInst *nameInst, int level );
+
+ /* Make the graph from a graph dict node. Does minimization. */
+ void finishGraphBuild( FsmGraph *graph );
+ FsmGraph *makeAllRegions();
+ FsmGraph *makeScanner();
+
+ void analyzeAction( Action *action, InlineList *inlineList );
+ void analyzeGraph( FsmGraph *graph );
+ void resolvePrecedence( PdaGraph *pdaGraph );
+ LangEl *predOf( PdaTrans *trans, long action );
+ bool precedenceSwap( long action1, long action2, LangEl *l1, LangEl *l2 );
+ bool precedenceRemoveBoth( LangEl *l1, LangEl *l2 );
+
+ void initLocalFrame( ObjectDef *localFrame );
+ void initAllFrameObjects();
+
+ void initKeyOps();
+
+ /*
+ * Data collected during the parse.
+ */
+
+ /* List of actions. Will be pasted into a switch statement. */
+ ActionList actionList;
+
+ /* The id of the next priority name and label. */
+ int nextPriorKey, nextNameId;
+
+ /* Alphabet type. */
+ HostType *userAlphType;
+ bool alphTypeSet;
+
+ /* Element type and get key expression. */
+ InlineList *getKeyExpr;
+ InlineList *accessExpr;
+ InlineList *curStateExpr;
+
+ /* The alphabet range. */
+ char *lowerNum, *upperNum;
+ Key lowKey, highKey;
+ InputLoc rangeLowLoc, rangeHighLoc;
+
+ /* Number of errors encountered parsing the fsm spec. */
+ int errorCount;
+
+ /* Counting the action and priority ordering. */
+ int curActionOrd;
+ int curPriorOrd;
+
+ /* Root of the name tree. */
+ NameInst *curNameInst;
+ int curNameChild;
+ NameInstList nameInstList;
+
+ /* The place where resolved epsilon transitions go. These cannot go into
+ * the parse tree because a single epsilon op can resolve more than once
+ * to different nameInsts if the machine it's in is used more than once. */
+ NameVect epsilonResolvedLinks;
+ int nextEpsilonResolvedLink;
+
+ /* Root of the name tree used for doing local name searches. */
+ NameInst *localNameScope;
+
+ void setLmInRetLoc( InlineList *inlineList );
+ void initLongestMatchData();
+
+ /* Counter for assigning ids to longest match items. */
+ int nextTokenId;
+
+ RegionImplList regionImplList;
+ RegionList regionList;
+ RegionSetList regionSetList;
+
+ NamespaceList namespaceList;
+
+ Action *newAction( const String &name, InlineList *inlineList );
+
+ Action *setTokStart;
+ int setTokStartOrd;
+
+ Action *initActId;
+ int initActIdOrd;
+
+ Action *setTokEnd;
+ int setTokEndOrd;
+
+ CodeBlock *rootCodeBlock;
+
+ void beginProcessing()
+ {
+ ::keyOps = &thisKeyOps;
+ }
+
+ KeyOps thisKeyOps;
+
+ UniqueType *mainReturnUT;
+
+ /* CONTEXT FREE */
+ ProdElList *makeProdElList( LangEl *langEl );
+ void wrapNonTerminals();
+ void makeDefinitionNames();
+ void noUndefindLangEls();
+ void declareBaseLangEls();
+ void makeLangElIds();
+ void makeLangElNames();
+ void makeTerminalWrappers();
+ void makeEofElements();
+ void makeIgnoreCollectors();
+ void resolvePrecedence();
+
+ void declarePass();
+ void resolvePass();
+
+ /* Parser generation. */
+ void advanceReductions( PdaGraph *pdaGraph );
+ void sortActions( PdaGraph *pdaGraph );
+ void addDupTerms( PdaGraph *pdaGraph );
+ void linkExpansions( PdaGraph *pdaGraph );
+ void lalr1FollowEpsilonOp( PdaGraph *pdaGraph );
+
+ void transferCommits( PdaGraph *pdaGraph, PdaTrans *trans, PdaState *state, long prodId );
+
+ void lalr1AddFollow2( PdaGraph *pdaGraph, PdaTrans *trans, FollowToAdd &followKeys );
+ void lalr1AddFollow1( PdaGraph *pdaGraph, PdaState *state );
+
+ void lalr1AddFollow2( PdaGraph *pdaGraph, PdaTrans *trans, long followKey, long prior );
+ void lalr1AddFollow1( PdaGraph *pdaGraph, PdaTrans *trans );
+
+ void lalr1AddFollowSets( PdaGraph *pdaGraph, LangElSet &parserEls );
+
+ void lr0BringInItem( PdaGraph *pdaGraph, PdaState *dest, PdaState *prodState,
+ PdaTrans *expandFrom, Production *prod );
+ void lr0InvokeClosure( PdaGraph *pdaGraph, PdaState *state );
+ void lr0CloseAllStates( PdaGraph *pdaGraph );
+
+ void lalr1GenerateParser( PdaGraph *pdaGraph, LangElSet &parserEls );
+
+ void reduceActions( PdaGraph *pdaGraph );
+
+ bool makeNonTermFirstSetProd( Production *prod, PdaState *state );
+ void makeNonTermFirstSets();
+
+ bool makeFirstSetProd( Production *prod, PdaState *state );
+ void makeFirstSets();
+
+ int findIndexOff( PdaTables *pdaTables, PdaGraph *pdaGraph, PdaState *state, int &currLen );
+ void trySetTime( PdaTrans *trans, long code, long &time );
+ void addRegion( PdaState *tabState, PdaTrans *pdaTrans, long pdaKey,
+ bool noPreIgnore, bool noPostIgnore );
+ PdaState *followProd( PdaState *tabState, PdaState *prodState );
+ void findFollow( AlphSet &result, PdaState *overTab,
+ PdaState *overSrc, Production *parentDef );
+ void pdaActionOrder( PdaGraph *pdaGraph, LangElSet &parserEls );
+ void pdaOrderFollow( LangEl *rootEl, PdaState *tabState,
+ PdaTrans *tabTrans, PdaTrans *srcTrans,
+ Production *parentDef, Production *definition, long &time );
+ void pdaOrderProd( LangEl *rootEl, PdaState *tabState,
+ PdaState *srcState, Production *parentDef, long &time );
+ void analyzeMachine( PdaGraph *pdaGraph, LangElSet &parserEls );
+
+ void makeProdFsms();
+ void insertUniqueEmptyProductions();
+ void printNonTermFirstSets();
+ void printFirstSets();
+
+ LangEl *makeRepeatProd( const InputLoc &loc, Namespace *nspace,
+ const String &repeatName, UniqueType *ut );
+ LangEl *makeListProd( const InputLoc &loc, Namespace *nspace,
+ const String &listName, UniqueType *ut );
+ LangEl *makeOptProd( const InputLoc &loc, Namespace *nspace,
+ const String &optName, UniqueType *ut );
+ void resolveProdEl( ProdEl *prodEl );
+ void resolveProductionEls();
+
+ void addMatchText( ObjectDef *frame, LangEl *lel );
+ void addMatchLength( ObjectDef *frame, LangEl *lel );
+ void addInput( ObjectDef *frame );
+ void addCtx( ObjectDef *frame );
+ void addTransTokVar( ObjectDef *frame, LangEl *lel );
+ void addProdRHSVars( ObjectDef *localFrame, ProdElList *prodElList );
+ void addProdRedObjectVar( ObjectDef *localFrame, LangEl *langEl );
+ void addProdObjects();
+
+ void addProdRHSLoads( Production *prod, CodeVect &code, long &insertPos );
+ void addProdLHSLoad( Production *prod, CodeVect &code, long &insertPos );
+ void addPushBackLHS( Production *prod, CodeVect &code, long &insertPos );
+
+ void prepGrammar();
+ PdaRun *parsePattern( Program *prg, Tree **sp, const InputLoc &loc,
+ int parserId, StreamImpl *sourceStream );
+ void parsePatterns();
+
+ void collectParserEls( LangElSet &parserEls );
+ void makeParser( LangElSet &parserEls );
+ PdaGraph *makePdaGraph( BstSet<LangEl*> &parserEls );
+ PdaTables *makePdaTables( PdaGraph *pdaGraph );
+
+ void fillInPatterns( Program *prg );
+ void makeRuntimeData();
+
+ /* Generate and write out the fsm. */
+ void generateGraphviz();
+
+ void verifyParseStopGrammar( LangEl *langEl, PdaGraph *pdaGraph );
+ void computeAdvanceReductions( LangEl *langEl, PdaGraph *pdaGraph );
+
+ void initFieldInstructions( ObjectField *el );
+ void initLocalInstructions( ObjectField *el );
+ void initLocalRefInstructions( ObjectField *el );
+
+ void initMapFunctions( GenericType *gen );
+ void initListField( GenericType *gen, const char *name, int offset );
+ void initListFields( GenericType *gen );
+ void initListFunctions( GenericType *gen );
+ void initVectorFunctions( GenericType *gen );
+ void initParserField( GenericType *gen, const char *name, int offset, TypeRef *typeRef );
+ void initParserFunctions( GenericType *gen );
+ void initParserFields( GenericType *gen );
+ void initCtxField( GenericType *gen );
+
+ void addStdin();
+ void addStdout();
+ void addStderr();
+ void addArgv();
+ void addError();
+ int argvOffset();
+ void initGlobalFunctions();
+ void makeDefaultIterators();
+ void addLengthField( ObjectDef *objDef, Code getLength );
+ ObjectDef *findObject( const String &name );
+ void initAllLanguageObjects();
+ void resolveListElementOf( ObjectDef *container, ObjectDef *obj, ElementOf *elof );
+ void resolveMapElementOf( ObjectDef *container, ObjectDef *obj, ElementOf *elof );
+ void resolveElementOf( ObjectDef *obj );
+ void makeFuncVisible( Function *func, bool isUserIter );
+ void initUserFunctions( Function *func, bool isUserIter );
+
+ void declareFunction( Function *func );
+ void declareReductionCode( Production *prod );
+ void declareTranslateBlock( LangEl *langEl );
+ void declarePreEof( TokenRegion *region );
+ void declareRootBlock();
+ void declareByteCode();
+
+ void resolveFunction( Function *func );
+ void resolvePreEof( TokenRegion *region );
+ void resolveRootBlock();
+ void resolveTranslateBlock( LangEl *langEl );
+ void resolveReductionCode( Production *prod );
+ void resolveParseTree();
+ void resolveGenericTypes();
+
+ void compileFunction( Function *func, CodeVect &code );
+ void compileFunction( Function *func );
+ void compileUserIter( Function *func, CodeVect &code );
+ void compileUserIter( Function *func );
+ void compilePreEof( TokenRegion *region );
+ void compileRootBlock();
+ void compileTranslateBlock( LangEl *langEl );
+ void findLocals( ObjectDef *localFrame, CodeBlock *block );
+ void makeProdCopies( Production *prod );
+ void compileReductionCode( Production *prod );
+ void removeNonUnparsableRepls();
+ void compileByteCode();
+
+ void resolveUses();
+ void generateOutput( long activeRealm );
+ void compile();
+
+ void openNameSpace( ostream &out, Namespace *nspace );
+ void closeNameSpace( ostream &out, Namespace *nspace );
+ void refNameSpace( LangEl *lel, Namespace *nspace );
+ void generateExports();
+ void generateExportsImpl();
+
+ LocalInfo *makeLocalInfo( Locals &locals );
+
+ /*
+ * Graphviz Generation
+ */
+ void writeTransList( PdaState *state );
+ void writeDotFile( PdaGraph *graph );
+ void writeDotFile( );
+
+
+ /*
+ * Data collected during the parse.
+ */
+
+ LelList langEls;
+ DefList prodList;
+
+ /* Dumping. */
+ DotItemIndex dotItemIndex;
+
+ PredDeclList predDeclList;
+
+ /* The name of the file the fsm is from, and the spec name. */
+ // EXISTS IN RL: char *fileName;
+ String parserName;
+ // EXISTS IN RL: InputLoc sectionLoc;
+
+ /* How to access the instance data. */
+ String access;
+
+ /* The name of the token structure. */
+ String tokenStruct;
+
+ GenericType *anyList;
+ GenericType *anyMap;
+ GenericType *anyVector;
+
+ LangEl *ptrLangEl;
+ LangEl *voidLangEl;
+ LangEl *boolLangEl;
+ LangEl *intLangEl;
+ LangEl *strLangEl;
+ LangEl *streamLangEl;
+ LangEl *anyLangEl;
+ LangEl *rootLangEl;
+ LangEl *noTokenLangEl;
+ LangEl *eofLangEl;
+ LangEl *errorLangEl;
+ LangEl *ignoreLangEl;
+
+ Namespace *rootNamespace;
+
+ int nextSymbolId;
+ int firstNonTermId;
+
+ LangEl **langElIndex;
+ PdaState *actionDestState;
+ DefSetSet prodSetSet;
+
+ Production **prodIdIndex;
+ AlphSet literalSet;
+
+ PatList patternList;
+ ConsList replList;
+ ParserTextList parserTextList;
+
+ ObjectDef *globalObjectDef;
+
+ VectorTypeIdMap vectorTypeIdMap;
+
+ UniqueType *findUniqueType( int typeId );
+ UniqueType *findUniqueType( int typeId, LangEl *langEl );
+ UniqueType *findUniqueType( int typeId, IterDef *iterDef );
+
+ UniqueType *uniqueTypeNil;
+ UniqueType *uniqueTypeVoid;
+ UniqueType *uniqueTypePtr;
+ UniqueType *uniqueTypeBool;
+ UniqueType *uniqueTypeInt;
+ UniqueType *uniqueTypeStr;
+ UniqueType *uniqueTypeStream;
+ UniqueType *uniqueTypeIgnore;
+ UniqueType *uniqueTypeAny;
+
+ UniqueTypeMap uniqeTypeMap;
+ UniqueRepeatMap uniqeRepeatMap;
+ UniqueMapMap uniqueMapMap;
+ UniqueListMap uniqueListMap;
+ UniqueVectorMap uniqueVectorMap;
+ UniqueParserMap uniqueParserMap;
+
+ void initStrObject();
+ void initStreamObject();
+ void initIntObject();
+ void initTokenObjects();
+
+ ObjectDef *intObj;
+ ObjectDef *strObj;
+ ObjectDef *streamObj;
+
+ FsmTables *fsmTables;
+ RuntimeData *runtimeData;
+
+ int nextPatConsId;
+ int nextGenericId;
+
+ FunctionList functionList;
+ int nextFuncId;
+
+ enum CompileContext {
+ CompileTranslation,
+ CompileReduction,
+ CompileFunction,
+ CompileRoot
+ };
+
+ CompileContext compileContext;
+ LongVect returnJumps;
+ LongVect breakJumps;
+ Function *curFunction;
+
+ /* Loops fill this in for return statements to use. */
+ CodeVect *loopCleanup;
+
+ ObjectField *makeDataEl();
+ ObjectField *makePosEl();
+ ObjectField *makeLineEl();
+
+ IterDef *findIterDef( IterDef::Type type, GenericType *generic );
+ IterDef *findIterDef( IterDef::Type type, Function *func );
+ IterDef *findIterDef( IterDef::Type type );
+ IterDefSet iterDefSet;
+
+ enum GeneratesType { GenToken, GenIgnore, GenCfl };
+
+ int nextObjectId;
+ GeneratesType generatesType;
+ bool generatesIgnore;
+
+ StringMap literalStrings;
+
+ long nextFrameId;
+ long nextParserId;
+
+ ObjectDef *rootLocalFrame;
+
+ bool revertOn;
+
+ RedFsm *redFsm;
+
+ PdaGraph *pdaGraph;
+ PdaTables *pdaTables;
+
+ long predValue;
+ long nextMatchEndNum;
+
+ TypeRef *argvTypeRef;
+
+ bool inContiguous;
+ int contiguousOffset;
+ int contiguousStretch;
+
+ bool beginContiguous( CodeVect &code, int stretch );
+ void endContiguous( CodeVect &code, bool resetContiguous );
+ void clearContiguous( CodeVect &code, bool resetContiguous );
+
+ void declareReVars();
+};
+
+void afterOpMinimize( FsmGraph *fsm, bool lastInSeq = true );
+Key makeFsmKeyHex( char *str, const InputLoc &loc, Compiler *pd );
+Key makeFsmKeyDec( char *str, const InputLoc &loc, Compiler *pd );
+Key makeFsmKeyNum( char *str, const InputLoc &loc, Compiler *pd );
+Key makeFsmKeyChar( char c, Compiler *pd );
+void makeFsmKeyArray( Key *result, char *data, int len, Compiler *pd );
+void makeFsmUniqueKeyArray( KeySet &result, char *data, int len,
+ bool caseInsensitive, Compiler *pd );
+FsmGraph *makeBuiltin( BuiltinMachine builtin, Compiler *pd );
+FsmGraph *dotFsm( Compiler *pd );
+FsmGraph *dotStarFsm( Compiler *pd );
+
+void errorStateLabels( const NameSet &locations );
+
+struct ColmParser;
+
+typedef AvlMap<String, ColmParser *, CmpStr> ParserDict;
+typedef AvlMapEl<String, ColmParser *> ParserDictEl;
+
+LangEl *declareLangEl( Compiler *pd, Namespace *nspace, const String &data, LangEl::Type type );
+LangEl *addLangEl( Compiler *pd, Namespace *nspace, const String &data, LangEl::Type type );
+void declareTypeAlias( Compiler *pd, Namespace *nspace, const String &data, TypeRef *typeRef );
+LangEl *findType( Compiler *pd, Namespace *nspace, const String &data );
+
+ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj,
+ const String &name, int methIdWV, int methIdWC, bool isConst );
+ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj,
+ const String &name, int methIdWV, int methIdWC, UniqueType *arg1, bool isConst );
+ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj,
+ const String &name, int methIdWV, int methIdWC,
+ UniqueType *arg1, UniqueType *arg2, bool isConst );
+
+#endif /* _PARSEDATA_H */
diff --git a/src/parser.cc b/src/parser.cc
new file mode 100644
index 0000000..f1a0dfc
--- /dev/null
+++ b/src/parser.cc
@@ -0,0 +1,947 @@
+/*
+ * Copyright 2006-2014 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <iostream>
+#include <errno.h>
+
+#include "parser.h"
+#include "config.h"
+#include "avltree.h"
+#include "parsedata.h"
+#include "parser.h"
+#include "global.h"
+#include "input.h"
+
+using std::endl;
+
+void BaseParser::init()
+{
+ /* Set up the root namespace. */
+ Namespace *rootNamespace = createRootNamespace();
+ pd->rootNamespace = rootNamespace;
+
+ /* Set up the global object. */
+ String global = "global";
+ pd->globalObjectDef = ObjectDef::cons( ObjectDef::UserType,
+ global, pd->nextObjectId++ );
+
+ /* Initialize the dictionary of graphs. This is our symbol table. The
+ * initialization needs to be done on construction which happens at the
+ * beginning of a machine spec so any assignment operators can reference
+ * the builtins. */
+ pd->initGraphDict();
+
+ pd->rootLocalFrame = ObjectDef::cons( ObjectDef::FrameType,
+ "local", pd->nextObjectId++ );
+ curLocalFrame = pd->rootLocalFrame;
+ curScope = pd->rootLocalFrame->rootScope;
+
+ /* Declarations of internal types. They must be declared now because we use
+ * them directly, rather than via type lookup. */
+ pd->declareBaseLangEls();
+ pd->initUniqueTypes();
+
+ /* Internal variables. */
+ addArgvList();
+}
+
+void BaseParser::addRegularDef( const InputLoc &loc, Namespace *nspace,
+ const String &name, LexJoin *join )
+{
+ GraphDictEl *newEl = nspace->rlMap.insert( name );
+ if ( newEl != 0 ) {
+ /* New element in the dict, all good. */
+ newEl->value = new LexDefinition( name, join );
+ newEl->isInstance = false;
+ newEl->loc = loc;
+ }
+ else {
+ // Recover by ignoring the duplicate.
+ error(loc) << "regular definition \"" << name << "\" already exists" << endl;
+ }
+}
+
+TokenRegion *BaseParser::createRegion( const InputLoc &loc, RegionImpl *impl )
+{
+ TokenRegion *tokenRegion = new TokenRegion( loc,
+ pd->regionList.length(), impl );
+
+ pd->regionList.append( tokenRegion );
+
+ return tokenRegion;
+}
+
+void BaseParser::pushRegionSet( const InputLoc &loc )
+{
+ RegionImpl *implTokenIgnore = new RegionImpl;
+ RegionImpl *implTokenOnly = new RegionImpl;
+ RegionImpl *implIgnoreOnly = new RegionImpl;
+
+ pd->regionImplList.append( implTokenIgnore );
+ pd->regionImplList.append( implTokenOnly );
+ pd->regionImplList.append( implIgnoreOnly );
+
+ TokenRegion *tokenIgnore = createRegion( loc, implTokenIgnore );
+ TokenRegion *tokenOnly = createRegion( loc, implTokenOnly );
+ TokenRegion *ignoreOnly = createRegion( loc, implIgnoreOnly );
+ TokenRegion *collectIgnore = createRegion( loc, implIgnoreOnly );
+
+ RegionSet *regionSet = new RegionSet(
+ implTokenIgnore, implTokenIgnore, implIgnoreOnly,
+ tokenIgnore, tokenOnly, ignoreOnly, collectIgnore );
+
+ collectIgnore->ignoreOnly = ignoreOnly;
+
+ pd->regionSetList.append( regionSet );
+ regionStack.push( regionSet );
+}
+
+void BaseParser::popRegionSet()
+{
+ regionStack.pop();
+}
+
+Namespace *BaseParser::createRootNamespace()
+{
+ /* Gets id of zero and default name. No parent. */
+ Namespace *nspace = new Namespace( internal,
+ String("___ROOT_NAMESPACE"), 0, 0 );
+
+ pd->namespaceList.append( nspace );
+ namespaceStack.push( nspace );
+
+ return nspace;
+}
+
+Namespace *BaseParser::createNamespace( const InputLoc &loc, const String &name )
+{
+ Namespace *parent = namespaceStack.top();
+
+ /* Make the new namespace. */
+ Namespace *nspace = parent->findNamespace( name );
+
+ if ( nspace == 0 ) {
+ nspace = new Namespace( loc, name,
+ pd->namespaceList.length(), parent );
+
+ parent->childNamespaces.append( nspace );
+ pd->namespaceList.append( nspace );
+ }
+
+ namespaceStack.push( nspace );
+
+ return nspace;
+}
+
+LexJoin *BaseParser::literalJoin( const InputLoc &loc, const String &data )
+{
+ Literal *literal = Literal::cons( loc, data, Literal::LitString );
+ LexFactor *factor = LexFactor::cons( literal );
+ LexFactorNeg *factorNeg = LexFactorNeg::cons( factor );
+ LexFactorRep *factorRep = LexFactorRep::cons( factorNeg );
+ LexFactorAug *factorAug = LexFactorAug::cons( factorRep );
+ LexTerm *term = LexTerm::cons( factorAug );
+ LexExpression *expr = LexExpression::cons( term );
+ LexJoin *join = LexJoin::cons( expr );
+ return join;
+}
+
+void BaseParser::defineToken( const InputLoc &loc, String name, LexJoin *join, ObjectDef *objectDef,
+ CodeBlock *transBlock, bool ignore, bool noPreIgnore, bool noPostIgnore )
+{
+ bool pushedRegion = false;
+ if ( !insideRegion() ) {
+ if ( ignore )
+ error(loc) << "ignore tokens can only appear inside scanners" << endp;
+
+ pushedRegion = true;
+ pushRegionSet( internal );
+ }
+
+ /* Check the name if this is a token. */
+ if ( !ignore && name == 0 )
+ error(loc) << "tokens must have a name" << endp;
+
+ /* Give a default name to ignores. */
+ if ( name == 0 )
+ name.setAs( 32, "_ignore_%.4x", pd->nextTokenId );
+
+ Namespace *nspace = curNspace();
+ RegionSet *regionSet = regionStack.top();
+
+ TokenDef *tokenDef = TokenDef::cons( name, String(), false, ignore, join,
+ transBlock, loc, 0, nspace, regionSet, objectDef, curContext() );
+
+ regionSet->tokenDefList.append( tokenDef );
+ nspace->tokenDefList.append( tokenDef );
+
+ tokenDef->noPreIgnore = noPreIgnore;
+ tokenDef->noPostIgnore = noPostIgnore;
+
+ TokenInstance *tokenInstance = TokenInstance::cons( tokenDef,
+ join, loc, pd->nextTokenId++, nspace,
+ regionSet->tokenIgnore );
+
+ regionSet->tokenIgnore->impl->tokenInstanceList.append( tokenInstance );
+
+ tokenDef->noPreIgnore = noPreIgnore;
+ tokenDef->noPostIgnore = noPostIgnore;
+
+ if ( ignore ) {
+ /* The instance for the ignore-only. */
+ TokenInstance *tokenInstanceIgn = TokenInstance::cons( tokenDef,
+ join, loc, pd->nextTokenId++, nspace, regionSet->ignoreOnly );
+
+ tokenInstanceIgn->dupOf = tokenInstance;
+
+ regionSet->ignoreOnly->impl->tokenInstanceList.append( tokenInstanceIgn );
+ }
+ else {
+ /* The instance for the token-only. */
+ TokenInstance *tokenInstanceTok = TokenInstance::cons( tokenDef,
+ join, loc, pd->nextTokenId++, nspace, regionSet->tokenOnly );
+
+ tokenInstanceTok->dupOf = tokenInstance;
+
+ regionSet->tokenOnly->impl->tokenInstanceList.append( tokenInstanceTok );
+ }
+
+ /* This is created and pushed in the name. */
+ if ( pushedRegion )
+ popRegionSet();
+
+ if ( join != 0 ) {
+ /* Create a regular language definition so the token can be used to
+ * make other tokens */
+ addRegularDef( loc, curNspace(), name, join );
+ }
+}
+
+void BaseParser::zeroDef( const InputLoc &loc, const String &name )
+{
+ if ( !insideRegion() )
+ error(loc) << "zero token should be inside token" << endp;
+
+ RegionSet *regionSet = regionStack.top();
+ Namespace *nspace = curNspace();
+
+ LexJoin *join = literalJoin( loc, String("`") );
+
+ TokenDef *tokenDef = TokenDef::cons( name, String(), false, false, join,
+ 0, loc, 0, nspace, regionSet, 0, curContext() );
+
+ tokenDef->isZero = true;
+
+ regionSet->tokenDefList.append( tokenDef );
+ nspace->tokenDefList.append( tokenDef );
+
+ /* No token instance created. */
+}
+
+void BaseParser::literalDef( const InputLoc &loc, const String &data,
+ bool noPreIgnore, bool noPostIgnore )
+{
+ /* Create a name for the literal. */
+ String name( 32, "_literal_%.4x", pd->nextTokenId );
+
+ bool pushedRegion = false;
+ if ( !insideRegion() ) {
+ pushRegionSet( loc );
+ pushedRegion = true;
+ }
+
+ bool unusedCI;
+ String interp;
+ prepareLitString( interp, unusedCI, data, loc );
+
+ /* Look for the production's associated region. */
+ Namespace *nspace = curNspace();
+ RegionSet *regionSet = regionStack.top();
+
+ LiteralDictEl *ldel = nspace->literalDict.find( interp );
+ if ( ldel != 0 )
+ error( loc ) << "literal already defined in this namespace" << endp;
+
+ LexJoin *join = literalJoin( loc, data );
+
+ ObjectDef *objectDef = ObjectDef::cons( ObjectDef::UserType,
+ name, pd->nextObjectId++ );
+
+ /* The token definition. */
+ TokenDef *tokenDef = TokenDef::cons( name, data, true, false, join,
+ 0, loc, 0, nspace, regionSet, objectDef, 0 );
+
+ regionSet->tokenDefList.append( tokenDef );
+ nspace->tokenDefList.append( tokenDef );
+
+ /* The instance for the token/ignore region. */
+ TokenInstance *tokenInstance = TokenInstance::cons( tokenDef, join,
+ loc, pd->nextTokenId++, nspace, regionSet->tokenIgnore );
+
+ regionSet->tokenIgnore->impl->tokenInstanceList.append( tokenInstance );
+
+ ldel = nspace->literalDict.insert( interp, tokenInstance );
+
+ /* Make the duplicate for the token-only region. */
+ tokenDef->noPreIgnore = noPreIgnore;
+ tokenDef->noPostIgnore = noPostIgnore;
+
+ /* The instance for the token-only region. */
+ TokenInstance *tokenInstanceTok = TokenInstance::cons( tokenDef,
+ join, loc, pd->nextTokenId++, nspace,
+ regionSet->tokenOnly );
+
+ tokenInstanceTok->dupOf = tokenInstance;
+
+ regionSet->tokenOnly->impl->tokenInstanceList.append( tokenInstanceTok );
+
+ if ( pushedRegion )
+ popRegionSet();
+}
+
+void BaseParser::addArgvList()
+{
+ TypeRef *typeRef = TypeRef::cons( internal, pd->uniqueTypeStr );
+ pd->argvTypeRef = TypeRef::cons( internal, TypeRef::List, 0, typeRef, 0 );
+}
+
+ObjectDef *BaseParser::blockOpen()
+{
+ /* Init the object representing the local frame. */
+ ObjectDef *frame = ObjectDef::cons( ObjectDef::FrameType,
+ "local", pd->nextObjectId++ );
+
+ curLocalFrame = frame;
+ curScope = frame->rootScope;
+ return frame;
+}
+
+void BaseParser::blockClose()
+{
+ curLocalFrame = pd->rootLocalFrame;
+ curScope = pd->rootLocalFrame->rootScope;
+}
+
+void BaseParser::functionDef( StmtList *stmtList, ObjectDef *localFrame,
+ ParameterList *paramList, TypeRef *typeRef, const String &name, bool exprt )
+{
+ CodeBlock *codeBlock = CodeBlock::cons( stmtList, localFrame );
+ Function *newFunction = Function::cons( typeRef, name,
+ paramList, codeBlock, pd->nextFuncId++, false, exprt );
+ pd->functionList.append( newFunction );
+ newFunction->inContext = curContext();
+}
+
+void BaseParser::iterDef( StmtList *stmtList, ObjectDef *localFrame,
+ ParameterList *paramList, const String &name )
+{
+ CodeBlock *codeBlock = CodeBlock::cons( stmtList, localFrame );
+ Function *newFunction = Function::cons( 0, name,
+ paramList, codeBlock, pd->nextFuncId++, true, false );
+ pd->functionList.append( newFunction );
+}
+
+LangStmt *BaseParser::globalDef( ObjectField *objField, LangExpr *expr,
+ LangStmt::Type assignType )
+{
+ LangStmt *stmt = 0;
+
+ Context *context = 0;
+ ObjectDef *object = 0;
+ if ( curContext() == 0 )
+ object = pd->globalObjectDef;
+ else {
+ context = curContext();
+ objField->context = context;
+ object = context->contextObjDef;
+ }
+
+ if ( object->rootScope->checkRedecl( objField->name ) != 0 )
+ error(objField->loc) << "object field renamed" << endp;
+
+ object->rootScope->insertField( objField->name, objField );
+
+ if ( expr != 0 ) {
+ LangVarRef *varRef = LangVarRef::cons( objField->loc,
+ context, curScope, objField->name );
+
+ stmt = LangStmt::cons( objField->loc,
+ assignType, varRef, expr );
+ }
+
+ return stmt;
+}
+
+void BaseParser::cflDef( NtDef *ntDef, ObjectDef *objectDef, LelDefList *defList )
+{
+ Namespace *nspace = curNspace();
+
+ ntDef->objectDef = objectDef;
+ ntDef->defList = defList;
+
+ nspace->ntDefList.append( ntDef );
+
+ /* Declare the captures in the object. */
+ for ( LelDefList::Iter prod = *defList; prod.lte(); prod++ ) {
+ for ( ProdElList::Iter pel = *prod->prodElList; pel.lte(); pel++ ) {
+ /* If there is a capture, create the field. */
+ if ( pel->captureField != 0 ) {
+ /* Might already exist. */
+ ObjectField *newOf = objectDef->rootScope->checkRedecl( pel->captureField->name );
+ if ( newOf != 0 ) {
+ /* FIXME: check the types are the same. */
+ }
+ else {
+ newOf = pel->captureField;
+ newOf->typeRef = pel->typeRef;
+ objectDef->rootScope->insertField( newOf->name, newOf );
+ }
+
+ newOf->isRhsGet = true;
+ newOf->rhsVal.append( RhsVal( pel ) );
+ }
+ }
+ }
+}
+
+ReOrBlock *BaseParser::lexRegularExprData( ReOrBlock *reOrBlock, ReOrItem *reOrItem )
+{
+ ReOrBlock *ret;
+
+ /* An optimization to lessen the tree size. If an or char is directly under
+ * the left side on the right and the right side is another or char then
+ * paste them together and return the left side. Otherwise just put the two
+ * under a new or data node. */
+ if ( reOrItem->type == ReOrItem::Data &&
+ reOrBlock->type == ReOrBlock::RecurseItem &&
+ reOrBlock->item->type == ReOrItem::Data )
+ {
+ /* Append the right side to right side of the left and toss the
+ * right side. */
+ reOrBlock->item->data += reOrItem->data;
+ delete reOrItem;
+ ret = reOrBlock;
+ }
+ else {
+ /* Can't optimize, put the left and right under a new node. */
+ ret = ReOrBlock::cons( reOrBlock, reOrItem );
+ }
+ return ret;
+}
+
+LexFactor *BaseParser::lexRlFactorName( const String &data, const InputLoc &loc )
+{
+ LexFactor *factor = 0;
+ /* Find the named graph. */
+ Namespace *nspace = curNspace();
+
+ while ( nspace != 0 ) {
+ GraphDictEl *gdNode = nspace->rlMap.find( data );
+ if ( gdNode != 0 ) {
+ if ( gdNode->isInstance ) {
+ /* Recover by retuning null as the factor node. */
+ error(loc) << "references to graph instantiations not allowed "
+ "in expressions" << endl;
+ factor = 0;
+ }
+ else {
+ /* Create a factor node that is a lookup of an expression. */
+ factor = LexFactor::cons( loc, gdNode->value );
+ }
+ break;
+ }
+
+ nspace = nspace->parentNamespace;
+ }
+
+ if ( nspace == 0 ) {
+ /* Recover by returning null as the factor node. */
+ error(loc) << "graph lookup of \"" << data << "\" failed" << endl;
+ factor = 0;
+ }
+
+ return factor;
+}
+
+int BaseParser::lexFactorRepNum( const InputLoc &loc, const String &data )
+{
+ /* Convert the priority number to a long. Check for overflow. */
+ errno = 0;
+ int rep = strtol( data, 0, 10 );
+ if ( errno == ERANGE && rep == LONG_MAX ) {
+ /* Repetition too large. Recover by returing repetition 1. */
+ error(loc) << "repetition number " << data << " overflows" << endl;
+ rep = 1;
+ }
+ return rep;
+}
+
+LexFactorAug *BaseParser::lexFactorLabel( const InputLoc &loc, const String &data, LexFactorAug *factorAug )
+{
+ /* Create the object field. */
+ TypeRef *typeRef = TypeRef::cons( loc, pd->uniqueTypeStr );
+ ObjectField *objField = ObjectField::cons( loc, typeRef, data );
+
+ /* Create the enter and leaving actions that will mark the substring. */
+ Action *enter = Action::cons( MarkMark, pd->nextMatchEndNum++ );
+ Action *leave = Action::cons( MarkMark, pd->nextMatchEndNum++ );
+ pd->actionList.append( enter );
+ pd->actionList.append( leave );
+
+ /* Add entering and leaving actions. */
+ factorAug->actions.append( ParserAction( loc, at_start, 0, enter ) );
+ factorAug->actions.append( ParserAction( loc, at_leave, 0, leave ) );
+
+ factorAug->reCaptureVect.append( ReCapture( enter, leave, objField ) );
+
+ return factorAug;
+}
+
+LexJoin *BaseParser::lexOptJoin( LexJoin *join, LexJoin *context )
+{
+ if ( context != 0 ) {
+ /* Create the enter and leaving actions that will mark the substring. */
+ Action *mark = Action::cons( MarkMark, pd->nextMatchEndNum++ );
+ pd->actionList.append( mark );
+
+ join->context = context;
+ join->mark = mark;
+ }
+
+ return join;
+}
+
+LangExpr *BaseParser::send( const InputLoc &loc, LangVarRef *varRef, ConsItemList *list, bool eof )
+{
+ ParserText *parserText = ParserText::cons( loc, curNspace(), list );
+ pd->parserTextList.append( parserText );
+
+ return LangExpr::cons( LangTerm::consSend( loc, varRef,
+ parserText, eof ) );
+}
+
+LangExpr *BaseParser::parseCmd( const InputLoc &loc, bool stop, ObjectField *objField,
+ TypeRef *typeRef, FieldInitVect *fieldInitVect, ConsItemList *list )
+{
+ LangExpr *expr = 0;
+
+ /* We are constructing a parser, sending it items, then returning it.
+ * Thisis the constructor for the parser. */
+ ConsItemList *emptyConsItemList = new ConsItemList;
+
+ Constructor *constructor = Constructor::cons( loc, curNspace(),
+ emptyConsItemList, pd->nextPatConsId++ );
+ pd->replList.append( constructor );
+
+ /* The parser may be referenced. */
+ LangVarRef *varRef = 0;
+ if ( objField != 0 ) {
+ varRef = LangVarRef::cons( objField->loc,
+ curContext(), curScope, objField->name );
+ }
+
+ /* The typeref for the parser. */
+ TypeRef *parserTypeRef = TypeRef::cons( loc,
+ TypeRef::Parser, 0, typeRef, 0 );
+
+ ParserText *parserText = ParserText::cons( loc, curNspace(), list );
+ pd->parserTextList.append( parserText );
+
+ expr = LangExpr::cons( LangTerm::cons( loc,
+ stop ? LangTerm::ParseStopType : LangTerm::ParseType,
+ varRef, objField, parserTypeRef, fieldInitVect, constructor, parserText ) );
+
+ /* Check for redeclaration. */
+ if ( objField != 0 ) {
+ if ( curScope->checkRedecl( objField->name ) != 0 ) {
+ error( objField->loc ) << "variable " << objField->name <<
+ " redeclared" << endp;
+ }
+
+ /* Insert it into the field map. */
+ objField->typeRef = typeRef;
+ curScope->insertField( objField->name, objField );
+ }
+
+ return expr;
+}
+
+PatternItemList *BaseParser::consPatternEl( LangVarRef *varRef, PatternItemList *list )
+{
+ /* Store the variable reference in the pattern itemm. */
+ list->head->varRef = varRef;
+
+ if ( varRef != 0 ) {
+ if ( curScope->checkRedecl( varRef->name ) != 0 ) {
+ error( varRef->loc ) << "variable " << varRef->name <<
+ " redeclared" << endp;
+ }
+
+ TypeRef *typeRef = list->head->prodEl->typeRef;
+ ObjectField *objField = ObjectField::cons( InputLoc(), typeRef, varRef->name );
+
+ /* Insert it into the field map. */
+ curScope->insertField( varRef->name, objField );
+ }
+
+ return list;
+}
+
+PatternItemList *BaseParser::patternElNamed( const InputLoc &loc,
+ LangVarRef *parsedVarRef, NamespaceQual *nspaceQual, const String &data,
+ RepeatType repeatType )
+{
+ TypeRef *typeRef = TypeRef::cons( loc, parsedVarRef, nspaceQual, data, repeatType );
+ ProdEl *prodEl = new ProdEl( ProdEl::ReferenceType, loc, 0, false, typeRef, 0 );
+ PatternItem *patternItem = PatternItem::cons( PatternItem::TypeRefForm, loc, prodEl );
+ return PatternItemList::cons( patternItem );
+}
+
+PatternItemList *BaseParser::patternElType( const InputLoc &loc,
+ LangVarRef *parsedVarRef, NamespaceQual *nspaceQual, const String &data,
+ RepeatType repeatType )
+{
+ PdaLiteral *literal = new PdaLiteral( loc, data );
+ TypeRef *typeRef = TypeRef::cons( loc, parsedVarRef, nspaceQual, literal, repeatType );
+
+ ProdEl *prodEl = new ProdEl( ProdEl::ReferenceType, loc, 0, false, typeRef, 0 );
+ PatternItem *patternItem = PatternItem::cons( PatternItem::TypeRefForm, loc, prodEl );
+ return PatternItemList::cons( patternItem );
+}
+
+ProdElList *BaseParser::appendProdEl( ProdElList *prodElList, ProdEl *prodEl )
+{
+ prodEl->pos = prodElList->length();
+ prodElList->append( prodEl );
+ return prodElList;
+}
+
+PatternItemList *BaseParser::patListConcat( PatternItemList *list1,
+ PatternItemList *list2 )
+{
+ list1->append( *list2 );
+ delete list2;
+ return list1;
+}
+
+ConsItemList *BaseParser::consListConcat( ConsItemList *list1,
+ ConsItemList *list2 )
+{
+ list1->append( *list2 );
+ delete list2;
+ return list1;
+}
+
+LangStmt *BaseParser::forScope( const InputLoc &loc, const String &data,
+ ObjNameScope *scope, TypeRef *typeRef, IterCall *iterCall, StmtList *stmtList )
+{
+ /* Check for redeclaration. */
+ if ( curScope->checkRedecl( data ) != 0 )
+ error( loc ) << "variable " << data << " redeclared" << endp;
+
+ /* Note that we pass in a null type reference. This type is dependent on
+ * the result of the iter_call lookup since it must contain a reference to
+ * the iterator that is called. This lookup is done at compile time. */
+ ObjectField *iterField = ObjectField::cons( loc, (TypeRef*)0, data );
+ curScope->insertField( data, iterField );
+
+ LangStmt *stmt = LangStmt::cons( loc, LangStmt::ForIterType,
+ iterField, typeRef, iterCall, stmtList, curContext(), scope );
+
+ return stmt;
+}
+
+void BaseParser::preEof( const InputLoc &loc, StmtList *stmtList, ObjectDef *localFrame )
+{
+ if ( !insideRegion() )
+ error(loc) << "preeof must be used inside an existing region" << endl;
+
+ CodeBlock *codeBlock = CodeBlock::cons( stmtList, localFrame );
+ codeBlock->context = curContext();
+
+ RegionSet *regionSet = regionStack.top();
+ regionSet->tokenIgnore->preEofBlock = codeBlock;
+}
+
+ProdEl *BaseParser::prodElName( const InputLoc &loc, const String &data,
+ NamespaceQual *nspaceQual, ObjectField *objField,
+ RepeatType repeatType, bool commit )
+{
+ TypeRef *typeRef = TypeRef::cons( loc, nspaceQual, data, repeatType );
+ ProdEl *prodEl = new ProdEl( ProdEl::ReferenceType, loc, objField, commit, typeRef, 0 );
+ return prodEl;
+}
+
+ProdEl *BaseParser::prodElLiteral( const InputLoc &loc, const String &data,
+ NamespaceQual *nspaceQual, ObjectField *objField, RepeatType repeatType,
+ bool commit )
+{
+ /* Create a new prodEl node going to a concat literal. */
+ PdaLiteral *literal = new PdaLiteral( loc, data );
+ TypeRef *typeRef = TypeRef::cons( loc, nspaceQual, literal, repeatType );
+ ProdEl *prodEl = new ProdEl( ProdEl::LiteralType, loc, objField, commit, typeRef, 0 );
+ return prodEl;
+}
+
+ConsItemList *BaseParser::consElLiteral( const InputLoc &loc,
+ TypeRef *consTypeRef, const String &data, NamespaceQual *nspaceQual )
+{
+ PdaLiteral *literal = new PdaLiteral( loc, data );
+ TypeRef *typeRef = TypeRef::cons( loc, consTypeRef, nspaceQual, literal );
+ ProdEl *prodEl = new ProdEl( ProdEl::LiteralType, loc, 0, false, typeRef, 0 );
+ ConsItem *consItem = ConsItem::cons( loc, ConsItem::LiteralType, prodEl );
+ ConsItemList *list = ConsItemList::cons( consItem );
+ return list;
+}
+
+Production *BaseParser::production( const InputLoc &loc, ProdElList *prodElList,
+ String name, bool commit, CodeBlock *codeBlock, LangEl *predOf )
+{
+ Production *prod = Production::cons( loc, 0, prodElList,
+ name, commit, codeBlock, pd->prodList.length(), 0 );
+ prod->predOf = predOf;
+
+ /* Link the production elements back to the production. */
+ for ( ProdEl *prodEl = prodElList->head; prodEl != 0; prodEl = prodEl->next )
+ prodEl->production = prod;
+
+ pd->prodList.append( prod );
+
+ return prod;
+}
+
+void BaseParser::objVarDef( ObjectDef *objectDef, ObjectField *objField )
+{
+ if ( objectDef->rootScope->checkRedecl( objField->name ) != 0 )
+ error() << "object field renamed" << endp;
+
+ objectDef->rootScope->insertField( objField->name, objField );
+}
+
+LelDefList *BaseParser::prodAppend( LelDefList *defList, Production *definition )
+{
+ definition->prodNum = defList->length();
+ defList->append( definition );
+ return defList;
+}
+
+LangExpr *BaseParser::construct( const InputLoc &loc, ObjectField *objField,
+ ConsItemList *list, TypeRef *typeRef, FieldInitVect *fieldInitVect )
+{
+ Constructor *constructor = Constructor::cons( loc, curNspace(),
+ list, pd->nextPatConsId++ );
+ pd->replList.append( constructor );
+
+ LangVarRef *varRef = 0;
+ if ( objField != 0 ) {
+ varRef = LangVarRef::cons( objField->loc,
+ curContext(), curScope, objField->name );
+ }
+
+ LangExpr *expr = LangExpr::cons( LangTerm::cons( loc, LangTerm::ConstructType,
+ varRef, objField, typeRef, fieldInitVect, constructor ) );
+
+ /* Check for redeclaration. */
+ if ( objField != 0 ) {
+ if ( curScope->checkRedecl( objField->name ) != 0 ) {
+ error( objField->loc ) << "variable " << objField->name <<
+ " redeclared" << endp;
+ }
+
+ /* Insert it into the field map. */
+ objField->typeRef = typeRef;
+ curScope->insertField( objField->name, objField );
+ }
+
+ return expr;
+}
+
+LangExpr *BaseParser::match( const InputLoc &loc, LangVarRef *varRef,
+ PatternItemList *list )
+{
+ Pattern *pattern = Pattern::cons( loc, curNspace(),
+ list, pd->nextPatConsId++ );
+ pd->patternList.append( pattern );
+
+ LangExpr *expr = LangExpr::cons( LangTerm::cons(
+ InputLoc(), LangTerm::MatchType, varRef, pattern ) );
+
+ return expr;
+}
+
+LangStmt *BaseParser::varDef( ObjectField *objField,
+ LangExpr *expr, LangStmt::Type assignType )
+{
+ LangStmt *stmt = 0;
+
+ /* Check for redeclaration. */
+ if ( curScope->checkRedecl( objField->name ) != 0 ) {
+ error( objField->loc ) << "variable " << objField->name <<
+ " redeclared" << endp;
+ }
+
+ /* Insert it into the field map. */
+ curScope->insertField( objField->name, objField );
+
+ //cout << "var def " << $1->objField->name << endl;
+
+ if ( expr != 0 ) {
+ LangVarRef *varRef = LangVarRef::cons( objField->loc,
+ curContext(), curScope, objField->name );
+
+ stmt = LangStmt::cons( objField->loc, assignType, varRef, expr );
+ }
+
+ return stmt;
+}
+
+LangStmt *BaseParser::exportStmt( ObjectField *objField, LangStmt::Type assignType, LangExpr *expr )
+{
+ LangStmt *stmt = 0;
+
+ if ( curContext() != 0 )
+ error(objField->loc) << "cannot export parser context variables" << endp;
+
+ ObjectDef *object = pd->globalObjectDef;
+
+ if ( object->rootScope->checkRedecl( objField->name ) != 0 )
+ error(objField->loc) << "object field renamed" << endp;
+
+ object->rootScope->insertField( objField->name, objField );
+ objField->isExport = true;
+
+ if ( expr != 0 ) {
+ LangVarRef *varRef = LangVarRef::cons( objField->loc,
+ 0, curScope, objField->name );
+
+ stmt = LangStmt::cons( objField->loc, assignType, varRef, expr );
+ }
+
+ return stmt;
+}
+
+LangExpr *BaseParser::require( const InputLoc &loc,
+ LangVarRef *varRef, PatternItemList *list )
+{
+ Pattern *pattern = Pattern::cons( loc, curNspace(),
+ list, pd->nextPatConsId++ );
+ pd->patternList.append( pattern );
+
+ LangExpr *expr = LangExpr::cons( LangTerm::cons(
+ InputLoc(), LangTerm::MatchType, varRef, pattern ) );
+ return expr;
+}
+
+void BaseParser::contextVarDef( const InputLoc &loc, ObjectField *objField )
+{
+ ObjectDef *object;
+ if ( curContext() == 0 )
+ error(loc) << "internal error: no context stack items found" << endp;
+
+ Context *context = curContext();
+ objField->context = context;
+ object = context->contextObjDef;
+
+ if ( object->rootScope->checkRedecl( objField->name ) != 0 )
+ error(objField->loc) << "object field renamed" << endp;
+
+ object->rootScope->insertField( objField->name, objField );
+}
+
+void BaseParser::contextHead( const InputLoc &loc, const String &data )
+{
+ /* Make the new namespace. */
+ Namespace *nspace = createNamespace( loc, data );
+
+ Context *context = new Context( loc, 0 );
+ contextStack.push( context );
+
+ ContextDef *contextDef = new ContextDef( data, context, nspace );
+ nspace->contextDefList.append( contextDef );
+
+ context->contextObjDef = ObjectDef::cons( ObjectDef::UserType,
+ data, pd->nextObjectId++ );
+}
+
+StmtList *BaseParser::appendStatement( StmtList *stmtList, LangStmt *stmt )
+{
+ if ( stmt != 0 )
+ stmtList->append( stmt );
+ return stmtList;
+}
+
+ParameterList *BaseParser::appendParam( ParameterList *paramList, ObjectField *objField )
+{
+ paramList->append( objField );
+ return paramList;
+}
+
+ObjectField *BaseParser::addParam( const InputLoc &loc, TypeRef *typeRef,
+ const String &name )
+{
+ ObjectField *objField = ObjectField::cons( loc, typeRef, name );
+ objField->isParam = true;
+ return objField;
+}
+
+PredDecl *BaseParser::predTokenName( const InputLoc &loc, NamespaceQual *qual,
+ const String &data )
+{
+ TypeRef *typeRef = TypeRef::cons( loc, qual, data );
+ PredDecl *predDecl = new PredDecl( typeRef, pd->predValue );
+ return predDecl;
+}
+
+PredDecl *BaseParser::predTokenLit( const InputLoc &loc, const String &data,
+ NamespaceQual *nspaceQual )
+{
+ PdaLiteral *literal = new PdaLiteral( loc, data );
+ TypeRef *typeRef = TypeRef::cons( loc, nspaceQual, literal );
+ PredDecl *predDecl = new PredDecl( typeRef, pd->predValue );
+ return predDecl;
+}
+
+void BaseParser::alias( const InputLoc &loc, const String &data, TypeRef *typeRef )
+{
+ Namespace *nspace = curNspace();
+ TypeAlias *typeAlias = new TypeAlias( loc, nspace, data, typeRef );
+ nspace->typeAliasList.append( typeAlias );
+}
+
+void BaseParser::precedenceStmt( PredType predType, PredDeclList *predDeclList )
+{
+ while ( predDeclList->length() > 0 ) {
+ PredDecl *predDecl = predDeclList->detachFirst();
+ predDecl->predType = predType;
+ pd->predDeclList.append( predDecl );
+ }
+ pd->predValue++;
+}
+
+void BaseParser::pushScope()
+{
+ curScope = curLocalFrame->pushScope( curScope );
+}
+
+void BaseParser::popScope()
+{
+ curScope = curScope->parentScope;
+}
diff --git a/src/parser.h b/src/parser.h
new file mode 100644
index 0000000..c4d02fe
--- /dev/null
+++ b/src/parser.h
@@ -0,0 +1,150 @@
+/*
+ * Copyright 2013 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PARSER_H
+#define PARSER_H
+
+#include <iostream>
+#include "avltree.h"
+#include "parsedata.h"
+#include "parser.h"
+
+#define PROPERTY_REDUCE_FIRST 0x1
+
+struct BaseParser
+{
+ BaseParser( Compiler *pd )
+ : pd(pd), enterRl(false)
+ {}
+
+ virtual ~BaseParser() {}
+
+ Compiler *pd;
+
+ RegionSetVect regionStack;
+ NamespaceVect namespaceStack;
+ ContextStack contextStack;
+ ObjectDef *curLocalFrame;
+ ObjNameScope *curScope;
+
+ bool enterRl;
+
+ bool insideRegion()
+ { return regionStack.length() > 0; }
+
+ Context *curContext()
+ { return contextStack.length() == 0 ? 0 : contextStack.top(); }
+
+ Namespace *curNspace()
+ { return namespaceStack.top(); }
+
+ /* Lexical feedback. */
+
+ void init();
+ void addRegularDef( const InputLoc &loc, Namespace *nspace,
+ const String &name, LexJoin *join );
+ TokenRegion *createRegion( const InputLoc &loc, RegionImpl *impl );
+ Namespace *createRootNamespace();
+ Namespace *createNamespace( const InputLoc &loc, const String &name );
+ void pushRegionSet( const InputLoc &loc );
+ void popRegionSet();
+ void addProduction( const InputLoc &loc, const String &name,
+ ProdElList *prodElList, bool commit, CodeBlock *redBlock, LangEl *predOf );
+ void addArgvList();
+ LexJoin *literalJoin( const InputLoc &loc, const String &data );
+
+ void defineToken( const InputLoc &loc, String name, LexJoin *join, ObjectDef *objectDef,
+ CodeBlock *transBlock, bool ignore, bool noPreIgnore, bool noPostIgnore );
+
+ void zeroDef( const InputLoc &loc, const String &name );
+ void literalDef( const InputLoc &loc, const String &data,
+ bool noPreIgnore, bool noPostIgnore );
+
+ ObjectDef *blockOpen();
+ void blockClose();
+ void functionDef( StmtList *stmtList, ObjectDef *localFrame,
+ ParameterList *paramList, TypeRef *typeRef, const String &name, bool exprt );
+ void iterDef( StmtList *stmtList, ObjectDef *localFrame,
+ ParameterList *paramList, const String &name );
+ LangStmt *globalDef( ObjectField *objField, LangExpr *expr, LangStmt::Type assignType );
+ void cflDef( NtDef *ntDef, ObjectDef *objectDef, LelDefList *defList );
+ ReOrBlock *lexRegularExprData( ReOrBlock *reOrBlock, ReOrItem *reOrItem );
+
+ int lexFactorRepNum( const InputLoc &loc, const String &data );
+ LexFactor *lexRlFactorName( const String &data, const InputLoc &loc );
+ LexFactorAug *lexFactorLabel( const InputLoc &loc, const String &data,
+ LexFactorAug *factorAug );
+ LexJoin *lexOptJoin( LexJoin *join, LexJoin *context );
+ LangExpr *send( const InputLoc &loc, LangVarRef *varRef, ConsItemList *list, bool eof );
+ LangExpr *parseCmd( const InputLoc &loc, bool stop, ObjectField *objField,
+ TypeRef *typeRef, FieldInitVect *fieldInitVect, ConsItemList *list );
+ PatternItemList *consPatternEl( LangVarRef *varRef, PatternItemList *list );
+ PatternItemList *patternElNamed( const InputLoc &loc, LangVarRef *varRef,
+ NamespaceQual *nspaceQual, const String &data, RepeatType repeatType );
+ PatternItemList *patternElType( const InputLoc &loc, LangVarRef *varRef,
+ NamespaceQual *nspaceQual, const String &data, RepeatType repeatType );
+ PatternItemList *patListConcat( PatternItemList *list1, PatternItemList *list2 );
+ ConsItemList *consListConcat( ConsItemList *list1, ConsItemList *list2 );
+ LangStmt *forScope( const InputLoc &loc, const String &data,
+ ObjNameScope *scope, TypeRef *typeRef, IterCall *iterCall, StmtList *stmtList );
+ void preEof( const InputLoc &loc, StmtList *stmtList, ObjectDef *localFrame );
+
+ ProdEl *prodElName( const InputLoc &loc, const String &data,
+ NamespaceQual *nspaceQual, ObjectField *objField, RepeatType repeatType,
+ bool commit );
+ ProdEl *prodElLiteral( const InputLoc &loc, const String &data,
+ NamespaceQual *nspaceQual, ObjectField *objField, RepeatType repeatType,
+ bool commit );
+ ConsItemList *consElLiteral( const InputLoc &loc, TypeRef *consTypeRef,
+ const String &data, NamespaceQual *nspaceQual );
+ Production *production( const InputLoc &loc, ProdElList *prodElList,
+ String name, bool commit, CodeBlock *codeBlock, LangEl *predOf );
+ void objVarDef( ObjectDef *objectDef, ObjectField *objField );
+ LelDefList *prodAppend( LelDefList *defList, Production *definition );
+
+ LangExpr *construct( const InputLoc &loc, ObjectField *objField,
+ ConsItemList *list, TypeRef *typeRef, FieldInitVect *fieldInitVect );
+ LangExpr *match( const InputLoc &loc, LangVarRef *varRef,
+ PatternItemList *list );
+ LangStmt *varDef( ObjectField *objField,
+ LangExpr *expr, LangStmt::Type assignType );
+ LangStmt *exportStmt( ObjectField *objField, LangStmt::Type assignType, LangExpr *expr );
+
+ LangExpr *require( const InputLoc &loc, LangVarRef *varRef, PatternItemList *list );
+ void contextVarDef( const InputLoc &loc, ObjectField *objField );
+ void contextHead( const InputLoc &loc, const String &data );
+ StmtList *appendStatement( StmtList *stmtList, LangStmt *stmt );
+ ParameterList *appendParam( ParameterList *paramList, ObjectField *objField );
+ ObjectField *addParam( const InputLoc &loc, TypeRef *typeRef, const String &name );
+ PredDecl *predTokenName( const InputLoc &loc, NamespaceQual *qual, const String &data );
+ PredDecl *predTokenLit( const InputLoc &loc, const String &data,
+ NamespaceQual *nspaceQual );
+ void alias( const InputLoc &loc, const String &data, TypeRef *typeRef );
+ void precedenceStmt( PredType predType, PredDeclList *predDeclList );
+ ProdElList *appendProdEl( ProdElList *prodElList, ProdEl *prodEl );
+
+ void pushScope();
+ void popScope();
+
+ virtual void go( long activeRealm ) = 0;
+};
+
+#endif
diff --git a/src/parsetree.cc b/src/parsetree.cc
new file mode 100644
index 0000000..cfc0b52
--- /dev/null
+++ b/src/parsetree.cc
@@ -0,0 +1,1491 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "avltree.h"
+#include "parsedata.h"
+#include "parser.h"
+#include "parsetree.h"
+#include "input.h"
+
+#include <iostream>
+#include <iomanip>
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+
+
+using namespace std;
+ostream &operator<<( ostream &out, const NameRef &nameRef );
+ostream &operator<<( ostream &out, const NameInst &nameInst );
+ostream &operator<<( ostream &out, const Token &token );
+
+/* Convert the literal string which comes in from the scanner into an array of
+ * characters with escapes and options interpreted. Also null terminates the
+ * string. Though this null termination should not be relied on for
+ * interpreting literals in the parser because the string may contain a
+ * literal string with \0 */
+void prepareLitString( String &result, bool &caseInsensitive,
+ const String &srcString, const InputLoc &loc )
+{
+ result.setAs( String::Fresh(), srcString.length() );
+ caseInsensitive = false;
+
+ char *src = srcString.data + 1;
+ char *end = 0;
+ bool backtick = srcString[0] == '`';
+
+ if ( !backtick ) {
+ end = srcString.data + srcString.length() - 1;
+
+ while ( *end != '\'' && *end != '\"' && *end != '\n' ) {
+ if ( *end == 'i' )
+ caseInsensitive = true;
+ else {
+ error( loc ) << "literal string '" << *end <<
+ "' option not supported" << endl;
+ }
+ end -= 1;
+ }
+
+ if ( *end == '\n' )
+ end++;
+ }
+ else {
+ end = srcString.data + srcString.length();
+ }
+
+ char *dest = result.data;
+ int len = 0;
+ while ( src != end ) {
+ if ( !backtick && *src == '\\' ) {
+ switch ( src[1] ) {
+ case '0': dest[len++] = '\0'; break;
+ case 'a': dest[len++] = '\a'; break;
+ case 'b': dest[len++] = '\b'; break;
+ case 't': dest[len++] = '\t'; break;
+ case 'n': dest[len++] = '\n'; break;
+ case 'v': dest[len++] = '\v'; break;
+ case 'f': dest[len++] = '\f'; break;
+ case 'r': dest[len++] = '\r'; break;
+ case '\n': break;
+ default: dest[len++] = src[1]; break;
+ }
+ src += 2;
+ }
+ else {
+ dest[len++] = *src++;
+ }
+ }
+
+ result.chop( len );
+}
+
+int CmpUniqueType::compare( const UniqueType &ut1, const UniqueType &ut2 )
+{
+ if ( ut1.typeId < ut2.typeId )
+ return -1;
+ else if ( ut1.typeId > ut2.typeId )
+ return 1;
+ else if ( ut1.typeId == TYPE_TREE ||
+ ut1.typeId == TYPE_PTR ||
+ ut1.typeId == TYPE_REF )
+ {
+ if ( ut1.langEl < ut2.langEl )
+ return -1;
+ else if ( ut1.langEl > ut2.langEl )
+ return 1;
+ }
+ else if ( ut1.typeId == TYPE_ITER ) {
+ if ( ut1.iterDef < ut2.iterDef )
+ return -1;
+ else if ( ut1.iterDef > ut2.iterDef )
+ return 1;
+ }
+ else {
+ /* Fail on anything unimplemented. */
+ assert( false );
+ }
+
+ return 0;
+}
+
+int CmpUniqueRepeat::compare( const UniqueRepeat &ut1, const UniqueRepeat &ut2 )
+{
+ if ( ut1.repeatType < ut2.repeatType )
+ return -1;
+ else if ( ut1.repeatType > ut2.repeatType )
+ return 1;
+ else {
+ if ( ut1.langEl < ut2.langEl )
+ return -1;
+ else if ( ut1.langEl > ut2.langEl )
+ return 1;
+ }
+
+ return 0;
+}
+
+int CmpUniqueMap::compare( const UniqueMap &ut1, const UniqueMap &ut2 )
+{
+ if ( ut1.key < ut2.key )
+ return -1;
+ else if ( ut1.key > ut2.key )
+ return 1;
+ else {
+ if ( ut1.value < ut2.value )
+ return -1;
+ else if ( ut1.value > ut2.value )
+ return 1;
+ }
+
+ return 0;
+}
+
+int CmpUniqueList::compare( const UniqueList &ut1, const UniqueList &ut2 )
+{
+ if ( ut1.value < ut2.value )
+ return -1;
+ else if ( ut1.value > ut2.value )
+ return 1;
+
+ return 0;
+}
+
+int CmpUniqueVector::compare( const UniqueVector &ut1, const UniqueVector &ut2 )
+{
+ if ( ut1.value < ut2.value )
+ return -1;
+ else if ( ut1.value > ut2.value )
+ return 1;
+
+ return 0;
+}
+
+int CmpUniqueParser::compare( const UniqueParser &ut1, const UniqueParser &ut2 )
+{
+ if ( ut1.parseType < ut2.parseType )
+ return -1;
+ else if ( ut1.parseType > ut2.parseType )
+ return 1;
+
+ return 0;
+}
+
+FsmGraph *LexDefinition::walk( Compiler *pd )
+{
+ /* Recurse on the expression. */
+ FsmGraph *rtnVal = join->walk( pd );
+
+ /* If the expression below is a join operation with multiple expressions
+ * then it just had epsilon transisions resolved. If it is a join
+ * with only a single expression then run the epsilon op now. */
+ if ( join->expr != 0 )
+ rtnVal->epsilonOp();
+
+ return rtnVal;
+}
+
+void RegionImpl::makeNameTree( const InputLoc &loc, Compiler *pd )
+{
+ NameInst *nameInst = new NameInst( pd->nextNameId++ );
+ pd->nameInstList.append( nameInst );
+
+ /* Guess we do this now. */
+ makeActions( pd );
+
+ /* Save off the name inst into the token region. This is only legal for
+ * token regions because they are only ever referenced once (near the root
+ * of the name tree). They cannot have more than one corresponding name
+ * inst. */
+ assert( regionNameInst == 0 );
+ regionNameInst = nameInst;
+}
+
+InputLoc TokenInstance::getLoc()
+{
+ return action != 0 ? action->loc : semiLoc;
+}
+
+/*
+ * If there are any LMs then all of the following entry points must reset
+ * tokstart:
+ *
+ * 1. fentry(StateRef)
+ * 2. ftoto(StateRef), fcall(StateRef), fnext(StateRef)
+ * 3. targt of any transition that has an fcall (the return loc).
+ * 4. start state of all longest match routines.
+ */
+
+Action *RegionImpl::newAction( Compiler *pd, const InputLoc &loc,
+ const String &name, InlineList *inlineList )
+{
+ Action *action = Action::cons( loc, name, inlineList );
+ pd->actionList.append( action );
+ action->isLmAction = true;
+ return action;
+}
+
+void RegionImpl::makeActions( Compiler *pd )
+{
+ /* Make actions that set the action id. */
+ for ( TokenInstanceListReg::Iter lmi = tokenInstanceList; lmi.lte(); lmi++ ) {
+ /* For each part create actions for setting the match type. We need
+ * to do this so that the actions will go into the actionIndex. */
+ InlineList *inlineList = InlineList::cons();
+ inlineList->append( InlineItem::cons( lmi->getLoc(), this, lmi,
+ InlineItem::LmSetActId ) );
+ char *actName = new char[50];
+ sprintf( actName, "store%i", lmi->longestMatchId );
+ lmi->setActId = newAction( pd, lmi->getLoc(), actName, inlineList );
+ }
+
+ /* Make actions that execute the user action and restart on the last character. */
+ for ( TokenInstanceListReg::Iter lmi = tokenInstanceList; lmi.lte(); lmi++ ) {
+ /* For each part create actions for setting the match type. We need
+ * to do this so that the actions will go into the actionIndex. */
+ InlineList *inlineList = InlineList::cons();
+ inlineList->append( InlineItem::cons( lmi->getLoc(), this, lmi,
+ InlineItem::LmOnLast ) );
+ char *actName = new char[50];
+ sprintf( actName, "imm%i", lmi->longestMatchId );
+ lmi->actOnLast = newAction( pd, lmi->getLoc(), actName, inlineList );
+ }
+
+ /* Make actions that execute the user action and restart on the next
+ * character. These actions will set tokend themselves (it is the current
+ * char). */
+ for ( TokenInstanceListReg::Iter lmi = tokenInstanceList; lmi.lte(); lmi++ ) {
+ /* For each part create actions for setting the match type. We need
+ * to do this so that the actions will go into the actionIndex. */
+ InlineList *inlineList = InlineList::cons();
+ inlineList->append( InlineItem::cons( lmi->getLoc(), this, lmi,
+ InlineItem::LmOnNext ) );
+ char *actName = new char[50];
+ sprintf( actName, "lagh%i", lmi->longestMatchId );
+ lmi->actOnNext = newAction( pd, lmi->getLoc(), actName, inlineList );
+ }
+
+ /* Make actions that execute the user action and restart at tokend. These
+ * actions execute some time after matching the last char. */
+ for ( TokenInstanceListReg::Iter lmi = tokenInstanceList; lmi.lte(); lmi++ ) {
+ /* For each part create actions for setting the match type. We need
+ * to do this so that the actions will go into the actionIndex. */
+ InlineList *inlineList = InlineList::cons();
+ inlineList->append( InlineItem::cons( lmi->getLoc(), this, lmi,
+ InlineItem::LmOnLagBehind ) );
+ char *actName = new char[50];
+ sprintf( actName, "lag%i", lmi->longestMatchId );
+ lmi->actLagBehind = newAction( pd, lmi->getLoc(), actName, inlineList );
+ }
+
+ InputLoc loc;
+ loc.line = 1;
+ loc.col = 1;
+
+ /* Create the error action. */
+ InlineList *il6 = InlineList::cons();
+ il6->append( InlineItem::cons( loc, this, 0, InlineItem::LmSwitch ) );
+ lmActSelect = newAction( pd, loc, "lagsel", il6 );
+}
+
+void RegionImpl::restart( FsmGraph *graph, FsmTrans *trans )
+{
+ FsmState *fromState = trans->fromState;
+ graph->detachTrans( fromState, trans->toState, trans );
+ graph->attachTrans( fromState, graph->startState, trans );
+}
+
+void RegionImpl::runLongestMatch( Compiler *pd, FsmGraph *graph )
+{
+ graph->markReachableFromHereStopFinal( graph->startState );
+ for ( StateList::Iter ms = graph->stateList; ms.lte(); ms++ ) {
+ if ( ms->stateBits & SB_ISMARKED ) {
+ ms->lmItemSet.insert( 0 );
+ ms->stateBits &= ~ SB_ISMARKED;
+ }
+ }
+
+ /* Transfer the first item of non-empty lmAction tables to the item sets
+ * of the states that follow. Exclude states that have no transitions out.
+ * This must happen on a separate pass so that on each iteration of the
+ * next pass we have the item set entries from all lmAction tables. */
+ for ( StateList::Iter st = graph->stateList; st.lte(); st++ ) {
+ for ( TransList::Iter trans = st->outList; trans.lte(); trans++ ) {
+ if ( trans->lmActionTable.length() > 0 ) {
+ LmActionTableEl *lmAct = trans->lmActionTable.data;
+ FsmState *toState = trans->toState;
+ assert( toState );
+
+ /* Check if there are transitions out, this may be a very
+ * close approximation? Out transitions going nowhere?
+ * FIXME: Check. */
+ if ( toState->outList.length() > 0 ) {
+ /* Fill the item sets. */
+ graph->markReachableFromHereStopFinal( toState );
+ for ( StateList::Iter ms = graph->stateList; ms.lte(); ms++ ) {
+ if ( ms->stateBits & SB_ISMARKED ) {
+ ms->lmItemSet.insert( lmAct->value );
+ ms->stateBits &= ~ SB_ISMARKED;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /* The lmItem sets are now filled, telling us which longest match rules
+ * can succeed in which states. First determine if we need to make sure
+ * act is defaulted to zero. */
+ int maxItemSetLength = 0;
+ graph->markReachableFromHereStopFinal( graph->startState );
+ for ( StateList::Iter ms = graph->stateList; ms.lte(); ms++ ) {
+ if ( ms->stateBits & SB_ISMARKED ) {
+ if ( ms->lmItemSet.length() > maxItemSetLength )
+ maxItemSetLength = ms->lmItemSet.length();
+ ms->stateBits &= ~ SB_ISMARKED;
+ }
+ }
+
+ /* The actions executed on starting to match a token. */
+ graph->isolateStartState();
+ graph->startState->fromStateActionTable.setAction( pd->setTokStartOrd, pd->setTokStart );
+ if ( maxItemSetLength > 1 ) {
+ /* The longest match action switch may be called when tokens are
+ * matched, in which case act must be initialized, there must be a
+ * case to handle the error, and the generated machine will require an
+ * error state. */
+ lmSwitchHandlesError = true;
+ graph->startState->toStateActionTable.setAction( pd->initActIdOrd, pd->initActId );
+ }
+
+ /* The place to store transitions to restart. It maybe possible for the
+ * restarting to affect the searching through the graph that follows. For
+ * now take the safe route and save the list of transitions to restart
+ * until after all searching is done. */
+ Vector<FsmTrans*> restartTrans;
+
+ /* Set actions that do immediate token recognition, set the longest match part
+ * id and set the token ending. */
+ for ( StateList::Iter st = graph->stateList; st.lte(); st++ ) {
+ for ( TransList::Iter trans = st->outList; trans.lte(); trans++ ) {
+ if ( trans->lmActionTable.length() > 0 ) {
+ LmActionTableEl *lmAct = trans->lmActionTable.data;
+ FsmState *toState = trans->toState;
+ assert( toState );
+
+ /* Check if there are transitions out, this may be a very
+ * close approximation? Out transitions going nowhere?
+ * FIXME: Check. */
+ if ( toState->outList.length() == 0 ) {
+ /* Can execute the immediate action for the longest match
+ * part. Redirect the action to the start state. */
+ trans->actionTable.setAction( lmAct->key,
+ lmAct->value->actOnLast );
+ restartTrans.append( trans );
+ }
+ else {
+ /* Look for non final states that have a non-empty item
+ * set. If these are present then we need to record the
+ * end of the token. Also Find the highest item set
+ * length reachable from here (excluding at transtions to
+ * final states). */
+ bool nonFinalNonEmptyItemSet = false;
+ maxItemSetLength = 0;
+ graph->markReachableFromHereStopFinal( toState );
+ for ( StateList::Iter ms = graph->stateList; ms.lte(); ms++ ) {
+ if ( ms->stateBits & SB_ISMARKED ) {
+ if ( ms->lmItemSet.length() > 0 && !ms->isFinState() )
+ nonFinalNonEmptyItemSet = true;
+ if ( ms->lmItemSet.length() > maxItemSetLength )
+ maxItemSetLength = ms->lmItemSet.length();
+ ms->stateBits &= ~ SB_ISMARKED;
+ }
+ }
+
+ /* If there are reachable states that are not final and
+ * have non empty item sets or that have an item set
+ * length greater than one then we need to set tokend
+ * because the error action that matches the token will
+ * require it. */
+ if ( nonFinalNonEmptyItemSet || maxItemSetLength > 1 )
+ trans->actionTable.setAction( pd->setTokEndOrd, pd->setTokEnd );
+
+ /* Some states may not know which longest match item to
+ * execute, must set it. */
+ if ( maxItemSetLength > 1 ) {
+ /* There are transitions out, another match may come. */
+ trans->actionTable.setAction( lmAct->key,
+ lmAct->value->setActId );
+ }
+ }
+ }
+ }
+ }
+
+ /* Now that all graph searching is done it certainly safe set the
+ * restarting. It may be safe above, however this must be verified. */
+ for ( Vector<FsmTrans*>::Iter rs = restartTrans; rs.lte(); rs++ )
+ restart( graph, *rs );
+
+ int lmErrActionOrd = pd->curActionOrd++;
+
+ /* Embed the error for recognizing a char. */
+ for ( StateList::Iter st = graph->stateList; st.lte(); st++ ) {
+ if ( st->lmItemSet.length() == 1 && st->lmItemSet[0] != 0 ) {
+ if ( st->isFinState() ) {
+ /* On error execute the onActNext action, which knows that
+ * the last character of the token was one back and restart. */
+ graph->setErrorTarget( st, graph->startState, &lmErrActionOrd,
+ &st->lmItemSet[0]->actOnNext, 1 );
+ st->eofActionTable.setAction( lmErrActionOrd,
+ st->lmItemSet[0]->actOnNext );
+ st->eofTarget = graph->startState;
+ }
+ else {
+ graph->setErrorTarget( st, graph->startState, &lmErrActionOrd,
+ &st->lmItemSet[0]->actLagBehind, 1 );
+ st->eofActionTable.setAction( lmErrActionOrd,
+ st->lmItemSet[0]->actLagBehind );
+ st->eofTarget = graph->startState;
+ }
+ }
+ else if ( st->lmItemSet.length() > 1 ) {
+ /* Need to use the select. Take note of the which items the select
+ * is needed for so only the necessary actions are included. */
+ for ( LmItemSet::Iter plmi = st->lmItemSet; plmi.lte(); plmi++ ) {
+ if ( *plmi != 0 )
+ (*plmi)->inLmSelect = true;
+ }
+ /* On error, execute the action select and go to the start state. */
+ graph->setErrorTarget( st, graph->startState, &lmErrActionOrd,
+ &lmActSelect, 1 );
+ st->eofActionTable.setAction( lmErrActionOrd, lmActSelect );
+ st->eofTarget = graph->startState;
+ }
+ }
+
+ /* Finally, the start state should be made final. */
+ graph->setFinState( graph->startState );
+}
+
+void RegionImpl::transferScannerLeavingActions( FsmGraph *graph )
+{
+ for ( StateList::Iter st = graph->stateList; st.lte(); st++ ) {
+ if ( st->outActionTable.length() > 0 )
+ graph->setErrorActions( st, st->outActionTable );
+ }
+}
+
+FsmGraph *RegionImpl::walk( Compiler *pd )
+{
+ /* Make each part of the longest match. */
+ int numParts = 0;
+ FsmGraph **parts = new FsmGraph*[tokenInstanceList.length()];
+ for ( TokenInstanceListReg::Iter lmi = tokenInstanceList; lmi.lte(); lmi++ ) {
+ /* Watch out for patternless tokens. */
+ if ( lmi->join != 0 ) {
+ /* Create the machine and embed the setting of the longest match id. */
+ parts[numParts] = lmi->join->walk( pd );
+ parts[numParts]->longMatchAction( pd->curActionOrd++, lmi );
+
+ /* Look for tokens that accept the zero length-word. The first one found
+ * will be used as the default token. */
+ if ( defaultTokenInstance == 0 && parts[numParts]->startState->isFinState() )
+ defaultTokenInstance = lmi;
+
+ numParts += 1;
+ }
+ }
+ FsmGraph *retFsm = parts[0];
+
+ if ( defaultTokenInstance != 0 && defaultTokenInstance->tokenDef->tdLangEl->isIgnore )
+ error() << "ignore token cannot be a scanner's zero-length token" << endp;
+
+ /* The region is empty. Return the empty set. */
+ if ( numParts == 0 ) {
+ retFsm = new FsmGraph();
+ retFsm->lambdaFsm();
+ }
+ else {
+ /* Before we union the patterns we need to deal with leaving actions. They
+ * are transfered to error transitions out of the final states (like local
+ * error actions) and to eof actions. In the scanner we need to forbid
+ * on_last for any final state that has an leaving action. */
+ for ( int i = 0; i < numParts; i++ )
+ transferScannerLeavingActions( parts[i] );
+
+ /* Union machines one and up with machine zero. */
+ FsmGraph *retFsm = parts[0];
+ for ( int i = 1; i < numParts; i++ ) {
+ retFsm->unionOp( parts[i] );
+ afterOpMinimize( retFsm );
+ }
+
+ runLongestMatch( pd, retFsm );
+ delete[] parts;
+ }
+
+ /* Need the entry point for the region. */
+ retFsm->setEntry( regionNameInst->id, retFsm->startState );
+
+ return retFsm;
+}
+
+/* Walk an expression node. */
+FsmGraph *LexJoin::walk( Compiler *pd )
+{
+ FsmGraph *retFsm = expr->walk( pd );
+
+ /* Maybe the the context. */
+ if ( context != 0 ) {
+ retFsm->leaveFsmAction( pd->curActionOrd++, mark );
+ FsmGraph *contextGraph = context->walk( pd );
+ retFsm->concatOp( contextGraph );
+ }
+
+ return retFsm;
+}
+
+/* Clean up after an expression node. */
+LexExpression::~LexExpression()
+{
+ switch ( type ) {
+ case OrType: case IntersectType: case SubtractType:
+ case StrongSubtractType:
+ delete expression;
+ delete term;
+ break;
+ case TermType:
+ delete term;
+ break;
+ case BuiltinType:
+ break;
+ }
+}
+
+/* Evaluate a single expression node. */
+FsmGraph *LexExpression::walk( Compiler *pd, bool lastInSeq )
+{
+ FsmGraph *rtnVal = 0;
+ switch ( type ) {
+ case OrType: {
+ /* Evaluate the expression. */
+ rtnVal = expression->walk( pd, false );
+ /* Evaluate the term. */
+ FsmGraph *rhs = term->walk( pd );
+ /* Perform union. */
+ rtnVal->unionOp( rhs );
+ afterOpMinimize( rtnVal, lastInSeq );
+ break;
+ }
+ case IntersectType: {
+ /* Evaluate the expression. */
+ rtnVal = expression->walk( pd );
+ /* Evaluate the term. */
+ FsmGraph *rhs = term->walk( pd );
+ /* Perform intersection. */
+ rtnVal->intersectOp( rhs );
+ afterOpMinimize( rtnVal, lastInSeq );
+ break;
+ }
+ case SubtractType: {
+ /* Evaluate the expression. */
+ rtnVal = expression->walk( pd );
+ /* Evaluate the term. */
+ FsmGraph *rhs = term->walk( pd );
+ /* Perform subtraction. */
+ rtnVal->subtractOp( rhs );
+ afterOpMinimize( rtnVal, lastInSeq );
+ break;
+ }
+ case StrongSubtractType: {
+ /* Evaluate the expression. */
+ rtnVal = expression->walk( pd );
+
+ /* Evaluate the term and pad it with any* machines. */
+ FsmGraph *rhs = dotStarFsm( pd );
+ FsmGraph *termFsm = term->walk( pd );
+ FsmGraph *trailAnyStar = dotStarFsm( pd );
+ rhs->concatOp( termFsm );
+ rhs->concatOp( trailAnyStar );
+
+ /* Perform subtraction. */
+ rtnVal->subtractOp( rhs );
+ afterOpMinimize( rtnVal, lastInSeq );
+ break;
+ }
+ case TermType: {
+ /* Return result of the term. */
+ rtnVal = term->walk( pd );
+ break;
+ }
+ case BuiltinType: {
+ /* Duplicate the builtin. */
+ rtnVal = makeBuiltin( builtin, pd );
+ break;
+ }
+ }
+
+ return rtnVal;
+}
+
+/* Clean up after a term node. */
+LexTerm::~LexTerm()
+{
+ switch ( type ) {
+ case ConcatType:
+ case RightStartType:
+ case RightFinishType:
+ case LeftType:
+ delete term;
+ delete factorAug;
+ break;
+ case FactorAugType:
+ delete factorAug;
+ break;
+ }
+}
+
+/* Evaluate a term node. */
+FsmGraph *LexTerm::walk( Compiler *pd, bool lastInSeq )
+{
+ FsmGraph *rtnVal = 0;
+ switch ( type ) {
+ case ConcatType: {
+ /* Evaluate the Term. */
+ rtnVal = term->walk( pd, false );
+ /* Evaluate the LexFactorRep. */
+ FsmGraph *rhs = factorAug->walk( pd );
+ /* Perform concatenation. */
+ rtnVal->concatOp( rhs );
+ afterOpMinimize( rtnVal, lastInSeq );
+ break;
+ }
+ case RightStartType: {
+ /* Evaluate the Term. */
+ rtnVal = term->walk( pd );
+
+ /* Evaluate the LexFactorRep. */
+ FsmGraph *rhs = factorAug->walk( pd );
+
+ /* Set up the priority descriptors. The left machine gets the
+ * lower priority where as the right get the higher start priority. */
+ priorDescs[0].key = pd->nextPriorKey++;
+ priorDescs[0].priority = 0;
+ rtnVal->allTransPrior( pd->curPriorOrd++, &priorDescs[0] );
+
+ /* The start transitions right machine get the higher priority.
+ * Use the same unique key. */
+ priorDescs[1].key = priorDescs[0].key;
+ priorDescs[1].priority = 1;
+ rhs->startFsmPrior( pd->curPriorOrd++, &priorDescs[1] );
+
+ /* Perform concatenation. */
+ rtnVal->concatOp( rhs );
+ afterOpMinimize( rtnVal, lastInSeq );
+ break;
+ }
+ case RightFinishType: {
+ /* Evaluate the Term. */
+ rtnVal = term->walk( pd );
+
+ /* Evaluate the LexFactorRep. */
+ FsmGraph *rhs = factorAug->walk( pd );
+
+ /* Set up the priority descriptors. The left machine gets the
+ * lower priority where as the finishing transitions to the right
+ * get the higher priority. */
+ priorDescs[0].key = pd->nextPriorKey++;
+ priorDescs[0].priority = 0;
+ rtnVal->allTransPrior( pd->curPriorOrd++, &priorDescs[0] );
+
+ /* The finishing transitions of the right machine get the higher
+ * priority. Use the same unique key. */
+ priorDescs[1].key = priorDescs[0].key;
+ priorDescs[1].priority = 1;
+ rhs->finishFsmPrior( pd->curPriorOrd++, &priorDescs[1] );
+
+ /* Perform concatenation. */
+ rtnVal->concatOp( rhs );
+ afterOpMinimize( rtnVal, lastInSeq );
+ break;
+ }
+ case LeftType: {
+ /* Evaluate the Term. */
+ rtnVal = term->walk( pd );
+
+ /* Evaluate the LexFactorRep. */
+ FsmGraph *rhs = factorAug->walk( pd );
+
+ /* Set up the priority descriptors. The left machine gets the
+ * higher priority. */
+ priorDescs[0].key = pd->nextPriorKey++;
+ priorDescs[0].priority = 1;
+ rtnVal->allTransPrior( pd->curPriorOrd++, &priorDescs[0] );
+
+ /* The right machine gets the lower priority. Since
+ * startTransPrior might unnecessarily increase the number of
+ * states during the state machine construction process (due to
+ * isolation), we use allTransPrior instead, which has the same
+ * effect. */
+ priorDescs[1].key = priorDescs[0].key;
+ priorDescs[1].priority = 0;
+ rhs->allTransPrior( pd->curPriorOrd++, &priorDescs[1] );
+
+ /* Perform concatenation. */
+ rtnVal->concatOp( rhs );
+ afterOpMinimize( rtnVal, lastInSeq );
+ break;
+ }
+ case FactorAugType: {
+ rtnVal = factorAug->walk( pd );
+ break;
+ }
+ }
+ return rtnVal;
+}
+
+LexFactorAug::~LexFactorAug()
+{
+ delete factorRep;
+}
+
+void LexFactorAug::assignActions( Compiler *pd, FsmGraph *graph, int *actionOrd )
+{
+ /* Assign actions. */
+ for ( int i = 0; i < actions.length(); i++ ) {
+ switch ( actions[i].type ) {
+ case at_start:
+ graph->startFsmAction( actionOrd[i], actions[i].action );
+ afterOpMinimize( graph );
+ break;
+ case at_leave:
+ graph->leaveFsmAction( actionOrd[i], actions[i].action );
+ break;
+ }
+ }
+}
+
+/* Evaluate a factor with augmentation node. */
+FsmGraph *LexFactorAug::walk( Compiler *pd )
+{
+ /* Make the array of function orderings. */
+ int *actionOrd = 0;
+ if ( actions.length() > 0 )
+ actionOrd = new int[actions.length()];
+
+ /* First walk the list of actions, assigning order to all starting
+ * actions. */
+ for ( int i = 0; i < actions.length(); i++ ) {
+ if ( actions[i].type == at_start )
+ actionOrd[i] = pd->curActionOrd++;
+ }
+
+ /* Evaluate the factor with repetition. */
+ FsmGraph *rtnVal = factorRep->walk( pd );
+
+ /* Compute the remaining action orderings. */
+ for ( int i = 0; i < actions.length(); i++ ) {
+ if ( actions[i].type != at_start )
+ actionOrd[i] = pd->curActionOrd++;
+ }
+
+ assignActions( pd, rtnVal , actionOrd );
+
+ if ( actionOrd != 0 )
+ delete[] actionOrd;
+ return rtnVal;
+}
+
+
+/* Clean up after a factor with repetition node. */
+LexFactorRep::~LexFactorRep()
+{
+ switch ( type ) {
+ case StarType: case StarStarType: case OptionalType: case PlusType:
+ case ExactType: case MaxType: case MinType: case RangeType:
+ delete factorRep;
+ break;
+ case FactorNegType:
+ delete factorNeg;
+ break;
+ }
+}
+
+/* Evaluate a factor with repetition node. */
+FsmGraph *LexFactorRep::walk( Compiler *pd )
+{
+ FsmGraph *retFsm = 0;
+
+ switch ( type ) {
+ case StarType: {
+ /* Evaluate the LexFactorRep. */
+ retFsm = factorRep->walk( pd );
+ if ( retFsm->startState->isFinState() ) {
+ warning(loc) << "applying kleene star to a machine that "
+ "accepts zero length word" << endl;
+ }
+
+ /* Shift over the start action orders then do the kleene star. */
+ pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd );
+ retFsm->starOp( );
+ afterOpMinimize( retFsm );
+ break;
+ }
+ case StarStarType: {
+ /* Evaluate the LexFactorRep. */
+ retFsm = factorRep->walk( pd );
+ if ( retFsm->startState->isFinState() ) {
+ warning(loc) << "applying kleene star to a machine that "
+ "accepts zero length word" << endl;
+ }
+
+ /* Set up the prior descs. All gets priority one, whereas leaving gets
+ * priority zero. Make a unique key so that these priorities don't
+ * interfere with any priorities set by the user. */
+ priorDescs[0].key = pd->nextPriorKey++;
+ priorDescs[0].priority = 1;
+ retFsm->allTransPrior( pd->curPriorOrd++, &priorDescs[0] );
+
+ /* Leaveing gets priority 0. Use same unique key. */
+ priorDescs[1].key = priorDescs[0].key;
+ priorDescs[1].priority = 0;
+ retFsm->leaveFsmPrior( pd->curPriorOrd++, &priorDescs[1] );
+
+ /* Shift over the start action orders then do the kleene star. */
+ pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd );
+ retFsm->starOp( );
+ afterOpMinimize( retFsm );
+ break;
+ }
+ case OptionalType: {
+ /* Make the null fsm. */
+ FsmGraph *nu = new FsmGraph();
+ nu->lambdaFsm( );
+
+ /* Evaluate the LexFactorRep. */
+ retFsm = factorRep->walk( pd );
+
+ /* Perform the question operator. */
+ retFsm->unionOp( nu );
+ afterOpMinimize( retFsm );
+ break;
+ }
+ case PlusType: {
+ /* Evaluate the LexFactorRep. */
+ retFsm = factorRep->walk( pd );
+ if ( retFsm->startState->isFinState() ) {
+ warning(loc) << "applying plus operator to a machine that "
+ "accpets zero length word" << endl;
+ }
+
+ /* Need a duplicated for the star end. */
+ FsmGraph *dup = new FsmGraph( *retFsm );
+
+ /* The start func orders need to be shifted before doing the star. */
+ pd->curActionOrd += dup->shiftStartActionOrder( pd->curActionOrd );
+
+ /* Star the duplicate. */
+ dup->starOp( );
+ afterOpMinimize( dup );
+
+ retFsm->concatOp( dup );
+ afterOpMinimize( retFsm );
+ break;
+ }
+ case ExactType: {
+ /* Get an int from the repetition amount. */
+ if ( lowerRep == 0 ) {
+ /* No copies. Don't need to evaluate the factorRep.
+ * This Defeats the purpose so give a warning. */
+ warning(loc) << "exactly zero repetitions results "
+ "in the null machine" << endl;
+
+ retFsm = new FsmGraph();
+ retFsm->lambdaFsm();
+ }
+ else {
+ /* Evaluate the first LexFactorRep. */
+ retFsm = factorRep->walk( pd );
+ if ( retFsm->startState->isFinState() ) {
+ warning(loc) << "applying repetition to a machine that "
+ "accepts zero length word" << endl;
+ }
+
+ /* The start func orders need to be shifted before doing the
+ * repetition. */
+ pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd );
+
+ /* Do the repetition on the machine. Already guarded against n == 0 */
+ retFsm->repeatOp( lowerRep );
+ afterOpMinimize( retFsm );
+ }
+ break;
+ }
+ case MaxType: {
+ /* Get an int from the repetition amount. */
+ if ( upperRep == 0 ) {
+ /* No copies. Don't need to evaluate the factorRep.
+ * This Defeats the purpose so give a warning. */
+ warning(loc) << "max zero repetitions results "
+ "in the null machine" << endl;
+
+ retFsm = new FsmGraph();
+ retFsm->lambdaFsm();
+ }
+ else {
+ /* Evaluate the first LexFactorRep. */
+ retFsm = factorRep->walk( pd );
+ if ( retFsm->startState->isFinState() ) {
+ warning(loc) << "applying max repetition to a machine that "
+ "accepts zero length word" << endl;
+ }
+
+ /* The start func orders need to be shifted before doing the
+ * repetition. */
+ pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd );
+
+ /* Do the repetition on the machine. Already guarded against n == 0 */
+ retFsm->optionalRepeatOp( upperRep );
+ afterOpMinimize( retFsm );
+ }
+ break;
+ }
+ case MinType: {
+ /* Evaluate the repeated machine. */
+ retFsm = factorRep->walk( pd );
+ if ( retFsm->startState->isFinState() ) {
+ warning(loc) << "applying min repetition to a machine that "
+ "accepts zero length word" << endl;
+ }
+
+ /* The start func orders need to be shifted before doing the repetition
+ * and the kleene star. */
+ pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd );
+
+ if ( lowerRep == 0 ) {
+ /* Acts just like a star op on the machine to return. */
+ retFsm->starOp( );
+ afterOpMinimize( retFsm );
+ }
+ else {
+ /* Take a duplicate for the plus. */
+ FsmGraph *dup = new FsmGraph( *retFsm );
+
+ /* Do repetition on the first half. */
+ retFsm->repeatOp( lowerRep );
+ afterOpMinimize( retFsm );
+
+ /* Star the duplicate. */
+ dup->starOp( );
+ afterOpMinimize( dup );
+
+ /* Tak on the kleene star. */
+ retFsm->concatOp( dup );
+ afterOpMinimize( retFsm );
+ }
+ break;
+ }
+ case RangeType: {
+ /* Check for bogus range. */
+ if ( upperRep - lowerRep < 0 ) {
+ error(loc) << "invalid range repetition" << endl;
+
+ /* Return null machine as recovery. */
+ retFsm = new FsmGraph();
+ retFsm->lambdaFsm();
+ }
+ else if ( lowerRep == 0 && upperRep == 0 ) {
+ /* No copies. Don't need to evaluate the factorRep. This
+ * defeats the purpose so give a warning. */
+ warning(loc) << "zero to zero repetitions results "
+ "in the null machine" << endl;
+
+ retFsm = new FsmGraph();
+ retFsm->lambdaFsm();
+ }
+ else {
+ /* Now need to evaluate the repeated machine. */
+ retFsm = factorRep->walk( pd );
+ if ( retFsm->startState->isFinState() ) {
+ warning(loc) << "applying range repetition to a machine that "
+ "accepts zero length word" << endl;
+ }
+
+ /* The start func orders need to be shifted before doing both kinds
+ * of repetition. */
+ pd->curActionOrd += retFsm->shiftStartActionOrder( pd->curActionOrd );
+
+ if ( lowerRep == 0 ) {
+ /* Just doing max repetition. Already guarded against n == 0. */
+ retFsm->optionalRepeatOp( upperRep );
+ afterOpMinimize( retFsm );
+ }
+ else if ( lowerRep == upperRep ) {
+ /* Just doing exact repetition. Already guarded against n == 0. */
+ retFsm->repeatOp( lowerRep );
+ afterOpMinimize( retFsm );
+ }
+ else {
+ /* This is the case that 0 < lowerRep < upperRep. Take a
+ * duplicate for the optional repeat. */
+ FsmGraph *dup = new FsmGraph( *retFsm );
+
+ /* Do repetition on the first half. */
+ retFsm->repeatOp( lowerRep );
+ afterOpMinimize( retFsm );
+
+ /* Do optional repetition on the second half. */
+ dup->optionalRepeatOp( upperRep - lowerRep );
+ afterOpMinimize( dup );
+
+ /* Tak on the duplicate machine. */
+ retFsm->concatOp( dup );
+ afterOpMinimize( retFsm );
+ }
+ }
+ break;
+ }
+ case FactorNegType: {
+ /* Evaluate the Factor. Pass it up. */
+ retFsm = factorNeg->walk( pd );
+ break;
+ }}
+ return retFsm;
+}
+
+
+/* Clean up after a factor with negation node. */
+LexFactorNeg::~LexFactorNeg()
+{
+ switch ( type ) {
+ case NegateType:
+ case CharNegateType:
+ delete factorNeg;
+ break;
+ case FactorType:
+ delete factor;
+ break;
+ }
+}
+
+/* Evaluate a factor with negation node. */
+FsmGraph *LexFactorNeg::walk( Compiler *pd )
+{
+ FsmGraph *retFsm = 0;
+
+ switch ( type ) {
+ case NegateType: {
+ /* Evaluate the factorNeg. */
+ FsmGraph *toNegate = factorNeg->walk( pd );
+
+ /* Negation is subtract from dot-star. */
+ retFsm = dotStarFsm( pd );
+ retFsm->subtractOp( toNegate );
+ afterOpMinimize( retFsm );
+ break;
+ }
+ case CharNegateType: {
+ /* Evaluate the factorNeg. */
+ FsmGraph *toNegate = factorNeg->walk( pd );
+
+ /* CharNegation is subtract from dot. */
+ retFsm = dotFsm( pd );
+ retFsm->subtractOp( toNegate );
+ afterOpMinimize( retFsm );
+ break;
+ }
+ case FactorType: {
+ /* Evaluate the Factor. Pass it up. */
+ retFsm = factor->walk( pd );
+ break;
+ }}
+ return retFsm;
+}
+
+/* Clean up after a factor node. */
+LexFactor::~LexFactor()
+{
+ switch ( type ) {
+ case LiteralType:
+ delete literal;
+ break;
+ case RangeType:
+ delete range;
+ break;
+ case OrExprType:
+ delete reItem;
+ break;
+ case RegExprType:
+ delete regExp;
+ break;
+ case ReferenceType:
+ break;
+ case ParenType:
+ delete join;
+ break;
+ }
+}
+
+/* Evaluate a factor node. */
+FsmGraph *LexFactor::walk( Compiler *pd )
+{
+ FsmGraph *rtnVal = 0;
+ switch ( type ) {
+ case LiteralType:
+ rtnVal = literal->walk( pd );
+ break;
+ case RangeType:
+ rtnVal = range->walk( pd );
+ break;
+ case OrExprType:
+ rtnVal = reItem->walk( pd, 0 );
+ break;
+ case RegExprType:
+ rtnVal = regExp->walk( pd, 0 );
+ break;
+ case ReferenceType:
+ rtnVal = varDef->walk( pd );
+ break;
+ case ParenType:
+ rtnVal = join->walk( pd );
+ break;
+ }
+
+ return rtnVal;
+}
+
+
+/* Clean up a range object. Must delete the two literals. */
+Range::~Range()
+{
+ delete lowerLit;
+ delete upperLit;
+}
+
+bool Range::verifyRangeFsm( FsmGraph *rangeEnd )
+{
+ /* Must have two states. */
+ if ( rangeEnd->stateList.length() != 2 )
+ return false;
+ /* The start state cannot be final. */
+ if ( rangeEnd->startState->isFinState() )
+ return false;
+ /* There should be only one final state. */
+ if ( rangeEnd->finStateSet.length() != 1 )
+ return false;
+ /* The final state cannot have any transitions out. */
+ if ( rangeEnd->finStateSet[0]->outList.length() != 0 )
+ return false;
+ /* The start state should have only one transition out. */
+ if ( rangeEnd->startState->outList.length() != 1 )
+ return false;
+ /* The singe transition out of the start state should not be a range. */
+ FsmTrans *startTrans = rangeEnd->startState->outList.head;
+ if ( startTrans->lowKey != startTrans->highKey )
+ return false;
+ return true;
+}
+
+/* Evaluate a range. Gets the lower an upper key and makes an fsm range. */
+FsmGraph *Range::walk( Compiler *pd )
+{
+ /* Construct and verify the suitability of the lower end of the range. */
+ FsmGraph *lowerFsm = lowerLit->walk( pd );
+ if ( !verifyRangeFsm( lowerFsm ) ) {
+ error(lowerLit->loc) <<
+ "bad range lower end, must be a single character" << endl;
+ }
+
+ /* Construct and verify the upper end. */
+ FsmGraph *upperFsm = upperLit->walk( pd );
+ if ( !verifyRangeFsm( upperFsm ) ) {
+ error(upperLit->loc) <<
+ "bad range upper end, must be a single character" << endl;
+ }
+
+ /* Grab the keys from the machines, then delete them. */
+ Key lowKey = lowerFsm->startState->outList.head->lowKey;
+ Key highKey = upperFsm->startState->outList.head->lowKey;
+ delete lowerFsm;
+ delete upperFsm;
+
+ /* Validate the range. */
+ if ( lowKey > highKey ) {
+ /* Recover by setting upper to lower; */
+ error(lowerLit->loc) << "lower end of range is greater then upper end" << endl;
+ highKey = lowKey;
+ }
+
+ /* Return the range now that it is validated. */
+ FsmGraph *retFsm = new FsmGraph();
+ retFsm->rangeFsm( lowKey, highKey );
+ return retFsm;
+}
+
+/* Evaluate a literal object. */
+FsmGraph *Literal::walk( Compiler *pd )
+{
+ /* FsmGraph to return, is the alphabet signed. */
+ FsmGraph *rtnVal = 0;
+
+ switch ( type ) {
+ case Number: {
+ /* Make the fsm key in int format. */
+ Key fsmKey = makeFsmKeyNum( literal.data, loc, pd );
+ /* Make the new machine. */
+ rtnVal = new FsmGraph();
+ rtnVal->concatFsm( fsmKey );
+ break;
+ }
+ case LitString: {
+ /* Make the array of keys in int format. */
+ String interp;
+ bool caseInsensitive;
+ prepareLitString( interp, caseInsensitive, literal, loc );
+ Key *arr = new Key[interp.length()];
+ makeFsmKeyArray( arr, interp.data, interp.length(), pd );
+
+ /* Make the new machine. */
+ rtnVal = new FsmGraph();
+ if ( caseInsensitive )
+ rtnVal->concatFsmCI( arr, interp.length() );
+ else
+ rtnVal->concatFsm( arr, interp.length() );
+ delete[] arr;
+ break;
+ }}
+ return rtnVal;
+}
+
+/* Clean up after a regular expression object. */
+RegExpr::~RegExpr()
+{
+ switch ( type ) {
+ case RecurseItem:
+ delete regExp;
+ delete item;
+ break;
+ case Empty:
+ break;
+ }
+}
+
+/* Evaluate a regular expression object. */
+FsmGraph *RegExpr::walk( Compiler *pd, RegExpr *rootRegex )
+{
+ /* This is the root regex, pass down a pointer to this. */
+ if ( rootRegex == 0 )
+ rootRegex = this;
+
+ FsmGraph *rtnVal = 0;
+ switch ( type ) {
+ case RecurseItem: {
+ /* Walk both items. */
+ FsmGraph *fsm1 = regExp->walk( pd, rootRegex );
+ FsmGraph *fsm2 = item->walk( pd, rootRegex );
+ if ( fsm1 == 0 )
+ rtnVal = fsm2;
+ else {
+ fsm1->concatOp( fsm2 );
+ rtnVal = fsm1;
+ }
+ break;
+ }
+ case Empty: {
+ /* FIXME: Return something here. */
+ rtnVal = 0;
+ break;
+ }
+ }
+ return rtnVal;
+}
+
+/* Clean up after an item in a regular expression. */
+ReItem::~ReItem()
+{
+ switch ( type ) {
+ case Data:
+ case Dot:
+ break;
+ case OrBlock:
+ case NegOrBlock:
+ delete orBlock;
+ break;
+ }
+}
+
+/* Evaluate a regular expression object. */
+FsmGraph *ReItem::walk( Compiler *pd, RegExpr *rootRegex )
+{
+ /* The fsm to return, is the alphabet signed? */
+ FsmGraph *rtnVal = 0;
+
+ switch ( type ) {
+ case Data: {
+ /* Move the data into an integer array and make a concat fsm. */
+ Key *arr = new Key[data.length()];
+ makeFsmKeyArray( arr, data.data, data.length(), pd );
+
+ /* Make the concat fsm. */
+ rtnVal = new FsmGraph();
+ if ( rootRegex != 0 && rootRegex->caseInsensitive )
+ rtnVal->concatFsmCI( arr, data.length() );
+ else
+ rtnVal->concatFsm( arr, data.length() );
+ delete[] arr;
+ break;
+ }
+ case Dot: {
+ /* Make the dot fsm. */
+ rtnVal = dotFsm( pd );
+ break;
+ }
+ case OrBlock: {
+ /* Get the or block and minmize it. */
+ rtnVal = orBlock->walk( pd, rootRegex );
+ rtnVal->minimizePartition2();
+ break;
+ }
+ case NegOrBlock: {
+ /* Get the or block and minimize it. */
+ FsmGraph *fsm = orBlock->walk( pd, rootRegex );
+ fsm->minimizePartition2();
+
+ /* Make a dot fsm and subtract from it. */
+ rtnVal = dotFsm( pd );
+ rtnVal->subtractOp( fsm );
+ rtnVal->minimizePartition2();
+ break;
+ }
+ }
+
+ return rtnVal;
+}
+
+/* Clean up after an or block of a regular expression. */
+ReOrBlock::~ReOrBlock()
+{
+ switch ( type ) {
+ case RecurseItem:
+ delete orBlock;
+ delete item;
+ break;
+ case Empty:
+ break;
+ }
+}
+
+
+/* Evaluate an or block of a regular expression. */
+FsmGraph *ReOrBlock::walk( Compiler *pd, RegExpr *rootRegex )
+{
+ FsmGraph *rtnVal = 0;
+ switch ( type ) {
+ case RecurseItem: {
+ /* Evaluate the two fsm. */
+ FsmGraph *fsm1 = orBlock->walk( pd, rootRegex );
+ FsmGraph *fsm2 = item->walk( pd, rootRegex );
+ if ( fsm1 == 0 )
+ rtnVal = fsm2;
+ else {
+ fsm1->unionOp( fsm2 );
+ rtnVal = fsm1;
+ }
+ break;
+ }
+ case Empty: {
+ rtnVal = 0;
+ break;
+ }
+ }
+ return rtnVal;;
+}
+
+/* Evaluate an or block item of a regular expression. */
+FsmGraph *ReOrItem::walk( Compiler *pd, RegExpr *rootRegex )
+{
+ /* The return value, is the alphabet signed? */
+ FsmGraph *rtnVal = 0;
+ switch ( type ) {
+ case Data: {
+ /* Make the or machine. */
+ rtnVal = new FsmGraph();
+
+ /* Put the or data into an array of ints. Note that we find unique
+ * keys. Duplicates are silently ignored. The alternative would be to
+ * issue warning or an error but since we can't with [a0-9a] or 'a' |
+ * 'a' don't bother here. */
+ KeySet keySet;
+ makeFsmUniqueKeyArray( keySet, data.data, data.length(),
+ rootRegex != 0 ? rootRegex->caseInsensitive : false, pd );
+
+ /* Run the or operator. */
+ rtnVal->orFsm( keySet.data, keySet.length() );
+ break;
+ }
+ case Range: {
+ /* Make the upper and lower keys. */
+ Key lowKey = makeFsmKeyChar( lower, pd );
+ Key highKey = makeFsmKeyChar( upper, pd );
+
+ /* Validate the range. */
+ if ( lowKey > highKey ) {
+ /* Recover by setting upper to lower; */
+ error(loc) << "lower end of range is greater then upper end" << endl;
+ highKey = lowKey;
+ }
+
+ /* Make the range machine. */
+ rtnVal = new FsmGraph();
+ rtnVal->rangeFsm( lowKey, highKey );
+
+ if ( rootRegex != 0 && rootRegex->caseInsensitive ) {
+ if ( lowKey <= 'Z' && 'A' <= highKey ) {
+ Key otherLow = lowKey < 'A' ? Key('A') : lowKey;
+ Key otherHigh = 'Z' < highKey ? Key('Z') : highKey;
+
+ otherLow = 'a' + ( otherLow - 'A' );
+ otherHigh = 'a' + ( otherHigh - 'A' );
+
+ FsmGraph *otherRange = new FsmGraph();
+ otherRange->rangeFsm( otherLow, otherHigh );
+ rtnVal->unionOp( otherRange );
+ rtnVal->minimizePartition2();
+ }
+ else if ( lowKey <= 'z' && 'a' <= highKey ) {
+ Key otherLow = lowKey < 'a' ? Key('a') : lowKey;
+ Key otherHigh = 'z' < highKey ? Key('z') : highKey;
+
+ otherLow = 'A' + ( otherLow - 'a' );
+ otherHigh = 'A' + ( otherHigh - 'a' );
+
+ FsmGraph *otherRange = new FsmGraph();
+ otherRange->rangeFsm( otherLow, otherHigh );
+ rtnVal->unionOp( otherRange );
+ rtnVal->minimizePartition2();
+ }
+ }
+
+ break;
+ }}
+ return rtnVal;
+}
diff --git a/src/parsetree.h b/src/parsetree.h
new file mode 100644
index 0000000..f03ab3f
--- /dev/null
+++ b/src/parsetree.h
@@ -0,0 +1,3191 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _PARSETREE_H
+#define _PARSETREE_H
+
+#include <iostream>
+#include <string.h>
+
+#include "global.h"
+#include "avlmap.h"
+#include "bstmap.h"
+#include "bstset.h"
+#include "vector.h"
+#include "dlist.h"
+#include "dlistval.h"
+#include "dlistmel.h"
+#include "cstring.h"
+#include "bytecode.h"
+#include "avlbasic.h"
+
+/* Operators that are represented with single symbol characters. */
+#define OP_DoubleEql 'e'
+#define OP_NotEql 'q'
+#define OP_LessEql 'l'
+#define OP_GrtrEql 'g'
+#define OP_LogicalAnd 'a'
+#define OP_LogicalOr 'o'
+#define OP_Deref 'd'
+
+#if SIZEOF_LONG != 4 && SIZEOF_LONG != 8
+ #error "SIZEOF_LONG contained an unexpected value"
+#endif
+
+struct NameInst;
+struct FsmGraph;
+struct RedFsm;
+struct _FsmRun;
+struct ObjectDef;
+struct ElementOf;
+struct UniqueType;
+struct ObjectField;
+struct TransBlock;
+struct CodeBlock;
+struct PdaLiteral;
+struct TypeAlias;
+struct RegionSet;
+struct ObjNameScope;
+struct IterCall;
+typedef struct _PdaRun PdaRun;
+
+/*
+ * Code Vector
+ */
+struct CodeVect : public Vector<Code>
+{
+ void appendHalf( Half half )
+ {
+ /* not optimal. */
+ append( half & 0xff );
+ append( (half>>8) & 0xff );
+ }
+
+ void appendWord( Word word )
+ {
+ /* not optimal. */
+ append( word & 0xff );
+ append( (word>>8) & 0xff );
+ append( (word>>16) & 0xff );
+ append( (word>>24) & 0xff );
+ #if SIZEOF_LONG == 8
+ append( (word>>32) & 0xff );
+ append( (word>>40) & 0xff );
+ append( (word>>48) & 0xff );
+ append( (word>>56) & 0xff );
+ #endif
+ }
+
+ void setHalf( long pos, Half half )
+ {
+ /* not optimal. */
+ data[pos] = half & 0xff;
+ data[pos+1] = (half>>8) & 0xff;
+ }
+
+ void insertHalf( long pos, Half half )
+ {
+ /* not optimal. */
+ insert( pos, half & 0xff );
+ insert( pos+1, (half>>8) & 0xff );
+ }
+
+ void insertWord( long pos, Word word )
+ {
+ /* not at all optimal. */
+ insert( pos, word & 0xff );
+ insert( pos+1, (word>>8) & 0xff );
+ insert( pos+2, (word>>16) & 0xff );
+ insert( pos+3, (word>>24) & 0xff );
+ #if SIZEOF_LONG == 8
+ insert( pos+4, (word>>32) & 0xff );
+ insert( pos+5, (word>>40) & 0xff );
+ insert( pos+6, (word>>48) & 0xff );
+ insert( pos+7, (word>>56) & 0xff );
+ #endif
+ }
+
+ void insertTree( long pos, Tree *tree )
+ { insertWord( pos, (Word) tree ); }
+};
+
+
+
+/* Types of builtin machines. */
+enum BuiltinMachine
+{
+ BT_Any,
+ BT_Ascii,
+ BT_Extend,
+ BT_Alpha,
+ BT_Digit,
+ BT_Alnum,
+ BT_Lower,
+ BT_Upper,
+ BT_Cntrl,
+ BT_Graph,
+ BT_Print,
+ BT_Punct,
+ BT_Space,
+ BT_Xdigit,
+ BT_Lambda,
+ BT_Empty
+};
+
+/* Must match the LI defines in pdarun.h. */
+enum LocalType
+{
+ LT_Tree = 1,
+ LT_Iter,
+ LT_RevIter,
+ LT_UserIter
+};
+
+struct LocalLoc
+{
+ LocalLoc( LocalType type, int scope, int offset )
+ : scope(scope), type(type), offset(offset) {}
+
+ int scope;
+ LocalType type;
+ int offset;
+};
+
+struct Locals
+{
+ Vector<LocalLoc> locals;
+
+ void append( const LocalLoc &ll )
+ {
+ int pos = 0;
+ while ( pos < locals.length() && ll.scope >= locals[pos].scope )
+ pos += 1;
+ locals.insert( pos, ll );
+ }
+};
+
+typedef BstSet<char> CharSet;
+typedef Vector<unsigned char> UnsignedCharVect;
+
+
+struct Compiler;
+struct TypeRef;
+
+/* Leaf type. */
+struct Literal;
+
+/* Tree nodes. */
+
+struct LexTerm;
+struct LexFactorAug;
+struct LexFactorRep;
+struct LexFactorNeg;
+struct LexFactor;
+struct LexExpression;
+struct LexJoin;
+struct JoinOrLm;
+struct RegionJoinOrLm;
+struct TokenRegion;
+struct Namespace;
+struct Context;
+struct TokenDef;
+struct TokenDefListReg;
+struct TokenDefListNs;
+struct TokenInstance;
+struct TokenInstanceListReg;
+struct Range;
+struct LangEl;
+
+enum AugType
+{
+ at_start,
+ at_leave,
+};
+
+struct Action;
+struct PriorDesc;
+struct RegExpr;
+struct ReItem;
+struct ReOrBlock;
+struct ReOrItem;
+struct ExplicitMachine;
+struct InlineItem;
+struct InlineList;
+
+/* Reference to a named state. */
+typedef Vector<String> NameRef;
+typedef Vector<NameRef*> NameRefList;
+typedef Vector<NameInst*> NameTargList;
+
+/* Structure for storing location of epsilon transitons. */
+struct EpsilonLink
+{
+ EpsilonLink( const InputLoc &loc, NameRef &target )
+ : loc(loc), target(target) { }
+
+ InputLoc loc;
+ NameRef target;
+};
+
+struct Label
+{
+ Label( const InputLoc &loc, const String &data, ObjectField *objField )
+ : loc(loc), data(data), objField(objField) { }
+
+ InputLoc loc;
+ String data;
+ ObjectField *objField;
+};
+
+/* Structure represents an action assigned to some LexFactorAug node. The
+ * factor with aug will keep an array of these. */
+struct ParserAction
+{
+ ParserAction( const InputLoc &loc, AugType type, int localErrKey, Action *action )
+ : loc(loc), type(type), localErrKey(localErrKey), action(action) { }
+
+ InputLoc loc;
+ AugType type;
+ int localErrKey;
+ Action *action;
+};
+
+struct Token
+{
+ String data;
+ InputLoc loc;
+};
+
+void prepareLitString( String &result, bool &caseInsensitive,
+ const String &srcString, const InputLoc &loc );
+
+std::ostream &operator<<(std::ostream &out, const Token &token );
+
+typedef AvlMap< String, TokenInstance*, CmpStr > LiteralDict;
+typedef AvlMapEl< String, TokenInstance* > LiteralDictEl;
+
+/* Store the value and type of a priority augmentation. */
+struct PriorityAug
+{
+ PriorityAug( AugType type, int priorKey, int priorValue ) :
+ type(type), priorKey(priorKey), priorValue(priorValue) { }
+
+ AugType type;
+ int priorKey;
+ int priorValue;
+};
+
+/*
+ * A Variable Definition
+ */
+struct LexDefinition
+{
+ LexDefinition( const String &name, LexJoin *join )
+ : name(name), join(join) { }
+
+ /* Parse tree traversal. */
+ FsmGraph *walk( Compiler *pd );
+ void makeNameTree( const InputLoc &loc, Compiler *pd );
+
+ String name;
+ LexJoin *join;
+};
+
+typedef Vector<String> StringVect;
+typedef CmpTable<String, CmpStr> CmpStrVect;
+
+struct NamespaceQual
+{
+ NamespaceQual()
+ :
+ cachedNspaceQual(0),
+ declInNspace(0)
+ {}
+
+ static NamespaceQual *cons( Namespace *declInNspace )
+ {
+ NamespaceQual *nsq = new NamespaceQual;
+ nsq->declInNspace = declInNspace;
+ return nsq;
+ }
+
+ Namespace *cachedNspaceQual;
+ Namespace *declInNspace;
+
+ StringVect qualNames;
+
+ Namespace *searchFrom( Namespace *from, StringVect::Iter &qualPart );
+ Namespace *getQual( Compiler *pd );
+ bool thisOnly()
+ { return qualNames.length() != 0; }
+};
+
+struct ReCapture
+{
+ ReCapture( Action *markEnter, Action *markLeave, ObjectField *objField )
+ : markEnter(markEnter), markLeave(markLeave), objField(objField) {}
+
+ Action *markEnter;
+ Action *markLeave;
+ ObjectField *objField;
+};
+
+struct ContextStack
+ : public Vector<Context*>
+{
+ Context *top()
+ { return length() > 0 ? Vector<Context*>::top() : 0; }
+};
+
+
+struct Context
+{
+ Context( const InputLoc &loc, LangEl *lel )
+ :
+ loc(loc),
+ lel(lel)
+ {}
+
+ InputLoc loc;
+ LangEl *lel;
+
+ ObjectDef *contextObjDef;
+};
+
+typedef Vector<ReCapture> ReCaptureVect;
+
+struct TokenDefPtr1
+{
+ TokenDef *prev, *next;
+};
+
+struct TokenDefPtr2
+{
+ TokenDef *prev, *next;
+};
+
+struct TokenDef
+:
+ public TokenDefPtr1,
+ public TokenDefPtr2
+{
+ TokenDef()
+ :
+ action(0), tdLangEl(0), inLmSelect(false), dupOf(0),
+ noPostIgnore(false), noPreIgnore(false), isZero(false)
+ {}
+
+ static TokenDef *cons( const String &name, const String &literal, bool isLiteral, bool isIgnore,
+ LexJoin *join, CodeBlock *codeBlock, const InputLoc &semiLoc,
+ int longestMatchId, Namespace *nspace, RegionSet *regionSet,
+ ObjectDef *objectDef, Context *contextIn )
+ {
+ TokenDef *t = new TokenDef;
+
+ t->name = name;
+ t->literal = literal;
+ t->isLiteral = isLiteral;
+ t->isIgnore = isIgnore;
+ t->join = join;
+ t->action = 0;
+ t->codeBlock = codeBlock;
+ t->tdLangEl = 0;
+ t->semiLoc = semiLoc;
+ t->longestMatchId = longestMatchId;
+ t->inLmSelect = false;
+ t->nspace = nspace;
+ t->regionSet = regionSet;
+ t->objectDef = objectDef;
+ t->contextIn = contextIn;
+ t->dupOf = 0;
+ t->noPostIgnore = false;
+ t->noPreIgnore = false;
+ t->isZero = false;
+
+ return t;
+ }
+
+ InputLoc getLoc();
+
+ String name;
+ String literal;
+ bool isLiteral;
+ bool isIgnore;
+ LexJoin *join;
+ Action *action;
+ CodeBlock *codeBlock;
+ LangEl *tdLangEl;
+ InputLoc semiLoc;
+
+ Action *setActId;
+ Action *actOnLast;
+ Action *actOnNext;
+ Action *actLagBehind;
+ int longestMatchId;
+ bool inLmSelect;
+ Namespace *nspace;
+ RegionSet *regionSet;
+ ReCaptureVect reCaptureVect;
+ ObjectDef *objectDef;
+ Context *contextIn;
+
+ TokenDef *dupOf;
+ bool noPostIgnore;
+ bool noPreIgnore;
+ bool isZero;
+};
+
+struct TokenInstancePtr
+{
+ TokenInstance *prev, *next;
+};
+
+struct TokenInstance
+:
+ public TokenInstancePtr
+{
+ TokenInstance()
+ :
+ action(0),
+ inLmSelect(false),
+ dupOf(0)
+ {}
+
+ static TokenInstance *cons( TokenDef *tokenDef,
+ LexJoin *join, const InputLoc &semiLoc,
+ int longestMatchId, Namespace *nspace, TokenRegion *tokenRegion )
+ {
+ TokenInstance *t = new TokenInstance;
+
+ t->tokenDef = tokenDef;
+ t->join = join;
+ t->action = 0;
+ t->semiLoc = semiLoc;
+ t->longestMatchId = longestMatchId;
+ t->inLmSelect = false;
+ t->nspace = nspace;
+ t->tokenRegion = tokenRegion;
+ t->dupOf = 0;
+
+ return t;
+ }
+
+ InputLoc getLoc();
+
+ TokenDef *tokenDef;
+ LexJoin *join;
+ Action *action;
+ InputLoc semiLoc;
+
+ Action *setActId;
+ Action *actOnLast;
+ Action *actOnNext;
+ Action *actLagBehind;
+ int longestMatchId;
+ bool inLmSelect;
+ Namespace *nspace;
+ TokenRegion *tokenRegion;
+
+ TokenInstance *dupOf;
+};
+
+struct LelDefList;
+
+struct NtDef
+{
+ static NtDef *cons( const String &name, Namespace *nspace,
+ LelDefList *defList, ObjectDef *objectDef,
+ Context *contextIn, bool reduceFirst )
+ {
+ NtDef *nt = new NtDef;
+
+ nt->name = name;
+ nt->nspace = nspace;
+ nt->defList = defList;
+ nt->objectDef = objectDef;
+ nt->contextIn = contextIn;
+ nt->reduceFirst = reduceFirst;
+
+ return nt;
+ }
+
+ static NtDef *cons( const String &name, Namespace *nspace,
+ Context *contextIn, bool reduceFirst )
+ {
+ NtDef *nt = new NtDef;
+
+ nt->name = name;
+ nt->nspace = nspace;
+ nt->defList = 0;
+ nt->objectDef = 0;
+ nt->contextIn = contextIn;
+ nt->reduceFirst = reduceFirst;
+
+ return nt;
+ }
+
+ String name;
+ Namespace *nspace;
+ LelDefList *defList;
+ ObjectDef *objectDef;
+ Context *contextIn;
+ bool reduceFirst;
+
+ NtDef *prev, *next;
+};
+
+struct NtDefList : DList<NtDef> {};
+
+/* Declare a new type so that ptreetypes.h need not include dlist.h. */
+struct TokenInstanceListReg : DListMel<TokenInstance, TokenInstancePtr> {};
+
+/* Declare a new type so that ptreetypes.h need not include dlist.h. */
+struct TokenDefListReg : DListMel<TokenDef, TokenDefPtr1> {};
+struct TokenDefListNs : DListMel<TokenDef, TokenDefPtr2> {};
+
+struct ContextDef
+{
+ ContextDef( const String &name, Context *context, Namespace *nspace )
+ : name(name), context(context), nspace(nspace) {}
+
+ String name;
+ Context *context;
+ Namespace *nspace;
+
+ ContextDef *prev, *next;
+};
+
+struct ContextDefList : DList<ContextDef> {};
+
+struct TypeMapEl
+ : public AvlTreeEl<TypeMapEl>
+{
+ enum Type
+ {
+ TypeAliasType = 1,
+ LangElType
+ };
+
+ const String &getKey() { return key; }
+
+ TypeMapEl( const String &key, TypeRef *typeRef )
+ : type(TypeAliasType), key(key), value(0), typeRef(typeRef) {}
+
+ TypeMapEl( const String &key, LangEl *value )
+ : type(LangElType), key(key), value(value), typeRef(0) {}
+
+ Type type;
+ String key;
+ LangEl *value;
+ TypeRef *typeRef;
+
+ TypeMapEl *prev, *next;
+};
+
+/* Symbol Map. */
+typedef AvlTree< TypeMapEl, String, CmpStr > TypeMap;
+
+typedef Vector<TokenRegion*> RegionVect;
+
+struct RegionImpl
+{
+ RegionImpl()
+ :
+ regionNameInst(0),
+ lmActSelect(0),
+ lmSwitchHandlesError(false),
+ defaultTokenInstance(0),
+ wasEmpty(false)
+ {}
+
+ InputLoc loc;
+
+ /* This gets saved off during the name walk. Can save it off because token
+ * regions are referenced once only. */
+ NameInst *regionNameInst;
+
+ TokenInstanceListReg tokenInstanceList;
+ Action *lmActSelect;
+ bool lmSwitchHandlesError;
+ TokenInstance *defaultTokenInstance;
+
+ /* We alway init empty scanners with a single token. If we had to do this
+ * then wasEmpty is true. */
+ bool wasEmpty;
+
+ RegionImpl *prev, *next;
+
+ void runLongestMatch( Compiler *pd, FsmGraph *graph );
+ void transferScannerLeavingActions( FsmGraph *graph );
+ FsmGraph *walk( Compiler *pd );
+
+ void restart( FsmGraph *graph, FsmTrans *trans );
+ void makeNameTree( const InputLoc &loc, Compiler *pd );
+ void makeActions( Compiler *pd );
+ Action *newAction( Compiler *pd, const InputLoc &loc,
+ const String &name, InlineList *inlineList );
+};
+
+struct TokenRegion
+{
+ /* Construct with a list of joins */
+ TokenRegion( const InputLoc &loc, int id, RegionImpl *impl )
+ :
+ loc(loc),
+ id(id),
+ preEofBlock(0),
+ zeroLel(0),
+ ignoreOnly(0),
+ impl(impl)
+ { }
+
+ InputLoc loc;
+ int id;
+
+ CodeBlock *preEofBlock;
+
+ LangEl *zeroLel;
+ TokenRegion *ignoreOnly;
+
+ RegionImpl *impl;
+
+ TokenRegion *next, *prev;
+
+ /* Tree traversal. */
+ void findName( Compiler *pd );
+};
+
+struct RegionSet
+{
+ RegionSet( RegionImpl *implTokenIgnore, RegionImpl *implTokenOnly,
+ RegionImpl *implIgnoreOnly, TokenRegion *tokenIgnore,
+ TokenRegion *tokenOnly, TokenRegion *ignoreOnly,
+ TokenRegion *collectIgnore )
+ :
+ implTokenIgnore(implTokenIgnore),
+ implTokenOnly(implTokenOnly),
+ implIgnoreOnly(implIgnoreOnly),
+
+ tokenIgnore(tokenIgnore),
+ tokenOnly(tokenOnly),
+ ignoreOnly(ignoreOnly),
+ collectIgnore(collectIgnore)
+ {}
+
+ /* Provides the scanner state machines. We reuse ignore-only. */
+ RegionImpl *implTokenIgnore;
+ RegionImpl *implTokenOnly;
+ RegionImpl *implIgnoreOnly;
+
+ TokenRegion *tokenIgnore;
+ TokenRegion *tokenOnly;
+ TokenRegion *ignoreOnly;
+ TokenRegion *collectIgnore;
+
+
+ TokenDefListReg tokenDefList;
+
+ RegionSet *next, *prev;
+};
+
+typedef Vector<RegionSet*> RegionSetVect;
+
+typedef DList<RegionSet> RegionSetList;
+typedef DList<TokenRegion> RegionList;
+typedef DList<RegionImpl> RegionImplList;
+
+typedef Vector<Namespace*> NamespaceVect;
+
+struct GenericType
+ : public DListEl<GenericType>
+{
+ GenericType( const String &name, long typeId, long id,
+ LangEl *langEl, TypeRef *typeArg )
+ :
+ name(name), typeId(typeId), id(id), langEl(langEl),
+ typeArg(typeArg), keyTypeArg(0),
+ utArg(0), keyUT(0),
+ objDef(0)
+ {}
+
+ const String &getKey() const
+ { return name; };
+
+ void declare( Compiler *pd, Namespace *nspace );
+
+ String name;
+ long typeId;
+ long id;
+ LangEl *langEl;
+ TypeRef *typeArg;
+ TypeRef *keyTypeArg;
+ UniqueType *utArg;
+ UniqueType *keyUT;
+
+ ObjectDef *objDef;
+};
+
+typedef DList<GenericType> GenericList;
+
+typedef struct _UserIter UserIter;
+typedef AvlMap<String, UserIter*, CmpStr> UserIterMap;
+typedef AvlMapEl<String, UserIter*> UserIterMapEl;
+
+/* Graph dictionary. */
+struct GraphDictEl
+:
+ public AvlTreeEl<GraphDictEl>,
+ public DListEl<GraphDictEl>
+{
+ GraphDictEl( const String &key )
+ : key(key), value(0), isInstance(false) { }
+
+ GraphDictEl( const String &key, LexDefinition *value )
+ : key(key), value(value), isInstance(false) { }
+
+ const String &getKey() { return key; }
+
+ String key;
+ LexDefinition *value;
+ bool isInstance;
+
+ /* Location info of graph definition. Points to variable name of assignment. */
+ InputLoc loc;
+};
+
+typedef AvlTree<GraphDictEl, String, CmpStr> GraphDict;
+typedef DList<GraphDictEl> GraphList;
+
+struct TypeAlias
+{
+ TypeAlias( const InputLoc &loc, Namespace *nspace,
+ const String &name, TypeRef *typeRef )
+ :
+ loc(loc),
+ nspace(nspace),
+ name(name),
+ typeRef(typeRef)
+ {}
+
+ InputLoc loc;
+ Namespace *nspace;
+ String name;
+ TypeRef *typeRef;
+
+ TypeAlias *prev, *next;
+};
+
+typedef DList<TypeAlias> TypeAliasList;
+
+struct Namespace
+{
+ /* Construct with a list of joins */
+ Namespace( const InputLoc &loc, const String &name, int id,
+ Namespace *parentNamespace ) :
+ loc(loc), name(name), id(id),
+ parentNamespace(parentNamespace) { }
+
+ /* Tree traversal. */
+ Namespace *findNamespace( const String &name );
+
+ InputLoc loc;
+ String name;
+ int id;
+
+ /* Literal patterns and the dictionary mapping literals to the underlying
+ * tokens. */
+ LiteralDict literalDict;
+
+ /* List of tokens defs in the namespace. */
+ TokenDefListNs tokenDefList;
+
+ /* List of nonterminal defs in the namespace. */
+ NtDefList ntDefList;
+
+ /* List of context definitions for encapsulating the data of a parser. */
+ ContextDefList contextDefList;
+
+ /* Dictionary of symbols within the region. */
+ TypeMap typeMap;
+ GenericList genericList;
+
+ /* regular language definitions. */
+ GraphDict rlMap;
+
+ TypeAliasList typeAliasList;
+
+ Namespace *parentNamespace;
+ NamespaceVect childNamespaces;
+
+ Namespace *next, *prev;
+
+ void declare( Compiler *pd );
+};
+
+typedef DList<Namespace> NamespaceList;
+typedef BstSet< Namespace*, CmpOrd<Namespace*> > NamespaceSet;
+
+/*
+ * LexJoin
+ */
+struct LexJoin
+{
+ LexJoin()
+ :
+ expr(0),
+ context(0),
+ mark(0)
+ {}
+
+ static LexJoin *cons( LexExpression *expr )
+ {
+ LexJoin *j = new LexJoin;
+ j->expr = expr;
+ return j;
+ }
+
+ /* Tree traversal. */
+ FsmGraph *walk( Compiler *pd );
+ void makeNameTree( Compiler *pd );
+ void varDecl( Compiler *pd, TokenDef *tokenDef );
+
+ /* Data. */
+ LexExpression *expr;
+ LexJoin *context;
+ Action *mark;
+};
+
+/*
+ * LexExpression
+ */
+struct LexExpression
+{
+ enum Type {
+ OrType,
+ IntersectType,
+ SubtractType,
+ StrongSubtractType,
+ TermType,
+ BuiltinType
+ };
+
+ LexExpression( ) :
+ expression(0), term(0), builtin((BuiltinMachine)-1),
+ type((Type)-1), prev(this), next(this) { }
+
+ /* Construct with an expression on the left and a term on the right. */
+ static LexExpression *cons( LexExpression *expression, LexTerm *term, Type type )
+ {
+ LexExpression *ret = new LexExpression;
+ ret->type = type;
+ ret->expression = expression;
+ ret->term = term;
+ return ret;
+ }
+
+ /* Construct with only a term. */
+ static LexExpression *cons( LexTerm *term )
+ {
+ LexExpression *ret = new LexExpression;
+ ret->type = TermType;
+ ret->term = term;
+ return ret;
+ }
+
+ /* Construct with a builtin type. */
+ static LexExpression *cons( BuiltinMachine builtin )
+ {
+ LexExpression *ret = new LexExpression;
+ ret->type = BuiltinType;
+ ret->builtin = builtin;
+ return ret;
+ }
+
+ ~LexExpression();
+
+ /* Tree traversal. */
+ FsmGraph *walk( Compiler *pd, bool lastInSeq = true );
+ void makeNameTree( Compiler *pd );
+ void varDecl( Compiler *pd, TokenDef *tokenDef );
+
+ /* Node data. */
+ LexExpression *expression;
+ LexTerm *term;
+ BuiltinMachine builtin;
+ Type type;
+
+ LexExpression *prev, *next;
+};
+
+/*
+ * LexTerm
+ */
+struct LexTerm
+{
+ enum Type {
+ ConcatType,
+ RightStartType,
+ RightFinishType,
+ LeftType,
+ FactorAugType
+ };
+
+ LexTerm() :
+ term(0), factorAug(0), type((Type)-1) { }
+
+ static LexTerm *cons( LexTerm *term, LexFactorAug *factorAug )
+ {
+ LexTerm *ret = new LexTerm;
+ ret->type = ConcatType;
+ ret->term = term;
+ ret->factorAug = factorAug;
+ return ret;
+ }
+
+ static LexTerm *cons( LexTerm *term, LexFactorAug *factorAug, Type type )
+ {
+ LexTerm *ret = new LexTerm;
+ ret->type = type;
+ ret->term = term;
+ ret->factorAug = factorAug;
+ return ret;
+ }
+
+ static LexTerm *cons( LexFactorAug *factorAug )
+ {
+ LexTerm *ret = new LexTerm;
+ ret->type = FactorAugType;
+ ret->factorAug = factorAug;
+ return ret;
+ }
+
+ ~LexTerm();
+
+ FsmGraph *walk( Compiler *pd, bool lastInSeq = true );
+ void makeNameTree( Compiler *pd );
+ void varDecl( Compiler *pd, TokenDef *tokenDef );
+
+ LexTerm *term;
+ LexFactorAug *factorAug;
+ Type type;
+
+ /* Priority descriptor for RightFinish type. */
+ PriorDesc priorDescs[2];
+};
+
+
+/* Third level of precedence. Augmenting nodes with actions and priorities. */
+struct LexFactorAug
+{
+ LexFactorAug() :
+ factorRep(0) { }
+
+ static LexFactorAug *cons( LexFactorRep *factorRep )
+ {
+ LexFactorAug *f = new LexFactorAug;
+ f->factorRep = factorRep;
+ return f;
+ }
+
+ ~LexFactorAug();
+
+ /* Tree traversal. */
+ FsmGraph *walk( Compiler *pd );
+ void makeNameTree( Compiler *pd );
+ void varDecl( Compiler *pd, TokenDef *tokenDef );
+
+ void assignActions( Compiler *pd, FsmGraph *graph, int *actionOrd );
+
+ /* Actions and priorities assigned to the factor node. */
+ Vector<ParserAction> actions;
+ ReCaptureVect reCaptureVect;
+
+ LexFactorRep *factorRep;
+};
+
+/* Fourth level of precedence. Trailing unary operators. Provide kleen star,
+ * optional and plus. */
+struct LexFactorRep
+{
+ enum Type {
+ StarType,
+ StarStarType,
+ OptionalType,
+ PlusType,
+ ExactType,
+ MaxType,
+ MinType,
+ RangeType,
+ FactorNegType
+ };
+
+ LexFactorRep()
+ :
+ factorRep(0),
+ factorNeg(0),
+ lowerRep(0),
+ upperRep(upperRep),
+ type((Type)-1)
+ { }
+
+ static LexFactorRep *cons( const InputLoc &loc, LexFactorRep *factorRep,
+ int lowerRep, int upperRep, Type type )
+ {
+ LexFactorRep *f = new LexFactorRep;
+ f->type = type;
+ f->loc = loc;
+ f->factorRep = factorRep;
+ f->factorNeg = 0;
+ f->lowerRep = lowerRep;
+ f->upperRep = upperRep;
+ return f;
+ }
+
+ static LexFactorRep *cons( LexFactorNeg *factorNeg )
+ {
+ LexFactorRep *f = new LexFactorRep;
+ f->type = FactorNegType;
+ f->factorNeg = factorNeg;
+ return f;
+ }
+
+ ~LexFactorRep();
+
+ /* Tree traversal. */
+ FsmGraph *walk( Compiler *pd );
+ void makeNameTree( Compiler *pd );
+
+ InputLoc loc;
+ LexFactorRep *factorRep;
+ LexFactorNeg *factorNeg;
+ int lowerRep, upperRep;
+ Type type;
+
+ /* Priority descriptor for StarStar type. */
+ PriorDesc priorDescs[2];
+};
+
+/* Fifth level of precedence. Provides Negation. */
+struct LexFactorNeg
+{
+ enum Type {
+ NegateType,
+ CharNegateType,
+ FactorType
+ };
+
+ LexFactorNeg()
+ :
+ factorNeg(0),
+ factor(0),
+ type((Type)-1)
+ {}
+
+ static LexFactorNeg *cons( LexFactorNeg *factorNeg, Type type )
+ {
+ LexFactorNeg *f = new LexFactorNeg;
+ f->type = type;
+ f->factorNeg = factorNeg;
+ f->factor = 0;
+ return f;
+ }
+
+ static LexFactorNeg *cons( LexFactor *factor )
+ {
+ LexFactorNeg *f = new LexFactorNeg;
+ f->type = FactorType;
+ f->factorNeg = 0;
+ f->factor = factor;
+ return f;
+ }
+
+ ~LexFactorNeg();
+
+ /* Tree traversal. */
+ FsmGraph *walk( Compiler *pd );
+ void makeNameTree( Compiler *pd );
+
+ LexFactorNeg *factorNeg;
+ LexFactor *factor;
+ Type type;
+};
+
+/*
+ * LexFactor
+ */
+struct LexFactor
+{
+ /* Language elements a factor node can be. */
+ enum Type {
+ LiteralType,
+ RangeType,
+ OrExprType,
+ RegExprType,
+ ReferenceType,
+ ParenType,
+ };
+
+ LexFactor()
+ :
+ literal(0),
+ range(0),
+ reItem(0),
+ regExp(0),
+ varDef(0),
+ join(0),
+ lower(0),
+ upper(0),
+ type((Type)-1)
+ {}
+
+ /* Construct with a literal fsm. */
+ static LexFactor *cons( Literal *literal )
+ {
+ LexFactor *f = new LexFactor;
+ f->type = LiteralType;
+ f->literal = literal;
+ return f;
+ }
+
+ /* Construct with a range. */
+ static LexFactor *cons( Range *range )
+ {
+ LexFactor *f = new LexFactor;
+ f->type = RangeType;
+ f->range = range;
+ return f;
+ }
+
+ /* Construct with the or part of a regular expression. */
+ static LexFactor *cons( ReItem *reItem )
+ {
+ LexFactor *f = new LexFactor;
+ f->type = OrExprType;
+ f->reItem = reItem;
+ return f;
+ }
+
+ /* Construct with a regular expression. */
+ static LexFactor *cons( RegExpr *regExp )
+ {
+ LexFactor *f = new LexFactor;
+ f->type = RegExprType;
+ f->regExp = regExp;
+ return f;
+ }
+
+ /* Construct with a reference to a var def. */
+ static LexFactor *cons( const InputLoc &loc, LexDefinition *varDef )
+ {
+ LexFactor *f = new LexFactor;
+ f->type = ReferenceType;
+ f->loc = loc;
+ f->varDef = varDef;
+ return f;
+ }
+
+ /* Construct with a parenthesized join. */
+ static LexFactor *cons( LexJoin *join )
+ {
+ LexFactor *f = new LexFactor;
+ f->type = ParenType;
+ f->join = join;
+ return f;
+ }
+
+ /* Cleanup. */
+ ~LexFactor();
+
+ /* Tree traversal. */
+ FsmGraph *walk( Compiler *pd );
+ void makeNameTree( Compiler *pd );
+
+ InputLoc loc;
+ Literal *literal;
+ Range *range;
+ ReItem *reItem;
+ RegExpr *regExp;
+ LexDefinition *varDef;
+ LexJoin *join;
+ int lower, upper;
+ Type type;
+};
+
+/* A range machine. Only ever composed of two literals. */
+struct Range
+{
+ static Range *cons( Literal *lowerLit, Literal *upperLit )
+ {
+ Range *r = new Range;
+ r->lowerLit = lowerLit;
+ r->upperLit = upperLit;
+ return r;
+ }
+
+ ~Range();
+ FsmGraph *walk( Compiler *pd );
+ bool verifyRangeFsm( FsmGraph *rangeEnd );
+
+ Literal *lowerLit;
+ Literal *upperLit;
+};
+
+/* Some literal machine. Can be a number or literal string. */
+struct Literal
+{
+ enum LiteralType { Number, LitString };
+
+ static Literal *cons( const InputLoc &loc, const String &literal, LiteralType type )
+ {
+ Literal *l = new Literal;
+ l->loc = loc;
+ l->literal = literal;
+ l->type = type;
+ return l;
+ }
+
+ FsmGraph *walk( Compiler *pd );
+
+ InputLoc loc;
+ String literal;
+ LiteralType type;
+};
+
+/* Regular expression. */
+struct RegExpr
+{
+ enum RegExpType { RecurseItem, Empty };
+
+ /* Constructors. */
+ static RegExpr *cons()
+ {
+ RegExpr *r = new RegExpr;
+ r->type = Empty;
+ r->caseInsensitive = false;
+ return r;
+ }
+
+ static RegExpr *cons( RegExpr *regExp, ReItem *item )
+ {
+ RegExpr *r = new RegExpr;
+ r->regExp = regExp;
+ r->item = item;
+ r->type = RecurseItem;
+ r->caseInsensitive = false;
+ return r;
+ }
+
+ ~RegExpr();
+ FsmGraph *walk( Compiler *pd, RegExpr *rootRegex );
+
+ RegExpr *regExp;
+ ReItem *item;
+ RegExpType type;
+ bool caseInsensitive;
+};
+
+/* An item in a regular expression. */
+struct ReItem
+{
+ enum ReItemType { Data, Dot, OrBlock, NegOrBlock };
+
+ static ReItem *cons( const String &data )
+ {
+ ReItem *r = new ReItem;
+ r->data = data;
+ r->type = Data;
+ return r;
+ }
+
+ static ReItem *cons( ReItemType type )
+ {
+ ReItem *r = new ReItem;
+ r->type = type;
+ return r;
+ }
+
+ static ReItem *cons( ReOrBlock *orBlock, ReItemType type )
+ {
+ ReItem *r = new ReItem;
+ r->orBlock = orBlock;
+ r->type = type;
+ return r;
+ }
+
+ ~ReItem();
+ FsmGraph *walk( Compiler *pd, RegExpr *rootRegex );
+
+ String data;
+ ReOrBlock *orBlock;
+ ReItemType type;
+};
+
+/* An or block item. */
+struct ReOrBlock
+{
+ enum ReOrBlockType { RecurseItem, Empty };
+
+ /* Constructors. */
+ static ReOrBlock *cons()
+ {
+ ReOrBlock *r = new ReOrBlock;
+ r->type = Empty;
+ return r;
+ }
+
+ static ReOrBlock *cons( ReOrBlock *orBlock, ReOrItem *item )
+ {
+ ReOrBlock *r = new ReOrBlock;
+ r->orBlock = orBlock;
+ r->item = item;
+ r->type = RecurseItem;
+ return r;
+ }
+
+ ~ReOrBlock();
+ FsmGraph *walk( Compiler *pd, RegExpr *rootRegex );
+
+ ReOrBlock *orBlock;
+ ReOrItem *item;
+ ReOrBlockType type;
+};
+
+/* An item in an or block. */
+struct ReOrItem
+{
+ enum ReOrItemType { Data, Range };
+
+ static ReOrItem *cons( const InputLoc &loc, const String &data )
+ {
+ ReOrItem *r = new ReOrItem;
+ r->loc = loc;
+ r->data = data;
+ r->type = Data;
+ return r;
+ }
+
+ static ReOrItem *cons( const InputLoc &loc, char lower, char upper )
+ {
+ ReOrItem *r = new ReOrItem;
+ r->loc = loc;
+ r->lower = lower;
+ r->upper = upper;
+ r->type = Range;
+ return r;
+ }
+
+ FsmGraph *walk( Compiler *pd, RegExpr *rootRegex );
+
+ InputLoc loc;
+ String data;
+ char lower;
+ char upper;
+ ReOrItemType type;
+};
+
+
+/*
+ * Inline code tree
+ */
+struct InlineList;
+struct InlineItem
+{
+ enum Type
+ {
+ Text,
+ LmSwitch,
+ LmSetActId,
+ LmSetTokEnd,
+ LmOnLast,
+ LmOnNext,
+ LmOnLagBehind,
+ LmInitAct,
+ LmInitTokStart,
+ LmSetTokStart
+ };
+
+ static InlineItem *cons( const InputLoc &loc, const String &data, Type type )
+ {
+ InlineItem *i = new InlineItem;
+ i->loc = loc;
+ i->data = data;
+ i->nameRef = 0;
+ i->children = 0;
+ i->type = type;
+ return i;
+ }
+
+ static InlineItem *cons( const InputLoc &loc, NameRef *nameRef, Type type )
+ {
+ InlineItem *i = new InlineItem;
+ i->loc = loc;
+ i->nameRef = nameRef;
+ i->children = 0;
+ i->type = type;
+ return i;
+ }
+
+ static InlineItem *cons( const InputLoc &loc, RegionImpl *tokenRegion,
+ TokenInstance *longestMatchPart, Type type )
+ {
+ InlineItem *i = new InlineItem;
+ i->loc = loc;
+ i->nameRef = 0;
+ i->children = 0;
+ i->tokenRegion = tokenRegion;
+ i->longestMatchPart = longestMatchPart;
+ i->type = type;
+ return i;
+ }
+
+ static InlineItem *cons( const InputLoc &loc, NameInst *nameTarg, Type type )
+ {
+ InlineItem *i = new InlineItem;
+ i->loc = loc;
+ i->nameRef = 0;
+ i->nameTarg = nameTarg;
+ i->children = 0;
+ i->type = type;
+ return i;
+ }
+
+ static InlineItem *cons( const InputLoc &loc, Type type )
+ {
+ InlineItem *i = new InlineItem;
+ i->loc = loc;
+ i->nameRef = 0;
+ i->children = 0;
+ i->type = type;
+ return i;
+ }
+
+ InputLoc loc;
+ String data;
+ NameRef *nameRef;
+ NameInst *nameTarg;
+ InlineList *children;
+ RegionImpl *tokenRegion;
+ TokenInstance *longestMatchPart;
+ Type type;
+
+ InlineItem *prev, *next;
+};
+
+struct InlineList
+:
+ public DList<InlineItem>
+{
+ InlineList( int i ) {}
+
+ static InlineList *cons()
+ {
+ return new InlineList( 0 );
+ }
+};
+
+
+struct ProdEl;
+struct LangVarRef;
+struct ObjectField;
+
+struct PatternItem
+{
+ enum Form {
+ TypeRefForm,
+ InputTextForm
+ };
+
+ static PatternItem *cons( Form form, const InputLoc &loc, const String &data )
+ {
+ PatternItem *p = new PatternItem;
+ p->form = form;
+ p->loc = loc;
+ p->prodEl = 0;
+ p->data = data;
+ p->region = 0;
+ p->varRef = 0;
+ p->bindId = 0;
+ return p;
+ }
+
+ static PatternItem *cons( Form form, const InputLoc &loc, ProdEl *prodEl )
+ {
+ PatternItem *p = new PatternItem;
+ p->form = form;
+ p->loc = loc;
+ p->prodEl = prodEl;
+ p->region = 0;
+ p->varRef = 0;
+ p->bindId = 0;
+ return p;
+ }
+
+ Form form;
+ InputLoc loc;
+ ProdEl *prodEl;
+ String data;
+ TokenRegion *region;
+ LangVarRef *varRef;
+ long bindId;
+ PatternItem *prev, *next;
+};
+
+struct LangExpr;
+
+struct PatternItemList
+ : public DList<PatternItem>
+{
+ static PatternItemList *cons( PatternItem *patternItem )
+ {
+ PatternItemList *list = new PatternItemList;
+ list->append( patternItem );
+ return list;
+ }
+};
+
+struct ConsItem
+{
+ enum Type {
+ InputText,
+ ExprType,
+ LiteralType
+ };
+
+ ConsItem()
+ :
+ type((Type)-1),
+ expr(0),
+ langEl(0),
+ prodEl(0),
+ bindId(-1)
+ {
+ }
+
+ static ConsItem *cons( const InputLoc &loc, Type type, const String &data )
+ {
+ ConsItem *r = new ConsItem;
+ r->loc = loc;
+ r->type = type;
+ r->data = data;
+ return r;
+ }
+
+ static ConsItem *cons( const InputLoc &loc, Type type, LangExpr *expr )
+ {
+ ConsItem *r = new ConsItem;
+ r->loc = loc;
+ r->type = type;
+ r->expr = expr;
+ return r;
+ }
+
+ static ConsItem *cons( const InputLoc &loc, Type type, ProdEl *prodEl )
+ {
+ ConsItem *r = new ConsItem;
+ r->loc = loc;
+ r->type = type;
+ r->expr = 0;
+ r->prodEl = prodEl;
+ return r;
+ }
+
+ InputLoc loc;
+ Type type;
+ String data;
+ LangExpr *expr;
+ LangEl *langEl;
+ ProdEl *prodEl;
+ long bindId;
+ ConsItem *prev, *next;
+};
+
+struct ConsItemList
+:
+ public DList<ConsItem>
+{
+ static ConsItemList *cons( ConsItem *ci )
+ {
+ ConsItemList *cil = new ConsItemList;
+ cil->append( ci );
+ return cil;
+ }
+};
+
+struct Pattern
+{
+ static Pattern *cons( const InputLoc &loc, Namespace *nspace,
+ PatternItemList *list, int patRepId )
+ {
+ Pattern *p = new Pattern;
+ p->loc = loc;
+ p->nspace = nspace;
+ p->list = list;
+ p->patRepId = patRepId;
+ p->langEl = 0;
+ p->pdaRun = 0;
+ p->nextBindId = 1;
+ return p;
+ }
+
+ InputLoc loc;
+ Namespace *nspace;
+ PatternItemList *list;
+ long patRepId;
+ LangEl *langEl;
+ PdaRun *pdaRun;
+ long nextBindId;
+ Pattern *prev, *next;
+};
+
+typedef DList<Pattern> PatList;
+
+struct Constructor
+{
+ static Constructor *cons( const InputLoc &loc, Namespace *nspace,
+ ConsItemList *list, int patRepId )
+ {
+ Constructor *r = new Constructor;
+ r->loc = loc;
+ r->nspace = nspace;
+ r->list = list;
+ r->patRepId = patRepId;
+ r->langEl = 0;
+ r->pdaRun = 0;
+ r->nextBindId = 1;
+ r->parse = true;
+ return r;
+ }
+
+ InputLoc loc;
+ Namespace *nspace;
+ ConsItemList *list;
+ int patRepId;
+ LangEl *langEl;
+ PdaRun *pdaRun;
+ long nextBindId;
+ bool parse;
+
+ Constructor *prev, *next;
+};
+
+typedef DList<Constructor> ConsList;
+
+struct ParserText
+{
+ static ParserText *cons( const InputLoc &loc,
+ Namespace *nspace, ConsItemList *list )
+ {
+ ParserText *p = new ParserText;
+ p->loc = loc;
+ p->nspace = nspace;
+ p->list = list;
+ p->langEl = 0;
+ p->pdaRun = 0;
+ p->nextBindId = 1;
+ p->parse = true;
+ return p;
+ }
+
+ InputLoc loc;
+ Namespace *nspace;
+ ConsItemList *list;
+ LangEl *langEl;
+ PdaRun *pdaRun;
+ long nextBindId;
+ bool parse;
+ ParserText *prev, *next;
+};
+
+typedef DList<ParserText> ParserTextList;
+
+struct Function;
+
+struct IterDef
+{
+ enum Type { Tree, Child, RevChild, Repeat, RevRepeat, User };
+
+ IterDef( Type type, Function *func );
+ IterDef( Type type );
+
+ Type type;
+
+ Function *func;
+ bool useFuncId;
+ bool useSearchUT;
+
+ Code inCreateWV;
+ Code inCreateWC;
+ Code inDestroy;
+ Code inAdvance;
+
+ Code inGetCurR;
+ Code inGetCurWC;
+ Code inSetCurWC;
+
+ Code inRefFromCur;
+};
+
+struct CmpIterDef
+{
+ static int compare( const IterDef &id1, const IterDef &id2 )
+ {
+ if ( id1.type < id2.type )
+ return -1;
+ else if ( id1.type > id2.type )
+ return 1;
+ else if ( id1.type == IterDef::User ) {
+ if ( id1.func < id2.func )
+ return -1;
+ else if ( id1.func > id2.func )
+ return 1;
+ }
+
+ return 0;
+ }
+};
+
+typedef AvlSet<IterDef, CmpIterDef> IterDefSet;
+typedef AvlSetEl<IterDef> IterDefSetEl;
+
+
+/*
+ * Unique Types.
+ */
+
+/*
+ * type_ref -> qualified_name
+ * type_ref -> '*' type_ref
+ * type_ref -> '&' type_ref
+ * type_ref -> list type_ref type_ref
+ * type_ref -> map type_ref type_ref
+ * type_ref -> vector type_ref
+ * type_ref -> parser type_ref
+ * type_ref -> iter_tree type_ref
+ * type_ref -> iter_child type_ref
+ * type_ref -> iter_revchild type_ref
+ * type_ref -> iter_repeat type_ref
+ * type_ref -> iter_revrepeat type_ref
+ * type_ref -> iter_user type_ref
+ *
+ * type -> nil
+ * type -> def term
+ * type -> def nonterm
+ * type -> '*' type
+ * type -> '&' type
+ * type -> list type
+ * type -> map type type
+ * type -> vector type
+ * type -> parser type
+ * type -> iter_tree type
+ * type -> iter_child type
+ * type -> iter_revchild type
+ * type -> iter_repeat type
+ * type -> iter_revrepeat type
+ * type -> iter_user type
+ */
+
+struct UniqueType : public AvlTreeEl<UniqueType>
+{
+ UniqueType( int typeId ) :
+ typeId(typeId),
+ langEl(0),
+ iterDef(0) {}
+
+ UniqueType( int typeId, LangEl *langEl ) :
+ typeId(typeId),
+ langEl(langEl),
+ iterDef(0) {}
+
+ UniqueType( int typeId, IterDef *iterDef ) :
+ typeId(typeId),
+ langEl(langEl),
+ iterDef(iterDef) {}
+
+ int typeId;
+ LangEl *langEl;
+ IterDef *iterDef;
+
+ ObjectDef *objectDef();
+};
+
+
+struct CmpUniqueType
+{
+ static int compare( const UniqueType &ut1, const UniqueType &ut2 );
+};
+
+typedef AvlBasic< UniqueType, CmpUniqueType > UniqueTypeMap;
+
+enum RepeatType {
+ RepeatNone = 1,
+ RepeatRepeat,
+ RepeatList,
+ RepeatOpt,
+};
+
+/*
+ * Repeat types.
+ */
+
+struct UniqueRepeat
+ : public AvlTreeEl<UniqueRepeat>
+{
+ UniqueRepeat( RepeatType repeatType, LangEl *langEl ) :
+ repeatType(repeatType),
+ langEl(langEl), declLangEl(0) {}
+
+ RepeatType repeatType;
+ LangEl *langEl;
+ LangEl *declLangEl;
+};
+
+struct CmpUniqueRepeat
+{
+ static int compare( const UniqueRepeat &ut1, const UniqueRepeat &ut2 );
+};
+
+typedef AvlBasic< UniqueRepeat, CmpUniqueRepeat > UniqueRepeatMap;
+
+/*
+ * Unique Map Types
+ */
+
+struct UniqueMap
+ : public AvlTreeEl<UniqueMap>
+{
+ UniqueMap( UniqueType *key, UniqueType *value ) :
+ key(key), value(value), generic(0) {}
+
+ UniqueType *key;
+ UniqueType *value;
+
+ GenericType *generic;
+};
+
+struct CmpUniqueMap
+{
+ static int compare( const UniqueMap &ut1, const UniqueMap &ut2 );
+};
+
+typedef AvlBasic< UniqueMap, CmpUniqueMap > UniqueMapMap;
+
+/*
+ * Unique List Types
+ */
+
+struct UniqueList
+ : public AvlTreeEl<UniqueList>
+{
+ UniqueList( UniqueType *value ) :
+ value(value), generic(0) {}
+
+ UniqueType *value;
+ GenericType *generic;
+};
+
+struct CmpUniqueList
+{
+ static int compare( const UniqueList &ut1, const UniqueList &ut2 );
+};
+
+typedef AvlBasic< UniqueList, CmpUniqueList > UniqueListMap;
+
+/*
+ * Unique Vector Types
+ */
+
+struct UniqueVector
+ : public AvlTreeEl<UniqueVector>
+{
+ UniqueVector( UniqueType *value ) :
+ value(value), generic(0) {}
+
+ UniqueType *value;
+ GenericType *generic;
+};
+
+struct CmpUniqueVector
+{
+ static int compare( const UniqueVector &ut1, const UniqueVector &ut2 );
+};
+
+typedef AvlBasic< UniqueVector, CmpUniqueVector > UniqueVectorMap;
+
+/*
+ * Unique Parser Types
+ */
+
+struct UniqueParser
+ : public AvlTreeEl<UniqueParser>
+{
+ UniqueParser( UniqueType *parseType ) :
+ parseType(parseType), generic(0) {}
+
+ UniqueType *parseType;
+ GenericType *generic;
+};
+
+struct CmpUniqueParser
+{
+ static int compare( const UniqueParser &ut1, const UniqueParser &ut2 );
+};
+
+typedef AvlBasic< UniqueParser, CmpUniqueParser > UniqueParserMap;
+
+/*
+ *
+ */
+
+typedef AvlMap< StringVect, int, CmpStrVect > VectorTypeIdMap;
+typedef AvlMapEl< StringVect, int > VectorTypeIdMapEl;
+
+typedef Vector<TypeRef*> TypeRefVect;
+
+struct TypeRef
+{
+ enum Type
+ {
+ Unspecified,
+ Name,
+ Literal,
+ Iterator,
+ Map,
+ List,
+ Vector,
+ Parser,
+ Ref,
+ Ptr,
+ };
+
+ TypeRef()
+ :
+ type((Type)-1),
+ nspaceQual(0),
+ pdaLiteral(0),
+ iterDef(0),
+ typeRef1(0),
+ typeRef2(0),
+ repeatType(RepeatNone),
+ parsedVarRef(0),
+ parsedTypeRef(0),
+ nspace(0),
+ uniqueType(0),
+ searchUniqueType(0),
+ generic(0),
+ searchTypeRef(0)
+ {}
+
+ /* Qualification and a type name. These require lookup. */
+ static TypeRef *cons( const InputLoc &loc, NamespaceQual *nspaceQual,
+ const String &typeName )
+ {
+ TypeRef *t = new TypeRef;
+ t->type = Name;
+ t->loc = loc;
+ t->nspaceQual = nspaceQual;
+ t->typeName = typeName;
+ t->repeatType = RepeatNone;
+ return t;
+ }
+
+ /* Qualification and a type name. These require lookup. */
+ static TypeRef *cons( const InputLoc &loc, NamespaceQual *nspaceQual,
+ String typeName, RepeatType repeatType )
+ {
+ TypeRef *t = cons( loc, nspaceQual, typeName );
+ t->repeatType = repeatType;
+ return t;
+ }
+
+ static TypeRef *cons( const InputLoc &loc, LangVarRef *parsedVarRef,
+ NamespaceQual *nspaceQual, String typeName, RepeatType repeatType )
+ {
+ TypeRef *t = cons( loc, nspaceQual, typeName );
+ t->parsedVarRef = parsedVarRef;
+ t->repeatType = repeatType;
+ return t;
+ }
+
+ static TypeRef *cons( const InputLoc &loc, TypeRef *parsedTypeRef,
+ NamespaceQual *nspaceQual, String typeName, RepeatType repeatType )
+ {
+ TypeRef *t = cons( loc, nspaceQual, typeName );
+ t->parsedTypeRef = parsedTypeRef;
+ t->repeatType = repeatType;
+ return t;
+ }
+
+ /* Qualification and a type name. These require lookup. */
+ static TypeRef *cons( const InputLoc &loc, NamespaceQual *nspaceQual,
+ PdaLiteral *pdaLiteral )
+ {
+ TypeRef *t = new TypeRef;
+ t->type = Literal;
+ t->loc = loc;
+ t->nspaceQual = nspaceQual;
+ t->pdaLiteral = pdaLiteral;
+ t->repeatType = RepeatNone;
+ return t;
+ }
+
+ static TypeRef *cons( const InputLoc &loc, TypeRef *parsedTypeRef,
+ NamespaceQual *nspaceQual, PdaLiteral *pdaLiteral )
+ {
+ TypeRef *t = cons( loc, nspaceQual, pdaLiteral );
+ t->parsedTypeRef = parsedTypeRef;
+ return t;
+ }
+
+ /* Qualification and a type name. These require lookup. */
+ static TypeRef *cons( const InputLoc &loc, NamespaceQual *nspaceQual,
+ PdaLiteral *pdaLiteral, RepeatType repeatType )
+ {
+ TypeRef *t = cons( loc, nspaceQual, pdaLiteral );
+ t->repeatType = repeatType;
+ return t;
+ }
+
+ static TypeRef *cons( const InputLoc &loc, LangVarRef *parsedVarRef,
+ NamespaceQual *nspaceQual, PdaLiteral *pdaLiteral, RepeatType repeatType )
+ {
+ TypeRef *t = cons( loc, nspaceQual, pdaLiteral );
+ t->parsedVarRef = parsedVarRef;
+ t->repeatType = repeatType;
+ return t;
+ }
+
+ static TypeRef *cons( const InputLoc &loc, TypeRef *parsedTypeRef,
+ NamespaceQual *nspaceQual, PdaLiteral *pdaLiteral, RepeatType repeatType )
+ {
+ TypeRef *t = cons( loc, nspaceQual, pdaLiteral );
+ t->parsedTypeRef = parsedTypeRef;
+ t->repeatType = repeatType;
+ return t;
+ }
+
+ /* Generics. */
+ static TypeRef *cons( const InputLoc &loc, Type type,
+ NamespaceQual *nspaceQual, TypeRef *typeRef1, TypeRef *typeRef2 )
+ {
+ TypeRef *t = new TypeRef;
+ t->type = type;
+ t->loc = loc;
+ t->nspaceQual = nspaceQual;
+ t->typeRef1 = typeRef1;
+ t->typeRef2 = typeRef2;
+ t->repeatType = RepeatNone;
+ return t;
+ }
+
+ /* Pointers and Refs. */
+ static TypeRef *cons( const InputLoc &loc, Type type, TypeRef *typeRef1 )
+ {
+ TypeRef *t = new TypeRef;
+ t->type = type;
+ t->loc = loc;
+ t->typeRef1 = typeRef1;
+ t->repeatType = RepeatNone;
+ return t;
+ }
+
+ /* Resolution not needed. */
+
+ /* Iterator definition. */
+ static TypeRef *cons( const InputLoc &loc, TypeRef *typeRef, IterCall *iterCall )
+ {
+ TypeRef *t = new TypeRef;
+ t->type = Iterator;
+ t->loc = loc;
+ t->repeatType = RepeatNone;
+ t->iterCall = iterCall;
+ t->searchTypeRef = typeRef;
+ return t;
+ }
+
+ /* Unique type is given directly. */
+ static TypeRef *cons( const InputLoc &loc, UniqueType *uniqueType )
+ {
+ TypeRef *t = new TypeRef;
+ t->type = Unspecified;
+ t->loc = loc;
+ t->repeatType = RepeatNone;
+ t->uniqueType = uniqueType;
+ return t;
+ }
+
+ void resolveRepeat( Compiler *pd );
+
+ Namespace *resolveNspace( Compiler *pd );
+ UniqueType *resolveIterator( Compiler *pd );
+ UniqueType *resolveTypeName( Compiler *pd );
+ UniqueType *resolveTypeLiteral( Compiler *pd );
+ UniqueType *resolveTypeMap( Compiler *pd );
+ UniqueType *resolveTypeList( Compiler *pd );
+ UniqueType *resolveTypeVector( Compiler *pd );
+ UniqueType *resolveTypeParser( Compiler *pd );
+ UniqueType *resolveType( Compiler *pd );
+ UniqueType *resolveTypePtr( Compiler *pd );
+ UniqueType *resolveTypeRef( Compiler *pd );
+
+ Type type;
+ InputLoc loc;
+ NamespaceQual *nspaceQual;
+ String typeName;
+ PdaLiteral *pdaLiteral;
+ IterCall *iterCall;
+ IterDef *iterDef;
+ TypeRef *typeRef1;
+ TypeRef *typeRef2;
+ RepeatType repeatType;
+
+ /* For pattern and constructor context. */
+ LangVarRef *parsedVarRef;
+ TypeRef *parsedTypeRef;
+
+ /* Resolved. */
+ Namespace *nspace;
+ UniqueType *uniqueType;
+ UniqueType *searchUniqueType;
+ GenericType *generic;
+ TypeRef *searchTypeRef;
+};
+
+typedef DList<ObjectField> ParameterList;
+
+struct ObjMethod
+{
+ ObjMethod( TypeRef *returnTypeRef, String name,
+ int opcodeWV, int opcodeWC, int numParams,
+ UniqueType **types, ParameterList *paramList, bool isConst )
+ :
+ returnUT(0),
+ returnTypeRef(returnTypeRef),
+ returnTypeId(0),
+ name(name),
+ opcodeWV(opcodeWV),
+ opcodeWC(opcodeWC),
+ numParams(numParams),
+ paramList(paramList),
+ isConst(isConst),
+ funcId(0),
+ useFuncId(false),
+ useCallObj(true),
+ isCustom(false),
+ func(0),
+ iterDef(0)
+ {
+ }
+
+ ObjMethod( UniqueType *returnUT, String name,
+ int opcodeWV, int opcodeWC, int numParams,
+ UniqueType **types, ParameterList *paramList, bool isConst )
+ :
+ returnUT(returnUT),
+ returnTypeRef(0),
+ returnTypeId(0),
+ name(name),
+ opcodeWV(opcodeWV),
+ opcodeWC(opcodeWC),
+ numParams(numParams),
+ paramList(paramList),
+ isConst(isConst),
+ funcId(0),
+ useFuncId(false),
+ useCallObj(true),
+ isCustom(false),
+ func(0),
+ iterDef(0)
+ {
+ this->paramUTs = new UniqueType*[numParams];
+ memcpy( this->paramUTs, types, sizeof(UniqueType*)*numParams );
+ }
+
+ UniqueType *returnUT;
+ TypeRef *returnTypeRef;
+ long returnTypeId;
+ String name;
+ long opcodeWV;
+ long opcodeWC;
+ long numParams;
+ UniqueType **paramUTs;
+ ParameterList *paramList;
+ bool isConst;
+ long funcId;
+ bool useFuncId;
+ bool useCallObj;
+ bool isCustom;
+ Function *func;
+ IterDef *iterDef;
+};
+
+typedef AvlMap<String, ObjMethod*, CmpStr> ObjMethodMap;
+typedef AvlMapEl<String, ObjMethod*> ObjMethodMapEl;
+
+struct RhsVal
+{
+ RhsVal( ProdEl *prodEl )
+ :
+ prodEl(prodEl)
+ {}
+
+ ProdEl *prodEl;
+};
+
+struct ObjectField
+{
+ ObjectField()
+ :
+ typeRef(0),
+ context(0),
+ scope(0),
+ pos(0),
+ offset(0),
+ beenReferenced(false),
+ beenInitialized(false),
+ useOffset(true),
+ isConst(false),
+ isLhsEl(false), isRhsEl(false),
+ refActive(false),
+ isArgv(false),
+ isCustom(false),
+ isParam(false),
+ isRhsGet(false),
+ isExport(false),
+ dirtyTree(false),
+ inGetR( IN_HALT ),
+ inGetWC( IN_HALT ),
+ inGetWV( IN_HALT ),
+ inSetWC( IN_HALT ),
+ inSetWV( IN_HALT )
+ {}
+
+ static ObjectField *cons( const InputLoc &loc, TypeRef *typeRef, const String &name )
+ {
+ ObjectField *c = new ObjectField;
+ c->loc = loc;
+ c->typeRef = typeRef;
+ c->name = name;
+ return c;
+ }
+
+ InputLoc loc;
+ TypeRef *typeRef;
+ String name;
+ Context *context;
+ ObjNameScope *scope;
+ long pos;
+ long offset;
+ bool beenReferenced;
+ bool beenInitialized;
+ bool useOffset;
+ bool isConst;
+ bool isLhsEl;
+ bool isRhsEl;
+ bool refActive;
+ bool isArgv;
+ bool isCustom;
+ bool isParam;
+ bool isRhsGet;
+ bool isExport;
+
+ /* True if some aspect of the tree has possibly been written to. This does
+ * not include attributes. This is here so we can optimize the storage of
+ * old lhs vars. If only a lhs attribute changes we don't need to preserve
+ * the original for backtracking. */
+ bool dirtyTree;
+
+ Vector<RhsVal> rhsVal;
+
+ Code inGetR;
+ Code inGetWC;
+ Code inGetWV;
+ Code inSetWC;
+ Code inSetWV;
+
+ ObjectField *prev, *next;
+};
+
+typedef AvlMap<String, ObjectField*, CmpStr> ObjFieldMap;
+typedef AvlMapEl<String, ObjectField*> ObjFieldMapEl;
+
+typedef DListVal<ObjectField*> ObjFieldList;
+
+typedef DList<ObjectField> ParameterList;
+
+struct TemplateType;
+
+/* Tree of name scopes for an object def. All of the object fields inside this
+ * tree live in one object def. This is used for scoping names in functions. */
+struct ObjNameScope
+{
+ ObjNameScope()
+ :
+ owner(0),
+ parentScope(0),
+ childIter(0)
+ {}
+
+ ObjectDef *owner;
+ ObjFieldMap *objFieldMap;
+
+ ObjNameScope *parentScope;
+ DList<ObjNameScope> children;
+
+ /* For iteration after declaration. */
+ ObjNameScope *childIter;
+
+ ObjNameScope *prev, *next;
+
+ int depth()
+ {
+ int depth = 0;
+ ObjNameScope *scope = this;
+ while ( scope != 0 ) {
+ depth += 1;
+ scope = scope->parentScope;
+ }
+ return depth;
+ }
+
+ ObjectField *findField( const String &name ) const;
+
+ ObjectField *checkRedecl( const String &name );
+ void insertField( const String &name, ObjectField *value );
+};
+
+struct ObjectDef
+{
+ enum Type {
+ UserType,
+ FrameType,
+ IterType,
+ BuiltinType
+ };
+
+ ObjectDef()
+ :
+ nextOffset(0),
+ firstNonTree(0)
+ {}
+
+ static ObjectDef *cons( Type type, String name, int id )
+ {
+ ObjectDef *o = new ObjectDef;
+
+ o->type = type;
+ o->name = name;
+ o->id = id;
+
+ o->rootScope = new ObjNameScope;
+ o->rootScope->owner = o;
+ o->rootScope->objFieldMap = new ObjFieldMap;
+
+ o->objFieldList = new ObjFieldList;
+ o->objMethodMap = new ObjMethodMap;
+
+ return o;
+ }
+
+ Type type;
+ String name;
+ ObjFieldList *objFieldList;
+ ObjMethodMap *objMethodMap;
+
+ ObjNameScope *rootScope;
+
+ ObjNameScope *pushScope( ObjNameScope *curScope );
+
+ long id;
+ long nextOffset;
+ long firstNonTree;
+
+
+ void referenceField( Compiler *pd, ObjectField *field );
+ void initField( Compiler *pd, ObjectField *field );
+ void createCode( Compiler *pd, CodeVect &code );
+ ObjMethod *findMethod( const String &name ) const;
+ ObjectField *findFieldInScope( const ObjNameScope *scope, const String &name ) const;
+ ObjectField *checkRedecl( ObjNameScope *inScope, const String &name );
+ void insertField( ObjNameScope *inScope, const String &name, ObjectField *value );
+ void resolve( Compiler *pd );
+ ObjectField *findFieldNum( long offset );
+
+ long size() { return nextOffset; }
+ long sizeTrees() { return firstNonTree; }
+};
+
+struct CallArg
+{
+ CallArg( LangExpr *expr )
+ : expr(expr), exprUT(0), offTmp(-1), offQualRef(-1) {}
+
+ LangExpr *expr;
+ UniqueType *exprUT;
+ int offTmp;
+ int offQualRef;
+};
+
+typedef Vector<LangExpr*> ExprVect;
+typedef Vector<CallArg*> CallArgVect;
+typedef Vector<String> StringVect;
+
+struct FieldInit
+{
+ static FieldInit *cons( const InputLoc &loc, String name, LangExpr *expr )
+ {
+ FieldInit *fi = new FieldInit;
+ fi->loc = loc;
+ fi->name = name;
+ fi->expr = expr;
+ return fi;
+ }
+
+ InputLoc loc;
+ String name;
+ LangExpr *expr;
+
+ UniqueType *exprUT;
+};
+
+typedef Vector<FieldInit*> FieldInitVect;
+
+struct VarRefLookup
+{
+ VarRefLookup( int lastPtrInQual, int firstConstPart, ObjectDef *inObject, ObjNameScope *inScope ) :
+ lastPtrInQual(lastPtrInQual),
+ firstConstPart(firstConstPart),
+ inObject(inObject),
+ inScope(inScope),
+ objField(0),
+ objMethod(0),
+ uniqueType(0),
+ iterSearchUT(0)
+ {}
+
+ int lastPtrInQual;
+ int firstConstPart;
+ ObjectDef *inObject;
+ ObjNameScope *inScope;
+ ObjectField *objField;
+ ObjMethod *objMethod;
+ UniqueType *uniqueType;
+ UniqueType *iterSearchUT;
+};
+
+struct QualItem
+{
+ enum Form { Dot, Arrow };
+
+ QualItem( Form form, const InputLoc &loc, const String &data )
+ : form(form), loc(loc), data(data) {}
+
+ Form form;
+ InputLoc loc;
+ String data;
+};
+
+typedef Vector<QualItem> QualItemVect;
+
+struct LangVarRef
+{
+ static LangVarRef *cons( const InputLoc &loc, Context *context, ObjNameScope *scope, QualItemVect *qual, const String &name )
+ {
+ LangVarRef *l = new LangVarRef;
+ l->loc = loc;
+ l->context = context;
+ l->scope = scope;
+ l->qual = qual;
+ l->name = name;
+ return l;
+ }
+
+ static LangVarRef *cons( const InputLoc &loc, Context *context, ObjNameScope *scope, const String &name )
+ {
+ return cons( loc, context, scope, new QualItemVect, name );
+ }
+
+ void resolve( Compiler *pd ) const;
+ UniqueType *lookup( Compiler *pd ) const;
+
+ UniqueType *loadField( Compiler *pd, CodeVect &code, ObjectDef *inObject,
+ ObjectField *el, bool forWriting, bool revert ) const;
+
+ VarRefLookup lookupMethod( Compiler *pd ) const;
+ VarRefLookup lookupField( Compiler *pd ) const;
+
+ VarRefLookup lookupQualification( Compiler *pd, ObjNameScope *rootScope ) const;
+ VarRefLookup lookupObj( Compiler *pd ) const;
+
+ bool isCustom() const;
+ bool isLocalRef() const;
+ bool isContextRef() const;
+ void loadQualification( Compiler *pd, CodeVect &code, ObjNameScope *rootScope,
+ int lastPtrInQual, bool forWriting, bool revert ) const;
+ void loadCustom( Compiler *pd, CodeVect &code,
+ int lastPtrInQual, bool forWriting ) const;
+ void loadLocalObj( Compiler *pd, CodeVect &code,
+ int lastPtrInQual, bool forWriting ) const;
+ void loadContextObj( Compiler *pd, CodeVect &code, int lastPtrInQual, bool forWriting ) const;
+ void loadGlobalObj( Compiler *pd, CodeVect &code,
+ int lastPtrInQual, bool forWriting ) const;
+ void loadObj( Compiler *pd, CodeVect &code, int lastPtrInQual, bool forWriting ) const;
+ void canTakeRef( Compiler *pd, VarRefLookup &lookup ) const;
+ bool canTakeRefTest( Compiler *pd, VarRefLookup &lookup ) const;
+
+ void setFieldIter( Compiler *pd, CodeVect &code, ObjectDef *inObject,
+ ObjectField *objField, UniqueType *objUT, UniqueType *exprType,
+ bool revert ) const;
+ void setFieldSearch( Compiler *pd, CodeVect &code,
+ ObjectDef *inObject, UniqueType *exprType ) const;
+ void setField( Compiler *pd, CodeVect &code, ObjectDef *inObject,
+ ObjectField *el, UniqueType *exprUT, bool revert ) const;
+
+ void assignValue( Compiler *pd, CodeVect &code, UniqueType *exprUT ) const;
+ ObjectField **evaluateArgs( Compiler *pd, CodeVect &code,
+ VarRefLookup &lookup, CallArgVect *args ) const;
+ void callOperation( Compiler *pd, CodeVect &code, VarRefLookup &lookup ) const;
+ UniqueType *evaluateCall( Compiler *pd, CodeVect &code, CallArgVect *args );
+ UniqueType *evaluate( Compiler *pd, CodeVect &code, bool forWriting = false ) const;
+ ObjectField *evaluateRef( Compiler *pd, CodeVect &code, long pushCount ) const;
+ ObjectField *preEvaluateRef( Compiler *pd, CodeVect &code ) const;
+ void resetActiveRefs( Compiler *pd, VarRefLookup &lookup, ObjectField **paramRefs ) const;
+ long loadQualificationRefs( Compiler *pd, CodeVect &code, ObjNameScope *rootScope ) const;
+ void popRefQuals( Compiler *pd, CodeVect &code,
+ VarRefLookup &lookup, CallArgVect *args ) const;
+
+ InputLoc loc;
+ Context *context;
+ ObjNameScope *scope;
+ QualItemVect *qual;
+ String name;
+};
+
+struct LangTerm
+{
+ enum Type {
+ VarRefType,
+ MethodCallType,
+ NumberType,
+ StringType,
+ MatchType,
+ NewType,
+ ConstructType,
+ TypeIdType,
+ SearchType,
+ NilType,
+ TrueType,
+ FalseType,
+ ParseType,
+ ParseStopType,
+ SendType,
+ MakeTreeType,
+ MakeTokenType,
+ EmbedStringType,
+ CastType,
+ };
+
+ LangTerm()
+ :
+ generic(0),
+ parserText(0)
+ {}
+
+ static LangTerm *cons( const InputLoc &loc, Type type, LangVarRef *varRef )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->varRef = varRef;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, LangVarRef *varRef, CallArgVect *args )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = MethodCallType;
+ t->varRef = varRef;
+ t->args = args;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type, CallArgVect *args )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->args = args;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type, String data )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->varRef = 0;
+ t->data = data;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->varRef = 0;
+ t->typeRef = 0;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type, TypeRef *typeRef )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->varRef = 0;
+ t->typeRef = typeRef;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type, TypeRef *typeRef, LangExpr *langExpr )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->varRef = 0;
+ t->typeRef = typeRef;
+ t->expr = langExpr;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type, LangVarRef *varRef, Pattern *pattern )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->varRef = varRef;
+ t->pattern = pattern;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type, TypeRef *typeRef, LangVarRef *varRef )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->varRef = varRef;
+ t->typeRef = typeRef;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type, LangVarRef *varRef, ObjectField *objField,
+ TypeRef *typeRef, FieldInitVect *fieldInitArgs, Constructor *constructor )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->varRef = varRef;
+ t->objField = objField;
+ t->typeRef = typeRef;
+ t->fieldInitArgs = fieldInitArgs;
+ t->constructor = constructor;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type, LangVarRef *varRef, ObjectField *objField,
+ TypeRef *typeRef, FieldInitVect *fieldInitArgs, Constructor *constructor,
+ ParserText *parserText )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->varRef = varRef;
+ t->objField = objField;
+ t->typeRef = typeRef;
+ t->fieldInitArgs = fieldInitArgs;
+ t->constructor = constructor;
+ t->parserText = parserText;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type, LangExpr *expr )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = type;
+ t->expr = expr;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, ConsItemList *consItemList )
+ {
+ LangTerm *t = new LangTerm;
+ t->loc = loc;
+ t->type = EmbedStringType;
+ t->consItemList = consItemList;
+ return t;
+ }
+
+ static LangTerm *cons( const InputLoc &loc, Type type, LangVarRef *varRef, ParserText *parserText )
+ {
+ LangTerm *s = new LangTerm;
+ s->loc = loc;
+ s->type = type;
+ s->varRef = varRef;
+ s->parserText = parserText;
+ return s;
+ }
+
+ static LangTerm *consSend( const InputLoc &loc, LangVarRef *varRef, ParserText *parserText, bool eof )
+ {
+ LangTerm *s = new LangTerm;
+ s->loc = loc;
+ s->type = SendType;
+ s->varRef = varRef;
+ s->parserText = parserText;
+ s->eof = eof;
+ return s;
+ }
+
+ void resolve( Compiler *pd );
+
+ UniqueType *evaluateNew( Compiler *pd, CodeVect &code ) const;
+ UniqueType *evaluateConstruct( Compiler *pd, CodeVect &code ) const;
+ void parseFrag( Compiler *pd, CodeVect &code, int stopId ) const;
+ UniqueType *evaluateParse( Compiler *pd, CodeVect &code, bool stop ) const;
+ void evaluateSendStream( Compiler *pd, CodeVect &code ) const;
+ void evaluateSendParser( Compiler *pd, CodeVect &code ) const;
+ UniqueType *evaluateSend( Compiler *pd, CodeVect &code ) const;
+ UniqueType *evaluateMatch( Compiler *pd, CodeVect &code ) const;
+ UniqueType *evaluate( Compiler *pd, CodeVect &code ) const;
+ void assignFieldArgs( Compiler *pd, CodeVect &code, UniqueType *replUT ) const;
+ UniqueType *evaluateMakeToken( Compiler *pd, CodeVect &code ) const;
+ UniqueType *evaluateMakeTree( Compiler *pd, CodeVect &code ) const;
+ UniqueType *evaluateEmbedString( Compiler *pd, CodeVect &code ) const;
+ UniqueType *evaluateSearch( Compiler *pd, CodeVect &code ) const;
+ UniqueType *evaluateCast( Compiler *pd, CodeVect &code ) const;
+
+ InputLoc loc;
+ Type type;
+ LangVarRef *varRef;
+ CallArgVect *args;
+ NamespaceQual *nspaceQual;
+ String data;
+ ObjectField *objField;
+ TypeRef *typeRef;
+ Pattern *pattern;
+ FieldInitVect *fieldInitArgs;
+ GenericType *generic;
+ Constructor *constructor;
+ ParserText *parserText;
+ LangExpr *expr;
+ ConsItemList *consItemList;
+ bool eof;
+};
+
+struct LangExpr
+{
+ enum Type {
+ BinaryType,
+ UnaryType,
+ TermType
+ };
+
+ static LangExpr *cons( const InputLoc &loc, LangExpr *left, char op, LangExpr *right )
+ {
+ LangExpr *e = new LangExpr;
+ e->loc = loc;
+ e->type = BinaryType;
+ e->left = left;
+ e->op = op;
+ e->right = right;
+ return e;
+ }
+
+ static LangExpr *cons( const InputLoc &loc, char op, LangExpr *right )
+ {
+ LangExpr *e = new LangExpr;
+ e->loc = loc;
+ e->type = UnaryType;
+ e->left = 0;
+ e->op = op;
+ e->right =right;
+ return e;
+ }
+
+ static LangExpr *cons( LangTerm *term )
+ {
+ LangExpr *e = new LangExpr;
+ e->type = TermType;
+ e->term = term;
+ return e;
+ }
+
+ void resolve( Compiler *pd ) const;
+
+ UniqueType *evaluate( Compiler *pd, CodeVect &code ) const;
+ bool canTakeRefTest( Compiler *pd ) const;
+
+ InputLoc loc;
+ Type type;
+ LangExpr *left;
+ char op;
+ LangExpr *right;
+ LangTerm *term;
+};
+
+struct LangStmt;
+typedef DList<LangStmt> StmtList;
+
+struct IterCall
+{
+ enum Form {
+ VarRefForm,
+ IterCallForm,
+ ExprForm
+ };
+
+ IterCall()
+ :
+ langTerm(0),
+ langExpr(0)
+ {}
+
+ static IterCall *cons( Form form, LangTerm *langTerm )
+ {
+ IterCall *iterCall = new IterCall;
+ iterCall->form = form;
+ iterCall->langTerm = langTerm;
+ return iterCall;
+ }
+
+ static IterCall *cons( Form form, LangExpr *langExpr )
+ {
+ IterCall *iterCall = new IterCall;
+ iterCall->form = form;
+ iterCall->langExpr = langExpr;
+ return iterCall;
+ }
+
+ void resolve( Compiler *pd ) const;
+
+ Form form;
+ LangTerm *langTerm;
+ LangExpr *langExpr;
+};
+
+struct LangStmt
+{
+ enum Type {
+ AssignType,
+ PrintType,
+ PrintXMLACType,
+ PrintXMLType,
+ PrintStreamType,
+ ExprType,
+ IfType,
+ ElseType,
+ RejectType,
+ WhileType,
+ ReturnType,
+ YieldType,
+ ForIterType,
+ BreakType
+ };
+
+ LangStmt()
+ :
+ type((Type)-1),
+ varRef(0),
+ langTerm(0),
+ objField(0),
+ typeRef(0),
+ expr(0),
+ constructor(0),
+ parserText(0),
+ exprPtrVect(0),
+ fieldInitVect(0),
+ stmtList(0),
+ elsePart(0),
+ iterCall(0),
+ context(0),
+ scope(0),
+
+ /* Normally you don't need to initialize double list pointers, however,
+ * we make use of the next pointer for returning a pair of statements
+ * using one pointer to a LangStmt, so we need to initialize it above. */
+ prev(0),
+ next(0)
+ {}
+
+ static LangStmt *cons( const InputLoc &loc, Type type, FieldInitVect *fieldInitVect )
+ {
+ LangStmt *s = new LangStmt;
+ s->loc = loc;
+ s->type = type;
+ s->fieldInitVect = fieldInitVect;
+ return s;
+ }
+
+ static LangStmt *cons( const InputLoc &loc, Type type, CallArgVect *exprPtrVect )
+ {
+ LangStmt *s = new LangStmt;
+ s->loc = loc;
+ s->type = type;
+ s->exprPtrVect = exprPtrVect;
+ return s;
+ }
+
+ static LangStmt *cons( const InputLoc &loc, Type type, LangExpr *expr )
+ {
+ LangStmt *s = new LangStmt;
+ s->loc = loc;
+ s->type = type;
+ s->expr = expr;
+ return s;
+ }
+
+ static LangStmt *cons( Type type, LangVarRef *varRef )
+ {
+ LangStmt *s = new LangStmt;
+ s->type = type;
+ s->varRef = varRef;
+ return s;
+ }
+
+ static LangStmt *cons( const InputLoc &loc, Type type, ObjectField *objField )
+ {
+ LangStmt *s = new LangStmt;
+ s->loc = loc;
+ s->type = type;
+ s->objField = objField;
+ return s;
+ }
+
+ static LangStmt *cons( const InputLoc &loc, Type type, LangVarRef *varRef, LangExpr *expr )
+ {
+ LangStmt *s = new LangStmt;
+ s->loc = loc;
+ s->type = type;
+ s->varRef = varRef;
+ s->expr = expr;
+ return s;
+ }
+
+ static LangStmt *cons( Type type, LangExpr *expr, StmtList *stmtList )
+ {
+ LangStmt *s = new LangStmt;
+ s->type = type;
+ s->expr = expr;
+ s->stmtList = stmtList;
+ return s;
+ }
+
+ static LangStmt *cons( Type type, StmtList *stmtList )
+ {
+ LangStmt *s = new LangStmt;
+ s->type = type;
+ s->stmtList = stmtList;
+ return s;
+ }
+
+ static LangStmt *cons( Type type, LangExpr *expr, StmtList *stmtList, LangStmt *elsePart )
+ {
+ LangStmt *s = new LangStmt;
+ s->type = type;
+ s->expr = expr;
+ s->stmtList = stmtList;
+ s->elsePart = elsePart;
+ return s;
+ }
+
+ static LangStmt *cons( const InputLoc &loc, Type type )
+ {
+ LangStmt *s = new LangStmt;
+ s->loc = loc;
+ s->type = type;
+ return s;
+ }
+
+ static LangStmt *cons( Type type, LangVarRef *varRef, Constructor *constructor )
+ {
+ LangStmt *s = new LangStmt;
+ s->type = type;
+ s->varRef = varRef;
+ s->constructor = constructor;
+ return s;
+ }
+
+ static LangStmt *cons( const InputLoc &loc, Type type, ObjectField *objField,
+ TypeRef *typeRef, LangTerm *langTerm, StmtList *stmtList )
+ {
+ LangStmt *s = new LangStmt;
+ s->loc = loc;
+ s->type = type;
+ s->langTerm = langTerm;
+ s->objField = objField;
+ s->typeRef = typeRef;
+ s->stmtList = stmtList;
+ return s;
+ }
+
+ static LangStmt *cons( const InputLoc &loc, Type type, ObjectField *objField,
+ TypeRef *typeRef, IterCall *iterCall, StmtList *stmtList,
+ Context *context, ObjNameScope *scope )
+ {
+ LangStmt *s = new LangStmt;
+ s->loc = loc;
+ s->type = type;
+ s->objField = objField;
+ s->typeRef = typeRef;
+ s->iterCall = iterCall;
+ s->stmtList = stmtList;
+ s->context = context;
+ s->scope = scope;
+ return s;
+ }
+
+
+ static LangStmt *cons( Type type )
+ {
+ LangStmt *s = new LangStmt;
+ s->type = type;
+ return s;
+ }
+
+ void declareForIter( Compiler *pd ) const;
+
+ void declare( Compiler *pd ) const;
+
+ void resolveForIter( Compiler *pd ) const;
+ void resolve( Compiler *pd ) const;
+ void resolveParserItems( Compiler *pd ) const;
+
+ void chooseDefaultIter( Compiler *pd, IterCall *iterCall ) const;
+ void compileWhile( Compiler *pd, CodeVect &code ) const;
+ void compileForIterBody( Compiler *pd, CodeVect &code, UniqueType *iterUT ) const;
+ void compileForIter( Compiler *pd, CodeVect &code ) const;
+ void compile( Compiler *pd, CodeVect &code ) const;
+
+ InputLoc loc;
+ Type type;
+ LangVarRef *varRef;
+ LangTerm *langTerm;
+ ObjectField *objField;
+ TypeRef *typeRef;
+ LangExpr *expr;
+ Constructor *constructor;
+ ParserText *parserText;
+ CallArgVect *exprPtrVect;
+ FieldInitVect *fieldInitVect;
+ StmtList *stmtList;
+ /* Either another if, or an else. */
+ LangStmt *elsePart;
+ String name;
+ IterCall *iterCall;
+ Context *context;
+ ObjNameScope *scope;
+
+ /* Normally you don't need to initialize double list pointers, however, we
+ * make use of the next pointer for returning a pair of statements using
+ * one pointer to a LangStmt, so we need to initialize it above. */
+ LangStmt *prev, *next;
+};
+
+struct CodeBlock
+{
+ CodeBlock()
+ :
+ frameId(-1),
+ context(0)
+ {}
+
+ static CodeBlock *cons( StmtList *stmtList, ObjectDef *localFrame )
+ {
+ CodeBlock *c = new CodeBlock;
+ c->stmtList = stmtList;
+ c->localFrame = localFrame;
+ return c;
+ }
+
+ void declare( Compiler *pd ) const;
+ void resolve( Compiler *pd ) const;
+ void compile( Compiler *pd, CodeVect &code ) const;
+
+ long frameId;
+ StmtList *stmtList;
+ ObjectDef *localFrame;
+ Locals locals;
+ Context *context;
+
+ /* Each frame has two versions of
+ * the code: revert and commit. */
+ CodeVect codeWV, codeWC;
+};
+
+struct Function
+{
+ Function()
+ :
+ paramListSize(0),
+ paramUTs(0),
+ inContext(0),
+ objMethod(0)
+ {}
+
+ static Function *cons( TypeRef *typeRef, const String &name,
+ ParameterList *paramList, CodeBlock *codeBlock,
+ int funcId, bool isUserIter, bool exprt )
+ {
+ Function *f = new Function;
+
+ f->typeRef = typeRef;
+ f->name = name;
+ f->paramList = paramList;
+ f->codeBlock = codeBlock;
+ f->funcId = funcId;
+ f->isUserIter = isUserIter;
+ f->exprt = exprt;
+
+ return f;
+ }
+
+ TransBlock *transBlock;
+ TypeRef *typeRef;
+ String name;
+ ParameterList *paramList;
+ CodeBlock *codeBlock;
+ ObjectDef *localFrame;
+ long funcId;
+ bool isUserIter;
+ long paramListSize;
+ UniqueType **paramUTs;
+ Context *inContext;
+ bool exprt;
+ ObjMethod *objMethod;
+
+ Function *prev, *next;
+};
+
+typedef DList<Function> FunctionList;
+
+#endif /* _PARSETREE_H */
diff --git a/src/pcheck.cc b/src/pcheck.cc
new file mode 100644
index 0000000..d5401f7
--- /dev/null
+++ b/src/pcheck.cc
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "pcheck.h"
+#include <assert.h>
+
+/* Construct a new parameter checker with for paramSpec. */
+ParamCheck::ParamCheck( const char *paramSpec, int argc, const char **argv )
+:
+ state(noparam),
+ argOffset(0),
+ curArg(0),
+ iCurArg(1),
+ paramSpec(paramSpec),
+ argc(argc),
+ argv(argv)
+{
+}
+
+/* Check a single option. Returns the index of the next parameter. Sets p to
+ * the arg character if valid, 0 otherwise. Sets parg to the parameter arg if
+ * there is one, NULL otherwise. */
+bool ParamCheck::check()
+{
+ bool requiresParam;
+
+ if ( iCurArg >= argc ) { /* Off the end of the arg list. */
+ state = noparam;
+ return false;
+ }
+
+ if ( argOffset != 0 && *argOffset == 0 ) {
+ /* We are at the end of an arg string. */
+ iCurArg += 1;
+ if ( iCurArg >= argc ) {
+ state = noparam;
+ return false;
+ }
+ argOffset = 0;
+ }
+
+ if ( argOffset == 0 ) {
+ /* Set the current arg. */
+ curArg = argv[iCurArg];
+
+ /* We are at the beginning of an arg string. */
+ if ( argv[iCurArg] == 0 || /* Argv[iCurArg] is null. */
+ argv[iCurArg][0] != '-' || /* Not a param. */
+ argv[iCurArg][1] == 0 ) { /* Only a dash. */
+ parameter = 0;
+ parameterArg = 0;
+
+ iCurArg += 1;
+ state = noparam;
+ return true;
+ }
+ argOffset = argv[iCurArg] + 1;
+ }
+
+ /* Get the arg char. */
+ char argChar = *argOffset;
+
+ /* Loop over all the parms and look for a match. */
+ const char *pSpec = paramSpec;
+ while ( *pSpec != 0 ) {
+ char pSpecChar = *pSpec;
+
+ /* If there is a ':' following the char then
+ * it requires a parm. If a parm is required
+ * then move ahead two in the parmspec. Otherwise
+ * move ahead one in the parm spec. */
+ if ( pSpec[1] == ':' ) {
+ requiresParam = true;
+ pSpec += 2;
+ }
+ else {
+ requiresParam = false;
+ pSpec += 1;
+ }
+
+ /* Do we have a match. */
+ if ( argChar == pSpecChar ) {
+ if ( requiresParam ) {
+ if ( argOffset[1] == 0 ) {
+ /* The param must follow. */
+ if ( iCurArg + 1 == argc ) {
+ /* We are the last arg so there
+ * cannot be a parameter to it. */
+ parameter = argChar;
+ parameterArg = 0;
+ iCurArg += 1;
+ argOffset = 0;
+ state = invalid;
+ return true;
+ }
+ else {
+ /* the parameter to the arg is the next arg. */
+ parameter = pSpecChar;
+ parameterArg = argv[iCurArg + 1];
+ iCurArg += 2;
+ argOffset = 0;
+ state = match;
+ return true;
+ }
+ }
+ else {
+ /* The param for the arg is built in. */
+ parameter = pSpecChar;
+ parameterArg = argOffset + 1;
+ iCurArg += 1;
+ argOffset = 0;
+ state = match;
+ return true;
+ }
+ }
+ else {
+ /* Good, we matched the parm and no
+ * arg is required. */
+ parameter = pSpecChar;
+ parameterArg = 0;
+ argOffset += 1;
+ state = match;
+ return true;
+ }
+ }
+ }
+
+ /* We did not find a match. Bad Argument. */
+ parameter = argChar;
+ parameterArg = 0;
+ argOffset += 1;
+ state = invalid;
+ return true;
+}
+
+
diff --git a/src/pcheck.h b/src/pcheck.h
new file mode 100644
index 0000000..5be6042
--- /dev/null
+++ b/src/pcheck.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2001, 2002 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _PCHECK_H
+#define _PCHECK_H
+
+class ParamCheck
+{
+public:
+ ParamCheck( const char *paramSpec, int argc, const char **argv );
+
+ bool check();
+
+ const char *parameterArg; /* The argument to the parameter. */
+ char parameter; /* The parameter matched. */
+ enum { match, invalid, noparam } state;
+
+ const char *argOffset; /* If we are reading params inside an
+ * arg this points to the offset. */
+
+ const char *curArg; /* Pointer to the current arg. */
+ int iCurArg; /* Index to the current arg. */
+
+private:
+ const char *paramSpec; /* Parameter spec supplied by the coder. */
+ int argc; /* Arguement data from the command line. */
+ const char **argv;
+};
+
+#endif /* _PCHECK_H */
diff --git a/src/pdabuild.cc b/src/pdabuild.cc
new file mode 100644
index 0000000..7978edf
--- /dev/null
+++ b/src/pdabuild.cc
@@ -0,0 +1,2099 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#define EOF_REGION 0
+
+#include <iostream>
+#include <iomanip>
+#include <errno.h>
+#include <stdlib.h>
+
+/* Parsing. */
+#include "global.h"
+#include "parsedata.h"
+#include "pdacodegen.h"
+#include "pdarun.h"
+#include "redfsm.h"
+#include "fsmcodegen.h"
+#include "redbuild.h"
+
+/* Dumping the fsm. */
+#include "mergesort.h"
+
+using std::endl;
+using std::cerr;
+using std::cout;
+
+char startDefName[] = "start";
+
+/* Count the transitions in the fsm by walking the state list. */
+int countTransitions( PdaGraph *fsm )
+{
+ int numTrans = 0;
+ PdaState *state = fsm->stateList.head;
+ while ( state != 0 ) {
+ numTrans += state->transMap.length();
+ state = state->next;
+ }
+ return numTrans;
+}
+
+LangEl::LangEl( Namespace *nspace, const String &name, Type type )
+:
+ nspace(nspace),
+ name(name),
+ lit(name),
+ type(type),
+ id(-1),
+ isContext(false),
+ //displayString(0),
+ numAppearances(0),
+ commit(false),
+ isIgnore(false),
+ reduceFirst(false),
+ isLiteral(false),
+ isRepeat(false),
+ isList(false),
+ isOpt(false),
+ parseStop(false),
+ isEOF(false),
+ repeatOf(0),
+ tokenDef(0),
+ rootDef(0),
+ termDup(0),
+ eofLel(0),
+ pdaGraph(0),
+ pdaTables(0),
+ transBlock(0),
+ objectDef(0),
+ thisSize(0),
+ ofiOffset(0),
+ generic(0),
+ parserId(-1),
+ predType(PredNone),
+ predValue(0),
+ contextDef(0),
+ contextIn(0),
+ noPreIgnore(false),
+ noPostIgnore(false),
+ isZero(false)
+{
+}
+
+PdaGraph *ProdElList::walk( Compiler *pd, Production *prod )
+{
+ PdaGraph *prodFsm = new PdaGraph();
+ PdaState *last = prodFsm->addState();
+ prodFsm->setStartState( last );
+
+ int prodLength = 0;
+ for ( Iter prodEl = first(); prodEl.lte(); prodEl++, prodLength++ ) {
+ //PdaGraph *itemFsm = prodEl->walk( pd );
+ long value = prodEl->langEl->id;
+
+ PdaState *newState = prodFsm->addState();
+ PdaTrans *newTrans = prodFsm->appendNewTrans( last, newState, value, value );
+
+ newTrans->isShift = true;
+ newTrans->shiftPrior = prodEl->priorVal;
+ //cerr << "PRIOR VAL: " << newTrans->shiftPrior << endl;
+
+ if ( prodEl->commit ) {
+ //cout << "COMMIT: inserting commit of length: " << pd->prodLength << endl;
+ /* Insert the commit into transitions out of last */
+ for ( TransMap::Iter trans = last->transMap; trans.lte(); trans++ )
+ trans->value->commits.insert( prodLength );
+ }
+
+ last = newState;
+ }
+
+ /* Make the last state the final state. */
+ prodFsm->setFinState( last );
+ return prodFsm;
+}
+
+
+ProdElList *Compiler::makeProdElList( LangEl *langEl )
+{
+ ProdElList *prodElList = new ProdElList();
+ UniqueType *uniqueType = findUniqueType( TYPE_TREE, langEl );
+ TypeRef *typeRef = TypeRef::cons( internal, uniqueType );
+ prodElList->append( new ProdEl( internal, typeRef ) );
+ prodElList->tail->langEl = langEl;
+ return prodElList;
+}
+
+void Compiler::makeDefinitionNames()
+{
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ int prodNum = 1;
+ for ( LelDefList::Iter def = lel->defList; def.lte(); def++ ) {
+ def->data.setAs( lel->name.length() + 32, "%s-%i",
+ lel->name.data, prodNum++ );
+ }
+ }
+}
+
+/* Make sure there there are no language elements whose type is unkonwn. This
+ * can happen when an id is used on the rhs of a definition but is not defined
+ * as anything. */
+void Compiler::noUndefindLangEls()
+{
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->type == LangEl::Unknown )
+ error() << "'" << lel->name << "' was not defined as anything" << endp;
+ }
+}
+
+void Compiler::makeLangElIds()
+{
+ /* The first id 0 is reserved for the stack sentinal. A negative id means
+ * error to the parsing function, inducing backtracking. */
+ nextSymbolId = 1;
+
+ /* First pass assigns to the user terminals. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ /* Must be a term, and not any of the special reserved terminals.
+ * Remember if the non terminal is a user non terminal. */
+ if ( lel->type == LangEl::Term &&
+ !lel->isEOF &&
+ lel != errorLangEl &&
+ lel != noTokenLangEl )
+ {
+ lel->id = nextSymbolId++;
+ }
+ }
+
+ //eofLangEl->id = nextSymbolId++;
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ /* Must be a term, and not any of the special reserved terminals.
+ * Remember if the non terminal is a user non terminal. */
+ if ( lel->isEOF )
+ lel->id = nextSymbolId++;
+ }
+
+ /* Next assign to the eof notoken, which we always create. */
+ noTokenLangEl->id = nextSymbolId++;
+
+ /* Possibly assign to the error language element. */
+ if ( errorLangEl != 0 )
+ errorLangEl->id = nextSymbolId++;
+
+ /* Save this for the code generation. */
+ firstNonTermId = nextSymbolId;
+
+ /* A third and final pass assigns to everything else. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ /* Anything else not yet assigned gets assigned now. */
+ if ( lel->id < 0 )
+ lel->id = nextSymbolId++;
+ }
+
+ assert( ptrLangEl->id == LEL_ID_PTR );
+ assert( boolLangEl->id == LEL_ID_BOOL );
+ assert( intLangEl->id == LEL_ID_INT );
+ assert( strLangEl->id == LEL_ID_STR );
+ assert( streamLangEl->id == LEL_ID_STREAM );
+ assert( ignoreLangEl->id == LEL_ID_IGNORE );
+}
+
+void Compiler::refNameSpace( LangEl *lel, Namespace *nspace )
+{
+ if ( nspace == rootNamespace ) {
+ lel->refName = "::" + lel->refName;
+ return;
+ }
+
+ lel->refName = nspace->name + "::" + lel->refName;
+ lel->declName = nspace->name + "::" + lel->declName;
+ lel->xmlTag = nspace->name + "::" + lel->xmlTag;
+ refNameSpace( lel, nspace->parentNamespace );
+}
+
+void Compiler::makeLangElNames()
+{
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->id == LEL_ID_VOID ) {
+ lel->fullName = "_void";
+ lel->fullLit = "_void";
+ lel->refName = "_void";
+ lel->declName = "_void";
+ lel->xmlTag = "void";
+
+ }
+ else if ( lel->id == LEL_ID_INT ) {
+ lel->fullName = "_int";
+ lel->fullLit = "_int";
+ lel->refName = "_int";
+ lel->declName = "_int";
+ lel->xmlTag = "int";
+ }
+ else if ( lel->id == LEL_ID_BOOL ) {
+ lel->fullName = "_bool";
+ lel->fullLit = "_bool";
+ lel->refName = "_bool";
+ lel->declName = "_bool";
+ lel->xmlTag = "bool";
+ }
+ else {
+ lel->fullName = lel->name;
+ lel->fullLit = lel->lit;
+ lel->refName = lel->lit;
+ lel->declName = lel->lit;
+ lel->xmlTag = lel->name;
+ }
+
+ /* If there is also a namespace next to the type, we add a prefix to
+ * the type. It's not convenient to name C++ classes the same as a
+ * namespace in the same scope. We don't want to restrict colm, so we
+ * add a workaround for the least-common case. The type gets t_ prefix.
+ * */
+ Namespace *nspace = lel->nspace->findNamespace( lel->name );
+ if ( nspace != 0 ) {
+ lel->refName = "t_" + lel->refName;
+ lel->fullName = "t_" + lel->fullName;
+ lel->declName = "t_" + lel->declName;
+ lel->xmlTag = "t_" + lel->xmlTag;
+ }
+
+ refNameSpace( lel, lel->nspace );
+ }
+}
+
+/* Set up dot sets, shift info, and prod sets. */
+void Compiler::makeProdFsms()
+{
+ /* There are two items in the index for each production (high and low). */
+ int indexLen = prodList.length() * 2;
+ dotItemIndex.setAsNew( indexLen );
+ int dsiLow = 0, indexPos = 0;
+
+ /* Build FSMs for all production language elements. */
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ )
+ prod->fsm = prod->prodElList->walk( this, prod );
+
+ makeNonTermFirstSets();
+ makeFirstSets();
+
+ /* Build FSMs for all production language elements. */
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ if ( addUniqueEmptyProductions ) {
+ /* This must be re-implemented. */
+ assert( false );
+ //if ( !prod->isLeftRec && prod->uniqueEmptyLeader != 0 ) {
+ // PdaGraph *emptyLeader = prod->uniqueEmptyLeader->walk( this );
+ // emptyLeader->concatOp( prod->fsm );
+ // prod->fsm = emptyLeader;
+ //}
+ }
+
+ /* Compute the machine's length. */
+ prod->fsmLength = prod->fsm->fsmLength( );
+
+ /* Productions have a unique production id for each final state.
+ * This lets us use a production length specific to each final state.
+ * Start states are always isolated therefore if the start state is
+ * final then reductions from it will always have a fixed production
+ * length. This is a simple method for determining the length
+ * of zero-length derivations when reducing. */
+
+ /* Number of dot items needed for the production is elements + 1
+ * because the dot can be before the first and after the last element. */
+ int numForProd = prod->fsm->stateList.length() + 1;
+
+ /* Set up the low and high values in the index for this production. */
+ dotItemIndex.data[indexPos].key = dsiLow;
+ dotItemIndex.data[indexPos].value = prod;
+ dotItemIndex.data[indexPos+1].key = dsiLow + numForProd - 1;
+ dotItemIndex.data[indexPos+1].value = prod;
+
+ int dsi = dsiLow;
+ for ( PdaStateList::Iter state = prod->fsm->stateList; state.lte(); state++, dsi++ ) {
+ /* All transitions are shifts. */
+ for ( TransMap::Iter out = state->transMap; out.lte(); out++ )
+ assert( out->value->isShift );
+
+ state->dotSet.insert( dsi );
+ }
+
+ /* Move over the production. */
+ dsiLow += numForProd;
+ indexPos += 2;
+
+ if ( prod->prodCommit ) {
+ for ( PdaStateSet::Iter fin = prod->fsm->finStateSet; fin.lte(); fin++ ) {
+ int length = prod->fsmLength;
+ //cerr << "PENDING COMMIT IN FINAL STATE of " << prod->prodId <<
+ // " with len: " << length << endl;
+ (*fin)->pendingCommits.insert( ProdIdPair( prod->prodId, length ) );
+ }
+ }
+ }
+
+ /* Make the final state specific prod id to prod id mapping. */
+ prodIdIndex = new Production*[prodList.length()];
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ )
+ prodIdIndex[prod->prodId] = prod;
+}
+
+/* Want the first set of over src. If the first set contains epsilon, go over
+ * it and over tab. If overSrc is the end of the production, find the follow
+ * from the table, taking only the characters on which the parent is reduced.
+ * */
+void Compiler::findFollow( AlphSet &result, PdaState *overTab,
+ PdaState *overSrc, Production *parentDef )
+{
+ if ( overSrc->isFinState() ) {
+ assert( overSrc->transMap.length() == 0 );
+
+ /* At the end of the production. Turn to the table. */
+ long redCode = makeReduceCode( parentDef->prodId, false );
+ for ( TransMap::Iter tabTrans = overTab->transMap; tabTrans.lte(); tabTrans++ ) {
+ for ( ActDataList::Iter adl = tabTrans->value->actions; adl.lte(); adl++ ) {
+ if ( *adl == redCode )
+ result.insert( tabTrans->key );
+ }
+ }
+ }
+ else {
+ /* Get the first set of the item. If the first set contains epsilon
+ * then move over overSrc and overTab and recurse. */
+ assert( overSrc->transMap.length() == 1 );
+ TransMap::Iter pastTrans = overSrc->transMap;
+
+ LangEl *langEl = langElIndex[pastTrans->key];
+ if ( langEl != 0 && langEl->type == LangEl::NonTerm ) {
+ bool hasEpsilon = false;
+ for ( LelDefList::Iter def = langEl->defList; def.lte(); def++ ) {
+ result.insert( def->firstSet );
+
+ if ( def->firstSet.find( -1 ) )
+ hasEpsilon = true;
+ }
+
+ /* Find the equivalent state in the parser. */
+ if ( hasEpsilon ) {
+ PdaTrans *tabTrans = overTab->findTrans( pastTrans->key );
+ findFollow( result, tabTrans->toState,
+ pastTrans->value->toState, parentDef );
+ }
+
+ /* Now possibly the dup. */
+ if ( langEl->termDup != 0 )
+ result.insert( langEl->termDup->id );
+ }
+ else {
+ result.insert( pastTrans->key );
+ }
+ }
+}
+
+PdaState *Compiler::followProd( PdaState *tabState, PdaState *prodState )
+{
+ while ( prodState->transMap.length() == 1 ) {
+ TransMap::Iter prodTrans = prodState->transMap;
+ PdaTrans *tabTrans = tabState->findTrans( prodTrans->key );
+ prodState = prodTrans->value->toState;
+ tabState = tabTrans->toState;
+ }
+ return tabState;
+}
+
+void Compiler::trySetTime( PdaTrans *trans, long code, long &time )
+{
+ /* Find the item. */
+ for ( ActDataList::Iter adl = trans->actions; adl.lte(); adl++ ) {
+ if ( *adl == code ) {
+ /* If the time of the shift is not already set, set it. */
+ if ( trans->actOrds[adl.pos()] == 0 ) {
+ //cerr << "setting time: state = " << tabState->stateNum
+ // << ", trans = " << tabTrans->lowKey
+ // << ", time = " << time << endl;
+ trans->actOrds[adl.pos()] = time++;
+ }
+ break;
+ }
+ }
+}
+
+/* Go down a defintiion and then handle the follow actions. */
+void Compiler::pdaOrderFollow( LangEl *rootEl, PdaState *tabState,
+ PdaTrans *tabTrans, PdaTrans *srcTrans, Production *parentDef,
+ Production *definition, long &time )
+{
+ /* We need the follow from tabState/srcState over the defintion we are
+ * currently processing. */
+ PdaState *overTab = tabTrans->toState;
+ PdaState *overSrc = srcTrans->toState;
+
+ AlphSet alphSet;
+ if ( parentDef == rootEl->rootDef )
+ alphSet.insert( rootEl->eofLel->id );
+ else
+ findFollow( alphSet, overTab, overSrc, parentDef );
+
+ /* Now follow the production to find out where it expands to. */
+ PdaState *expandToState = followProd( tabState, definition->fsm->startState );
+
+ /* Find the reduce item. */
+ long redCode = makeReduceCode( definition->prodId, false );
+
+ for ( TransMap::Iter tt = expandToState->transMap; tt.lte(); tt++ ) {
+ if ( alphSet.find( tt->key ) ) {
+ trySetTime( tt->value, redCode, time );
+
+ /* If the items token region is not recorded in the state, do it now. */
+ addRegion( expandToState, tt->value, tt->key,
+ tt->value->noPreIgnore, tt->value->noPostIgnore );
+ }
+ }
+}
+
+bool regionVectHas( RegionVect &regVect, TokenRegion *region )
+{
+ for ( RegionVect::Iter trvi = regVect; trvi.lte(); trvi++ ) {
+ if ( *trvi == region )
+ return true;
+ }
+ return false;
+}
+
+void Compiler::addRegion( PdaState *tabState, PdaTrans *tabTrans,
+ long pdaKey, bool noPreIgnore, bool noPostIgnore )
+{
+ LangEl *langEl = langElIndex[pdaKey];
+ if ( langEl != 0 && langEl->type == LangEl::Term ) {
+ TokenRegion *region = 0;
+ RegionSet *regionSet = 0;
+
+ /* If it is not the eof, then use the region associated
+ * with the token definition. */
+ if ( langEl->isZero ) {
+ region = langEl->tokenDef->regionSet->collectIgnore;
+ regionSet = langEl->tokenDef->regionSet;
+ }
+ else if ( !langEl->isEOF && langEl->tokenDef != 0 ) {
+ region = langEl->tokenDef->regionSet->tokenIgnore;
+ regionSet = langEl->tokenDef->regionSet;
+ }
+
+ if ( region != 0 ) {
+ /* region. */
+ TokenRegion *scanRegion = region;
+
+ if ( langEl->noPreIgnore )
+ scanRegion = regionSet->tokenOnly;
+
+ if ( !regionVectHas( tabState->regions, scanRegion ) )
+ tabState->regions.append( scanRegion );
+
+ /* Pre-region of to state */
+ PdaState *toState = tabTrans->toState;
+ if ( !langEl->noPostIgnore &&
+ regionSet->ignoreOnly != 0 &&
+ !regionVectHas( toState->preRegions, regionSet->ignoreOnly ) )
+ {
+ toState->preRegions.append( regionSet->ignoreOnly );
+ }
+ }
+ }
+}
+
+#if 0
+ orderState( tabState, prodState, time ):
+ if not tabState.dotSet.find( prodState.dotID )
+ tabState.dotSet.insert( prodState.dotID )
+ tabTrans = tabState.findMatchingTransition( prodState.getTransition() )
+
+ if tabTrans is NonTerminal:
+ for production in tabTrans.nonTerm.prodList:
+ orderState( tabState, production.startState, time )
+
+ for all expandToState in tabTrans.expandToStates:
+ for all followTrans in expandToState.transList
+ reduceAction = findAction( production.reduction )
+ if reduceAction.time is unset:
+ reduceAction.time = time++
+ end
+ end
+ end
+ end
+ end
+
+ shiftAction = tabTrans.findAction( shift )
+ if shiftAction.time is unset:
+ shiftAction.time = time++
+ end
+
+ orderState( tabTrans.toState, prodTrans.toState, time )
+ end
+ end
+
+ orderState( parseTable.startState, startProduction.startState, 1 )
+#endif
+
+void Compiler::pdaOrderProd( LangEl *rootEl, PdaState *tabState,
+ PdaState *srcState, Production *parentDef, long &time )
+{
+ assert( srcState->dotSet.length() == 1 );
+ if ( tabState->dotSet2.find( srcState->dotSet[0] ) )
+ return;
+ tabState->dotSet2.insert( srcState->dotSet[0] );
+
+ assert( srcState->transMap.length() == 0 || srcState->transMap.length() == 1 );
+
+ if ( srcState->transMap.length() == 1 ) {
+ TransMap::Iter srcTrans = srcState->transMap;
+
+ /* Find the equivalent state in the parser. */
+ PdaTrans *tabTrans = tabState->findTrans( srcTrans->key );
+
+ /* Recurse into the transition if it is a non-terminal. */
+ LangEl *langEl = langElIndex[srcTrans->key];
+ if ( langEl != 0 ) {
+ if ( langEl->reduceFirst ) {
+ /* Use a shortest match ordering for the contents of this
+ * nonterminal. Does follows for all productions first, then
+ * goes down the productions. */
+ for ( LelDefList::Iter expDef = langEl->defList; expDef.lte(); expDef++ ) {
+ pdaOrderFollow( rootEl, tabState, tabTrans, srcTrans->value,
+ parentDef, expDef, time );
+ }
+ for ( LelDefList::Iter expDef = langEl->defList; expDef.lte(); expDef++ )
+ pdaOrderProd( rootEl, tabState, expDef->fsm->startState, expDef, time );
+
+ }
+ else {
+ /* The default action ordering. For each prod, goes down the
+ * prod then sets the follow before going to the next prod. */
+ for ( LelDefList::Iter expDef = langEl->defList; expDef.lte(); expDef++ ) {
+ pdaOrderProd( rootEl, tabState, expDef->fsm->startState, expDef, time );
+
+ pdaOrderFollow( rootEl, tabState, tabTrans, srcTrans->value,
+ parentDef, expDef, time );
+ }
+ }
+ }
+
+ trySetTime( tabTrans, SHIFT_CODE, time );
+
+ /* Now possibly for the dup. */
+ if ( langEl != 0 && langEl->termDup != 0 ) {
+ PdaTrans *dupTrans = tabState->findTrans( langEl->termDup->id );
+ trySetTime( dupTrans, SHIFT_CODE, time );
+ }
+
+ /* If the items token region is not recorded in the state, do it now. */
+ addRegion( tabState, tabTrans, srcTrans->key,
+ srcTrans->value->noPreIgnore, srcTrans->value->noPostIgnore );
+
+ /* Go over one in the production. */
+ pdaOrderProd( rootEl, tabTrans->toState,
+ srcTrans->value->toState, parentDef, time );
+ }
+}
+
+void Compiler::pdaActionOrder( PdaGraph *pdaGraph, LangElSet &parserEls )
+{
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ assert( (state->stateBits & SB_ISMARKED) == 0 );
+
+ /* Traverse the src state's transitions. */
+ long last = 0;
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ if ( ! trans.first() )
+ assert( last < trans->key );
+ last = trans->key;
+ }
+ }
+
+ /* Compute the action orderings, record the max value. */
+ long time = 1;
+ for ( LangElSet::Iter pe = parserEls; pe.lte(); pe++ ) {
+ PdaState *startState = (*pe)->rootDef->fsm->startState;
+ pdaOrderProd( *pe, (*pe)->startState, startState, (*pe)->rootDef, time );
+
+ /* Walk over the start lang el and set the time for shift of
+ * the eof action that completes the parse. */
+ PdaTrans *overStart = (*pe)->startState->findTrans( (*pe)->id );
+ PdaTrans *eofTrans = overStart->toState->findTrans( (*pe)->eofLel->id );
+ eofTrans->actOrds[0] = time++;
+ }
+
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ if ( state->regions.length() == 0 ) {
+ for ( TransMap::Iter tel = state->transMap; tel.lte(); tel++ ) {
+ /* There are no regions and EOF leaves the state. Add the eof
+ * token region. */
+ PdaTrans *trans = tel->value;
+ LangEl *lel = langElIndex[trans->lowKey];
+ if ( lel != 0 && lel->isEOF )
+ state->regions.append( EOF_REGION );
+ }
+ }
+ }
+
+ ///* Warn about states with empty token region lists. */
+ //for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ // if ( state->regions.length() == 0 ) {
+ // warning() << "state has an empty token region, state: " <<
+ // state->stateNum << endl;
+ // }
+ //}
+
+ /* Some actions may not have an ordering. I believe these to be actions
+ * that result in a parse error and they arise because the state tables
+ * are LALR(1) but the action ordering is LR(1). LALR(1) causes some
+ * reductions that lead nowhere. */
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ assert( CmpDotSet::compare( state->dotSet, state->dotSet2 ) == 0 );
+ for ( TransMap::Iter tel = state->transMap; tel.lte(); tel++ ) {
+ PdaTrans *trans = tel->value;
+ /* Check every action has an ordering. */
+ for ( ActDataList::Iter adl = trans->actOrds; adl.lte(); adl++ ) {
+ if ( *adl == 0 )
+ *adl = time++;
+ }
+ }
+ }
+}
+
+void Compiler::advanceReductions( PdaGraph *pdaGraph )
+{
+ /* Loop all states. */
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ if ( !state->advanceReductions )
+ continue;
+
+ bool outHasShift = false;
+ ReductionMap outReds;
+ LongSet outCommits;
+ for ( TransMap::Iter out = state->transMap; out.lte(); out++ ) {
+ /* Get the transition from the trans el. */
+ if ( out->value->isShift )
+ outHasShift = true;
+ outReds.insert( out->value->reductions );
+ outCommits.insert( out->value->commits );
+ }
+
+ bool inHasShift = false;
+ ReductionMap inReds;
+ for ( PdaTransInList::Iter in = state->inRange; in.lte(); in++ ) {
+ /* Get the transition from the trans el. */
+ if ( in->isShift )
+ inHasShift = true;
+ inReds.insert( in->reductions );
+ }
+
+ if ( !outHasShift && outReds.length() == 1 &&
+ inHasShift && inReds.length() == 0 )
+ {
+ //cerr << "moving reduction to shift" << endl;
+
+ /* Move the reduction to all in transitions. */
+ for ( PdaTransInList::Iter in = state->inRange; in.lte(); in++ ) {
+ assert( in->actions.length() == 1 );
+ assert( in->actions[0] == SHIFT_CODE );
+ in->actions[0] = makeReduceCode( outReds[0].key, true );
+ in->afterShiftCommits.insert( outCommits );
+ }
+
+ /*
+ * Remove all transitions out of the state.
+ */
+
+ /* Detach out range transitions. */
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ pdaGraph->detachTrans( state, trans->value->toState, trans->value );
+ delete trans->value;
+ }
+ state->transMap.empty();
+
+ /* Redirect all the in transitions to the actionDestState. */
+ pdaGraph->inTransMove( actionDestState, state );
+ }
+ }
+
+ pdaGraph->removeUnreachableStates();
+}
+
+void Compiler::sortActions( PdaGraph *pdaGraph )
+{
+ /* Sort the actions. */
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ assert( CmpDotSet::compare( state->dotSet, state->dotSet2 ) == 0 );
+ for ( TransMap::Iter tel = state->transMap; tel.lte(); tel++ ) {
+ PdaTrans *trans = tel->value;
+
+ /* Sort by the action ords. */
+ ActDataList actions( trans->actions );
+ ActDataList actOrds( trans->actOrds );
+ ActDataList actPriors( trans->actPriors );
+ trans->actions.empty();
+ trans->actOrds.empty();
+ trans->actPriors.empty();
+ while ( actOrds.length() > 0 ) {
+ int min = 0;
+ for ( int i = 1; i < actOrds.length(); i++ ) {
+ if ( actPriors[i] > actPriors[min] ||
+ (actPriors[i] == actPriors[min] &&
+ actOrds[i] < actOrds[min] ) )
+ {
+ min = i;
+ }
+ }
+ trans->actions.append( actions[min] );
+ trans->actOrds.append( actOrds[min] );
+ trans->actPriors.append( actPriors[min] );
+ actions.remove(min);
+ actOrds.remove(min);
+ actPriors.remove(min);
+ }
+
+ if ( branchPointInfo && trans->actions.length() > 1 ) {
+ cerr << "info: branch point"
+ << " state: " << state->stateNum
+ << " trans: ";
+ LangEl *lel = langElIndex[trans->lowKey];
+ if ( lel == 0 )
+ cerr << (char)trans->lowKey << endl;
+ else
+ cerr << lel->lit << endl;
+
+ for ( ActDataList::Iter act = trans->actions; act.lte(); act++ ) {
+ switch ( *act & 0x3 ) {
+ case 1:
+ cerr << " shift" << endl;
+ break;
+ case 2:
+ cerr << " reduce " <<
+ prodIdIndex[(*act >> 2)]->data << endl;
+ break;
+ case 3:
+ cerr << " shift-reduce" << endl;
+ break;
+ }
+ }
+ }
+
+ /* Verify that shifts of nonterminals don't have any branch
+ * points or commits. */
+ if ( trans->lowKey >= firstNonTermId ) {
+ if ( trans->actions.length() != 1 ||
+ (trans->actions[0] & 0x3) != 1 )
+ {
+ error() << "TRANS ON NONTERMINAL is something "
+ "other than a shift" << endl;
+ }
+ if ( trans->commits.length() > 0 )
+ error() << "TRANS ON NONTERMINAL has a commit" << endl;
+ }
+
+ /* TODO: Shift-reduces are optimizations. Verify that
+ * shift-reduces exist only if they don't entail a conflict. */
+ }
+ }
+}
+
+void Compiler::reduceActions( PdaGraph *pdaGraph )
+{
+ /* Reduce the actions. */
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ for ( TransMap::Iter tel = state->transMap; tel.lte(); tel++ ) {
+ PdaTrans *trans = tel->value;
+ PdaActionSetEl *inSet;
+
+ int commitLen = trans->commits.length() > 0 ?
+ trans->commits[trans->commits.length()-1] : 0;
+
+ if ( trans->afterShiftCommits.length() > 0 ) {
+ int afterShiftCommit = trans->afterShiftCommits[
+ trans->afterShiftCommits.length()-1];
+
+ if ( commitLen > 0 && commitLen+1 > afterShiftCommit )
+ commitLen = ( commitLen + 1 );
+ else
+ commitLen = afterShiftCommit;
+ }
+ else {
+ commitLen = commitLen * -1;
+ }
+
+ //if ( commitLen != 0 ) {
+ // cerr << "FINAL ACTION COMMIT LEN: " << commitLen << endl;
+ //}
+
+ pdaGraph->actionSet.insert( ActionData( trans->toState->stateNum,
+ trans->actions, commitLen ), &inSet );
+ trans->actionSetEl = inSet;
+ }
+ }
+}
+
+void Compiler::computeAdvanceReductions( LangEl *langEl, PdaGraph *pdaGraph )
+{
+ /* Get the entry into the graph and traverse over the root. The resulting
+ * state can have eof, nothing else can. */
+ PdaState *overStart = pdaGraph->followFsm(
+ langEl->startState,
+ langEl->rootDef->fsm );
+
+ /* The graph must reduce to root all on it's own. It cannot depend on
+ * require EOF. */
+ for ( PdaStateList::Iter st = pdaGraph->stateList; st.lte(); st++ ) {
+ if ( st == overStart )
+ continue;
+
+ for ( TransMap::Iter tr = st->transMap; tr.lte(); tr++ ) {
+ if ( tr->value->lowKey == langEl->eofLel->id )
+ st->advanceReductions = true;
+ }
+ }
+}
+
+void Compiler::verifyParseStopGrammar( LangEl *langEl, PdaGraph *pdaGraph )
+{
+ /* Get the entry into the graph and traverse over the root. The resulting
+ * state can have eof, nothing else can. */
+ PdaState *overStart = pdaGraph->followFsm(
+ langEl->startState,
+ langEl->rootDef->fsm );
+
+ /* The graph must reduce to root all on it's own. It cannot depend on
+ * require EOF. */
+ for ( PdaStateList::Iter st = pdaGraph->stateList; st.lte(); st++ ) {
+ if ( st == overStart )
+ continue;
+
+ for ( TransMap::Iter tr = st->transMap; tr.lte(); tr++ ) {
+ if ( tr->value->lowKey == langEl->eofLel->id ) {
+ /* This needs a better error message. Appears to be voodoo. */
+ error() << "grammar is not usable with parse_stop" << endp;
+ }
+ }
+ }
+}
+
+LangEl *Compiler::predOf( PdaTrans *trans, long action )
+{
+ LangEl *lel;
+ if ( action == SHIFT_CODE )
+ lel = langElIndex[trans->lowKey];
+ else
+ lel = prodIdIndex[action >> 2]->predOf;
+ return lel;
+}
+
+
+bool Compiler::precedenceSwap( long action1, long action2, LangEl *l1, LangEl *l2 )
+{
+ bool swap = false;
+ if ( l2->predValue > l1->predValue )
+ swap = true;
+ else if ( l1->predValue == l2->predValue ) {
+ if ( l1->predType == PredLeft && action1 == SHIFT_CODE )
+ swap = true;
+ else if ( l1->predType == PredRight && action2 == SHIFT_CODE )
+ swap = true;
+ }
+ return swap;
+}
+
+bool Compiler::precedenceRemoveBoth( LangEl *l1, LangEl *l2 )
+{
+ if ( l1->predValue == l2->predValue && l1->predType == PredNonassoc )
+ return true;
+ return false;
+}
+
+void Compiler::resolvePrecedence( PdaGraph *pdaGraph )
+{
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ assert( CmpDotSet::compare( state->dotSet, state->dotSet2 ) == 0 );
+
+ for ( long t = 0; t < state->transMap.length(); /* increment at end */ ) {
+ PdaTrans *trans = state->transMap[t].value;
+
+again:
+ /* Find action with precedence. */
+ for ( int i = 0; i < trans->actions.length(); i++ ) {
+ LangEl *li = predOf( trans, trans->actions[i] );
+
+ if ( li != 0 && li->predType != PredNone ) {
+ /* Find another action with precedence. */
+ for ( int j = i+1; j < trans->actions.length(); j++ ) {
+ LangEl *lj = predOf( trans, trans->actions[j] );
+
+ if ( lj != 0 && lj->predType != PredNone ) {
+ /* Conflict to check. */
+ bool swap = precedenceSwap( trans->actions[i],
+ trans->actions[j], li, lj );
+
+ if ( swap ) {
+ long t = trans->actions[i];
+ trans->actions[i] = trans->actions[j];
+ trans->actions[j] = t;
+ }
+
+ trans->actions.remove( j );
+ if ( precedenceRemoveBoth( li, lj ) )
+ trans->actions.remove( i );
+
+ goto again;
+ }
+ }
+ }
+ }
+
+ /* If there are still actions then move to the next one. If not,
+ * (due to nonassoc) then remove the transition. */
+ if ( trans->actions.length() > 0 )
+ t += 1;
+ else
+ state->transMap.vremove( t );
+ }
+ }
+}
+
+void Compiler::analyzeMachine( PdaGraph *pdaGraph, LangElSet &parserEls )
+{
+ pdaGraph->maxState = pdaGraph->stateList.length() - 1;
+ pdaGraph->maxLelId = nextSymbolId - 1;
+ pdaGraph->maxOffset = pdaGraph->stateList.length() * pdaGraph->maxLelId;
+
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ if ( trans->value->isShift ) {
+ trans->value->actions.append( SHIFT_CODE );
+ trans->value->actPriors.append( trans->value->shiftPrior );
+ }
+ for ( ReductionMap::Iter red = trans->value->reductions; red.lte(); red++ ) {
+ trans->value->actions.append( makeReduceCode( red->key, false ) );
+ trans->value->actPriors.append( red->value );
+ }
+ trans->value->actOrds.appendDup( 0, trans->value->actions.length() );
+ }
+ }
+
+ pdaActionOrder( pdaGraph, parserEls );
+ sortActions( pdaGraph );
+ resolvePrecedence( pdaGraph );
+
+ /* Verify that any type we parse_stop can actually be parsed that way. */
+ for ( LangElSet::Iter pe = parserEls; pe.lte(); pe++ ) {
+ LangEl *lel = *pe;
+ if ( lel->parseStop )
+ computeAdvanceReductions(lel , pdaGraph);
+ }
+
+ advanceReductions( pdaGraph );
+ pdaGraph->setStateNumbers();
+ reduceActions( pdaGraph );
+
+ /* Set the action ids. */
+ int actionSetId = 0;
+ for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ )
+ asi->key.id = actionSetId++;
+
+ /* Get the max index. */
+ pdaGraph->maxIndex = actionSetId - 1;
+
+ /* Compute the max prod length. */
+ pdaGraph->maxProdLen = 0;
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ if ( (unsigned)prod->fsmLength > pdaGraph->maxProdLen )
+ pdaGraph->maxProdLen = prod->fsmLength;
+ }
+
+ /* Asserts that any transition with a nonterminal has a single action
+ * which is either a shift or a shift-reduce. */
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ LangEl *langEl = langElIndex[trans->value->lowKey];
+ if ( langEl != 0 && langEl->type == LangEl::NonTerm ) {
+ assert( trans->value->actions.length() == 1 );
+ assert( trans->value->actions[0] == SHIFT_CODE ||
+ (trans->value->actions[0] & 0x3) == SHIFT_REDUCE_CODE );
+ }
+ }
+ }
+
+ /* Assert that shift reduces always appear on their own. */
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ for ( ActDataList::Iter act = trans->value->actions; act.lte(); act++ ) {
+ if ( (*act & 0x3) == SHIFT_REDUCE_CODE )
+ assert( trans->value->actions.length() == 1 );
+ }
+ }
+ }
+
+ /* Verify that any type we parse_stop can actually be parsed that way. */
+ for ( LangElSet::Iter pe = parserEls; pe.lte(); pe++ ) {
+ LangEl *lel = *pe;
+ if ( lel->parseStop )
+ verifyParseStopGrammar(lel , pdaGraph);
+ }
+}
+
+void Compiler::wrapNonTerminals()
+{
+ /* Make a language element that will be used to make the root productions.
+ * These are used for making parsers rooted at any production (including
+ * the start symbol). */
+ rootLangEl = declareLangEl( this, rootNamespace, "_root", LangEl::NonTerm );
+
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ /* Make a single production used when the lel is a root. */
+ ProdElList *prodElList = makeProdElList( lel );
+ lel->rootDef = Production::cons( InputLoc(), rootLangEl,
+ prodElList, String(), false, 0,
+ prodList.length(), rootLangEl->defList.length() );
+ prodList.append( lel->rootDef );
+ rootLangEl->defList.append( lel->rootDef );
+
+ /* First resolve. */
+ for ( ProdElList::Iter prodEl = *prodElList; prodEl.lte(); prodEl++ )
+ resolveProdEl( prodEl );
+ }
+}
+
+bool Compiler::makeNonTermFirstSetProd( Production *prod, PdaState *state )
+{
+ bool modified = false;
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ if ( trans->key >= firstNonTermId ) {
+ long *inserted = prod->nonTermFirstSet.insert( trans->key );
+ if ( inserted != 0 )
+ modified = true;
+
+ bool hasEpsilon = false;
+ LangEl *lel = langElIndex[trans->key];
+ for ( LelDefList::Iter ldef = lel->defList; ldef.lte(); ldef++ ) {
+ for ( ProdIdSet::Iter pid = ldef->nonTermFirstSet;
+ pid.lte(); pid++ )
+ {
+ if ( *pid == -1 )
+ hasEpsilon = true;
+ else {
+ long *inserted = prod->nonTermFirstSet.insert( *pid );
+ if ( inserted != 0 )
+ modified = true;
+ }
+ }
+ }
+
+ if ( hasEpsilon ) {
+ if ( trans->value->toState->isFinState() ) {
+ long *inserted = prod->nonTermFirstSet.insert( -1 );
+ if ( inserted != 0 )
+ modified = true;
+ }
+
+ bool lmod = makeNonTermFirstSetProd( prod, trans->value->toState );
+ if ( lmod )
+ modified = true;
+ }
+ }
+ }
+ return modified;
+}
+
+
+void Compiler::makeNonTermFirstSets()
+{
+ bool modified = true;
+ while ( modified ) {
+ modified = false;
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ if ( prod->fsm->startState->isFinState() ) {
+ long *inserted = prod->nonTermFirstSet.insert( -1 );
+ if ( inserted != 0 )
+ modified = true;
+ }
+
+ bool lmod = makeNonTermFirstSetProd( prod, prod->fsm->startState );
+ if ( lmod )
+ modified = true;
+ }
+ }
+
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ if ( prod->nonTermFirstSet.find( prod->prodName->id ) )
+ prod->isLeftRec = true;
+ }
+}
+
+void Compiler::printNonTermFirstSets()
+{
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ cerr << prod->data << ": ";
+ for ( ProdIdSet::Iter pid = prod->nonTermFirstSet; pid.lte(); pid++ )
+ {
+ if ( *pid < 0 )
+ cerr << " <EPSILON>";
+ else {
+ LangEl *lel = langElIndex[*pid];
+ cerr << " " << lel->name;
+ }
+ }
+ cerr << endl;
+
+ if ( prod->isLeftRec )
+ cerr << "PROD IS LEFT REC: " << prod->data << endl;
+ }
+}
+
+bool Compiler::makeFirstSetProd( Production *prod, PdaState *state )
+{
+ bool modified = false;
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ if ( trans->key < firstNonTermId ) {
+ long *inserted = prod->firstSet.insert( trans->key );
+ if ( inserted != 0 )
+ modified = true;
+ }
+ else {
+ long *inserted = prod->firstSet.insert( trans->key );
+ if ( inserted != 0 )
+ modified = true;
+
+ LangEl *klangEl = langElIndex[trans->key];
+ if ( klangEl != 0 && klangEl->termDup != 0 ) {
+ long *inserted2 = prod->firstSet.insert( klangEl->termDup->id );
+ if ( inserted2 != 0 )
+ modified = true;
+ }
+
+ bool hasEpsilon = false;
+ LangEl *lel = langElIndex[trans->key];
+ for ( LelDefList::Iter ldef = lel->defList; ldef.lte(); ldef++ ) {
+ for ( ProdIdSet::Iter pid = ldef->firstSet;
+ pid.lte(); pid++ )
+ {
+ if ( *pid == -1 )
+ hasEpsilon = true;
+ else {
+ long *inserted = prod->firstSet.insert( *pid );
+ if ( inserted != 0 )
+ modified = true;
+ }
+ }
+ }
+
+ if ( hasEpsilon ) {
+ if ( trans->value->toState->isFinState() ) {
+ long *inserted = prod->firstSet.insert( -1 );
+ if ( inserted != 0 )
+ modified = true;
+ }
+
+ bool lmod = makeFirstSetProd( prod, trans->value->toState );
+ if ( lmod )
+ modified = true;
+ }
+ }
+ }
+ return modified;
+}
+
+
+void Compiler::makeFirstSets()
+{
+ bool modified = true;
+ while ( modified ) {
+ modified = false;
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ if ( prod->fsm->startState->isFinState() ) {
+ long *inserted = prod->firstSet.insert( -1 );
+ if ( inserted != 0 )
+ modified = true;
+ }
+
+ bool lmod = makeFirstSetProd( prod, prod->fsm->startState );
+ if ( lmod )
+ modified = true;
+ }
+ }
+}
+
+void Compiler::printFirstSets()
+{
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ cerr << prod->data << ": ";
+ for ( ProdIdSet::Iter pid = prod->firstSet; pid.lte(); pid++ )
+ {
+ if ( *pid < 0 )
+ cerr << " <EPSILON>";
+ else {
+ LangEl *lel = langElIndex[*pid];
+ if ( lel != 0 )
+ cerr << endl << " " << lel->name;
+ else
+ cerr << endl << " " << *pid;
+ }
+ }
+ cerr << endl;
+ }
+}
+
+void Compiler::insertUniqueEmptyProductions()
+{
+ int limit = prodList.length();
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ if ( prod->prodId == limit )
+ break;
+
+ /* Get a language element. */
+ char name[20];
+ sprintf(name, "U%li", prodList.length());
+ LangEl *prodName = addLangEl( this, rootNamespace, name, LangEl::NonTerm );
+ Production *newDef = Production::cons( InputLoc(), prodName,
+ 0, String(), false, 0, prodList.length(), prodName->defList.length() );
+ prodName->defList.append( newDef );
+ prodList.append( newDef );
+
+ prod->uniqueEmptyLeader = prodName;
+ }
+}
+
+LocalInfo *Compiler::makeLocalInfo( Locals &locals )
+{
+ LocalInfo *localInfo = new LocalInfo[locals.locals.length()];
+ memset( localInfo, 0, sizeof(LocalInfo) * locals.locals.length() );
+
+ for ( Vector<LocalLoc>::Iter l = locals.locals; l.lte(); l++ ) {
+ localInfo[l.pos()].type = (int) l->type;
+ localInfo[l.pos()].offset = l->offset;
+ }
+ return localInfo;
+}
+
+void Compiler::makeRuntimeData()
+{
+ long count = 0;
+
+ /*
+ * ProdLengths
+ * ProdLhsIs
+ * ProdNames
+ * ProdCodeBlocks
+ * ProdCodeBlockLens
+ */
+
+ runtimeData->frameInfo = new FrameInfo[nextFrameId];
+ runtimeData->numFrames = nextFrameId;
+ memset( runtimeData->frameInfo, 0, sizeof(FrameInfo) * nextFrameId );
+
+ /*
+ * Init code block.
+ */
+ if ( rootCodeBlock == 0 ) {
+ runtimeData->rootCode = 0;
+ runtimeData->rootCodeLen = 0;
+ runtimeData->rootFrameId = 0;
+ }
+ else {
+ runtimeData->rootCode = rootCodeBlock->codeWC.data;
+ runtimeData->rootCodeLen = rootCodeBlock->codeWC.length();
+ runtimeData->rootFrameId = rootCodeBlock->frameId;
+ }
+
+ runtimeData->frameInfo[rootCodeBlock->frameId].codeWV = 0;
+ runtimeData->frameInfo[rootCodeBlock->frameId].codeLenWV = 0;
+
+ runtimeData->frameInfo[rootCodeBlock->frameId].locals = makeLocalInfo( rootCodeBlock->locals );
+ runtimeData->frameInfo[rootCodeBlock->frameId].localsLen = rootCodeBlock->locals.locals.length();
+
+ runtimeData->frameInfo[rootCodeBlock->frameId].frameSize = rootLocalFrame->size();
+ runtimeData->frameInfo[rootCodeBlock->frameId].argSize = 0;
+
+ /*
+ * prodInfo
+ */
+ count = prodList.length();
+ runtimeData->prodInfo = new ProdInfo[count];
+ runtimeData->numProds = count;
+
+ count = 0;
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ runtimeData->prodInfo[count].lhsId = prod->prodName->id;
+ runtimeData->prodInfo[count].prodNum = prod->prodNum;
+ runtimeData->prodInfo[count].length = prod->fsmLength;
+ runtimeData->prodInfo[count].name = prod->data;
+ runtimeData->prodInfo[count].frameId = -1;
+
+ CodeBlock *block = prod->redBlock;
+ if ( block != 0 ) {
+ runtimeData->prodInfo[count].frameId = block->frameId;
+ runtimeData->frameInfo[block->frameId].codeWV = block->codeWV.data;
+ runtimeData->frameInfo[block->frameId].codeLenWV = block->codeWV.length();
+
+ runtimeData->frameInfo[block->frameId].locals = makeLocalInfo( block->locals );
+ runtimeData->frameInfo[block->frameId].localsLen = block->locals.locals.length();
+
+ runtimeData->frameInfo[block->frameId].frameSize = block->localFrame->size();
+ runtimeData->frameInfo[block->frameId].argSize = 0;
+ }
+
+ runtimeData->prodInfo[count].lhsUpref = true;
+ runtimeData->prodInfo[count].copy = prod->copy.data;
+ runtimeData->prodInfo[count].copyLen = prod->copy.length() / 2;
+ count += 1;
+ }
+
+ /*
+ * regionInfo
+ */
+ runtimeData->numRegions = regionList.length()+1;
+ runtimeData->regionInfo = new RegionInfo[runtimeData->numRegions];
+ memset( runtimeData->regionInfo, 0, sizeof(RegionInfo) * runtimeData->numRegions );
+
+ runtimeData->regionInfo[0].defaultToken = -1;
+ runtimeData->regionInfo[0].eofFrameId = -1;
+ runtimeData->regionInfo[0].ciLelId = 0;
+
+ for ( RegionList::Iter reg = regionList; reg.lte(); reg++ ) {
+ long regId = reg->id+1;
+ runtimeData->regionInfo[regId].defaultToken =
+ reg->impl->defaultTokenInstance == 0 ?
+ -1 :
+ reg->impl->defaultTokenInstance->tokenDef->tdLangEl->id;
+ runtimeData->regionInfo[regId].eofFrameId = -1;
+ runtimeData->regionInfo[regId].ciLelId = reg->zeroLel != 0 ? reg->zeroLel->id : 0;
+
+ CodeBlock *block = reg->preEofBlock;
+ if ( block != 0 ) {
+ runtimeData->regionInfo[regId].eofFrameId = block->frameId;
+ runtimeData->frameInfo[block->frameId].codeWV = block->codeWV.data;
+ runtimeData->frameInfo[block->frameId].codeLenWV = block->codeWV.length();
+
+ runtimeData->frameInfo[block->frameId].locals = makeLocalInfo( block->locals );
+ runtimeData->frameInfo[block->frameId].localsLen = block->locals.locals.length();
+
+ runtimeData->frameInfo[block->frameId].frameSize = block->localFrame->size();
+ runtimeData->frameInfo[block->frameId].argSize = 0;
+ }
+ }
+
+ /*
+ * lelInfo
+ */
+
+ count = nextSymbolId;
+ runtimeData->lelInfo = new LangElInfo[count];
+ runtimeData->numLangEls = count;
+ memset( runtimeData->lelInfo, 0, sizeof(LangElInfo)*count );
+
+ for ( int i = 0; i < nextSymbolId; i++ ) {
+ LangEl *lel = langElIndex[i];
+ if ( lel != 0 ) {
+ runtimeData->lelInfo[i].name = lel->fullLit;
+ runtimeData->lelInfo[i].xmlTag = lel->xmlTag;
+ runtimeData->lelInfo[i].repeat = lel->isRepeat;
+ runtimeData->lelInfo[i].list = lel->isList;
+ runtimeData->lelInfo[i].literal = lel->isLiteral;
+ runtimeData->lelInfo[i].ignore = lel->isIgnore;
+ runtimeData->lelInfo[i].frameId = -1;
+
+ CodeBlock *block = lel->transBlock;
+ if ( block != 0 ) {
+ runtimeData->lelInfo[i].frameId = block->frameId;
+ runtimeData->frameInfo[block->frameId].codeWV = block->codeWV.data;
+ runtimeData->frameInfo[block->frameId].codeLenWV = block->codeWV.length();
+
+ runtimeData->frameInfo[block->frameId].locals = makeLocalInfo( block->locals );
+ runtimeData->frameInfo[block->frameId].localsLen = block->locals.locals.length();
+
+ runtimeData->frameInfo[block->frameId].frameSize = block->localFrame->size();
+ runtimeData->frameInfo[block->frameId].argSize = 0;
+ }
+
+ runtimeData->lelInfo[i].objectTypeId =
+ lel->objectDef == 0 ? 0 : lel->objectDef->id;
+ runtimeData->lelInfo[i].ofiOffset = lel->ofiOffset;
+ runtimeData->lelInfo[i].objectLength =
+ lel->objectDef != 0 ? lel->objectDef->size() : 0;
+
+// runtimeData->lelInfo[i].contextTypeId = 0;
+// lel->context == 0 ? 0 : lel->context->contextObjDef->id;
+// runtimeData->lelInfo[i].contextLength = 0; //lel->context == 0 ? 0 :
+// lel->context->contextObjDef->size();
+// if ( lel->context != 0 ) {
+// cout << "type: " << runtimeData->lelInfo[i].contextTypeId << " length: " <<
+// runtimeData->lelInfo[i].contextLength << endl;
+// }
+
+ runtimeData->lelInfo[i].termDupId = lel->termDup == 0 ? 0 : lel->termDup->id;
+ runtimeData->lelInfo[i].genericId = lel->generic == 0 ? 0 : lel->generic->id;
+
+ if ( lel->tokenDef != 0 && lel->tokenDef->join != 0 &&
+ lel->tokenDef->join->context != 0 )
+ runtimeData->lelInfo[i].markId = lel->tokenDef->join->mark->markId;
+ else
+ runtimeData->lelInfo[i].markId = -1;
+
+ runtimeData->lelInfo[i].numCaptureAttr = 0;
+ }
+ else {
+ memset(&runtimeData->lelInfo[i], 0, sizeof(LangElInfo) );
+ runtimeData->lelInfo[i].name = "__UNUSED";
+ runtimeData->lelInfo[i].xmlTag = "__UNUSED";
+ runtimeData->lelInfo[i].frameId = -1;
+ }
+ }
+
+ /*
+ * FunctionInfo
+ */
+ count = functionList.length();
+
+ runtimeData->functionInfo = new FunctionInfo[count];
+ runtimeData->numFunctions = count;
+ memset( runtimeData->functionInfo, 0, sizeof(FunctionInfo)*count );
+ for ( FunctionList::Iter func = functionList; func.lte(); func++ ) {
+ runtimeData->functionInfo[func->funcId].name = func->name;
+ runtimeData->functionInfo[func->funcId].frameId = -1;
+
+ CodeBlock *block = func->codeBlock;
+ if ( block != 0 ) {
+ runtimeData->functionInfo[func->funcId].frameId = block->frameId;
+
+ runtimeData->frameInfo[block->frameId].codeWV = block->codeWV.data;
+ runtimeData->frameInfo[block->frameId].codeLenWV = block->codeWV.length();
+
+ runtimeData->frameInfo[block->frameId].codeWC = block->codeWC.data;
+ runtimeData->frameInfo[block->frameId].codeLenWC = block->codeWC.length();
+
+ runtimeData->frameInfo[block->frameId].locals = makeLocalInfo( block->locals );
+ runtimeData->frameInfo[block->frameId].localsLen = block->locals.locals.length();
+
+ runtimeData->frameInfo[block->frameId].frameSize = func->localFrame->size();
+ runtimeData->frameInfo[block->frameId].argSize = func->paramListSize;
+ }
+
+ runtimeData->functionInfo[func->funcId].frameSize = func->localFrame->size();
+ runtimeData->functionInfo[func->funcId].argSize = func->paramListSize;
+ }
+
+ /*
+ * PatConsInfo
+ */
+
+ /* Filled in later after patterns are parsed. */
+ runtimeData->patReplInfo = new PatConsInfo[nextPatConsId];
+ memset( runtimeData->patReplInfo, 0, sizeof(PatConsInfo) * nextPatConsId );
+ runtimeData->numPatterns = nextPatConsId;
+ runtimeData->patReplNodes = 0;
+ runtimeData->numPatternNodes = 0;
+
+
+ /*
+ * GenericInfo
+ */
+ count = 1;
+ for ( NamespaceList::Iter nspace = namespaceList; nspace.lte(); nspace++ )
+ count += nspace->genericList.length();
+ assert( count == nextGenericId );
+
+ runtimeData->genericInfo = new GenericInfo[count];
+ runtimeData->numGenerics = count;
+ memset( &runtimeData->genericInfo[0], 0, sizeof(GenericInfo) );
+ for ( NamespaceList::Iter nspace = namespaceList; nspace.lte(); nspace++ ) {
+ for ( GenericList::Iter gen = nspace->genericList; gen.lte(); gen++ ) {
+ runtimeData->genericInfo[gen->id].type = gen->typeId;
+ runtimeData->genericInfo[gen->id].typeArg = gen->utArg->typeId;
+ runtimeData->genericInfo[gen->id].keyType = gen->keyUT != 0 ?
+ gen->keyUT->typeId : 0;
+ runtimeData->genericInfo[gen->id].keyOffset = 0;
+ runtimeData->genericInfo[gen->id].langElId = gen->langEl->id;
+ runtimeData->genericInfo[gen->id].parserId = gen->utArg->langEl->parserId;
+ }
+ }
+
+ runtimeData->argvGenericId = argvTypeRef->generic->id;
+
+ /*
+ * Literals
+ */
+ runtimeData->numLiterals = literalStrings.length();
+ runtimeData->litdata = new const char *[literalStrings.length()];
+ runtimeData->litlen = new long [literalStrings.length()];
+ runtimeData->literals = 0;
+ for ( StringMap::Iter el = literalStrings; el.lte(); el++ ) {
+ /* Data. */
+ char *data = new char[el->key.length()+1];
+ memcpy( data, el->key.data, el->key.length() );
+ data[el->key.length()] = 0;
+ runtimeData->litdata[el->value] = data;
+
+ /* Length. */
+ runtimeData->litlen[el->value] = el->key.length();
+ }
+
+ /* Captured attributes. Loop over tokens and count first. */
+ long numCapturedAttr = 0;
+// for ( RegionList::Iter reg = regionList; reg.lte(); reg++ ) {
+// for ( TokenInstanceListReg::Iter td = reg->tokenInstanceList; td.lte(); td++ )
+// numCapturedAttr += td->reCaptureVect.length();
+// }
+ runtimeData->captureAttr = new CaptureAttr[numCapturedAttr];
+ runtimeData->numCapturedAttr = numCapturedAttr;
+ memset( runtimeData->captureAttr, 0, sizeof( CaptureAttr ) * numCapturedAttr );
+
+ count = 0;
+// for ( RegionList::Iter reg = regionList; reg.lte(); reg++ ) {
+// for ( TokenInstanceListReg::Iter td = reg->tokenInstanceList; td.lte(); td++ ) {
+// runtimeData->lelInfo[td->token->id].captureAttr = count;
+// runtimeData->lelInfo[td->token->id].numCaptureAttr = td->reCaptureVect.length();
+// for ( ReCaptureVect::Iter c = td->reCaptureVect; c.lte(); c++ ) {
+// runtimeData->captureAttr[count].mark_enter = c->markEnter->markId;
+// runtimeData->captureAttr[count].mark_leave = c->markLeave->markId;
+// runtimeData->captureAttr[count].offset = c->objField->offset;
+//
+// count += 1;
+// }
+// }
+// }
+
+ runtimeData->fsmTables = fsmTables;
+ runtimeData->pdaTables = pdaTables;
+
+ /* FIXME: need a parser descriptor. */
+ runtimeData->startStates = new int[nextParserId];
+ runtimeData->eofLelIds = new int[nextParserId];
+ runtimeData->parserLelIds = new int[nextParserId];
+ runtimeData->numParsers = nextParserId;
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->parserId >= 0 ) {
+ runtimeData->startStates[lel->parserId] = lel->startState->stateNum;
+ runtimeData->eofLelIds[lel->parserId] = lel->eofLel->id;
+ runtimeData->parserLelIds[lel->parserId] = lel->id;
+ }
+ }
+
+ runtimeData->globalSize = globalObjectDef->size();
+
+ /*
+ * firstNonTermId
+ */
+ runtimeData->firstNonTermId = firstNonTermId;
+
+ /* Special trees. */
+ runtimeData->integerId = intLangEl->id;
+ runtimeData->stringId = strLangEl->id;
+ runtimeData->anyId = anyLangEl->id;
+ runtimeData->eofId = 0; //eofLangEl->id;
+ runtimeData->noTokenId = noTokenLangEl->id;
+
+ runtimeData->fsmExecute = &internalFsmExecute;
+ runtimeData->sendNamedLangEl = &internalSendNamedLangEl;
+ runtimeData->initBindings = &internalInitBindings;
+ runtimeData->popBinding = &internalPopBinding;
+}
+
+/* Borrow alg->state for mapsTo. */
+void countNodes( Program *prg, int &count, ParseTree *parseTree, Kid *kid )
+{
+ if ( kid != 0 ) {
+ count += 1;
+
+ /* Should't have to recurse here. */
+ Tree *ignoreList = treeLeftIgnore( prg, kid->tree );
+ if ( ignoreList != 0 ) {
+ Kid *ignore = ignoreList->child;
+ while ( ignore != 0 ) {
+ count += 1;
+ ignore = ignore->next;
+ }
+ }
+
+ ignoreList = treeRightIgnore( prg, kid->tree );
+ if ( ignoreList != 0 ) {
+ Kid *ignore = ignoreList->child;
+ while ( ignore != 0 ) {
+ count += 1;
+ ignore = ignore->next;
+ }
+ }
+
+ //count += prg->rtd->lelInfo[kid->tree->id].numCaptureAttr;
+
+ if ( !( parseTree->flags & PF_NAMED ) &&
+ !( parseTree->flags & PF_ARTIFICIAL ) &&
+ treeChild( prg, kid->tree ) != 0 )
+ {
+ countNodes( prg, count, parseTree->child, treeChild( prg, kid->tree ) );
+ }
+ countNodes( prg, count, parseTree->next, kid->next );
+ }
+}
+
+void fillNodes( Program *prg, int &nextAvail, Bindings *bindings, long &bindId,
+ PatConsNode *nodes, ParseTree *parseTree, Kid *kid, int ind )
+{
+ if ( kid != 0 ) {
+ PatConsNode &node = nodes[ind];
+
+ Kid *child =
+ !( parseTree->flags & PF_NAMED ) &&
+ !( parseTree->flags & PF_ARTIFICIAL ) &&
+ treeChild( prg, kid->tree ) != 0
+ ?
+ treeChild( prg, kid->tree ) : 0;
+
+ ParseTree *ptChild =
+ !( parseTree->flags & PF_NAMED ) &&
+ !( parseTree->flags & PF_ARTIFICIAL ) &&
+ treeChild( prg, kid->tree ) != 0
+ ?
+ parseTree->child : 0;
+
+ /* Set up the fields. */
+ node.id = kid->tree->id;
+ node.prodNum = kid->tree->prodNum;
+ node.length = stringLength( kid->tree->tokdata );
+ node.data = stringData( kid->tree->tokdata );
+
+ /* Ignore items. */
+ Tree *ignoreList = treeLeftIgnore( prg, kid->tree );
+ Kid *ignore = ignoreList == 0 ? 0 : ignoreList->child;
+ node.leftIgnore = ignore == 0 ? -1 : nextAvail;
+
+ while ( ignore != 0 ) {
+ PatConsNode &node = nodes[nextAvail++];
+
+ memset( &node, 0, sizeof(PatConsNode) );
+ node.id = ignore->tree->id;
+ node.prodNum = ignore->tree->prodNum;
+ node.next = ignore->next == 0 ? -1 : nextAvail;
+
+ node.length = stringLength( ignore->tree->tokdata );
+ node.data = stringData( ignore->tree->tokdata );
+
+ ignore = ignore->next;
+ }
+
+ /* Ignore items. */
+ ignoreList = treeRightIgnore( prg, kid->tree );
+ ignore = ignoreList == 0 ? 0 : ignoreList->child;
+ node.rightIgnore = ignore == 0 ? -1 : nextAvail;
+
+ while ( ignore != 0 ) {
+ PatConsNode &node = nodes[nextAvail++];
+
+ memset( &node, 0, sizeof(PatConsNode) );
+ node.id = ignore->tree->id;
+ node.prodNum = ignore->tree->prodNum;
+ node.next = ignore->next == 0 ? -1 : nextAvail;
+
+ node.length = stringLength( ignore->tree->tokdata );
+ node.data = stringData( ignore->tree->tokdata );
+
+ ignore = ignore->next;
+ }
+
+ ///* The captured attributes. */
+ //for ( int i = 0; i < prg->rtd->lelInfo[kid->tree->id].numCaptureAttr; i++ ) {
+ // CaptureAttr *cap = prg->rtd->captureAttr +
+ // prg->rtd->lelInfo[kid->tree->id].captureAttr + i;
+ //
+ // Tree *attr = colm_get_attr( kid->tree, cap->offset );
+ //
+ // PatConsNode &node = nodes[nextAvail++];
+ // memset( &node, 0, sizeof(PatConsNode) );
+ //
+ // node.id = attr->id;
+ // node.prodNum = attr->prodNum;
+ // node.length = stringLength( attr->tokdata );
+ // node.data = stringData( attr->tokdata );
+ //}
+
+ node.stop = parseTree->flags & PF_TERM_DUP;
+
+ node.child = child == 0 ? -1 : nextAvail++;
+
+ /* Recurse. */
+ fillNodes( prg, nextAvail, bindings, bindId, nodes, ptChild, child, node.child );
+
+ /* Since the parser is bottom up the bindings are in a bottom up
+ * traversal order. Check after recursing. */
+ node.bindId = 0;
+ if ( bindId < bindings->length() && bindings->data[bindId] == parseTree ) {
+ /* Remember that binding ids are indexed from one. */
+ node.bindId = bindId++;
+
+ //cout << "binding match in " << __PRETTY_FUNCTION__ << endl;
+ //cout << "bindId: " << node.bindId << endl;
+ }
+
+ node.next = kid->next == 0 ? -1 : nextAvail++;
+
+ /* Move to the next child. */
+ fillNodes( prg, nextAvail, bindings, bindId, nodes, parseTree->next, kid->next, node.next );
+ }
+}
+
+void Compiler::fillInPatterns( Program *prg )
+{
+ /*
+ * patReplNodes
+ */
+
+ /* Count is referenced and computed by mapNode. */
+ int count = 0;
+ for ( PatList::Iter pat = patternList; pat.lte(); pat++ ) {
+ countNodes( prg, count,
+ pat->pdaRun->stackTop->next,
+ pat->pdaRun->stackTop->next->shadow );
+ }
+
+ for ( ConsList::Iter repl = replList; repl.lte(); repl++ ) {
+ countNodes( prg, count,
+ repl->pdaRun->stackTop->next,
+ repl->pdaRun->stackTop->next->shadow );
+ }
+
+ runtimeData->patReplNodes = new PatConsNode[count];
+ runtimeData->numPatternNodes = count;
+
+ int nextAvail = 0;
+
+ for ( PatList::Iter pat = patternList; pat.lte(); pat++ ) {
+ int ind = nextAvail++;
+ runtimeData->patReplInfo[pat->patRepId].offset = ind;
+
+ /* BindIds are indexed base one. */
+ runtimeData->patReplInfo[pat->patRepId].numBindings =
+ pat->pdaRun->bindings->length() - 1;
+
+ /* Init the bind */
+ long bindId = 1;
+ fillNodes( prg, nextAvail, pat->pdaRun->bindings, bindId,
+ runtimeData->patReplNodes,
+ pat->pdaRun->stackTop->next,
+ pat->pdaRun->stackTop->next->shadow,
+ ind );
+ }
+
+ for ( ConsList::Iter repl = replList; repl.lte(); repl++ ) {
+ int ind = nextAvail++;
+ runtimeData->patReplInfo[repl->patRepId].offset = ind;
+
+ /* BindIds are indexed base one. */
+ runtimeData->patReplInfo[repl->patRepId].numBindings =
+ repl->pdaRun->bindings->length() - 1;
+
+ long bindId = 1;
+ fillNodes( prg, nextAvail, repl->pdaRun->bindings, bindId,
+ runtimeData->patReplNodes,
+ repl->pdaRun->stackTop->next,
+ repl->pdaRun->stackTop->next->shadow,
+ ind );
+ }
+
+ assert( nextAvail == count );
+}
+
+
+int Compiler::findIndexOff( PdaTables *pdaTables, PdaGraph *pdaGraph, PdaState *state, int &curLen )
+{
+ for ( int start = 0; start < curLen; ) {
+ int offset = start;
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ if ( pdaTables->owners[offset] != -1 )
+ goto next_start;
+
+ offset++;
+ if ( ! trans.last() ) {
+ TransMap::Iter next = trans.next();
+ offset += next->key - trans->key - 1;
+ }
+ }
+
+ /* Got though the whole list without a conflict. */
+ return start;
+
+next_start:
+ start++;
+ }
+
+ return curLen;
+}
+
+struct CmpSpan
+{
+ static int compare( PdaState *state1, PdaState *state2 )
+ {
+ int dist1 = 0, dist2 = 0;
+
+ if ( state1->transMap.length() > 0 ) {
+ TransMap::Iter first1 = state1->transMap.first();
+ TransMap::Iter last1 = state1->transMap.last();
+ dist1 = last1->key - first1->key;
+ }
+
+ if ( state2->transMap.length() > 0 ) {
+ TransMap::Iter first2 = state2->transMap.first();
+ TransMap::Iter last2 = state2->transMap.last();
+ dist2 = last2->key - first2->key;
+ }
+
+ if ( dist1 < dist2 )
+ return 1;
+ else if ( dist2 < dist1 )
+ return -1;
+ return 0;
+ }
+};
+
+PdaGraph *Compiler::makePdaGraph( LangElSet &parserEls )
+{
+ //for ( DefList::Iter prod = prodList; prod.lte(); prod++ )
+ // cerr << prod->prodId << " " << prod->data << endl;
+
+ PdaGraph *pdaGraph = new PdaGraph();
+ lalr1GenerateParser( pdaGraph, parserEls );
+ pdaGraph->setStateNumbers();
+ analyzeMachine( pdaGraph, parserEls );
+
+ //cerr << "NUMBER OF STATES: " << pdaGraph->stateList.length() << endl;
+
+ return pdaGraph;
+}
+
+PdaTables *Compiler::makePdaTables( PdaGraph *pdaGraph )
+{
+ int count, pos;
+ PdaTables *pdaTables = new PdaTables;
+
+ /*
+ * Counting max indices.
+ */
+ count = 0;
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ count++;
+ if ( ! trans.last() ) {
+ TransMap::Iter next = trans.next();
+ count += next->key - trans->key - 1;
+ }
+ }
+ }
+
+
+ /* Allocate indicies and owners. */
+ pdaTables->numIndicies = count;
+ pdaTables->indicies = new int[count];
+ pdaTables->owners = new int[count];
+ for ( long i = 0; i < count; i++ ) {
+ pdaTables->indicies[i] = -1;
+ pdaTables->owners[i] = -1;
+ }
+
+ /* Allocate offsets. */
+ int numStates = pdaGraph->stateList.length();
+ pdaTables->offsets = new unsigned int[numStates];
+ pdaTables->numStates = numStates;
+
+ /* Place transitions into indicies/owners */
+ PdaState **states = new PdaState*[numStates];
+ long ds = 0;
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ )
+ states[ds++] = state;
+
+ /* Sorting baseded on span length. Gives an improvement, but incures a
+ * cost. Off for now. */
+ //MergeSort< PdaState*, CmpSpan > mergeSort;
+ //mergeSort.sort( states, numStates );
+
+ int indLen = 0;
+ for ( int s = 0; s < numStates; s++ ) {
+ PdaState *state = states[s];
+
+ int indOff = findIndexOff( pdaTables, pdaGraph, state, indLen );
+ pdaTables->offsets[state->stateNum] = indOff;
+
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ pdaTables->indicies[indOff] = trans->value->actionSetEl->key.id;
+ pdaTables->owners[indOff] = state->stateNum;
+ indOff++;
+
+ if ( ! trans.last() ) {
+ TransMap::Iter next = trans.next();
+ indOff += next->key - trans->key - 1;
+ }
+ }
+
+ if ( indOff > indLen )
+ indLen = indOff;
+ }
+
+ /* We allocated the max, but cmpression gives us less. */
+ pdaTables->numIndicies = indLen;
+ delete[] states;
+
+
+ /*
+ * Keys
+ */
+ count = pdaGraph->stateList.length() * 2;;
+ pdaTables->keys = new int[count];
+ pdaTables->numKeys = count;
+
+ count = 0;
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ if ( state->transMap.length() == 0 ) {
+ pdaTables->keys[count+0] = 0;
+ pdaTables->keys[count+1] = 0;
+ }
+ else {
+ TransMap::Iter first = state->transMap.first();
+ TransMap::Iter last = state->transMap.last();
+ pdaTables->keys[count+0] = first->key;
+ pdaTables->keys[count+1] = last->key;
+ }
+ count += 2;
+ }
+
+ /*
+ * Targs
+ */
+ count = pdaGraph->actionSet.length();
+ pdaTables->targs = new unsigned int[count];
+ pdaTables->numTargs = count;
+
+ count = 0;
+ for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ )
+ pdaTables->targs[count++] = asi->key.targ;
+
+ /*
+ * ActInds
+ */
+ count = pdaGraph->actionSet.length();
+ pdaTables->actInds = new unsigned int[count];
+ pdaTables->numActInds = count;
+
+ count = pos = 0;
+ for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ ) {
+ pdaTables->actInds[count++] = pos;
+ pos += asi->key.actions.length() + 1;
+ }
+
+ /*
+ * Actions
+ */
+ count = 0;
+ for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ )
+ count += asi->key.actions.length() + 1;
+
+ pdaTables->actions = new unsigned int[count];
+ pdaTables->numActions = count;
+
+ count = 0;
+ for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ ) {
+ for ( ActDataList::Iter ali = asi->key.actions; ali.lte(); ali++ )
+ pdaTables->actions[count++] = *ali;
+
+ pdaTables->actions[count++] = 0;
+ }
+
+ /*
+ * CommitLen
+ */
+ count = pdaGraph->actionSet.length();
+ pdaTables->commitLen = new int[count];
+ pdaTables->numCommitLen = count;
+
+ count = 0;
+ for ( PdaActionSet::Iter asi = pdaGraph->actionSet; asi.lte(); asi++ )
+ pdaTables->commitLen[count++] = asi->key.commitLen;
+
+ /*
+ * tokenRegionInds. Start at one so region index 0 is null (unset).
+ */
+ count = 0;
+ pos = 1;
+ pdaTables->tokenRegionInds = new int[pdaTables->numStates];
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ pdaTables->tokenRegionInds[count++] = pos;
+ pos += state->regions.length() + 1;
+ }
+
+
+ /*
+ * tokenRegions. Build in a null at the beginning.
+ */
+
+ count = 1;
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ )
+ count += state->regions.length() + 1;
+
+ pdaTables->numRegionItems = count;
+ pdaTables->tokenRegions = new int[pdaTables->numRegionItems];
+
+ count = 0;
+ pdaTables->tokenRegions[count++] = 0;
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ for ( RegionVect::Iter reg = state->regions; reg.lte(); reg++ ) {
+ int id = ( *reg == EOF_REGION ) ? 0 : (*reg)->id + 1;
+ pdaTables->tokenRegions[count++] = id;
+ }
+
+ pdaTables->tokenRegions[count++] = 0;
+ }
+
+ /*
+ * tokenPreRegions. Build in a null at the beginning.
+ */
+
+ count = 1;
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ )
+ count += state->regions.length() + 1;
+
+ pdaTables->numPreRegionItems = count;
+ pdaTables->tokenPreRegions = new int[pdaTables->numPreRegionItems];
+
+ count = 0;
+ pdaTables->tokenPreRegions[count++] = 0;
+ for ( PdaStateList::Iter state = pdaGraph->stateList; state.lte(); state++ ) {
+ for ( RegionVect::Iter reg = state->regions; reg.lte(); reg++ ) {
+ assert( state->preRegions.length() <= 1 );
+ if ( state->preRegions.length() == 0 || state->preRegions[0]->impl->wasEmpty )
+ pdaTables->tokenPreRegions[count++] = -1;
+ else
+ pdaTables->tokenPreRegions[count++] = state->preRegions[0]->id + 1;
+ }
+
+ pdaTables->tokenPreRegions[count++] = 0;
+ }
+
+
+ return pdaTables;
+}
+
+void Compiler::makeParser( LangElSet &parserEls )
+{
+ pdaGraph = makePdaGraph( parserEls );
+ pdaTables = makePdaTables( pdaGraph );
+}
+
diff --git a/src/pdacodegen.cc b/src/pdacodegen.cc
new file mode 100644
index 0000000..904cd42
--- /dev/null
+++ b/src/pdacodegen.cc
@@ -0,0 +1,642 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <iostream>
+#include <stdlib.h>
+#include <ctype.h>
+#include <limits.h>
+#include "global.h"
+#include "parsedata.h"
+#include "avlmap.h"
+#include "avlbasic.h"
+#include "avlset.h"
+#include "mergesort.h"
+#include "pdacodegen.h"
+
+using std::cerr;
+using std::endl;
+
+#define FRESH_BLOCK 8128
+#define act_sb "0x1"
+#define act_rb "0x2"
+#define lower "0x0000ffff"
+#define upper "0xffff0000"
+
+void escapeLiteralString( std::ostream &out, const char *path, int length )
+{
+ for ( const char *pc = path, *end = path+length; pc != end; pc++ ) {
+ switch ( *pc ) {
+ case '\\': out << "\\\\"; break;
+ case '"': out << "\\\""; break;
+ case '\a': out << "\\a"; break;
+ case '\b': out << "\\b"; break;
+ case '\t': out << "\\t"; break;
+ case '\n': out << "\\n"; break;
+ case '\v': out << "\\v"; break;
+ case '\f': out << "\\f"; break;
+ case '\r': out << "\\r"; break;
+ default: out << *pc; break;
+ }
+ }
+}
+
+void escapeLiteralString( std::ostream &out, const char *path )
+{
+ escapeLiteralString( out, path, strlen(path) );
+}
+
+void PdaCodeGen::defineRuntime()
+{
+ out <<
+ "extern RuntimeData colm_program_text;\n"
+ "\n";
+}
+
+void PdaCodeGen::writeRuntimeData( RuntimeData *runtimeData, PdaTables *pdaTables )
+{
+ /*
+ * Blocks of code in frames.
+ */
+ for ( int i = 0; i < runtimeData->numFrames; i++ ) {
+ /* FIXME: horrible code cloning going on here. */
+ if ( runtimeData->frameInfo[i].codeLenWV > 0 ) {
+ out << "static Code code_" << i << "_wv[] = {\n\t";
+
+ Code *block = runtimeData->frameInfo[i].codeWV;
+ for ( int j = 0; j < runtimeData->frameInfo[i].codeLenWV; j++ ) {
+ out << (unsigned long) block[j];
+
+ if ( j < runtimeData->frameInfo[i].codeLenWV-1 ) {
+ out << ", ";
+ if ( (j+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+ }
+
+ if ( runtimeData->frameInfo[i].codeLenWC > 0 ) {
+ out << "static Code code_" << i << "_wc[] = {\n\t";
+
+ Code *block = runtimeData->frameInfo[i].codeWC;
+ for ( int j = 0; j < runtimeData->frameInfo[i].codeLenWC; j++ ) {
+ out << (unsigned long) block[j];
+
+ if ( j < runtimeData->frameInfo[i].codeLenWC-1 ) {
+ out << ", ";
+ if ( (j+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+ }
+
+ if ( runtimeData->frameInfo[i].localsLen > 0 ) {
+ out << "static LocalInfo locals_" << i << "[] = {\n\t";
+
+ LocalInfo *li = runtimeData->frameInfo[i].locals;
+ for ( int j = 0; j < runtimeData->frameInfo[i].localsLen; j++ ) {
+ out << "{ " << (int)li[j].type << ", " << li[j].offset << " }";
+
+ if ( j < runtimeData->frameInfo[i].localsLen-1 ) {
+ out << ", ";
+ if ( (j+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+ }
+ }
+
+ /*
+ * Blocks in production info.
+ */
+ for ( int i = 0; i < runtimeData->numProds; i++ ) {
+ if ( runtimeData->prodInfo[i].copyLen > 0 ) {
+ out << "static unsigned char copy_" << i << "[] = {\n\t";
+
+ unsigned char *block = runtimeData->prodInfo[i].copy;
+ for ( int j = 0; j < runtimeData->prodInfo[i].copyLen; j++ ) {
+ out << (long) block[j*2] << ", " << (long) block[j*2+1];
+
+ if ( j < runtimeData->prodInfo[i].copyLen-1 ) {
+ out << ", ";
+ if ( (j+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+ }
+ }
+
+ /*
+ * Init code.
+ */
+ out << "static Code " << rootCode() << "[] = {\n\t";
+ Code *block = runtimeData->rootCode ;
+ for ( int j = 0; j < runtimeData->rootCodeLen; j++ ) {
+ out << (unsigned int) block[j];
+
+ if ( j < runtimeData->rootCodeLen-1 ) {
+ out << ", ";
+ if ( (j+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ /*
+ * lelInfo
+ */
+ out << "static LangElInfo " << lelInfo() << "[] = {\n";
+ for ( int i = 0; i < runtimeData->numLangEls; i++ ) {
+ out << "\t{";
+
+ /* Name. */
+ out << " \"";
+ escapeLiteralString( out, runtimeData->lelInfo[i].name );
+ out << "\", ";
+
+ /* Name. */
+ out << " \"";
+ escapeLiteralString( out, runtimeData->lelInfo[i].xmlTag );
+ out << "\", ";
+
+ /* Repeat, literal, ignore flags. */
+ out << (int)runtimeData->lelInfo[i].repeat << ", " <<
+ (int)runtimeData->lelInfo[i].list << ", " <<
+ (int)runtimeData->lelInfo[i].literal << ", " <<
+ (int)runtimeData->lelInfo[i].ignore << ", ";
+
+ out << runtimeData->lelInfo[i].frameId << ", ";
+
+ out << runtimeData->lelInfo[i].objectTypeId << ", ";
+
+ out << runtimeData->lelInfo[i].ofiOffset << ", ";
+
+ out << runtimeData->lelInfo[i].objectLength << ", ";
+
+// out << runtimeData->lelInfo[i].contextTypeId << ", ";
+// out << runtimeData->lelInfo[i].contextLength << ", ";
+
+ out << runtimeData->lelInfo[i].termDupId << ", ";
+
+ out << runtimeData->lelInfo[i].genericId << ", ";
+
+ out << runtimeData->lelInfo[i].markId << ", ";
+
+ out << runtimeData->lelInfo[i].captureAttr << ", ";
+
+ out << runtimeData->lelInfo[i].numCaptureAttr;
+
+ out << " }";
+
+ if ( i < runtimeData->numLangEls-1 )
+ out << ",\n";
+ }
+ out << "\n};\n\n";
+
+ /*
+ * frameInfo
+ */
+ out << "static FrameInfo " << frameInfo() << "[] = {\n";
+ for ( int i = 0; i < runtimeData->numFrames; i++ ) {
+ out << "\t{ ";
+
+ if ( runtimeData->frameInfo[i].codeLenWV > 0 )
+ out << "code_" << i << "_wv, ";
+ else
+ out << "0, ";
+ out << runtimeData->frameInfo[i].codeLenWV << ", ";
+
+ if ( runtimeData->frameInfo[i].codeLenWC > 0 )
+ out << "code_" << i << "_wc, ";
+ else
+ out << "0, ";
+ out << runtimeData->frameInfo[i].codeLenWC << ", ";
+
+ /* locals. */
+ if ( runtimeData->frameInfo[i].localsLen > 0 )
+ out << "locals_" << i << ", ";
+ else
+ out << "0, ";
+
+ out << runtimeData->frameInfo[i].localsLen << ", ";
+
+ out <<
+ runtimeData->frameInfo[i].argSize << ", " <<
+ runtimeData->frameInfo[i].frameSize;
+
+ out << " }";
+
+ if ( i < runtimeData->numFrames-1 )
+ out << ",\n";
+ }
+ out << "\n};\n\n";
+
+
+ /*
+ * prodInfo
+ */
+ out << "static ProdInfo " << prodInfo() << "[] = {\n";
+ for ( int i = 0; i < runtimeData->numProds; i++ ) {
+ out << "\t{ ";
+
+ out << runtimeData->prodInfo[i].lhsId << ", ";
+ out << runtimeData->prodInfo[i].prodNum << ", ";
+ out << runtimeData->prodInfo[i].length << ", ";
+
+ out <<
+ '"' << runtimeData->prodInfo[i].name << "\", " <<
+ runtimeData->prodInfo[i].frameId << ", " <<
+ (int)runtimeData->prodInfo[i].lhsUpref << ", ";
+
+ if ( runtimeData->prodInfo[i].copyLen > 0 )
+ out << "copy_" << i << ", ";
+ else
+ out << "0, ";
+
+ out << runtimeData->prodInfo[i].copyLen << ", ";
+
+
+ out << " }";
+
+ if ( i < runtimeData->numProds-1 )
+ out << ",\n";
+ }
+ out << "\n};\n\n";
+
+ /*
+ * patReplInfo
+ */
+ out << "static PatConsInfo " << patReplInfo() << "[] = {\n";
+ for ( int i = 0; i < runtimeData->numPatterns; i++ ) {
+ out << " { " << runtimeData->patReplInfo[i].offset << ", " <<
+ runtimeData->patReplInfo[i].numBindings << " },\n";
+ }
+ out << "};\n\n";
+
+ /*
+ * patReplNodes
+ */
+ out << "static PatConsNode " << patReplNodes() << "[] = {\n";
+ for ( int i = 0; i < runtimeData->numPatternNodes; i++ ) {
+ PatConsNode &node = runtimeData->patReplNodes[i];
+ out << " { " << node.id << ", " <<
+ node.prodNum << ", " << node.next << ", " <<
+ node.child << ", " << node.bindId << ", ";
+ if ( node.data == 0 )
+ out << "0";
+ else {
+ out << '\"';
+ escapeLiteralString( out, node.data, node.length );
+ out << '\"';
+ }
+ out << ", " << node.length << ", ";
+
+ out << node.leftIgnore << ", ";
+ out << node.rightIgnore << ", ";
+
+ out << (int)node.stop << " },\n";
+ }
+ out << "};\n\n";
+
+ /*
+ * functionInfo
+ */
+ out << "static FunctionInfo " << functionInfo() << "[] = {\n";
+ for ( int i = 0; i < runtimeData->numFunctions; i++ ) {
+ out << "\t{ " <<
+ "\"" << runtimeData->functionInfo[i].name << "\", " <<
+ runtimeData->functionInfo[i].frameId << ", " <<
+ runtimeData->functionInfo[i].argSize << ", " <<
+ runtimeData->functionInfo[i].frameSize;
+ out << " }";
+
+ if ( i < runtimeData->numFunctions-1 )
+ out << ",\n";
+ }
+ out << "\n};\n\n";
+
+ /*
+ * regionInfo
+ */
+ out << "static RegionInfo " << regionInfo() << "[] = {\n";
+ for ( int i = 0; i < runtimeData->numRegions; i++ ) {
+ out << "\t{ " << runtimeData->regionInfo[i].defaultToken <<
+ ", " << runtimeData->regionInfo[i].eofFrameId <<
+ ", " << runtimeData->regionInfo[i].ciLelId <<
+ " }";
+
+ if ( i < runtimeData->numRegions-1 )
+ out << ",\n";
+ }
+ out << "\n};\n\n";
+
+ /*
+ * genericInfo
+ */
+ out << "static GenericInfo " << genericInfo() << "[] = {\n";
+ for ( int i = 0; i < runtimeData->numGenerics; i++ ) {
+ out << "\t{ " <<
+ runtimeData->genericInfo[i].type << ", " <<
+ runtimeData->genericInfo[i].typeArg << ", " <<
+ runtimeData->genericInfo[i].keyOffset << ", " <<
+ runtimeData->genericInfo[i].keyType << ", " <<
+ runtimeData->genericInfo[i].langElId << ", " <<
+ runtimeData->genericInfo[i].parserId << " },\n";
+ }
+ out << "};\n\n";
+
+ /*
+ * literals
+ */
+ out << "static const char *" << litdata() << "[] = {\n";
+ for ( int i = 0; i < runtimeData->numLiterals; i++ ) {
+ out << "\t\"";
+ escapeLiteralString( out, runtimeData->litdata[i] );
+ out << "\",\n";
+ }
+ out << "};\n\n";
+
+ out << "static long " << litlen() << "[] = {\n\t";
+ for ( int i = 0; i < runtimeData->numLiterals; i++ )
+ out << runtimeData->litlen[i] << ", ";
+ out << "};\n\n";
+
+ out << "static Head *" << literals() << "[] = {\n\t";
+ for ( int i = 0; i < runtimeData->numLiterals; i++ )
+ out << "0, ";
+ out << "};\n\n";
+
+ out << "static int startStates[] = {\n\t";
+ for ( long i = 0; i < runtimeData->numParsers; i++ ) {
+ out << runtimeData->startStates[i] << ", ";
+ }
+ out << "};\n\n";
+
+ out << "static int eofLelIds[] = {\n\t";
+ for ( long i = 0; i < runtimeData->numParsers; i++ ) {
+ out << runtimeData->eofLelIds[i] << ", ";
+ }
+ out << "};\n\n";
+
+ out << "static int parserLelIds[] = {\n\t";
+ for ( long i = 0; i < runtimeData->numParsers; i++ ) {
+ out << runtimeData->parserLelIds[i] << ", ";
+ }
+ out << "};\n\n";
+
+ out << "static CaptureAttr captureAttr[] = {\n";
+ for ( long i = 0; i < runtimeData->numCapturedAttr; i++ ) {
+ out << "\t{ " <<
+ runtimeData->captureAttr[i].mark_enter << ", " <<
+ runtimeData->captureAttr[i].mark_leave << ", " <<
+ runtimeData->captureAttr[i].offset << " },\n";
+ }
+
+ out << "};\n\n";
+
+ out <<
+ "RuntimeData colm_object = \n"
+ "{\n"
+ " " << lelInfo() << ",\n"
+ " " << runtimeData->numLangEls << ",\n"
+ "\n"
+ " " << prodInfo() << ",\n"
+ " " << runtimeData->numProds << ",\n"
+ "\n"
+ " " << regionInfo() << ",\n"
+ " " << runtimeData->numRegions << ",\n"
+ "\n"
+ " " << rootCode() << ",\n"
+ " " << runtimeData->rootCodeLen << ",\n"
+ " " << runtimeData->rootFrameId << ",\n"
+ "\n"
+ " " << frameInfo() << ",\n"
+ " " << runtimeData->numFrames << ",\n"
+ "\n"
+ " " << functionInfo() << ",\n"
+ " " << runtimeData->numFunctions << ",\n"
+ "\n"
+ " " << patReplInfo() << ",\n"
+ " " << runtimeData->numPatterns << ",\n"
+ "\n"
+ " " << patReplNodes() << ",\n"
+ " " << runtimeData->numPatternNodes << ",\n"
+ "\n"
+ " " << genericInfo() << ",\n"
+ " " << runtimeData->numGenerics << ",\n"
+ " " << runtimeData->argvGenericId << ",\n"
+ "\n"
+ " " << litdata() << ",\n"
+ " " << litlen() << ",\n"
+ " " << literals() << ",\n"
+ " " << runtimeData->numLiterals << ",\n"
+ "\n"
+ " captureAttr,\n"
+ " " << runtimeData->numCapturedAttr << ",\n"
+ "\n"
+ " &fsmTables_start,\n"
+ " &pid_0_pdaTables,\n"
+ " startStates, eofLelIds, parserLelIds, " << runtimeData->numParsers << ",\n"
+ "\n"
+ " " << runtimeData->globalSize << ",\n"
+ "\n"
+ " " << runtimeData->firstNonTermId << ",\n"
+ " " << runtimeData->integerId << ",\n"
+ " " << runtimeData->stringId << ",\n"
+ " " << runtimeData->anyId << ",\n"
+ " " << runtimeData->eofId << ",\n"
+ " " << runtimeData->noTokenId << ",\n"
+ " &fsmExecute,\n"
+ " &sendNamedLangEl,\n"
+ " &initBindings,\n"
+ " &popBinding,\n"
+ "};\n"
+ "\n";
+}
+
+void PdaCodeGen::writeParserData( long id, PdaTables *tables )
+{
+ String prefix = "pid_" + String(0, "%ld", id) + "_";
+
+ out << "static int " << prefix << indicies() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numIndicies; i++ ) {
+ out << tables->indicies[i];
+
+ if ( i < tables->numIndicies-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out << "static int " << prefix << owners() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numIndicies; i++ ) {
+ out << tables->owners[i];
+
+ if ( i < tables->numIndicies-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out << "static int " << prefix << keys() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numKeys; i++ ) {
+ out << tables->keys[i];
+
+ if ( i < tables->numKeys-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out << "static unsigned int " << prefix << offsets() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numStates; i++ ) {
+ out << tables->offsets[i];
+
+ if ( i < tables->numStates-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out << "static unsigned int " << prefix << targs() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numTargs; i++ ) {
+ out << tables->targs[i];
+
+ if ( i < tables->numTargs-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out << "static unsigned int " << prefix << actInds() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numActInds; i++ ) {
+ out << tables->actInds[i];
+
+ if ( i < tables->numActInds-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out << "static unsigned int " << prefix << actions() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numActions; i++ ) {
+ out << tables->actions[i];
+
+ if ( i < tables->numActions-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out << "static int " << prefix << commitLen() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numCommitLen; i++ ) {
+ out << tables->commitLen[i];
+
+ if ( i < tables->numCommitLen-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out << "static int " << prefix << tokenRegionInds() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numStates; i++ ) {
+ out << tables->tokenRegionInds[i];
+
+ if ( i < tables->numStates-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out << "static int " << prefix << tokenRegions() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numRegionItems; i++ ) {
+ out << tables->tokenRegions[i];
+
+ if ( i < tables->numRegionItems-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out << "static int " << prefix << tokenPreRegions() << "[] = {\n\t";
+ for ( int i = 0; i < tables->numPreRegionItems; i++ ) {
+ out << tables->tokenPreRegions[i];
+
+ if ( i < tables->numPreRegionItems-1 ) {
+ out << ", ";
+ if ( (i+1) % 8 == 0 )
+ out << "\n\t";
+ }
+ }
+ out << "\n};\n\n";
+
+ out <<
+ "static PdaTables " << prefix << "pdaTables =\n"
+ "{\n"
+ " " << prefix << indicies() << ",\n"
+ " " << prefix << owners() << ",\n"
+ " " << prefix << keys() << ",\n"
+ " " << prefix << offsets() << ",\n"
+ " " << prefix << targs() << ",\n"
+ " " << prefix << actInds() << ",\n"
+ " " << prefix << actions() << ",\n"
+ " " << prefix << commitLen() << ",\n"
+
+ " " << prefix << tokenRegionInds() << ",\n"
+ " " << prefix << tokenRegions() << ",\n"
+ " " << prefix << tokenPreRegions() << ",\n"
+ "\n"
+ " " << tables->numIndicies << ",\n"
+ " " << tables->numKeys << ",\n"
+ " " << tables->numStates << ",\n"
+ " " << tables->numTargs << ",\n"
+ " " << tables->numActInds << ",\n"
+ " " << tables->numActions << ",\n"
+ " " << tables->numCommitLen << ",\n"
+ " " << tables->numRegionItems << ",\n"
+ " " << tables->numPreRegionItems << "\n"
+ "};\n"
+ "\n";
+}
+
diff --git a/src/pdacodegen.h b/src/pdacodegen.h
new file mode 100644
index 0000000..7a9e4f9
--- /dev/null
+++ b/src/pdacodegen.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef _PDACODEGEN_H
+#define _PDACODEGEN_H
+
+struct Compiler;
+
+struct PdaCodeGen
+{
+ PdaCodeGen( ostream &out )
+ :
+ out(out)
+ {}
+
+ /*
+ * Code Generation.
+ */
+ void startCodeGen();
+ void endCodeGen( int endLine );
+
+ void writeReference( Production *prod, char *data );
+ void writeUndoReference( Production *prod, char *data );
+ void writeFinalReference( Production *prod, char *data );
+ void writeFirstLocate( Production *prod );
+ void writeRhsLocate( Production *prod );
+
+ void defineRuntime();
+ void writeRuntimeData( RuntimeData *runtimeData, PdaTables *pdaTables );
+ void writeParserData( long id, PdaTables *tables );
+
+ String PARSER() { return "parser_"; }
+
+ String startState() { return PARSER() + "startState"; }
+ String indicies() { return PARSER() + "indicies"; }
+ String owners() { return PARSER() + "owners"; }
+ String keys() { return PARSER() + "keys"; }
+ String offsets() { return PARSER() + "offsets"; }
+ String targs() { return PARSER() + "targs"; }
+ String actInds() { return PARSER() + "actInds"; }
+ String actions() { return PARSER() + "actions"; }
+ String commitLen() { return PARSER() + "commitLen"; }
+ String fssProdIdIndex() { return PARSER() + "fssProdIdIndex"; }
+ String prodLengths() { return PARSER() + "prodLengths"; }
+ String prodLhsIds() { return PARSER() + "prodLhsIds"; }
+ String prodNames() { return PARSER() + "prodNames"; }
+ String lelInfo() { return PARSER() + "lelInfo"; }
+ String prodInfo() { return PARSER() + "prodInfo"; }
+ String tokenRegionInds() { return PARSER() + "tokenRegionInds"; }
+ String tokenRegions() { return PARSER() + "tokenRegions"; }
+ String tokenPreRegions() { return PARSER() + "tokenPreRegions"; }
+ String prodCodeBlocks() { return PARSER() + "prodCodeBlocks"; }
+ String prodCodeBlockLens() { return PARSER() + "prodCodeBlockLens"; }
+ String rootCode() { return PARSER() + "rootCode"; }
+ String frameInfo() { return PARSER() + "frameInfo"; }
+ String functionInfo() { return PARSER() + "functionInfo"; }
+ String objFieldInfo() { return PARSER() + "objFieldInfo"; }
+ String patReplInfo() { return PARSER() + "patReplInfo"; }
+ String patReplNodes() { return PARSER() + "patReplNodes"; }
+ String regionInfo() { return PARSER() + "regionInfo"; }
+ String genericInfo() { return PARSER() + "genericInfo"; }
+ String litdata() { return PARSER() + "litdata"; }
+ String litlen() { return PARSER() + "litlen"; }
+ String literals() { return PARSER() + "literals"; }
+ String fsmTables() { return PARSER() + "fsmTables"; }
+
+ /*
+ * Graphviz Generation
+ */
+ void writeTransList( PdaState *state );
+ void writeDotFile( PdaGraph *graph );
+ void writeDotFile( );
+
+ ostream &out;
+};
+
+extern "C"
+{
+ void internalFsmExecute( FsmRun *fsmRun, StreamImpl *inputStream );
+ void internalSendNamedLangEl( Program *prg, Tree **sp, PdaRun *pdaRun,
+ FsmRun *fsmRun, StreamImpl *is );
+ void internalInitBindings( PdaRun *pdaRun );
+ void internalPopBinding( PdaRun *pdaRun, ParseTree *parseTree );
+}
+
+#endif
diff --git a/src/pdagraph.cc b/src/pdagraph.cc
new file mode 100644
index 0000000..8f17b7a
--- /dev/null
+++ b/src/pdagraph.cc
@@ -0,0 +1,533 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <string.h>
+#include <iostream>
+#include <string.h>
+#include <assert.h>
+#include "global.h"
+#include "pdagraph.h"
+#include "mergesort.h"
+
+using std::cerr;
+using std::endl;
+
+/* Create a new fsm state. State has not out transitions or in transitions, not
+ * out out transition data and not number. */
+PdaState::PdaState()
+:
+ /* No in transitions. */
+ inRange(),
+
+ /* No entry points, or epsilon trans. */
+ pendingCommits(),
+
+ stateSet(0),
+
+ /* Only used during merging. Normally null. */
+ stateDictEl(0),
+
+ /* No state identification bits. */
+ stateBits(0),
+
+ onClosureQueue(false),
+ inClosedMap(false),
+ followMarked(false),
+
+ advanceReductions(false)
+{
+}
+
+/* Copy everything except the action transitions. That is left up to the
+ * PdaGraph copy constructor. */
+PdaState::PdaState(const PdaState &other)
+:
+ inRange(),
+
+ /* Duplicate the entry id set, epsilon transitions and context sets. These
+ * are sets of integers and as such need no fixing. */
+ pendingCommits(other.pendingCommits),
+
+ stateSet(0),
+
+ /* This is only used during merging. Normally null. */
+ stateDictEl(0),
+
+ /* Fsm state data. */
+ stateBits(other.stateBits),
+
+ dotSet(other.dotSet),
+ onClosureQueue(false),
+ inClosedMap(false),
+ followMarked(false),
+
+ transMap()
+{
+ /* Duplicate all the transitions. */
+ for ( TransMap::Iter trans = other.transMap; trans.lte(); trans++ ) {
+ /* Dupicate and store the orginal target in the transition. This will
+ * be corrected once all the states have been created. */
+ PdaTrans *newTrans = new PdaTrans(*trans->value);
+ newTrans->toState = trans->value->toState;
+ transMap.append( TransMapEl( newTrans->lowKey, newTrans ) );
+ }
+}
+
+/* If there is a state dict element, then delete it. Everything else is left
+ * up to the FsmGraph destructor. */
+PdaState::~PdaState()
+{
+ if ( stateDictEl != 0 )
+ delete stateDictEl;
+}
+
+/* Graph constructor. */
+PdaGraph::PdaGraph()
+:
+ /* No start state. */
+ startState(0)
+{
+}
+
+/* Copy all graph data including transitions. */
+PdaGraph::PdaGraph( const PdaGraph &graph )
+:
+ /* Lists start empty. Will be filled by copy. */
+ stateList(),
+ misfitList(),
+
+ /* Copy in the entry points,
+ * pointers will be resolved later. */
+ startState(graph.startState),
+
+ /* Will be filled by copy. */
+ finStateSet()
+{
+ /* Create the states and record their map in the original state. */
+ PdaStateList::Iter origState = graph.stateList;
+ for ( ; origState.lte(); origState++ ) {
+ /* Make the new state. */
+ PdaState *newState = new PdaState( *origState );
+
+ /* Add the state to the list. */
+ stateList.append( newState );
+
+ /* Set the mapsTo item of the old state. */
+ origState->stateMap = newState;
+ }
+
+ /* Derefernce all the state maps. */
+ for ( PdaStateList::Iter state = stateList; state.lte(); state++ ) {
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ /* The points to the original in the src machine. The taget's duplicate
+ * is in the statemap. */
+ PdaState *toState = trans->value->toState != 0 ?
+ trans->value->toState->stateMap : 0;
+
+ /* Attach The transition to the duplicate. */
+ trans->value->toState = 0;
+ attachTrans( state, toState, trans->value );
+ }
+ }
+
+ /* Fix the start state pointer and the new start state's count of in
+ * transiions. */
+ startState = startState->stateMap;
+
+ /* Build the final state set. */
+ PdaStateSet::Iter st = graph.finStateSet;
+ for ( ; st.lte(); st++ )
+ finStateSet.insert((*st)->stateMap);
+}
+
+/* Deletes all transition data then deletes each state. */
+PdaGraph::~PdaGraph()
+{
+ /* Delete all the transitions. */
+ PdaStateList::Iter state = stateList;
+ for ( ; state.lte(); state++ ) {
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ )
+ delete trans->value;
+ }
+
+ /* Delete all the states. */
+ stateList.empty();
+}
+
+/* Set a state final. The state has its isFinState set to true and the state
+ * is added to the finStateSet. */
+void PdaGraph::setFinState( PdaState *state )
+{
+ /* Is it already a fin state. */
+ if ( state->stateBits & SB_ISFINAL )
+ return;
+
+ state->stateBits |= SB_ISFINAL;
+ finStateSet.insert( state );
+}
+
+void PdaGraph::unsetAllFinStates( )
+{
+ for ( PdaStateSet::Iter st = finStateSet; st.lte(); st++ ) {
+ PdaState *state = *st;
+ state->stateBits &= ~ SB_ISFINAL;
+ }
+ finStateSet.empty();
+}
+
+/* Set and unset a state as the start state. */
+void PdaGraph::setStartState( PdaState *state )
+{
+ /* Sould change from unset to set. */
+ assert( startState == 0 );
+ startState = state;
+}
+
+/* Mark all states reachable from state. Traverses transitions forward. Used
+ * for removing states that have no path into them. */
+void PdaGraph::markReachableFromHere( PdaState *state )
+{
+ /* Base case: return; */
+ if ( state->stateBits & SB_ISMARKED )
+ return;
+
+ /* Set this state as processed. We are going to visit all states that this
+ * state has a transition to. */
+ state->stateBits |= SB_ISMARKED;
+
+ /* Recurse on all out transitions. */
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ if ( trans->value->toState != 0 )
+ markReachableFromHere( trans->value->toState );
+ }
+}
+
+void PdaGraph::setStateNumbers()
+{
+ int curNum = 0;
+ PdaStateList::Iter state = stateList;
+ for ( ; state.lte(); state++ )
+ state->stateNum = curNum++;
+}
+
+/* Insert a transition into an inlist. The head must be supplied. */
+void PdaGraph::attachToInList( PdaState *from, PdaState *to,
+ PdaTrans *&head, PdaTrans *trans )
+{
+ trans->ilnext = head;
+ trans->ilprev = 0;
+
+ /* If in trans list is not empty, set the head->prev to trans. */
+ if ( head != 0 )
+ head->ilprev = trans;
+
+ /* Now insert ourselves at the front of the list. */
+ head = trans;
+};
+
+/* Detach a transition from an inlist. The head of the inlist must be supplied. */
+void PdaGraph::detachFromInList( PdaState *from, PdaState *to,
+ PdaTrans *&head, PdaTrans *trans )
+{
+ /* Detach in the inTransList. */
+ if ( trans->ilprev == 0 )
+ head = trans->ilnext;
+ else
+ trans->ilprev->ilnext = trans->ilnext;
+
+ if ( trans->ilnext != 0 )
+ trans->ilnext->ilprev = trans->ilprev;
+}
+
+/* Attach states on the default transition, range list or on out/in list key.
+ * Type of attaching and is controlled by keyType. First makes a new
+ * transition. If there is already a transition out from fromState on the
+ * default, then will assertion fail. */
+PdaTrans *PdaGraph::appendNewTrans( PdaState *from, PdaState *to, long lowKey, long )
+{
+ /* Make the new transition. */
+ PdaTrans *retVal = new PdaTrans();
+
+ /* The transition is now attached. Remember the parties involved. */
+ retVal->fromState = from;
+ retVal->toState = to;
+
+ /* Make the entry in the out list for the transitions. */
+ from->transMap.append( TransMapEl( lowKey, retVal ) );
+
+ /* Set the the keys of the new trans. */
+ retVal->lowKey = lowKey;
+
+ /* Attach using inRange as the head pointer. */
+ attachToInList( from, to, to->inRange.head, retVal );
+
+ return retVal;
+}
+
+PdaTrans *PdaGraph::insertNewTrans( PdaState *from, PdaState *to, long lowKey, long )
+{
+ /* Make the new transition. */
+ PdaTrans *retVal = new PdaTrans();
+
+ /* The transition is now attached. Remember the parties involved. */
+ retVal->fromState = from;
+ retVal->toState = to;
+
+ /* Make the entry in the out list for the transitions. */
+ from->transMap.insert( lowKey, retVal );
+
+ /* Set the the keys of the new trans. */
+ retVal->lowKey = lowKey;
+
+ /* Attach using inRange as the head pointer. */
+ attachToInList( from, to, to->inRange.head, retVal );
+
+ return retVal;
+}
+
+/* Attach for range lists or for the default transition. Type of attaching is
+ * controlled by the keyType parameter. This attach should be used when a
+ * transition already is allocated and must be attached to a target state.
+ * Does not handle adding the transition into the out list. */
+void PdaGraph::attachTrans( PdaState *from, PdaState *to, PdaTrans *trans )
+{
+ assert( trans->fromState == 0 && trans->toState == 0 );
+ trans->fromState = from;
+ trans->toState = to;
+
+ /* Attach using the inRange pointer as the head pointer. */
+ attachToInList( from, to, to->inRange.head, trans );
+}
+
+/* Detach for out/in lists or for default transition. The type of detaching is
+ * controlled by the keyType parameter. */
+void PdaGraph::detachTrans( PdaState *from, PdaState *to, PdaTrans *trans )
+{
+ assert( trans->fromState == from && trans->toState == to );
+ trans->fromState = 0;
+ trans->toState = 0;
+
+ /* Detach using to's inRange pointer as the head. */
+ detachFromInList( from, to, to->inRange.head, trans );
+}
+
+
+/* Detach a state from the graph. Detaches and deletes transitions in and out
+ * of the state. Empties inList and outList. Removes the state from the final
+ * state set. A detached state becomes useless and should be deleted. */
+void PdaGraph::detachState( PdaState *state )
+{
+ /* Detach the in transitions from the inRange list of transitions. */
+ while ( state->inRange.head != 0 ) {
+ /* Get pointers to the trans and the state. */
+ PdaTrans *trans = state->inRange.head;
+ PdaState *fromState = trans->fromState;
+
+ /* Detach the transitions from the source state. */
+ detachTrans( fromState, state, trans );
+
+ /* Ok to delete the transition. */
+ fromState->transMap.remove( trans->lowKey );
+ delete trans;
+ }
+
+ /* Detach out range transitions. */
+ for ( TransMap::Iter trans = state->transMap; trans.lte(); trans++ ) {
+ detachTrans( state, trans->value->toState, trans->value );
+ delete trans->value;
+ }
+
+ /* Delete all of the out range pointers. */
+ state->transMap.empty();
+
+ /* Unset final stateness before detaching from graph. */
+ if ( state->stateBits & SB_ISFINAL )
+ finStateSet.remove( state );
+}
+
+/* Move all the transitions that go into src so that they go into dest. */
+void PdaGraph::inTransMove( PdaState *dest, PdaState *src )
+{
+ /* Do not try to move in trans to and from the same state. */
+ assert( dest != src );
+
+ /* If src is the start state, dest becomes the start state. */
+ assert( src != startState );
+
+ /* Move the transitions in inRange. */
+ while ( src->inRange.head != 0 ) {
+ /* Get trans and from state. */
+ PdaTrans *trans = src->inRange.head;
+ PdaState *fromState = trans->fromState;
+
+ /* Detach from src, reattach to dest. */
+ detachTrans( fromState, src, trans );
+ attachTrans( fromState, dest, trans );
+ }
+}
+
+void PdaGraph::addInReduction( PdaTrans *dest, long prodId, long prior )
+{
+ /* Look for the reduction. If not there insert it, otherwise take
+ * the max of the priorities. */
+ ReductionMapEl *redMapEl = dest->reductions.find( prodId );
+ if ( redMapEl == 0 )
+ dest->reductions.insert( prodId, prior );
+ else if ( prior > redMapEl->value )
+ redMapEl->value = prior;
+}
+
+/* Callback invoked when another trans (or possibly this) is added into this
+ * transition during the merging process. Draw in any properties of srcTrans
+ * into this transition. AddInTrans is called when a new transitions is made
+ * that will be a duplicate of another transition or a combination of several
+ * other transitions. AddInTrans will be called for each transition that the
+ * new transition is to represent. */
+void PdaGraph::addInTrans( PdaTrans *destTrans, PdaTrans *srcTrans )
+{
+ /* Protect against adding in from ourselves. */
+ if ( srcTrans != destTrans ) {
+
+ /* Add in the shift priority. */
+ if ( destTrans->isShift && srcTrans->isShift ) {
+ /* Both shifts are set. We want the max of the two. */
+ if ( srcTrans->shiftPrior > destTrans->shiftPrior )
+ destTrans->shiftPrior = srcTrans->shiftPrior;
+ }
+ else if ( srcTrans->isShift ) {
+ /* Just the source is set, copy the source prior over. */
+ destTrans->shiftPrior = srcTrans->shiftPrior;
+ }
+
+ /* If either is a shift, dest is a shift. */
+ destTrans->isShift = destTrans->isShift || srcTrans->isShift;
+
+ /* Add in the reductions. */
+ for ( ReductionMap::Iter red = srcTrans->reductions; red.lte(); red++ )
+ addInReduction( destTrans, red->key, red->value );
+
+ /* Add in the commit points. */
+ destTrans->commits.insert( srcTrans->commits );
+
+ if ( srcTrans->toState->advanceReductions )
+ destTrans->toState->advanceReductions = true;
+
+ if ( srcTrans->noPreIgnore )
+ destTrans->noPreIgnore = true;
+ if ( srcTrans->noPostIgnore )
+ destTrans->noPostIgnore = true;
+ }
+}
+
+/* NO LONGER USED. */
+void PdaGraph::addInState( PdaState *destState, PdaState *srcState )
+{
+ /* Draw in any properties of srcState into destState. */
+ if ( srcState != destState ) {
+ /* Get the epsilons, context, out priorities. */
+ destState->pendingCommits.insert( srcState->pendingCommits );
+ if ( srcState->pendingCommits.length() > 0 )
+ cerr << "THERE ARE PENDING COMMITS DRAWN IN" << endl;
+
+ /* Parser generation data. */
+ destState->dotSet.insert( srcState->dotSet );
+
+ if ( srcState->onClosureQueue && !destState->onClosureQueue ) {
+ stateClosureQueue.append( destState );
+ destState->onClosureQueue = true;
+ }
+ }
+}
+
+/* Make a new state. The new state will be put on the graph's
+ * list of state. The new state can be created final or non final. */
+PdaState *PdaGraph::addState()
+{
+ /* Make the new state to return. */
+ PdaState *state = new PdaState();
+
+ /* Create the new state. */
+ stateList.append( state );
+
+ return state;
+}
+
+
+/* Follow from to the final state of srcFsm. */
+PdaState *PdaGraph::followFsm( PdaState *from, PdaGraph *srcFsm )
+{
+ PdaState *followSrc = srcFsm->startState;
+
+ while ( ! followSrc->isFinState() ) {
+ assert( followSrc->transMap.length() == 1 );
+ PdaTrans *followTrans = followSrc->transMap[0].value;
+
+ PdaTrans *inTrans = from->findTrans( followTrans->lowKey );
+ assert( inTrans != 0 );
+
+ from = inTrans->toState;
+ followSrc = followTrans->toState;
+ }
+
+ return from;
+}
+
+int PdaGraph::fsmLength( )
+{
+ int length = 0;
+ PdaState *state = startState;
+ while ( ! state->isFinState() ) {
+ length += 1;
+ state = state->transMap[0].value->toState;
+ }
+ return length;
+}
+
+/* Remove states that have no path to them from the start state. Recursively
+ * traverses the graph marking states that have paths into them. Then removes
+ * all states that did not get marked. */
+void PdaGraph::removeUnreachableStates()
+{
+ /* Mark all the states that can be reached
+ * through the existing set of entry points. */
+ if ( startState != 0 )
+ markReachableFromHere( startState );
+
+ for ( PdaStateSet::Iter si = entryStateSet; si.lte(); si++ )
+ markReachableFromHere( *si );
+
+ /* Delete all states that are not marked
+ * and unmark the ones that are marked. */
+ PdaState *state = stateList.head;
+ while ( state ) {
+ PdaState *next = state->next;
+
+ if ( state->stateBits & SB_ISMARKED )
+ state->stateBits &= ~ SB_ISMARKED;
+ else {
+ detachState( state );
+ stateList.detach( state );
+ delete state;
+ }
+
+ state = next;
+ }
+}
diff --git a/src/pdagraph.h b/src/pdagraph.h
new file mode 100644
index 0000000..af6eb3d
--- /dev/null
+++ b/src/pdagraph.h
@@ -0,0 +1,515 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _PDAGRAPH_H
+#define _PDAGRAPH_H
+
+#include <assert.h>
+#include "vector.h"
+#include "bstset.h"
+#include "compare.h"
+#include "avltree.h"
+#include "dlist.h"
+#include "bstmap.h"
+#include "sbstmap.h"
+#include "sbstset.h"
+#include "sbsttable.h"
+#include "avlset.h"
+#include "dlistmel.h"
+#include "avltree.h"
+
+/* Flags for states. */
+#define SB_ISFINAL 0x04
+#define SB_ISMARKED 0x08
+#define SB_ISSTART 0x10
+
+/* Flags for transitions. */
+#define TB_ISMARKED 0x01
+
+struct PdaTrans;
+struct PdaState;
+struct PdaGraph;
+struct TokenInstance;
+struct Production;
+struct LangEl;
+struct TokenRegion;
+
+typedef Vector<TokenRegion*> RegionVect;
+
+typedef Vector<long> ActDataList;
+
+struct ActionData
+{
+ ActionData( int targ, ActDataList &actions, int commitLen )
+ : targ(targ), commitLen(commitLen), id(0), actions(actions) { }
+
+ int targ;
+ int commitLen;
+ int id;
+
+ ActDataList actions;
+};
+
+
+struct CmpActionData
+{
+ static int compare( const ActionData &ap1, const ActionData &ap2 )
+ {
+ if ( ap1.targ < ap2.targ )
+ return -1;
+ else if ( ap1.targ > ap2.targ )
+ return 1;
+ else if ( ap1.commitLen < ap2.commitLen )
+ return -1;
+ else if ( ap1.commitLen > ap2.commitLen )
+ return 1;
+ else if ( ap1.id < ap2.id )
+ return -1;
+ else if ( ap1.id > ap2.id )
+ return 1;
+
+ return CmpTable< long, CmpOrd<long> >::
+ compare( ap1.actions, ap2.actions );
+ }
+};
+
+typedef AvlSet<ActionData, CmpActionData> PdaActionSet;
+typedef AvlSetEl<ActionData> PdaActionSetEl;
+
+/* List pointers for the closure queue. Goes into state. */
+struct ClosureQueueListEl { PdaState *prev, *next; };
+
+/* Queue of states, transitions to be closed. */
+typedef DListMel< PdaState, ClosureQueueListEl > StateClosureQueue;
+typedef DList<PdaTrans> TransClosureQueue;
+
+typedef BstSet< Production*, CmpOrd<Production*> > DefSet;
+typedef CmpTable< Production*, CmpOrd<Production*> > CmpDefSet;
+typedef BstSet< DefSet, CmpDefSet > DefSetSet;
+
+typedef Vector< Production* > DefVect;
+typedef BstSet< long, CmpOrd<long> > AlphSet;
+
+struct ExpandToEl
+{
+ ExpandToEl( PdaState *state, int prodId )
+ : state(state), prodId(prodId) { }
+
+ PdaState *state;
+ int prodId;
+};
+
+struct CmpExpandToEl
+{
+ static inline int compare( const ExpandToEl &etel1, const ExpandToEl &etel2 )
+ {
+ if ( etel1.state < etel2.state )
+ return -1;
+ else if ( etel1.state > etel2.state )
+ return 1;
+ else if ( etel1.prodId < etel2.prodId )
+ return -1;
+ else if ( etel1.prodId > etel2.prodId )
+ return 1;
+ else
+ return 0;
+ }
+};
+
+typedef BstSet<ExpandToEl, CmpExpandToEl> ExpandToSet;
+typedef BstSet< int, CmpOrd<int> > IntSet;
+typedef CmpTable< int, CmpOrd<int> > CmpIntSet;
+
+typedef BstSet< long, CmpOrd<long> > LongSet;
+typedef CmpTable< long, CmpOrd<long> > CmpLongSet;
+
+typedef BstMap< long, long, CmpOrd<long> > LongMap;
+typedef BstMapEl< long, long > LongMapEl;
+
+typedef LongSet ProdIdSet;
+typedef CmpLongSet CmpProdIdSet;
+
+/* Set of states, list of states. */
+typedef BstSet<PdaState*> PdaStateSet;
+typedef Vector<PdaState*> StateVect;
+typedef DList<PdaState> PdaStateList;
+
+typedef LongMap FollowToAdd;
+typedef LongMap ReductionMap;
+typedef LongMapEl ReductionMapEl;
+
+struct ProdIdPair
+{
+ ProdIdPair( int onReduce, int length )
+ : onReduce(onReduce), length(length) {}
+
+ int onReduce;
+ int length;
+};
+
+struct CmpProdIdPair
+{
+ static inline int compare( const ProdIdPair &pair1, const ProdIdPair &pair2 )
+ {
+ if ( pair1.onReduce < pair2.onReduce )
+ return -1;
+ else if ( pair1.onReduce > pair2.onReduce )
+ return 1;
+ else if ( pair1.length < pair2.length )
+ return -1;
+ else if ( pair1.length > pair2.length )
+ return 1;
+ else
+ return 0;
+ }
+};
+
+typedef BstSet< ProdIdPair, CmpProdIdPair > ProdIdPairSet;
+
+/* Transition class that implements actions and priorities. */
+struct PdaTrans
+{
+ PdaTrans() :
+ fromState(0),
+ toState(0),
+ isShift(false),
+ isShiftReduce(false),
+ shiftPrior(0),
+ noPreIgnore(false),
+ noPostIgnore(false)
+ { }
+
+ PdaTrans( const PdaTrans &other ) :
+ lowKey(other.lowKey),
+ fromState(0), toState(0),
+ isShift(other.isShift),
+ isShiftReduce(other.isShiftReduce),
+ shiftPrior(other.shiftPrior),
+ reductions(other.reductions),
+ commits(other.commits),
+ noPreIgnore(false),
+ noPostIgnore(false)
+ { }
+
+ long lowKey;
+ PdaState *fromState;
+ PdaState *toState;
+
+ /* Pointers for outlist. */
+ PdaTrans *prev, *next;
+
+ /* Pointers for in-list. */
+ PdaTrans *ilprev, *ilnext;
+
+ long maxPrior();
+
+ /* Parse Table construction data. */
+ bool isShift, isShiftReduce;
+ int shiftPrior;
+ ReductionMap reductions;
+ ActDataList actions;
+ ActDataList actOrds;
+ ActDataList actPriors;
+
+ ExpandToSet expandTo;
+
+ PdaActionSetEl *actionSetEl;
+
+ LongSet commits;
+ LongSet afterShiftCommits;
+
+ bool noPreIgnore;
+ bool noPostIgnore;
+};
+
+/* In transition list. Like DList except only has head pointers, which is all
+ * that is required. Insertion and deletion is handled by the graph. This
+ * class provides the iterator of a single list. */
+struct PdaTransInList
+{
+ PdaTransInList() : head(0) { }
+
+ PdaTrans *head;
+
+ struct Iter
+ {
+ /* Default construct. */
+ Iter() : ptr(0) { }
+
+ /* Construct, assign from a list. */
+ Iter( const PdaTransInList &il ) : ptr(il.head) { }
+ Iter &operator=( const PdaTransInList &dl ) { ptr = dl.head; return *this; }
+
+ /* At the end */
+ bool lte() const { return ptr != 0; }
+ bool end() const { return ptr == 0; }
+
+ /* At the first, last element. */
+ bool first() const { return ptr && ptr->ilprev == 0; }
+ bool last() const { return ptr && ptr->ilnext == 0; }
+
+ /* Cast, dereference, arrow ops. */
+ operator PdaTrans*() const { return ptr; }
+ PdaTrans &operator *() const { return *ptr; }
+ PdaTrans *operator->() const { return ptr; }
+
+ /* Increment, decrement. */
+ inline void operator++(int) { ptr = ptr->ilnext; }
+ inline void operator--(int) { ptr = ptr->ilprev; }
+
+ /* The iterator is simply a pointer. */
+ PdaTrans *ptr;
+ };
+};
+
+typedef DList<PdaTrans> PdaTransList;
+
+/* A element in a state dict. */
+struct PdaStateDictEl
+:
+ public AvlTreeEl<PdaStateDictEl>
+{
+ PdaStateDictEl(const PdaStateSet &stateSet)
+ : stateSet(stateSet) { }
+
+ const PdaStateSet &getKey() { return stateSet; }
+ PdaStateSet stateSet;
+ PdaState *targState;
+};
+
+/* Dictionary mapping a set of states to a target state. */
+typedef AvlTree< PdaStateDictEl, PdaStateSet, CmpTable<PdaState*> > PdaStateDict;
+
+/* What items does a particular state encompass. */
+typedef BstSet< long, CmpOrd<long> > DotSet;
+typedef CmpTable< long, CmpOrd<long> > CmpDotSet;
+
+/* Map of dot sets to states. */
+typedef AvlTree< PdaState, DotSet, CmpDotSet > DotSetMap;
+typedef PdaState DotSetMapEl;
+
+typedef BstMap< long, PdaTrans* > TransMap;
+typedef BstMapEl< long, PdaTrans* > TransMapEl;
+
+/* State class that implements actions and priorities. */
+struct PdaState
+:
+ public ClosureQueueListEl,
+ public AvlTreeEl< PdaState >
+{
+ PdaState();
+ PdaState(const PdaState &other);
+ ~PdaState();
+
+ /* Is the state final? */
+ bool isFinState() { return stateBits & SB_ISFINAL; }
+
+ PdaTrans *findTrans( long key )
+ {
+ TransMapEl *transMapEl = transMap.find( key );
+ if ( transMapEl == 0 )
+ return 0;
+ return transMapEl->value;
+ }
+
+ /* In transition list. */
+ PdaTransInList inRange;
+
+ ProdIdPairSet pendingCommits;
+
+ /* When duplicating the fsm we need to map each
+ * state to the new state representing it. */
+ PdaState *stateMap;
+
+ /* When merging states (state machine operations) this next pointer is
+ * used for the list of states that need to be filled in. */
+ PdaState *alg_next;
+
+ PdaStateSet *stateSet;
+
+ /* Identification for printing and stable minimization. */
+ int stateNum;
+
+ /* A pointer to a dict element that contains the set of states this state
+ * represents. This cannot go into alg, because alg.next is used during
+ * the merging process. */
+ PdaStateDictEl *stateDictEl;
+
+ /* Bits controlling the behaviour of the state during collapsing to dfa. */
+ int stateBits;
+
+ /* State list elements. */
+ PdaState *next, *prev;
+
+ /* For dotset map. */
+ DotSet &getKey() { return dotSet; }
+
+ /* Closure management. */
+ DotSet dotSet;
+ DotSet dotSet2;
+ bool onClosureQueue;
+ bool inClosedMap;
+ bool followMarked;
+ bool onStateList;
+
+ TransMap transMap;
+
+ RegionVect regions;
+ RegionVect preRegions;
+
+ bool advanceReductions;
+};
+
+/* Compare lists of epsilon transitions. Entries are name ids of targets. */
+typedef CmpTable< int, CmpOrd<int> > CmpEpsilonTrans;
+
+/* Compare sets of context values. */
+typedef CmpTable< int, CmpOrd<int> > CmpContextSets;
+
+/* Graph class that implements actions and priorities. */
+struct PdaGraph
+{
+ /* Constructors/Destructors. */
+ PdaGraph();
+ PdaGraph( const PdaGraph &graph );
+ ~PdaGraph();
+
+ /* The list of states. */
+ PdaStateList stateList;
+ PdaStateList misfitList;
+
+ /* The start state. */
+ PdaState *startState;
+ PdaStateSet entryStateSet;
+
+ /* The set of final states. */
+ PdaStateSet finStateSet;
+
+ /* Closure queues and maps. */
+ DotSetMap closedMap;
+ StateClosureQueue stateClosureQueue;
+ StateClosureQueue stateClosedList;
+
+ TransClosureQueue transClosureQueue;
+ PdaState *stateClosureHead;
+
+ LangEl **langElIndex;
+
+ void setStartState( PdaState *state );
+ void unsetStartState( );
+
+ /*
+ * Basic attaching and detaching.
+ */
+
+ /* Common to attaching/detaching list and default. */
+ void attachToInList( PdaState *from, PdaState *to, PdaTrans *&head, PdaTrans *trans );
+ void detachFromInList( PdaState *from, PdaState *to, PdaTrans *&head, PdaTrans *trans );
+
+ /* Attach with a new transition. */
+ PdaTrans *appendNewTrans( PdaState *from, PdaState *to, long onChar1, long );
+ PdaTrans *insertNewTrans( PdaState *from, PdaState *to, long lowKey, long );
+
+ /* Attach with an existing transition that already in an out list. */
+ void attachTrans( PdaState *from, PdaState *to, PdaTrans *trans );
+
+ /* Detach a transition from a target state. */
+ void detachTrans( PdaState *from, PdaState *to, PdaTrans *trans );
+
+ /* Detach a state from the graph. */
+ void detachState( PdaState *state );
+
+ /*
+ * Callbacks.
+ */
+
+ /* Add in the properties of srcTrans into this. */
+ void addInReduction( PdaTrans *dest, long prodId, long prior );
+ void addInTrans( PdaTrans *destTrans, PdaTrans *srcTrans );
+ void addInState( PdaState *destState, PdaState *srcState );
+
+ /*
+ * Allocation.
+ */
+
+ /* New up a state and add it to the graph. */
+ PdaState *addState();
+
+ /*
+ * Fsm operators.
+ */
+
+ /* Follow to the fin state of src fsm. */
+ PdaState *followFsm( PdaState *from, PdaGraph *srcFsm );
+
+ /*
+ * Final states
+ */
+
+ /* Set and Unset a state as final. */
+ void setFinState( PdaState *state );
+ void unsetFinState( PdaState *state );
+ void unsetAllFinStates( );
+
+ /* Set State numbers starting at 0. */
+ void setStateNumbers();
+
+ /*
+ * Path pruning
+ */
+
+ /* Mark all states reachable from state. */
+ void markReachableFromHere( PdaState *state );
+
+ /* Removes states that cannot be reached by any path in the fsm and are
+ * thus wasted silicon. */
+ void removeUnreachableStates();
+
+ /* Remove error actions from states on which the error transition will
+ * never be taken. */
+ bool outListCovers( PdaState *state );
+
+ /* Remove states that are on the misfit list. */
+ void removeMisfits();
+
+
+ /*
+ * Other
+ */
+
+ /* Move the in trans into src into dest. */
+ void inTransMove(PdaState *dest, PdaState *src);
+
+ int fsmLength( );
+
+ /* Collected machine information. */
+ unsigned long long maxState;
+ unsigned long long maxAction;
+ unsigned long long maxLelId;
+ unsigned long long maxOffset;
+ unsigned long long maxIndex;
+ unsigned long long maxProdLen;
+
+ PdaActionSet actionSet;
+};
+
+
+#endif /* _FSMGRAPH_H */
diff --git a/src/pdarun.c b/src/pdarun.c
new file mode 100644
index 0000000..5b85f5e
--- /dev/null
+++ b/src/pdarun.c
@@ -0,0 +1,2201 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "config.h"
+#include "debug.h"
+#include "pdarun.h"
+#include "bytecode.h"
+#include "tree.h"
+#include "pool.h"
+
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#define true 1
+#define false 0
+
+#define act_sb 0x1
+#define act_rb 0x2
+
+#define read_word_p( i, p ) do { \
+ i = ((Word) p[0]); \
+ i |= ((Word) p[1]) << 8; \
+ i |= ((Word) p[2]) << 16; \
+ i |= ((Word) p[3]) << 24; \
+} while(0)
+
+#define read_tree_p( i, p ) do { \
+ Word w; \
+ w = ((Word) p[0]); \
+ w |= ((Word) p[1]) << 8; \
+ w |= ((Word) p[2]) << 16; \
+ w |= ((Word) p[3]) << 24; \
+ i = (Tree*)w; \
+} while(0)
+
+static void initFsmRun( Program *prg, FsmRun *fsmRun )
+{
+ fsmRun->tables = prg->rtd->fsmTables;
+
+ fsmRun->consumeBuf = 0;
+
+ fsmRun->p = fsmRun->pe = 0;
+ fsmRun->toklen = 0;
+ fsmRun->eof = 0;
+
+ fsmRun->preRegion = -1;
+}
+
+void clearFsmRun( Program *prg, FsmRun *fsmRun )
+{
+ if ( fsmRun->consumeBuf != 0 ) {
+ /* Transfer the run buf list to the program */
+ RunBuf *head = fsmRun->consumeBuf;
+ RunBuf *tail = head;
+ while ( tail->next != 0 )
+ tail = tail->next;
+
+ tail->next = prg->allocRunBuf;
+ prg->allocRunBuf = head;
+ }
+}
+
+void incrementSteps( PdaRun *pdaRun )
+{
+ pdaRun->steps += 1;
+ //debug( prg, REALM_PARSE, "steps up to %ld\n", pdaRun->steps );
+}
+
+void decrementSteps( PdaRun *pdaRun )
+{
+ pdaRun->steps -= 1;
+ //debug( prg, REALM_PARSE, "steps down to %ld\n", pdaRun->steps );
+}
+
+Head *streamPull( Program *prg, PdaRun *pdaRun, StreamImpl *is, long length )
+{
+ if ( pdaRun != 0 ) {
+ FsmRun *fsmRun = pdaRun->fsmRun;
+ RunBuf *runBuf = fsmRun->consumeBuf;
+ if ( length > ( FSM_BUFSIZE - runBuf->length ) ) {
+ runBuf = newRunBuf();
+ runBuf->next = fsmRun->consumeBuf;
+ fsmRun->consumeBuf = runBuf;
+ }
+
+ char *dest = runBuf->data + runBuf->length;
+
+ is->funcs->getData( is, dest, length );
+ Location *loc = locationAllocate( prg );
+ is->funcs->consumeData( is, length, loc );
+
+ runBuf->length += length;
+
+ fsmRun->p = fsmRun->pe = 0;
+ fsmRun->toklen = 0;
+
+ Head *tokdata = stringAllocPointer( prg, dest, length );
+ tokdata->location = loc;
+
+ return tokdata;
+ }
+ else {
+ Head *head = initStrSpace( length );
+ char *dest = (char*)head->data;
+
+ is->funcs->getData( is, dest, length );
+ Location *loc = locationAllocate( prg );
+ is->funcs->consumeData( is, length, loc );
+ head->location = loc;
+
+ return head;
+ }
+}
+
+void undoStreamPull( StreamImpl *is, const char *data, long length )
+{
+ //debug( REALM_PARSE, "undoing stream pull\n" );
+
+ is->funcs->prependData( is, data, length );
+}
+
+void streamPushText( StreamImpl *is, const char *data, long length )
+{
+ is->funcs->prependData( is, data, length );
+}
+
+void streamPushTree( StreamImpl *is, Tree *tree, int ignore )
+{
+ is->funcs->prependTree( is, tree, ignore );
+}
+
+void streamPushStream( StreamImpl *is, Tree *tree )
+{
+ is->funcs->prependStream( is, tree );
+}
+
+void undoStreamPush( Program *prg, Tree **sp, StreamImpl *is, long length )
+{
+ if ( length < 0 ) {
+ Tree *tree = is->funcs->undoPrependTree( is );
+ treeDownref( prg, sp, tree );
+ }
+ else {
+ is->funcs->undoPrependData( is, length );
+ }
+}
+
+void undoStreamAppend( Program *prg, Tree **sp, StreamImpl *is, Tree *input, long length )
+{
+ if ( input->id == LEL_ID_STR )
+ is->funcs->undoAppendData( is, length );
+ else if ( input->id == LEL_ID_STREAM )
+ is->funcs->undoAppendStream( is );
+ else {
+ Tree *tree = is->funcs->undoAppendTree( is );
+ treeDownref( prg, sp, tree );
+ }
+}
+
+/* Should only be sending back whole tokens/ignores, therefore the send back
+ * should never cross a buffer boundary. Either we slide back data, or we move to
+ * a previous buffer and slide back data. */
+static void sendBackText( FsmRun *fsmRun, StreamImpl *is, const char *data, long length )
+{
+ //debug( REALM_PARSE, "push back of %ld characters\n", length );
+
+ if ( length == 0 )
+ return;
+
+ //debug( REALM_PARSE, "sending back text: %.*s\n",
+ // (int)length, data );
+
+ is->funcs->undoConsumeData( is, data, length );
+}
+
+void sendBackTree( StreamImpl *is, Tree *tree )
+{
+ is->funcs->undoConsumeTree( is, tree, false );
+}
+
+/*
+ * Stops on:
+ * PcrRevIgnore
+ */
+static void sendBackIgnore( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun,
+ StreamImpl *is, ParseTree *parseTree )
+{
+ #ifdef DEBUG
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+ debug( prg, REALM_PARSE, "sending back: %s%s\n",
+ lelInfo[parseTree->shadow->tree->id].name,
+ parseTree->flags & PF_ARTIFICIAL ? " (artificial)" : "" );
+ #endif
+
+ Head *head = parseTree->shadow->tree->tokdata;
+ int artificial = parseTree->flags & PF_ARTIFICIAL;
+
+ if ( head != 0 && !artificial )
+ sendBackText( fsmRun, is, stringData( head ), head->length );
+
+ decrementSteps( pdaRun );
+
+ /* Check for reverse code. */
+ if ( parseTree->flags & PF_HAS_RCODE ) {
+ pdaRun->onDeck = true;
+ parseTree->flags &= ~PF_HAS_RCODE;
+ }
+
+ if ( pdaRun->steps == pdaRun->targetSteps ) {
+ debug( prg, REALM_PARSE, "trigger parse stop, steps = target = %d\n", pdaRun->targetSteps );
+ pdaRun->stop = true;
+ }
+}
+
+void resetToken( PdaRun *pdaRun )
+{
+ FsmRun *fsmRun = pdaRun->fsmRun;
+
+ /* If there is a token started, but never finished for a lack of data, we
+ * must first backup over it. */
+ if ( fsmRun->tokstart != 0 ) {
+ fsmRun->p = fsmRun->pe = 0;
+ fsmRun->toklen = 0;
+ fsmRun->eof = 0;
+ }
+}
+
+/* Stops on:
+ * PcrRevToken
+ */
+
+static void sendBack( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun,
+ StreamImpl *is, ParseTree *parseTree )
+{
+ debug( prg, REALM_PARSE, "sending back: %s\n", prg->rtd->lelInfo[parseTree->id].name );
+
+ if ( parseTree->flags & PF_NAMED ) {
+ /* Send the named lang el back first, then send back any leading
+ * whitespace. */
+ is->funcs->undoConsumeLangEl( is );
+ }
+
+ decrementSteps( pdaRun );
+
+ /* Artifical were not parsed, instead sent in as items. */
+ if ( parseTree->flags & PF_ARTIFICIAL ) {
+ /* Check for reverse code. */
+ if ( parseTree->flags & PF_HAS_RCODE ) {
+ debug( prg, REALM_PARSE, "tree has rcode, setting on deck\n" );
+ pdaRun->onDeck = true;
+ parseTree->flags &= ~PF_HAS_RCODE;
+ }
+
+ treeUpref( parseTree->shadow->tree );
+
+ sendBackTree( is, parseTree->shadow->tree );
+ }
+ else {
+ /* Check for reverse code. */
+ if ( parseTree->flags & PF_HAS_RCODE ) {
+ debug( prg, REALM_PARSE, "tree has rcode, setting on deck\n" );
+ pdaRun->onDeck = true;
+ parseTree->flags &= ~PF_HAS_RCODE;
+ }
+
+ /* Push back the token data. */
+ sendBackText( fsmRun, is, stringData( parseTree->shadow->tree->tokdata ),
+ stringLength( parseTree->shadow->tree->tokdata ) );
+
+ /* If eof was just sent back remember that it needs to be sent again. */
+ if ( parseTree->id == prg->rtd->eofLelIds[pdaRun->parserId] )
+ is->eofSent = false;
+
+ /* If the item is bound then store remove it from the bindings array. */
+ prg->rtd->popBinding( pdaRun, parseTree );
+ }
+
+ if ( pdaRun->steps == pdaRun->targetSteps ) {
+ debug( prg, REALM_PARSE, "trigger parse stop, steps = target = %d\n", pdaRun->targetSteps );
+ pdaRun->stop = true;
+ }
+
+ /* Downref the tree that was sent back and free the kid. */
+ treeDownref( prg, sp, parseTree->shadow->tree );
+ kidFree( prg, parseTree->shadow );
+ parseTreeFree( prg, parseTree );
+}
+
+void setRegion( PdaRun *pdaRun, int emptyIgnore, ParseTree *tree )
+{
+ if ( emptyIgnore ) {
+ /* Recording the next region. */
+ tree->region = pdaRun->nextRegionInd;
+ if ( pdaRun->tables->tokenRegions[tree->region+1] != 0 )
+ pdaRun->numRetry += 1;
+ }
+}
+
+void ignoreTree( Program *prg, FsmRun *fsmRun, PdaRun *pdaRun, Tree *tree )
+{
+ int emptyIgnore = pdaRun->accumIgnore == 0;
+
+ incrementSteps( pdaRun );
+
+ ParseTree *parseTree = parseTreeAllocate( prg );
+ parseTree->shadow = kidAllocate( prg );
+ parseTree->shadow->tree = tree;
+
+ parseTree->next = pdaRun->accumIgnore;
+ pdaRun->accumIgnore = parseTree;
+
+ transferReverseCode( pdaRun, parseTree );
+
+ if ( fsmRun->preRegion >= 0 )
+ parseTree->flags |= PF_RIGHT_IGNORE;
+
+ setRegion( pdaRun, emptyIgnore, pdaRun->accumIgnore );
+}
+
+void ignoreTree2( Program *prg, PdaRun *pdaRun, Tree *tree )
+{
+ int emptyIgnore = pdaRun->accumIgnore == 0;
+
+ incrementSteps( pdaRun );
+
+ ParseTree *parseTree = parseTreeAllocate( prg );
+ parseTree->flags |= PF_ARTIFICIAL;
+ parseTree->shadow = kidAllocate( prg );
+ parseTree->shadow->tree = tree;
+
+ parseTree->next = pdaRun->accumIgnore;
+ pdaRun->accumIgnore = parseTree;
+
+ transferReverseCode( pdaRun, parseTree );
+
+ setRegion( pdaRun, emptyIgnore, pdaRun->accumIgnore );
+}
+
+Kid *makeTokenWithData( Program *prg, PdaRun *pdaRun, FsmRun *fsmRun,
+ StreamImpl *is, int id, Head *tokdata )
+{
+ /* Make the token object. */
+ long objectLength = prg->rtd->lelInfo[id].objectLength;
+ Kid *attrs = allocAttrs( prg, objectLength );
+
+ Kid *input = 0;
+ input = kidAllocate( prg );
+ input->tree = treeAllocate( prg );
+
+ debug( prg, REALM_PARSE, "made token %p\n", input->tree );
+
+ input->tree->refs = 1;
+ input->tree->id = id;
+ input->tree->tokdata = tokdata;
+
+ /* No children and ignores get added later. */
+ input->tree->child = attrs;
+
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+ if ( lelInfo[id].numCaptureAttr > 0 ) {
+ int i;
+ for ( i = 0; i < lelInfo[id].numCaptureAttr; i++ ) {
+ CaptureAttr *ca = &prg->rtd->captureAttr[lelInfo[id].captureAttr + i];
+ Head *data = stringAllocFull( prg,
+ fsmRun->mark[ca->mark_enter], fsmRun->mark[ca->mark_leave]
+ - fsmRun->mark[ca->mark_enter] );
+ Tree *string = constructString( prg, data );
+ treeUpref( string );
+ setAttr( input->tree, ca->offset, string );
+ }
+ }
+
+ return input;
+}
+
+void clearIgnoreList( Program *prg, Tree **sp, Kid *kid )
+{
+ while ( kid != 0 ) {
+ Kid *next = kid->next;
+ treeDownref( prg, sp, kid->tree );
+ kidFree( prg, kid );
+ kid = next;
+ }
+}
+
+static void reportParseError( Program *prg, Tree **sp, PdaRun *pdaRun )
+{
+ Kid *kid = pdaRun->btPoint;
+ Head *deepest = 0;
+ while ( kid != 0 ) {
+ Head *head = kid->tree->tokdata;
+ if ( head != 0 && head->location != 0 ) {
+ if ( deepest == 0 || head->location->byte > deepest->location->byte )
+ deepest = head;
+ }
+ kid = kid->next;
+ }
+
+ Head *errorHead = 0;
+
+ /* If there are no error points on record assume the error occurred at the
+ * beginning of the stream. */
+ if ( deepest == 0 ) {
+ errorHead = stringAllocFull( prg, "<input>:1:1: parse error", 32 );
+ errorHead->location = locationAllocate( prg );
+ errorHead->location->line = 1;
+ errorHead->location->column = 1;
+ }
+ else {
+ debug( prg, REALM_PARSE, "deepest location byte: %d\n", deepest->location->byte );
+
+ const char *name = deepest->location->name;
+ long line = deepest->location->line;
+ long i, column = deepest->location->column;
+ long byte = deepest->location->byte;
+
+ for ( i = 0; i < deepest->length; i++ ) {
+ if ( deepest->data[i] != '\n' )
+ column += 1;
+ else {
+ line += 1;
+ column = 1;
+ }
+ byte += 1;
+ }
+
+ if ( name == 0 )
+ name = "<input>";
+ char *formatted = malloc( strlen( name ) + 128 );
+ sprintf( formatted, "%s:%ld:%ld: parse error", name, line, column );
+ errorHead = stringAllocFull( prg, formatted, strlen(formatted) );
+ free( formatted );
+
+ errorHead->location = locationAllocate( prg );
+
+ errorHead->location->name = deepest->location->name;
+ errorHead->location->line = line;
+ errorHead->location->column = column;
+ errorHead->location->byte = byte;
+ }
+
+ Tree *tree = constructString( prg, errorHead );
+ treeDownref( prg, sp, pdaRun->parseErrorText );
+ pdaRun->parseErrorText = tree;
+ treeUpref( pdaRun->parseErrorText );
+}
+
+static void attachRightIgnore( Program *prg, Tree **sp, PdaRun *pdaRun, ParseTree *parseTree )
+{
+ if ( pdaRun->accumIgnore == 0 )
+ return;
+
+ if ( pdaRun->stackTop->id > 0 && pdaRun->stackTop->id < prg->rtd->firstNonTermId ) {
+ /* OK, do it */
+ debug( prg, REALM_PARSE, "attaching right ignore\n" );
+
+ /* Reset. */
+ assert( ! ( parseTree->flags & PF_RIGHT_IL_ATTACHED ) );
+
+ ParseTree *accum = pdaRun->accumIgnore;
+
+ ParseTree *stopAt = 0, *use = accum;
+ while ( use != 0 ) {
+ if ( ! (use->flags & PF_RIGHT_IGNORE) )
+ stopAt = use;
+ use = use->next;
+ }
+
+ if ( stopAt != 0 ) {
+ /* Stop at was set. Make it the last item in the igore list. Take
+ * the rest. */
+ accum = stopAt->next;
+ stopAt->next = 0;
+ }
+ else {
+ /* Stop at was never set. All right ignore. Use it all. */
+ pdaRun->accumIgnore = 0;
+ }
+
+ /* The data list needs to be extracted and reversed. The parse tree list
+ * can remain in stack order. */
+ ParseTree *child = accum, *last = 0;
+ Kid *dataChild = 0, *dataLast = 0;
+
+ while ( child ) {
+ dataChild = child->shadow;
+ ParseTree *next = child->next;
+
+ /* Reverse the lists. */
+ dataChild->next = dataLast;
+ child->next = last;
+
+ /* Detach the parse tree from the data tree. */
+ child->shadow = 0;
+
+ /* Keep the last for reversal. */
+ dataLast = dataChild;
+ last = child;
+
+ child = next;
+ }
+
+ /* Last is now the first. */
+ parseTree->rightIgnore = last;
+
+ if ( dataChild != 0 ) {
+ debug( prg, REALM_PARSE, "attaching ignore right\n" );
+
+ Kid *ignoreKid = dataLast;
+
+ /* Copy the ignore list first if we need to attach it as a right
+ * ignore. */
+ Tree *rightIgnore = 0;
+
+ rightIgnore = treeAllocate( prg );
+ rightIgnore->id = LEL_ID_IGNORE;
+ rightIgnore->child = ignoreKid;
+
+ Tree *pushTo = parseTree->shadow->tree;
+
+ pushTo = pushRightIgnore( prg, pushTo, rightIgnore );
+
+ parseTree->shadow->tree = pushTo;
+
+ parseTree->flags |= PF_RIGHT_IL_ATTACHED;
+ }
+ }
+}
+
+static void attachLeftIgnore( Program *prg, Tree **sp, PdaRun *pdaRun, ParseTree *parseTree )
+{
+ /* Reset. */
+ assert( ! ( parseTree->flags & PF_LEFT_IL_ATTACHED ) );
+
+ ParseTree *accum = pdaRun->accumIgnore;
+ pdaRun->accumIgnore = 0;
+
+ /* The data list needs to be extracted and reversed. The parse tree list
+ * can remain in stack order. */
+ ParseTree *child = accum, *last = 0;
+ Kid *dataChild = 0, *dataLast = 0;
+
+ while ( child ) {
+ dataChild = child->shadow;
+ ParseTree *next = child->next;
+
+ /* Reverse the lists. */
+ dataChild->next = dataLast;
+ child->next = last;
+
+ /* Detach the parse tree from the data tree. */
+ child->shadow = 0;
+
+ /* Keep the last for reversal. */
+ dataLast = dataChild;
+ last = child;
+
+ child = next;
+ }
+
+ /* Last is now the first. */
+ parseTree->leftIgnore = last;
+
+ if ( dataChild != 0 ) {
+ debug( prg, REALM_PARSE, "attaching left ignore\n" );
+
+ Kid *ignoreKid = dataChild;
+
+ /* Make the ignore list for the left-ignore. */
+ Tree *leftIgnore = treeAllocate( prg );
+ leftIgnore->id = LEL_ID_IGNORE;
+ leftIgnore->child = ignoreKid;
+
+ Tree *pushTo = parseTree->shadow->tree;
+
+ pushTo = pushLeftIgnore( prg, pushTo, leftIgnore );
+
+ parseTree->shadow->tree = pushTo;
+
+ parseTree->flags |= PF_LEFT_IL_ATTACHED;
+ }
+}
+
+/* Not currently used. Need to revive this. WARNING: untested changes here */
+static void detachRightIgnore( Program *prg, Tree **sp, PdaRun *pdaRun, ParseTree *parseTree )
+{
+ /* Right ignore are immediately discarded since they are copies of
+ * left-ignores. */
+ Tree *rightIgnore = 0;
+ if ( parseTree->flags & PF_RIGHT_IL_ATTACHED ) {
+ Tree *popFrom = parseTree->shadow->tree;
+
+ popFrom = popRightIgnore( prg, sp, popFrom, &rightIgnore );
+
+ parseTree->shadow->tree = popFrom;
+
+ parseTree->flags &= ~PF_RIGHT_IL_ATTACHED;
+ }
+
+ if ( parseTree->rightIgnore != 0 ) {
+ assert( rightIgnore != 0 );
+
+ /* Transfer the trees to accumIgnore. */
+ ParseTree *ignore = parseTree->rightIgnore;
+ parseTree->rightIgnore = 0;
+
+ Kid *dataIgnore = rightIgnore->child;
+ rightIgnore->child = 0;
+
+ ParseTree *last = 0;
+ Kid *dataLast = 0;
+ while ( ignore != 0 ) {
+ ParseTree *next = ignore->next;
+ Kid *dataNext = dataIgnore->next;
+
+ /* Put the data trees underneath the parse trees. */
+ ignore->shadow = dataIgnore;
+
+ /* Reverse. */
+ ignore->next = last;
+ dataIgnore->next = dataLast;
+
+ /* Keep last for reversal. */
+ last = ignore;
+ dataLast = dataIgnore;
+
+ ignore = next;
+ dataIgnore = dataNext;
+ }
+
+ pdaRun->accumIgnore = last;
+
+ treeDownref( prg, sp, rightIgnore );
+ }
+}
+
+static void detachLeftIgnore( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, ParseTree *parseTree )
+{
+ /* Detach left. */
+ Tree *leftIgnore = 0;
+ if ( parseTree->flags & PF_LEFT_IL_ATTACHED ) {
+ Tree *popFrom = parseTree->shadow->tree;
+
+ popFrom = popLeftIgnore( prg, sp, popFrom, &leftIgnore );
+
+ parseTree->shadow->tree = popFrom;
+
+ parseTree->flags &= ~PF_LEFT_IL_ATTACHED;
+ }
+
+ if ( parseTree->leftIgnore != 0 ) {
+ assert( leftIgnore != 0 );
+
+ /* Transfer the trees to accumIgnore. */
+ ParseTree *ignore = parseTree->leftIgnore;
+ parseTree->leftIgnore = 0;
+
+ Kid *dataIgnore = leftIgnore->child;
+ leftIgnore->child = 0;
+
+ ParseTree *last = 0;
+ Kid *dataLast = 0;
+ while ( ignore != 0 ) {
+ ParseTree *next = ignore->next;
+ Kid *dataNext = dataIgnore->next;
+
+ /* Put the data trees underneath the parse trees. */
+ ignore->shadow = dataIgnore;
+
+ /* Reverse. */
+ ignore->next = last;
+ dataIgnore->next = dataLast;
+
+ /* Keep last for reversal. */
+ last = ignore;
+ dataLast = dataIgnore;
+
+ ignore = next;
+ dataIgnore = dataNext;
+ }
+
+ pdaRun->accumIgnore = last;
+ }
+
+ treeDownref( prg, sp, leftIgnore );
+}
+
+void handleError( Program *prg, Tree **sp, PdaRun *pdaRun )
+{
+ /* Check the result. */
+ if ( pdaRun->parseError ) {
+ /* Error occured in the top-level parser. */
+ reportParseError( prg, sp, pdaRun );
+ }
+ else {
+ if ( isParserStopFinished( pdaRun ) ) {
+ debug( prg, REALM_PARSE, "stopping the parse\n" );
+ pdaRun->stopParsing = true;
+ }
+ }
+}
+
+static Head *extractMatch( Program *prg, FsmRun *fsmRun, StreamImpl *is )
+{
+ long length = fsmRun->toklen;
+
+ //debug( prg, REALM_PARSE, "extracting token of length: %ld\n", length );
+
+ RunBuf *runBuf = fsmRun->consumeBuf;
+ if ( runBuf == 0 || length > ( FSM_BUFSIZE - runBuf->length ) ) {
+ runBuf = newRunBuf();
+ runBuf->next = fsmRun->consumeBuf;
+ fsmRun->consumeBuf = runBuf;
+ }
+
+ char *dest = runBuf->data + runBuf->length;
+
+ is->funcs->getData( is, dest, length );
+ Location *location = locationAllocate( prg );
+ is->funcs->consumeData( is, length, location );
+
+ runBuf->length += length;
+
+ fsmRun->p = fsmRun->pe = 0;
+ fsmRun->toklen = 0;
+ fsmRun->tokstart = 0;
+
+ Head *head = stringAllocPointer( prg, dest, length );
+
+ head->location = location;
+
+ debug( prg, REALM_PARSE, "location byte: %d\n", is->byte );
+
+ return head;
+}
+
+static Head *peekMatch( Program *prg, FsmRun *fsmRun, StreamImpl *is )
+{
+ long length = fsmRun->toklen;
+
+ RunBuf *runBuf = fsmRun->consumeBuf;
+ if ( runBuf == 0 || length > ( FSM_BUFSIZE - runBuf->length ) ) {
+ runBuf = newRunBuf();
+ runBuf->next = fsmRun->consumeBuf;
+ fsmRun->consumeBuf = runBuf;
+ }
+
+ char *dest = runBuf->data + runBuf->length;
+
+ is->funcs->getData( is, dest, length );
+
+ fsmRun->p = fsmRun->pe = 0;
+ fsmRun->toklen = 0;
+
+ Head *head = stringAllocPointer( prg, dest, length );
+
+ head->location = locationAllocate( prg );
+ head->location->line = is->line;
+ head->location->column = is->column;
+ head->location->byte = is->byte;
+
+ debug( prg, REALM_PARSE, "location byte: %d\n", is->byte );
+
+ return head;
+}
+
+
+static void sendIgnore( Program *prg, Tree **sp, StreamImpl *is, FsmRun *fsmRun, PdaRun *pdaRun, long id )
+{
+ debug( prg, REALM_PARSE, "ignoring: %s\n", prg->rtd->lelInfo[id].name );
+
+ /* Make the ignore string. */
+ Head *ignoreStr = extractMatch( prg, fsmRun, is );
+
+ debug( prg, REALM_PARSE, "ignoring: %.*s\n", ignoreStr->length, ignoreStr->data );
+
+ Tree *tree = treeAllocate( prg );
+ tree->refs = 1;
+ tree->id = id;
+ tree->tokdata = ignoreStr;
+
+ /* Send it to the pdaRun. */
+ ignoreTree( prg, fsmRun, pdaRun, tree );
+}
+
+
+static void sendToken( Program *prg, Tree **sp, StreamImpl *is, FsmRun *fsmRun, PdaRun *pdaRun, long id )
+{
+ int emptyIgnore = pdaRun->accumIgnore == 0;
+
+ /* Make the token data. */
+ Head *tokdata = extractMatch( prg, fsmRun, is );
+
+ debug( prg, REALM_PARSE, "token: %s text: %.*s\n",
+ prg->rtd->lelInfo[id].name,
+ stringLength(tokdata), stringData(tokdata) );
+
+ Kid *input = makeTokenWithData( prg, pdaRun, fsmRun, is, id, tokdata );
+
+ incrementSteps( pdaRun );
+
+ ParseTree *parseTree = parseTreeAllocate( prg );
+ parseTree->id = input->tree->id;
+ parseTree->shadow = input;
+
+ pdaRun->parseInput = parseTree;
+
+ /* Store any alternate scanning region. */
+ if ( input != 0 && pdaRun->cs >= 0 )
+ setRegion( pdaRun, emptyIgnore, parseTree );
+}
+
+static void sendTree( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *is )
+{
+ Kid *input = kidAllocate( prg );
+ input->tree = is->funcs->consumeTree( is );
+
+ incrementSteps( pdaRun );
+
+ ParseTree *parseTree = parseTreeAllocate( prg );
+ parseTree->id = input->tree->id;
+ parseTree->flags |= PF_ARTIFICIAL;
+ parseTree->shadow = input;
+
+ pdaRun->parseInput = parseTree;
+}
+
+static void sendIgnoreTree( Program *prg, Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *is )
+{
+ Tree *tree = is->funcs->consumeTree( is );
+ ignoreTree2( prg, pdaRun, tree );
+}
+
+static void sendCi( Program *prg, Tree **sp, StreamImpl *is, FsmRun *fsmRun, PdaRun *pdaRun, int id )
+{
+ debug( prg, REALM_PARSE, "token: CI\n" );
+
+ int emptyIgnore = pdaRun->accumIgnore == 0;
+
+ /* Make the token data. */
+ Head *tokdata = headAllocate( prg );
+ tokdata->location = locationAllocate( prg );
+ tokdata->location->line = is->line;
+ tokdata->location->column = is->column;
+ tokdata->location->byte = is->byte;
+
+ debug( prg, REALM_PARSE, "token: %s text: %.*s\n",
+ prg->rtd->lelInfo[id].name,
+ stringLength(tokdata), stringData(tokdata) );
+
+ Kid *input = makeTokenWithData( prg, pdaRun, fsmRun, is, id, tokdata );
+
+ incrementSteps( pdaRun );
+
+ ParseTree *parseTree = parseTreeAllocate( prg );
+ parseTree->id = input->tree->id;
+ parseTree->shadow = input;
+
+ pdaRun->parseInput = parseTree;
+
+ /* Store any alternate scanning region. */
+ if ( input != 0 && pdaRun->cs >= 0 )
+ setRegion( pdaRun, emptyIgnore, parseTree );
+}
+
+
+static void sendEof( Program *prg, Tree **sp, StreamImpl *is, FsmRun *fsmRun, PdaRun *pdaRun )
+{
+ debug( prg, REALM_PARSE, "token: _EOF\n" );
+
+ incrementSteps( pdaRun );
+
+ Head *head = headAllocate( prg );
+ head->location = locationAllocate( prg );
+ head->location->line = is->line;
+ head->location->column = is->column;
+ head->location->byte = is->byte;
+
+ Kid *input = kidAllocate( prg );
+ input->tree = treeAllocate( prg );
+
+ input->tree->refs = 1;
+ input->tree->id = prg->rtd->eofLelIds[pdaRun->parserId];
+ input->tree->tokdata = head;
+
+ /* Set the state using the state of the parser. */
+ fsmRun->region = pdaRunGetNextRegion( pdaRun, 0 );
+ fsmRun->preRegion = pdaRunGetNextPreRegion( pdaRun );
+ fsmRun->cs = fsmRun->tables->entryByRegion[fsmRun->region];
+
+ ParseTree *parseTree = parseTreeAllocate( prg );
+ parseTree->id = input->tree->id;
+ parseTree->shadow = input;
+
+ pdaRun->parseInput = parseTree;
+}
+
+static void newToken( Program *prg, PdaRun *pdaRun, FsmRun *fsmRun )
+{
+ fsmRun->p = fsmRun->pe = 0;
+ fsmRun->toklen = 0;
+ fsmRun->eof = 0;
+
+ /* Init the scanner vars. */
+ fsmRun->act = 0;
+ fsmRun->tokstart = 0;
+ fsmRun->tokend = 0;
+ fsmRun->matchedToken = 0;
+
+ /* Set the state using the state of the parser. */
+ fsmRun->region = pdaRunGetNextRegion( pdaRun, 0 );
+ fsmRun->preRegion = pdaRunGetNextPreRegion( pdaRun );
+ if ( fsmRun->preRegion > 0 ) {
+ fsmRun->cs = fsmRun->tables->entryByRegion[fsmRun->preRegion];
+ fsmRun->ncs = fsmRun->tables->entryByRegion[fsmRun->region];
+ }
+ else {
+ fsmRun->cs = fsmRun->tables->entryByRegion[fsmRun->region];
+ }
+
+
+ /* Clear the mark array. */
+ memset( fsmRun->mark, 0, sizeof(fsmRun->mark) );
+}
+
+static void pushBtPoint( Program *prg, PdaRun *pdaRun )
+{
+ Tree *tree = 0;
+ if ( pdaRun->accumIgnore != 0 )
+ tree = pdaRun->accumIgnore->shadow->tree;
+ else if ( pdaRun->tokenList != 0 )
+ tree = pdaRun->tokenList->kid->tree;
+
+ if ( tree != 0 ) {
+ debug( prg, REALM_PARSE, "pushing bt point with location byte %d\n",
+ ( tree != 0 && tree->tokdata != 0 && tree->tokdata->location != 0 ) ?
+ tree->tokdata->location->byte : 0 );
+
+ Kid *kid = kidAllocate( prg );
+ kid->tree = tree;
+ treeUpref( tree );
+ kid->next = pdaRun->btPoint;
+ pdaRun->btPoint = kid;
+ }
+}
+
+
+#define SCAN_UNDO -7
+#define SCAN_IGNORE -6
+#define SCAN_TREE -5
+#define SCAN_TRY_AGAIN_LATER -4
+#define SCAN_ERROR -3
+#define SCAN_LANG_EL -2
+#define SCAN_EOF -1
+
+long scanToken( Program *prg, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *is )
+{
+ if ( pdaRun->triggerUndo )
+ return SCAN_UNDO;
+
+ while ( true ) {
+ char *pd = 0;
+ int len = 0;
+ int type = is->funcs->getParseBlock( is, fsmRun->toklen, &pd, &len );
+
+ switch ( type ) {
+ case INPUT_DATA:
+ fsmRun->p = pd;
+ fsmRun->pe = pd + len;
+ break;
+
+ case INPUT_EOS:
+ fsmRun->p = fsmRun->pe = 0;
+ if ( fsmRun->tokstart != 0 )
+ fsmRun->eof = 1;
+ debug( prg, REALM_SCAN, "EOS *******************\n" );
+ break;
+
+ case INPUT_EOF:
+ fsmRun->p = fsmRun->pe = 0;
+ if ( fsmRun->tokstart != 0 )
+ fsmRun->eof = 1;
+ else
+ return SCAN_EOF;
+ break;
+
+ case INPUT_EOD:
+ fsmRun->p = fsmRun->pe = 0;
+ return SCAN_TRY_AGAIN_LATER;
+
+ case INPUT_LANG_EL:
+ if ( fsmRun->tokstart != 0 )
+ fsmRun->eof = 1;
+ else
+ return SCAN_LANG_EL;
+ break;
+
+ case INPUT_TREE:
+ if ( fsmRun->tokstart != 0 )
+ fsmRun->eof = 1;
+ else
+ return SCAN_TREE;
+ break;
+ case INPUT_IGNORE:
+ if ( fsmRun->tokstart != 0 )
+ fsmRun->eof = 1;
+ else
+ return SCAN_IGNORE;
+ break;
+ }
+
+ prg->rtd->fsmExecute( fsmRun, is );
+
+ /* First check if scanning stopped because we have a token. */
+ if ( fsmRun->matchedToken > 0 ) {
+ /* If the token has a marker indicating the end (due to trailing
+ * context) then adjust data now. */
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+ if ( lelInfo[fsmRun->matchedToken].markId >= 0 )
+ fsmRun->p = fsmRun->mark[lelInfo[fsmRun->matchedToken].markId];
+
+ return fsmRun->matchedToken;
+ }
+
+ /* Check for error. */
+ if ( fsmRun->cs == fsmRun->tables->errorState ) {
+ /* If a token was started, but not finished (tokstart != 0) then
+ * restore data to the beginning of that token. */
+ if ( fsmRun->tokstart != 0 )
+ fsmRun->p = fsmRun->tokstart;
+
+ /* Check for a default token in the region. If one is there
+ * then send it and continue with the processing loop. */
+ if ( prg->rtd->regionInfo[fsmRun->region].defaultToken >= 0 ) {
+ fsmRun->toklen = 0;
+ return prg->rtd->regionInfo[fsmRun->region].defaultToken;
+ }
+
+ return SCAN_ERROR;
+ }
+
+ /* Got here because the state machine didn't match a token or encounter
+ * an error. Must be because we got to the end of the buffer data. */
+ assert( fsmRun->p == fsmRun->pe );
+ }
+
+ /* Should not be reached. */
+ return SCAN_ERROR;
+}
+
+/*
+ * Stops on:
+ * PcrPreEof
+ * PcrGeneration
+ * PcrReduction
+ * PcrRevReduction
+ * PcrRevIgnore
+ * PcrRevToken
+ */
+
+long parseLoop( Program *prg, Tree **sp, PdaRun *pdaRun,
+ StreamImpl *is, long entry )
+{
+ FsmRun *fsmRun = pdaRun->fsmRun;
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+
+switch ( entry ) {
+case PcrStart:
+
+ pdaRun->stop = false;
+
+ while ( true ) {
+ debug( prg, REALM_PARSE, "parse loop start %d:%d\n", is->line, is->column );
+
+ /* Pull the current scanner from the parser. This can change during
+ * parsing due to inputStream pushes, usually for the purpose of includes.
+ * */
+ pdaRun->tokenId = scanToken( prg, pdaRun, fsmRun, is );
+
+ if ( pdaRun->tokenId == SCAN_ERROR ) {
+ if ( fsmRun->preRegion >= 0 ) {
+ fsmRun->preRegion = -1;
+ fsmRun->cs = fsmRun->ncs;
+ continue;
+ }
+ }
+
+ if ( pdaRun->tokenId == SCAN_ERROR &&
+ ( prg->rtd->regionInfo[fsmRun->region].ciLelId > 0 ) )
+ {
+ debug( prg, REALM_PARSE, "sending a collect ignore\n" );
+ sendCi( prg, sp, is, fsmRun, pdaRun, prg->rtd->regionInfo[fsmRun->region].ciLelId );
+ goto yes;
+ }
+
+ if ( pdaRun->tokenId == SCAN_TRY_AGAIN_LATER ) {
+ debug( prg, REALM_PARSE, "scanner says try again later\n" );
+ break;
+ }
+
+ assert( pdaRun->parseInput == 0 );
+ pdaRun->parseInput = 0;
+
+ /* Check for EOF. */
+ if ( pdaRun->tokenId == SCAN_EOF ) {
+ is->eofSent = true;
+ sendEof( prg, sp, is, fsmRun, pdaRun );
+
+ pdaRun->frameId = prg->rtd->regionInfo[fsmRun->region].eofFrameId;
+
+ if ( prg->ctxDepParsing && pdaRun->frameId >= 0 ) {
+ debug( prg, REALM_PARSE, "HAVE PRE_EOF BLOCK\n" );
+
+ pdaRun->fi = &prg->rtd->frameInfo[pdaRun->frameId];
+ pdaRun->code = pdaRun->fi->codeWV;
+
+return PcrPreEof;
+case PcrPreEof:
+ makeReverseCode( pdaRun );
+ }
+ }
+ else if ( pdaRun->tokenId == SCAN_UNDO ) {
+ /* Fall through with parseInput = 0. FIXME: Do we need to send back ignore? */
+ debug( prg, REALM_PARSE, "invoking undo from the scanner\n" );
+ }
+ else if ( pdaRun->tokenId == SCAN_ERROR ) {
+ /* Scanner error, maybe retry. */
+ if ( pdaRun->accumIgnore == 0 && pdaRunGetNextRegion( pdaRun, 1 ) != 0 ) {
+ debug( prg, REALM_PARSE, "scanner failed, trying next region\n" );
+
+ pdaRun->nextRegionInd += 1;
+ goto skipSend;
+ }
+ else if ( pdaRun->numRetry > 0 ) {
+ debug( prg, REALM_PARSE, "invoking parse error from the scanner\n" );
+
+ /* Fall through to send null (error). */
+ pushBtPoint( prg, pdaRun );
+ }
+ else {
+ debug( prg, REALM_PARSE, "no alternate scanning regions\n" );
+
+ /* There are no alternative scanning regions to try, nor are
+ * there any alternatives stored in the current parse tree. No
+ * choice but to end the parse. */
+ pushBtPoint( prg, pdaRun );
+
+ reportParseError( prg, sp, pdaRun );
+ pdaRun->parseError = 1;
+ goto skipSend;
+ }
+ }
+ else if ( pdaRun->tokenId == SCAN_LANG_EL ) {
+ debug( prg, REALM_PARSE, "sending an named lang el\n" );
+
+ /* A named language element (parsing colm program). */
+ prg->rtd->sendNamedLangEl( prg, sp, pdaRun, fsmRun, is );
+ }
+ else if ( pdaRun->tokenId == SCAN_TREE ) {
+ debug( prg, REALM_PARSE, "sending a tree\n" );
+
+ /* A tree already built. */
+ sendTree( prg, sp, pdaRun, fsmRun, is );
+ }
+ else if ( pdaRun->tokenId == SCAN_IGNORE ) {
+ debug( prg, REALM_PARSE, "sending an ignore token\n" );
+
+ /* A tree to ignore. */
+ sendIgnoreTree( prg, sp, pdaRun, fsmRun, is );
+ goto skipSend;
+ }
+ else if ( prg->ctxDepParsing && lelInfo[pdaRun->tokenId].frameId >= 0 ) {
+ /* Has a generation action. */
+ debug( prg, REALM_PARSE, "token gen action: %s\n",
+ prg->rtd->lelInfo[pdaRun->tokenId].name );
+
+ /* Make the token data. */
+ pdaRun->tokdata = peekMatch( prg, fsmRun, is );
+
+ /* Note that we don't update the position now. It is done when the token
+ * data is pulled from the inputStream. */
+
+ fsmRun->p = fsmRun->pe = 0;
+ fsmRun->toklen = 0;
+ fsmRun->eof = 0;
+
+ pdaRun->fi = &prg->rtd->frameInfo[prg->rtd->lelInfo[pdaRun->tokenId].frameId];
+ pdaRun->frameId = prg->rtd->lelInfo[pdaRun->tokenId].frameId;
+ pdaRun->code = pdaRun->fi->codeWV;
+
+return PcrGeneration;
+case PcrGeneration:
+
+ makeReverseCode( pdaRun );
+
+ /* Finished with the match text. */
+ stringFree( prg, pdaRun->tokdata );
+
+ goto skipSend;
+ }
+ else if ( lelInfo[pdaRun->tokenId].ignore ) {
+ debug( prg, REALM_PARSE, "sending an ignore token: %s\n",
+ prg->rtd->lelInfo[pdaRun->tokenId].name );
+
+ /* Is an ignore token. */
+ sendIgnore( prg, sp, is, fsmRun, pdaRun, pdaRun->tokenId );
+ goto skipSend;
+ }
+ else {
+ debug( prg, REALM_PARSE, "sending an a plain old token: %s\n",
+ prg->rtd->lelInfo[pdaRun->tokenId].name );
+
+ /* Is a plain token. */
+ sendToken( prg, sp, is, fsmRun, pdaRun, pdaRun->tokenId );
+ }
+yes:
+
+ if ( pdaRun->parseInput != 0 )
+ transferReverseCode( pdaRun, pdaRun->parseInput );
+
+ if ( pdaRun->parseInput != 0 ) {
+ /* If it's a nonterminal with a termdup then flip the parse tree to the terminal. */
+ if ( pdaRun->parseInput->id >= prg->rtd->firstNonTermId ) {
+ pdaRun->parseInput->id = prg->rtd->lelInfo[pdaRun->parseInput->id].termDupId;
+ pdaRun->parseInput->flags |= PF_TERM_DUP;
+ }
+ }
+
+ long pcr = parseToken( prg, sp, pdaRun, fsmRun, is, PcrStart );
+
+ while ( pcr != PcrDone ) {
+
+return pcr;
+case PcrReduction:
+case PcrReverse:
+
+ pcr = parseToken( prg, sp, pdaRun, fsmRun, is, entry );
+ }
+
+ assert( pcr == PcrDone );
+
+ handleError( prg, sp, pdaRun );
+
+skipSend:
+ newToken( prg, pdaRun, fsmRun );
+
+ /* Various stop conditions. This should all be coverned by one test
+ * eventually. */
+
+ if ( pdaRun->triggerUndo ) {
+ debug( prg, REALM_PARSE, "parsing stopped by triggerUndo\n" );
+ break;
+ }
+
+ if ( is->eofSent ) {
+ debug( prg, REALM_PARSE, "parsing stopped by EOF\n" );
+ break;
+ }
+
+ if ( pdaRun->stopParsing ) {
+ debug( prg, REALM_PARSE, "scanner has been stopped\n" );
+ break;
+ }
+
+ if ( pdaRun->stop ) {
+ debug( prg, REALM_PARSE, "parsing has been stopped by consumedCount\n" );
+ break;
+ }
+
+ if ( prg->induceExit ) {
+ debug( prg, REALM_PARSE, "parsing has been stopped by a call to exit\n" );
+ break;
+ }
+
+ if ( pdaRun->parseError ) {
+ debug( prg, REALM_PARSE, "parsing stopped by a parse error\n" );
+ break;
+ }
+ }
+
+case PcrDone:
+break; }
+
+ return PcrDone;
+}
+
+/* Offset can be used to look at the next nextRegionInd. */
+int pdaRunGetNextRegion( PdaRun *pdaRun, int offset )
+{
+ return pdaRun->tables->tokenRegions[pdaRun->nextRegionInd+offset];
+}
+
+int pdaRunGetNextPreRegion( PdaRun *pdaRun )
+{
+ return pdaRun->tables->tokenPreRegions[pdaRun->nextRegionInd];
+}
+
+Tree *getParsedRoot( PdaRun *pdaRun, int stop )
+{
+ if ( pdaRun->parseError )
+ return 0;
+ else if ( stop ) {
+ if ( pdaRun->stackTop->shadow != 0 )
+ return pdaRun->stackTop->shadow->tree;
+ }
+ else {
+ if ( pdaRun->stackTop->next->shadow != 0 )
+ return pdaRun->stackTop->next->shadow->tree;
+ }
+ return 0;
+}
+
+void clearParseTree( Program *prg, Tree **sp, ParseTree *pt )
+{
+ Tree **top = vm_ptop();
+
+ if ( pt == 0 )
+ return;
+
+free_tree:
+ if ( pt->next != 0 ) {
+ vm_push( (Tree*)pt->next );
+ }
+
+ if ( pt->leftIgnore != 0 ) {
+ vm_push( (Tree*)pt->leftIgnore );
+ }
+
+ if ( pt->child != 0 ) {
+ vm_push( (Tree*)pt->child );
+ }
+
+ if ( pt->rightIgnore != 0 ) {
+ vm_push( (Tree*)pt->rightIgnore );
+ }
+
+ if ( pt->shadow != 0 ) {
+ treeDownref( prg, sp, pt->shadow->tree );
+ kidFree( prg, pt->shadow );
+ }
+
+ parseTreeFree( prg, pt );
+
+ /* Any trees to downref? */
+ if ( sp != top ) {
+ pt = (ParseTree*)vm_pop();
+ goto free_tree;
+ }
+}
+
+void clearPdaRun( Program *prg, Tree **sp, PdaRun *pdaRun )
+{
+ clearFsmRun( prg, pdaRun->fsmRun );
+
+ /* Remaining stack and parse trees underneath. */
+ clearParseTree( prg, sp, pdaRun->stackTop );
+ pdaRun->stackTop = 0;
+
+ /* Traverse the token list downreffing. */
+ Ref *ref = pdaRun->tokenList;
+ while ( ref != 0 ) {
+ Ref *next = ref->next;
+ kidFree( prg, (Kid*)ref );
+ ref = next;
+ }
+ pdaRun->tokenList = 0;
+
+ /* Traverse the btPoint list downreffing */
+ Kid *btp = pdaRun->btPoint;
+ while ( btp != 0 ) {
+ Kid *next = btp->next;
+ treeDownref( prg, sp, btp->tree );
+ kidFree( prg, (Kid*)btp );
+ btp = next;
+ }
+ pdaRun->btPoint = 0;
+
+ /* Clear out any remaining ignores. */
+ clearParseTree( prg, sp, pdaRun->accumIgnore );
+ pdaRun->accumIgnore = 0;
+
+ if ( pdaRun->context != 0 )
+ treeDownref( prg, sp, pdaRun->context );
+
+ rcodeDownrefAll( prg, sp, &pdaRun->reverseCode );
+ rtCodeVectEmpty( &pdaRun->reverseCode );
+ rtCodeVectEmpty( &pdaRun->rcodeCollect );
+
+ treeDownref( prg, sp, pdaRun->parseErrorText );
+}
+
+int isParserStopFinished( PdaRun *pdaRun )
+{
+ int done =
+ pdaRun->stackTop->next != 0 &&
+ pdaRun->stackTop->next->next == 0 &&
+ pdaRun->stackTop->id == pdaRun->stopTarget;
+ return done;
+}
+
+void initPdaRun( Program *prg, PdaRun *pdaRun, PdaTables *tables,
+ int parserId, long stopTarget, int revertOn, Tree *context )
+{
+ memset( pdaRun, 0, sizeof(PdaRun) );
+
+ pdaRun->tables = tables;
+ pdaRun->parserId = parserId;
+ pdaRun->stopTarget = stopTarget;
+ pdaRun->revertOn = revertOn;
+ pdaRun->targetSteps = -1;
+
+ debug( prg, REALM_PARSE, "initializing PdaRun\n" );
+
+ /* FIXME: need the right one here. */
+ pdaRun->cs = prg->rtd->startStates[pdaRun->parserId];
+
+ Kid *sentinal = kidAllocate( prg );
+ sentinal->tree = treeAllocate( prg );
+ sentinal->tree->refs = 1;
+
+ /* Init the element allocation variables. */
+ pdaRun->stackTop = parseTreeAllocate( prg );
+ pdaRun->stackTop->state = -1;
+ pdaRun->stackTop->shadow = sentinal;
+
+ pdaRun->numRetry = 0;
+ pdaRun->nextRegionInd = pdaRun->tables->tokenRegionInds[pdaRun->cs];
+ pdaRun->stopParsing = false;
+ pdaRun->accumIgnore = 0;
+ pdaRun->btPoint = 0;
+ pdaRun->checkNext = false;
+ pdaRun->checkStop = false;
+
+ prg->rtd->initBindings( pdaRun );
+
+ initRtCodeVect( &pdaRun->reverseCode );
+ initRtCodeVect( &pdaRun->rcodeCollect );
+
+ pdaRun->context = splitTree( prg, context );
+ pdaRun->parseError = 0;
+ pdaRun->parseInput = 0;
+ pdaRun->triggerUndo = 0;
+
+ pdaRun->tokenId = 0;
+
+ pdaRun->onDeck = false;
+ pdaRun->parsed = 0;
+ pdaRun->reject = false;
+
+ pdaRun->rcBlockCount = 0;
+
+ pdaRun->fsmRun = &pdaRun->_fsmRun;
+ initFsmRun( prg, pdaRun->fsmRun );
+ newToken( prg, pdaRun, pdaRun->fsmRun );
+}
+
+long stackTopTarget( Program *prg, PdaRun *pdaRun )
+{
+ long state;
+ if ( pdaRun->stackTop->state < 0 )
+ state = prg->rtd->startStates[pdaRun->parserId];
+ else {
+ state = pdaRun->tables->targs[(int)pdaRun->tables->indicies[pdaRun->tables->offsets[
+ pdaRun->stackTop->state] +
+ (pdaRun->stackTop->id - pdaRun->tables->keys[pdaRun->stackTop->state<<1])]];
+ }
+ return state;
+}
+
+/*
+ * Local commit:
+ * -clears reparse flags underneath
+ * -must be possible to backtrack after
+ * Global commit (revertOn)
+ * -clears all reparse flags
+ * -must be possible to backtrack after
+ * Global commit (!revertOn)
+ * -clears all reparse flags
+ * -clears all 'parsed' reverse code
+ * -clears all reverse code
+ * -clears all alg structures
+ */
+
+int beenCommitted( ParseTree *parseTree )
+{
+ return parseTree->flags & PF_COMMITTED;
+}
+
+Code *backupOverRcode( Code *rcode )
+{
+ Word len;
+ rcode -= SIZEOF_WORD;
+ read_word_p( len, rcode );
+ rcode -= len;
+ return rcode;
+}
+
+/* The top level of the stack is linked right-to-left. Trees underneath are
+ * linked left-to-right. */
+void commitKid( Program *prg, PdaRun *pdaRun, Tree **root, ParseTree *lel, Code **rcode, long *causeReduce )
+{
+ ParseTree *tree = 0;
+ Tree **sp = root;
+ //Tree *restore = 0;
+
+head:
+ /* Commit */
+ debug( prg, REALM_PARSE, "commit: visiting %s\n",
+ prg->rtd->lelInfo[lel->id].name );
+
+ /* Load up the parsed tree. */
+ tree = lel;
+
+ /* Check for reverse code. */
+ //restore = 0;
+ if ( tree->flags & PF_HAS_RCODE ) {
+ /* If tree caused some reductions, now is not the right time to backup
+ * over the reverse code. We need to backup over the reductions first. Store
+ * the count of the reductions and do it when the count drops to zero. */
+ if ( tree->causeReduce > 0 ) {
+ /* The top reduce block does not correspond to this alg. */
+ debug( prg, REALM_PARSE, "commit: causeReduce found, delaying backup: %ld\n",
+ (long)tree->causeReduce );
+ *causeReduce = tree->causeReduce;
+ }
+ else {
+ *rcode = backupOverRcode( *rcode );
+
+ //if ( **rcode == IN_RESTORE_LHS ) {
+ // debug( prg, REALM_PARSE, "commit: has restore_lhs\n" );
+ // read_tree_p( restore, (*rcode+1) );
+ //}
+ }
+ }
+
+ //FIXME: what was this about?
+ //if ( restore != 0 )
+ // tree = restore;
+
+ /* All the parse algorithm data except for the RCODE flag is in the
+ * original. That is why we restore first, then we can clear the retry
+ * values. */
+
+ /* Check causeReduce, might be time to backup over the reverse code
+ * belonging to a nonterminal that caused previous reductions. */
+ if ( *causeReduce > 0 &&
+ tree->id >= prg->rtd->firstNonTermId &&
+ !(tree->flags & PF_TERM_DUP) )
+ {
+ *causeReduce -= 1;
+
+ if ( *causeReduce == 0 ) {
+ debug( prg, REALM_PARSE, "commit: causeReduce dropped to zero, backing up over rcode\n" );
+
+ /* Cause reduce just dropped down to zero. */
+ *rcode = backupOverRcode( *rcode );
+ }
+ }
+
+ ///* FIXME: why was this here?
+ // * Reset retries. */
+ //if ( tree->flags & AF_PARSED ) {
+ // if ( tree->retryLower > 0 ) {
+ // pdaRun->numRetry -= 1;
+ // tree->retryLower = 0;
+ // }
+ // if ( tree->retryUpper > 0 ) {
+ // pdaRun->numRetry -= 1;
+ // tree->retryUpper = 0;
+ // }
+ //}
+
+ tree->flags |= PF_COMMITTED;
+
+ /* Do not recures on trees that are terminal dups. */
+ if ( !(tree->flags & PF_TERM_DUP) &&
+ !(tree->flags & PF_NAMED) &&
+ !(tree->flags & PF_ARTIFICIAL) &&
+ tree->child != 0 )
+ {
+ vm_push( (Tree*)lel );
+ lel = tree->child;
+
+ if ( lel != 0 ) {
+ while ( lel != 0 ) {
+ vm_push( (Tree*)lel );
+ lel = lel->next;
+ }
+ }
+ }
+
+backup:
+ if ( sp != root ) {
+ ParseTree *next = (ParseTree*)vm_pop();
+ if ( next->next == lel ) {
+ /* Moving backwards. */
+ lel = next;
+
+ if ( !beenCommitted( lel ) )
+ goto head;
+ }
+ else {
+ /* Moving upwards. */
+ lel = next;
+ }
+
+ goto backup;
+ }
+
+ pdaRun->numRetry = 0;
+ assert( sp == root );
+}
+
+void commitFull( Program *prg, Tree **sp, PdaRun *pdaRun, long causeReduce )
+{
+ debug( prg, REALM_PARSE, "running full commit\n" );
+
+ ParseTree *parseTree = pdaRun->stackTop;
+ Code *rcode = pdaRun->reverseCode.data + pdaRun->reverseCode.tabLen;
+
+ /* The top level of the stack is linked right to left. This is the
+ * traversal order we need for committing. */
+ while ( parseTree != 0 && !beenCommitted( parseTree ) ) {
+ commitKid( prg, pdaRun, sp, parseTree, &rcode, &causeReduce );
+ parseTree = parseTree->next;
+ }
+
+ /* We cannot always clear all the rcode here. We may need to backup over
+ * the parse statement. We depend on the context flag. */
+ if ( !pdaRun->revertOn )
+ rcodeDownrefAll( prg, sp, &pdaRun->reverseCode );
+}
+
+/*
+ * shift: retry goes into lower of shifted node.
+ * reduce: retry goes into upper of reduced node.
+ * shift-reduce: cannot be a retry
+ */
+
+/* Stops on:
+ * PcrReduction
+ * PcrRevToken
+ * PcrRevReduction
+ */
+long parseToken( Program *prg, Tree **sp, PdaRun *pdaRun,
+ FsmRun *fsmRun, StreamImpl *is, long entry )
+{
+ int pos;
+ unsigned int *action;
+ int rhsLen;
+ int owner;
+ int induceReject;
+ int indPos;
+ //LangElInfo *lelInfo = prg->rtd->lelInfo;
+
+switch ( entry ) {
+case PcrStart:
+
+ /* The scanner will send a null token if it can't find a token. */
+ if ( pdaRun->parseInput == 0 )
+ goto parseError;
+
+ /* This will cause parseInput to be lost. This
+ * path should be traced. */
+ if ( pdaRun->cs < 0 )
+ return PcrDone;
+
+ /* Record the state in the parse tree. */
+ pdaRun->parseInput->state = pdaRun->cs;
+
+again:
+ if ( pdaRun->parseInput == 0 )
+ goto _out;
+
+ pdaRun->lel = pdaRun->parseInput;
+ pdaRun->curState = pdaRun->cs;
+
+ if ( pdaRun->lel->id < pdaRun->tables->keys[pdaRun->curState<<1] ||
+ pdaRun->lel->id > pdaRun->tables->keys[(pdaRun->curState<<1)+1] ) {
+ debug( prg, REALM_PARSE, "parse error, no transition 1\n" );
+ pushBtPoint( prg, pdaRun );
+ goto parseError;
+ }
+
+ indPos = pdaRun->tables->offsets[pdaRun->curState] +
+ (pdaRun->lel->id - pdaRun->tables->keys[pdaRun->curState<<1]);
+
+ owner = pdaRun->tables->owners[indPos];
+ if ( owner != pdaRun->curState ) {
+ debug( prg, REALM_PARSE, "parse error, no transition 2\n" );
+ pushBtPoint( prg, pdaRun );
+ goto parseError;
+ }
+
+ pos = pdaRun->tables->indicies[indPos];
+ if ( pos < 0 ) {
+ debug( prg, REALM_PARSE, "parse error, no transition 3\n" );
+ pushBtPoint( prg, pdaRun );
+ goto parseError;
+ }
+
+ /* Checking complete. */
+
+ induceReject = false;
+ pdaRun->cs = pdaRun->tables->targs[pos];
+ action = pdaRun->tables->actions + pdaRun->tables->actInds[pos];
+ if ( pdaRun->lel->retryLower )
+ action += pdaRun->lel->retryLower;
+
+ /*
+ * Shift
+ */
+
+ if ( *action & act_sb ) {
+ debug( prg, REALM_PARSE, "shifted: %s\n",
+ prg->rtd->lelInfo[pdaRun->lel->id].name );
+ /* Consume. */
+ pdaRun->parseInput = pdaRun->parseInput->next;
+
+ pdaRun->lel->state = pdaRun->curState;
+
+ /* If its a token then attach ignores and record it in the token list
+ * of the next ignore attachment to use. */
+ if ( pdaRun->lel->id < prg->rtd->firstNonTermId ) {
+ if ( pdaRun->lel->causeReduce == 0 )
+ attachRightIgnore( prg, sp, pdaRun, pdaRun->stackTop );
+ }
+
+ pdaRun->lel->next = pdaRun->stackTop;
+ pdaRun->stackTop = pdaRun->lel;
+
+ /* If its a token then attach ignores and record it in the token list
+ * of the next ignore attachment to use. */
+ if ( pdaRun->lel->id < prg->rtd->firstNonTermId ) {
+ attachLeftIgnore( prg, sp, pdaRun, pdaRun->lel );
+
+ Ref *ref = (Ref*)kidAllocate( prg );
+ ref->kid = pdaRun->lel->shadow;
+ //treeUpref( pdaRun->tree );
+ ref->next = pdaRun->tokenList;
+ pdaRun->tokenList = ref;
+ }
+
+ if ( action[1] == 0 )
+ pdaRun->lel->retryLower = 0;
+ else {
+ debug( prg, REALM_PARSE, "retry: %p\n", pdaRun->stackTop );
+ pdaRun->lel->retryLower += 1;
+ assert( pdaRun->lel->retryUpper == 0 );
+ /* FIXME: Has the retry already been counted? */
+ pdaRun->numRetry += 1;
+ }
+ }
+
+ /*
+ * Commit
+ */
+
+ if ( pdaRun->tables->commitLen[pos] != 0 ) {
+ long causeReduce = 0;
+ if ( pdaRun->parseInput != 0 ) {
+ if ( pdaRun->parseInput->flags & PF_HAS_RCODE )
+ causeReduce = pdaRun->parseInput->causeReduce;
+ }
+ commitFull( prg, sp, pdaRun, causeReduce );
+ }
+
+ /*
+ * Reduce
+ */
+
+ if ( *action & act_rb ) {
+ int r, objectLength;
+ ParseTree *last, *child;
+ Kid *attrs;
+ Kid *dataLast, *dataChild;
+
+ /* If there was shift don't attach again. */
+ if ( !( *action & act_sb ) && pdaRun->lel->id < prg->rtd->firstNonTermId )
+ attachRightIgnore( prg, sp, pdaRun, pdaRun->stackTop );
+
+ pdaRun->reduction = *action >> 2;
+
+ if ( pdaRun->parseInput != 0 )
+ pdaRun->parseInput->causeReduce += 1;
+
+ Kid *value = kidAllocate( prg );
+ value->tree = treeAllocate( prg );
+ value->tree->refs = 1;
+ value->tree->id = prg->rtd->prodInfo[pdaRun->reduction].lhsId;
+ value->tree->prodNum = prg->rtd->prodInfo[pdaRun->reduction].prodNum;
+
+ pdaRun->redLel = parseTreeAllocate( prg );
+ pdaRun->redLel->id = prg->rtd->prodInfo[pdaRun->reduction].lhsId;
+ pdaRun->redLel->next = 0;
+ pdaRun->redLel->causeReduce = 0;
+ pdaRun->redLel->retryLower = 0;
+ pdaRun->redLel->shadow = value;
+
+ /* Transfer. */
+ pdaRun->redLel->retryUpper = pdaRun->lel->retryLower;
+ pdaRun->lel->retryLower = 0;
+
+ /* Allocate the attributes. */
+ objectLength = prg->rtd->lelInfo[pdaRun->redLel->id].objectLength;
+ attrs = allocAttrs( prg, objectLength );
+
+ /* Build the list of children. We will be giving up a reference when we
+ * detach parse tree and data tree, but gaining the reference when we
+ * put the children under the new data tree. No need to alter refcounts
+ * here. */
+ rhsLen = prg->rtd->prodInfo[pdaRun->reduction].length;
+ child = last = 0;
+ dataChild = dataLast = 0;
+ for ( r = 0; r < rhsLen; r++ ) {
+
+ /* The child. */
+ child = pdaRun->stackTop;
+ dataChild = child->shadow;
+
+ /* Pop. */
+ pdaRun->stackTop = pdaRun->stackTop->next;
+
+ /* Detach the parse tree from the data. */
+ child->shadow = 0;
+
+ /* Reverse list. */
+ child->next = last;
+ dataChild->next = dataLast;
+
+ /* Track last for reversal. */
+ last = child;
+ dataLast = dataChild;
+ }
+
+ pdaRun->redLel->child = child;
+ pdaRun->redLel->shadow->tree->child = kidListConcat( attrs, dataChild );
+
+ debug( prg, REALM_PARSE, "reduced: %s rhsLen %d\n",
+ prg->rtd->prodInfo[pdaRun->reduction].name, rhsLen );
+ if ( action[1] == 0 )
+ pdaRun->redLel->retryUpper = 0;
+ else {
+ pdaRun->redLel->retryUpper += 1;
+ assert( pdaRun->lel->retryLower == 0 );
+ pdaRun->numRetry += 1;
+ debug( prg, REALM_PARSE, "retry: %p\n", pdaRun->redLel );
+ }
+
+ /* When the production is of zero length we stay in the same state.
+ * Otherwise we use the state stored in the first child. */
+ pdaRun->cs = rhsLen == 0 ? pdaRun->curState : child->state;
+
+ if ( prg->ctxDepParsing && prg->rtd->prodInfo[pdaRun->reduction].frameId >= 0 ) {
+ /* Frame info for reduction. */
+ pdaRun->fi = &prg->rtd->frameInfo[prg->rtd->prodInfo[pdaRun->reduction].frameId];
+ pdaRun->frameId = prg->rtd->prodInfo[pdaRun->reduction].frameId;
+ pdaRun->reject = false;
+ pdaRun->parsed = 0;
+ pdaRun->code = pdaRun->fi->codeWV;
+
+return PcrReduction;
+case PcrReduction:
+
+ if ( prg->induceExit )
+ goto fail;
+
+ /* If the lhs was stored and it changed then we need to restore the
+ * original upon backtracking, otherwise downref since we took a
+ * copy above. */
+ if ( pdaRun->parsed != 0 ) {
+ if ( pdaRun->parsed != pdaRun->redLel->shadow->tree ) {
+ debug( prg, REALM_PARSE, "lhs tree was modified, adding a restore instruction\n" );
+//
+// /* Make it into a parse tree. */
+// Tree *newPt = prepParseTree( prg, sp, pdaRun->redLel->tree );
+// treeDownref( prg, sp, pdaRun->redLel->tree );
+//
+// /* Copy it in. */
+// pdaRun->redLel->tree = newPt;
+// treeUpref( pdaRun->redLel->tree );
+
+ /* Add the restore instruct. */
+ appendCode( &pdaRun->rcodeCollect, IN_RESTORE_LHS );
+ appendWord( &pdaRun->rcodeCollect, (Word)pdaRun->parsed );
+ appendCode( &pdaRun->rcodeCollect, SIZEOF_CODE + SIZEOF_WORD );
+ }
+ else {
+ /* Not changed. Done with parsed. */
+ treeDownref( prg, sp, pdaRun->parsed );
+ }
+ pdaRun->parsed = 0;
+ }
+
+ /* Pull out the reverse code, if any. */
+ makeReverseCode( pdaRun );
+ transferReverseCode( pdaRun, pdaRun->redLel );
+
+ /* Perhaps the execution environment is telling us we need to
+ * reject the reduction. */
+ induceReject = pdaRun->reject;
+ }
+
+ /* If the left hand side was replaced then the only parse algorithm
+ * data that is contained in it will the PF_HAS_RCODE flag. Everthing
+ * else will be in the original. This requires that we restore first
+ * when going backwards and when doing a commit. */
+
+ if ( induceReject ) {
+ debug( prg, REALM_PARSE, "error induced during reduction of %s\n",
+ prg->rtd->lelInfo[pdaRun->redLel->id].name );
+ pdaRun->redLel->state = pdaRun->curState;
+ pdaRun->redLel->next = pdaRun->stackTop;
+ pdaRun->stackTop = pdaRun->redLel;
+ /* FIXME: What is the right argument here? */
+ pushBtPoint( prg, pdaRun );
+ goto parseError;
+ }
+
+ pdaRun->redLel->next = pdaRun->parseInput;
+ pdaRun->parseInput = pdaRun->redLel;
+ }
+
+ goto again;
+
+parseError:
+ debug( prg, REALM_PARSE, "hit error, backtracking\n" );
+
+ if ( pdaRun->numRetry == 0 ) {
+ debug( prg, REALM_PARSE, "out of retries failing parse\n" );
+ goto fail;
+ }
+
+ while ( 1 ) {
+ if ( pdaRun->onDeck ) {
+ debug( prg, REALM_BYTECODE, "dropping out for reverse code call\n" );
+
+ pdaRun->frameId = -1;
+ pdaRun->code = popReverseCode( &pdaRun->reverseCode );
+
+return PcrReverse;
+case PcrReverse:
+
+ decrementSteps( pdaRun );
+ }
+ else if ( pdaRun->checkNext ) {
+ pdaRun->checkNext = false;
+
+ if ( pdaRun->next > 0 && pdaRun->tables->tokenRegions[pdaRun->next] != 0 ) {
+ debug( prg, REALM_PARSE, "found a new region\n" );
+ pdaRun->numRetry -= 1;
+ pdaRun->cs = stackTopTarget( prg, pdaRun );
+ pdaRun->nextRegionInd = pdaRun->next;
+ return PcrDone;
+ }
+ }
+ else if ( pdaRun->checkStop ) {
+ pdaRun->checkStop = false;
+
+ if ( pdaRun->stop ) {
+ debug( prg, REALM_PARSE, "stopping the backtracking, steps is %d\n", pdaRun->steps );
+
+ pdaRun->cs = stackTopTarget( prg, pdaRun );
+ goto _out;
+ }
+ }
+ else if ( pdaRun->parseInput != 0 ) {
+ /* Either we are dealing with a terminal that was
+ * shifted or a nonterminal that was reduced. */
+ if ( pdaRun->parseInput->id < prg->rtd->firstNonTermId ) {
+ assert( pdaRun->parseInput->retryUpper == 0 );
+
+ if ( pdaRun->parseInput->retryLower != 0 ) {
+ debug( prg, REALM_PARSE, "found retry targ: %p\n", pdaRun->parseInput );
+
+ pdaRun->numRetry -= 1;
+ pdaRun->cs = pdaRun->parseInput->state;
+ goto again;
+ }
+
+ if ( pdaRun->parseInput->causeReduce != 0 ) {
+ pdaRun->undoLel = pdaRun->stackTop;
+
+ /* Check if we've arrived at the stack sentinal. This guard
+ * is here to allow us to initially set numRetry to one to
+ * cause the parser to backup all the way to the beginning
+ * when an error occurs. */
+ if ( pdaRun->undoLel->next == 0 )
+ break;
+
+ /* Either we are dealing with a terminal that was
+ * shifted or a nonterminal that was reduced. */
+ assert( !(pdaRun->stackTop->id < prg->rtd->firstNonTermId) );
+
+ debug( prg, REALM_PARSE, "backing up over non-terminal: %s\n",
+ prg->rtd->lelInfo[pdaRun->stackTop->id].name );
+
+ /* Pop the item from the stack. */
+ pdaRun->stackTop = pdaRun->stackTop->next;
+
+ /* Queue it as next parseInput item. */
+ pdaRun->undoLel->next = pdaRun->parseInput;
+ pdaRun->parseInput = pdaRun->undoLel;
+ }
+ else {
+ long region = pdaRun->parseInput->region;
+ pdaRun->next = region > 0 ? region + 1 : 0;
+ pdaRun->checkNext = true;
+ pdaRun->checkStop = true;
+
+ sendBack( prg, sp, pdaRun, fsmRun, is, pdaRun->parseInput );
+
+ pdaRun->parseInput = 0;
+ }
+ }
+ else if ( pdaRun->parseInput->flags & PF_HAS_RCODE ) {
+ debug( prg, REALM_PARSE, "tree has rcode, setting on deck\n" );
+ pdaRun->onDeck = true;
+ pdaRun->parsed = 0;
+
+ /* Only the RCODE flag was in the replaced lhs. All the rest is in
+ * the the original. We read it after restoring. */
+
+ pdaRun->parseInput->flags &= ~PF_HAS_RCODE;
+ }
+ else {
+ /* Remove it from the input queue. */
+ pdaRun->undoLel = pdaRun->parseInput;
+ pdaRun->parseInput = pdaRun->parseInput->next;
+
+ /* Extract children from the child list. */
+ ParseTree *first = pdaRun->undoLel->child;
+ pdaRun->undoLel->child = 0;
+
+ /* This will skip the ignores/attributes, etc. */
+ Kid *dataFirst = treeExtractChild( prg, pdaRun->undoLel->shadow->tree );
+
+ /* Walk the child list and and push the items onto the parsing
+ * stack one at a time. */
+ while ( first != 0 ) {
+ /* Get the next item ahead of time. */
+ ParseTree *next = first->next;
+ Kid *dataNext = dataFirst->next;
+
+ /* Push onto the stack. */
+ first->next = pdaRun->stackTop;
+ pdaRun->stackTop = first;
+
+ /* Reattach the data and the parse tree. */
+ first->shadow = dataFirst;
+
+ first = next;
+ dataFirst = dataNext;
+ }
+
+ /* If there is an parseInput queued, this is one less reduction it has
+ * caused. */
+ if ( pdaRun->parseInput != 0 )
+ pdaRun->parseInput->causeReduce -= 1;
+
+ if ( pdaRun->undoLel->retryUpper != 0 ) {
+ /* There is always an parseInput item here because reduce
+ * conflicts only happen on a lookahead character. */
+ assert( pdaRun->parseInput != pdaRun->undoLel );
+ assert( pdaRun->parseInput != 0 );
+ assert( pdaRun->undoLel->retryLower == 0 );
+ assert( pdaRun->parseInput->retryUpper == 0 );
+
+ /* Transfer the retry from undoLel to parseInput. */
+ pdaRun->parseInput->retryLower = pdaRun->undoLel->retryUpper;
+ pdaRun->parseInput->retryUpper = 0;
+ pdaRun->parseInput->state = stackTopTarget( prg, pdaRun );
+ }
+
+ /* Free the reduced item. */
+ treeDownref( prg, sp, pdaRun->undoLel->shadow->tree );
+ kidFree( prg, pdaRun->undoLel->shadow );
+ parseTreeFree( prg, pdaRun->undoLel );
+
+ /* If the stacktop had right ignore attached, detach now. */
+ if ( pdaRun->stackTop->flags & PF_RIGHT_IL_ATTACHED )
+ detachRightIgnore( prg, sp, pdaRun, pdaRun->stackTop );
+ }
+ }
+ else if ( pdaRun->accumIgnore != 0 ) {
+ debug( prg, REALM_PARSE, "have accumulated ignore to undo\n" );
+
+ /* Send back any accumulated ignore tokens, then trigger error
+ * in the the parser. */
+ ParseTree *ignore = pdaRun->accumIgnore;
+ pdaRun->accumIgnore = pdaRun->accumIgnore->next;
+ ignore->next = 0;
+
+ long region = ignore->region;
+ pdaRun->next = region > 0 ? region + 1 : 0;
+ pdaRun->checkNext = true;
+ pdaRun->checkStop = true;
+
+ sendBackIgnore( prg, sp, pdaRun, fsmRun, is, ignore );
+
+ treeDownref( prg, sp, ignore->shadow->tree );
+ kidFree( prg, ignore->shadow );
+ parseTreeFree( prg, ignore );
+ }
+ else {
+ /* Now it is time to undo something. Pick an element from the top of
+ * the stack. */
+ pdaRun->undoLel = pdaRun->stackTop;
+
+ /* Check if we've arrived at the stack sentinal. This guard is
+ * here to allow us to initially set numRetry to one to cause the
+ * parser to backup all the way to the beginning when an error
+ * occurs. */
+ if ( pdaRun->undoLel->next == 0 )
+ break;
+
+ /* Either we are dealing with a terminal that was
+ * shifted or a nonterminal that was reduced. */
+ if ( pdaRun->stackTop->id < prg->rtd->firstNonTermId ) {
+ debug( prg, REALM_PARSE, "backing up over effective terminal: %s\n",
+ prg->rtd->lelInfo[pdaRun->stackTop->id].name );
+
+ /* Pop the item from the stack. */
+ pdaRun->stackTop = pdaRun->stackTop->next;
+
+ /* Queue it as next parseInput item. */
+ pdaRun->undoLel->next = pdaRun->parseInput;
+ pdaRun->parseInput = pdaRun->undoLel;
+
+ /* Pop from the token list. */
+ Ref *ref = pdaRun->tokenList;
+ pdaRun->tokenList = ref->next;
+ kidFree( prg, (Kid*)ref );
+
+ assert( pdaRun->accumIgnore == 0 );
+ detachLeftIgnore( prg, sp, pdaRun, fsmRun, pdaRun->parseInput );
+ }
+ else {
+ debug( prg, REALM_PARSE, "backing up over non-terminal: %s\n",
+ prg->rtd->lelInfo[pdaRun->stackTop->id].name );
+
+ /* Pop the item from the stack. */
+ pdaRun->stackTop = pdaRun->stackTop->next;
+
+ /* Queue it as next parseInput item. */
+ pdaRun->undoLel->next = pdaRun->parseInput;
+ pdaRun->parseInput = pdaRun->undoLel;
+ }
+
+ /* Undo attach of right ignore. */
+ if ( pdaRun->stackTop->flags & PF_RIGHT_IL_ATTACHED )
+ detachRightIgnore( prg, sp, pdaRun, pdaRun->stackTop );
+ }
+ }
+
+fail:
+ pdaRun->cs = -1;
+ pdaRun->parseError = 1;
+
+ /* If we failed parsing on tree we must free it. The caller expected us to
+ * either consume it or send it back to the parseInput. */
+ if ( pdaRun->parseInput != 0 ) {
+ //treeDownref( prg, sp, (Tree*)pdaRun->parseInput->tree );
+ //ptKidFree( prg, pdaRun->parseInput );
+ pdaRun->parseInput = 0;
+ }
+
+ /* FIXME: do we still need to fall through here? A fail is permanent now,
+ * no longer called into again. */
+
+ return PcrDone;
+
+_out:
+ pdaRun->nextRegionInd = pdaRun->tables->tokenRegionInds[pdaRun->cs];
+
+case PcrDone:
+break; }
+
+ return PcrDone;
+}
diff --git a/src/pdarun.h b/src/pdarun.h
new file mode 100644
index 0000000..5feb683
--- /dev/null
+++ b/src/pdarun.h
@@ -0,0 +1,467 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __COLM_PDARUN_H
+#define __COLM_PDARUN_H
+
+#include <colm/input.h>
+#include <colm/defs.h>
+#include <colm/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct colm_program;
+
+#define MARK_SLOTS 32
+
+typedef struct _FsmTables
+{
+ long *actions;
+ long *keyOffsets;
+ char *transKeys;
+ long *singleLengths;
+ long *rangeLengths;
+ long *indexOffsets;
+ long *transTargsWI;
+ long *transActionsWI;
+ long *toStateActions;
+ long *fromStateActions;
+ long *eofActions;
+ long *eofTargs;
+ long *entryByRegion;
+
+ long numStates;
+ long numActions;
+ long numTransKeys;
+ long numSingleLengths;
+ long numRangeLengths;
+ long numIndexOffsets;
+ long numTransTargsWI;
+ long numTransActionsWI;
+ long numRegions;
+
+ long startState;
+ long firstFinal;
+ long errorState;
+
+ struct GenAction **actionSwitch;
+ long numActionSwitch;
+} FsmTables;
+
+typedef struct _FsmRun
+{
+ FsmTables *tables;
+
+ RunBuf *consumeBuf;
+
+ /* FsmRun State. */
+ long region, preRegion;
+ long cs, ncs, act;
+ char *start;
+ char *tokstart;
+ long tokend;
+ long toklen;
+ char *p, *pe;
+
+ /* Bits. */
+ char eof;
+ char returnResult;
+ char skipToklen;
+
+ char *mark[MARK_SLOTS];
+ long matchedToken;
+} FsmRun;
+
+void undoStreamPull( StreamImpl *inputStream, const char *data, long length );
+
+#if SIZEOF_LONG != 4 && SIZEOF_LONG != 8
+ #error "SIZEOF_LONG contained an unexpected value"
+#endif
+
+struct _Execution;
+
+typedef struct _RtCodeVect
+{
+ Code *data;
+ long tabLen;
+ long allocLen;
+
+ /* FIXME: leak when freed. */
+} RtCodeVect;
+
+void listAddAfter( List *list, ListEl *prev_el, ListEl *new_el );
+void listAddBefore( List *list, ListEl *next_el, ListEl *new_el );
+
+void listPrepend( List *list, ListEl *new_el );
+void listAppend( List *list, ListEl *new_el );
+
+ListEl *listDetach( List *list, ListEl *el );
+ListEl *listDetachFirst(List *list );
+ListEl *listDetachLast(List *list );
+
+long listLength(List *list);
+
+typedef struct _FunctionInfo
+{
+ const char *name;
+ long frameId;
+ long argSize;
+ long frameSize;
+} FunctionInfo;
+
+/*
+ * Program Data.
+ */
+
+typedef struct _PatConsInfo
+{
+ long offset;
+ long numBindings;
+} PatConsInfo;
+
+typedef struct _PatConsNode
+{
+ long id;
+ long prodNum;
+ long next;
+ long child;
+ long bindId;
+ const char *data;
+ long length;
+ long leftIgnore;
+ long rightIgnore;
+
+ /* Just match nonterminal, don't go inside. */
+ unsigned char stop;
+} PatConsNode;
+
+/* FIXME: should have a descriptor for object types to give the length. */
+
+typedef struct _LangElInfo
+{
+ const char *name;
+ const char *xmlTag;
+ unsigned char repeat;
+ unsigned char list;
+ unsigned char literal;
+ unsigned char ignore;
+
+ long frameId;
+
+ long objectTypeId;
+ long ofiOffset;
+ long objectLength;
+
+// long contextTypeId;
+// long contextLength;
+
+ long termDupId;
+ long genericId;
+ long markId;
+ long captureAttr;
+ long numCaptureAttr;
+} LangElInfo;
+
+typedef struct _ObjFieldInfo
+{
+ int typeId;
+} ObjFieldInfo;
+
+typedef struct _ProdInfo
+{
+ unsigned long lhsId;
+ short prodNum;
+ long length;
+ const char *name;
+ long frameId;
+ unsigned char lhsUpref;
+ unsigned char *copy;
+ long copyLen;
+} ProdInfo;
+
+/* Must match the LocalType enum. */
+#define LI_Tree 1
+#define LI_Iter 2
+#define LI_RevIter 3
+#define LI_UserIter 4
+
+typedef struct _LocalInfo
+{
+ char type;
+ short offset;
+} LocalInfo;
+
+typedef struct _FrameInfo
+{
+ Code *codeWV;
+ long codeLenWV;
+ Code *codeWC;
+ long codeLenWC;
+ LocalInfo *locals;
+ long localsLen;
+ long argSize;
+ long frameSize;
+} FrameInfo;
+
+typedef struct _RegionInfo
+{
+ long defaultToken;
+ long eofFrameId;
+ int ciLelId;
+} RegionInfo;
+
+typedef struct _CaptureAttr
+{
+ long mark_enter;
+ long mark_leave;
+ long offset;
+} CaptureAttr;
+
+typedef struct _PdaTables
+{
+ /* Parser table data. */
+ int *indicies;
+ int *owners;
+ int *keys;
+ unsigned int *offsets;
+ unsigned int *targs;
+ unsigned int *actInds;
+ unsigned int *actions;
+ int *commitLen;
+ int *tokenRegionInds;
+ int *tokenRegions;
+ int *tokenPreRegions;
+
+ int numIndicies;
+ int numKeys;
+ int numStates;
+ int numTargs;
+ int numActInds;
+ int numActions;
+ int numCommitLen;
+ int numRegionItems;
+ int numPreRegionItems;
+} PdaTables;
+
+typedef struct _PoolBlock
+{
+ void *data;
+ struct _PoolBlock *next;
+} PoolBlock;
+
+typedef struct _PoolItem
+{
+ struct _PoolItem *next;
+} PoolItem;
+
+typedef struct _PoolAlloc
+{
+ PoolBlock *head;
+ long nextel;
+ PoolItem *pool;
+ int sizeofT;
+} PoolAlloc;
+
+typedef struct _PdaRun
+{
+ int numRetry;
+ ParseTree *stackTop;
+ Ref *tokenList;
+ int cs;
+ int nextRegionInd;
+
+ PdaTables *tables;
+ int parserId;
+
+ /* Reused. */
+ RtCodeVect rcodeCollect;
+ RtCodeVect reverseCode;
+
+ int stopParsing;
+ long stopTarget;
+
+ ParseTree *accumIgnore;
+
+ Kid *btPoint;
+
+ struct Bindings *bindings;
+
+ int revertOn;
+
+ Tree *context;
+
+ int stop;
+ int parseError;
+
+ long steps;
+ long targetSteps;
+
+ int onDeck;
+
+ /*
+ * Data we added when refactoring the parsing engine into a coroutine.
+ */
+
+ ParseTree *parseInput;
+ FrameInfo *fi;
+ int reduction;
+ ParseTree *redLel;
+ int curState;
+ ParseTree *lel;
+ int triggerUndo;
+
+ int tokenId;
+ Head *tokdata;
+ int frameId;
+ int next;
+ ParseTree *undoLel;
+
+ int checkNext;
+ int checkStop;
+
+ /* The lhs is sometimes saved before reduction actions in case it is
+ * replaced and we need to restore it on backtracking */
+ Tree *parsed;
+
+ int reject;
+
+ /* Instruction pointer to use when we stop parsing and execute code. */
+ Code *code;
+
+ int rcBlockCount;
+
+ Tree *parseErrorText;
+
+ FsmRun *fsmRun;
+ FsmRun _fsmRun;
+} PdaRun;
+
+void initPdaRun( struct colm_program *prg, PdaRun *pdaRun, PdaTables *tables,
+ int parserId, long stopTarget, int revertOn, Tree *context );
+void clearPdaRun( struct colm_program *prg, struct colm_tree **sp, PdaRun *pdaRun );
+void rtCodeVectReplace( RtCodeVect *vect, long pos, const Code *val, long len );
+void rtCodeVectEmpty( RtCodeVect *vect );
+void rtCodeVectRemove( RtCodeVect *vect, long pos, long len );
+
+void initRtCodeVect( RtCodeVect *codeVect );
+
+//inline static void remove( RtCodeVect *vect, long pos );
+inline static void appendCode( RtCodeVect *vect, const Code val );
+inline static void appendCode2( RtCodeVect *vect, const Code *val, long len );
+inline static void appendHalf( RtCodeVect *vect, Half half );
+inline static void appendWord( RtCodeVect *vect, Word word );
+
+inline static void appendCode2( RtCodeVect *vect, const Code *val, long len )
+{
+ rtCodeVectReplace( vect, vect->tabLen, val, len );
+}
+
+inline static void appendCode( RtCodeVect *vect, const Code val )
+{
+ rtCodeVectReplace( vect, vect->tabLen, &val, 1 );
+}
+
+inline static void appendHalf( RtCodeVect *vect, Half half )
+{
+ /* not optimal. */
+ appendCode( vect, half & 0xff );
+ appendCode( vect, (half>>8) & 0xff );
+}
+
+inline static void appendWord( RtCodeVect *vect, Word word )
+{
+ /* not optimal. */
+ appendCode( vect, word & 0xff );
+ appendCode( vect, (word>>8) & 0xff );
+ appendCode( vect, (word>>16) & 0xff );
+ appendCode( vect, (word>>24) & 0xff );
+ #if SIZEOF_LONG == 8
+ appendCode( vect, (word>>32) & 0xff );
+ appendCode( vect, (word>>40) & 0xff );
+ appendCode( vect, (word>>48) & 0xff );
+ appendCode( vect, (word>>56) & 0xff );
+ #endif
+}
+
+void incrementSteps( PdaRun *pdaRun );
+void decrementSteps( PdaRun *pdaRun );
+
+int makeReverseCode( PdaRun *pdaRun );
+void transferReverseCode( PdaRun *pdaRun, ParseTree *tree );
+
+void clearStreamImpl( struct colm_program *prg, Tree **sp, StreamImpl *inputStream );
+void initSourceStream( StreamImpl *in );
+void clearSourceStream( struct colm_program *prg, Tree **sp, StreamImpl *sourceStream );
+
+
+void clearContext( PdaRun *pdaRun, Tree **sp );
+Kid *extractIgnore( PdaRun *pdaRun );
+long stackTopTarget( struct colm_program *prg, PdaRun *pdaRun );
+void runCommit( PdaRun *pdaRun );
+int isParserStopFinished( PdaRun *pdaRun );
+void pdaRunMatch( PdaRun *pdaRun, Kid *tree, Kid *pattern );
+
+/* Offset can be used to look at the next nextRegionInd. */
+int pdaRunGetNextRegion( PdaRun *pdaRun, int offset );
+int pdaRunGetNextPreRegion( PdaRun *pdaRun );
+
+#define PcrStart 1
+#define PcrDone 2
+#define PcrReduction 3
+#define PcrGeneration 4
+#define PcrPreEof 5
+#define PcrReverse 6
+
+long parseToken( struct colm_program *prg, Tree **sp, PdaRun *pdaRun,
+ FsmRun *fsmRun, StreamImpl *inputStream, long entry );
+
+long undoParse( Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *inputStream, Tree *tree );
+
+Head *streamPull( struct colm_program *prg, PdaRun *pdaRun, StreamImpl *is, long length );
+Head *stringAllocPointer( struct colm_program *prg, const char *data, long length );
+
+void streamPushText( StreamImpl *inputStream, const char *data, long length );
+void streamPushTree( StreamImpl *inputStream, Tree *tree, int ignore );
+void streamPushStream( StreamImpl *inputStream, Tree *tree );
+void undoStreamPush( struct colm_program *prg, Tree **sp, StreamImpl *inputStream, long length );
+void undoStreamAppend( struct colm_program *prg, Tree **sp, StreamImpl *inputStream, struct colm_tree *tree, long length );
+Kid *makeTokenWithData( struct colm_program *prg, PdaRun *pdaRun, FsmRun *fsmRun,
+ StreamImpl *inputStream, int id, Head *tokdata );
+
+void pushBinding( PdaRun *pdaRun, ParseTree *parseTree );
+
+void executeGenerationAction( struct colm_program *prg, Tree **sp, FsmRun *fsmRun, PdaRun *pdaRun,
+ StreamImpl *inputStream, int frameId, Code *code, long id, Head *tokdata );
+Kid *extractIgnore( PdaRun *pdaRun );
+void clearIgnoreList( struct colm_program *prg, Tree **sp, Kid *kid );
+long parseLoop( struct colm_program *prg, Tree **sp, PdaRun *pdaRun,
+ StreamImpl *inputStream, long entry );
+Tree *getParsedRoot( PdaRun *pdaRun, int stop );
+
+void resetToken( PdaRun *pdaRun );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/pool.c b/src/pool.c
new file mode 100644
index 0000000..93cabd2
--- /dev/null
+++ b/src/pool.c
@@ -0,0 +1,307 @@
+/*
+ * Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <string.h>
+#include <stdlib.h>
+
+#include <colm/pdarun.h>
+#include <colm/pool.h>
+#include <colm/debug.h>
+
+void initPoolAlloc( PoolAlloc *poolAlloc, int sizeofT )
+{
+ poolAlloc->head = 0;
+ poolAlloc->nextel = FRESH_BLOCK;
+ poolAlloc->pool = 0;
+ poolAlloc->sizeofT = sizeofT;
+}
+
+void *poolAllocAllocate( PoolAlloc *poolAlloc )
+{
+ //debug( REALM_POOL, "pool allocation\n" );
+
+#ifdef POOL_MALLOC
+ void *res = malloc( poolAlloc->sizeofT );
+ memset( res, 0, poolAlloc->sizeofT );
+ return res;
+#else
+
+ void *newEl = 0;
+ if ( poolAlloc->pool == 0 ) {
+ if ( poolAlloc->nextel == FRESH_BLOCK ) {
+ PoolBlock *newBlock = (PoolBlock*)malloc( sizeof(PoolBlock) );
+ newBlock->data = malloc( poolAlloc->sizeofT * FRESH_BLOCK );
+ newBlock->next = poolAlloc->head;
+ poolAlloc->head = newBlock;
+ poolAlloc->nextel = 0;
+ }
+
+ newEl = (char*)poolAlloc->head->data + poolAlloc->sizeofT * poolAlloc->nextel++;
+ }
+ else {
+ newEl = poolAlloc->pool;
+ poolAlloc->pool = poolAlloc->pool->next;
+ }
+ memset( newEl, 0, poolAlloc->sizeofT );
+ return newEl;
+#endif
+}
+
+void poolAllocFree( PoolAlloc *poolAlloc, void *el )
+{
+ #if 0
+ /* Some sanity checking. Best not to normally run with this on. */
+ char *p = (char*)el + sizeof(PoolItem*);
+ char *pe = (char*)el + sizeof(T);
+ for ( ; p < pe; p++ )
+ assert( *p != 0xcc );
+ memset( el, 0xcc, sizeof(T) );
+ #endif
+
+#ifdef POOL_MALLOC
+ free( el );
+#else
+ PoolItem *pi = (PoolItem*) el;
+ pi->next = poolAlloc->pool;
+ poolAlloc->pool = pi;
+#endif
+}
+
+void poolAllocClear( PoolAlloc *poolAlloc )
+{
+ PoolBlock *block = poolAlloc->head;
+ while ( block != 0 ) {
+ PoolBlock *next = block->next;
+ free( block->data );
+ free( block );
+ block = next;
+ }
+
+ poolAlloc->head = 0;
+ poolAlloc->nextel = 0;
+ poolAlloc->pool = 0;
+}
+
+long poolAllocNumLost( PoolAlloc *poolAlloc )
+{
+ /* Count the number of items allocated. */
+ long lost = 0;
+ PoolBlock *block = poolAlloc->head;
+ if ( block != 0 ) {
+ lost = poolAlloc->nextel;
+ block = block->next;
+ while ( block != 0 ) {
+ lost += FRESH_BLOCK;
+ block = block->next;
+ }
+ }
+
+ /* Subtract. Items that are on the free list. */
+ PoolItem *pi = poolAlloc->pool;
+ while ( pi != 0 ) {
+ lost -= 1;
+ pi = pi->next;
+ }
+
+ return lost;
+}
+
+/*
+ * Kid
+ */
+
+Kid *kidAllocate( Program *prg )
+{
+ return (Kid*) poolAllocAllocate( &prg->kidPool );
+}
+
+void kidFree( Program *prg, Kid *el )
+{
+ poolAllocFree( &prg->kidPool, el );
+}
+
+void kidClear( Program *prg )
+{
+ poolAllocClear( &prg->kidPool );
+}
+
+long kidNumLost( Program *prg )
+{
+ return poolAllocNumLost( &prg->kidPool );
+}
+
+/*
+ * Tree
+ */
+
+Tree *treeAllocate( Program *prg )
+{
+ return (Tree*) poolAllocAllocate( &prg->treePool );
+}
+
+void treeFree( Program *prg, Tree *el )
+{
+ poolAllocFree( &prg->treePool, el );
+}
+
+void treeClear( Program *prg )
+{
+ poolAllocClear( &prg->treePool );
+}
+
+long treeNumLost( Program *prg )
+{
+ return poolAllocNumLost( &prg->treePool );
+}
+
+/*
+ * ParseTree
+ */
+
+ParseTree *parseTreeAllocate( Program *prg )
+{
+ return (ParseTree*) poolAllocAllocate( &prg->parseTreePool );
+}
+
+void parseTreeFree( Program *prg, ParseTree *el )
+{
+ poolAllocFree( &prg->parseTreePool, el );
+}
+
+void parseTreeClear( Program *prg )
+{
+ poolAllocClear( &prg->parseTreePool );
+}
+
+long parseTreeNumLost( Program *prg )
+{
+ return poolAllocNumLost( &prg->parseTreePool );
+}
+
+/*
+ * ListEl
+ */
+
+ListEl *listElAllocate( Program *prg )
+{
+ return (ListEl*) poolAllocAllocate( &prg->listElPool );
+}
+
+void listElFree( Program *prg, ListEl *el )
+{
+ poolAllocFree( &prg->listElPool, el );
+}
+
+void listElClear( Program *prg )
+{
+ poolAllocClear( &prg->listElPool );
+}
+
+long listElNumLost( Program *prg )
+{
+ return poolAllocNumLost( &prg->listElPool );
+}
+
+/*
+ * MapEl
+ */
+
+MapEl *mapElAllocate( Program *prg )
+{
+ return (MapEl*) poolAllocAllocate( &prg->mapElPool );
+}
+
+void mapElFree( Program *prg, MapEl *el )
+{
+ poolAllocFree( &prg->mapElPool, el );
+}
+
+void mapElClear( Program *prg )
+{
+ poolAllocClear( &prg->mapElPool );
+}
+
+long mapElNumLost( Program *prg )
+{
+ return poolAllocNumLost( &prg->mapElPool );
+}
+
+/*
+ * Head
+ */
+
+Head *headAllocate( Program *prg )
+{
+ return (Head*) poolAllocAllocate( &prg->headPool );
+}
+
+void headFree( Program *prg, Head *el )
+{
+ poolAllocFree( &prg->headPool, el );
+}
+
+void headClear( Program *prg )
+{
+ poolAllocClear( &prg->headPool );
+}
+
+long headNumLost( Program *prg )
+{
+ return poolAllocNumLost( &prg->headPool );
+}
+
+/*
+ * Location
+ */
+
+Location *locationAllocate( Program *prg )
+{
+ return (Location*) poolAllocAllocate( &prg->locationPool );
+}
+
+void locationFree( Program *prg, Location *el )
+{
+ poolAllocFree( &prg->locationPool, el );
+}
+
+void locationClear( Program *prg )
+{
+ poolAllocClear( &prg->locationPool );
+}
+
+long locationNumLost( Program *prg )
+{
+ return poolAllocNumLost( &prg->locationPool );
+}
+
+/*
+ * Stream
+ */
+
+Stream *streamAllocate( Program *prg )
+{
+ return (Stream*)mapElAllocate( prg );
+}
+
+void streamFree( Program *prg, Stream *stream )
+{
+ mapElFree( prg, (MapEl*)stream );
+}
diff --git a/src/pool.h b/src/pool.h
new file mode 100644
index 0000000..3a547bb
--- /dev/null
+++ b/src/pool.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _POOL_H
+#define _POOL_H
+
+/* Allocation, number of items. */
+#define FRESH_BLOCK 8128
+
+#include <colm/pdarun.h>
+#include <colm/map.h>
+#include <colm/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void initPoolAlloc( PoolAlloc *poolAlloc, int sizeofT );
+
+Kid *kidAllocate( Program *prg );
+void kidFree( Program *prg, Kid *el );
+void kidClear( Program *prg );
+long kidNumLost( Program *prg );
+
+Tree *treeAllocate( Program *prg );
+void treeFree( Program *prg, Tree *el );
+void treeClear( Program *prg );
+long treeNumLost( Program *prg );
+
+ParseTree *parseTreeAllocate( Program *prg );
+void parseTreeFree( Program *prg, ParseTree *el );
+void parseTreeClear( Program *prg );
+long parseTreeNumLost( Program *prg );
+
+ListEl *listElAllocate( Program *prg );
+void listElFree( Program *prg, ListEl *el );
+void listElClear( Program *prg );
+long listElNumLost( Program *prg );
+
+MapEl *mapElAllocate( Program *prg );
+void mapElFree( Program *prg, MapEl *el );
+void mapElClear( Program *prg );
+long mapElNumLost( Program *prg );
+
+Head *headAllocate( Program *prg );
+void headFree( Program *prg, Head *el );
+void headClear( Program *prg );
+long headNumLost( Program *prg );
+
+Location *locationAllocate( Program *prg );
+void locationFree( Program *prg, Location *el );
+void locationClear( Program *prg );
+long locationNumLost( Program *prg );
+
+Stream *streamAllocate( Program *prg );
+void streamFree( Program *prg, Stream *stream );
+
+/* Wrong place. */
+TreePair mapRemove( Program *prg, Map *map, Tree *key );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/program.c b/src/program.c
new file mode 100644
index 0000000..21f197a
--- /dev/null
+++ b/src/program.c
@@ -0,0 +1,379 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <colm/pdarun.h>
+#include <colm/tree.h>
+#include <colm/bytecode.h>
+#include <colm/pool.h>
+#include <colm/debug.h>
+#include <colm/config.h>
+
+#include <alloca.h>
+#include <sys/mman.h>
+#include <string.h>
+#include <assert.h>
+#include <stdlib.h>
+
+#define VM_STACK_SIZE (8192)
+
+void clearGlobal( Program *prg, Tree **sp )
+{
+ /* Downref all the fields in the global object. */
+ int g;
+ for ( g = 0; g < prg->rtd->globalSize; g++ ) {
+ //assert( colm_get_attr( global, g )->refs == 1 );
+ treeDownref( prg, sp, colm_get_attr( prg->global, g ) );
+ }
+
+ /* Free the global object. */
+ if ( prg->rtd->globalSize > 0 )
+ freeAttrs( prg, prg->global->child );
+ treeFree( prg, prg->global );
+}
+
+void allocGlobal( Program *prg )
+{
+ /* Alloc the global. */
+ Tree *tree = treeAllocate( prg );
+ tree->child = allocAttrs( prg, prg->rtd->globalSize );
+ tree->refs = 1;
+ prg->global = tree;
+}
+
+void vm_init( Program *prg )
+{
+ StackBlock *b = malloc( sizeof(StackBlock) );
+ b->data = malloc( sizeof(Tree*) * VM_STACK_SIZE );
+ b->len = VM_STACK_SIZE;
+ b->offset = 0;
+ b->next = 0;
+
+ prg->stackBlock = b;
+
+ prg->sb_beg = prg->stackBlock->data;
+ prg->sb_end = prg->stackBlock->data + prg->stackBlock->len;
+
+ prg->stackRoot = prg->sb_end;
+}
+
+Tree **colm_vm_root( Program *prg )
+{
+ return prg->stackRoot;
+}
+
+Tree **vm_bs_add( Program *prg, Tree **sp, int n )
+{
+ /* Close off the current block. */
+ if ( prg->stackBlock != 0 ) {
+ prg->stackBlock->offset = sp - prg->stackBlock->data;
+ prg->sb_total += prg->stackBlock->len - prg->stackBlock->offset;
+ }
+
+ if ( prg->reserve != 0 && prg->reserve->len >= n) {
+ StackBlock *b = prg->reserve;
+ b->next = prg->stackBlock;
+ b->offset = 0;
+
+ prg->stackBlock = b;
+ prg->reserve = 0;
+ }
+ else {
+ StackBlock *b = malloc( sizeof(StackBlock) );
+ int size = VM_STACK_SIZE;
+ if ( n > size )
+ size = n;
+ b->next = prg->stackBlock;
+ b->data = malloc( sizeof(Tree*) * size );
+ b->len = size;
+ b->offset = 0;
+
+ prg->stackBlock = b;
+ }
+
+ prg->sb_beg = prg->stackBlock->data;
+ prg->sb_end = prg->stackBlock->data + prg->stackBlock->len;
+
+ return prg->sb_end;
+}
+
+Tree **vm_bs_pop( Program *prg, Tree **sp, int n )
+{
+ while ( 1 ) {
+ Tree **end = prg->stackBlock->data + prg->stackBlock->len;
+ int remaining = end - sp;
+
+ /* Don't have to free this block. Remaining values to pop leave us
+ * inside it. */
+ if ( n < remaining ) {
+ sp += n;
+ return sp;
+ }
+
+ if ( prg->stackBlock->next == 0 ) {
+ /* Don't delete the sentinal stack block. Returns the end as in the
+ * creation of the first stack block. */
+ return prg->sb_end;
+ }
+
+ /* Clear any previous reserve. We are going to save this block as the
+ * reserve. */
+ if ( prg->reserve != 0 ) {
+ free( prg->reserve->data );
+ free( prg->reserve );
+ }
+
+ /* Pop the stack block. */
+ StackBlock *b = prg->stackBlock;
+ prg->stackBlock = prg->stackBlock->next;
+ prg->reserve = b;
+
+ /* Setup the bounds. Note that we restore the full block, which is
+ * necessary to honour any CONTIGUOUS statements that counted on it
+ * before a subsequent CONTIGUOUS triggered a new block. */
+ prg->sb_beg = prg->stackBlock->data;
+ prg->sb_end = prg->stackBlock->data + prg->stackBlock->len;
+
+ /* Update the total stack usage. */
+ prg->sb_total -= prg->stackBlock->len - prg->stackBlock->offset;
+
+ n -= remaining;
+ sp = prg->stackBlock->data + prg->stackBlock->offset;
+ }
+}
+
+void vm_clear( Program *prg )
+{
+ while ( prg->stackBlock != 0 ) {
+ StackBlock *b = prg->stackBlock;
+ prg->stackBlock = prg->stackBlock->next;
+
+ free( b->data );
+ free( b );
+ }
+
+ if ( prg->reserve != 0 ) {
+ free( prg->reserve->data );
+ free( prg->reserve );
+ }
+}
+
+Tree *colm_return_val( struct colm_program *prg )
+{
+ return prg->returnVal;
+}
+
+void colm_set_debug( Program *prg, long activeRealm )
+{
+ prg->activeRealm = activeRealm;
+}
+
+Program *colm_new_program( RuntimeData *rtd )
+{
+ Program *prg = malloc(sizeof(Program));
+ memset( prg, 0, sizeof(Program) );
+
+ assert( sizeof(Int) <= sizeof(Tree) );
+ assert( sizeof(Str) <= sizeof(Tree) );
+ assert( sizeof(Pointer) <= sizeof(Tree) );
+ assert( sizeof(Map) <= sizeof(MapEl) );
+ assert( sizeof(List) <= sizeof(MapEl) );
+ assert( sizeof(Stream) <= sizeof(MapEl) );
+ assert( sizeof(Parser) <= sizeof(MapEl) );
+
+ prg->rtd = rtd;
+ prg->ctxDepParsing = 1;
+
+ initPoolAlloc( &prg->kidPool, sizeof(Kid) );
+ initPoolAlloc( &prg->treePool, sizeof(Tree) );
+ initPoolAlloc( &prg->parseTreePool, sizeof(ParseTree) );
+ initPoolAlloc( &prg->listElPool, sizeof(ListEl) );
+ initPoolAlloc( &prg->mapElPool, sizeof(MapEl) );
+ initPoolAlloc( &prg->headPool, sizeof(Head) );
+ initPoolAlloc( &prg->locationPool, sizeof(Location) );
+
+ Int *trueInt = (Int*) treeAllocate( prg );
+ trueInt->id = LEL_ID_BOOL;
+ trueInt->refs = 1;
+ trueInt->value = 1;
+
+ Int *falseInt = (Int*) treeAllocate( prg );
+ falseInt->id = LEL_ID_BOOL;
+ falseInt->refs = 1;
+ falseInt->value = 0;
+
+ prg->trueVal = (Tree*)trueInt;
+ prg->falseVal = (Tree*)falseInt;
+
+ /* Allocate the global variable. */
+ allocGlobal( prg );
+
+ /* Allocate the VM stack. */
+ vm_init( prg );
+ return prg;
+}
+
+void colm_run_program( Program *prg, int argc, const char **argv )
+{
+ if ( prg->rtd->rootCodeLen == 0 )
+ return;
+
+ /* Make the arguments available to the program. */
+ prg->argc = argc;
+ prg->argv = argv;
+
+ Execution execution;
+ memset( &execution, 0, sizeof(execution) );
+ execution.frameId = prg->rtd->rootFrameId;
+
+ mainExecution( prg, &execution, prg->rtd->rootCode );
+
+ /* Clear the arg and stack. */
+ prg->argc = 0;
+ prg->argv = 0;
+}
+
+Tree *colm_run_func( struct colm_program *prg, int frameId, const char **params, int paramCount )
+{
+ /* Make the arguments available to the program. */
+ prg->argc = 0;
+ prg->argv = 0;
+
+ Execution execution;
+ memset( &execution, 0, sizeof(execution) );
+
+ Tree **sp = prg->stackRoot;
+
+ FrameInfo *fi = &prg->rtd->frameInfo[frameId];
+ Code *code = fi->codeWC;
+ long stretch = fi->argSize + 4 + fi->frameSize;
+ vm_contiguous( stretch );
+
+ int p;
+ for ( p = 0; p < paramCount; p++ ) {
+ if ( params[p] == 0 ) {
+ vm_push( 0 );
+ }
+ else {
+ Head *head = stringAllocPointer( prg, params[p], strlen(params[p]) );
+ Tree *tree = constructString( prg, head );
+ treeUpref( tree );
+ vm_push( tree );
+ }
+ }
+
+ /* Set up the stack as if we have called. We allow a return value. */
+ vm_push( 0 );
+ vm_push( 0 );
+ vm_push( 0 );
+ vm_push( 0 );
+
+ execution.framePtr = vm_ptop();
+ execution.frameId = frameId;
+
+ /* Execution loop. */
+ sp = executeCode( prg, &execution, sp, code );
+
+ treeDownref( prg, sp, prg->returnVal );
+ prg->returnVal = vm_pop();
+
+ assert( sp == prg->stackRoot );
+
+ return prg->returnVal;
+};
+
+int colm_delete_program( Program *prg )
+{
+ Tree **sp = prg->stackRoot;
+ int exitStatus = prg->exitStatus;
+
+ treeDownref( prg, sp, prg->returnVal );
+ clearGlobal( prg, sp );
+
+ /* Clear the heap. */
+ Kid *a = prg->heap;
+ while ( a != 0 ) {
+ Kid *next = a->next;
+ treeDownref( prg, sp, a->tree );
+ kidFree( prg, a );
+ a = next;
+ }
+
+ treeDownref( prg, sp, prg->trueVal );
+ treeDownref( prg, sp, prg->falseVal );
+
+ treeDownref( prg, sp, (Tree*)prg->stdinVal );
+ treeDownref( prg, sp, (Tree*)prg->stdoutVal );
+ treeDownref( prg, sp, (Tree*)prg->stderrVal );
+
+ treeDownref( prg, sp, prg->error );
+
+#if DEBUG
+ long kidLost = kidNumLost( prg );
+ long treeLost = treeNumLost( prg );
+ long parseTreeLost = parseTreeNumLost( prg );
+ long listLost = listElNumLost( prg );
+ long mapLost = mapElNumLost( prg );
+ long headLost = headNumLost( prg );
+ long locationLost = locationNumLost( prg );
+
+ if ( kidLost )
+ message( "warning: lost kids: %ld\n", kidLost );
+
+ if ( treeLost )
+ message( "warning: lost trees: %ld\n", treeLost );
+
+ if ( parseTreeLost )
+ message( "warning: lost parse trees: %ld\n", parseTreeLost );
+
+ if ( listLost )
+ message( "warning: lost listEls: %ld\n", listLost );
+
+ if ( mapLost )
+ message( "warning: lost mapEls: %ld\n", mapLost );
+
+ if ( headLost )
+ message( "warning: lost heads: %ld\n", headLost );
+
+ if ( locationLost )
+ message( "warning: lost locations: %ld\n", locationLost );
+#endif
+
+ kidClear( prg );
+ treeClear( prg );
+ headClear( prg );
+ parseTreeClear( prg );
+ listElClear( prg );
+ mapElClear( prg );
+ locationClear( prg );
+
+ RunBuf *rb = prg->allocRunBuf;
+ while ( rb != 0 ) {
+ RunBuf *next = rb->next;
+ free( rb );
+ rb = next;
+ }
+
+ vm_clear( prg );
+
+ free( prg );
+
+ return exitStatus;
+}
diff --git a/src/program.h b/src/program.h
new file mode 100644
index 0000000..225dc14
--- /dev/null
+++ b/src/program.h
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __COLM_PROGRAM_H
+#define __COLM_PROGRAM_H
+
+#include <colm/pdarun.h>
+
+typedef struct ColmStackBlock
+{
+ Tree **data;
+ int len;
+ int offset;
+ struct ColmStackBlock *next;
+} StackBlock;
+
+typedef struct colm_sections
+{
+ LangElInfo *lelInfo;
+ long numLangEls;
+
+ ProdInfo *prodInfo;
+ long numProds;
+
+ RegionInfo *regionInfo;
+ long numRegions;
+
+ Code *rootCode;
+ long rootCodeLen;
+ long rootFrameId;
+
+ FrameInfo *frameInfo;
+ long numFrames;
+
+ FunctionInfo *functionInfo;
+ long numFunctions;
+
+ PatConsInfo *patReplInfo;
+ long numPatterns;
+
+ PatConsNode *patReplNodes;
+ long numPatternNodes;
+
+ GenericInfo *genericInfo;
+ long numGenerics;
+
+ long argvGenericId;
+
+ const char **litdata;
+ long *litlen;
+ Head **literals;
+ long numLiterals;
+
+ CaptureAttr *captureAttr;
+ long numCapturedAttr;
+
+ FsmTables *fsmTables;
+ PdaTables *pdaTables;
+ int *startStates;
+ int *eofLelIds;
+ int *parserLelIds;
+ long numParsers;
+
+ long globalSize;
+
+ long firstNonTermId;
+
+ long integerId;
+ long stringId;
+ long anyId;
+ long eofId;
+ long noTokenId;
+
+ void (*fsmExecute)( struct _FsmRun *fsmRun, struct _StreamImpl *inputStream );
+ void (*sendNamedLangEl)( struct colm_program *prg, Tree **tree, struct _PdaRun *pdaRun,
+ struct _FsmRun *fsmRun, struct _StreamImpl *inputStream );
+ void (*initBindings)( struct _PdaRun *pdaRun );
+ void (*popBinding)( struct _PdaRun *pdaRun, ParseTree *tree );
+
+} RuntimeData;
+
+
+typedef struct colm_program
+{
+ long activeRealm;
+
+ int argc;
+ const char **argv;
+
+ unsigned char ctxDepParsing;
+ RuntimeData *rtd;
+ Tree *global;
+ int induceExit;
+ int exitStatus;
+
+ PoolAlloc kidPool;
+ PoolAlloc treePool;
+ PoolAlloc parseTreePool;
+ PoolAlloc listElPool;
+ PoolAlloc mapElPool;
+ PoolAlloc headPool;
+ PoolAlloc locationPool;
+
+ Tree *trueVal;
+ Tree *falseVal;
+
+ Kid *heap;
+
+ Stream *stdinVal;
+ Stream *stdoutVal;
+ Stream *stderrVal;
+
+ Tree *error;
+
+ RunBuf *allocRunBuf;
+
+ /* Current stack block limits. Changed when crossing block boundaries. */
+ Tree **sb_beg;
+ Tree **sb_end;
+ long sb_total;
+ StackBlock *reserve;
+
+ StackBlock *stackBlock;
+ Tree **stackRoot;
+
+ /* Returned value for main program and any exported functions. */
+ Tree *returnVal;
+} Program;
+
+#endif
diff --git a/src/redbuild.cc b/src/redbuild.cc
new file mode 100644
index 0000000..257bc92
--- /dev/null
+++ b/src/redbuild.cc
@@ -0,0 +1,559 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#include "global.h"
+#include "redbuild.h"
+#include "fsmgraph.h"
+#include "redfsm.h"
+#include "fsmcodegen.h"
+#include <string.h>
+
+using namespace std;
+
+RedFsmBuild::RedFsmBuild( Compiler *pd, FsmGraph *fsm )
+:
+ pd(pd),
+ fsm(fsm),
+ nextActionTableId(0),
+ startState(-1),
+ errState(-1)
+{
+}
+
+void RedFsmBuild::initActionList( unsigned long length )
+{
+ redFsm->allActions = new GenAction[length];
+ memset( redFsm->allActions, 0, sizeof(GenAction) * length );
+ for ( unsigned long a = 0; a < length; a++ )
+ redFsm->genActionList.append( redFsm->allActions+a );
+}
+
+
+void RedFsmBuild::makeActionList()
+{
+ /* Determine which actions to write. */
+ int nextActionId = 0;
+ for ( ActionList::Iter act = pd->actionList; act.lte(); act++ ) {
+ if ( act->numRefs() > 0 || act->numCondRefs > 0 )
+ act->actionId = nextActionId++;
+ }
+
+ initActionList( nextActionId );
+ curAction = 0;
+
+ for ( ActionList::Iter act = pd->actionList; act.lte(); act++ ) {
+ if ( act->actionId >= 0 )
+ makeAction( act );
+ }
+}
+
+void RedFsmBuild::initActionTableList( unsigned long length )
+{
+ redFsm->allActionTables = new RedAction[length];
+}
+
+void RedFsmBuild::initStateList( unsigned long length )
+{
+ redFsm->allStates = new RedState[length];
+ for ( unsigned long s = 0; s < length; s++ )
+ redFsm->stateList.append( redFsm->allStates+s );
+
+ /* We get the start state as an offset, set the pointer now. */
+ assert( startState >= 0 );
+ redFsm->startState = redFsm->allStates + startState;
+ if ( errState >= 0 )
+ redFsm->errState = redFsm->allStates + errState;
+ for ( EntryIdVect::Iter en = redFsm->entryPointIds; en.lte(); en++ )
+ redFsm->entryPoints.insert( redFsm->allStates + *en );
+
+ /* The nextStateId is no longer used to assign state ids (they come in set
+ * from the frontend now), however generation code still depends on it.
+ * Should eventually remove this variable. */
+ redFsm->nextStateId = redFsm->stateList.length();
+}
+
+void RedFsmBuild::addEntryPoint( int entryId, unsigned long entryState )
+{
+ redFsm->entryPointIds.append( entryState );
+ redFsm->redEntryMap.insert( entryId, entryState );
+}
+
+void RedFsmBuild::addRegionToEntry( int regionId, int entryId )
+{
+ assert( regionId == redFsm->regionToEntry.length() );
+ redFsm->regionToEntry.append( entryId );
+}
+
+void RedFsmBuild::initTransList( int snum, unsigned long length )
+{
+ /* Could preallocate the out range to save time growing it. For now do
+ * nothing. */
+}
+
+void RedFsmBuild::newTrans( int snum, int tnum, Key lowKey,
+ Key highKey, long targ, long action )
+{
+ /* Get the current state and range. */
+ RedState *curState = redFsm->allStates + snum;
+ RedTransList &destRange = curState->outRange;
+
+ if ( curState == redFsm->errState )
+ return;
+
+ /* Make the new transitions. */
+ RedState *targState = targ >= 0 ? (redFsm->allStates + targ) :
+ redFsm->wantComplete ? redFsm->getErrorState() : 0;
+ RedAction *actionTable = action >= 0 ? (redFsm->allActionTables + action) : 0;
+ RedTrans *trans = redFsm->allocateTrans( targState, actionTable );
+ RedTransEl transEl( lowKey, highKey, trans );
+
+ if ( redFsm->wantComplete ) {
+ /* If the machine is to be complete then we need to fill any gaps with
+ * the error transitions. */
+ if ( destRange.length() == 0 ) {
+ /* Range is currently empty. */
+ if ( keyOps->minKey < lowKey ) {
+ /* The first range doesn't start at the low end. */
+ Key fillHighKey = lowKey;
+ fillHighKey.decrement();
+
+ /* Create the filler with the state's error transition. */
+ RedTransEl newTel( keyOps->minKey, fillHighKey, redFsm->getErrorTrans() );
+ destRange.append( newTel );
+ }
+ }
+ else {
+ /* The range list is not empty, get the the last range. */
+ RedTransEl *last = &destRange[destRange.length()-1];
+ Key nextKey = last->highKey;
+ nextKey.increment();
+ if ( nextKey < lowKey ) {
+ /* There is a gap to fill. Make the high key. */
+ Key fillHighKey = lowKey;
+ fillHighKey.decrement();
+
+ /* Create the filler with the state's error transtion. */
+ RedTransEl newTel( nextKey, fillHighKey, redFsm->getErrorTrans() );
+ destRange.append( newTel );
+ }
+ }
+ }
+
+ /* Filler taken care of. Append the range. */
+ destRange.append( RedTransEl( lowKey, highKey, trans ) );
+}
+
+void RedFsmBuild::finishTransList( int snum )
+{
+ /* Get the current state and range. */
+ RedState *curState = redFsm->allStates + snum;
+ RedTransList &destRange = curState->outRange;
+
+ if ( curState == redFsm->errState )
+ return;
+
+ /* If building a complete machine we may need filler on the end. */
+ if ( redFsm->wantComplete ) {
+ /* Check if there are any ranges already. */
+ if ( destRange.length() == 0 ) {
+ /* Fill with the whole alphabet. */
+ /* Add the range on the lower and upper bound. */
+ RedTransEl newTel( keyOps->minKey, keyOps->maxKey, redFsm->getErrorTrans() );
+ destRange.append( newTel );
+ }
+ else {
+ /* Get the last and check for a gap on the end. */
+ RedTransEl *last = &destRange[destRange.length()-1];
+ if ( last->highKey < keyOps->maxKey ) {
+ /* Make the high key. */
+ Key fillLowKey = last->highKey;
+ fillLowKey.increment();
+
+ /* Create the new range with the error trans and append it. */
+ RedTransEl newTel( fillLowKey, keyOps->maxKey, redFsm->getErrorTrans() );
+ destRange.append( newTel );
+ }
+ }
+ }
+}
+
+void RedFsmBuild::setId( int snum, int id )
+{
+ RedState *curState = redFsm->allStates + snum;
+ curState->id = id;
+}
+
+void RedFsmBuild::setEofTrans( int snum, int eofTarget, int actId )
+{
+ RedState *curState = redFsm->allStates + snum;
+ RedState *targState = redFsm->allStates + eofTarget;
+ RedAction *eofAct = redFsm->allActionTables + actId;
+ curState->eofTrans = redFsm->allocateTrans( targState, eofAct );
+}
+
+void RedFsmBuild::setFinal( int snum )
+{
+ RedState *curState = redFsm->allStates + snum;
+ curState->isFinal = true;
+}
+
+
+void RedFsmBuild::setStateActions( int snum, long toStateAction,
+ long fromStateAction, long eofAction )
+{
+ RedState *curState = redFsm->allStates + snum;
+ if ( toStateAction >= 0 )
+ curState->toStateAction = redFsm->allActionTables + toStateAction;
+ if ( fromStateAction >= 0 )
+ curState->fromStateAction = redFsm->allActionTables + fromStateAction;
+ if ( eofAction >= 0 )
+ curState->eofAction = redFsm->allActionTables + eofAction;
+}
+
+void RedFsmBuild::closeMachine()
+{
+}
+
+
+void RedFsmBuild::initStateCondList( int snum, ulong length )
+{
+ /* Could preallocate these, as we could with transitions. */
+}
+
+void RedFsmBuild::setForcedErrorState()
+{
+ redFsm->forcedErrorState = true;
+}
+
+Key RedFsmBuild::findMaxKey()
+{
+ Key maxKey = keyOps->maxKey;
+ for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) {
+ assert( st->outSingle.length() == 0 );
+ assert( st->defTrans == 0 );
+
+ long rangeLen = st->outRange.length();
+ if ( rangeLen > 0 ) {
+ Key highKey = st->outRange[rangeLen-1].highKey;
+ if ( highKey > maxKey )
+ maxKey = highKey;
+ }
+ }
+ return maxKey;
+}
+
+
+void RedFsmBuild::makeActionTableList()
+{
+ /* Must first order the action tables based on their id. */
+ int numTables = nextActionTableId;
+ RedActionTable **tables = new RedActionTable*[numTables];
+ for ( ActionTableMap::Iter at = actionTableMap; at.lte(); at++ )
+ tables[at->id] = at;
+
+ initActionTableList( numTables );
+ curActionTable = 0;
+
+ for ( int t = 0; t < numTables; t++ ) {
+ long length = tables[t]->key.length();
+
+ /* Collect the action table. */
+ RedAction *redAct = redFsm->allActionTables + curActionTable;
+ redAct->actListId = curActionTable;
+ redAct->key.setAsNew( length );
+
+ int pos = 0;
+ for ( ActionTable::Iter atel = tables[t]->key; atel.lte(); atel++ ) {
+ int actionId = atel->value->actionId;
+ redAct->key[pos].key = 0;
+ redAct->key[pos].value = redFsm->allActions+actionId;
+ pos += 1;
+ }
+
+ /* Insert into the action table map. */
+ redFsm->actionMap.insert( redAct );
+
+ curActionTable += 1;
+
+ }
+
+ delete[] tables;
+}
+
+void RedFsmBuild::reduceActionTables()
+{
+ /* Reduce the actions tables to a set. */
+ for ( StateList::Iter st = fsm->stateList; st.lte(); st++ ) {
+ RedActionTable *actionTable = 0;
+
+ /* Reduce To State Actions. */
+ if ( st->toStateActionTable.length() > 0 ) {
+ if ( actionTableMap.insert( st->toStateActionTable, &actionTable ) )
+ actionTable->id = nextActionTableId++;
+ }
+
+ /* Reduce From State Actions. */
+ if ( st->fromStateActionTable.length() > 0 ) {
+ if ( actionTableMap.insert( st->fromStateActionTable, &actionTable ) )
+ actionTable->id = nextActionTableId++;
+ }
+
+ /* Reduce EOF actions. */
+ if ( st->eofActionTable.length() > 0 ) {
+ if ( actionTableMap.insert( st->eofActionTable, &actionTable ) )
+ actionTable->id = nextActionTableId++;
+ }
+
+ /* Loop the transitions and reduce their actions. */
+ for ( TransList::Iter trans = st->outList; trans.lte(); trans++ ) {
+ if ( trans->actionTable.length() > 0 ) {
+ if ( actionTableMap.insert( trans->actionTable, &actionTable ) )
+ actionTable->id = nextActionTableId++;
+ }
+ }
+ }
+}
+
+void RedFsmBuild::appendTrans( TransListVect &outList, Key lowKey,
+ Key highKey, FsmTrans *trans )
+{
+ if ( trans->toState != 0 || trans->actionTable.length() > 0 )
+ outList.append( TransEl( lowKey, highKey, trans ) );
+}
+
+void RedFsmBuild::makeTrans( Key lowKey, Key highKey, FsmTrans *trans )
+{
+ /* First reduce the action. */
+ RedActionTable *actionTable = 0;
+ if ( trans->actionTable.length() > 0 )
+ actionTable = actionTableMap.find( trans->actionTable );
+
+ long targ = trans->toState == 0 ? -1 : trans->toState->alg.stateNum;
+ long action = actionTable == 0 ? -1 : actionTable->id;
+
+ newTrans( curState, curTrans++, lowKey, highKey, targ, action );
+}
+
+void RedFsmBuild::makeTransList( FsmState *state )
+{
+ TransListVect outList;
+
+ /* If there is only are no ranges the task is simple. */
+ if ( state->outList.length() > 0 ) {
+ /* Loop each source range. */
+ for ( TransList::Iter trans = state->outList; trans.lte(); trans++ ) {
+ /* Reduce the transition. If it reduced to anything then add it. */
+ appendTrans( outList, trans->lowKey, trans->highKey, trans );
+ }
+ }
+
+ long length = outList.length();
+ initTransList( curState, length );
+ curTrans = 0;
+
+ for ( TransListVect::Iter tvi = outList; tvi.lte(); tvi++ )
+ makeTrans( tvi->lowKey, tvi->highKey, tvi->value );
+ finishTransList( curState );
+}
+
+void RedFsmBuild::newAction( int anum, char *name, int line, int col, Action *action )
+{
+ redFsm->allActions[anum].actionId = anum;
+ redFsm->allActions[anum].name = name;
+ redFsm->allActions[anum].loc.line = line;
+ redFsm->allActions[anum].loc.col = col;
+ redFsm->allActions[anum].inlineList = action->inlineList;
+ redFsm->allActions[anum].objField = action->objField;
+ redFsm->allActions[anum].markType = action->markType;
+ redFsm->allActions[anum].markId = action->markId + 1;
+}
+
+void RedFsmBuild::makeAction( Action *action )
+{
+ int line = action->loc.line;
+ int col = action->loc.col;
+
+ char *name = 0;
+ if ( action->name != 0 )
+ name = action->name;
+
+ newAction( curAction++, name, line, col, action );
+}
+
+void xmlEscapeHost( std::ostream &out, char *data, int len )
+{
+ char *end = data + len;
+ while ( data != end ) {
+ switch ( *data ) {
+ case '<': out << "&lt;"; break;
+ case '>': out << "&gt;"; break;
+ case '&': out << "&amp;"; break;
+ default: out << *data; break;
+ }
+ data += 1;
+ }
+}
+
+void RedFsmBuild::makeStateActions( FsmState *state )
+{
+ RedActionTable *toStateActions = 0;
+ if ( state->toStateActionTable.length() > 0 )
+ toStateActions = actionTableMap.find( state->toStateActionTable );
+
+ RedActionTable *fromStateActions = 0;
+ if ( state->fromStateActionTable.length() > 0 )
+ fromStateActions = actionTableMap.find( state->fromStateActionTable );
+
+ RedActionTable *eofActions = 0;
+ if ( state->eofActionTable.length() > 0 )
+ eofActions = actionTableMap.find( state->eofActionTable );
+
+ if ( toStateActions != 0 || fromStateActions != 0 || eofActions != 0 ) {
+ long toStateAction = -1;
+ long fromStateAction = -1;
+ long eofAction = -1;
+
+ if ( toStateActions != 0 )
+ toStateAction = toStateActions->id;
+ if ( fromStateActions != 0 )
+ fromStateAction = fromStateActions->id;
+ if ( eofActions != 0 )
+ eofAction = eofActions->id;
+
+ setStateActions( curState, toStateAction,
+ fromStateAction, eofAction );
+ }
+}
+
+void RedFsmBuild::makeStateList()
+{
+ /* Write the list of states. */
+ long length = fsm->stateList.length();
+ initStateList( length );
+ curState = 0;
+
+ for ( StateList::Iter st = fsm->stateList; st.lte(); st++ ) {
+ /* Both or neither should be set. */
+ assert( !( (st->eofTarget != 0) xor (st->eofActionTable.length() > 0) ) );
+
+ makeStateActions( st );
+ makeTransList( st );
+
+ setId( curState, st->alg.stateNum );
+ if ( st->isFinState() )
+ setFinal( curState );
+
+ /* If there is an eof target, make an eof transition. */
+ if ( st->eofTarget != 0 ) {
+ /* Find the eof actions. */
+ RedActionTable *eofActions = 0;
+ eofActions = actionTableMap.find( st->eofActionTable );
+ setEofTrans( curState, st->eofTarget->alg.stateNum, eofActions->id );
+ }
+
+ curState += 1;
+ }
+}
+
+void RedFsmBuild::makeEntryPoints()
+{
+ if ( fsm->lmRequiresErrorState )
+ setForcedErrorState();
+
+ for ( EntryMap::Iter en = fsm->entryPoints; en.lte(); en++ ) {
+ /* Get the name instantiation from nameIndex. */
+ FsmState *state = en->value;
+ long entry = state->alg.stateNum;
+ addEntryPoint( en->key, entry );
+ }
+
+ for ( RegionList::Iter reg = pd->regionList; reg.lte(); reg++ ) {
+ assert( reg->impl->regionNameInst != 0 );
+
+ TokenRegion *use = reg;
+
+ if ( use->zeroLel != 0 )
+ use = use->ignoreOnly;
+
+ NameInst *regionName = use->impl->regionNameInst;
+ addRegionToEntry( reg->id, regionName->id );
+ }
+}
+
+void RedFsmBuild::makeMachine()
+{
+ /* Action tables. */
+ reduceActionTables();
+
+ makeActionList();
+ makeActionTableList();
+ makeConditions();
+
+ /* Start state. */
+ startState = fsm->startState->alg.stateNum;
+
+ /* Error state. */
+ if ( fsm->errState != 0 )
+ errState = fsm->errState->alg.stateNum;
+
+ makeEntryPoints();
+ makeStateList();
+}
+
+void RedFsmBuild::makeConditions()
+{
+}
+
+RedFsm *RedFsmBuild::reduceMachine()
+{
+ redFsm = new RedFsm();
+ redFsm->wantComplete = true;
+
+ /* Open the definition. */
+ makeMachine();
+
+ /* Do this before distributing transitions out to singles and defaults
+ * makes life easier. */
+ redFsm->maxKey = findMaxKey();
+
+ redFsm->assignActionLocs();
+
+ /* Find the first final state (The final state with the lowest id). */
+ redFsm->findFirstFinState();
+
+ /* Choose default transitions and the single transition. */
+ redFsm->chooseDefaultSpan();
+
+ /* Maybe do flat expand, otherwise choose single. */
+ redFsm->chooseSingle();
+
+ /* Set up incoming transitions. */
+ redFsm->setInTrans();
+
+ /* Anlayze Machine will find the final action reference counts, among
+ * other things. We will use these in reporting the usage
+ * of fsm directives in action code. */
+ redFsm->analyzeMachine();
+
+ return redFsm;
+}
+
diff --git a/src/redbuild.h b/src/redbuild.h
new file mode 100644
index 0000000..eb2ce10
--- /dev/null
+++ b/src/redbuild.h
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _FSMREDUCE_H
+#define _FSMREDUCE_H
+
+#include <iostream>
+#include "avltree.h"
+#include "fsmgraph.h"
+#include "parsedata.h"
+
+/* Forwards. */
+struct FsmTrans;
+struct FsmGraph;
+struct Compiler;
+struct FsmCodeGen;
+struct RedFsm;
+struct GenCondSpace;
+struct Condition;
+
+struct RedActionTable
+:
+ public AvlTreeEl<RedActionTable>
+{
+ RedActionTable( const ActionTable &key )
+ :
+ key(key),
+ id(0)
+ { }
+
+ const ActionTable &getKey()
+ { return key; }
+
+ ActionTable key;
+ int id;
+};
+
+typedef AvlTree<RedActionTable, ActionTable, CmpActionTable> ActionTableMap;
+
+struct NextRedTrans
+{
+ Key lowKey, highKey;
+ FsmTrans *trans;
+ FsmTrans *next;
+
+ void load() {
+ if ( trans != 0 ) {
+ next = trans->next;
+ lowKey = trans->lowKey;
+ highKey = trans->highKey;
+ }
+ }
+
+ NextRedTrans( FsmTrans *t ) {
+ trans = t;
+ load();
+ }
+
+ void increment() {
+ trans = next;
+ load();
+ }
+};
+
+class RedFsmBuild
+{
+public:
+ RedFsmBuild( Compiler *pd, FsmGraph *fsm );
+ RedFsm *reduceMachine( );
+
+private:
+ void appendTrans( TransListVect &outList, Key lowKey, Key highKey, FsmTrans *trans );
+ void makeStateActions( FsmState *state );
+ void makeStateList();
+ void makeStateConditions( FsmState *state );
+
+ void initActionList( unsigned long length );
+ void newAction( int anum, char *name, int line, int col, Action *action );
+ void initActionTableList( unsigned long length );
+ void initCondSpaceList( ulong length );
+ void condSpaceItem( int cnum, long condActionId );
+ void newCondSpace( int cnum, int condSpaceId, Key baseKey );
+ void initStateCondList( int snum, ulong length );
+ void addStateCond( int snum, Key lowKey, Key highKey, long condNum );
+ void initStateList( unsigned long length );
+ void addRegionToEntry( int regionId, int entryId );
+ void addEntryPoint( int entryId, unsigned long entryState );
+ void setId( int snum, int id );
+ void initTransList( int snum, unsigned long length );
+ void newTrans( int snum, int tnum, Key lowKey, Key highKey,
+ long targ, long act );
+ void finishTransList( int snum );
+ void setFinal( int snum );
+ void setEofTrans( int snum, int eofTarget, int actId );
+ void setStateActions( int snum, long toStateAction,
+ long fromStateAction, long eofAction );
+ void setForcedErrorState();
+ void closeMachine();
+ Key findMaxKey();
+
+ void makeEntryPoints();
+ void makeGetKeyExpr();
+ void makeAccessExpr();
+ void makeCurStateExpr();
+ void makeConditions();
+ void makeInlineList( InlineList *inlineList, InlineItem *context );
+ void makeActionList();
+ void makeActionTableList();
+ void reduceTrans( FsmTrans *trans );
+ void reduceActionTables();
+ void makeTransList( FsmState *state );
+ void makeTrans( Key lowKey, Key highKey, FsmTrans *defTrans );
+ void makeAction( Action *action );
+ void makeLmSwitch( InlineItem *item );
+ void makeMachine();
+ void makeActionExec( InlineItem *item );
+ void makeActionExecTE( InlineItem *item );
+
+ Compiler *pd;
+ FsmGraph *fsm;
+ ActionTableMap actionTableMap;
+ int nextActionTableId;
+
+ int startState;
+ int errState;
+
+public:
+ RedFsm *redFsm;
+
+private:
+ int curAction;
+ int curActionTable;
+ int curTrans;
+ int curState;
+ int curCondSpace;
+ int curStateCond;
+};
+
+
+#endif /* _FSMREDUCE_H */
diff --git a/src/redfsm.cc b/src/redfsm.cc
new file mode 100644
index 0000000..5ec075c
--- /dev/null
+++ b/src/redfsm.cc
@@ -0,0 +1,1043 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <iostream>
+#include <sstream>
+#include "redfsm.h"
+#include "avlmap.h"
+#include "mergesort.h"
+#include "fsmgraph.h"
+#include "parsetree.h"
+
+using std::ostringstream;
+
+string nameOrLoc( GenAction *genAction )
+{
+ if ( genAction->name != 0 )
+ return string(genAction->name);
+ else {
+ ostringstream ret;
+ ret << genAction->loc.line << ":" << genAction->loc.col;
+ return ret.str();
+ }
+}
+
+RedFsm::RedFsm()
+:
+ wantComplete(false),
+ forcedErrorState(false),
+ nextActionId(0),
+ nextTransId(0),
+ errState(0),
+ errTrans(0),
+ firstFinState(0),
+ numFinStates(0),
+ allActions(0),
+ allActionTables(0),
+ allStates(0),
+ bAnyToStateActions(false),
+ bAnyFromStateActions(false),
+ bAnyRegActions(false),
+ bAnyEofActions(false),
+ bAnyActionGotos(false),
+ bAnyActionCalls(false),
+ bAnyActionRets(false),
+ bAnyRegActionRets(false),
+ bAnyRegActionByValControl(false),
+ bAnyRegNextStmt(false),
+ bAnyRegCurStateRef(false),
+ bAnyRegBreak(false),
+ bAnyLmSwitchError(false),
+ bAnyConditions(false)
+{
+}
+
+/* Does the machine have any actions. */
+bool RedFsm::anyActions()
+{
+ return actionMap.length() > 0;
+}
+
+void RedFsm::depthFirstOrdering( RedState *state )
+{
+ /* Nothing to do if the state is already on the list. */
+ if ( state->onStateList )
+ return;
+
+ /* Doing depth first, put state on the list. */
+ state->onStateList = true;
+ stateList.append( state );
+
+// /* At this point transitions should only be in ranges. */
+// assert( state->outSingle.length() == 0 );
+// assert( state->defTrans == 0 );
+
+ /* Recurse on singles. */
+ for ( RedTransList::Iter stel = state->outSingle; stel.lte(); stel++ ) {
+ if ( stel->value->targ != 0 )
+ depthFirstOrdering( stel->value->targ );
+ }
+
+ /* Recurse on everything ranges. */
+ for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) {
+ if ( rtel->value->targ != 0 )
+ depthFirstOrdering( rtel->value->targ );
+ }
+
+ if ( state->defTrans != 0 && state->defTrans->targ != 0 )
+ depthFirstOrdering( state->defTrans->targ );
+}
+
+/* Ordering states by transition connections. */
+void RedFsm::depthFirstOrdering()
+{
+ /* Init on state list flags. */
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ )
+ st->onStateList = false;
+
+ /* Clear out the state list, we will rebuild it. */
+ int stateListLen = stateList.length();
+ stateList.abandon();
+
+ /* Add back to the state list from the start state and all other entry
+ * points. */
+ depthFirstOrdering( startState );
+ for ( RedStateSet::Iter en = entryPoints; en.lte(); en++ )
+ depthFirstOrdering( *en );
+ if ( forcedErrorState )
+ depthFirstOrdering( errState );
+
+ /* Make sure we put everything back on. */
+ assert( stateListLen == stateList.length() );
+}
+
+/* Assign state ids by appearance in the state list. */
+void RedFsm::sequentialStateIds()
+{
+ /* Table based machines depend on the state numbers starting at zero. */
+ nextStateId = 0;
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ )
+ st->id = nextStateId++;
+}
+
+/* Stable sort the states by final state status. */
+void RedFsm::sortStatesByFinal()
+{
+ /* Move forward through the list and throw final states onto the end. */
+ RedState *state = 0;
+ RedState *next = stateList.head;
+ RedState *last = stateList.tail;
+ while ( state != last ) {
+ /* Move forward and load up the next. */
+ state = next;
+ next = state->next;
+
+ /* Throw to the end? */
+ if ( state->isFinal ) {
+ stateList.detach( state );
+ stateList.append( state );
+ }
+ }
+}
+
+/* Assign state ids by final state state status. */
+void RedFsm::sortStateIdsByFinal()
+{
+ /* Table based machines depend on this starting at zero. */
+ nextStateId = 0;
+
+ /* First pass to assign non final ids. */
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ if ( ! st->isFinal )
+ st->id = nextStateId++;
+ }
+
+ /* Second pass to assign final ids. */
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ if ( st->isFinal )
+ st->id = nextStateId++;
+ }
+}
+
+struct CmpStateById
+{
+ static int compare( RedState *st1, RedState *st2 )
+ {
+ if ( st1->id < st2->id )
+ return -1;
+ else if ( st1->id > st2->id )
+ return 1;
+ else
+ return 0;
+ }
+};
+
+void RedFsm::sortByStateId()
+{
+ /* Make the array. */
+ int pos = 0;
+ RedState **ptrList = new RedState*[stateList.length()];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ )
+ ptrList[pos++] = st;
+
+ MergeSort<RedState*, CmpStateById> mergeSort;
+ mergeSort.sort( ptrList, stateList.length() );
+
+ stateList.abandon();
+ for ( int st = 0; st < pos; st++ )
+ stateList.append( ptrList[st] );
+
+ delete[] ptrList;
+}
+
+/* Find the final state with the lowest id. */
+void RedFsm::findFirstFinState()
+{
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ if ( st->isFinal && (firstFinState == 0 || st->id < firstFinState->id) )
+ firstFinState = st;
+ }
+}
+
+void RedFsm::assignActionLocs()
+{
+ int nextLocation = 0;
+ for ( GenActionTableMap::Iter act = actionMap; act.lte(); act++ ) {
+ /* Store the loc, skip over the array and a null terminator. */
+ act->location = nextLocation;
+ nextLocation += act->key.length() + 1;
+ }
+}
+
+/* Check if we can extend the current range by displacing any ranges
+ * ahead to the singles. */
+bool RedFsm::canExtend( const RedTransList &list, int pos )
+{
+ /* Get the transition that we want to extend. */
+ RedTrans *extendTrans = list[pos].value;
+
+ /* Look ahead in the transition list. */
+ for ( int next = pos + 1; next < list.length(); pos++, next++ ) {
+ /* If they are not continuous then cannot extend. */
+ Key nextKey = list[next].lowKey;
+ nextKey.decrement();
+ if ( list[pos].highKey != nextKey )
+ break;
+
+ /* Check for the extenstion property. */
+ if ( extendTrans == list[next].value )
+ return true;
+
+ /* If the span of the next element is more than one, then don't keep
+ * checking, it won't be moved to single. */
+ unsigned long long nextSpan = keyOps->span( list[next].lowKey, list[next].highKey );
+ if ( nextSpan > 1 )
+ break;
+ }
+ return false;
+}
+
+/* Move ranges to the singles list. */
+void RedFsm::moveTransToSingle( RedState *state )
+{
+ RedTransList &range = state->outRange;
+ RedTransList &single = state->outSingle;
+ for ( int rpos = 0; rpos < range.length(); ) {
+ /* Check if this is a range we can extend. */
+ if ( canExtend( range, rpos ) ) {
+ /* Transfer singles over. */
+ while ( range[rpos].value != range[rpos+1].value ) {
+ /* Transfer the range to single. */
+ single.append( range[rpos+1] );
+ range.remove( rpos+1 );
+ }
+
+ /* Extend. */
+ range[rpos].highKey = range[rpos+1].highKey;
+ range.remove( rpos+1 );
+ }
+ /* Maybe move it to the singles. */
+ else if ( keyOps->span( range[rpos].lowKey, range[rpos].highKey ) == 1 ) {
+ single.append( range[rpos] );
+ range.remove( rpos );
+ }
+ else {
+ /* Keeping it in the ranges. */
+ rpos += 1;
+ }
+ }
+}
+
+/* Look through ranges and choose suitable single character transitions. */
+void RedFsm::chooseSingle()
+{
+ /* Loop the states. */
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Rewrite the transition list taking out the suitable single
+ * transtions. */
+ moveTransToSingle( st );
+ }
+}
+
+void RedFsm::makeFlat()
+{
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ st->condLowKey = 0;
+ st->condHighKey = 0;
+
+ if ( st->outRange.length() == 0 ) {
+ st->lowKey = st->highKey = 0;
+ st->transList = 0;
+ }
+ else {
+ st->lowKey = st->outRange[0].lowKey;
+ st->highKey = st->outRange[st->outRange.length()-1].highKey;
+ unsigned long long span = keyOps->span( st->lowKey, st->highKey );
+ st->transList = new RedTrans*[ span ];
+ memset( st->transList, 0, sizeof(RedTrans*)*span );
+
+ for ( RedTransList::Iter trans = st->outRange; trans.lte(); trans++ ) {
+ unsigned long long base, trSpan;
+ base = keyOps->span( st->lowKey, trans->lowKey )-1;
+ trSpan = keyOps->span( trans->lowKey, trans->highKey );
+ for ( unsigned long long pos = 0; pos < trSpan; pos++ )
+ st->transList[base+pos] = trans->value;
+ }
+
+ /* Fill in the gaps with the default transition. */
+ for ( unsigned long long pos = 0; pos < span; pos++ ) {
+ if ( st->transList[pos] == 0 )
+ st->transList[pos] = st->defTrans;
+ }
+ }
+ }
+}
+
+
+/* A default transition has been picked, move it from the outRange to the
+ * default pointer. */
+void RedFsm::moveToDefault( RedTrans *defTrans, RedState *state )
+{
+ /* Rewrite the outRange, omitting any ranges that use
+ * the picked default. */
+ RedTransList outRange;
+ for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) {
+ /* If it does not take the default, copy it over. */
+ if ( rtel->value != defTrans )
+ outRange.append( *rtel );
+ }
+
+ /* Save off the range we just created into the state's range. */
+ state->outRange.transfer( outRange );
+
+ /* Store the default. */
+ state->defTrans = defTrans;
+}
+
+bool RedFsm::alphabetCovered( RedTransList &outRange )
+{
+ /* Cannot cover without any out ranges. */
+ if ( outRange.length() == 0 )
+ return false;
+
+ /* If the first range doesn't start at the the lower bound then the
+ * alphabet is not covered. */
+ RedTransList::Iter rtel = outRange;
+ if ( keyOps->minKey < rtel->lowKey )
+ return false;
+
+ /* Check that every range is next to the previous one. */
+ rtel.increment();
+ for ( ; rtel.lte(); rtel++ ) {
+ Key highKey = rtel[-1].highKey;
+ highKey.increment();
+ if ( highKey != rtel->lowKey )
+ return false;
+ }
+
+ /* The last must extend to the upper bound. */
+ RedTransEl *last = &outRange[outRange.length()-1];
+ if ( last->highKey < keyOps->maxKey )
+ return false;
+
+ return true;
+}
+
+RedTrans *RedFsm::chooseDefaultSpan( RedState *state )
+{
+ /* Make a set of transitions from the outRange. */
+ RedTransPtrSet stateTransSet;
+ for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ )
+ stateTransSet.insert( rtel->value );
+
+ /* For each transition in the find how many alphabet characters the
+ * transition spans. */
+ unsigned long long *span = new unsigned long long[stateTransSet.length()];
+ memset( span, 0, sizeof(unsigned long long) * stateTransSet.length() );
+ for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) {
+ /* Lookup the transition in the set. */
+ RedTrans **inSet = stateTransSet.find( rtel->value );
+ int pos = inSet - stateTransSet.data;
+ span[pos] += keyOps->span( rtel->lowKey, rtel->highKey );
+ }
+
+ /* Find the max span, choose it for making the default. */
+ RedTrans *maxTrans = 0;
+ unsigned long long maxSpan = 0;
+ for ( RedTransPtrSet::Iter rtel = stateTransSet; rtel.lte(); rtel++ ) {
+ if ( span[rtel.pos()] > maxSpan ) {
+ maxSpan = span[rtel.pos()];
+ maxTrans = *rtel;
+ }
+ }
+
+ delete[] span;
+ return maxTrans;
+}
+
+/* Pick default transitions from ranges for the states. */
+void RedFsm::chooseDefaultSpan()
+{
+ /* Loop the states. */
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Only pick a default transition if the alphabet is covered. This
+ * avoids any transitions in the out range that go to error and avoids
+ * the need for an ERR state. */
+ if ( alphabetCovered( st->outRange ) ) {
+ /* Pick a default transition by largest span. */
+ RedTrans *defTrans = chooseDefaultSpan( st );
+
+ /* Rewrite the transition list taking out the transition we picked
+ * as the default and store the default. */
+ moveToDefault( defTrans, st );
+ }
+ }
+}
+
+RedTrans *RedFsm::chooseDefaultGoto( RedState *state )
+{
+ /* Make a set of transitions from the outRange. */
+ RedTransPtrSet stateTransSet;
+ for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) {
+ if ( rtel->value->targ == state->next )
+ return rtel->value;
+ }
+ return 0;
+}
+
+void RedFsm::chooseDefaultGoto()
+{
+ /* Loop the states. */
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Pick a default transition. */
+ RedTrans *defTrans = chooseDefaultGoto( st );
+ if ( defTrans == 0 )
+ defTrans = chooseDefaultSpan( st );
+
+ /* Rewrite the transition list taking out the transition we picked
+ * as the default and store the default. */
+ moveToDefault( defTrans, st );
+ }
+}
+
+RedTrans *RedFsm::chooseDefaultNumRanges( RedState *state )
+{
+ /* Make a set of transitions from the outRange. */
+ RedTransPtrSet stateTransSet;
+ for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ )
+ stateTransSet.insert( rtel->value );
+
+ /* For each transition in the find how many ranges use the transition. */
+ int *numRanges = new int[stateTransSet.length()];
+ memset( numRanges, 0, sizeof(int) * stateTransSet.length() );
+ for ( RedTransList::Iter rtel = state->outRange; rtel.lte(); rtel++ ) {
+ /* Lookup the transition in the set. */
+ RedTrans **inSet = stateTransSet.find( rtel->value );
+ numRanges[inSet - stateTransSet.data] += 1;
+ }
+
+ /* Find the max number of ranges. */
+ RedTrans *maxTrans = 0;
+ int maxNumRanges = 0;
+ for ( RedTransPtrSet::Iter rtel = stateTransSet; rtel.lte(); rtel++ ) {
+ if ( numRanges[rtel.pos()] > maxNumRanges ) {
+ maxNumRanges = numRanges[rtel.pos()];
+ maxTrans = *rtel;
+ }
+ }
+
+ delete[] numRanges;
+ return maxTrans;
+}
+
+void RedFsm::chooseDefaultNumRanges()
+{
+ /* Loop the states. */
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Pick a default transition. */
+ RedTrans *defTrans = chooseDefaultNumRanges( st );
+
+ /* Rewrite the transition list taking out the transition we picked
+ * as the default and store the default. */
+ moveToDefault( defTrans, st );
+ }
+}
+
+RedTrans *RedFsm::getErrorTrans( )
+{
+ /* If the error trans has not been made aready, make it. */
+ if ( errTrans == 0 ) {
+ /* This insert should always succeed since no transition created by
+ * the user can point to the error state. */
+ errTrans = new RedTrans( getErrorState(), 0, nextTransId++ );
+ RedTrans *inRes = transSet.insert( errTrans );
+ assert( inRes != 0 );
+ }
+ return errTrans;
+}
+
+RedState *RedFsm::getErrorState()
+{
+ /* Something went wrong. An error state is needed but one was not supplied
+ * by the frontend. */
+ assert( errState != 0 );
+ return errState;
+}
+
+
+RedTrans *RedFsm::allocateTrans( RedState *targ, RedAction *action )
+{
+ /* Create a reduced trans and look for it in the transiton set. */
+ RedTrans redTrans( targ, action, 0 );
+ RedTrans *inDict = transSet.find( &redTrans );
+ if ( inDict == 0 ) {
+ inDict = new RedTrans( targ, action, nextTransId++ );
+ transSet.insert( inDict );
+ }
+ return inDict;
+}
+
+void RedFsm::partitionFsm( int nparts )
+{
+ /* At this point the states are ordered by a depth-first traversal. We
+ * will allocate to partitions based on this ordering. */
+ this->nParts = nparts;
+ int partSize = stateList.length() / nparts;
+ int remainder = stateList.length() % nparts;
+ int numInPart = partSize;
+ int partition = 0;
+ if ( remainder-- > 0 )
+ numInPart += 1;
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ st->partition = partition;
+
+ numInPart -= 1;
+ if ( numInPart == 0 ) {
+ partition += 1;
+ numInPart = partSize;
+ if ( remainder-- > 0 )
+ numInPart += 1;
+ }
+ }
+}
+
+void RedFsm::setInTrans()
+{
+ /* First pass counts the number of transitions. */
+ for ( RedTransSet::Iter trans = transSet; trans.lte(); trans++ )
+ trans->targ->numInTrans += 1;
+
+ /* Pass over states to allocate the needed memory. Reset the counts so we
+ * can use them as the current size. */
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ st->inTrans = new RedTrans*[st->numInTrans];
+ st->numInTrans = 0;
+ }
+
+ /* Second pass over transitions copies pointers into the in trans list. */
+ for ( RedTransSet::Iter trans = transSet; trans.lte(); trans++ )
+ trans->targ->inTrans[trans->targ->numInTrans++] = trans;
+}
+
+void RedFsm::setValueLimits()
+{
+ maxSingleLen = 0;
+ maxRangeLen = 0;
+ maxKeyOffset = 0;
+ maxIndexOffset = 0;
+ maxActListId = 0;
+ maxActionLoc = 0;
+ maxActArrItem = 0;
+ maxSpan = 0;
+ maxCondSpan = 0;
+ maxFlatIndexOffset = 0;
+ maxCondOffset = 0;
+ maxCondLen = 0;
+ maxCondSpaceId = 0;
+ maxCondIndexOffset = 0;
+
+ /* In both of these cases the 0 index is reserved for no value, so the max
+ * is one more than it would be if they started at 0. */
+ maxIndex = transSet.length();
+ maxCond = 0;
+
+ /* The nextStateId - 1 is the last state id assigned. */
+ maxState = nextStateId - 1;
+
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Maximum single length. */
+ if ( st->outSingle.length() > maxSingleLen )
+ maxSingleLen = st->outSingle.length();
+
+ /* Maximum range length. */
+ if ( st->outRange.length() > maxRangeLen )
+ maxRangeLen = st->outRange.length();
+
+ /* The key offset index offset for the state after last is not used, skip it.. */
+ if ( ! st.last() ) {
+ maxKeyOffset += st->outSingle.length() + st->outRange.length()*2;
+ maxIndexOffset += st->outSingle.length() + st->outRange.length() + 1;
+ }
+
+ /* Max key span. */
+ if ( st->transList != 0 ) {
+ unsigned long long span = keyOps->span( st->lowKey, st->highKey );
+ if ( span > maxSpan )
+ maxSpan = span;
+ }
+
+ /* Max flat index offset. */
+ if ( ! st.last() ) {
+ if ( st->transList != 0 )
+ maxFlatIndexOffset += keyOps->span( st->lowKey, st->highKey );
+ maxFlatIndexOffset += 1;
+ }
+ }
+
+ for ( GenActionTableMap::Iter at = actionMap; at.lte(); at++ ) {
+ /* Maximum id of action lists. */
+ if ( at->actListId+1 > maxActListId )
+ maxActListId = at->actListId+1;
+
+ /* Maximum location of items in action array. */
+ if ( at->location+1 > maxActionLoc )
+ maxActionLoc = at->location+1;
+
+ /* Maximum values going into the action array. */
+ if ( at->key.length() > maxActArrItem )
+ maxActArrItem = at->key.length();
+ for ( GenActionTable::Iter item = at->key; item.lte(); item++ ) {
+ if ( item->value->actionId > maxActArrItem )
+ maxActArrItem = item->value->actionId;
+ }
+ }
+}
+
+void RedFsm::findFinalActionRefs()
+{
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Rerence count out of single transitions. */
+ for ( RedTransList::Iter rtel = st->outSingle; rtel.lte(); rtel++ ) {
+ if ( rtel->value->action != 0 ) {
+ rtel->value->action->numTransRefs += 1;
+ for ( GenActionTable::Iter item = rtel->value->action->key; item.lte(); item++ )
+ item->value->numTransRefs += 1;
+ }
+ }
+
+ /* Reference count out of range transitions. */
+ for ( RedTransList::Iter rtel = st->outRange; rtel.lte(); rtel++ ) {
+ if ( rtel->value->action != 0 ) {
+ rtel->value->action->numTransRefs += 1;
+ for ( GenActionTable::Iter item = rtel->value->action->key; item.lte(); item++ )
+ item->value->numTransRefs += 1;
+ }
+ }
+
+ /* Reference count default transition. */
+ if ( st->defTrans != 0 && st->defTrans->action != 0 ) {
+ st->defTrans->action->numTransRefs += 1;
+ for ( GenActionTable::Iter item = st->defTrans->action->key; item.lte(); item++ )
+ item->value->numTransRefs += 1;
+ }
+
+ /* Reference count to state actions. */
+ if ( st->toStateAction != 0 ) {
+ st->toStateAction->numToStateRefs += 1;
+ for ( GenActionTable::Iter item = st->toStateAction->key; item.lte(); item++ )
+ item->value->numToStateRefs += 1;
+ }
+
+ /* Reference count from state actions. */
+ if ( st->fromStateAction != 0 ) {
+ st->fromStateAction->numFromStateRefs += 1;
+ for ( GenActionTable::Iter item = st->fromStateAction->key; item.lte(); item++ )
+ item->value->numFromStateRefs += 1;
+ }
+
+ /* Reference count EOF actions. */
+ if ( st->eofAction != 0 ) {
+ st->eofAction->numEofRefs += 1;
+ for ( GenActionTable::Iter item = st->eofAction->key; item.lte(); item++ )
+ item->value->numEofRefs += 1;
+ }
+ }
+}
+
+void RedFsm::analyzeAction( GenAction *act, InlineList *inlineList )
+{
+ for ( InlineList::Iter item = *inlineList; item.lte(); item++ ) {
+ /* Check for various things in regular actions. */
+ if ( act->numTransRefs > 0 || act->numToStateRefs > 0 ||
+ act->numFromStateRefs > 0 || act->numEofRefs > 0 )
+ {
+ if ( item->type == InlineItem::LmSwitch &&
+ item->tokenRegion->lmSwitchHandlesError )
+ {
+ bAnyLmSwitchError = true;
+ }
+ }
+
+ if ( item->children != 0 )
+ analyzeAction( act, item->children );
+ }
+}
+
+void RedFsm::analyzeActionList( RedAction *redAct, InlineList *inlineList )
+{
+ for ( InlineList::Iter item = *inlineList; item.lte(); item++ ) {
+ if ( item->children != 0 )
+ analyzeActionList( redAct, item->children );
+ }
+}
+
+/* Assign ids to referenced actions. */
+void RedFsm::assignActionIds()
+{
+ int nextActionId = 0;
+ for ( GenActionList::Iter act = genActionList; act.lte(); act++ ) {
+ /* Only ever interested in referenced actions. */
+ if ( numRefs( act ) > 0 )
+ act->actionId = nextActionId++;
+ }
+}
+
+/* Gather various info on the machine. */
+void RedFsm::analyzeMachine()
+{
+ /* Find the true count of action references. */
+ findFinalActionRefs();
+
+ /* Check if there are any calls in action code. */
+ for ( GenActionList::Iter act = genActionList; act.lte(); act++ ) {
+ /* Record the occurrence of various kinds of actions. */
+ if ( act->numToStateRefs > 0 )
+ bAnyToStateActions = true;
+ if ( act->numFromStateRefs > 0 )
+ bAnyFromStateActions = true;
+ if ( act->numEofRefs > 0 )
+ bAnyEofActions = true;
+ if ( act->numTransRefs > 0 )
+ bAnyRegActions = true;
+
+ /* Recurse through the action's parse tree looking for various things. */
+ analyzeAction( act, act->inlineList );
+ }
+
+ /* Analyze reduced action lists. */
+ for ( GenActionTableMap::Iter redAct = actionMap; redAct.lte(); redAct++ ) {
+ for ( GenActionTable::Iter act = redAct->key; act.lte(); act++ )
+ analyzeActionList( redAct, act->value->inlineList );
+ }
+
+ /* Find states that have transitions with actions that have next
+ * statements. */
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Check any actions out of outSinge. */
+ for ( RedTransList::Iter rtel = st->outSingle; rtel.lte(); rtel++ ) {
+ if ( rtel->value->action != 0 && rtel->value->action->anyCurStateRef() )
+ st->bAnyRegCurStateRef = true;
+ }
+
+ /* Check any actions out of outRange. */
+ for ( RedTransList::Iter rtel = st->outRange; rtel.lte(); rtel++ ) {
+ if ( rtel->value->action != 0 && rtel->value->action->anyCurStateRef() )
+ st->bAnyRegCurStateRef = true;
+ }
+
+ /* Check any action out of default. */
+ if ( st->defTrans != 0 && st->defTrans->action != 0 &&
+ st->defTrans->action->anyCurStateRef() )
+ st->bAnyRegCurStateRef = true;
+ }
+
+ /* Assign ids to actions that are referenced. */
+ assignActionIds();
+
+ /* Set the maximums of various values used for deciding types. */
+ setValueLimits();
+}
+
+int transAction( RedTrans *trans )
+{
+ int retAct = 0;
+ if ( trans->action != 0 )
+ retAct = trans->action->location+1;
+ return retAct;
+}
+
+int toStateAction( RedState *state )
+{
+ int act = 0;
+ if ( state->toStateAction != 0 )
+ act = state->toStateAction->location+1;
+ return act;
+}
+
+int fromStateAction( RedState *state )
+{
+ int act = 0;
+ if ( state->fromStateAction != 0 )
+ act = state->fromStateAction->location+1;
+ return act;
+}
+
+int eofAction( RedState *state )
+{
+ int act = 0;
+ if ( state->eofAction != 0 )
+ act = state->eofAction->location+1;
+ return act;
+}
+
+
+FsmTables *RedFsm::makeFsmTables()
+{
+ /* The fsm runtime needs states sorted by id. */
+ sortByStateId();
+
+ int pos, curKeyOffset, curIndOffset;
+ FsmTables *fsmTables = new FsmTables;
+ fsmTables->numStates = stateList.length();
+
+ /*
+ * actions
+ */
+
+ fsmTables->numActions = 1;
+ for ( GenActionTableMap::Iter act = actionMap; act.lte(); act++ )
+ fsmTables->numActions += 1 + act->key.length();
+
+ pos = 0;
+ fsmTables->actions = new long[fsmTables->numActions];
+ fsmTables->actions[pos++] = 0;
+ for ( GenActionTableMap::Iter act = actionMap; act.lte(); act++ ) {
+ fsmTables->actions[pos++] = act->key.length();
+ for ( GenActionTable::Iter item = act->key; item.lte(); item++ )
+ fsmTables->actions[pos++] = item->value->actionId;
+ }
+
+ /*
+ * keyOffset
+ */
+ pos = 0, curKeyOffset = 0;
+ fsmTables->keyOffsets = new long[fsmTables->numStates];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ /* Store the current offset. */
+ fsmTables->keyOffsets[pos++] = curKeyOffset;
+
+ /* Move the key offset ahead. */
+ curKeyOffset += st->outSingle.length() + st->outRange.length()*2;
+ }
+
+ /*
+ * transKeys
+ */
+ fsmTables->numTransKeys = 0;
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ fsmTables->numTransKeys += st->outSingle.length();
+ fsmTables->numTransKeys += 2 * st->outRange.length();
+ }
+
+ pos = 0;
+ fsmTables->transKeys = new char[fsmTables->numTransKeys];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ for ( RedTransList::Iter stel = st->outSingle; stel.lte(); stel++ )
+ fsmTables->transKeys[pos++] = stel->lowKey.getVal();
+ for ( RedTransList::Iter rtel = st->outRange; rtel.lte(); rtel++ ) {
+ fsmTables->transKeys[pos++] = rtel->lowKey.getVal();
+ fsmTables->transKeys[pos++] = rtel->highKey.getVal();
+ }
+ }
+
+ /*
+ * singleLengths
+ */
+ pos = 0;
+ fsmTables->singleLengths = new long[fsmTables->numStates];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ )
+ fsmTables->singleLengths[pos++] = st->outSingle.length();
+
+ /*
+ * rangeLengths
+ */
+ pos = 0;
+ fsmTables->rangeLengths = new long[fsmTables->numStates];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ )
+ fsmTables->rangeLengths[pos++] = st->outRange.length();
+
+ /*
+ * indexOffsets
+ */
+ pos = 0, curIndOffset = 0;
+ fsmTables->indexOffsets = new long[fsmTables->numStates];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ fsmTables->indexOffsets[pos++] = curIndOffset;
+
+ curIndOffset += st->outSingle.length() + st->outRange.length();
+ if ( st->defTrans != 0 )
+ curIndOffset += 1;
+ }
+
+ /*
+ * transTargsWI
+ */
+ fsmTables->numTransTargsWI = 0;
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ fsmTables->numTransTargsWI += st->outSingle.length();
+ fsmTables->numTransTargsWI += st->outRange.length();
+ if ( st->defTrans != 0 )
+ fsmTables->numTransTargsWI += 1;
+ }
+
+ pos = 0;
+ fsmTables->transTargsWI = new long[fsmTables->numTransTargsWI];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ for ( RedTransList::Iter stel = st->outSingle; stel.lte(); stel++ )
+ fsmTables->transTargsWI[pos++] = stel->value->targ->id;
+
+ for ( RedTransList::Iter rtel = st->outRange; rtel.lte(); rtel++ )
+ fsmTables->transTargsWI[pos++] = rtel->value->targ->id;
+
+ if ( st->defTrans != 0 )
+ fsmTables->transTargsWI[pos++] = st->defTrans->targ->id;
+ }
+
+ /*
+ * transActionsWI
+ */
+ fsmTables->numTransActionsWI = 0;
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ fsmTables->numTransActionsWI += st->outSingle.length();
+ fsmTables->numTransActionsWI += st->outRange.length();
+ if ( st->defTrans != 0 )
+ fsmTables->numTransActionsWI += 1;
+ }
+
+ pos = 0;
+ fsmTables->transActionsWI = new long[fsmTables->numTransActionsWI];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ for ( RedTransList::Iter stel = st->outSingle; stel.lte(); stel++ )
+ fsmTables->transActionsWI[pos++] = transAction( stel->value );
+
+ for ( RedTransList::Iter rtel = st->outRange; rtel.lte(); rtel++ )
+ fsmTables->transActionsWI[pos++] = transAction( rtel->value );
+
+ if ( st->defTrans != 0 )
+ fsmTables->transActionsWI[pos++] = transAction( st->defTrans );
+ }
+
+ /*
+ * toStateActions
+ */
+ pos = 0;
+ fsmTables->toStateActions = new long[fsmTables->numStates];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ )
+ fsmTables->toStateActions[pos++] = toStateAction( st );
+
+ /*
+ * fromStateActions
+ */
+ pos = 0;
+ fsmTables->fromStateActions = new long[fsmTables->numStates];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ )
+ fsmTables->fromStateActions[pos++] = fromStateAction( st );
+
+ /*
+ * eofActions
+ */
+ pos = 0;
+ fsmTables->eofActions = new long[fsmTables->numStates];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ )
+ fsmTables->eofActions[pos++] = eofAction( st );
+
+ /*
+ * eofTargs
+ */
+ pos = 0;
+ fsmTables->eofTargs = new long[fsmTables->numStates];
+ for ( RedStateList::Iter st = stateList; st.lte(); st++ ) {
+ int targ = -1;
+ if ( st->eofTrans != 0 )
+ targ = st->eofTrans->targ->id;
+ fsmTables->eofTargs[pos++] = targ;
+ }
+
+ /* Start state. */
+ fsmTables->startState = startState->id;
+
+ /* First final state. */
+ fsmTables->firstFinal = ( firstFinState != 0 ) ?
+ firstFinState->id : nextStateId;
+
+ /* The error state. */
+ fsmTables->errorState = ( errState != 0 ) ?
+ errState->id : -1;
+
+ /* The array pointing to actions. */
+ pos = 0;
+ fsmTables->numActionSwitch = genActionList.length();
+ fsmTables->actionSwitch = new GenAction*[fsmTables->numActionSwitch];
+ for ( GenActionList::Iter act = genActionList; act.lte(); act++ )
+ fsmTables->actionSwitch[pos++] = act;
+
+ /*
+ * entryByRegion
+ */
+
+ fsmTables->numRegions = regionToEntry.length()+1;
+ fsmTables->entryByRegion = new long[fsmTables->numRegions];
+ fsmTables->entryByRegion[0] = fsmTables->errorState;
+
+ pos = 1;
+ for ( RegionToEntry::Iter en = regionToEntry; en.lte(); en++ ) {
+ /* Find the entry state from the entry id. */
+ RedEntryMapEl *entryMapEl = redEntryMap.find( *en );
+
+ /* Save it off. */
+ fsmTables->entryByRegion[pos++] = entryMapEl != 0 ? entryMapEl->value
+ : fsmTables->errorState;
+ }
+
+ return fsmTables;
+}
+
+
diff --git a/src/redfsm.h b/src/redfsm.h
new file mode 100644
index 0000000..1858fe8
--- /dev/null
+++ b/src/redfsm.h
@@ -0,0 +1,475 @@
+/*
+ * Copyright 2006-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _REDFSM_H
+#define _REDFSM_H
+
+#include <assert.h>
+#include <string.h>
+#include <string>
+#include "keyops.h"
+#include "vector.h"
+#include "dlist.h"
+#include "compare.h"
+#include "bstmap.h"
+#include "bstset.h"
+#include "avlmap.h"
+#include "avltree.h"
+#include "avlbasic.h"
+#include "mergesort.h"
+#include "sbstmap.h"
+#include "sbstset.h"
+#include "sbsttable.h"
+#include "global.h"
+#include "pdarun.h"
+
+#define TRANS_ERR_TRANS 0
+#define STATE_ERR_STATE 0
+#define FUNC_NO_FUNC 0
+
+using std::string;
+
+struct RedState;
+struct InlineList;
+struct Compiler;
+struct ObjectField;
+
+/* Element in list of actions. Contains the string for the code to exectute. */
+struct GenAction
+{
+ /* Data collected during parse. */
+ InputLoc loc;
+ char *name;
+ InlineList *inlineList;
+ int actionId;
+ MarkType markType;
+ ObjectField *objField;
+ long markId;
+
+ int numTransRefs;
+ int numToStateRefs;
+ int numFromStateRefs;
+ int numEofRefs;
+
+ GenAction *prev, *next;
+};
+
+typedef DList<GenAction> GenActionList;
+string nameOrLoc( GenAction *genAction );
+
+/* Number of references in the final machine. */
+inline int numRefs( GenAction *genAction )
+{
+ return genAction->numTransRefs +
+ genAction->numToStateRefs +
+ genAction->numFromStateRefs +
+ genAction->numEofRefs;
+}
+
+
+/* Forwards. */
+struct RedState;
+struct FsmState;
+
+/* Transistion GenAction Element. */
+typedef SBstMapEl< int, GenAction* > GenActionTableEl;
+
+/* Transition GenAction Table. */
+struct GenActionTable
+ : public SBstMap< int, GenAction*, CmpOrd<int> >
+{
+ void setAction( int ordering, GenAction *action );
+ void setActions( int *orderings, GenAction **actions, int nActs );
+ void setActions( const GenActionTable &other );
+};
+
+/* Compare of a whole action table element (key & value). */
+struct GenCmpActionTableEl
+{
+ static int compare( const GenActionTableEl &action1,
+ const GenActionTableEl &action2 )
+ {
+ if ( action1.key < action2.key )
+ return -1;
+ else if ( action1.key > action2.key )
+ return 1;
+ else if ( action1.value < action2.value )
+ return -1;
+ else if ( action1.value > action2.value )
+ return 1;
+ return 0;
+ }
+};
+
+/* Compare for GenActionTable. */
+typedef CmpSTable< GenActionTableEl, GenCmpActionTableEl > GenCmpActionTable;
+
+/* Set of states. */
+typedef BstSet<RedState*> RedStateSet;
+typedef BstSet<int> IntSet;
+
+/* Reduced action. */
+struct RedAction
+:
+ public AvlTreeEl<RedAction>
+{
+ RedAction( )
+ :
+ key(),
+ eofRefs(0),
+ numTransRefs(0),
+ numToStateRefs(0),
+ numFromStateRefs(0),
+ numEofRefs(0),
+ bAnyNextStmt(false),
+ bAnyCurStateRef(false),
+ bAnyBreakStmt(false)
+ { }
+
+ const GenActionTable &getKey()
+ { return key; }
+
+ GenActionTable key;
+ int actListId;
+ int location;
+ IntSet *eofRefs;
+
+ /* Number of references in the final machine. */
+ bool numRefs()
+ { return numTransRefs + numToStateRefs + numFromStateRefs + numEofRefs; }
+ int numTransRefs;
+ int numToStateRefs;
+ int numFromStateRefs;
+ int numEofRefs;
+
+ bool anyNextStmt() { return bAnyNextStmt; }
+ bool anyCurStateRef() { return bAnyCurStateRef; }
+ bool anyBreakStmt() { return bAnyBreakStmt; }
+
+ bool bAnyNextStmt;
+ bool bAnyCurStateRef;
+ bool bAnyBreakStmt;
+};
+typedef AvlTree<RedAction, GenActionTable, GenCmpActionTable> GenActionTableMap;
+
+/* Reduced transition. */
+struct RedTrans
+:
+ public AvlTreeEl<RedTrans>
+{
+ RedTrans( RedState *targ, RedAction *action, int id )
+ : targ(targ), action(action), id(id), labelNeeded(true) { }
+
+ RedState *targ;
+ RedAction *action;
+ int id;
+ bool partitionBoundary;
+ bool labelNeeded;
+};
+
+/* Compare of transitions for the final reduction of transitions. Comparison
+ * is on target and the pointer to the shared action table. It is assumed that
+ * when this is used the action tables have been reduced. */
+struct CmpRedTrans
+{
+ static int compare( const RedTrans &t1, const RedTrans &t2 )
+ {
+ if ( t1.targ < t2.targ )
+ return -1;
+ else if ( t1.targ > t2.targ )
+ return 1;
+ else if ( t1.action < t2.action )
+ return -1;
+ else if ( t1.action > t2.action )
+ return 1;
+ else
+ return 0;
+ }
+};
+
+typedef AvlBasic<RedTrans, CmpRedTrans> RedTransSet;
+
+/* Element in out range. */
+struct RedTransEl
+{
+ /* Constructors. */
+ RedTransEl( Key lowKey, Key highKey, RedTrans *value )
+ : lowKey(lowKey), highKey(highKey), value(value) { }
+
+ Key lowKey, highKey;
+ RedTrans *value;
+};
+
+typedef Vector<RedTransEl> RedTransList;
+typedef Vector<RedState*> RedStateVect;
+
+typedef BstMapEl<RedState*, unsigned long long> RedSpanMapEl;
+typedef BstMap<RedState*, unsigned long long> RedSpanMap;
+
+/* Compare used by span map sort. Reverse sorts by the span. */
+struct CmpRedSpanMapEl
+{
+ static int compare( const RedSpanMapEl &smel1, const RedSpanMapEl &smel2 )
+ {
+ if ( smel1.value > smel2.value )
+ return -1;
+ else if ( smel1.value < smel2.value )
+ return 1;
+ else
+ return 0;
+ }
+};
+
+/* Sorting state-span map entries by span. */
+typedef MergeSort<RedSpanMapEl, CmpRedSpanMapEl> RedSpanMapSort;
+
+/* Set of entry ids that go into this state. */
+typedef Vector<int> EntryIdVect;
+typedef Vector<char*> EntryNameVect;
+
+/* Maps entry ids (defined by the frontend, to reduced state ids. */
+typedef BstMap<int, int> RedEntryMap;
+typedef BstMapEl<int, int> RedEntryMapEl;
+
+typedef Vector<int> RegionToEntry;
+
+/* Reduced state. */
+struct RedState
+{
+ RedState()
+ :
+ defTrans(0),
+ transList(0),
+ isFinal(false),
+ labelNeeded(false),
+ outNeeded(false),
+ onStateList(false),
+ toStateAction(0),
+ fromStateAction(0),
+ eofAction(0),
+ eofTrans(0),
+ id(0),
+ bAnyRegCurStateRef(false),
+ partitionBoundary(false),
+ inTrans(0),
+ numInTrans(0)
+ { }
+
+ /* Transitions out. */
+ RedTransList outSingle;
+ RedTransList outRange;
+ RedTrans *defTrans;
+
+ /* For flat conditions. */
+ Key condLowKey, condHighKey;
+
+ /* For flat keys. */
+ Key lowKey, highKey;
+ RedTrans **transList;
+
+ /* The list of states that transitions from this state go to. */
+ RedStateVect targStates;
+
+ bool isFinal;
+ bool labelNeeded;
+ bool outNeeded;
+ bool onStateList;
+ RedAction *toStateAction;
+ RedAction *fromStateAction;
+ RedAction *eofAction;
+ RedTrans *eofTrans;
+ int id;
+
+ /* Pointers for the list of states. */
+ RedState *prev, *next;
+
+ bool anyRegCurStateRef() { return bAnyRegCurStateRef; }
+ bool bAnyRegCurStateRef;
+
+ int partition;
+ bool partitionBoundary;
+
+ RedTrans **inTrans;
+ int numInTrans;
+};
+
+/* List of states. */
+typedef DList<RedState> RedStateList;
+
+/* Set of reduced transitons. Comparison is by pointer. */
+typedef BstSet< RedTrans*, CmpOrd<RedTrans*> > RedTransPtrSet;
+
+/* Next version of the fsm machine. */
+struct RedFsm
+{
+ RedFsm();
+
+ bool wantComplete;
+ bool forcedErrorState;
+
+ int nextActionId;
+ int nextTransId;
+
+ /* Next State Id doubles as the total number of state ids. */
+ int nextStateId;
+
+ RedTransSet transSet;
+ GenActionTableMap actionMap;
+ RedStateList stateList;
+ RedStateSet entryPoints;
+ RedState *startState;
+ RedState *errState;
+ RedTrans *errTrans;
+ RedTrans *errActionTrans;
+ RedState *firstFinState;
+ int numFinStates;
+ int nParts;
+
+ GenAction *allActions;
+ RedAction *allActionTables;
+ RedState *allStates;
+ GenActionList genActionList;
+ EntryIdVect entryPointIds;
+ RedEntryMap redEntryMap;
+ RegionToEntry regionToEntry;
+
+ bool bAnyToStateActions;
+ bool bAnyFromStateActions;
+ bool bAnyRegActions;
+ bool bAnyEofActions;
+ bool bAnyActionGotos;
+ bool bAnyActionCalls;
+ bool bAnyActionRets;
+ bool bAnyRegActionRets;
+ bool bAnyRegActionByValControl;
+ bool bAnyRegNextStmt;
+ bool bAnyRegCurStateRef;
+ bool bAnyRegBreak;
+ bool bAnyLmSwitchError;
+ bool bAnyConditions;
+
+ int maxState;
+ int maxSingleLen;
+ int maxRangeLen;
+ int maxKeyOffset;
+ int maxIndexOffset;
+ int maxIndex;
+ int maxActListId;
+ int maxActionLoc;
+ int maxActArrItem;
+ unsigned long long maxSpan;
+ unsigned long long maxCondSpan;
+ int maxFlatIndexOffset;
+ Key maxKey;
+ int maxCondOffset;
+ int maxCondLen;
+ int maxCondSpaceId;
+ int maxCondIndexOffset;
+ int maxCond;
+
+ bool anyActions();
+ bool anyToStateActions() { return bAnyToStateActions; }
+ bool anyFromStateActions() { return bAnyFromStateActions; }
+ bool anyRegActions() { return bAnyRegActions; }
+ bool anyEofActions() { return bAnyEofActions; }
+ bool anyActionGotos() { return bAnyActionGotos; }
+ bool anyActionCalls() { return bAnyActionCalls; }
+ bool anyActionRets() { return bAnyActionRets; }
+ bool anyRegActionRets() { return bAnyRegActionRets; }
+ bool anyRegActionByValControl() { return bAnyRegActionByValControl; }
+ bool anyRegNextStmt() { return bAnyRegNextStmt; }
+ bool anyRegCurStateRef() { return bAnyRegCurStateRef; }
+ bool anyRegBreak() { return bAnyRegBreak; }
+ bool anyLmSwitchError() { return bAnyLmSwitchError; }
+ bool anyConditions() { return bAnyConditions; }
+
+ /* Is is it possible to extend a range by bumping ranges that span only
+ * one character to the singles array. */
+ bool canExtend( const RedTransList &list, int pos );
+
+ /* Pick single transitions from the ranges. */
+ void moveTransToSingle( RedState *state );
+ void chooseSingle();
+
+ void makeFlat();
+
+ /* Move a selected transition from ranges to default. */
+ void moveToDefault( RedTrans *defTrans, RedState *state );
+
+ /* Pick a default transition by largest span. */
+ RedTrans *chooseDefaultSpan( RedState *state );
+ void chooseDefaultSpan();
+
+ /* Pick a default transition by most number of ranges. */
+ RedTrans *chooseDefaultNumRanges( RedState *state );
+ void chooseDefaultNumRanges();
+
+ /* Pick a default transition tailored towards goto driven machine. */
+ RedTrans *chooseDefaultGoto( RedState *state );
+ void chooseDefaultGoto();
+
+ /* Ordering states by transition connections. */
+ void optimizeStateOrdering( RedState *state );
+ void optimizeStateOrdering();
+
+ /* Ordering states by transition connections. */
+ void depthFirstOrdering( RedState *state );
+ void depthFirstOrdering();
+
+ /* Set state ids. */
+ void sequentialStateIds();
+ void sortStateIdsByFinal();
+
+ /* Arrange states in by final id. This is a stable sort. */
+ void sortStatesByFinal();
+
+ /* Sorting states by id. */
+ void sortByStateId();
+
+ /* Locating the first final state. This is the final state with the lowest
+ * id. */
+ void findFirstFinState();
+
+ void assignActionLocs();
+
+ RedTrans *getErrorTrans();
+ RedState *getErrorState();
+
+ /* Is every char in the alphabet covered? */
+ bool alphabetCovered( RedTransList &outRange );
+
+ RedTrans *allocateTrans( RedState *targState, RedAction *actionTable );
+
+ void partitionFsm( int nParts );
+
+ void setInTrans();
+ void setValueLimits();
+ void assignActionIds();
+ void analyzeActionList( RedAction *redAct, InlineList *inlineList );
+ void analyzeAction( GenAction *act, InlineList *inlineList );
+ void findFinalActionRefs();
+ void analyzeMachine();
+
+ FsmTables *makeFsmTables();
+};
+
+
+#endif /* _REDFSM_H */
diff --git a/src/resolve.cc b/src/resolve.cc
new file mode 100644
index 0000000..6b5dc75
--- /dev/null
+++ b/src/resolve.cc
@@ -0,0 +1,799 @@
+/*
+ * Copyright 2009-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "bytecode.h"
+#include "parsedata.h"
+#include <iostream>
+#include <assert.h>
+
+using std::cout;
+using std::cerr;
+using std::endl;
+
+Namespace *TypeRef::resolveNspace( Compiler *pd )
+{
+ if ( parsedVarRef != 0 && !nspaceQual->thisOnly() ) {
+ UniqueType *ut = parsedVarRef->lookup( pd );
+ return ut->langEl->nspace;
+ }
+ else if ( parsedTypeRef != 0 && !nspaceQual->thisOnly() ) {
+ UniqueType *ut = parsedTypeRef->resolveType( pd );
+ return ut->langEl->nspace;
+ }
+ else {
+ /* Lookup up the qualifiction and then the name. */
+ return nspaceQual->getQual( pd );
+ }
+}
+
+UniqueType *TypeRef::resolveTypeName( Compiler *pd )
+{
+ nspace = resolveNspace( pd );
+
+ if ( nspace == 0 )
+ error(loc) << "do not have region for resolving reference" << endp;
+
+ while ( nspace != 0 ) {
+ /* Search for the token in the region by typeName. */
+ TypeMapEl *inDict = nspace->typeMap.find( typeName );
+
+ if ( inDict != 0 ) {
+ switch ( inDict->type ) {
+ /* Defer to the typeRef we are an alias of. We need to guard against loops here. */
+ case TypeMapEl::TypeAliasType:
+ return inDict->typeRef->resolveType( pd );
+
+ case TypeMapEl::LangElType:
+ return pd->findUniqueType( TYPE_TREE, inDict->value );
+ }
+ }
+
+ if ( nspaceQual->thisOnly() )
+ break;
+
+ nspace = nspace->parentNamespace;
+ }
+
+ error(loc) << "unknown type in typeof expression" << endp;
+ return 0;
+}
+
+UniqueType *TypeRef::resolveTypeLiteral( Compiler *pd )
+{
+ /* Lookup up the qualifiction and then the name. */
+ nspace = resolveNspace( pd );
+
+ if ( nspace == 0 )
+ error(loc) << "do not have region for resolving reference" << endp;
+
+ /* Interpret escape sequences and remove quotes. */
+ bool unusedCI;
+ String interp;
+ prepareLitString( interp, unusedCI, pdaLiteral->data,
+ pdaLiteral->loc );
+
+ while ( nspace != 0 ) {
+ LiteralDictEl *ldel = nspace->literalDict.find( interp );
+
+ if ( ldel != 0 )
+ return pd->findUniqueType( TYPE_TREE, ldel->value->tokenDef->tdLangEl );
+
+ if ( nspaceQual->thisOnly() )
+ break;
+
+ nspace = nspace->parentNamespace;
+ }
+
+ error(loc) << "unknown type in typeof expression" << endp;
+ return 0;
+}
+
+UniqueType *TypeRef::resolveTypeMap( Compiler *pd )
+{
+ nspace = pd->rootNamespace;
+
+ UniqueType *utKey = typeRef1->resolveType( pd );
+ UniqueType *utValue = typeRef2->resolveType( pd );
+
+ UniqueMap searchKey( utKey, utValue );
+ UniqueMap *inMap = pd->uniqueMapMap.find( &searchKey );
+ if ( inMap == 0 ) {
+ inMap = new UniqueMap( utKey, utValue );
+ pd->uniqueMapMap.insert( inMap );
+
+ /* FIXME: Need uniqe name allocator for types. */
+ static int mapId = 0;
+ String name( 36, "__map%d", mapId++ );
+
+ GenericType *generic = new GenericType( name, GEN_MAP,
+ pd->nextGenericId++, 0/*langEl*/, typeRef2 );
+ generic->keyTypeArg = typeRef1;
+
+ nspace->genericList.append( generic );
+
+ generic->declare( pd, nspace );
+
+ inMap->generic = generic;
+ }
+
+ generic = inMap->generic;
+ return pd->findUniqueType( TYPE_TREE, inMap->generic->langEl );
+}
+
+UniqueType *TypeRef::resolveTypeList( Compiler *pd )
+{
+ nspace = pd->rootNamespace;
+
+ UniqueType *utValue = typeRef1->resolveType( pd );
+
+ UniqueList searchKey( utValue );
+ UniqueList *inMap = pd->uniqueListMap.find( &searchKey );
+ if ( inMap == 0 ) {
+ inMap = new UniqueList( utValue );
+ pd->uniqueListMap.insert( inMap );
+
+ /* FIXME: Need uniqe name allocator for types. */
+ static int listId = 0;
+ String name( 36, "__list%d", listId++ );
+
+ GenericType *generic = new GenericType( name, GEN_LIST,
+ pd->nextGenericId++, 0/*langEl*/, typeRef1 );
+
+ nspace->genericList.append( generic );
+
+ generic->declare( pd, nspace );
+
+ inMap->generic = generic;
+ }
+
+ generic = inMap->generic;
+ return pd->findUniqueType( TYPE_TREE, inMap->generic->langEl );
+}
+
+UniqueType *TypeRef::resolveTypeVector( Compiler *pd )
+{
+ nspace = pd->rootNamespace;
+
+ UniqueType *utValue = typeRef1->resolveType( pd );
+
+ UniqueVector searchKey( utValue );
+ UniqueVector *inMap = pd->uniqueVectorMap.find( &searchKey );
+ if ( inMap == 0 ) {
+ inMap = new UniqueVector( utValue );
+ pd->uniqueVectorMap.insert( inMap );
+
+ /* FIXME: Need uniqe name allocator for types. */
+ static int vectorId = 0;
+ String name( 36, "__vector%d", vectorId++ );
+
+ GenericType *generic = new GenericType( name, GEN_VECTOR,
+ pd->nextGenericId++, 0/*langEl*/, typeRef1 );
+
+ nspace->genericList.append( generic );
+
+ generic->declare( pd, nspace );
+
+ inMap->generic = generic;
+ }
+
+ generic = inMap->generic;
+ return pd->findUniqueType( TYPE_TREE, inMap->generic->langEl );
+}
+
+UniqueType *TypeRef::resolveTypeParser( Compiler *pd )
+{
+ nspace = pd->rootNamespace;
+
+ UniqueType *utParse = typeRef1->resolveType( pd );
+
+ UniqueParser searchKey( utParse );
+ UniqueParser *inMap = pd->uniqueParserMap.find( &searchKey );
+ if ( inMap == 0 ) {
+ inMap = new UniqueParser( utParse );
+ pd->uniqueParserMap.insert( inMap );
+
+ /* FIXME: Need uniqe name allocator for types. */
+ static int accumId = 0;
+ String name( 36, "__accum%d", accumId++ );
+
+ GenericType *generic = new GenericType( name, GEN_PARSER,
+ pd->nextGenericId++, 0/*langEl*/, typeRef1 );
+
+ nspace->genericList.append( generic );
+
+ generic->declare( pd, nspace );
+
+ inMap->generic = generic;
+ }
+
+ generic = inMap->generic;
+ return pd->findUniqueType( TYPE_TREE, inMap->generic->langEl );
+}
+
+UniqueType *TypeRef::resolveTypePtr( Compiler *pd )
+{
+ typeRef1->resolveType( pd );
+ return pd->findUniqueType( TYPE_PTR, typeRef1->uniqueType->langEl );
+}
+
+UniqueType *TypeRef::resolveTypeRef( Compiler *pd )
+{
+ typeRef1->resolveType( pd );
+ return pd->findUniqueType( TYPE_REF, typeRef1->uniqueType->langEl );
+}
+
+void TypeRef::resolveRepeat( Compiler *pd )
+{
+ if ( uniqueType->typeId != TYPE_TREE )
+ error(loc) << "cannot repeat non-tree type" << endp;
+
+ UniqueRepeat searchKey( repeatType, uniqueType->langEl );
+ UniqueRepeat *uniqueRepeat = pd->uniqeRepeatMap.find( &searchKey );
+ if ( uniqueRepeat == 0 ) {
+ uniqueRepeat = new UniqueRepeat( repeatType, uniqueType->langEl );
+ pd->uniqeRepeatMap.insert( uniqueRepeat );
+
+ LangEl *declLangEl = 0;
+
+ switch ( repeatType ) {
+ case RepeatRepeat: {
+ /* If the factor is a repeat, create the repeat element and link the
+ * factor to it. */
+ String repeatName( 128, "_repeat_%s", typeName.data );
+ declLangEl = pd->makeRepeatProd( loc, nspace, repeatName, uniqueType );
+ break;
+ }
+ case RepeatList: {
+ /* If the factor is a repeat, create the repeat element and link the
+ * factor to it. */
+ String listName( 128, "_list_%s", typeName.data );
+ declLangEl = pd->makeListProd( loc, nspace, listName, uniqueType );
+ break;
+ }
+ case RepeatOpt: {
+ /* If the factor is an opt, create the opt element and link the factor
+ * to it. */
+ String optName( 128, "_opt_%s", typeName.data );
+ declLangEl = pd->makeOptProd( loc, nspace, optName, uniqueType );
+ break;
+ }
+
+ case RepeatNone:
+ break;
+ }
+
+ uniqueRepeat->declLangEl = declLangEl;
+ declLangEl->repeatOf = uniqueRepeat->langEl;
+ }
+
+ uniqueType = pd->findUniqueType( TYPE_TREE, uniqueRepeat->declLangEl );
+}
+
+UniqueType *TypeRef::resolveIterator( Compiler *pd )
+{
+ UniqueType *searchUT = searchTypeRef->resolveType( pd );
+
+ /* Lookup the iterator call. Make sure it is an iterator. */
+ VarRefLookup lookup = iterCall->langTerm->varRef->lookupMethod( pd );
+ if ( lookup.objMethod->iterDef == 0 ) {
+ error(loc) << "attempt to iterate using something "
+ "that is not an iterator" << endp;
+ }
+
+ /* Now that we have done the iterator call lookup we can make the type
+ * reference for the object field. */
+ UniqueType *iterUniqueType = pd->findUniqueType( TYPE_ITER, lookup.objMethod->iterDef );
+
+ iterDef = lookup.objMethod->iterDef;
+ searchUniqueType = searchUT;
+
+ return iterUniqueType;
+}
+
+
+UniqueType *TypeRef::resolveType( Compiler *pd )
+{
+ if ( uniqueType != 0 )
+ return uniqueType;
+
+ /* Not an iterator. May be a reference. */
+ switch ( type ) {
+ case Name:
+ uniqueType = resolveTypeName( pd );
+ break;
+ case Literal:
+ uniqueType = resolveTypeLiteral( pd );
+ break;
+ case Map:
+ uniqueType = resolveTypeMap( pd );
+ break;
+ case List:
+ uniqueType = resolveTypeList( pd );
+ break;
+ case Vector:
+ uniqueType = resolveTypeVector( pd );
+ break;
+ case Parser:
+ uniqueType = resolveTypeParser( pd );
+ break;
+ case Ptr:
+ uniqueType = resolveTypePtr( pd );
+ break;
+ case Ref:
+ uniqueType = resolveTypeRef( pd );
+ break;
+ case Iterator:
+ uniqueType = resolveIterator( pd );
+ break;
+ case Unspecified:
+ /* No lookup needed, unique type(s) set when constructed. */
+ break;
+ }
+
+ if ( repeatType != RepeatNone )
+ resolveRepeat( pd );
+
+ return uniqueType;
+}
+
+void Compiler::resolveProdEl( ProdEl *prodEl )
+{
+ prodEl->typeRef->resolveType( this );
+ prodEl->langEl = prodEl->typeRef->uniqueType->langEl;
+}
+
+void LangTerm::resolve( Compiler *pd )
+{
+ switch ( type ) {
+ case ConstructType:
+ typeRef->resolveType( pd );
+
+ /* Initialization expressions. */
+ if ( fieldInitArgs != 0 ) {
+ for ( FieldInitVect::Iter pi = *fieldInitArgs; pi.lte(); pi++ )
+ (*pi)->expr->resolve( pd );
+ }
+
+ /* Types in constructor. */
+ for ( ConsItemList::Iter item = *constructor->list; item.lte(); item++ ) {
+ switch ( item->type ) {
+ case ConsItem::LiteralType:
+ /* Use pdaFactor reference resolving. */
+ pd->resolveProdEl( item->prodEl );
+ break;
+ case ConsItem::InputText:
+ case ConsItem::ExprType:
+ break;
+ }
+ }
+ break;
+ case VarRefType:
+ break;
+
+ case MakeTreeType:
+ case MakeTokenType:
+ case MethodCallType:
+ if ( args != 0 ) {
+ for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ )
+ (*pe)->expr->resolve( pd );
+ }
+ break;
+
+ case NumberType:
+ case StringType:
+ break;
+
+ case MatchType:
+ for ( PatternItemList::Iter item = *pattern->list; item.lte(); item++ ) {
+ switch ( item->form ) {
+ case PatternItem::TypeRefForm:
+ /* Use pdaFactor reference resolving. */
+ pd->resolveProdEl( item->prodEl );
+ break;
+ case PatternItem::InputTextForm:
+ /* Nothing to do here. */
+ break;
+ }
+ }
+
+ break;
+ case NewType:
+ expr->resolve( pd );
+ break;
+ case TypeIdType:
+ typeRef->resolveType( pd );
+ break;
+ case SearchType:
+ typeRef->resolveType( pd );
+ break;
+ case NilType:
+ case TrueType:
+ case FalseType:
+ break;
+
+ case ParseStopType:
+ case ParseType:
+ typeRef->resolveType( pd );
+ /* Evaluate the initialization expressions. */
+ if ( fieldInitArgs != 0 ) {
+ for ( FieldInitVect::Iter pi = *fieldInitArgs; pi.lte(); pi++ )
+ (*pi)->expr->resolve( pd );
+ }
+
+ for ( ConsItemList::Iter item = *parserText->list; item.lte(); item++ ) {
+ switch ( item->type ) {
+ case ConsItem::LiteralType:
+ pd->resolveProdEl( item->prodEl );
+ break;
+ case ConsItem::InputText:
+ case ConsItem::ExprType:
+ break;
+ }
+ }
+ break;
+
+ case SendType:
+ break;
+ case EmbedStringType:
+ break;
+ case CastType:
+ typeRef->resolveType( pd );
+ expr->resolve( pd );
+ break;
+ }
+}
+
+void LangVarRef::resolve( Compiler *pd ) const
+{
+}
+
+void LangExpr::resolve( Compiler *pd ) const
+{
+ switch ( type ) {
+ case BinaryType: {
+ left->resolve( pd );
+ right->resolve( pd );
+ break;
+ }
+ case UnaryType: {
+ right->resolve( pd );
+ break;
+ }
+ case TermType: {
+ term->resolve( pd );
+ break;
+ }
+ }
+}
+
+void IterCall::resolve( Compiler *pd ) const
+{
+ switch ( form ) {
+ case IterCallForm:
+ langTerm->resolve( pd );
+ break;
+ case VarRefForm:
+ case ExprForm:
+ langExpr->resolve( pd );
+ break;
+ }
+}
+
+void LangStmt::resolveForIter( Compiler *pd ) const
+{
+ iterCall->resolve( pd );
+
+ /* Search type ref. */
+ typeRef->resolveType( pd );
+
+ /* Iterator type ref. */
+ objField->typeRef->resolveType( pd );
+
+ /* Resolve the statements. */
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->resolve( pd );
+}
+
+void LangStmt::resolve( Compiler *pd ) const
+{
+ switch ( type ) {
+ case PrintType:
+ case PrintXMLACType:
+ case PrintXMLType:
+ case PrintStreamType: {
+ /* Push the args backwards. */
+ for ( CallArgVect::Iter pex = exprPtrVect->last(); pex.gtb(); pex-- )
+ (*pex)->expr->resolve( pd );
+ break;
+ }
+ case ExprType: {
+ /* Evaluate the exrepssion, then pop it immediately. */
+ expr->resolve( pd );
+ break;
+ }
+ case IfType: {
+ /* Evaluate the test. */
+ expr->resolve( pd );
+
+ /* Analyze the if true branch. */
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->resolve( pd );
+
+ if ( elsePart != 0 )
+ elsePart->resolve( pd );
+
+ break;
+ }
+ case ElseType: {
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->resolve( pd );
+ break;
+ }
+ case RejectType:
+ break;
+ case WhileType: {
+ expr->resolve( pd );
+
+ /* Compute the while block. */
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->resolve( pd );
+ break;
+ }
+ case AssignType: {
+ /* Evaluate the exrepssion. */
+ expr->resolve( pd );
+ break;
+ }
+ case ForIterType: {
+ resolveForIter( pd );
+ break;
+ }
+ case ReturnType: {
+ /* Evaluate the exrepssion. */
+ expr->resolve( pd );
+ break;
+ }
+ case BreakType: {
+ break;
+ }
+ case YieldType: {
+ /* take a reference and yield it. Immediately reset the referece. */
+ varRef->resolve( pd );
+ break;
+ }
+ }
+}
+
+void ObjectDef::resolve( Compiler *pd )
+{
+ for ( ObjFieldList::Iter fli = *objFieldList; fli.lte(); fli++ ) {
+ ObjectField *field = fli->value;
+
+ if ( field->typeRef != 0 )
+ field->typeRef->resolveType( pd );
+ }
+}
+
+void CodeBlock::resolve( Compiler *pd ) const
+{
+ if ( localFrame != 0 ) {
+ localFrame->resolve( pd );
+ }
+
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->resolve( pd );
+}
+
+void Compiler::resolveFunction( Function *func )
+{
+ if ( func->typeRef != 0 )
+ func->typeRef->resolveType( this );
+
+ for ( ParameterList::Iter param = *func->paramList; param.lte(); param++ )
+ param->typeRef->resolveType( this );
+
+ CodeBlock *block = func->codeBlock;
+ block->resolve( this );
+}
+
+void Compiler::resolvePreEof( TokenRegion *region )
+{
+ CodeBlock *block = region->preEofBlock;
+ block->resolve( this );
+}
+
+void Compiler::resolveRootBlock()
+{
+ CodeBlock *block = rootCodeBlock;
+ block->resolve( this );
+}
+
+void Compiler::resolveTranslateBlock( LangEl *langEl )
+{
+ CodeBlock *block = langEl->transBlock;
+ block->resolve( this );
+}
+
+void Compiler::resolveReductionCode( Production *prod )
+{
+ CodeBlock *block = prod->redBlock;
+ block->resolve( this );
+}
+
+void Compiler::resolveParseTree()
+{
+ /* Compile functions. */
+ for ( FunctionList::Iter f = functionList; f.lte(); f++ )
+ resolveFunction( f );
+
+ /* Compile the reduction code. */
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ if ( prod->redBlock != 0 )
+ resolveReductionCode( prod );
+ }
+
+ /* Compile the token translation code. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->transBlock != 0 )
+ resolveTranslateBlock( lel );
+ }
+
+ /* Compile preeof blocks. */
+ for ( RegionList::Iter r = regionList; r.lte(); r++ ) {
+ if ( r->preEofBlock != 0 )
+ resolvePreEof( r );
+ }
+
+ /* Compile the init code */
+ resolveRootBlock( );
+
+ rootLocalFrame->resolve( this );
+
+ /* Init all user object fields (need consistent size). */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ ObjectDef *objDef = lel->objectDef;
+ if ( objDef != 0 ) {
+ /* Init all fields of the object. */
+ for ( ObjFieldList::Iter f = *objDef->objFieldList; f.lte(); f++ ) {
+ f->value->typeRef->resolveType( this );
+ }
+ }
+ }
+
+ /* Init all fields of the global object. */
+ for ( ObjFieldList::Iter f = *globalObjectDef->objFieldList; f.lte(); f++ ) {
+ f->value->typeRef->resolveType( this );
+ }
+
+}
+
+/* Resolves production els and computes the precedence of each prod. */
+void Compiler::resolveProductionEls()
+{
+ /* NOTE: as we process this list it may be growing! */
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ /* First resolve. */
+ for ( ProdElList::Iter prodEl = *prod->prodElList; prodEl.lte(); prodEl++ )
+ resolveProdEl( prodEl );
+
+ /* If there is no explicit precdence ... */
+ if ( prod->predOf == 0 ) {
+ /* Compute the precedence of the productions. */
+ for ( ProdElList::Iter prodEl = prod->prodElList->last(); prodEl.gtb(); prodEl-- ) {
+ /* Production inherits the precedence of the last terminal with
+ * precedence. */
+ if ( prodEl->langEl->predType != PredNone ) {
+ prod->predOf = prodEl->langEl;
+ break;
+ }
+ }
+ }
+ }
+}
+
+void Compiler::resolveGenericTypes()
+{
+ for ( NamespaceList::Iter ns = namespaceList; ns.lte(); ns++ ) {
+ for ( GenericList::Iter gen = ns->genericList; gen.lte(); gen++ ) {
+ gen->utArg = gen->typeArg->resolveType( this );
+
+ if ( gen->typeId == GEN_MAP )
+ gen->keyUT = gen->keyTypeArg->resolveType( this );
+ }
+ }
+}
+
+void Compiler::makeTerminalWrappers()
+{
+ /* Make terminal language elements corresponding to each nonterminal in
+ * the grammar. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->type == LangEl::NonTerm ) {
+ String name( lel->name.length() + 5, "_T_%s", lel->name.data );
+ LangEl *termDup = new LangEl( lel->nspace, name, LangEl::Term );
+
+ /* Give the dup the attributes of the nonterminal. This ensures
+ * that the attributes are allocated when patterns and
+ * constructors are parsed. */
+ termDup->objectDef = lel->objectDef;
+
+ langEls.append( termDup );
+ lel->termDup = termDup;
+ termDup->termDup = lel;
+ }
+ }
+}
+
+void Compiler::makeEofElements()
+{
+ /* Make eof language elements for each user terminal. This is a bit excessive and
+ * need to be reduced to the ones that we need parsers for, but we don't know that yet.
+ * Another pass before this one is needed. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->eofLel == 0 &&
+ lel != eofLangEl &&
+ lel != errorLangEl &&
+ lel != noTokenLangEl /* &&
+ !( lel->tokenInstance == 0 || lel->tokenInstance->dupOf == 0 ) */ )
+ {
+ String name( lel->name.length() + 5, "_eof_%s", lel->name.data );
+ LangEl *eofLel = new LangEl( lel->nspace, name, LangEl::Term );
+
+ langEls.append( eofLel );
+ lel->eofLel = eofLel;
+ eofLel->eofLel = lel;
+ eofLel->isEOF = true;
+ }
+ }
+}
+
+void Compiler::resolvePrecedence()
+{
+ for ( PredDeclList::Iter predDecl = predDeclList; predDecl != 0; predDecl++ ) {
+ predDecl->typeRef->resolveType( this );
+
+ LangEl *langEl = predDecl->typeRef->uniqueType->langEl;
+ langEl->predType = predDecl->predType;
+ langEl->predValue = predDecl->predValue;
+ }
+}
+
+
+void Compiler::resolvePass()
+{
+ /*
+ * Type Resolving.
+ */
+
+ resolvePrecedence();
+
+ resolveParseTree();
+
+ resolveGenericTypes();
+
+ argvTypeRef->resolveType( this );
+
+ /* We must do this as the last step in the type resolution process because
+ * all type resolves can cause new language elments with associated
+ * productions. They get tacked onto the end of the list of productions.
+ * Doing it at the end results processing a growing list. */
+ resolveProductionEls();
+}
diff --git a/src/rtvector.h b/src/rtvector.h
new file mode 100644
index 0000000..e03a17f
--- /dev/null
+++ b/src/rtvector.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2002, 2006, 2009 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Aapl.
+ *
+ * Aapl is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * Aapl 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 Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Aapl; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _RT_VECTOR_H
+#define _RT_VECTOR_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/string.c b/src/string.c
new file mode 100644
index 0000000..31472e2
--- /dev/null
+++ b/src/string.c
@@ -0,0 +1,246 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <colm/pool.h>
+#include <colm/pdarun.h>
+#include <colm/bytecode.h>
+
+#include <assert.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+/*
+ * In this system strings are not null terminated. Often strings come from a
+ * parse, in which case the string is just a pointer into the the data string.
+ * A block in a parsed stream can house many tokens and there is no room for
+ * nulls.
+ */
+
+Head *stringCopy( Program *prg, Head *head )
+{
+ Head *result = 0;
+ if ( head != 0 ) {
+ if ( (char*)(head+1) == head->data )
+ result = stringAllocFull( prg, head->data, head->length );
+ else
+ result = stringAllocPointer( prg, head->data, head->length );
+
+ if ( head->location != 0 ) {
+ result->location = locationAllocate( prg );
+ result->location->name = head->location->name;
+ result->location->line = head->location->line;
+ result->location->column = head->location->column;
+ result->location->byte = head->location->byte;
+ }
+ }
+ return result;
+}
+
+void stringFree( Program *prg, Head *head )
+{
+ if ( head != 0 ) {
+ if ( head->location != 0 )
+ locationFree( prg, head->location );
+
+ if ( (char*)(head+1) == head->data ) {
+ /* Full string allocation. */
+ free( head );
+ }
+ else {
+ /* Just a string head. */
+ headFree( prg, head );
+ }
+ }
+}
+
+const char *stringData( Head *head )
+{
+ if ( head == 0 )
+ return 0;
+ return head->data;
+}
+
+long stringLength( Head *head )
+{
+ if ( head == 0 )
+ return 0;
+ return head->length;
+}
+
+void stringShorten( Head *head, long newlen )
+{
+ assert( newlen <= head->length );
+ head->length = newlen;
+}
+
+Head *initStrSpace( long length )
+{
+ /* Find the length and allocate the space for the shared string. */
+ Head *head = (Head*) malloc( sizeof(Head) + length );
+
+ /* Init the header. */
+ head->data = (char*)(head+1);
+ head->length = length;
+ head->location = 0;
+
+ /* Save the pointer to the data. */
+ return head;
+}
+
+/* Create from a c-style string. */
+Head *stringAllocFull( Program *prg, const char *data, long length )
+{
+ /* Init space for the data. */
+ Head *head = initStrSpace( length );
+
+ /* Copy in the data. */
+ memcpy( (head+1), data, length );
+
+ return head;
+}
+
+/* Create from a c-style string. */
+Head *stringAllocPointer( Program *prg, const char *data, long length )
+{
+ /* Find the length and allocate the space for the shared string. */
+ Head *head = headAllocate( prg );
+
+ /* Init the header. */
+ head->data = data;
+ head->length = length;
+
+ return head;
+}
+
+Head *concatStr( Head *s1, Head *s2 )
+{
+ long s1Len = s1->length;
+ long s2Len = s2->length;
+
+ /* Init space for the data. */
+ Head *head = initStrSpace( s1Len + s2Len );
+
+ /* Copy in the data. */
+ memcpy( (head+1), s1->data, s1Len );
+ memcpy( (char*)(head+1) + s1Len, s2->data, s2Len );
+
+ return head;
+}
+
+Head *stringToUpper( Head *s )
+{
+ /* Init space for the data. */
+ long len = s->length;
+ Head *head = initStrSpace( len );
+
+ /* Copy in the data. */
+ const char *src = s->data;
+ char *dst = (char*)(head+1);
+ int i;
+ for ( i = 0; i < len; i++ )
+ *dst++ = toupper( *src++ );
+
+ return head;
+}
+
+Head *stringToLower( Head *s )
+{
+ /* Init space for the data. */
+ long len = s->length;
+ Head *head = initStrSpace( len );
+
+ /* Copy in the data. */
+ const char *src = s->data;
+ char *dst = (char*)(head+1);
+ int i;
+ for ( i = 0; i < len; i++ )
+ *dst++ = tolower( *src++ );
+
+ return head;
+}
+
+
+/* Compare two strings. If identical returns 1, otherwise 0. */
+Word cmpString( Head *s1, Head *s2 )
+{
+ if ( s1->length < s2->length )
+ return -1;
+ else if ( s1->length > s2->length )
+ return 1;
+ else {
+ char *d1 = (char*)(s1->data);
+ char *d2 = (char*)(s2->data);
+ return memcmp( d1, d2, s1->length );
+ }
+}
+
+Word strAtoi( Head *str )
+{
+ /* FIXME: need to implement this by hand. There is no null terminator. */
+ char *nulled = (char*)malloc( str->length + 1 );
+ memcpy( nulled, str->data, str->length );
+ nulled[str->length] = 0;
+ int res = atoi( nulled );
+ free( nulled );
+ return res;
+}
+
+Head *intToStr( Program *prg, Word i )
+{
+ char data[20];
+ sprintf( data, "%ld", i );
+ return stringAllocFull( prg, data, strlen(data) );
+}
+
+Word strUord16( Head *head )
+{
+ uchar *data = (uchar*)(head->data);
+ ulong res;
+ res = (ulong)data[1];
+ res |= ((ulong)data[0]) << 8;
+ return res;
+}
+
+Word strUord8( Head *head )
+{
+ uchar *data = (uchar*)(head->data);
+ ulong res = (ulong)data[0];
+ return res;
+}
+
+Head *makeLiteral( Program *prg, long offset )
+{
+ return stringAllocPointer( prg,
+ prg->rtd->litdata[offset],
+ prg->rtd->litlen[offset] );
+}
+
+Head *stringSprintf( Program *prg, Str *format, Int *integer )
+{
+ Head *formatHead = format->value;
+ long written = snprintf( 0, 0, stringData(formatHead), integer->value );
+ Head *head = initStrSpace( written+1 );
+ written = snprintf( (char*)head->data, written+1, stringData(formatHead), integer->value );
+ head->length -= 1;
+ return head;
+}
diff --git a/src/synthesis.cc b/src/synthesis.cc
new file mode 100644
index 0000000..f6f7b56
--- /dev/null
+++ b/src/synthesis.cc
@@ -0,0 +1,2687 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "bytecode.h"
+#include "parsedata.h"
+#include "pdarun.h"
+#include "input.h"
+#include <iostream>
+#include <assert.h>
+
+using std::cout;
+using std::cerr;
+using std::endl;
+
+IterDef::IterDef( Type type ) :
+ type(type),
+ func(0),
+ useFuncId(false),
+ useSearchUT(false)
+{
+ switch ( type ) {
+ case Tree:
+ inCreateWV = IN_TRITER_FROM_REF;
+ inCreateWC = IN_TRITER_FROM_REF;
+ inDestroy = IN_TRITER_DESTROY;
+ inAdvance = IN_TRITER_ADVANCE;
+
+ inGetCurR = IN_TRITER_GET_CUR_R;
+ inGetCurWC = IN_TRITER_GET_CUR_WC;
+ inSetCurWC = IN_TRITER_SET_CUR_WC;
+ inRefFromCur = IN_TRITER_REF_FROM_CUR;
+ useSearchUT = true;
+ break;
+ case Child:
+ inCreateWV = IN_TRITER_FROM_REF;
+ inCreateWC = IN_TRITER_FROM_REF;
+ inDestroy = IN_TRITER_DESTROY;
+ inAdvance = IN_TRITER_NEXT_CHILD;
+
+ inGetCurR = IN_TRITER_GET_CUR_R;
+ inGetCurWC = IN_TRITER_GET_CUR_WC;
+ inSetCurWC = IN_TRITER_SET_CUR_WC;
+ inRefFromCur = IN_TRITER_REF_FROM_CUR;
+ useSearchUT = true;
+ break;
+ case RevChild:
+ inCreateWV = IN_REV_TRITER_FROM_REF;
+ inCreateWC = IN_REV_TRITER_FROM_REF;
+ inDestroy = IN_REV_TRITER_DESTROY;
+ inAdvance = IN_REV_TRITER_PREV_CHILD;
+
+ inGetCurR = IN_TRITER_GET_CUR_R;
+ inGetCurWC = IN_TRITER_GET_CUR_WC;
+ inSetCurWC = IN_TRITER_SET_CUR_WC;
+ inRefFromCur = IN_TRITER_REF_FROM_CUR;
+ useSearchUT = true;
+ break;
+
+ case Repeat:
+ inCreateWV = IN_TRITER_FROM_REF;
+ inCreateWC = IN_TRITER_FROM_REF;
+ inDestroy = IN_TRITER_DESTROY;
+ inAdvance = IN_TRITER_NEXT_REPEAT;
+
+ inGetCurR = IN_TRITER_GET_CUR_R;
+ inGetCurWC = IN_TRITER_GET_CUR_WC;
+ inSetCurWC = IN_TRITER_SET_CUR_WC;
+ inRefFromCur = IN_TRITER_REF_FROM_CUR;
+ useSearchUT = true;
+ break;
+
+ case RevRepeat:
+ inCreateWV = IN_TRITER_FROM_REF;
+ inCreateWC = IN_TRITER_FROM_REF;
+ inDestroy = IN_TRITER_DESTROY;
+ inAdvance = IN_TRITER_PREV_REPEAT;
+
+ inGetCurR = IN_TRITER_GET_CUR_R;
+ inGetCurWC = IN_TRITER_GET_CUR_WC;
+ inSetCurWC = IN_TRITER_SET_CUR_WC;
+ inRefFromCur = IN_TRITER_REF_FROM_CUR;
+ useSearchUT = true;
+ break;
+
+ case User:
+ assert(false);
+ }
+}
+
+IterDef::IterDef( Type type, Function *func ) :
+ type(type),
+ func(func),
+ useFuncId(true),
+ useSearchUT(true),
+ inCreateWV(IN_UITER_CREATE_WV),
+ inCreateWC(IN_UITER_CREATE_WC),
+ inDestroy(IN_UITER_DESTROY),
+ inAdvance(IN_UITER_ADVANCE),
+ inGetCurR(IN_UITER_GET_CUR_R),
+ inGetCurWC(IN_UITER_GET_CUR_WC),
+ inSetCurWC(IN_UITER_SET_CUR_WC),
+ inRefFromCur(IN_UITER_REF_FROM_CUR)
+{}
+
+ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj,
+ const String &name, int methIdWV, int methIdWC, bool isConst )
+{
+ ObjMethod *objMethod = new ObjMethod( retType, name,
+ methIdWV, methIdWC, 0, 0, 0, isConst );
+ obj->objMethodMap->insert( name, objMethod );
+ return objMethod;
+}
+
+ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj,
+ const String &name, int methIdWV, int methIdWC, UniqueType *arg1, bool isConst )
+{
+ UniqueType *args[] = { arg1 };
+ ObjMethod *objMethod = new ObjMethod( retType, name,
+ methIdWV, methIdWC, 1, args, 0, isConst );
+ obj->objMethodMap->insert( name, objMethod );
+ return objMethod;
+}
+
+ObjMethod *initFunction( UniqueType *retType, ObjectDef *obj,
+ const String &name, int methIdWV, int methIdWC,
+ UniqueType *arg1, UniqueType *arg2, bool isConst )
+{
+ UniqueType *args[] = { arg1, arg2 };
+ ObjMethod *objMethod = new ObjMethod( retType, name,
+ methIdWV, methIdWC, 2, args, 0, isConst );
+ obj->objMethodMap->insert( name, objMethod );
+ return objMethod;
+}
+
+IterDef *Compiler::findIterDef( IterDef::Type type, Function *func )
+{
+ IterDefSetEl *el = iterDefSet.find( IterDef( type, func ) );
+ if ( el == 0 )
+ el = iterDefSet.insert( IterDef( type, func ) );
+ return &el->key;
+}
+
+IterDef *Compiler::findIterDef( IterDef::Type type )
+{
+ IterDefSetEl *el = iterDefSet.find( IterDef( type ) );
+ if ( el == 0 )
+ el = iterDefSet.insert( IterDef( type ) );
+ return &el->key;
+}
+
+UniqueType *Compiler::findUniqueType( int typeId )
+{
+ UniqueType searchKey( typeId );
+ UniqueType *uniqueType = uniqeTypeMap.find( &searchKey );
+ if ( uniqueType == 0 ) {
+ uniqueType = new UniqueType( typeId );
+ uniqeTypeMap.insert( uniqueType );
+ }
+ return uniqueType;
+}
+
+UniqueType *Compiler::findUniqueType( int typeId, LangEl *langEl )
+{
+ UniqueType searchKey( typeId, langEl );
+ UniqueType *uniqueType = uniqeTypeMap.find( &searchKey );
+ if ( uniqueType == 0 ) {
+ uniqueType = new UniqueType( typeId, langEl );
+ uniqeTypeMap.insert( uniqueType );
+ }
+ return uniqueType;
+}
+
+UniqueType *Compiler::findUniqueType( int typeId, IterDef *iterDef )
+{
+ UniqueType searchKey( typeId, iterDef );
+ UniqueType *uniqueType = uniqeTypeMap.find( &searchKey );
+ if ( uniqueType == 0 ) {
+ uniqueType = new UniqueType( typeId, iterDef );
+ uniqeTypeMap.insert( uniqueType );
+ }
+ return uniqueType;
+}
+
+
+/* 0-based. */
+ObjectField *ObjectDef::findFieldNum( long offset )
+{
+ int fn = 0;
+ ObjFieldList::Iter field = *objFieldList;
+ while ( fn < offset ) {
+ fn++;
+ field++;
+ }
+ return field->value;
+}
+
+long sizeOfField( UniqueType *fieldUT )
+{
+ long size = 0;
+ if ( fieldUT->typeId == TYPE_ITER ) {
+ /* Select on the iterator type. */
+ switch ( fieldUT->iterDef->type ) {
+ case IterDef::Tree:
+ case IterDef::Child:
+ case IterDef::Repeat:
+ case IterDef::RevRepeat:
+ size = sizeof(TreeIter) / sizeof(Word);
+ break;
+ case IterDef::RevChild:
+ size = sizeof(RevTreeIter) / sizeof(Word);
+ break;
+
+ case IterDef::User:
+ /* User iterators are just a pointer to the UserIter struct. The
+ * struct needs to go right beneath the call to the user iterator
+ * so it can be found by a yield. It is therefore allocated on the
+ * stack right before the call. */
+ size = 1;
+ break;
+ }
+ }
+ else if ( fieldUT->typeId == TYPE_REF )
+ size = 2;
+ else
+ size = 1;
+
+ return size;
+}
+
+void ObjectDef::referenceField( Compiler *pd, ObjectField *field )
+{
+ field->beenReferenced = true;
+ initField( pd, field );
+}
+
+void ObjectDef::initField( Compiler *pd, ObjectField *field )
+{
+ if ( !field->beenInitialized ) {
+ field->beenInitialized = true;
+ UniqueType *fieldUT = field->typeRef->uniqueType;
+
+ if ( type == FrameType ) {
+ nextOffset += sizeOfField( fieldUT );
+ field->offset = -nextOffset;
+
+ pd->initLocalInstructions( field );
+ }
+ else if ( field->isRhsGet ) {
+ field->useOffset = false;
+ field->inGetR = IN_GET_RHS_VAL_R;
+ field->inGetWC = IN_GET_RHS_VAL_WC;
+ field->inGetWV = IN_GET_RHS_VAL_WV;
+ field->inSetWC = IN_SET_RHS_VAL_WC;
+ field->inSetWV = IN_SET_RHS_VAL_WC;
+ }
+ else {
+ field->offset = nextOffset;
+ nextOffset += sizeOfField( fieldUT );
+
+ /* Initialize the instructions. */
+ pd->initFieldInstructions( field );
+ }
+ }
+}
+
+UniqueType *LangVarRef::loadField( Compiler *pd, CodeVect &code,
+ ObjectDef *inObject, ObjectField *el, bool forWriting, bool revert ) const
+{
+ /* Ensure that the field is referenced. */
+ inObject->referenceField( pd, el );
+
+ UniqueType *elUT = el->typeRef->uniqueType;
+
+ /* If it's a reference then we load it read always. */
+ if ( forWriting ) {
+ /* The instruction, depends on whether or not we are reverting. */
+ if ( elUT->typeId == TYPE_ITER )
+ code.append( elUT->iterDef->inGetCurWC );
+ else if ( pd->revertOn && revert )
+ code.append( el->inGetWV );
+ else
+ code.append( el->inGetWC );
+ }
+ else {
+ /* Loading something for writing */
+ if ( elUT->typeId == TYPE_ITER )
+ code.append( elUT->iterDef->inGetCurR );
+ else
+ code.append( el->inGetR );
+ }
+
+ if ( el->useOffset ) {
+ /* Gets of locals and fields require offsets. Fake vars like token
+ * data and lhs don't require it. */
+ code.appendHalf( el->offset );
+ }
+ else if ( el->isRhsGet ) {
+ /* Need to place the array computing the val. */
+ code.append( el->rhsVal.length() );
+ for ( Vector<RhsVal>::Iter rg = el->rhsVal; rg.lte(); rg++ ) {
+ code.append( rg->prodEl->production->prodNum );
+ code.append( rg->prodEl->pos );
+ }
+ }
+
+ /* If we are dealing with an iterator then dereference it. */
+ if ( elUT->typeId == TYPE_ITER )
+ elUT = el->typeRef->searchUniqueType;
+
+ return elUT;
+}
+
+/* The qualification must start at a local frame. There cannot be any pointer. */
+long LangVarRef::loadQualificationRefs( Compiler *pd, CodeVect &code, ObjNameScope *rootScope ) const
+{
+ long count = 0;
+
+ /* Start the search from the root object. */
+ ObjNameScope *searchScope = rootScope;
+
+ for ( QualItemVect::Iter qi = *qual; qi.lte(); qi++ ) {
+ /* Lookup the field in the current qualification. */
+ ObjectField *el = searchScope->findField( qi->data );
+ if ( el == 0 )
+ error(qi->loc) << "cannot resolve qualification " << qi->data << endp;
+
+ if ( qi.pos() > 0 ) {
+ code.append( IN_REF_FROM_QUAL_REF );
+ code.appendHalf( 0 );
+ code.appendHalf( el->offset );
+ }
+ else if ( el->typeRef->iterDef != 0 ) {
+ code.append( el->typeRef->iterDef->inRefFromCur );
+ code.appendHalf( el->offset );
+ }
+ else if ( el->typeRef->type == TypeRef::Ref ) {
+ code.append( IN_REF_FROM_REF );
+ code.appendHalf( el->offset );
+ }
+ else {
+ code.append( IN_REF_FROM_LOCAL );
+ code.appendHalf( el->offset );
+ }
+
+ UniqueType *elUT = el->typeRef->uniqueType;
+ if ( elUT->typeId == TYPE_ITER )
+ elUT = el->typeRef->searchUniqueType;
+
+ assert( qi->form == QualItem::Dot );
+
+ ObjectDef *searchObjDef = elUT->objectDef();
+ searchScope = searchObjDef->rootScope;
+
+ count += 1;
+ }
+ return count;
+}
+
+void LangVarRef::loadQualification( Compiler *pd, CodeVect &code,
+ ObjNameScope *rootScope, int lastPtrInQual, bool forWriting, bool revert ) const
+{
+ /* Start the search from the root object. */
+ ObjNameScope *searchScope = rootScope;
+
+ for ( QualItemVect::Iter qi = *qual; qi.lte(); qi++ ) {
+ /* Lookup the field int the current qualification. */
+ ObjectField *el = searchScope->findField( qi->data );
+ if ( el == 0 )
+ error(qi->loc) << "cannot resolve qualification " << qi->data << endp;
+
+ if ( forWriting && el->refActive )
+ error(qi->loc) << "reference active, cannot write to object" << endp;
+
+ bool lfForWriting = forWriting;
+ bool lfRevert = revert;
+
+ /* If there is a pointer in the qualification, we need to compute
+ * forWriting and revert. */
+ if ( lastPtrInQual >= 0 ) {
+ if ( qi.pos() <= lastPtrInQual ) {
+ /* If we are before or at the pointer we are strictly read
+ * only, regardless of the origin. */
+ lfForWriting = false;
+ lfRevert = false;
+ }
+ else {
+ /* If we are past the pointer then we are always reverting
+ * because the object is global. Forwriting is as passed in.
+ * */
+ lfRevert = true;
+ }
+ }
+
+ UniqueType *qualUT = loadField( pd, code, searchScope->owner,
+ el, lfForWriting, lfRevert );
+
+ if ( qi->form == QualItem::Dot ) {
+ /* Cannot a reference. Iterator yes (access of the iterator not
+ * hte current) */
+ if ( qualUT->typeId == TYPE_PTR )
+ error(loc) << "dot cannot be used to access a pointer" << endp;
+ }
+ else if ( qi->form == QualItem::Arrow ) {
+ if ( qualUT->typeId == TYPE_PTR ) {
+ /* Always dereference references when used for qualification. If
+ * this is the last one then we must start with the reverse
+ * execution business. */
+ if ( pd->revertOn && qi.pos() == lastPtrInQual && forWriting ) {
+ /* This is like a global load. */
+ code.append( IN_PTR_DEREF_WV );
+ }
+ else {
+ /* If reading or not yet the last in ref then we only need a
+ * reading deref. */
+ code.append( IN_PTR_DEREF_R );
+ }
+
+ qualUT = pd->findUniqueType( TYPE_TREE, qualUT->langEl );
+ }
+ else {
+ error(loc) << "arrow operator cannot be used to access this type" << endp;
+ }
+ }
+
+ ObjectDef *searchObjDef = qualUT->objectDef();
+ searchScope = searchObjDef->rootScope;
+ }
+}
+
+void LangVarRef::loadContextObj( Compiler *pd, CodeVect &code,
+ int lastPtrInQual, bool forWriting ) const
+{
+ /* Start the search in the global object. */
+ ObjectDef *rootObj = context->contextObjDef;
+
+ if ( forWriting && lastPtrInQual < 0 ) {
+ /* If we are writing an no reference was found in the qualification
+ * then load the gloabl with a revert. */
+ if ( pd->revertOn )
+ code.append( IN_LOAD_CONTEXT_WV );
+ else
+ code.append( IN_LOAD_CONTEXT_WC );
+ }
+ else {
+ /* Either we are reading or we are loading a pointer that will be
+ * dereferenced. */
+ code.append( IN_LOAD_CONTEXT_R );
+ }
+
+ loadQualification( pd, code, rootObj->rootScope, lastPtrInQual, forWriting, true );
+}
+
+void LangVarRef::loadGlobalObj( Compiler *pd, CodeVect &code,
+ int lastPtrInQual, bool forWriting ) const
+{
+ /* Start the search in the global object. */
+ ObjectDef *rootObj = pd->globalObjectDef;
+
+ if ( forWriting && lastPtrInQual < 0 ) {
+ /* If we are writing an no reference was found in the qualification
+ * then load the gloabl with a revert. */
+ if ( pd->revertOn )
+ code.append( IN_LOAD_GLOBAL_WV );
+ else
+ code.append( IN_LOAD_GLOBAL_WC );
+ }
+ else {
+ /* Either we are reading or we are loading a pointer that will be
+ * dereferenced. */
+ code.append( IN_LOAD_GLOBAL_R );
+ }
+
+ loadQualification( pd, code, rootObj->rootScope, lastPtrInQual, forWriting, true );
+}
+
+void LangVarRef::loadCustom( Compiler *pd, CodeVect &code,
+ int lastPtrInQual, bool forWriting ) const
+{
+ /* Start the search in the local frame. */
+ loadQualification( pd, code, scope, lastPtrInQual, forWriting, pd->revertOn );
+}
+
+void LangVarRef::loadLocalObj( Compiler *pd, CodeVect &code,
+ int lastPtrInQual, bool forWriting ) const
+{
+ /* Start the search in the local frame. */
+ loadQualification( pd, code, scope, lastPtrInQual, forWriting, false );
+}
+
+void LangVarRef::loadObj( Compiler *pd, CodeVect &code,
+ int lastPtrInQual, bool forWriting ) const
+{
+ if ( isCustom() )
+ loadCustom( pd, code, lastPtrInQual, forWriting );
+ else if ( isLocalRef() )
+ loadLocalObj( pd, code, lastPtrInQual, forWriting );
+ else if ( isContextRef() )
+ loadContextObj( pd, code, lastPtrInQual, forWriting );
+ else
+ loadGlobalObj( pd, code, lastPtrInQual, forWriting );
+}
+
+
+bool castAssignment( Compiler *pd, CodeVect &code, UniqueType *destUT,
+ UniqueType *destSearchUT, UniqueType *srcUT )
+{
+ if ( destUT == srcUT )
+ return true;
+
+ /* Casting trees to any. */
+ if ( destUT->typeId == TYPE_TREE && destUT->langEl == pd->anyLangEl &&
+ srcUT->typeId == TYPE_TREE )
+ return true;
+
+ /* Setting a reference from a tree. */
+ if ( destUT->typeId == TYPE_REF && srcUT->typeId == TYPE_TREE &&
+ destUT->langEl == srcUT->langEl )
+ return true;
+
+ /* Setting a tree from a reference. */
+ if ( destUT->typeId == TYPE_TREE && srcUT->typeId == TYPE_REF &&
+ destUT->langEl == srcUT->langEl )
+ return true;
+
+ /* Setting an iterator from a tree. */
+ if ( destUT->typeId == TYPE_ITER && srcUT->typeId == TYPE_TREE &&
+ destSearchUT->langEl == srcUT->langEl )
+ return true;
+
+ /* Assigning nil to a tree. */
+ if ( destUT->typeId == TYPE_TREE && srcUT->typeId == TYPE_NIL )
+ return true;
+
+ /* Assigning nil to a pointer. */
+ if ( destUT->typeId == TYPE_PTR && srcUT->typeId == TYPE_NIL )
+ return true;
+
+ return false;
+}
+
+void LangVarRef::setFieldIter( Compiler *pd, CodeVect &code,
+ ObjectDef *inObject, ObjectField *el, UniqueType *objUT,
+ UniqueType *exprType, bool revert ) const
+{
+ code.append( objUT->iterDef->inSetCurWC );
+ code.appendHalf( el->offset );
+}
+
+void LangVarRef::setField( Compiler *pd, CodeVect &code,
+ ObjectDef *inObject, ObjectField *el,
+ UniqueType *exprUT, bool revert ) const
+{
+ /* Ensure that the field is referenced. */
+ inObject->referenceField( pd, el );
+
+ if ( pd->revertOn && revert )
+ code.append( el->inSetWV );
+ else
+ code.append( el->inSetWC );
+
+ /* Maybe write out an offset. */
+ if ( el->useOffset )
+ code.appendHalf( el->offset );
+}
+
+
+UniqueType *LangVarRef::evaluate( Compiler *pd, CodeVect &code, bool forWriting ) const
+{
+ /* Lookup the loadObj. */
+ VarRefLookup lookup = lookupField( pd );
+
+ /* Load the object, if any. */
+ loadObj( pd, code, lookup.lastPtrInQual, forWriting );
+
+ /* Load the field. */
+ UniqueType *ut = loadField( pd, code, lookup.inObject,
+ lookup.objField, forWriting, false );
+
+ return ut;
+}
+
+bool LangVarRef::canTakeRefTest( Compiler *pd, VarRefLookup &lookup ) const
+{
+ bool canTake = false;
+
+ /* If the var is not a local, it must be an attribute accessed
+ * via a local and attributes. */
+ if ( lookup.inObject->type == ObjectDef::FrameType )
+ canTake = true;
+ else if ( isLocalRef() && lookup.lastPtrInQual < 0 && lookup.uniqueType->typeId != TYPE_PTR )
+ canTake = true;
+
+ return canTake;
+}
+
+void LangVarRef::canTakeRef( Compiler *pd, VarRefLookup &lookup ) const
+{
+ bool canTake = canTakeRefTest( pd, lookup );
+
+ if ( !canTake ) {
+ error(loc) << "can only take references of locals or "
+ "attributes accessed via a local" << endp;
+ }
+
+ if ( lookup.objField->refActive )
+ error(loc) << "reference currently active, cannot take another" << endp;
+}
+
+bool LangExpr::canTakeRefTest( Compiler *pd ) const
+{
+ bool canTake = false;
+
+ if ( type == LangExpr::TermType && term->type == LangTerm::VarRefType ) {
+ VarRefLookup lookup = term->varRef->lookupField( pd );
+ if ( term->varRef->canTakeRefTest( pd, lookup ) )
+ canTake = true;
+ }
+ return canTake;
+}
+
+
+/* Return the field referenced. */
+ObjectField *LangVarRef::preEvaluateRef( Compiler *pd, CodeVect &code ) const
+{
+ VarRefLookup lookup = lookupField( pd );
+
+ canTakeRef( pd, lookup );
+
+ loadQualificationRefs( pd, code, scope );
+
+ return lookup.objField;
+}
+
+/* Return the field referenced. */
+ObjectField *LangVarRef::evaluateRef( Compiler *pd, CodeVect &code, long pushCount ) const
+{
+ VarRefLookup lookup = lookupField( pd );
+
+ canTakeRef( pd, lookup );
+
+ /* Ensure that the field is referenced. */
+ lookup.inObject->referenceField( pd, lookup.objField );
+
+ /* Note that we could have modified children. */
+ if ( qual->length() == 0 )
+ lookup.objField->refActive = true;
+
+ /* Whenever we take a reference we have to assume writing and that the
+ * tree is dirty. */
+ lookup.objField->dirtyTree = true;
+
+ if ( qual->length() > 0 ) {
+ code.append( IN_REF_FROM_QUAL_REF );
+ code.appendHalf( pushCount );
+ code.appendHalf( lookup.objField->offset );
+ }
+ else if ( lookup.objField->typeRef->iterDef != 0 ) {
+ code.append( lookup.objField->typeRef->iterDef->inRefFromCur );
+ code.appendHalf( lookup.objField->offset );
+ }
+ else if ( lookup.objField->typeRef->type == TypeRef::Ref ) {
+ code.append( IN_REF_FROM_REF );
+ code.appendHalf( lookup.objField->offset );
+ }
+ else {
+ code.append( IN_REF_FROM_LOCAL );
+ code.appendHalf( lookup.objField->offset );
+ }
+
+ return lookup.objField;
+}
+
+
+ObjectField **LangVarRef::evaluateArgs( Compiler *pd, CodeVect &code,
+ VarRefLookup &lookup, CallArgVect *args ) const
+{
+ /* Parameter list is given only for user defined methods. Otherwise it
+ * will be null. */
+ ParameterList *paramList = lookup.objMethod->paramList;
+
+ /* Match the number of arguments. */
+ int numArgs = args != 0 ? args->length() : 0;
+ if ( numArgs != lookup.objMethod->numParams )
+ error(loc) << "wrong number of arguments" << endp;
+
+ /* This is for storing the object fields used by references. */
+ ObjectField **paramRefs = new ObjectField*[numArgs];
+ memset( paramRefs, 0, sizeof(ObjectField*) * numArgs );
+
+ /* Evaluate and push the args. */
+ if ( args != 0 ) {
+ /* We use this only if there is a paramter list. */
+ ParameterList::Iter p;
+ long size = 0;
+
+ /* First pass we need to allocate and evaluate temporaries. */
+ paramList != 0 && ( p = *paramList );
+ for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) {
+ /* Get the expression and the UT for the arg. */
+ LangExpr *expression = (*pe)->expr;
+ UniqueType *paramUT = lookup.objMethod->paramUTs[pe.pos()];
+
+ if ( paramUT->typeId == TYPE_REF ) {
+ /* Make sure we are dealing with a variable reference. */
+ if ( ! expression->canTakeRefTest( pd ) ) {
+ /* Evaluate the expression. */
+ UniqueType *exprUT = expression->evaluate( pd, code );
+ (*pe)->exprUT = exprUT;
+
+ size += 1;
+ (*pe)->offTmp = size;
+ }
+ }
+
+ /* Advance the parameter list iterator if we have it. */
+ paramList != 0 && p.increment();
+ }
+
+
+ /* Second pass we need to push object loads for reference parameters. */
+ paramList != 0 && ( p = *paramList );
+ for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) {
+ /* Get the expression and the UT for the arg. */
+ LangExpr *expression = (*pe)->expr;
+ UniqueType *paramUT = lookup.objMethod->paramUTs[pe.pos()];
+
+ if ( paramUT->typeId == TYPE_REF ) {
+ if ( expression->canTakeRefTest( pd ) ) {
+ /* Lookup the field. */
+ LangVarRef *varRef = expression->term->varRef;
+ ObjectField *refOf = varRef->preEvaluateRef( pd, code );
+ paramRefs[pe.pos()] = refOf;
+
+ size += varRef->qual->length() * 2;
+ (*pe)->offQualRef = size;
+ }
+ }
+
+ /* Advance the parameter list iterator if we have it. */
+ paramList != 0 && p.increment();
+ }
+
+ paramList != 0 && ( p = *paramList );
+ for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) {
+ /* Get the expression and the UT for the arg. */
+ LangExpr *expression = (*pe)->expr;
+ UniqueType *paramUT = lookup.objMethod->paramUTs[pe.pos()];
+
+ if ( paramUT->typeId == TYPE_REF ) {
+ if ( expression->canTakeRefTest( pd ) ) {
+ /* Lookup the field. */
+ LangVarRef *varRef = expression->term->varRef;
+
+ ObjectField *refOf = varRef->evaluateRef( pd, code, (size - (*pe)->offQualRef) );
+ paramRefs[pe.pos()] = refOf;
+
+ size += 2;
+ }
+ else {
+ code.append( IN_REF_FROM_BACK );
+ code.appendHalf( size - (*pe)->offTmp );
+
+ size += 2;
+ }
+ }
+ else {
+ UniqueType *exprUT = expression->evaluate( pd, code );
+
+ if ( !castAssignment( pd, code, paramUT, 0, exprUT ) )
+ error(loc) << "arg " << pe.pos()+1 << " is of the wrong type" << endp;
+
+ size += 1;
+ }
+
+ /* Advance the parameter list iterator if we have it. */
+ paramList != 0 && p.increment();
+ }
+ }
+
+ return paramRefs;
+}
+
+void LangVarRef::resetActiveRefs( Compiler *pd, VarRefLookup &lookup, ObjectField **paramRefs ) const
+{
+ /* Parameter list is given only for user defined methods. Otherwise it
+ * will be null. */
+ for ( long p = 0; p < lookup.objMethod->numParams; p++ ) {
+ if ( paramRefs[p] != 0 )
+ paramRefs[p]->refActive = false;
+ }
+}
+
+void LangVarRef::callOperation( Compiler *pd, CodeVect &code, VarRefLookup &lookup ) const
+{
+ /* This is for writing if it is a non-const builtin. */
+ bool forWriting = lookup.objMethod->func == 0 &&
+ !lookup.objMethod->isConst;
+
+ if ( lookup.objMethod->useCallObj ) {
+ /* Load the object, if any. */
+ loadObj( pd, code, lookup.lastPtrInQual, forWriting );
+ }
+
+ /* Check if we need to revert the function. If it operates on a reference
+ * or if it is not local then we need to revert it. */
+ bool revert = lookup.lastPtrInQual >= 0 || !isLocalRef() || isCustom();
+
+ /* The call instruction. */
+ if ( pd->revertOn && revert ) {
+ if ( lookup.objMethod->opcodeWV == IN_PARSE_FINISH_WV ) {
+ code.append( IN_PARSE_SAVE_STEPS );
+ code.append( IN_PARSE_FINISH_WV );
+ code.appendHalf( 0 );
+ code.append( IN_PCR_CALL );
+ code.append( IN_PARSE_FINISH_EXIT_WV );
+ }
+ else {
+ code.append( lookup.objMethod->opcodeWV );
+ }
+ }
+ else {
+ if ( lookup.objMethod->opcodeWC == IN_PARSE_FINISH_WC ) {
+ code.append( IN_PARSE_SAVE_STEPS );
+ code.append( IN_PARSE_FINISH_WC );
+ code.appendHalf( 0 );
+ code.append( IN_PCR_CALL );
+ code.append( IN_PARSE_FINISH_EXIT_WC );
+ }
+ else {
+ code.append( lookup.objMethod->opcodeWC );
+ }
+ }
+
+ if ( lookup.objMethod->useFuncId )
+ code.appendHalf( lookup.objMethod->funcId );
+}
+
+void LangVarRef::popRefQuals( Compiler *pd, CodeVect &code,
+ VarRefLookup &lookup, CallArgVect *args ) const
+{
+ long popCount = 0;
+
+ /* Evaluate and push the args. */
+ if ( args != 0 ) {
+ for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) {
+ /* Get the expression and the UT for the arg. */
+ LangExpr *expression = (*pe)->expr;
+ UniqueType *paramUT = lookup.objMethod->paramUTs[pe.pos()];
+
+ if ( paramUT->typeId == TYPE_REF ) {
+ if ( expression->canTakeRefTest( pd ) ) {
+ LangVarRef *varRef = expression->term->varRef;
+ popCount += varRef->qual->length() * 2;
+ }
+ }
+ }
+
+ if ( popCount > 0 ) {
+ code.append( IN_POP_N_WORDS );
+ code.appendHalf( (short)popCount );
+ }
+
+ for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) {
+ /* Get the expression and the UT for the arg. */
+ LangExpr *expression = (*pe)->expr;
+ UniqueType *paramUT = lookup.objMethod->paramUTs[pe.pos()];
+
+ if ( paramUT->typeId == TYPE_REF ) {
+ if ( ! expression->canTakeRefTest( pd ) )
+ code.append( IN_POP );
+ }
+ }
+
+ }
+}
+
+bool Compiler::beginContiguous( CodeVect &code, int stretch )
+{
+ bool resetContiguous = false;
+
+ if ( inContiguous )
+ contiguousStretch += stretch;
+ else {
+ /* We add one for the push that always comes with the contiguous
+ * statement. */
+ contiguousStretch = stretch + 1;
+
+ code.append( IN_CONTIGUOUS );
+ contiguousOffset = code.length();
+ code.appendHalf( 0 );
+ inContiguous = true;
+ resetContiguous = true;
+ }
+
+ return resetContiguous;
+}
+
+void Compiler::endContiguous( CodeVect &code, bool resetContiguous )
+{
+ if ( resetContiguous ) {
+ inContiguous = false;
+ code.setHalf( contiguousOffset, contiguousStretch );
+ contiguousOffset = 0;
+ }
+}
+
+void Compiler::clearContiguous( CodeVect &code, bool resetContiguous )
+{
+ if ( resetContiguous ) {
+ code.append( IN_TOP_SWAP );
+ code.append( IN_POP );
+ }
+}
+
+UniqueType *LangVarRef::evaluateCall( Compiler *pd, CodeVect &code, CallArgVect *args )
+{
+ /* Evaluate the object. */
+ VarRefLookup lookup = lookupMethod( pd );
+
+ bool resetContiguous = false;
+ Function *func = lookup.objMethod->func;
+ if ( func != 0 ) {
+ long stretch = func->paramListSize + 5 + func->localFrame->size();
+ resetContiguous = pd->beginContiguous( code, stretch );
+ }
+
+ /* Evaluate and push the arguments. */
+ ObjectField **paramRefs = evaluateArgs( pd, code, lookup, args );
+
+ /* Write the call opcode. */
+ callOperation( pd, code, lookup );
+
+ popRefQuals( pd, code, lookup, args );
+
+ resetActiveRefs( pd, lookup, paramRefs);
+ delete[] paramRefs;
+
+ pd->endContiguous( code, resetContiguous );
+ pd->clearContiguous( code, resetContiguous );
+
+ /* Return the type to the expression. */
+ return lookup.uniqueType;
+}
+
+UniqueType *LangTerm::evaluateMatch( Compiler *pd, CodeVect &code ) const
+{
+ /* Add the vars bound by the pattern into the local scope. */
+ for ( PatternItemList::Iter item = *pattern->list; item.lte(); item++ ) {
+ if ( item->varRef != 0 )
+ item->bindId = pattern->nextBindId++;
+ }
+
+ UniqueType *ut = varRef->evaluate( pd, code );
+ if ( ut->typeId != TYPE_TREE && ut->typeId != TYPE_REF ) {
+ error(varRef->loc) << "expected match against a tree/ref type" << endp;
+ }
+
+ /* Store the language element type in the pattern. This is needed by
+ * the pattern parser. */
+ pattern->langEl = ut->langEl;
+
+ code.append( IN_MATCH );
+ code.appendHalf( pattern->patRepId );
+
+ for ( PatternItemList::Iter item = pattern->list->last(); item.gtb(); item-- ) {
+ if ( item->varRef != 0 ) {
+ /* Compute the unique type. */
+ UniqueType *exprType = pd->findUniqueType( TYPE_TREE, item->prodEl->langEl );
+
+ /* Get the type of the variable being assigned to. */
+ VarRefLookup lookup = item->varRef->lookupField( pd );
+
+ item->varRef->loadObj( pd, code, lookup.lastPtrInQual, false );
+ item->varRef->setField( pd, code, lookup.inObject, lookup.objField, exprType, false );
+ }
+ }
+
+ return ut;
+}
+
+UniqueType *LangTerm::evaluateNew( Compiler *pd, CodeVect &code ) const
+{
+ /* Evaluate the expression. */
+ UniqueType *ut = expr->evaluate( pd, code );
+ if ( ut->typeId != TYPE_TREE )
+ error() << "new can only be applied to tree types" << endp;
+
+ code.append( IN_TREE_NEW );
+ return pd->findUniqueType( TYPE_PTR, ut->langEl );
+}
+
+UniqueType *LangTerm::evaluateCast( Compiler *pd, CodeVect &code ) const
+{
+ expr->evaluate( pd, code );
+ code.append( IN_TREE_CAST );
+ code.appendHalf( typeRef->uniqueType->langEl->id );
+ return typeRef->uniqueType;
+}
+
+void LangTerm::assignFieldArgs( Compiler *pd, CodeVect &code, UniqueType *replUT ) const
+{
+ /* Now assign the field initializations. Note that we need to do this in
+ * reverse because the last expression evaluated is at the top of the
+ * stack. */
+ if ( fieldInitArgs != 0 && fieldInitArgs->length() > 0 ) {
+ ObjectDef *objDef = replUT->objectDef();
+ /* Note the reverse traversal. */
+ for ( FieldInitVect::Iter pi = fieldInitArgs->last(); pi.gtb(); pi-- ) {
+ FieldInit *fieldInit = *pi;
+ ObjectField *field = objDef->findFieldNum( pi.pos() );
+ if ( field == 0 ) {
+ error(fieldInit->loc) << "failed to find init pos " <<
+ pi.pos() << " in object" << endp;
+ }
+
+ /* Lookup the type of the field and compare it to the type of the
+ * expression. */
+ UniqueType *fieldUT = field->typeRef->uniqueType;
+ if ( !castAssignment( pd, code, fieldUT, 0, fieldInit->exprUT ) )
+ error(fieldInit->loc) << "type mismatch in initialization" << endp;
+
+ /* The set field instruction must leave the object on the top of
+ * the stack. */
+ code.append( IN_SET_FIELD_LEAVE_WC );
+ code.appendHalf( field->offset );
+ }
+ }
+}
+
+UniqueType *LangTerm::evaluateConstruct( Compiler *pd, CodeVect &code ) const
+{
+ /* Evaluate the initialization expressions. */
+ if ( fieldInitArgs != 0 && fieldInitArgs->length() > 0 ) {
+ for ( FieldInitVect::Iter pi = *fieldInitArgs; pi.lte(); pi++ ) {
+ FieldInit *fieldInit = *pi;
+ fieldInit->exprUT = fieldInit->expr->evaluate( pd, code );
+ }
+ }
+
+ /* Assign bind ids to the variables in the replacement. */
+ for ( ConsItemList::Iter item = *constructor->list; item.lte(); item++ ) {
+ if ( item->expr != 0 )
+ item->bindId = constructor->nextBindId++;
+ }
+
+ /* Evaluate variable references. */
+ for ( ConsItemList::Iter item = constructor->list->last(); item.gtb(); item-- ) {
+ if ( item->type == ConsItem::ExprType ) {
+ UniqueType *ut = item->expr->evaluate( pd, code );
+
+ if ( ut->typeId != TYPE_TREE )
+ error() << "variables used in replacements must be trees" << endp;
+
+ item->langEl = ut->langEl;
+ }
+ }
+
+ /* Construct the tree using the tree information stored in the compiled
+ * code. */
+ code.append( IN_CONSTRUCT );
+ code.appendHalf( constructor->patRepId );
+
+ /* Lookup the type of the replacement and store it in the replacement
+ * object so that replacement parsing has a target. */
+ UniqueType *replUT = typeRef->uniqueType;
+ if ( replUT->typeId != TYPE_TREE )
+ error(loc) << "don't know how to construct this type" << endp;
+
+ if ( replUT->langEl->generic != 0 && replUT->langEl->generic->typeId == GEN_PARSER ) {
+ code.append( IN_DUP_TOP );
+ code.append( IN_CONSTRUCT_INPUT );
+ code.append( IN_TOP_SWAP );
+ code.append( IN_SET_INPUT );
+ }
+
+ constructor->langEl = replUT->langEl;
+ assignFieldArgs( pd, code, replUT );
+
+ if ( varRef != 0 ) {
+ code.append( IN_DUP_TOP );
+
+ /* Get the type of the variable being assigned to. */
+ VarRefLookup lookup = varRef->lookupField( pd );
+
+ varRef->loadObj( pd, code, lookup.lastPtrInQual, false );
+ varRef->setField( pd, code, lookup.inObject, lookup.objField, replUT, false );
+ }
+
+ return replUT;
+}
+
+void LangTerm::parseFrag( Compiler *pd, CodeVect &code, int stopId ) const
+{
+ /* Parse instruction, dependent on whether or not we are producing
+ * revert or commit code. */
+ if ( pd->revertOn ) {
+ code.append( IN_PARSE_SAVE_STEPS );
+ code.append( IN_PARSE_FRAG_WV );
+ code.appendHalf( stopId );
+ code.append( IN_PCR_CALL );
+ code.append( IN_PARSE_FRAG_EXIT_WV );
+ }
+ else {
+ code.append( IN_PARSE_SAVE_STEPS );
+ code.append( IN_PARSE_FRAG_WC );
+ code.appendHalf( stopId );
+ code.append( IN_PCR_CALL );
+ code.append( IN_PARSE_FRAG_EXIT_WC );
+ }
+}
+
+UniqueType *LangTerm::evaluateParse( Compiler *pd, CodeVect &code, bool stop ) const
+{
+ UniqueType *targetUT = typeRef->uniqueType->langEl->generic->utArg;
+
+ /* If this is a parse stop then we need to verify that the type is
+ * compatible with parse stop. */
+ if ( stop )
+ targetUT->langEl->parseStop = true;
+ int stopId = stop ? targetUT->langEl->id : 0;
+
+ bool context = false;
+ if ( targetUT->langEl->contextIn != 0 ) {
+ if ( fieldInitArgs == 0 || fieldInitArgs->length() != 1 )
+ error(loc) << "parse command requires just input" << endp;
+ context = true;
+ }
+
+ /* Assign bind ids to the variables in the replacement. */
+ for ( ConsItemList::Iter item = *constructor->list; item.lte(); item++ ) {
+ if ( item->expr != 0 )
+ item->bindId = constructor->nextBindId++;
+ }
+
+ /* Evaluate variable references. */
+ for ( ConsItemList::Iter item = constructor->list->last(); item.gtb(); item-- ) {
+ if ( item->type == ConsItem::ExprType ) {
+ UniqueType *ut = item->expr->evaluate( pd, code );
+
+ if ( ut->typeId != TYPE_TREE )
+ error() << "variables used in replacements must be trees" << endp;
+
+ item->langEl = ut->langEl;
+ }
+ }
+
+ /* Construct the tree using the tree information stored in the compiled
+ * code. */
+ code.append( IN_CONSTRUCT );
+ code.appendHalf( constructor->patRepId );
+
+ /* Dup for the finish operation. */
+ code.append( IN_DUP_TOP );
+
+ /*
+ * First load the context into the parser.
+ */
+ if ( context ) {
+ /* Dup the parser. */
+ code.append( IN_DUP_TOP );
+
+ /* Eval the context. */
+ UniqueType *argUT = fieldInitArgs->data[0]->expr->evaluate( pd, code );
+
+ if ( argUT != pd->uniqueTypeStream && argUT->typeId != TYPE_TREE )
+ error(loc) << "context argument must be a stream or a tree" << endp;
+
+ /* Store the context. */
+ code.append( IN_TOP_SWAP );
+ code.append( IN_SET_PARSER_CTX_WC );
+ }
+
+ /* For access to the replacement pattern. */
+ UniqueType *parserUT = typeRef->uniqueType;
+ constructor->langEl = parserUT->langEl;
+
+ /*****************************/
+
+ code.append( IN_DUP_TOP );
+ code.append( IN_CONSTRUCT_INPUT );
+ code.append( IN_TOP_SWAP );
+ code.append( IN_SET_INPUT );
+
+ for ( ConsItemList::Iter item = *parserText->list; item.lte(); item++ )
+ code.append( IN_DUP_TOP );
+
+ /* Assign bind ids to the variables in the replacement. */
+ for ( ConsItemList::Iter item = *parserText->list; item.lte(); item++ ) {
+ switch ( item->type ) {
+ case ConsItem::LiteralType: {
+ String result;
+ bool unusedCI;
+ prepareLitString( result, unusedCI,
+ item->prodEl->typeRef->pdaLiteral->data,
+ item->prodEl->typeRef->pdaLiteral->loc );
+
+ /* Make sure we have this string. */
+ StringMapEl *mapEl = 0;
+ if ( pd->literalStrings.insert( result, &mapEl ) )
+ mapEl->value = pd->literalStrings.length()-1;
+
+ code.append( IN_LOAD_STR );
+ code.appendWord( mapEl->value );
+ break;
+ }
+ case ConsItem::InputText: {
+ /* Make sure we have this string. */
+ StringMapEl *mapEl = 0;
+ if ( pd->literalStrings.insert( item->data, &mapEl ) )
+ mapEl->value = pd->literalStrings.length()-1;
+
+ code.append( IN_LOAD_STR );
+ code.appendWord( mapEl->value );
+ break;
+ }
+ case ConsItem::ExprType:
+ item->expr->evaluate( pd, code );
+ break;
+ }
+
+ code.append( IN_TOP_SWAP );
+
+ /* Not a stream. Get the input first. */
+ code.append( IN_GET_INPUT );
+ if ( pd->revertOn )
+ code.append( IN_INPUT_APPEND_WV );
+ else
+ code.append( IN_INPUT_APPEND_WC );
+ code.append( IN_POP );
+
+ code.append( IN_DUP_TOP );
+
+ /* Parse instruction, dependent on whether or not we are producing
+ * revert or commit code. */
+ parseFrag( pd, code, stopId );
+ }
+
+ /*
+ * Finish operation
+ */
+
+ /* Parse instruction, dependent on whether or not we are producing revert
+ * or commit code. */
+ if ( pd->revertOn ) {
+ /* Finish immediately. */
+ code.append( IN_PARSE_SAVE_STEPS );
+ code.append( IN_PARSE_FINISH_WV );
+ code.appendHalf( stopId );
+ code.append( IN_PCR_CALL );
+ code.append( IN_PARSE_FINISH_EXIT_WV );
+ }
+ else {
+ /* Finish immediately. */
+ code.append( IN_PARSE_SAVE_STEPS );
+ code.append( IN_PARSE_FINISH_WC );
+ code.appendHalf( stopId );
+ code.append( IN_PCR_CALL );
+ code.append( IN_PARSE_FINISH_EXIT_WC );
+ }
+
+ code.append( IN_POP );
+
+ /* Parser is on the top of the stack. */
+
+ /* Pull out the error and save it off. */
+ code.append( IN_DUP_TOP );
+ code.append( IN_GET_PARSER_MEM_R );
+ code.appendHalf( 1 );
+ code.append( IN_SET_ERROR );
+
+ /* Replace the parser with the parsed tree. */
+ code.append( IN_GET_PARSER_MEM_R );
+ code.appendHalf( 0 );
+
+ /*
+ * Capture to the local var.
+ */
+ if ( varRef != 0 ) {
+ code.append( IN_DUP_TOP );
+
+ /* Get the type of the variable being assigned to. */
+ VarRefLookup lookup = varRef->lookupField( pd );
+
+ varRef->loadObj( pd, code, lookup.lastPtrInQual, false );
+ varRef->setField( pd, code, lookup.inObject, lookup.objField, targetUT, false );
+ }
+
+ return targetUT;
+}
+
+void LangTerm::evaluateSendStream( Compiler *pd, CodeVect &code ) const
+{
+ varRef->evaluate( pd, code );
+
+ for ( ConsItemList::Iter item = parserText->list->first(); item.lte(); item++ ) {
+ /* Load a dup of the stream. */
+ code.append( IN_DUP_TOP );
+
+ switch ( item->type ) {
+ case ConsItem::LiteralType: {
+ String result;
+ bool unusedCI;
+ prepareLitString( result, unusedCI,
+ item->prodEl->typeRef->pdaLiteral->data,
+ item->prodEl->typeRef->pdaLiteral->loc );
+
+ /* Make sure we have this string. */
+ StringMapEl *mapEl = 0;
+ if ( pd->literalStrings.insert( result, &mapEl ) )
+ mapEl->value = pd->literalStrings.length()-1;
+
+ code.append( IN_LOAD_STR );
+ code.appendWord( mapEl->value );
+ break;
+ }
+ case ConsItem::InputText: {
+ /* Make sure we have this string. */
+ StringMapEl *mapEl = 0;
+ if ( pd->literalStrings.insert( item->data, &mapEl ) )
+ mapEl->value = pd->literalStrings.length()-1;
+
+ code.append( IN_LOAD_STR );
+ code.appendWord( mapEl->value );
+ break;
+ }
+ case ConsItem::ExprType:
+ UniqueType *ut = item->expr->evaluate( pd, code );
+ if ( ut->typeId == TYPE_TREE && ut->langEl == pd->voidLangEl ) {
+ code.append( IN_POP );
+ code.append( IN_POP );
+ continue;
+ }
+
+ break;
+ }
+
+ code.append( IN_PRINT_STREAM );
+ code.append( 1 );
+ }
+
+
+ /* Normally we would have to pop the stream var ref that we evaluated
+ * before all the print arguments (which includes the stream, evaluated
+ * last), however we send is part of an expression, and is supposed to
+ * leave the varref on the stack. */
+}
+
+void LangTerm::evaluateSendParser( Compiler *pd, CodeVect &code ) const
+{
+ varRef->evaluate( pd, code );
+
+ /* Dup for every send. */
+ for ( ConsItemList::Iter item = *parserText->list; item.lte(); item++ )
+ code.append( IN_DUP_TOP );
+
+ /* Assign bind ids to the variables in the replacement. */
+ for ( ConsItemList::Iter item = *parserText->list; item.lte(); item++ ) {
+ switch ( item->type ) {
+ case ConsItem::LiteralType: {
+ String result;
+ bool unusedCI;
+ prepareLitString( result, unusedCI,
+ item->prodEl->typeRef->pdaLiteral->data,
+ item->prodEl->typeRef->pdaLiteral->loc );
+
+ /* Make sure we have this string. */
+ StringMapEl *mapEl = 0;
+ if ( pd->literalStrings.insert( result, &mapEl ) )
+ mapEl->value = pd->literalStrings.length()-1;
+
+ code.append( IN_LOAD_STR );
+ code.appendWord( mapEl->value );
+ break;
+ }
+ case ConsItem::InputText: {
+ /* Make sure we have this string. */
+ StringMapEl *mapEl = 0;
+ if ( pd->literalStrings.insert( item->data, &mapEl ) )
+ mapEl->value = pd->literalStrings.length()-1;
+
+ code.append( IN_LOAD_STR );
+ code.appendWord( mapEl->value );
+ break;
+ }
+ case ConsItem::ExprType:
+ UniqueType *ut = item->expr->evaluate( pd, code );
+
+ if ( ut->typeId == TYPE_TREE && ut->langEl == pd->voidLangEl ) {
+ code.append( IN_POP );
+ code.append( IN_POP );
+ continue;
+ }
+ break;
+ }
+
+ code.append( IN_TOP_SWAP );
+
+ /* Not a stream. Get the input first. */
+ code.append( IN_GET_INPUT );
+ if ( pd->revertOn )
+ code.append( IN_INPUT_APPEND_WV );
+ else
+ code.append( IN_INPUT_APPEND_WC );
+ code.append( IN_POP );
+
+ code.append( IN_DUP_TOP );
+
+ parseFrag( pd, code, 0 );
+ }
+
+ if ( eof ) {
+ code.append( IN_PARSE_SAVE_STEPS );
+ if ( pd->revertOn ) {
+ code.append( IN_PARSE_FINISH_WV );
+ code.appendHalf( 0 );
+ code.append( IN_PCR_CALL );
+ code.append( IN_PARSE_FINISH_EXIT_WV );
+ }
+ else {
+ code.append( IN_PARSE_FINISH_WC );
+ code.appendHalf( 0 );
+ code.append( IN_PCR_CALL );
+ code.append( IN_PARSE_FINISH_EXIT_WC );
+ }
+ }
+}
+
+UniqueType *LangTerm::evaluateSend( Compiler *pd, CodeVect &code ) const
+{
+ UniqueType *varUt = varRef->lookup( pd );
+
+ if ( varUt == pd->uniqueTypeStream ) {
+ evaluateSendStream( pd, code );
+ }
+ else if ( varUt->langEl->generic != 0 &&
+ varUt->langEl->generic->typeId == GEN_PARSER )
+ {
+ evaluateSendParser( pd, code );
+ }
+ else {
+ error(loc) << "can only send to parsers and streams" << endl;
+ }
+
+ return varUt;
+}
+
+
+UniqueType *LangTerm::evaluateEmbedString( Compiler *pd, CodeVect &code ) const
+{
+ /* Assign bind ids to the variables in the replacement. */
+ for ( ConsItemList::Iter item = *consItemList; item.lte(); item++ ) {
+ switch ( item->type ) {
+ case ConsItem::LiteralType: {
+ String result;
+ bool unusedCI;
+ prepareLitString( result, unusedCI,
+ item->prodEl->typeRef->pdaLiteral->data,
+ item->prodEl->typeRef->pdaLiteral->loc );
+
+ /* Make sure we have this string. */
+ StringMapEl *mapEl = 0;
+ if ( pd->literalStrings.insert( result, &mapEl ) )
+ mapEl->value = pd->literalStrings.length()-1;
+
+ code.append( IN_LOAD_STR );
+ code.appendWord( mapEl->value );
+ break;
+ }
+ case ConsItem::InputText: {
+ /* Make sure we have this string. */
+ StringMapEl *mapEl = 0;
+ if ( pd->literalStrings.insert( item->data, &mapEl ) )
+ mapEl->value = pd->literalStrings.length()-1;
+
+ code.append( IN_LOAD_STR );
+ code.appendWord( mapEl->value );
+ break;
+ }
+ case ConsItem::ExprType:
+ item->expr->evaluate( pd, code );
+ break;
+ }
+
+ }
+
+ /* If there was nothing loaded, load the empty string. We must produce
+ * something. */
+ if ( consItemList->length() == 0 ) {
+ String result = "";
+
+ /* Make sure we have this string. */
+ StringMapEl *mapEl = 0;
+ if ( pd->literalStrings.insert( result, &mapEl ) )
+ mapEl->value = pd->literalStrings.length()-1;
+
+ code.append( IN_LOAD_STR );
+ code.appendWord( mapEl->value );
+ }
+
+ long items = consItemList->length();
+ for ( long i = 0; i < items-1; i++ )
+ code.append( IN_CONCAT_STR );
+
+ return pd->uniqueTypeStr;
+}
+
+UniqueType *LangTerm::evaluateSearch( Compiler *pd, CodeVect &code ) const
+{
+ UniqueType *ut = typeRef->uniqueType;
+ if ( ut->typeId != TYPE_TREE )
+ error(loc) << "can only search for tree types" << endp;
+
+ /* Evaluate the expression. */
+ UniqueType *treeUT = varRef->evaluate( pd, code );
+ if ( treeUT->typeId != TYPE_TREE && treeUT->typeId != TYPE_REF )
+ error(loc) << "search can be applied only to tree/ref types" << endp;
+
+ /* Run the search. */
+ code.append( IN_TREE_SEARCH );
+ code.appendWord( ut->langEl->id );
+ return ut;
+}
+
+UniqueType *LangTerm::evaluate( Compiler *pd, CodeVect &code ) const
+{
+ switch ( type ) {
+ case VarRefType:
+ return varRef->evaluate( pd, code );
+ case MethodCallType:
+ return varRef->evaluateCall( pd, code, args );
+ case NilType:
+ code.append( IN_LOAD_NIL );
+ return pd->uniqueTypeNil;
+ case TrueType:
+ code.append( IN_LOAD_TRUE );
+ return pd->uniqueTypeBool;
+ case FalseType:
+ code.append( IN_LOAD_FALSE );
+ return pd->uniqueTypeBool;
+ case MakeTokenType:
+ return evaluateMakeToken( pd, code );
+ case MakeTreeType:
+ return evaluateMakeTree( pd, code );
+ case NumberType: {
+ unsigned int n = atoi( data );
+ code.append( IN_LOAD_INT );
+ code.appendWord( n );
+ return pd->uniqueTypeInt;
+ }
+ case StringType: {
+ String interp;
+ bool unused;
+ prepareLitString( interp, unused, data, InputLoc() );
+
+ /* Make sure we have this string. */
+ StringMapEl *mapEl = 0;
+ if ( pd->literalStrings.insert( interp, &mapEl ) )
+ mapEl->value = pd->literalStrings.length()-1;
+
+ code.append( IN_LOAD_STR );
+ code.appendWord( mapEl->value );
+ return pd->uniqueTypeStr;
+ }
+ case MatchType:
+ return evaluateMatch( pd, code );
+ case ParseType:
+ return evaluateParse( pd, code, false );
+ case ParseStopType:
+ return evaluateParse( pd, code, true );
+ case ConstructType:
+ return evaluateConstruct( pd, code );
+ case SendType:
+ return evaluateSend( pd, code );
+ case NewType:
+ return evaluateNew( pd, code );
+ case TypeIdType: {
+ /* Evaluate the expression. */
+ UniqueType *ut = typeRef->uniqueType;
+ if ( ut->typeId != TYPE_TREE )
+ error() << "typeid can only be applied to tree types" << endp;
+
+ code.append( IN_LOAD_INT );
+ code.appendWord( ut->langEl->id );
+ return pd->uniqueTypeInt;
+ }
+ case SearchType:
+ return evaluateSearch( pd, code );
+ case EmbedStringType:
+ return evaluateEmbedString( pd, code );
+ case CastType:
+ return evaluateCast( pd, code );
+ }
+ return 0;
+}
+
+UniqueType *LangExpr::evaluate( Compiler *pd, CodeVect &code ) const
+{
+ switch ( type ) {
+ case BinaryType: {
+ switch ( op ) {
+ case '+': {
+ UniqueType *lt = left->evaluate( pd, code );
+ UniqueType *rt = right->evaluate( pd, code );
+
+ if ( lt == pd->uniqueTypeInt && rt == pd->uniqueTypeInt ) {
+ code.append( IN_ADD_INT );
+ return pd->uniqueTypeInt;
+ }
+
+ if ( lt == pd->uniqueTypeStr && rt == pd->uniqueTypeStr ) {
+ code.append( IN_CONCAT_STR );
+ return pd->uniqueTypeStr;
+ }
+
+ error(loc) << "do not have an addition operator for these types" << endp;
+ break;
+ }
+ case '-': {
+ UniqueType *lt = left->evaluate( pd, code );
+ UniqueType *rt = right->evaluate( pd, code );
+
+ if ( lt == pd->uniqueTypeInt && rt == pd->uniqueTypeInt ) {
+ code.append( IN_SUB_INT );
+ return pd->uniqueTypeInt;
+ }
+
+ error(loc) << "do not have an addition operator for these types" << endp;
+ break;
+ }
+ case '*': {
+ UniqueType *lt = left->evaluate( pd, code );
+ UniqueType *rt = right->evaluate( pd, code );
+
+ if ( lt == pd->uniqueTypeInt && rt == pd->uniqueTypeInt ) {
+ code.append( IN_MULT_INT );
+ return pd->uniqueTypeInt;
+ }
+
+ error(loc) << "do not have an multiplication "
+ "operator for these types" << endp;
+ break;
+ }
+ case '/': {
+ UniqueType *lt = left->evaluate( pd, code );
+ UniqueType *rt = right->evaluate( pd, code );
+
+ if ( lt == pd->uniqueTypeInt && rt == pd->uniqueTypeInt ) {
+ code.append( IN_DIV_INT );
+ return pd->uniqueTypeInt;
+ }
+
+ error(loc) << "do not have an division"
+ "operator for these types" << endp;
+ break;
+ }
+ case OP_DoubleEql: {
+ UniqueType *lt = left->evaluate( pd, code );
+ UniqueType *rt = right->evaluate( pd, code );
+
+ if ( lt != rt )
+ error(loc) << "comparison of different types" << endp;
+
+ code.append( IN_TST_EQL );
+ return pd->uniqueTypeBool;
+ }
+ case OP_NotEql: {
+ UniqueType *lt = left->evaluate( pd, code );
+ UniqueType *rt = right->evaluate( pd, code );
+
+ if ( lt != rt )
+ error(loc) << "comparison of different types" << endp;
+
+ code.append( IN_TST_NOT_EQL );
+ return pd->uniqueTypeBool;
+ }
+ case '<': {
+ left->evaluate( pd, code );
+ right->evaluate( pd, code );
+
+ code.append( IN_TST_LESS );
+ return pd->uniqueTypeBool;
+ }
+ case '>': {
+ left->evaluate( pd, code );
+ right->evaluate( pd, code );
+
+ code.append( IN_TST_GRTR );
+ return pd->uniqueTypeBool;
+ }
+ case OP_LessEql: {
+ left->evaluate( pd, code );
+ right->evaluate( pd, code );
+
+ code.append( IN_TST_LESS_EQL );
+ return pd->uniqueTypeBool;
+ }
+ case OP_GrtrEql: {
+ left->evaluate( pd, code );
+ right->evaluate( pd, code );
+
+ code.append( IN_TST_GRTR_EQL );
+ return pd->uniqueTypeBool;
+ }
+ case OP_LogicalAnd: {
+ /* Evaluate the left and duplicate it. */
+ left->evaluate( pd, code );
+ code.append( IN_DUP_TOP );
+
+ /* Jump over the right if false, leaving the original left
+ * result on the top of the stack. We don't know the
+ * distance yet so record the position of the jump. */
+ long jump = code.length();
+ code.append( IN_JMP_FALSE );
+ code.appendHalf( 0 );
+
+ /* Evauluate the right, add the test. Store it separately. */
+ right->evaluate( pd, code );
+ code.append( IN_TST_LOGICAL_AND );
+
+ /* Set the distance of the jump. */
+ long distance = code.length() - jump - 3;
+ code.setHalf( jump+1, distance );
+
+ return pd->uniqueTypeInt;
+ }
+ case OP_LogicalOr: {
+ /* Evaluate the left and duplicate it. */
+ left->evaluate( pd, code );
+ code.append( IN_DUP_TOP );
+
+ /* Jump over the right if true, leaving the original left
+ * result on the top of the stack. We don't know the
+ * distance yet so record the position of the jump. */
+ long jump = code.length();
+ code.append( IN_JMP_TRUE );
+ code.appendHalf( 0 );
+
+ /* Evauluate the right, add the test. */
+ right->evaluate( pd, code );
+ code.append( IN_TST_LOGICAL_OR );
+
+ /* Set the distance of the jump. */
+ long distance = code.length() - jump - 3;
+ code.setHalf( jump+1, distance );
+
+ return pd->uniqueTypeInt;
+ }
+ }
+
+ assert(false);
+ return 0;
+ }
+ case UnaryType: {
+ switch ( op ) {
+ case '!': {
+ /* Evaluate the left and duplicate it. */
+ right->evaluate( pd, code );
+ code.append( IN_NOT );
+ return pd->uniqueTypeBool;
+ }
+ case '$': {
+ right->evaluate( pd, code );
+ code.append( IN_TREE_TO_STR_TRIM );
+ return pd->uniqueTypeStr;
+
+ }
+ case '%': {
+ right->evaluate( pd, code );
+ code.append( IN_TREE_TO_STR );
+ return pd->uniqueTypeStr;
+ }
+ case '^': {
+ UniqueType *rt = right->evaluate( pd, code );
+ code.append( IN_TREE_TRIM );
+ return rt;
+ }
+ case OP_Deref: {
+ UniqueType *ut = right->evaluate( pd, code );
+ if ( ut->typeId != TYPE_PTR )
+ error(loc) << "can only dereference pointers" << endl;
+
+ code.append( IN_PTR_DEREF_R );
+ ut = pd->findUniqueType( TYPE_TREE, ut->langEl );
+ return ut;
+ }
+ default:
+ assert(false);
+ }
+ return 0;
+ }
+ case TermType: {
+ return term->evaluate( pd, code );
+ }
+ }
+ return 0;
+}
+
+void LangVarRef::assignValue( Compiler *pd, CodeVect &code,
+ UniqueType *exprUT ) const
+{
+ /* Lookup the left hand side of the assignment. */
+ VarRefLookup lookup = lookupField( pd );
+
+ if ( lookup.objField->refActive )
+ error(loc) << "reference active, cannot write to object" << endp;
+
+ if ( lookup.firstConstPart >= 0 ) {
+ error(loc) << "left hand side qualification \"" <<
+ qual->data[lookup.firstConstPart].data << "\" is const" << endp;
+ }
+
+ if ( lookup.objField->isConst )
+ error(loc) << "field \"" << name << "\" is const" << endp;
+
+ /* Writing guarantees the field is dirty. tree is dirty. */
+ lookup.objField->dirtyTree = true;
+
+ /* Check the types of the assignment and possibly cast. */
+ UniqueType *objUT = lookup.objField->typeRef->uniqueType;
+ assert( lookup.uniqueType == lookup.objField->typeRef->uniqueType );
+ if ( !castAssignment( pd, code, objUT, lookup.iterSearchUT, exprUT ) )
+ error(loc) << "type mismatch in assignment" << endp;
+
+ /* Decide if we need to revert the assignment. */
+ bool revert = lookup.lastPtrInQual >= 0 || !isLocalRef();
+
+ /* Load the object and generate the field setting code. */
+ loadObj( pd, code, lookup.lastPtrInQual, true );
+
+ if ( lookup.uniqueType->typeId == TYPE_ITER )
+ setFieldIter( pd, code, lookup.inObject, lookup.objField, lookup.uniqueType, exprUT, false );
+ else
+ setField( pd, code, lookup.inObject, lookup.objField, exprUT, revert );
+}
+
+UniqueType *LangTerm::evaluateMakeToken( Compiler *pd, CodeVect &code ) const
+{
+// if ( pd->compileContext != Compiler::CompileTranslation )
+// error(loc) << "make_token can be used only in a translation block" << endp;
+
+ /* Match the number of arguments. */
+ int numArgs = args != 0 ? args->length() : 0;
+ if ( numArgs < 2 )
+ error(loc) << "need at least two arguments" << endp;
+
+ for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) {
+ /* Evaluate. */
+ UniqueType *exprUT = (*pe)->expr->evaluate( pd, code );
+
+ if ( pe.pos() == 0 && exprUT != pd->uniqueTypeInt )
+ error(loc) << "first arg, id, must be an int" << endp;
+
+ if ( pe.pos() == 1 && exprUT != pd->uniqueTypeStr )
+ error(loc) << "second arg, length, must be a string" << endp;
+ }
+
+ /* The token is now created, send it. */
+ code.append( IN_MAKE_TOKEN );
+ code.append( args->length() );
+
+ return pd->uniqueTypeAny;
+}
+
+UniqueType *LangTerm::evaluateMakeTree( Compiler *pd, CodeVect &code ) const
+{
+// if ( pd->compileContext != Compiler::CompileTranslation )
+// error(loc) << "make_tree can be used only in a translation block" << endp;
+
+ /* Match the number of arguments. */
+ int numArgs = args != 0 ? args->length() : 0;
+ if ( numArgs < 1 )
+ error(loc) << "need at least one argument" << endp;
+
+ for ( CallArgVect::Iter pe = *args; pe.lte(); pe++ ) {
+ /* Evaluate. */
+ UniqueType *exprUT = (*pe)->expr->evaluate( pd, code );
+
+ if ( pe.pos() == 0 && exprUT != pd->uniqueTypeInt )
+ error(loc) << "first arg, nonterm id, must be an int" << endp;
+ }
+
+ /* The token is now created, send it. */
+ code.append( IN_MAKE_TREE );
+ code.append( args->length() );
+
+ return pd->uniqueTypeAny;
+}
+
+void LangStmt::compileForIterBody( Compiler *pd,
+ CodeVect &code, UniqueType *iterUT ) const
+{
+ /* Remember the top of the loop. */
+ long top = code.length();
+
+ /* Advance */
+ code.append( iterUT->iterDef->inAdvance );
+ code.appendHalf( objField->offset );
+
+ /* Test: jump past the while block if false. Note that we don't have the
+ * distance yet. */
+ long jumpFalse = code.length();
+ code.append( IN_JMP_FALSE );
+ code.appendHalf( 0 );
+
+ /*
+ * Set up the loop cleanup code.
+ */
+
+ /* Set up the current loop cleanup. */
+ CodeVect loopCleanup;
+ if ( pd->loopCleanup != 0 )
+ loopCleanup.setAs( *pd->loopCleanup );
+
+ /* Add the cleanup for the current loop. */
+ loopCleanup.append( iterUT->iterDef->inDestroy );
+ loopCleanup.appendHalf( objField->offset );
+
+ /* Push the loop cleanup. */
+ CodeVect *oldLoopCleanup = pd->loopCleanup;
+ pd->loopCleanup = &loopCleanup;
+
+ /* Compile the contents. */
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->compile( pd, code );
+
+ pd->loopCleanup = oldLoopCleanup;
+
+ /* Jump back to the top to retest. */
+ long retestDist = code.length() - top + 3;
+ code.append( IN_JMP );
+ code.appendHalf( -retestDist );
+
+ /* Set the jump false distance. */
+ long falseDist = code.length() - jumpFalse - 3;
+ code.setHalf( jumpFalse+1, falseDist );
+
+ /* Compute the jump distance for the break jumps. */
+ for ( LongVect::Iter brk = pd->breakJumps; brk.lte(); brk++ ) {
+ long distance = code.length() - *brk - 3;
+ code.setHalf( *brk+1, distance );
+ }
+ pd->breakJumps.empty();
+
+ /* Destroy the iterator. */
+ code.append( iterUT->iterDef->inDestroy );
+ code.appendHalf( objField->offset );
+
+ /* Clean up any prepush args. */
+}
+
+void LangStmt::compileForIter( Compiler *pd, CodeVect &code ) const
+{
+ /* The type we are searching for. */
+ UniqueType *searchUT = typeRef->uniqueType;
+
+ /* Lookup the iterator call. Make sure it is an iterator. */
+ VarRefLookup lookup = iterCall->langTerm->varRef->lookupMethod( pd );
+ if ( lookup.objMethod->iterDef == 0 ) {
+ error(loc) << "attempt to iterate using something "
+ "that is not an iterator" << endp;
+ }
+
+ bool resetContiguous = false;
+ Function *func = lookup.objMethod->func;
+ if ( func != 0 ) {
+ /* FIXME: what is the right size here (16)? */
+ long stretch = func->paramListSize + 16 + func->localFrame->size();
+ resetContiguous = pd->beginContiguous( code, stretch );
+ }
+
+ /* Also force the field to be initialized. */
+ objField->scope->owner->initField( pd, objField );
+
+ /*
+ * Create the iterator from the local var.
+ */
+
+ UniqueType *iterUT = objField->typeRef->uniqueType;
+
+ /* Evaluate and push the arguments. */
+ ObjectField **paramRefs = iterCall->langTerm->varRef->evaluateArgs(
+ pd, code, lookup, iterCall->langTerm->args );
+
+ pd->endContiguous( code, resetContiguous );
+
+ if ( pd->revertOn )
+ code.append( iterUT->iterDef->inCreateWV );
+ else
+ code.append( iterUT->iterDef->inCreateWC );
+
+ code.appendHalf( objField->offset );
+ if ( lookup.objMethod->func != 0 )
+ code.appendHalf( lookup.objMethod->func->funcId );
+
+ if ( iterUT->iterDef->useSearchUT ) {
+ if ( searchUT->typeId == TYPE_PTR )
+ code.appendHalf( pd->uniqueTypePtr->langEl->id );
+ else
+ code.appendHalf( searchUT->langEl->id );
+ }
+
+ compileForIterBody( pd, code, iterUT );
+
+
+ iterCall->langTerm->varRef->popRefQuals( pd, code, lookup, iterCall->langTerm->args );
+
+ iterCall->langTerm->varRef->resetActiveRefs( pd, lookup, paramRefs );
+ delete[] paramRefs;
+
+ if ( resetContiguous )
+ code.append( IN_POP );
+}
+
+void LangStmt::compileWhile( Compiler *pd, CodeVect &code ) const
+{
+ /* Generate code for the while test. Remember the top. */
+ long top = code.length();
+ expr->evaluate( pd, code );
+
+ /* Jump past the while block if false. Note that we don't have the
+ * distance yet. */
+ long jumpFalse = code.length();
+ code.append( IN_JMP_FALSE );
+ code.appendHalf( 0 );
+
+ /* Compute the while block. */
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->compile( pd, code );
+
+ /* Jump back to the top to retest. */
+ long retestDist = code.length() - top + 3;
+ code.append( IN_JMP );
+ code.appendHalf( -retestDist );
+
+ /* Set the jump false distance. */
+ long falseDist = code.length() - jumpFalse - 3;
+ code.setHalf( jumpFalse+1, falseDist );
+
+ /* Compute the jump distance for the break jumps. */
+ for ( LongVect::Iter brk = pd->breakJumps; brk.lte(); brk++ ) {
+ long distance = code.length() - *brk - 3;
+ code.setHalf( *brk+1, distance );
+ }
+ pd->breakJumps.empty();
+}
+
+void LangStmt::compile( Compiler *pd, CodeVect &code ) const
+{
+ switch ( type ) {
+ case PrintType:
+ case PrintXMLACType:
+ case PrintXMLType:
+ case PrintStreamType: {
+ UniqueType **types = new UniqueType*[exprPtrVect->length()];
+
+ /* Push the args backwards. */
+ for ( CallArgVect::Iter pex = exprPtrVect->first(); pex.lte(); pex++ )
+ types[pex.pos()] = (*pex)->expr->evaluate( pd, code );
+
+ /* Run the printing forwards. */
+ if ( type == PrintType ) {
+ code.append( IN_PRINT );
+ code.append( exprPtrVect->length() );
+ }
+ else if ( type == PrintXMLACType ) {
+ code.append( IN_PRINT_XML_AC );
+ code.append( exprPtrVect->length() );
+ }
+ else if ( type == PrintXMLType ) {
+ code.append( IN_PRINT_XML );
+ code.append( exprPtrVect->length() );
+ }
+ else if ( type == PrintStreamType ) {
+ /* Minus one because the first arg is the stream. */
+ code.append( IN_PRINT_STREAM );
+ code.append( exprPtrVect->length() - 1 );
+ }
+
+ delete[] types;
+
+ break;
+ }
+ case ExprType: {
+ /* Evaluate the exrepssion, then pop it immediately. */
+ expr->evaluate( pd, code );
+ code.append( IN_POP );
+ break;
+ }
+ case IfType: {
+ long jumpFalse = 0, jumpPastElse = 0, distance = 0;
+
+ /* Evaluate the test. */
+ expr->evaluate( pd, code );
+
+ /* Jump past the if block if false. We don't know the distance
+ * yet so store the location of the jump. */
+ jumpFalse = code.length();
+ code.append( IN_JMP_FALSE );
+ code.appendHalf( 0 );
+
+ /* Compile the if true branch. */
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->compile( pd, code );
+
+ if ( elsePart != 0 ) {
+ /* Jump past the else code for the if true branch. */
+ jumpPastElse = code.length();
+ code.append( IN_JMP );
+ code.appendHalf( 0 );
+ }
+
+ /* Set the distance for the jump false case. */
+ distance = code.length() - jumpFalse - 3;
+ code.setHalf( jumpFalse+1, distance );
+
+ if ( elsePart != 0 ) {
+ /* Compile the else branch. */
+ elsePart->compile( pd, code );
+
+ /* Set the distance for jump over the else part. */
+ distance = code.length() - jumpPastElse - 3;
+ code.setHalf( jumpPastElse+1, distance );
+ }
+
+ break;
+ }
+ case ElseType: {
+ /* Compile the else branch. */
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->compile( pd, code );
+ break;
+ }
+ case RejectType: {
+ code.append( IN_REJECT );
+ break;
+ }
+ case WhileType: {
+ compileWhile( pd, code );
+ break;
+ }
+ case AssignType: {
+ /* Evaluate the exrepssion. */
+ UniqueType *exprUT = expr->evaluate( pd, code );
+
+ /* Do the assignment. */
+ varRef->assignValue( pd, code, exprUT );
+ break;
+ }
+ case ForIterType: {
+ compileForIter( pd, code );
+ break;
+ }
+ case ReturnType: {
+ /* Evaluate the exrepssion. */
+ UniqueType *exprUT = expr->evaluate( pd, code );
+
+ if ( pd->curFunction == 0 ) {
+ /* In the main function */
+ pd->mainReturnUT = exprUT;
+ }
+ else {
+ UniqueType *resUT = pd->curFunction->typeRef->uniqueType;
+ if ( !castAssignment( pd, code, resUT, 0, exprUT ) )
+ error(loc) << "return value wrong type" << endp;
+ }
+
+ code.append( IN_SAVE_RET );
+
+ /* The loop cleanup code. */
+ if ( pd->loopCleanup != 0 )
+ code.append( *pd->loopCleanup );
+
+ /* Jump to the return label. The distnacnce will be filled in
+ * later. */
+ pd->returnJumps.append( code.length() );
+ code.append( IN_JMP );
+ code.appendHalf( 0 );
+ break;
+ }
+ case BreakType: {
+ pd->breakJumps.append( code.length() );
+ code.append( IN_JMP );
+ code.appendHalf( 0 );
+ break;
+ }
+ case YieldType: {
+ /* take a reference and yield it. Immediately reset the referece. */
+ varRef->preEvaluateRef( pd, code );
+ ObjectField *objField = varRef->evaluateRef( pd, code, 0 );
+ code.append( IN_YIELD );
+
+ if ( varRef->qual->length() > 0 ) {
+ code.append( IN_POP_N_WORDS );
+ code.appendHalf( (short)(varRef->qual->length()*2) );
+ }
+
+ objField->refActive = false;
+ break;
+ }
+ }
+}
+
+void CodeBlock::compile( Compiler *pd, CodeVect &code ) const
+{
+ for ( StmtList::Iter stmt = *stmtList; stmt.lte(); stmt++ )
+ stmt->compile( pd, code );
+}
+
+void Compiler::findLocals( ObjectDef *localFrame, CodeBlock *block )
+{
+ Locals &locals = block->locals;
+
+ for ( ObjFieldList::Iter ol = *localFrame->objFieldList; ol.lte(); ol++ ) {
+ ObjectField *el = ol->value;
+
+ /* FIXME: This test needs to be improved. Match_text was getting
+ * through before useOffset was tested. What will? */
+ if ( el->useOffset && !el->isLhsEl && ( el->beenReferenced || el->isParam ) ) {
+ UniqueType *ut = el->typeRef->uniqueType;
+ if ( ut->typeId == TYPE_TREE || ut->typeId == TYPE_PTR ) {
+ int depth = el->scope->depth();
+ locals.append( LocalLoc( LT_Tree, depth, el->offset ) );
+ }
+ }
+
+ if ( el->useOffset ) {
+ UniqueType *ut = el->typeRef->uniqueType;
+ if ( ut->typeId == TYPE_ITER ) {
+ int depth = el->scope->depth();
+ LocalType type;
+ switch ( ut->iterDef->type ) {
+ case IterDef::Tree:
+ case IterDef::Child:
+ case IterDef::Repeat:
+ case IterDef::RevRepeat:
+ type = LT_Iter;
+ break;
+ case IterDef::RevChild:
+ type = LT_RevIter;
+ break;
+ case IterDef::User:
+ type = LT_UserIter;
+ break;
+ }
+
+ locals.append( LocalLoc( type, depth, (int)el->offset ) );
+ }
+ }
+ }
+}
+
+void Compiler::makeProdCopies( Production *prod )
+{
+ int pos = 0;
+ for ( ProdElList::Iter pel = *prod->prodElList; pel.lte(); pel++, pos++) {
+ if ( pel->captureField != 0 ) {
+ prod->copy.append( pel->captureField->offset );
+ prod->copy.append( pos );
+ }
+ }
+}
+
+void Compiler::compileReductionCode( Production *prod )
+{
+ CodeBlock *block = prod->redBlock;
+
+ /* Init the compilation context. */
+ compileContext = CompileReduction;
+ revertOn = true;
+ block->frameId = nextFrameId++;
+
+ CodeVect &code = block->codeWV;
+
+ /* Add the alloc frame opcode. We don't have the right
+ * frame size yet. We will fill it in later. */
+ code.append( IN_INIT_LOCALS );
+ code.appendHalf( 0 );
+ long afterInit = code.length();
+
+ /* Compile the reduce block. */
+ block->compile( this, code );
+
+ /* We have the frame size now. Set in the alloc frame instruction. */
+ long frameSize = block->localFrame->size();
+ code.setHalf( 1, frameSize );
+
+ /* Might need to load right hand side values. */
+ addProdRHSLoads( prod, code, afterInit );
+
+ addProdLHSLoad( prod, code, afterInit );
+ addPushBackLHS( prod, code, afterInit );
+
+ code.append( IN_PCR_RET );
+
+ /* Now that compilation is done variables are referenced. Make the local
+ * trees descriptor. */
+ findLocals( block->localFrame, block );
+}
+
+void Compiler::compileTranslateBlock( LangEl *langEl )
+{
+ CodeBlock *block = langEl->transBlock;
+
+ /* Set up compilation context. */
+ compileContext = CompileTranslation;
+ revertOn = true;
+ block->frameId = nextFrameId++;
+
+ CodeVect &code = block->codeWV;
+
+ /* Add the alloc frame opcode. We don't have the right
+ * frame size yet. We will fill it in later. */
+ code.append( IN_INIT_LOCALS );
+ code.appendHalf( 0 );
+
+ if ( langEl->tokenDef->reCaptureVect.length() > 0 ) {
+ code.append( IN_INIT_CAPTURES );
+ code.append( langEl->tokenDef->reCaptureVect.length() );
+ }
+
+ /* Set the local frame and compile the reduce block. */
+ block->compile( this, code );
+
+ /* We have the frame size now. Set in the alloc frame instruction. */
+ long frameSize = block->localFrame->size();
+ code.setHalf( 1, frameSize );
+
+ code.append( IN_PCR_RET );
+
+ /* Now that compilation is done variables are referenced. Make the local
+ * trees descriptor. */
+ findLocals( block->localFrame, block );
+}
+
+void Compiler::compilePreEof( TokenRegion *region )
+{
+ CodeBlock *block = region->preEofBlock;
+
+ /* Set up compilation context. */
+ compileContext = CompileTranslation;
+ revertOn = true;
+ block->frameId = nextFrameId++;
+
+ addInput( block->localFrame );
+ addCtx( block->localFrame );
+
+ CodeVect &code = block->codeWV;
+
+ /* Add the alloc frame opcode. We don't have the right
+ * frame size yet. We will fill it in later. */
+ code.append( IN_INIT_LOCALS );
+ code.appendHalf( 0 );
+
+ /* Set the local frame and compile the reduce block. */
+ block->compile( this, code );
+
+ /* We have the frame size now. Set in the alloc frame instruction. */
+ long frameSize = block->localFrame->size();
+ code.setHalf( 1, frameSize );
+
+ code.append( IN_PCR_RET );
+
+ /* Now that compilation is done variables are referenced. Make the local
+ * trees descriptor. */
+ findLocals( block->localFrame, block );
+}
+
+void Compiler::compileRootBlock( )
+{
+ CodeBlock *block = rootCodeBlock;
+
+ /* The root block never needs to be reverted. */
+
+ /* Set up the compile context. No locals are needed for the root code
+ * block, but we need an empty local frame for the compile. */
+ compileContext = CompileRoot;
+ revertOn = false;
+
+ /* The block needs a frame id. */
+ block->frameId = nextFrameId++;
+
+ /* The root block is not reverted. */
+ CodeVect &code = block->codeWC;
+
+ /* Add the alloc frame opcode. We don't have the right
+ * frame size yet. We will fill it in later. */
+ code.append( IN_INIT_LOCALS );
+ code.appendHalf( 0 );
+
+ code.append( IN_LOAD_ARGV );
+ code.appendHalf( argvOffset() );
+
+ block->compile( this, code );
+
+ /* We have the frame size now. Store it in frame init. */
+ long frameSize = rootLocalFrame->size();
+ code.setHalf( 1, frameSize );
+
+ code.append( IN_STOP );
+
+ /* Make the local trees descriptor. */
+ findLocals( rootLocalFrame, block );
+}
+
+void Compiler::initAllLanguageObjects()
+{
+ /* Init all user object fields (need consistent size). */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ ObjectDef *objDef = lel->objectDef;
+ if ( objDef != 0 ) {
+ /* Init all fields of the object. */
+ for ( ObjFieldList::Iter f = *objDef->objFieldList; f.lte(); f++ )
+ objDef->initField( this, f->value );
+ }
+ }
+
+ /* Init all fields of the global object. */
+ for ( ObjFieldList::Iter f = *globalObjectDef->objFieldList; f.lte(); f++ )
+ globalObjectDef->initField( this, f->value );
+}
+
+void Compiler::initLocalFrame( ObjectDef *localFrame )
+{
+ for ( ObjFieldList::Iter f = *localFrame->objFieldList; f.lte(); f++ )
+ localFrame->initField( this, f->value );
+}
+
+void Compiler::initAllFrameObjects()
+{
+ /* Functions. */
+ for ( FunctionList::Iter f = functionList; f.lte(); f++ )
+ initLocalFrame( f->localFrame );
+
+ /* Reduction code. */
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ if ( prod->redBlock != 0 )
+ initLocalFrame( prod->redBlock->localFrame );
+ }
+
+ /* Token translation code. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->transBlock != 0 ) {
+ ObjectDef *localFrame = lel->transBlock->localFrame;
+ if ( lel->tokenDef->reCaptureVect.length() > 0 ) {
+ ObjFieldList::Iter f = *localFrame->objFieldList;
+ for ( int i = 0; i < lel->tokenDef->reCaptureVect.length(); i++, f++ )
+ localFrame->initField( this, f->value );
+ }
+
+ initLocalFrame( localFrame );
+ }
+ }
+
+ /* Preeof blocks. */
+ for ( RegionList::Iter r = regionList; r.lte(); r++ ) {
+ if ( r->preEofBlock != 0 )
+ initLocalFrame( r->preEofBlock->localFrame );
+ }
+
+ /* Root code. */
+ initLocalFrame( rootLocalFrame );
+}
+
+void Compiler::initUserFunctions( Function *func, bool isUserIter )
+{
+ /* Set up the parameters. */
+ long paramPos = 0, paramListSize = 0;
+ UniqueType **paramUTs = new UniqueType*[func->paramList->length()];
+ for ( ParameterList::Iter param = *func->paramList; param.lte(); param++ ) {
+ paramUTs[paramPos] = param->typeRef->uniqueType;
+
+ /* Initialize the object field as a local variable. We also want trees
+ * downreffed. */
+ if ( paramUTs[paramPos]->typeId == TYPE_REF )
+ initLocalRefInstructions( param );
+ else
+ initLocalInstructions( param );
+
+ paramListSize += sizeOfField( paramUTs[paramPos] );
+ paramPos += 1;
+ }
+
+ /* Param offset is relative to one past the last item in the array of
+ * words containing the args. */
+ long paramOffset = 0;
+ for ( ParameterList::Iter param = *func->paramList; param.lte(); param++ ) {
+ /* Moving downward, and need the offset to point to the lower half of
+ * the argument. */
+ paramOffset -= sizeOfField( paramUTs[param->pos] );
+
+ /* How much space do we need to make for call overhead. */
+ long frameAfterArgs = isUserIter ? IFR_AA : FR_AA;
+
+ /* Going up first we have the frame data, then maybe
+ * the user iterator, then the args from high to low. */
+ param->offset = frameAfterArgs +
+ ( isUserIter ? ( sizeof(UserIter) / sizeof(Word) ) : 0 ) +
+ paramListSize + paramOffset;
+ }
+
+ func->paramListSize = paramListSize;
+ func->paramUTs = paramUTs;
+
+ func->objMethod->paramUTs = paramUTs;
+
+ /* Insert the function into the global function map. */
+ UniqueType *returnUT = func->typeRef != 0 ?
+ func->typeRef->uniqueType : uniqueTypeInt;
+ func->objMethod->returnUT = returnUT;
+
+ func->objMethod->paramUTs = new UniqueType*[func->paramList->length()];
+ memcpy( func->objMethod->paramUTs, paramUTs, sizeof(UniqueType*) * func->paramList->length() );
+}
+
+void Compiler::compileUserIter( Function *func, CodeVect &code )
+{
+ CodeBlock *block = func->codeBlock;
+
+ /* Add the alloc frame opcode. We don't have the right
+ * frame size yet. We will fill it in later. */
+ code.append( IN_INIT_LOCALS );
+ code.appendHalf( 0 );
+
+ /* Compile the block. */
+ block->compile( this, code );
+
+ /* We have the frame size now. Set in the alloc frame instruction. */
+ int frameSize = func->localFrame->size();
+ code.setHalf( 1, frameSize );
+
+ /* Check for a return statement. */
+ if ( block->stmtList->length() == 0 ||
+ block->stmtList->tail->type != LangStmt::YieldType )
+ {
+ /* Push the return value. */
+ code.append( IN_LOAD_NIL );
+ code.append( IN_YIELD );
+ }
+}
+
+void Compiler::compileUserIter( Function *func )
+{
+ CodeBlock *block = func->codeBlock;
+
+ /* Set up the context. */
+ compileContext = CompileFunction;
+ curFunction = func;
+ block->frameId = nextFrameId++;
+
+ /* Compile for revert and commit. */
+ revertOn = true;
+ compileUserIter( func, block->codeWV );
+
+ revertOn = false;
+ compileUserIter( func, block->codeWC );
+
+ /* Now that compilation is done variables are referenced. Make the local
+ * trees descriptor. */
+ findLocals( block->localFrame, block );
+
+ /* FIXME: Need to deal with the freeing of local trees. */
+}
+
+/* Called for each type of function compile: revert and commit. */
+void Compiler::compileFunction( Function *func, CodeVect &code )
+{
+ CodeBlock *block = func->codeBlock;
+
+ /* Add the alloc frame opcode. We don't have the right
+ * frame size yet. We will fill it in later. */
+ code.append( IN_INIT_LOCALS );
+ code.appendHalf( 0 );
+
+ /* Compile the block. */
+ block->compile( this, code );
+
+ /* We have the frame size now. Set in the alloc frame instruction. */
+ int frameSize = func->localFrame->size();
+ code.setHalf( 1, frameSize );
+
+ /* Check for a return statement. */
+ if ( block->stmtList->length() == 0 ||
+ block->stmtList->tail->type != LangStmt::ReturnType )
+ {
+ /* Push the return value. */
+ code.append( IN_LOAD_NIL );
+ code.append( IN_SAVE_RET );
+ }
+
+ /* Compute the jump distance for the return jumps. */
+ for ( LongVect::Iter rj = returnJumps; rj.lte(); rj++ ) {
+ long distance = code.length() - *rj - 3;
+ code.setHalf( *rj+1, distance );
+ }
+
+ /* Reset the vector of return jumps. */
+ returnJumps.empty();
+
+ /* Return cleans up the stack (including the args) and leaves the return
+ * value on the top. */
+ code.append( IN_RET );
+}
+
+void Compiler::compileFunction( Function *func )
+{
+ CodeBlock *block = func->codeBlock;
+
+ /* Set up the compilation context. */
+ compileContext = CompileFunction;
+ curFunction = func;
+
+ /* Assign a frame Id. */
+ block->frameId = nextFrameId++;
+
+ /* Compile once for revert. */
+ revertOn = true;
+ compileFunction( func, block->codeWV );
+
+ /* Compile once for commit. */
+ revertOn = false;
+ compileFunction( func, block->codeWC );
+
+ /* Now that compilation is done variables are referenced. Make the local
+ * trees descriptor. */
+ findLocals( block->localFrame, block );
+}
+
+void Compiler::removeNonUnparsableRepls()
+{
+ for ( ConsList::Iter repl = replList; repl.lte(); ) {
+ Constructor *maybeDel = repl++;
+ if ( !maybeDel->parse )
+ replList.detach( maybeDel );
+ }
+}
+
+void Compiler::compileByteCode()
+{
+ /* Compile functions. */
+ for ( FunctionList::Iter f = functionList; f.lte(); f++ ) {
+ if ( f->isUserIter )
+ compileUserIter( f );
+ else
+ compileFunction( f );
+ }
+
+ /* Compile the reduction code. */
+ for ( DefList::Iter prod = prodList; prod.lte(); prod++ ) {
+ makeProdCopies( prod );
+ if ( prod->redBlock != 0 )
+ compileReductionCode( prod );
+ }
+
+ /* Compile the token translation code. */
+ for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) {
+ if ( lel->transBlock != 0 )
+ compileTranslateBlock( lel );
+ }
+
+ /* Compile preeof blocks. */
+ for ( RegionList::Iter r = regionList; r.lte(); r++ ) {
+ if ( r->preEofBlock != 0 )
+ compilePreEof( r );
+ }
+
+ /* Compile the init code */
+ compileRootBlock( );
+ removeNonUnparsableRepls();
+}
diff --git a/src/tree.c b/src/tree.c
new file mode 100644
index 0000000..1abb720
--- /dev/null
+++ b/src/tree.c
@@ -0,0 +1,2263 @@
+/*
+ * Copyright 2007-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <colm/pdarun.h>
+#include <colm/tree.h>
+#include <colm/pool.h>
+#include <colm/bytecode.h>
+#include <colm/debug.h>
+#include <colm/map.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <assert.h>
+#include <errno.h>
+
+#define true 1
+#define false 0
+
+#define BUFFER_INITIAL_SIZE 4096
+
+void listPrepend( List *list, ListEl *new_el) { listAddBefore(list, list->head, new_el); }
+void listAppend( List *list, ListEl *new_el) { listAddAfter(list, list->tail, new_el); }
+
+ListEl *listDetach( List *list, ListEl *el );
+ListEl *listDetachFirst(List *list ) { return listDetach(list, list->head); }
+ListEl *listDetachLast(List *list ) { return listDetach(list, list->tail); }
+
+long listLength(List *list)
+ { return list->listLen; }
+
+Kid *allocAttrs( Program *prg, long length )
+{
+ Kid *cur = 0;
+ long i;
+ for ( i = 0; i < length; i++ ) {
+ Kid *next = cur;
+ cur = kidAllocate( prg );
+ cur->next = next;
+ }
+ return cur;
+}
+
+void freeAttrs( Program *prg, Kid *attrs )
+{
+ Kid *cur = attrs;
+ while ( cur != 0 ) {
+ Kid *next = cur->next;
+ kidFree( prg, cur );
+ cur = next;
+ }
+}
+
+void freeKidList( Program *prg, Kid *kid )
+{
+ while ( kid != 0 ) {
+ Kid *next = kid->next;
+ kidFree( prg, kid );
+ kid = next;
+ }
+}
+
+void setAttr( Tree *tree, long pos, Tree *val )
+{
+ long i;
+ Kid *kid = tree->child;
+
+ if ( tree->flags & AF_LEFT_IGNORE )
+ kid = kid->next;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ kid = kid->next;
+
+ for ( i = 0; i < pos; i++ )
+ kid = kid->next;
+ kid->tree = val;
+}
+
+Tree *colm_get_global( Program *prg, long pos )
+ { return colm_get_attr( prg->global, pos ); }
+
+Tree *colm_get_attr( Tree *tree, long pos )
+{
+ long i;
+ Kid *kid = tree->child;
+
+ if ( tree->flags & AF_LEFT_IGNORE )
+ kid = kid->next;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ kid = kid->next;
+
+ for ( i = 0; i < pos; i++ )
+ kid = kid->next;
+ return kid->tree;
+}
+
+
+Tree *colm_get_repeat_next( Tree *tree )
+{
+ Kid *kid = tree->child;
+
+ if ( tree->flags & AF_LEFT_IGNORE )
+ kid = kid->next;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ kid = kid->next;
+
+ return kid->next->tree;
+}
+
+Tree *colm_get_repeat_val( Tree *tree )
+{
+ Kid *kid = tree->child;
+
+ if ( tree->flags & AF_LEFT_IGNORE )
+ kid = kid->next;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ kid = kid->next;
+
+ return kid->tree;
+}
+
+int colm_repeat_end( Tree *tree )
+{
+ Kid *kid = tree->child;
+
+ if ( tree->flags & AF_LEFT_IGNORE )
+ kid = kid->next;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ kid = kid->next;
+
+ return kid == 0;
+}
+
+int colm_list_last( Tree *tree )
+{
+ Kid *kid = tree->child;
+
+ if ( tree->flags & AF_LEFT_IGNORE )
+ kid = kid->next;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ kid = kid->next;
+
+ return kid->next == 0;
+}
+
+Kid *getAttrKid( Tree *tree, long pos )
+{
+ long i;
+ Kid *kid = tree->child;
+
+ if ( tree->flags & AF_LEFT_IGNORE )
+ kid = kid->next;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ kid = kid->next;
+
+ for ( i = 0; i < pos; i++ )
+ kid = kid->next;
+ return kid;
+}
+
+Kid *kidListConcat( Kid *list1, Kid *list2 )
+{
+ if ( list1 == 0 )
+ return list2;
+ else if ( list2 == 0 )
+ return list1;
+
+ Kid *dest = list1;
+ while ( dest->next != 0 )
+ dest = dest->next;
+ dest->next = list2;
+ return list1;
+}
+
+
+Stream *openStreamFile( Program *prg, char *name, FILE *file )
+{
+ Stream *res = (Stream*)mapElAllocate( prg );
+ res->id = LEL_ID_STREAM;
+ res->in = newSourceStreamFile( name, file );
+ return res;
+}
+
+Stream *openStreamFd( Program *prg, char *name, long fd )
+{
+ Stream *res = (Stream*)mapElAllocate( prg );
+ res->id = LEL_ID_STREAM;
+ res->in = newSourceStreamFd( name, fd );
+ return res;
+}
+
+Stream *openFile( Program *prg, Tree *name, Tree *mode )
+{
+ Head *headName = ((Str*)name)->value;
+ Head *headMode = ((Str*)mode)->value;
+ Stream *stream = 0;
+
+ const char *givenMode = stringData(headMode);
+ const char *fopenMode = 0;
+ if ( memcmp( givenMode, "r", stringLength(headMode) ) == 0 )
+ fopenMode = "rb";
+ else if ( memcmp( givenMode, "w", stringLength(headMode) ) == 0 )
+ fopenMode = "wb";
+ else {
+ fatal( "unknown file open mode: %s\n", givenMode );
+ }
+
+ /* Need to make a C-string (null terminated). */
+ char *fileName = (char*)malloc(stringLength(headName)+1);
+ memcpy( fileName, stringData(headName), stringLength(headName) );
+ fileName[stringLength(headName)] = 0;
+ FILE *file = fopen( fileName, fopenMode );
+ if ( file != 0 )
+ stream = openStreamFile( prg, fileName, file );
+
+ return stream;
+}
+
+Tree *constructInteger( Program *prg, long i )
+{
+ Int *integer = (Int*) treeAllocate( prg );
+ integer->id = LEL_ID_INT;
+ integer->value = i;
+
+ return (Tree*)integer;
+}
+
+Tree *constructString( Program *prg, Head *s )
+{
+ Str *str = (Str*) treeAllocate( prg );
+ str->id = LEL_ID_STR;
+ str->value = s;
+
+ return (Tree*)str;
+}
+
+Tree *constructPointer( Program *prg, Tree *tree )
+{
+ Kid *kid = kidAllocate( prg );
+ kid->tree = tree;
+ kid->next = prg->heap;
+ prg->heap = kid;
+
+ Pointer *pointer = (Pointer*) treeAllocate( prg );
+ pointer->id = LEL_ID_PTR;
+ pointer->value = kid;
+
+ return (Tree*)pointer;
+}
+
+Tree *constructTerm( Program *prg, Word id, Head *tokdata )
+{
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+
+ Tree *tree = treeAllocate( prg );
+ tree->id = id;
+ tree->refs = 0;
+ tree->tokdata = tokdata;
+
+ int objectLength = lelInfo[tree->id].objectLength;
+ tree->child = allocAttrs( prg, objectLength );
+
+ return tree;
+}
+
+Tree *constructStream( Program *prg )
+{
+ Stream *input = streamAllocate( prg );
+ input->refs = 0;
+ input->id = LEL_ID_STREAM;
+
+ input->in = newSourceStreamGeneric( "<internal>" );
+ return (Tree*)input;
+}
+
+Kid *constructReplacementKid( Tree **bindings, Program *prg, Kid *prev, long pat );
+
+static Kid *constructIgnoreList( Program *prg, long ignoreInd )
+{
+ PatConsNode *nodes = prg->rtd->patReplNodes;
+
+ Kid *first = 0, *last = 0;
+ while ( ignoreInd >= 0 ) {
+ Head *ignoreData = stringAllocPointer( prg, nodes[ignoreInd].data, nodes[ignoreInd].length );
+
+ Tree *ignTree = treeAllocate( prg );
+ ignTree->refs = 1;
+ ignTree->id = nodes[ignoreInd].id;
+ ignTree->tokdata = ignoreData;
+
+ Kid *ignKid = kidAllocate( prg );
+ ignKid->tree = ignTree;
+ ignKid->next = 0;
+
+ if ( last == 0 )
+ first = ignKid;
+ else
+ last->next = ignKid;
+
+ ignoreInd = nodes[ignoreInd].next;
+ last = ignKid;
+ }
+
+ return first;
+}
+
+static Kid *constructLeftIgnoreList( Program *prg, long pat )
+{
+ PatConsNode *nodes = prg->rtd->patReplNodes;
+ return constructIgnoreList( prg, nodes[pat].leftIgnore );
+}
+
+static Kid *constructRightIgnoreList( Program *prg, long pat )
+{
+ PatConsNode *nodes = prg->rtd->patReplNodes;
+ return constructIgnoreList( prg, nodes[pat].rightIgnore );
+}
+
+static void insLeftIgnore( Program *prg, Tree *tree, Tree *ignoreList )
+{
+ assert( ! (tree->flags & AF_LEFT_IGNORE) );
+
+ /* Allocate. */
+ Kid *kid = kidAllocate( prg );
+ kid->tree = ignoreList;
+ treeUpref( ignoreList );
+
+ /* Attach it. */
+ kid->next = tree->child;
+ tree->child = kid;
+
+ tree->flags |= AF_LEFT_IGNORE;
+}
+
+static void insRightIgnore( Program *prg, Tree *tree, Tree *ignoreList )
+{
+ assert( ! (tree->flags & AF_RIGHT_IGNORE) );
+
+ /* Insert an ignore head in the child list. */
+ Kid *kid = kidAllocate( prg );
+ kid->tree = ignoreList;
+ treeUpref( ignoreList );
+
+ /* Attach it. */
+ if ( tree->flags & AF_LEFT_IGNORE ) {
+ kid->next = tree->child->next;
+ tree->child->next = kid;
+ }
+ else {
+ kid->next = tree->child;
+ tree->child = kid;
+ }
+
+ tree->flags |= AF_RIGHT_IGNORE;
+}
+
+Tree *pushRightIgnore( Program *prg, Tree *pushTo, Tree *rightIgnore )
+{
+ /* About to alter the data tree. Split first. */
+ pushTo = splitTree( prg, pushTo );
+
+ if ( pushTo->flags & AF_RIGHT_IGNORE ) {
+ /* The previous token already has a right ignore. Merge by
+ * attaching it as a left ignore of the new list. */
+ Kid *curIgnore = treeRightIgnoreKid( prg, pushTo );
+ insLeftIgnore( prg, rightIgnore, curIgnore->tree );
+
+ /* Replace the current ignore. Safe to access refs here because we just
+ * upreffed it in insLeftIgnore. */
+ curIgnore->tree->refs -= 1;
+ curIgnore->tree = rightIgnore;
+ treeUpref( rightIgnore );
+ }
+ else {
+ /* Attach The ignore list. */
+ insRightIgnore( prg, pushTo, rightIgnore );
+ }
+
+ return pushTo;
+}
+
+Tree *pushLeftIgnore( Program *prg, Tree *pushTo, Tree *leftIgnore )
+{
+ pushTo = splitTree( prg, pushTo );
+
+ /* Attach as left ignore to the token we are sending. */
+ if ( pushTo->flags & AF_LEFT_IGNORE ) {
+ /* The token already has a left-ignore. Merge by attaching it as a
+ * right ignore of the new list. */
+ Kid *curIgnore = treeLeftIgnoreKid( prg, pushTo );
+ insRightIgnore( prg, leftIgnore, curIgnore->tree );
+
+ /* Replace the current ignore. Safe to upref here because we just
+ * upreffed it in insRightIgnore. */
+ curIgnore->tree->refs -= 1;
+ curIgnore->tree = leftIgnore;
+ treeUpref( leftIgnore );
+ }
+ else {
+ /* Attach the ignore list. */
+ insLeftIgnore( prg, pushTo, leftIgnore );
+ }
+
+ return pushTo;
+}
+
+static void remLeftIgnore( Program *prg, Tree **sp, Tree *tree )
+{
+ assert( tree->flags & AF_LEFT_IGNORE );
+
+ Kid *next = tree->child->next;
+ treeDownref( prg, sp, tree->child->tree );
+ kidFree( prg, tree->child );
+ tree->child = next;
+
+ tree->flags &= ~AF_LEFT_IGNORE;
+}
+
+static void remRightIgnore( Program *prg, Tree **sp, Tree *tree )
+{
+ assert( tree->flags & AF_RIGHT_IGNORE );
+
+ if ( tree->flags & AF_LEFT_IGNORE ) {
+ Kid *next = tree->child->next->next;
+ treeDownref( prg, sp, tree->child->next->tree );
+ kidFree( prg, tree->child->next );
+ tree->child->next = next;
+ }
+ else {
+ Kid *next = tree->child->next;
+ treeDownref( prg, sp, tree->child->tree );
+ kidFree( prg, tree->child );
+ tree->child = next;
+ }
+
+ tree->flags &= ~AF_RIGHT_IGNORE;
+}
+
+Tree *popRightIgnore( Program *prg, Tree **sp, Tree *popFrom, Tree **rightIgnore )
+{
+ /* Modifying the tree we are detaching from. */
+ popFrom = splitTree( prg, popFrom );
+
+ Kid *riKid = treeRightIgnoreKid( prg, popFrom );
+
+ /* If the right ignore has a left ignore, then that was the original
+ * right ignore. */
+ Kid *li = treeLeftIgnoreKid( prg, riKid->tree );
+ if ( li != 0 ) {
+ treeUpref( li->tree );
+ remLeftIgnore( prg, sp, riKid->tree );
+ *rightIgnore = riKid->tree;
+ treeUpref( *rightIgnore );
+ riKid->tree = li->tree;
+ }
+ else {
+ *rightIgnore = riKid->tree;
+ treeUpref( *rightIgnore );
+ remRightIgnore( prg, sp, popFrom );
+ }
+
+ return popFrom;
+}
+
+Tree *popLeftIgnore( Program *prg, Tree **sp, Tree *popFrom, Tree **leftIgnore )
+{
+ /* Modifying, make the write safe. */
+ popFrom = splitTree( prg, popFrom );
+
+ Kid *liKid = treeLeftIgnoreKid( prg, popFrom );
+
+ /* If the left ignore has a right ignore, then that was the original
+ * left ignore. */
+ Kid *ri = treeRightIgnoreKid( prg, liKid->tree );
+ if ( ri != 0 ) {
+ treeUpref( ri->tree );
+ remRightIgnore( prg, sp, liKid->tree );
+ *leftIgnore = liKid->tree;
+ treeUpref( *leftIgnore );
+ liKid->tree = ri->tree;
+ }
+ else {
+ *leftIgnore = liKid->tree;
+ treeUpref( *leftIgnore );
+ remLeftIgnore( prg, sp, popFrom );
+ }
+
+ return popFrom;
+}
+
+
+/* Returns an uprefed tree. Saves us having to downref and bindings to zero to
+ * return a zero-ref tree. */
+Tree *constructReplacementTree( Kid *kid, Tree **bindings, Program *prg, long pat )
+{
+ PatConsNode *nodes = prg->rtd->patReplNodes;
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+ Tree *tree = 0;
+
+ if ( nodes[pat].bindId > 0 ) {
+ /* All bindings have been uprefed. */
+ tree = bindings[nodes[pat].bindId];
+
+ long ignore = nodes[pat].leftIgnore;
+ Tree *leftIgnore = 0;
+ if ( ignore >= 0 ) {
+ Kid *ignore = constructLeftIgnoreList( prg, pat );
+
+ leftIgnore = treeAllocate( prg );
+ leftIgnore->id = LEL_ID_IGNORE;
+ leftIgnore->child = ignore;
+
+ tree = pushLeftIgnore( prg, tree, leftIgnore );
+ }
+
+ ignore = nodes[pat].rightIgnore;
+ Tree *rightIgnore = 0;
+ if ( ignore >= 0 ) {
+ Kid *ignore = constructRightIgnoreList( prg, pat );
+
+ rightIgnore = treeAllocate( prg );
+ rightIgnore->id = LEL_ID_IGNORE;
+ rightIgnore->child = ignore;
+
+ tree = pushRightIgnore( prg, tree, rightIgnore );
+ }
+ }
+ else {
+ tree = treeAllocate( prg );
+ tree->id = nodes[pat].id;
+ tree->refs = 1;
+ tree->tokdata = nodes[pat].length == 0 ? 0 :
+ stringAllocPointer( prg,
+ nodes[pat].data, nodes[pat].length );
+ tree->prodNum = nodes[pat].prodNum;
+
+ int objectLength = lelInfo[tree->id].objectLength;
+
+ Kid *attrs = allocAttrs( prg, objectLength );
+ Kid *child = constructReplacementKid( bindings, prg,
+ 0, nodes[pat].child );
+
+ tree->child = kidListConcat( attrs, child );
+
+ /* Right first, then left. */
+ Kid *ignore = constructRightIgnoreList( prg, pat );
+ if ( ignore != 0 ) {
+ Tree *ignoreList = treeAllocate( prg );
+ ignoreList->id = LEL_ID_IGNORE;
+ ignoreList->refs = 1;
+ ignoreList->child = ignore;
+
+ Kid *ignoreHead = kidAllocate( prg );
+ ignoreHead->tree = ignoreList;
+ ignoreHead->next = tree->child;
+ tree->child = ignoreHead;
+
+ tree->flags |= AF_RIGHT_IGNORE;
+ }
+
+ ignore = constructLeftIgnoreList( prg, pat );
+ if ( ignore != 0 ) {
+ Tree *ignoreList = treeAllocate( prg );
+ ignoreList->id = LEL_ID_IGNORE;
+ ignoreList->refs = 1;
+ ignoreList->child = ignore;
+
+ Kid *ignoreHead = kidAllocate( prg );
+ ignoreHead->tree = ignoreList;
+ ignoreHead->next = tree->child;
+ tree->child = ignoreHead;
+
+ tree->flags |= AF_LEFT_IGNORE;
+ }
+
+ int i;
+ for ( i = 0; i < lelInfo[tree->id].numCaptureAttr; i++ ) {
+ long ci = pat+1+i;
+ CaptureAttr *ca = prg->rtd->captureAttr + lelInfo[tree->id].captureAttr + i;
+ Tree *attr = treeAllocate( prg );
+ attr->id = nodes[ci].id;
+ attr->refs = 1;
+ attr->tokdata = nodes[ci].length == 0 ? 0 :
+ stringAllocPointer( prg,
+ nodes[ci].data, nodes[ci].length );
+
+ setAttr( tree, ca->offset, attr );
+ }
+ }
+
+ return tree;
+}
+
+Kid *constructReplacementKid( Tree **bindings, Program *prg, Kid *prev, long pat )
+{
+ PatConsNode *nodes = prg->rtd->patReplNodes;
+ Kid *kid = 0;
+
+ if ( pat != -1 ) {
+ kid = kidAllocate( prg );
+ kid->tree = constructReplacementTree( kid, bindings, prg, pat );
+
+ /* Recurse down next. */
+ Kid *next = constructReplacementKid( bindings, prg,
+ kid, nodes[pat].next );
+
+ kid->next = next;
+ }
+
+ return kid;
+}
+
+Tree *constructToken( Program *prg, Tree **args, long nargs )
+{
+ Int *idInt = (Int*)args[0];
+ Str *textStr = (Str*)args[1];
+
+ long id = idInt->value;
+ Head *tokdata = stringCopy( prg, textStr->value );
+
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+ Tree *tree;
+
+ if ( lelInfo[id].ignore ) {
+ tree = treeAllocate( prg );
+ tree->refs = 1;
+ tree->id = id;
+ tree->tokdata = tokdata;
+ }
+ else {
+ long objectLength = lelInfo[id].objectLength;
+ assert( nargs-2 <= objectLength );
+
+ Kid *attrs = allocAttrs( prg, objectLength );
+
+ tree = treeAllocate( prg );
+ tree->id = id;
+ tree->refs = 1;
+ tree->tokdata = tokdata;
+
+ tree->child = attrs;
+
+ long i;
+ for ( i = 2; i < nargs; i++ ) {
+ setAttr( tree, i-2, args[i] );
+ treeUpref( colm_get_attr( tree, i-2 ) );
+ }
+ }
+ return tree;
+}
+
+Tree *castTree( Program *prg, int langElId, Tree *tree )
+{
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+
+ /* Need to keep a lookout for next down. If
+ * copying it, return the copy. */
+ Tree *newTree = treeAllocate( prg );
+
+ newTree->id = langElId;
+ newTree->tokdata = stringCopy( prg, tree->tokdata );
+
+ /* Invalidate the production number. */
+ newTree->prodNum = -1;
+
+ /* Copy the child list. Start with ignores, then the list. */
+ Kid *child = tree->child, *last = 0;
+
+ /* Flags we are interested in. */
+ newTree->flags |= tree->flags & ( AF_LEFT_IGNORE | AF_RIGHT_IGNORE );
+
+ int ignores = 0;
+ if ( tree->flags & AF_LEFT_IGNORE )
+ ignores += 1;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ ignores += 1;
+
+ /* Igores. */
+ while ( ignores-- > 0 ) {
+ Kid *newKid = kidAllocate( prg );
+
+ newKid->tree = child->tree;
+ newKid->next = 0;
+ newKid->tree->refs += 1;
+
+ /* Store the first child. */
+ if ( last == 0 )
+ newTree->child = newKid;
+ else
+ last->next = newKid;
+
+ child = child->next;
+ last = newKid;
+ }
+
+ /* Skip over the source's attributes. */
+ int objectLength = lelInfo[tree->id].objectLength;
+ while ( objectLength-- > 0 )
+ child = child->next;
+
+ /* Allocate the target type's kids. */
+ objectLength = lelInfo[langElId].objectLength;
+ while ( objectLength-- > 0 ) {
+ Kid *newKid = kidAllocate( prg );
+
+ newKid->tree = 0;
+ newKid->next = 0;
+
+ /* Store the first child. */
+ if ( last == 0 )
+ newTree->child = newKid;
+ else
+ last->next = newKid;
+
+ last = newKid;
+ }
+
+ /* Copy the source's children. */
+ while ( child != 0 ) {
+ Kid *newKid = kidAllocate( prg );
+
+ newKid->tree = child->tree;
+ newKid->next = 0;
+ newKid->tree->refs += 1;
+
+ /* Store the first child. */
+ if ( last == 0 )
+ newTree->child = newKid;
+ else
+ last->next = newKid;
+
+ child = child->next;
+ last = newKid;
+ }
+
+ return newTree;
+}
+
+Tree *makeTree( Program *prg, Tree **args, long nargs )
+{
+ Int *idInt = (Int*)args[0];
+
+ long id = idInt->value;
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+
+ Tree *tree = treeAllocate( prg );
+ tree->id = id;
+ tree->refs = 1;
+
+ long objectLength = lelInfo[id].objectLength;
+ Kid *attrs = allocAttrs( prg, objectLength );
+
+ Kid *last = 0, *child = 0;
+ for ( id = 1; id < nargs; id++ ) {
+ Kid *kid = kidAllocate( prg );
+ kid->tree = args[id];
+ treeUpref( kid->tree );
+
+ if ( last == 0 )
+ child = kid;
+ else
+ last->next = kid;
+
+ last = kid;
+ }
+
+ tree->child = kidListConcat( attrs, child );
+
+ return tree;
+}
+
+int testFalse( Program *prg, Tree *tree )
+{
+ int flse = (
+ tree == 0 ||
+ tree == prg->falseVal ||
+ ( tree->id == LEL_ID_INT && ((Int*)tree)->value == 0 ) );
+ return flse;
+}
+
+Kid *copyIgnoreList( Program *prg, Kid *ignoreHeader )
+{
+ Kid *newHeader = kidAllocate( prg );
+ Kid *last = 0, *ic = (Kid*)ignoreHeader->tree;
+ while ( ic != 0 ) {
+ Kid *newIc = kidAllocate( prg );
+
+ newIc->tree = ic->tree;
+ newIc->tree->refs += 1;
+
+ /* List pointers. */
+ if ( last == 0 )
+ newHeader->tree = (Tree*)newIc;
+ else
+ last->next = newIc;
+
+ ic = ic->next;
+ last = newIc;
+ }
+ return newHeader;
+}
+
+Kid *copyKidList( Program *prg, Kid *kidList )
+{
+ Kid *newList = 0, *last = 0, *ic = kidList;
+
+ while ( ic != 0 ) {
+ Kid *newIc = kidAllocate( prg );
+
+ newIc->tree = ic->tree;
+ treeUpref( newIc->tree );
+
+ /* List pointers. */
+ if ( last == 0 )
+ newList = newIc;
+ else
+ last->next = newIc;
+
+ ic = ic->next;
+ last = newIc;
+ }
+ return newList;
+}
+
+/* New tree has zero ref. */
+Tree *copyRealTree( Program *prg, Tree *tree, Kid *oldNextDown, Kid **newNextDown )
+{
+ /* Need to keep a lookout for next down. If
+ * copying it, return the copy. */
+ Tree *newTree = treeAllocate( prg );
+
+ newTree->id = tree->id;
+ newTree->tokdata = stringCopy( prg, tree->tokdata );
+ newTree->prodNum = tree->prodNum;
+
+ /* Copy the child list. Start with ignores, then the list. */
+ Kid *child = tree->child, *last = 0;
+
+ /* Left ignores. */
+ if ( tree->flags & AF_LEFT_IGNORE ) {
+ newTree->flags |= AF_LEFT_IGNORE;
+// Kid *newHeader = copyIgnoreList( prg, child );
+//
+// /* Always the head. */
+// newTree->child = newHeader;
+//
+// child = child->next;
+// last = newHeader;
+ }
+
+ /* Right ignores. */
+ if ( tree->flags & AF_RIGHT_IGNORE ) {
+ newTree->flags |= AF_RIGHT_IGNORE;
+// Kid *newHeader = copyIgnoreList( prg, child );
+// if ( last == 0 )
+// newTree->child = newHeader;
+// else
+// last->next = newHeader;
+// child = child->next;
+// last = newHeader;
+ }
+
+ /* Attributes and children. */
+ while ( child != 0 ) {
+ Kid *newKid = kidAllocate( prg );
+
+ /* Watch out for next down. */
+ if ( child == oldNextDown )
+ *newNextDown = newKid;
+
+ newKid->tree = child->tree;
+ newKid->next = 0;
+
+ /* May be an attribute. */
+ if ( newKid->tree != 0 )
+ newKid->tree->refs += 1;
+
+ /* Store the first child. */
+ if ( last == 0 )
+ newTree->child = newKid;
+ else
+ last->next = newKid;
+
+ child = child->next;
+ last = newKid;
+ }
+
+ return newTree;
+}
+
+List *copyList( Program *prg, List *list, Kid *oldNextDown, Kid **newNextDown )
+{
+ /* Not a need copy. */
+ List *newList = (List*)mapElAllocate( prg );
+ newList->id = list->genericInfo->langElId;
+ newList->genericInfo = list->genericInfo;
+
+ ListEl *src = list->head;
+ while( src != 0 ) {
+ ListEl *newEl = listElAllocate( prg );
+ newEl->value = src->value;
+ treeUpref( newEl->value );
+
+ listAppend( newList, newEl );
+
+ /* Watch out for next down. */
+ if ( (Kid*)src == oldNextDown )
+ *newNextDown = (Kid*)newEl;
+
+ src = src->next;
+ }
+
+ return newList;
+}
+
+Map *copyMap( Program *prg, Map *map, Kid *oldNextDown, Kid **newNextDown )
+{
+ Map *newMap = (Map*)mapElAllocate( prg );
+ newMap->id = map->genericInfo->langElId;
+ newMap->genericInfo = map->genericInfo;
+ newMap->treeSize = map->treeSize;
+ newMap->root = 0;
+
+ /* If there is a root, copy the tree. */
+ if ( map->root != 0 ) {
+ newMap->root = mapCopyBranch( prg, newMap, map->root,
+ oldNextDown, newNextDown );
+ }
+ MapEl *el;
+ for ( el = newMap->head; el != 0; el = el->next ) {
+ assert( map->genericInfo->typeArg == TYPE_TREE );
+ treeUpref( el->tree );
+ }
+
+ return newMap;
+}
+
+Tree *copyTree( Program *prg, Tree *tree, Kid *oldNextDown, Kid **newNextDown )
+{
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+ long genericId = lelInfo[tree->id].genericId;
+ if ( genericId > 0 ) {
+ GenericInfo *generic = &prg->rtd->genericInfo[genericId];
+ if ( generic->type == GEN_LIST )
+ tree = (Tree*) copyList( prg, (List*) tree, oldNextDown, newNextDown );
+ else if ( generic->type == GEN_MAP )
+ tree = (Tree*) copyMap( prg, (Map*) tree, oldNextDown, newNextDown );
+ else if ( generic->type == GEN_PARSER ) {
+ /* Need to figure out the semantics here. */
+ fatal( "ATTEMPT TO COPY PARSER\n" );
+ assert(false);
+ }
+ }
+ else if ( tree->id == LEL_ID_PTR )
+ assert(false);
+ else if ( tree->id == LEL_ID_BOOL )
+ assert(false);
+ else if ( tree->id == LEL_ID_INT )
+ assert(false);
+ else if ( tree->id == LEL_ID_STR )
+ assert(false);
+ else if ( tree->id == LEL_ID_STREAM )
+ assert(false);
+ else {
+ tree = copyRealTree( prg, tree, oldNextDown, newNextDown );
+ }
+
+ assert( tree->refs == 0 );
+ return tree;
+}
+
+Tree *splitTree( Program *prg, Tree *tree )
+{
+ if ( tree != 0 ) {
+ assert( tree->refs >= 1 );
+
+ if ( tree->refs > 1 ) {
+ Kid *oldNextDown = 0, *newNextDown = 0;
+ Tree *newTree = copyTree( prg, tree, oldNextDown, &newNextDown );
+ treeUpref( newTree );
+
+ /* Downref the original. Don't need to consider freeing because
+ * refs were > 1. */
+ tree->refs -= 1;
+
+ tree = newTree;
+ }
+
+ assert( tree->refs == 1 );
+ }
+ return tree;
+}
+
+Tree *createGeneric( Program *prg, long genericId )
+{
+ GenericInfo *genericInfo = &prg->rtd->genericInfo[genericId];
+ Tree *newGeneric = 0;
+ switch ( genericInfo->type ) {
+ case GEN_MAP: {
+ Map *map = (Map*)mapElAllocate( prg );
+ map->id = genericInfo->langElId;
+ map->genericInfo = genericInfo;
+ newGeneric = (Tree*) map;
+ break;
+ }
+ case GEN_LIST: {
+ List *list = (List*)mapElAllocate( prg );
+ list->id = genericInfo->langElId;
+ list->genericInfo = genericInfo;
+ newGeneric = (Tree*) list;
+ break;
+ }
+ case GEN_PARSER: {
+ Parser *parser = (Parser*)mapElAllocate( prg );
+ parser->id = genericInfo->langElId;
+ parser->genericInfo = genericInfo;
+ parser->pdaRun = malloc( sizeof(PdaRun) );
+
+ /* Start off the parsing process. */
+ initPdaRun( prg, parser->pdaRun, prg->rtd->pdaTables,
+ genericInfo->parserId, false, false, 0 );
+
+ newGeneric = (Tree*) parser;
+ break;
+ }
+ default:
+ assert(false);
+ return 0;
+ }
+
+ return newGeneric;
+}
+
+
+/* We can't make recursive calls here since the tree we are freeing may be
+ * very large. Need the VM stack. */
+void treeFreeRec( Program *prg, Tree **sp, Tree *tree )
+{
+ Tree **top = vm_ptop();
+ LangElInfo *lelInfo;
+ long genericId;
+
+free_tree:
+ lelInfo = prg->rtd->lelInfo;
+ genericId = lelInfo[tree->id].genericId;
+ if ( genericId > 0 ) {
+ GenericInfo *generic = &prg->rtd->genericInfo[genericId];
+ if ( generic->type == GEN_LIST ) {
+ List *list = (List*) tree;
+ ListEl *el = list->head;
+ while ( el != 0 ) {
+ ListEl *next = el->next;
+ vm_push( el->value );
+ listElFree( prg, el );
+ el = next;
+ }
+ mapElFree( prg, (MapEl*)list );
+ }
+ else if ( generic->type == GEN_MAP ) {
+ Map *map = (Map*)tree;
+ MapEl *el = map->head;
+ while ( el != 0 ) {
+ MapEl *next = el->next;
+ vm_push( el->key );
+ vm_push( el->tree );
+ mapElFree( prg, el );
+ el = next;
+ }
+ mapElFree( prg, (MapEl*)map );
+ }
+ else if ( generic->type == GEN_PARSER ) {
+ Parser *parser = (Parser*)tree;
+ clearPdaRun( prg, sp, parser->pdaRun );
+ free( parser->pdaRun );
+ treeDownref( prg, sp, (Tree*)parser->input );
+ mapElFree( prg, (MapEl*)parser );
+ }
+ else {
+ assert(false);
+ }
+ }
+ else {
+ if ( tree->id == LEL_ID_STR ) {
+ Str *str = (Str*) tree;
+ stringFree( prg, str->value );
+ treeFree( prg, tree );
+ }
+ else if ( tree->id == LEL_ID_BOOL || tree->id == LEL_ID_INT )
+ treeFree( prg, tree );
+ else if ( tree->id == LEL_ID_PTR )
+ treeFree( prg, tree );
+ else if ( tree->id == LEL_ID_STREAM ) {
+ Stream *stream = (Stream*)tree;
+ clearSourceStream( prg, sp, stream->in );
+ if ( stream->in->file != 0 )
+ fclose( stream->in->file );
+ else if ( stream->in->fd > 0 )
+ close( stream->in->fd );
+ free( stream->in );
+ streamFree( prg, stream );
+ }
+ else {
+ if ( tree->id != LEL_ID_IGNORE )
+ stringFree( prg, tree->tokdata );
+
+ /* Attributes and grammar-based children. */
+ Kid *child = tree->child;
+ while ( child != 0 ) {
+ Kid *next = child->next;
+ vm_push( child->tree );
+ kidFree( prg, child );
+ child = next;
+ }
+
+ treeFree( prg, tree );
+ }
+ }
+
+ /* Any trees to downref? */
+ while ( sp != top ) {
+ tree = vm_pop();
+ if ( tree != 0 ) {
+ assert( tree->refs > 0 );
+ tree->refs -= 1;
+ if ( tree->refs == 0 )
+ goto free_tree;
+ }
+ }
+}
+
+void treeUpref( Tree *tree )
+{
+ if ( tree != 0 )
+ tree->refs += 1;
+}
+
+void treeDownref( Program *prg, Tree **sp, Tree *tree )
+{
+ if ( tree != 0 ) {
+ assert( tree->refs > 0 );
+ tree->refs -= 1;
+ if ( tree->refs == 0 )
+ treeFreeRec( prg, sp, tree );
+ }
+}
+
+/* Find the first child of a tree. */
+Kid *treeChild( Program *prg, const Tree *tree )
+{
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+ Kid *kid = tree->child;
+
+ if ( tree->flags & AF_LEFT_IGNORE )
+ kid = kid->next;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ kid = kid->next;
+
+ /* Skip over attributes. */
+ long objectLength = lelInfo[tree->id].objectLength;
+ long a;
+ for ( a = 0; a < objectLength; a++ )
+ kid = kid->next;
+
+ return kid;
+}
+
+/* Detach at the first real child of a tree. */
+Kid *treeExtractChild( Program *prg, Tree *tree )
+{
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+ Kid *kid = tree->child, *last = 0;
+
+ if ( tree->flags & AF_LEFT_IGNORE )
+ kid = kid->next;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ kid = kid->next;
+
+ /* Skip over attributes. */
+ long a, objectLength = lelInfo[tree->id].objectLength;
+ for ( a = 0; a < objectLength; a++ ) {
+ last = kid;
+ kid = kid->next;
+ }
+
+ if ( last == 0 )
+ tree->child = 0;
+ else
+ last->next = 0;
+
+ return kid;
+}
+
+
+/* Find the first child of a tree. */
+Kid *treeAttr( Program *prg, const Tree *tree )
+{
+ Kid *kid = tree->child;
+
+ if ( tree->flags & AF_LEFT_IGNORE )
+ kid = kid->next;
+ if ( tree->flags & AF_RIGHT_IGNORE )
+ kid = kid->next;
+
+ return kid;
+}
+
+Tree *treeLeftIgnore( Program *prg, Tree *tree )
+{
+ if ( tree->flags & AF_LEFT_IGNORE )
+ return tree->child->tree;
+ return 0;
+}
+
+Tree *treeRightIgnore( Program *prg, Tree *tree )
+{
+ if ( tree->flags & AF_RIGHT_IGNORE ) {
+ if ( tree->flags & AF_LEFT_IGNORE )
+ return tree->child->next->tree;
+ else
+ return tree->child->tree;
+ }
+ return 0;
+}
+
+Kid *treeLeftIgnoreKid( Program *prg, Tree *tree )
+{
+ if ( tree->flags & AF_LEFT_IGNORE )
+ return tree->child;
+ return 0;
+}
+
+Kid *treeRightIgnoreKid( Program *prg, Tree *tree )
+{
+ if ( tree->flags & AF_RIGHT_IGNORE ) {
+ if ( tree->flags & AF_LEFT_IGNORE )
+ return tree->child->next;
+ else
+ return tree->child;
+ }
+ return 0;
+}
+
+void refSetValue( Program *prg, Tree **sp, Ref *ref, Tree *v )
+{
+ treeDownref( prg, sp, ref->kid->tree );
+ ref->kid->tree = v;
+}
+
+Tree *getRhsEl( Program *prg, Tree *lhs, long position )
+{
+ Kid *pos = treeChild( prg, lhs );
+ while ( position > 0 ) {
+ pos = pos->next;
+ position -= 1;
+ }
+ return pos->tree;
+}
+
+Tree *colm_get_rhs_val( Program *prg, Tree *tree, int *a )
+{
+ int i, len = a[0];
+ for ( i = 0; i < len; i++ ) {
+ int prodNum = a[1 + i * 2];
+ int childNum = a[1 + i * 2 + 1];
+ if ( tree->prodNum == prodNum )
+ return getRhsEl( prg, tree, childNum );
+ }
+ return 0;
+}
+
+void setField( Program *prg, Tree *tree, long field, Tree *value )
+{
+ assert( tree->refs == 1 );
+ if ( value != 0 )
+ assert( value->refs >= 1 );
+ setAttr( tree, field, value );
+}
+
+Tree *getField( Tree *tree, Word field )
+{
+ return colm_get_attr( tree, field );
+}
+
+Kid *getFieldKid( Tree *tree, Word field )
+{
+ return getAttrKid( tree, field );
+}
+
+Tree *getFieldSplit( Program *prg, Tree *tree, Word field )
+{
+ Tree *val = colm_get_attr( tree, field );
+ Tree *split = splitTree( prg, val );
+ setAttr( tree, field, split );
+ return split;
+}
+
+Tree *getPtrVal( Pointer *ptr )
+{
+ return ptr->value->tree;
+}
+
+Tree *getPtrValSplit( Program *prg, Pointer *ptr )
+{
+ Tree *val = ptr->value->tree;
+ Tree *split = splitTree( prg, val );
+ ptr->value->tree = split;
+ return split;
+}
+
+/* This must traverse in the same order that the bindId assignments are done
+ * in. */
+int matchPattern( Tree **bindings, Program *prg, long pat, Kid *kid, int checkNext )
+{
+ PatConsNode *nodes = prg->rtd->patReplNodes;
+
+ /* match node, recurse on children. */
+ if ( pat != -1 && kid != 0 ) {
+ if ( nodes[pat].id == kid->tree->id ) {
+ /* If the pattern node has data, then this means we need to match
+ * the data against the token data. */
+ if ( nodes[pat].data != 0 ) {
+ /* Check the length of token text. */
+ if ( nodes[pat].length != stringLength( kid->tree->tokdata ) )
+ return false;
+
+ /* Check the token text data. */
+ if ( nodes[pat].length > 0 && memcmp( nodes[pat].data,
+ stringData( kid->tree->tokdata ), nodes[pat].length ) != 0 )
+ return false;
+ }
+
+ /* No failure, all okay. */
+ if ( nodes[pat].bindId > 0 ) {
+ bindings[nodes[pat].bindId] = kid->tree;
+ }
+
+ /* If we didn't match a terminal duplicate of a nonterm then check
+ * down the children. */
+ if ( !nodes[pat].stop ) {
+ /* Check for failure down child branch. */
+ int childCheck = matchPattern( bindings, prg,
+ nodes[pat].child, treeChild( prg, kid->tree ), true );
+ if ( ! childCheck )
+ return false;
+ }
+
+ /* If checking next, then look for failure there. */
+ if ( checkNext ) {
+ int nextCheck = matchPattern( bindings, prg,
+ nodes[pat].next, kid->next, true );
+ if ( ! nextCheck )
+ return false;
+ }
+
+ return true;
+ }
+ }
+ else if ( pat == -1 && kid == 0 ) {
+ /* Both null is a match. */
+ return 1;
+ }
+
+ return false;
+}
+
+
+long cmpTree( Program *prg, const Tree *tree1, const Tree *tree2 )
+{
+ long cmpres = 0;
+ if ( tree1 == 0 ) {
+ if ( tree2 == 0 )
+ return 0;
+ else
+ return -1;
+ }
+ else if ( tree2 == 0 )
+ return 1;
+ else if ( tree1->id < tree2->id )
+ return -1;
+ else if ( tree1->id > tree2->id )
+ return 1;
+ else if ( tree1->id == LEL_ID_PTR ) {
+ if ( ((Pointer*)tree1)->value < ((Pointer*)tree2)->value )
+ return -1;
+ else if ( ((Pointer*)tree1)->value > ((Pointer*)tree2)->value )
+ return 1;
+ }
+ else if ( tree1->id == LEL_ID_INT ) {
+ if ( ((Int*)tree1)->value < ((Int*)tree2)->value )
+ return -1;
+ else if ( ((Int*)tree1)->value > ((Int*)tree2)->value )
+ return 1;
+ }
+ else if ( tree1->id == LEL_ID_STR ) {
+ cmpres = cmpString( ((Str*)tree1)->value, ((Str*)tree2)->value );
+ if ( cmpres != 0 )
+ return cmpres;
+ }
+ else {
+ if ( tree1->tokdata == 0 && tree2->tokdata != 0 )
+ return -1;
+ else if ( tree1->tokdata != 0 && tree2->tokdata == 0 )
+ return 1;
+ else if ( tree1->tokdata != 0 && tree2->tokdata != 0 ) {
+ cmpres = cmpString( tree1->tokdata, tree2->tokdata );
+ if ( cmpres != 0 )
+ return cmpres;
+ }
+ }
+
+ Kid *kid1 = treeChild( prg, tree1 );
+ Kid *kid2 = treeChild( prg, tree2 );
+
+ while ( true ) {
+ if ( kid1 == 0 && kid2 == 0 )
+ return 0;
+ else if ( kid1 == 0 && kid2 != 0 )
+ return -1;
+ else if ( kid1 != 0 && kid2 == 0 )
+ return 1;
+ else {
+ cmpres = cmpTree( prg, kid1->tree, kid2->tree );
+ if ( cmpres != 0 )
+ return cmpres;
+ }
+ kid1 = kid1->next;
+ kid2 = kid2->next;
+ }
+}
+
+
+void splitRef( Program *prg, Tree ***psp, Ref *fromRef )
+{
+ /* Go up the chain of kids, turing the pointers down. */
+ Ref *last = 0, *ref = fromRef, *next = 0;
+ while ( ref->next != 0 ) {
+ next = ref->next;
+ ref->next = last;
+ last = ref;
+ ref = next;
+ }
+ ref->next = last;
+
+ /* Now traverse the list, which goes down. */
+ while ( ref != 0 ) {
+ if ( ref->kid->tree->refs > 1 ) {
+ Ref *nextDown = ref->next;
+ while ( nextDown != 0 && nextDown->kid == ref->kid )
+ nextDown = nextDown->next;
+
+ Kid *oldNextKidDown = nextDown != 0 ? nextDown->kid : 0;
+ Kid *newNextKidDown = 0;
+
+ Tree *newTree = copyTree( prg, ref->kid->tree,
+ oldNextKidDown, &newNextKidDown );
+ treeUpref( newTree );
+
+ /* Downref the original. Don't need to consider freeing because
+ * refs were > 1. */
+ ref->kid->tree->refs -= 1;
+
+ while ( ref != 0 && ref != nextDown ) {
+ next = ref->next;
+ ref->next = 0;
+
+ ref->kid->tree = newTree;
+ ref = next;
+ }
+
+ /* Correct kid pointers down from ref. */
+ while ( nextDown != 0 && nextDown->kid == oldNextKidDown ) {
+ nextDown->kid = newNextKidDown;
+ nextDown = nextDown->next;
+ }
+ }
+ else {
+ /* Reset the list as we go down. */
+ next = ref->next;
+ ref->next = 0;
+ ref = next;
+ }
+ }
+}
+
+Tree *setListMem( List *list, Half field, Tree *value )
+{
+ assert( list->refs == 1 );
+ if ( value != 0 )
+ assert( value->refs >= 1 );
+
+ Tree *existing = 0;
+ switch ( field ) {
+ case 0:
+ existing = list->head->value;
+ list->head->value = value;
+ break;
+ case 1:
+ existing = list->tail->value;
+ list->tail->value = value;
+ break;
+ default:
+ assert( false );
+ break;
+ }
+ return existing;
+}
+
+TreePair mapRemove( Program *prg, Map *map, Tree *key )
+{
+ MapEl *mapEl = mapImplFind( prg, map, key );
+ TreePair result = { 0, 0 };
+ if ( mapEl != 0 ) {
+ mapDetach( prg, map, mapEl );
+ result.key = mapEl->key;
+ result.val = mapEl->tree;
+ mapElFree( prg, mapEl );
+ }
+
+ return result;
+}
+
+Tree *mapUnstore( Program *prg, Map *map, Tree *key, Tree *existing )
+{
+ Tree *stored = 0;
+ if ( existing == 0 ) {
+ MapEl *mapEl = mapDetachByKey( prg, map, key );
+ stored = mapEl->tree;
+ mapElFree( prg, mapEl );
+ }
+ else {
+ MapEl *mapEl = mapImplFind( prg, map, key );
+ stored = mapEl->tree;
+ mapEl->tree = existing;
+ }
+ return stored;
+}
+
+Tree *mapFind( Program *prg, Map *map, Tree *key )
+{
+ MapEl *mapEl = mapImplFind( prg, map, key );
+ return mapEl == 0 ? 0 : mapEl->tree;
+}
+
+long mapLength( Map *map )
+{
+ return map->treeSize;
+}
+
+void listAppend2( Program *prg, List *list, Tree *val )
+{
+ assert( list->refs == 1 );
+ if ( val != 0 )
+ assert( val->refs >= 1 );
+ ListEl *listEl = listElAllocate( prg );
+ listEl->value = val;
+ listAppend( list, listEl );
+}
+
+Tree *listRemoveEnd( Program *prg, List *list )
+{
+ Tree *tree = list->tail->value;
+ listElFree( prg, listDetachLast( list ) );
+ return tree;
+}
+
+Tree *getListMem( List *list, Word field )
+{
+ Tree *result = 0;
+ switch ( field ) {
+ case 0:
+ result = list->head->value;
+ break;
+ case 1:
+ result = list->tail->value;
+ break;
+ default:
+ assert( false );
+ break;
+ }
+ return result;
+}
+
+Tree *getParserMem( Parser *parser, Word field )
+{
+ Tree *result = 0;
+ switch ( field ) {
+ case 0:
+ result = parser->result;
+ break;
+ case 1:
+ result = parser->pdaRun->parseErrorText;
+ break;
+ default:
+ assert( false );
+ break;
+ }
+ return result;
+}
+
+Tree *getListMemSplit( Program *prg, List *list, Word field )
+{
+ Tree *sv = 0;
+ switch ( field ) {
+ case 0:
+ sv = splitTree( prg, list->head->value );
+ list->head->value = sv;
+ break;
+ case 1:
+ sv = splitTree( prg, list->tail->value );
+ list->tail->value = sv;
+ break;
+ default:
+ assert( false );
+ break;
+ }
+ return sv;
+}
+
+
+int mapInsert( Program *prg, Map *map, Tree *key, Tree *element )
+{
+ MapEl *mapEl = mapInsertKey( prg, map, key, 0 );
+
+ if ( mapEl != 0 ) {
+ mapEl->tree = element;
+ return true;
+ }
+
+ return false;
+}
+
+void mapUnremove( Program *prg, Map *map, Tree *key, Tree *element )
+{
+ MapEl *mapEl = mapInsertKey( prg, map, key, 0 );
+ assert( mapEl != 0 );
+ mapEl->tree = element;
+}
+
+Tree *mapUninsert( Program *prg, Map *map, Tree *key )
+{
+ MapEl *el = mapDetachByKey( prg, map, key );
+ Tree *val = el->tree;
+ mapElFree( prg, el );
+ return val;
+}
+
+Tree *mapStore( Program *prg, Map *map, Tree *key, Tree *element )
+{
+ Tree *oldTree = 0;
+ MapEl *elInTree = 0;
+ MapEl *mapEl = mapInsertKey( prg, map, key, &elInTree );
+
+ if ( mapEl != 0 )
+ mapEl->tree = element;
+ else {
+ /* Element with key exists. Overwriting the value. */
+ oldTree = elInTree->tree;
+ elInTree->tree = element;
+ }
+
+ return oldTree;
+}
+
+static Tree *treeSearchKid( Program *prg, Kid *kid, long id )
+{
+ /* This node the one? */
+ if ( kid->tree->id == id )
+ return kid->tree;
+
+ Tree *res = 0;
+
+ /* Search children. */
+ Kid *child = treeChild( prg, kid->tree );
+ if ( child != 0 )
+ res = treeSearchKid( prg, child, id );
+
+ /* Search siblings. */
+ if ( res == 0 && kid->next != 0 )
+ res = treeSearchKid( prg, kid->next, id );
+
+ return res;
+}
+
+Tree *treeSearch( Program *prg, Tree *tree, long id )
+{
+ Tree *res = 0;
+ if ( tree->id == id )
+ res = tree;
+ else {
+ Kid *child = treeChild( prg, tree );
+ if ( child != 0 )
+ res = treeSearchKid( prg, child, id );
+ }
+ return res;
+}
+
+static Location *locSearchKid( Program *prg, Kid *kid )
+{
+ /* This node the one? */
+ if ( kid->tree->tokdata != 0 && kid->tree->tokdata->location != 0 )
+ return kid->tree->tokdata->location;
+
+ Location *res = 0;
+
+ /* Search children. */
+ Kid *child = treeChild( prg, kid->tree );
+ if ( child != 0 )
+ res = locSearchKid( prg, child );
+
+ /* Search siblings. */
+ if ( res == 0 && kid->next != 0 )
+ res = locSearchKid( prg, kid->next );
+
+ return res;
+}
+
+Location *locSearch( Program *prg, Tree *tree )
+{
+ Location *res = 0;
+ if ( tree->tokdata != 0 && tree->tokdata->location != 0 )
+ return tree->tokdata->location;
+
+ Kid *child = treeChild( prg, tree );
+ if ( child != 0 )
+ res = locSearchKid( prg, child );
+
+ return res;
+}
+
+struct colm_location *colm_find_location( Program *prg, Tree *tree )
+{
+ return locSearch( prg, tree );
+}
+
+void xmlEscapeData( struct colm_print_args *printArgs, const char *data, long len )
+{
+ int i;
+ for ( i = 0; i < len; i++ ) {
+ if ( data[i] == '<' )
+ printArgs->out( printArgs, "&lt;", 4 );
+ else if ( data[i] == '>' )
+ printArgs->out( printArgs, "&gt;", 4 );
+ else if ( data[i] == '&' )
+ printArgs->out( printArgs, "&amp;", 5 );
+ else if ( (32 <= data[i] && data[i] <= 126) ||
+ data[i] == '\t' || data[i] == '\n' || data[i] == '\r' )
+ {
+ printArgs->out( printArgs, &data[i], 1 );
+ }
+ else {
+ char out[64];
+ sprintf( out, "&#%u;", ((unsigned)data[i]) );
+ printArgs->out( printArgs, out, strlen(out) );
+ }
+ }
+}
+
+void initStrCollect( StrCollect *collect )
+{
+ collect->data = (char*) malloc( BUFFER_INITIAL_SIZE );
+ collect->allocated = BUFFER_INITIAL_SIZE;
+ collect->length = 0;
+}
+
+void strCollectDestroy( StrCollect *collect )
+{
+ free( collect->data );
+}
+
+void strCollectAppend( StrCollect *collect, const char *data, long len )
+{
+ long newLen = collect->length + len;
+ if ( newLen > collect->allocated ) {
+ collect->allocated = newLen * 2;
+ collect->data = (char*) realloc( collect->data, collect->allocated );
+ }
+ memcpy( collect->data + collect->length, data, len );
+ collect->length += len;
+}
+
+void strCollectClear( StrCollect *collect )
+{
+ collect->length = 0;
+}
+
+#define INT_SZ 32
+
+void printStr( struct colm_print_args *printArgs, Head *str )
+{
+ printArgs->out( printArgs, (char*)(str->data), str->length );
+}
+
+void appendCollect( struct colm_print_args *args, const char *data, int length )
+{
+ strCollectAppend( (StrCollect*) args->arg, data, length );
+}
+
+void appendFile( struct colm_print_args *args, const char *data, int length )
+{
+ fwrite( data, 1, length, (FILE*)args->arg );
+}
+
+void appendFd( struct colm_print_args *args, const char *data, int length )
+{
+ int fd = (long)args->arg;
+ int res = write( fd, data, length );
+ if ( res < 0 )
+ message( "write error on fd: %d: %s\n", fd, strerror(errno) );
+}
+
+Tree *treeTrim( struct colm_program *prg, Tree **sp, Tree *tree )
+{
+ debug( prg, REALM_PARSE, "attaching left ignore\n" );
+
+ /* Make the ignore list for the left-ignore. */
+ Tree *leftIgnore = treeAllocate( prg );
+ leftIgnore->id = LEL_ID_IGNORE;
+ leftIgnore->flags |= AF_SUPPRESS_RIGHT;
+
+ tree = pushLeftIgnore( prg, tree, leftIgnore );
+
+ debug( prg, REALM_PARSE, "attaching ignore right\n" );
+
+ /* Copy the ignore list first if we need to attach it as a right
+ * ignore. */
+ Tree *rightIgnore = 0;
+ rightIgnore = treeAllocate( prg );
+ rightIgnore->id = LEL_ID_IGNORE;
+ rightIgnore->flags |= AF_SUPPRESS_LEFT;
+
+ tree = pushRightIgnore( prg, tree, rightIgnore );
+
+ return tree;
+}
+
+enum ReturnType
+{
+ Done = 1,
+ CollectIgnoreLeft,
+ CollectIgnoreRight,
+ RecIgnoreList,
+ ChildPrint
+};
+
+enum VisitType
+{
+ IgnoreWrapper,
+ IgnoreData,
+ Term,
+ NonTerm,
+};
+
+#define TF_TERM_SEEN 0x1
+
+void printKid( Program *prg, Tree **sp, struct colm_print_args *printArgs, Kid *kid )
+{
+ enum ReturnType rt;
+ Kid *parent = 0;
+ Kid *leadingIgnore = 0;
+ enum VisitType visitType;
+ int flags = 0;
+
+ /* Iterate the kids passed in. We are expecting a next, which will allow us
+ * to print the trailing ignore list. */
+ while ( kid != 0 ) {
+ vm_push( (SW) Done );
+ goto rec_call;
+ rec_return_top:
+ kid = kid->next;
+ }
+
+ return;
+
+rec_call:
+ if ( kid->tree == 0 )
+ goto skip_null;
+
+ /* If not currently skipping ignore data, then print it. Ignore data can
+ * be associated with terminals and nonterminals. */
+ if ( kid->tree->flags & AF_LEFT_IGNORE ) {
+ vm_push( (SW)parent );
+ vm_push( (SW)kid );
+ parent = kid;
+ kid = treeLeftIgnoreKid( prg, kid->tree );
+ vm_push( (SW) CollectIgnoreLeft );
+ goto rec_call;
+ rec_return_ign_left:
+ kid = (Kid*)vm_pop();
+ parent = (Kid*)vm_pop();
+ }
+
+ if ( kid->tree->id == LEL_ID_IGNORE )
+ visitType = IgnoreWrapper;
+ else if ( parent != 0 && parent->tree->id == LEL_ID_IGNORE )
+ visitType = IgnoreData;
+ else if ( kid->tree->id < prg->rtd->firstNonTermId )
+ visitType = Term;
+ else
+ visitType = NonTerm;
+
+ debug( prg, REALM_PRINT, "visit type: %d\n", visitType );
+
+ if ( visitType == IgnoreData ) {
+ debug( prg, REALM_PRINT, "putting %p on ignore list\n", kid->tree );
+ Kid *newIgnore = kidAllocate( prg );
+ newIgnore->next = leadingIgnore;
+ leadingIgnore = newIgnore;
+ leadingIgnore->tree = kid->tree;
+ goto skip_node;
+ }
+
+ if ( visitType == IgnoreWrapper ) {
+ Kid *newIgnore = kidAllocate( prg );
+ newIgnore->next = leadingIgnore;
+ leadingIgnore = newIgnore;
+ leadingIgnore->tree = kid->tree;
+ /* Don't skip. */
+ }
+
+ /* print leading ignore? Triggered by terminals. */
+ if ( visitType == Term ) {
+ /* Reverse the leading ignore list. */
+ if ( leadingIgnore != 0 ) {
+ Kid *ignore = 0, *last = 0;
+
+ /* Reverse the list and take the opportunity to implement the
+ * suppress left. */
+ while ( true ) {
+ Kid *next = leadingIgnore->next;
+ leadingIgnore->next = last;
+
+ if ( leadingIgnore->tree->flags & AF_SUPPRESS_LEFT ) {
+ /* We are moving left. Chop off the tail. */
+ debug( prg, REALM_PRINT, "suppressing left\n" );
+ freeKidList( prg, next );
+ break;
+ }
+
+ if ( next == 0 )
+ break;
+
+ last = leadingIgnore;
+ leadingIgnore = next;
+ }
+
+ /* Print the leading ignore list. Also implement the suppress right
+ * in the process. */
+ if ( printArgs->comm && (!printArgs->trim || (flags & TF_TERM_SEEN && kid->tree->id > 0)) ) {
+ ignore = leadingIgnore;
+ while ( ignore != 0 ) {
+ if ( ignore->tree->flags & AF_SUPPRESS_RIGHT )
+ break;
+
+ if ( ignore->tree->id != LEL_ID_IGNORE ) {
+ vm_push( (SW)visitType );
+ vm_push( (SW)leadingIgnore );
+ vm_push( (SW)ignore );
+ vm_push( (SW)parent );
+ vm_push( (SW)kid );
+
+ leadingIgnore = 0;
+ kid = ignore;
+ parent = 0;
+
+ debug( prg, REALM_PRINT, "rec call on %p\n", kid->tree );
+ vm_push( (SW) RecIgnoreList );
+ goto rec_call;
+ rec_return_il:
+
+ kid = (Kid*)vm_pop();
+ parent = (Kid*)vm_pop();
+ ignore = (Kid*)vm_pop();
+ leadingIgnore = (Kid*)vm_pop();
+ visitType = (enum VisitType)vm_pop();
+ }
+
+ ignore = ignore->next;
+ }
+ }
+
+ /* Free the leading ignore list. */
+ freeKidList( prg, leadingIgnore );
+ leadingIgnore = 0;
+ }
+ }
+
+ if ( visitType == Term || visitType == NonTerm ) {
+ /* Open the tree. */
+ printArgs->open_tree( prg, sp, printArgs, parent, kid );
+ }
+
+ if ( visitType == Term )
+ flags |= TF_TERM_SEEN;
+
+ if ( visitType == Term || visitType == IgnoreData ) {
+ /* Print contents. */
+ if ( kid->tree->id < prg->rtd->firstNonTermId ) {
+ debug( prg, REALM_PRINT, "printing terminal %p\n", kid->tree );
+ if ( kid->tree->id != 0 )
+ printArgs->print_term( prg, sp, printArgs, kid );
+ }
+ }
+
+ /* Print children. */
+ Kid *child = printArgs->attr ?
+ treeAttr( prg, kid->tree ) :
+ treeChild( prg, kid->tree );
+
+ if ( child != 0 ) {
+ vm_push( (SW)visitType );
+ vm_push( (SW)parent );
+ vm_push( (SW)kid );
+ parent = kid;
+ kid = child;
+ while ( kid != 0 ) {
+ vm_push( (SW) ChildPrint );
+ goto rec_call;
+ rec_return:
+ kid = kid->next;
+ }
+ kid = (Kid*)vm_pop();
+ parent = (Kid*)vm_pop();
+ visitType = (enum VisitType)vm_pop();
+ }
+
+ if ( visitType == Term || visitType == NonTerm ) {
+ /* close the tree. */
+ printArgs->close_tree( prg, sp, printArgs, parent, kid );
+ }
+
+skip_node:
+
+ /* If not currently skipping ignore data, then print it. Ignore data can
+ * be associated with terminals and nonterminals. */
+ if ( kid->tree->flags & AF_RIGHT_IGNORE ) {
+ debug( prg, REALM_PRINT, "right ignore\n" );
+ vm_push( (SW)parent );
+ vm_push( (SW)kid );
+ parent = kid;
+ kid = treeRightIgnoreKid( prg, kid->tree );
+ vm_push( (SW) CollectIgnoreRight );
+ goto rec_call;
+ rec_return_ign_right:
+ kid = (Kid*)vm_pop();
+ parent = (Kid*)vm_pop();
+ }
+
+/* For skiping over content on null. */
+skip_null:
+
+ rt = (enum ReturnType)vm_pop();
+ switch ( rt ) {
+ case Done:
+ debug( prg, REALM_PRINT, "return: done\n" );
+ goto rec_return_top;
+ break;
+ case CollectIgnoreLeft:
+ debug( prg, REALM_PRINT, "return: ignore left\n" );
+ goto rec_return_ign_left;
+ case CollectIgnoreRight:
+ debug( prg, REALM_PRINT, "return: ignore right\n" );
+ goto rec_return_ign_right;
+ case RecIgnoreList:
+ debug( prg, REALM_PRINT, "return: ignore list\n" );
+ goto rec_return_il;
+ case ChildPrint:
+ debug( prg, REALM_PRINT, "return: child print\n" );
+ goto rec_return;
+ }
+}
+
+void colm_print_tree_args( Program *prg, Tree **sp, struct colm_print_args *printArgs, Tree *tree )
+{
+ if ( tree == 0 )
+ printArgs->out( printArgs, "NIL", 3 );
+ else {
+ /* This term tree allows us to print trailing ignores. */
+ Tree termTree;
+ memset( &termTree, 0, sizeof(termTree) );
+
+ Kid kid, term;
+ term.tree = &termTree;
+ term.next = 0;
+ term.flags = 0;
+
+ kid.tree = tree;
+ kid.next = &term;
+ kid.flags = 0;
+
+ printKid( prg, sp, printArgs, &kid );
+ }
+}
+
+void colm_print_term_tree( Program *prg, Tree **sp, struct colm_print_args *printArgs, Kid *kid )
+{
+ debug( prg, REALM_PRINT, "printing term %p\n", kid->tree );
+
+ if ( kid->tree->id == LEL_ID_INT ) {
+ char buf[INT_SZ];
+ sprintf( buf, "%ld", ((Int*)kid->tree)->value );
+ printArgs->out( printArgs, buf, strlen(buf) );
+ }
+ else if ( kid->tree->id == LEL_ID_BOOL ) {
+ if ( ((Int*)kid->tree)->value )
+ printArgs->out( printArgs, "true", 4 );
+ else
+ printArgs->out( printArgs, "false", 5 );
+ }
+ else if ( kid->tree->id == LEL_ID_PTR ) {
+ char buf[INT_SZ];
+ printArgs->out( printArgs, "#", 1 );
+ sprintf( buf, "%p", (void*) ((Pointer*)kid->tree)->value );
+ printArgs->out( printArgs, buf, strlen(buf) );
+ }
+ else if ( kid->tree->id == LEL_ID_STR ) {
+ printStr( printArgs, ((Str*)kid->tree)->value );
+ }
+ else if ( kid->tree->id == LEL_ID_STREAM ) {
+ char buf[INT_SZ];
+ printArgs->out( printArgs, "#", 1 );
+ sprintf( buf, "%p", (void*) ((Stream*)kid->tree)->in->file );
+ printArgs->out( printArgs, buf, strlen(buf) );
+ }
+ else if ( kid->tree->tokdata != 0 &&
+ stringLength( kid->tree->tokdata ) > 0 )
+ {
+ printArgs->out( printArgs, stringData( kid->tree->tokdata ),
+ stringLength( kid->tree->tokdata ) );
+ }
+}
+
+
+void colm_print_null( Program *prg, Tree **sp, struct colm_print_args *args, Kid *parent, Kid *kid )
+{
+}
+
+void openTreeXml( Program *prg, Tree **sp, struct colm_print_args *args, Kid *parent, Kid *kid )
+{
+ /* Skip the terminal that is for forcing trailing ignores out. */
+ if ( kid->tree->id == 0 )
+ return;
+
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+
+ /* List flattening: skip the repeats and lists that are a continuation of
+ * the list. */
+ if ( parent != 0 && parent->tree->id == kid->tree->id && kid->next == 0 &&
+ ( lelInfo[parent->tree->id].repeat || lelInfo[parent->tree->id].list ) )
+ {
+ return;
+ }
+
+ const char *name = lelInfo[kid->tree->id].xmlTag;
+ args->out( args, "<", 1 );
+ args->out( args, name, strlen( name ) );
+ args->out( args, ">", 1 );
+}
+
+void printTermXml( Program *prg, Tree **sp, struct colm_print_args *printArgs, Kid *kid )
+{
+ //Kid *child;
+
+ /*child = */ treeChild( prg, kid->tree );
+ if ( kid->tree->id == LEL_ID_PTR ) {
+ char ptr[32];
+ sprintf( ptr, "%p\n", (void*)((Pointer*)kid->tree)->value );
+ printArgs->out( printArgs, ptr, strlen(ptr) );
+ }
+ else if ( kid->tree->id == LEL_ID_BOOL ) {
+ if ( ((Int*)kid->tree)->value )
+ printArgs->out( printArgs, "true", 4 );
+ else
+ printArgs->out( printArgs, "false", 5 );
+ }
+ else if ( kid->tree->id == LEL_ID_INT ) {
+ char ptr[32];
+ sprintf( ptr, "%ld", ((Int*)kid->tree)->value );
+ printArgs->out( printArgs, ptr, strlen(ptr) );
+ }
+ else if ( kid->tree->id == LEL_ID_STR ) {
+ Head *head = (Head*) ((Str*)kid->tree)->value;
+
+ xmlEscapeData( printArgs, (char*)(head->data), head->length );
+ }
+ else if ( 0 < kid->tree->id && kid->tree->id < prg->rtd->firstNonTermId &&
+ kid->tree->id != LEL_ID_IGNORE &&
+ kid->tree->tokdata != 0 &&
+ stringLength( kid->tree->tokdata ) > 0 )
+ {
+ xmlEscapeData( printArgs, stringData( kid->tree->tokdata ),
+ stringLength( kid->tree->tokdata ) );
+ }
+}
+
+
+void closeTreeXml( Program *prg, Tree **sp, struct colm_print_args *args, Kid *parent, Kid *kid )
+{
+ /* Skip the terminal that is for forcing trailing ignores out. */
+ if ( kid->tree->id == 0 )
+ return;
+
+ LangElInfo *lelInfo = prg->rtd->lelInfo;
+
+ /* List flattening: skip the repeats and lists that are a continuation of
+ * the list. */
+ if ( parent != 0 && parent->tree->id == kid->tree->id && kid->next == 0 &&
+ ( lelInfo[parent->tree->id].repeat || lelInfo[parent->tree->id].list ) )
+ {
+ return;
+ }
+
+ const char *name = lelInfo[kid->tree->id].xmlTag;
+ args->out( args, "</", 2 );
+ args->out( args, name, strlen( name ) );
+ args->out( args, ">", 1 );
+}
+
+void printTreeCollect( Program *prg, Tree **sp, StrCollect *collect, Tree *tree, int trim )
+{
+ struct colm_print_args printArgs = { collect, true, false, trim, &appendCollect,
+ &colm_print_null, &colm_print_term_tree, &colm_print_null };
+ colm_print_tree_args( prg, sp, &printArgs, tree );
+}
+
+void printTreeFile( Program *prg, Tree **sp, FILE *out, Tree *tree, int trim )
+{
+ struct colm_print_args printArgs = { out, true, false, trim, &appendFile,
+ &colm_print_null, &colm_print_term_tree, &colm_print_null };
+ colm_print_tree_args( prg, sp, &printArgs, tree );
+}
+
+void printTreeFd( Program *prg, Tree **sp, int fd, Tree *tree, int trim )
+{
+ struct colm_print_args printArgs = { (void*)((long)fd), true, false, trim, &appendFd,
+ &colm_print_null, &colm_print_term_tree, &colm_print_null };
+ colm_print_tree_args( prg, sp, &printArgs, tree );
+}
+
+void printXmlStdout( Program *prg, Tree **sp, Tree *tree, int commAttr, int trim )
+{
+ struct colm_print_args printArgs = { stdout, commAttr, commAttr, trim, &appendFile,
+ &openTreeXml, &printTermXml, &closeTreeXml };
+ colm_print_tree_args( prg, sp, &printArgs, tree );
+}
+
+
diff --git a/src/tree.h b/src/tree.h
new file mode 100644
index 0000000..7072326
--- /dev/null
+++ b/src/tree.h
@@ -0,0 +1,361 @@
+/*
+ * Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
+ */
+
+/* This file is part of Colm.
+ *
+ * Colm 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.
+ *
+ * Colm 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 Colm; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __COLM_TREE_H
+#define __COLM_TREE_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#include <colm/colm.h>
+#include <colm/input.h>
+
+typedef unsigned char Code;
+typedef unsigned long Word;
+typedef unsigned long Half;
+struct Bindings;
+struct _FunctionInfo;
+
+typedef struct colm_location
+{
+ const char *name;
+ long line;
+ long column;
+ long byte;
+} Location;
+
+/* Header located just before string data. */
+typedef struct colm_data
+{
+ const char *data;
+ long length;
+ struct colm_location *location;
+} Head;
+
+typedef struct colm_kid
+{
+ /* The tree needs to be first since pointers to kids are used to reference
+ * trees on the stack. A pointer to the word that is a Tree* is cast to
+ * a Kid*. */
+ struct colm_tree *tree;
+ struct colm_kid *next;
+ unsigned char flags;
+} Kid;
+
+typedef struct _Ref
+{
+ Kid *kid;
+ struct _Ref *next;
+} Ref;
+
+typedef struct colm_tree Tree;
+
+typedef struct _TreePair
+{
+ Tree *key;
+ Tree *val;
+} TreePair;
+
+typedef struct _ParseTree
+{
+ short id;
+ unsigned short flags;
+
+ struct _ParseTree *child;
+ struct _ParseTree *next;
+ struct _ParseTree *leftIgnore;
+ struct _ParseTree *rightIgnore;
+ Kid *shadow;
+
+ /* Parsing algorithm. */
+ long state;
+ long region;
+ short causeReduce;
+
+ /* FIXME: unify probably. */
+ char retryLower;
+ char retryUpper;
+} ParseTree;
+
+typedef struct _Int
+{
+ /* Must overlay Tree. */
+ short id;
+ unsigned short flags;
+ long refs;
+ Kid *child;
+
+ long value;
+} Int;
+
+typedef struct _Pointer
+{
+ /* Must overlay Tree. */
+ short id;
+ unsigned short flags;
+ long refs;
+ Kid *child;
+
+ Kid *value;
+} Pointer;
+
+typedef struct _Str
+{
+ /* Must overlay Tree. */
+ short id;
+ unsigned short flags;
+ long refs;
+ Kid *child;
+
+ Head *value;
+} Str;
+
+typedef struct _ListEl
+{
+ /* Must overlay kid. */
+ Tree *value;
+ struct _ListEl *next;
+ struct _ListEl *prev;
+} ListEl;
+
+/*
+ * Maps
+ */
+typedef struct _GenericInfo
+{
+ long type;
+ long typeArg;
+ long keyOffset;
+ long keyType;
+ long langElId;
+ long parserId;
+} GenericInfo;
+
+typedef struct _List
+{
+ /* Must overlay Tree. */
+ short id;
+ unsigned short flags;
+ long refs;
+ ListEl *head;
+
+ ListEl *tail;
+ long listLen;
+ GenericInfo *genericInfo;
+
+} List;
+
+typedef struct _Stream
+{
+ /* Must overlay Tree. */
+ short id;
+ unsigned short flags;
+ long refs;
+ Kid *child;
+
+ StreamImpl *in;
+} Stream;
+
+typedef struct _Parser
+{
+ /* Must overlay Tree. */
+ short id;
+ unsigned short flags;
+ long refs;
+ Kid *child;
+
+ GenericInfo *genericInfo;
+
+ struct _PdaRun *pdaRun;
+ struct _Stream *input;
+ Tree *result;
+} Parser;
+
+enum IterType
+{
+ IT_Tree = 1,
+ IT_RevTree,
+ IT_User
+};
+
+typedef struct _TreeIter
+{
+ enum IterType type;
+ Ref rootRef;
+ Ref ref;
+ long searchId;
+ Tree **stackRoot;
+ long yieldSize;
+ long rootSize;
+} TreeIter;
+
+/* This must overlay tree iter because some of the same bytecodes are used. */
+typedef struct _RevTreeIter
+{
+ enum IterType type;
+ Ref rootRef;
+ Ref ref;
+ long searchId;
+ Tree **stackRoot;
+ long yieldSize;
+ long rootSize;
+
+ /* For detecting a split at the leaf. */
+ Kid *kidAtYield;
+ long children;
+} RevTreeIter;
+
+typedef struct _UserIter
+{
+ enum IterType type;
+ /* The current item. */
+ Ref ref;
+ Tree **stackRoot;
+ long argSize;
+ long yieldSize;
+ long rootSize;
+
+ Code *resume;
+ Tree **frame;
+ long searchId;
+} UserIter;
+
+
+void treeUpref( Tree *tree );
+void treeDownref( struct colm_program *prg, Tree **sp, Tree *tree );
+long cmpTree( struct colm_program *prg, const Tree *tree1, const Tree *tree2 );
+
+Tree *pushRightIgnore( struct colm_program *prg, Tree *pushTo, Tree *rightIgnore );
+Tree *pushLeftIgnore( struct colm_program *prg, Tree *pushTo, Tree *leftIgnore );
+Tree *popRightIgnore( struct colm_program *prg, Tree **sp, Tree *popFrom, Tree **rightIgnore );
+Tree *popLeftIgnore( struct colm_program *prg, Tree **sp, Tree *popFrom, Tree **leftIgnore );
+Tree *treeLeftIgnore( struct colm_program *prg, Tree *tree );
+Tree *treeRightIgnore( struct colm_program *prg, Tree *tree );
+Kid *treeLeftIgnoreKid( struct colm_program *prg, Tree *tree );
+Kid *treeRightIgnoreKid( struct colm_program *prg, Tree *tree );
+Kid *treeChild( struct colm_program *prg, const Tree *tree );
+Kid *treeAttr( struct colm_program *prg, const Tree *tree );
+Kid *kidListConcat( Kid *list1, Kid *list2 );
+Kid *treeExtractChild( struct colm_program *prg, Tree *tree );
+Kid *reverseKidList( Kid *kid );
+
+Tree *constructInteger( struct colm_program *prg, long i );
+Tree *constructPointer( struct colm_program *prg, Tree *tree );
+Tree *constructTerm( struct colm_program *prg, Word id, Head *tokdata );
+Tree *constructReplacementTree( Kid *kid, Tree **bindings, struct colm_program *prg, long pat );
+Tree *createGeneric( struct colm_program *prg, long genericId );
+Tree *constructToken( struct colm_program *prg, Tree **args, long nargs );
+Tree *constructStream( struct colm_program *prg );
+
+
+int testFalse( struct colm_program *prg, Tree *tree );
+Tree *makeTree( struct colm_program *prg, Tree **args, long nargs );
+Stream *openFile( struct colm_program *prg, Tree *name, Tree *mode );
+Stream *openStreamFd( struct colm_program *prg, char *name, long fd );
+Kid *copyIgnoreList( struct colm_program *prg, Kid *ignoreHeader );
+Kid *copyKidList( struct colm_program *prg, Kid *kidList );
+void streamFree( struct colm_program *prg, Stream *s );
+Tree *copyTree( struct colm_program *prg, Tree *tree, Kid *oldNextDown, Kid **newNextDown );
+
+Tree *getPtrVal( Pointer *ptr );
+Tree *getPtrValSplit( struct colm_program *prg, Pointer *ptr );
+Tree *getField( Tree *tree, Word field );
+Tree *getFieldSplit( struct colm_program *prg, Tree *tree, Word field );
+Tree *getRhsEl( struct colm_program *prg, Tree *lhs, long position );
+void setField( struct colm_program *prg, Tree *tree, long field, Tree *value );
+
+void setTriterCur( struct colm_program *prg, TreeIter *iter, Tree *tree );
+void setUiterCur( struct colm_program *prg, UserIter *uiter, Tree *tree );
+void refSetValue( struct colm_program *prg, Tree **sp, Ref *ref, Tree *v );
+Tree *treeSearch( struct colm_program *prg, Tree *tree, long id );
+Location *locSearch( struct colm_program *prg, Tree *tree );
+
+int matchPattern( Tree **bindings, struct colm_program *prg, long pat, Kid *kid, int checkNext );
+Tree *treeIterDerefCur( TreeIter *iter );
+
+/* For making references of attributes. */
+Kid *getFieldKid( Tree *tree, Word field );
+
+Tree *copyRealTree( struct colm_program *prg, Tree *tree, Kid *oldNextDown, Kid **newNextDown );
+void splitIterCur( struct colm_program *prg, Tree ***psp, TreeIter *iter );
+Tree *setListMem( List *list, Half field, Tree *value );
+
+void listAppend2( struct colm_program *prg, List *list, Tree *val );
+Tree *listRemoveEnd( struct colm_program *prg, List *list );
+Tree *getListMem( List *list, Word field );
+Tree *getListMemSplit( struct colm_program *prg, List *list, Word field );
+Tree *getParserMem( Parser *parser, Word field );
+
+Tree *treeIterAdvance( struct colm_program *prg, Tree ***psp, TreeIter *iter );
+Tree *treeIterNextChild( struct colm_program *prg, Tree ***psp, TreeIter *iter );
+Tree *treeRevIterPrevChild( struct colm_program *prg, Tree ***psp, RevTreeIter *iter );
+Tree *treeIterNextRepeat( struct colm_program *prg, Tree ***psp, TreeIter *iter );
+Tree *treeIterPrevRepeat( struct colm_program *prg, Tree ***psp, TreeIter *iter );
+
+/* An automatically grown buffer for collecting tokens. Always reuses space;
+ * never down resizes. */
+typedef struct _StrCollect
+{
+ char *data;
+ int allocated;
+ int length;
+} StrCollect;
+
+void initStrCollect( StrCollect *collect );
+void strCollectDestroy( StrCollect *collect );
+void strCollectAppend( StrCollect *collect, const char *data, long len );
+void strCollectClear( StrCollect *collect );
+Tree *treeTrim( struct colm_program *prg, Tree **sp, Tree *tree );
+
+void printTreeCollect( struct colm_program *prg, Tree **sp, StrCollect *collect, Tree *tree, int trim );
+void printTreeFile( struct colm_program *prg, Tree **sp, FILE *out, Tree *tree, int trim );
+void printTreeFd( struct colm_program *prg, Tree **sp, int fd, Tree *tree, int trim );
+void printXmlStdout( struct colm_program *prg, Tree **sp, Tree *tree, int commAttr, int trim );
+
+/*
+ * Iterators.
+ */
+
+UserIter *uiterCreate( struct colm_program *prg, Tree ***psp, struct _FunctionInfo *fi, long searchId );
+void uiterInit( struct colm_program *prg, Tree **sp, UserIter *uiter,
+ struct _FunctionInfo *fi, int revertOn );
+
+void initTreeIter( TreeIter *treeIter, Tree **stackRoot, long rootSize,
+ const Ref *rootRef, int searchId );
+void initRevTreeIter( RevTreeIter *revTriter, Tree **stackRoot, long rootSize,
+ const Ref *rootRef, int searchId, int children );
+void initUserIter( UserIter *userIter, Tree **stackRoot, long rootSize,
+ long argSize, long searchId );
+
+void treeIterDestroy( struct colm_program *prg, Tree ***psp, TreeIter *iter );
+void revTreeIterDestroy( struct colm_program *prg, Tree ***psp, RevTreeIter *iter );
+void userIterDestroy( struct colm_program *prg, Tree ***psp, UserIter *uiter );
+void userIterDestroy2( struct colm_program *prg, Tree ***psp, UserIter *uiter );
+
+Tree *castTree( struct colm_program *prg, int langElId, Tree *tree );
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
+
diff --git a/src/version.h b/src/version.h
new file mode 100644
index 0000000..2dd8c01
--- /dev/null
+++ b/src/version.h
@@ -0,0 +1,2 @@
+#define VERSION "0.12.0"
+#define PUBDATE "Jan 2014"
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..a217e83
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,121 @@
+TESTS = runtests.sh
+
+EXTRA_DIST = \
+ runtests.sh \
+ accum1.lm \
+ accum2.lm \
+ accum3.lm \
+ accumbt1.lm \
+ accumbt2.lm \
+ accumbt3.lm \
+ argv1.lm \
+ argv2.lm \
+ backtrack1.lm \
+ backtrack2.lm \
+ backtrack3.lm \
+ binary1.lm \
+ binary1.in \
+ btscan1.lm \
+ btscan2.lm \
+ call1.lm \
+ commitbt.lm \
+ concat1.lm \
+ concat2.lm \
+ construct1.lm \
+ construct2.lm \
+ construct3.lm \
+ constructex.lm \
+ context1.lm \
+ context2.lm \
+ context3.lm \
+ counting1.lm \
+ counting2.lm \
+ counting3.lm \
+ counting4.lm \
+ decl1.lm \
+ decl2.lm \
+ decl3.lm \
+ div.lm \
+ exit1.lm \
+ exit2.lm \
+ exit3.lm \
+ export1.lm \
+ factor1.lm \
+ factor2.lm \
+ factor3.lm \
+ factor4.lm \
+ factor5.lm \
+ factor6.lm \
+ forloop1.lm \
+ forloop2.lm \
+ forloop3.lm \
+ func1.lm \
+ func2.lm \
+ func3.lm \
+ generate1.lm \
+ generate2.lm \
+ heredoc.lm \
+ ifblock1.lm \
+ ignore1.lm \
+ ignore2.lm \
+ ignore3.lm \
+ ignore4.lm \
+ ignore5.lm \
+ include1.lm \
+ include1a.lmi \
+ inpush1.lm \
+ inpush1a.in \
+ inpush1b.in \
+ inpush1c.in \
+ island.lm \
+ lhs1.lm \
+ liftattrs.lm \
+ literal1.lm \
+ lookup1.lm \
+ mailbox.lm \
+ matchex.lm \
+ maxlen.lm \
+ multiregion1.lm \
+ multiregion2.lm \
+ mutualrec.lm \
+ namespace1.lm \
+ nestedcomm.lm \
+ order1.lm \
+ order2.lm \
+ parse1.lm \
+ prints.lm \
+ pull1.lm \
+ pull2.lm \
+ ragelambig1.lm \
+ ragelambig2.lm \
+ ragelambig3.lm \
+ ragelambig4.lm \
+ rediv.lm \
+ reor1.lm \
+ reor2.lm \
+ reparse.lm \
+ repeat1.lm \
+ repeat2.lm \
+ rhsref1.lm \
+ rubyhere.lm \
+ scope1.lm \
+ sprintf.lm \
+ string.lm \
+ superid.lm \
+ tags1.lm \
+ tags2.lm \
+ tags3.lm \
+ tags4.lm \
+ tcontext1.lm \
+ til.lm \
+ translate1.lm \
+ translate2.lm \
+ travs1.lm \
+ treecmp1.lm \
+ typeref1.lm \
+ typeref2.lm \
+ typeref3.lm \
+ undofrag1.lm \
+ undofrag2.lm \
+ undofrag3.lm \
+ while1.lm
diff --git a/test/Makefile.in b/test/Makefile.in
new file mode 100644
index 0000000..f8e9651
--- /dev/null
+++ b/test/Makefile.in
@@ -0,0 +1,579 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h \
+ $(top_builddir)/src/defs.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PUBDATE = @PUBDATE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+TESTS = runtests.sh
+EXTRA_DIST = \
+ runtests.sh \
+ accum1.lm \
+ accum2.lm \
+ accum3.lm \
+ accumbt1.lm \
+ accumbt2.lm \
+ accumbt3.lm \
+ argv1.lm \
+ argv2.lm \
+ backtrack1.lm \
+ backtrack2.lm \
+ backtrack3.lm \
+ binary1.lm \
+ binary1.in \
+ btscan1.lm \
+ btscan2.lm \
+ call1.lm \
+ commitbt.lm \
+ concat1.lm \
+ concat2.lm \
+ construct1.lm \
+ construct2.lm \
+ construct3.lm \
+ constructex.lm \
+ context1.lm \
+ context2.lm \
+ context3.lm \
+ counting1.lm \
+ counting2.lm \
+ counting3.lm \
+ counting4.lm \
+ decl1.lm \
+ decl2.lm \
+ decl3.lm \
+ div.lm \
+ exit1.lm \
+ exit2.lm \
+ exit3.lm \
+ export1.lm \
+ factor1.lm \
+ factor2.lm \
+ factor3.lm \
+ factor4.lm \
+ factor5.lm \
+ factor6.lm \
+ forloop1.lm \
+ forloop2.lm \
+ forloop3.lm \
+ func1.lm \
+ func2.lm \
+ func3.lm \
+ generate1.lm \
+ generate2.lm \
+ heredoc.lm \
+ ifblock1.lm \
+ ignore1.lm \
+ ignore2.lm \
+ ignore3.lm \
+ ignore4.lm \
+ ignore5.lm \
+ include1.lm \
+ include1a.lmi \
+ inpush1.lm \
+ inpush1a.in \
+ inpush1b.in \
+ inpush1c.in \
+ island.lm \
+ lhs1.lm \
+ liftattrs.lm \
+ literal1.lm \
+ lookup1.lm \
+ mailbox.lm \
+ matchex.lm \
+ maxlen.lm \
+ multiregion1.lm \
+ multiregion2.lm \
+ mutualrec.lm \
+ namespace1.lm \
+ nestedcomm.lm \
+ order1.lm \
+ order2.lm \
+ parse1.lm \
+ prints.lm \
+ pull1.lm \
+ pull2.lm \
+ ragelambig1.lm \
+ ragelambig2.lm \
+ ragelambig3.lm \
+ ragelambig4.lm \
+ rediv.lm \
+ reor1.lm \
+ reor2.lm \
+ reparse.lm \
+ repeat1.lm \
+ repeat2.lm \
+ rhsref1.lm \
+ rubyhere.lm \
+ scope1.lm \
+ sprintf.lm \
+ string.lm \
+ superid.lm \
+ tags1.lm \
+ tags2.lm \
+ tags3.lm \
+ tags4.lm \
+ tcontext1.lm \
+ til.lm \
+ translate1.lm \
+ translate2.lm \
+ travs1.lm \
+ treecmp1.lm \
+ typeref1.lm \
+ typeref2.lm \
+ typeref3.lm \
+ undofrag1.lm \
+ undofrag2.lm \
+ undofrag3.lm \
+ while1.lm
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ fi; \
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am check check-TESTS check-am clean clean-generic \
+ clean-libtool distclean distclean-generic distclean-libtool \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/accum1.lm b/test/accum1.lm
new file mode 100644
index 0000000..f4aa963
--- /dev/null
+++ b/test/accum1.lm
@@ -0,0 +1,36 @@
+##### LM #####
+lex
+ ignore /space+/
+ literal `* `( `)
+ token id /[a-zA-Z_]+/
+end
+
+def item
+ [id]
+| [`( item* `)]
+
+def start
+ [item*]
+
+parse Input: start[ stdin ]
+
+cons Output: accum<start> []
+
+for Id: id in Input {
+ send Output
+ "( [^Id] )
+}
+
+S: start = Output()
+
+print( S )
+##### IN #####
+a b c ( chocolate fudge ) d e
+##### EXP #####
+( a )
+( b )
+( c )
+( chocolate )
+( fudge )
+( d )
+( e )
diff --git a/test/accum2.lm b/test/accum2.lm
new file mode 100644
index 0000000..05e377b
--- /dev/null
+++ b/test/accum2.lm
@@ -0,0 +1,38 @@
+##### LM #####
+context ctx
+
+i: int
+j: int
+k: int
+
+lex
+ ignore /space+/
+ literal `* `( `)
+ token id /[a-zA-Z_]+/
+end
+
+def foo [id]
+
+def item
+ [id]
+| [foo]
+| [`( item* `)]
+ {
+ i = 0
+ }
+
+def start
+ [item*]
+
+end # ctx
+
+
+cons SP: parser<ctx::start> []
+SP.ctx = cons ctx []
+send SP [stdin]
+Input: ctx::start = SP()
+print( Input )
+##### IN #####
+a b c ( d e f )
+##### EXP #####
+a b c ( d e f )
diff --git a/test/accum3.lm b/test/accum3.lm
new file mode 100644
index 0000000..956bb3f
--- /dev/null
+++ b/test/accum3.lm
@@ -0,0 +1,36 @@
+##### LM #####
+lex
+ literal `-
+ token file /^('-'|0)(^0)*/
+end
+
+token word /(^0)+/
+token zero /0/
+
+lex
+ token single /[qvh]/
+ token with_opt /[oi]/
+end
+
+def item
+ [file zero]
+| [`- single* zero]
+| [`- with_opt zero? word zero]
+
+def args
+ [word zero item*]
+
+cons ArgParser: parser<args> []
+
+ArgV: list<str> ArgV = argv
+for A: str in ArgV
+ send ArgParser [A '\0']
+
+Args: args = ArgParser()
+
+print_xml( Args )
+print( '\n' )
+##### ARGS #####
+-qv -h -o output sdf -i eth0 file
+##### EXP #####
+<args><word>./working/accum3</word><zero>&#0;</zero><_repeat_item><item><_literal_0001>-</_literal_0001><_repeat_single><single>q</single><single>v</single></_repeat_single><zero>&#0;</zero></item><item><_literal_0001>-</_literal_0001><_repeat_single><single>h</single></_repeat_single><zero>&#0;</zero></item><item><_literal_0001>-</_literal_0001><with_opt>o</with_opt><_opt_zero><zero>&#0;</zero></_opt_zero><word>output</word><zero>&#0;</zero></item><item><file>sdf</file><zero>&#0;</zero></item><item><_literal_0001>-</_literal_0001><with_opt>i</with_opt><_opt_zero><zero>&#0;</zero></_opt_zero><word>eth0</word><zero>&#0;</zero></item><item><file>file</file><zero>&#0;</zero></item></_repeat_item></args>
diff --git a/test/accumbt1.lm b/test/accumbt1.lm
new file mode 100644
index 0000000..77d56f5
--- /dev/null
+++ b/test/accumbt1.lm
@@ -0,0 +1,41 @@
+##### LM #####
+
+# Token names.
+lex
+ token number /[0-9]+/
+ token id /[a-z]+/
+ token string /'"' [^"]* '"'/
+ ignore ws / [ \t\n]+ /
+end
+
+def prefix [id]
+
+def choice1
+ [number number]
+| [number]
+
+def choice2
+ [string id]
+| [number number]
+| [id number]
+| [number]
+
+def start
+ [prefix choice1 choice2 string id id]
+
+cons I: parser<start> []
+
+send I " id "
+send I " 77 "
+send I " 88 "
+send I " \"hello\" "
+send I " dude "
+send I " dude\n"
+
+S: start = I()
+S = match S
+ ~id 77 88 "hello" dude dude
+print_xml( S )
+print( '\n' )
+##### EXP #####
+<start><prefix><id>id</id></prefix><choice1><number>77</number></choice1><choice2><number>88</number></choice2><string>"hello"</string><id>dude</id><id>dude</id></start>
diff --git a/test/accumbt2.lm b/test/accumbt2.lm
new file mode 100644
index 0000000..6d21c30
--- /dev/null
+++ b/test/accumbt2.lm
@@ -0,0 +1,54 @@
+##### LM #####
+context accum_bt
+
+lex
+ ignore /[ \t\n]+/
+ token id1 /[a-zA-Z_][a-zA-Z_0-9]*/
+
+ def one [ id1* ]
+end
+
+OneParser: accum<one>
+
+lex
+ ignore /[ \t]+/
+ token id2 /[a-zA-Z_][a-zA-Z_0-9]*/
+ literal `! `;
+ token NL /'\n'/
+
+ def A1 []
+ { print( "A1\n" ) }
+
+ def A2 []
+ { print( "A2\n" ) }
+
+ def item2
+ [id2]
+ {
+ send OneParser [' extra ']
+ send OneParser [$r1]
+ }
+
+ def two
+ [A1 item2* `! NL]
+ | [A2 item2* `; NL]
+end
+
+end # accum_bt
+
+AccumBt: accum_bt = cons accum_bt[]
+AccumBt.OneParser = cons parser<accum_bt::one>[]
+
+parse Two: accum_bt::two(AccumBt)[ stdin ]
+
+send AccumBt.OneParser ['\n'] eos
+
+print( ^Two )
+print( ^( AccumBt.OneParser.tree ) '\n' )
+##### IN #####
+a b c d e ;
+##### EXP #####
+A1
+A2
+a b c d e ;
+extra a extra b extra c extra d extra e
diff --git a/test/accumbt3.lm b/test/accumbt3.lm
new file mode 100644
index 0000000..3753282
--- /dev/null
+++ b/test/accumbt3.lm
@@ -0,0 +1,106 @@
+##### LM #####
+#
+# Tokens
+#
+
+
+# Any single character can be a literal
+lex
+ # Ignore whitespace.
+ ignore /[ \t\n\r\v]+/
+
+ # Open and close id
+ token id /[a-zA-Z_][a-zA-Z0-9_]*/
+
+ token open_paren /'('/
+ {
+ parse_stop NC: nested_comment[ input ]
+ print( 'discarding: ' NC '\n' )
+ }
+end
+
+#
+# Token translation
+#
+
+lex
+ literal `( `)
+ token nc_data /[^()]+/
+end
+
+def nc_item
+ [nc_data]
+| [nested_comment]
+
+def nested_comment
+ [`( nc_item* `)]
+
+def nested [id*]
+
+#
+# Accumulator.
+#
+context accum_bt
+
+NestedParser: accum<nested>
+
+lex
+ ignore /[ \t]+/
+ token word /[a-zA-Z0-9/*+_\-]+/
+ token stuff /[a-zA-Z0-9()/*+_\- ]+/
+ literal `! `;
+ token NL /'\n'/
+
+end
+
+def A1 []
+ { print( "A1\n" ) }
+
+def A2 []
+ { print( "A2\n" ) }
+
+def item
+ [word]
+ {
+ send NestedParser [' ']
+ send NestedParser [$r1]
+ send NestedParser [' ']
+ }
+|
+ [stuff]
+ {
+ send NestedParser [' ']
+ send NestedParser [$r1]
+ send NestedParser [' ']
+ }
+
+def two
+ [A1 item* `! NL]
+| [A2 item* `; NL]
+
+end # accum_bt
+
+cons AccumBt: accum_bt[]
+AccumBt.NestedParser = cons parser<nested>[]
+
+parse Two: accum_bt::two(AccumBt)[ stdin ]
+
+send AccumBt.NestedParser [] eos
+Nested: nested = AccumBt.NestedParser.tree
+
+print( '\n------------\n' )
+print( ^Nested '\n' )
+print( ^Two '\n' )
+
+##### IN #####
+hello there ( (this is a nested comment /*sdf asd_++_stuff) ) and this is not ;
+##### EXP #####
+A1
+discarding: ( (this is a nested comment /*sdf asd_++_stuff) )
+A2
+discarding: ( (this is a nested comment /*sdf asd_++_stuff) )
+
+------------
+hello there and this is not
+hello there ( (this is a nested comment /*sdf asd_++_stuff) ) and this is not ;
+
diff --git a/test/argv1.lm b/test/argv1.lm
new file mode 100644
index 0000000..74086e7
--- /dev/null
+++ b/test/argv1.lm
@@ -0,0 +1,8 @@
+##### LM #####
+
+print_xml( argv )
+print( '\n' )
+##### ARGS #####
+a b c 1 2 3
+##### EXP #####
+<__list0><str>./working/argv1</str><str>a</str><str>b</str><str>c</str><str>1</str><str>2</str><str>3</str></__list0>
diff --git a/test/argv2.lm b/test/argv2.lm
new file mode 100644
index 0000000..5c84564
--- /dev/null
+++ b/test/argv2.lm
@@ -0,0 +1,91 @@
+##### LM #####
+lex
+ literal `-
+ token file /^('-'|0)(^0)*/
+end
+
+lex
+ token single /[qvh]/
+ token with_opt /[oi]/
+ token dash /'-'/
+
+ literal `help `verbose `input `=
+end
+
+def long
+ [`help]
+| [`verbose]
+
+def long_with_opt
+ [`input]
+
+def long_eqals
+ [`=]
+| [zero]
+
+token word /(^0)+/
+token zero /0/
+
+def item
+ [`- single* zero]
+| [`- with_opt zero? word zero]
+| [`- dash long zero]
+| [`- dash long_with_opt long_eqals word zero]
+| [file zero]
+
+def args
+ [word zero item*]
+
+# The argument parser. Using an accumulator so we can send nulls after each
+# arg.
+cons ArgParser: parser<args>[]
+
+# Parse the args and extract the result into Args.
+ArgV: list<str> = argv
+for A: str in ArgV
+ send ArgParser [A '\0']
+Args: args = ArgParser()
+
+# Process the args.
+for Item: item in Args {
+ if match Item
+ [`- SL: single* zero]
+ {
+ for S: single in SL
+ print( "single: [$S]\n" )
+ }
+ elsif match Item
+ [`- W: with_opt zero? Opt: word zero]
+ {
+ print( "with opt: [$W] -> [$Opt]\n" )
+ }
+ elsif match Item
+ [`- dash L: long zero]
+ {
+ print("long: [$L]\n" )
+ }
+ elsif match Item
+ [`- dash LO: long_with_opt long_eqals LongOpt: word zero]
+ {
+ print("long: [$LO] -> [$LongOpt]\n" )
+ }
+ elsif match Item
+ [F: file zero]
+ {
+ print("file: [$F]\n" )
+ }
+}
+
+##### ARGS #####
+-qv -h -o output -iinput file --input=foo --input bar --help --verbose
+##### EXP #####
+single: q
+single: v
+single: h
+with opt: o -> output
+with opt: i -> input
+file: file
+long: input -> foo
+long: input -> bar
+long: help
+long: verbose
diff --git a/test/backtrack1.lm b/test/backtrack1.lm
new file mode 100644
index 0000000..76f3705
--- /dev/null
+++ b/test/backtrack1.lm
@@ -0,0 +1,29 @@
+##### LM #####
+# Token names.
+
+lex
+ literal `+ `*
+ token number /[0-9]+/
+ ignore ws / [ \t\n]+ /
+end
+
+def F
+ [number `+]
+| [number]
+| [F `* number]
+
+def E
+ [E `+ F]
+| [F]
+
+def start
+ [E]
+
+parse S: start[ stdin ]
+R: start = match S ~ 9 + 9
+print_xml( R )
+print( '\n' )
+##### IN #####
+9 + 9
+##### EXP #####
+<start><E><E><F><number>9</number></F></E><_literal_0001>+</_literal_0001><F><number>9</number></F></E></start>
diff --git a/test/backtrack2.lm b/test/backtrack2.lm
new file mode 100644
index 0000000..fa3cdfc
--- /dev/null
+++ b/test/backtrack2.lm
@@ -0,0 +1,29 @@
+##### LM #####
+
+# Token names.
+lex
+ token id /[a-z]+/
+ ignore ws /[ \t\n]+/
+end
+
+token bang1 /'!'/
+token bang2 /'!'/
+
+def one [bang1 id id id]
+
+def two [bang2 id id id id]
+
+def prods
+ [one]
+| [two]
+
+def start
+ [prods]
+
+parse S: start[ stdin ]
+print_xml( match S "!aa bb cc dd" )
+print( '\n' )
+##### IN #####
+!aa bb cc dd
+##### EXP #####
+<start><prods><two><bang2>!</bang2><id>aa</id><id>bb</id><id>cc</id><id>dd</id></two></prods></start>
diff --git a/test/backtrack3.lm b/test/backtrack3.lm
new file mode 100644
index 0000000..8c6dfc3
--- /dev/null
+++ b/test/backtrack3.lm
@@ -0,0 +1,34 @@
+##### LM #####
+
+# Token names.
+lex
+ token number /[0-9]+/
+ token id /[a-z]+/
+ token string /'"' [^"]* '"'/
+ ignore ws / [ \t\n]+ /
+end
+
+def prefix [id]
+
+def choice1
+ [number number]
+| [number]
+
+def choice2
+ [string id]
+| [number number]
+| [id number]
+| [number]
+
+def start
+ [prefix choice1 choice2 string id id]
+ {
+ print_xml( match lhs "id 77 88 \"hello\" dude dude\n" )
+ }
+
+parse start[stdin]
+print( '\n' )
+##### IN #####
+id 77 88 "hello" dude dude
+##### EXP #####
+<start><prefix><id>id</id></prefix><choice1><number>77</number></choice1><choice2><number>88</number></choice2><string>"hello"</string><id>dude</id><id>dude</id></start>
diff --git a/test/binary1.in b/test/binary1.in
new file mode 100644
index 0000000..8da7d3d
--- /dev/null
+++ b/test/binary1.in
Binary files differ
diff --git a/test/binary1.lm b/test/binary1.lm
new file mode 100644
index 0000000..7fc8337
--- /dev/null
+++ b/test/binary1.lm
@@ -0,0 +1,1902 @@
+##### LM #####
+
+context binary
+
+# Used for most of the grammar.
+token octet /any/
+
+# Filled in during the parsing of resource records. Determine what RR_UNKNOWN
+# translates to.
+rr_type_value: int
+rr_class_value: int
+
+# Tokens generated from RR_UNKNOWN. Used to pick the kind
+# of resource record to attempt to parse.
+token RR_A // # 1 a host address
+token RR_NS // # 2 an authoritative name server
+token RR_MD // # 3 a mail destination (Obsolete - use MX)
+token RR_MF // # 4 a mail forwarder (Obsolete - use MX)
+token RR_CNAME // # 5 the canonical name for an alias
+token RR_SOA // # 6 marks the start of a zone of authority
+token RR_MB // # 7 a mailbox domain name (EXPERIMENTAL)
+token RR_MG // # 8 a mail group member (EXPERIMENTAL)
+token RR_MR // # 9 a mail rename domain name (EXPERIMENTAL)
+token RR_NULL // # 10 a null RR (EXPERIMENTAL)
+token RR_WKS // # 11 a well known service description
+token RR_PTR // # 12 a domain name pointer
+token RR_HINFO // # 13 host information
+token RR_MINFO // # 14 mailbox or mail list information
+token RR_MX // # 15 mail exchange
+token RR_TXT // # 16 text strings
+
+token RR_UNKNOWN
+ /''/
+ {
+ id: int = typeid<RR_UNKNOWN>
+ if rr_type_value == 1
+ id = typeid<RR_A>
+ elsif rr_type_value == 2
+ id = typeid<RR_NS>
+ elsif rr_type_value == 5
+ id = typeid<RR_CNAME>
+ elsif rr_type_value == 12
+ id = typeid<RR_PTR>
+ elsif rr_type_value == 15
+ id = typeid<RR_MX>
+ elsif rr_type_value == 16
+ id = typeid<RR_TXT>
+
+ input.push( make_token( id '' ) )
+ }
+
+# Convert two octets in network order into an unsigned 16 bit value.
+int network_uord16( o1: octet o2: octet )
+{
+ return o1.data.uord8() * 256 + o2.data.uord8()
+}
+
+
+def message
+ [header questions answers authorities additionals]
+
+question_count: int
+answer_count: int
+authority_count: int
+additional_count: int
+
+# Message Header
+#
+# 1 1 1 1 1 1
+# 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | ID |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# |QR| Opcode |AA|TC|RD|RA| Z | RCODE |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | QDCOUNT |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | ANCOUNT |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | NSCOUNT |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | ARCOUNT |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+def header
+ [header_id header_fields count count count count]
+ {
+ question_count = r3.count
+ answer_count = r4.count
+ authority_count = r5.count
+ additional_count = r6.count
+ }
+
+def header_id
+ [octet octet]
+
+def header_fields
+ [octet octet]
+
+def count
+ count: int
+ [octet octet]
+ {
+ lhs.count = network_uord16( r1 r2 )
+ }
+
+#
+# Counting Primitives
+#
+# Uses a stack of lengths. Using a stack allows for counted lists to be
+# nested. As the list is consumed it brings the count down to zero. To use
+# it, push a new count value to the list and include it in a
+# right-recursive list like so:
+#
+# def LIST
+# [count_inc ITEM LIST]
+# [count_end]
+# end
+#
+
+CL: list<int>
+
+int start_list( count: int )
+{
+ CL.push( count )
+}
+
+def count_inc
+ []
+ {
+ if CL.top == 0 {
+ reject
+ } else {
+ CL.top = CL.top - 1
+ }
+ }
+
+def count_end
+ []
+ {
+ if CL.top != 0 {
+ reject
+ } else {
+ CL.pop()
+ }
+ }
+
+#
+# Octet List
+#
+
+# General octet list. Length must be set to use this.
+def octet_list
+ [count_inc octet octet_list]
+| [count_end]
+
+
+#
+# Names
+#
+
+def name
+ [name_part* name_end]
+
+# Name part lists are terminated by a zero length or a pointer.
+def name_end
+ # Zero length ending
+ [octet]
+ {
+ val: int = r1.data.uord8()
+ if val != 0 {
+ reject
+ }
+ }
+
+ # Pointer ending
+ # +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+ # | 1 1| OFFSET |
+ # +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+| [octet octet]
+ {
+ val: int = r1.data.uord8()
+ if val < 64 {
+ reject
+ }
+ }
+
+#
+# Get some number of bytes.
+#
+
+# How many to get
+nbytes: int
+
+# We use this token to eliminate the lookahead that would be needed to
+# cause a reduce of part_len. This forces whatever comes before nbytes to
+# be reduced before nbytes_data token is fetched from the scanner. We need
+# this because nbytes_data depends on the nbytes in the context and we need
+# to ensure that it is set.
+token nb_empty /''/
+
+# Fetch nbytes bytes.
+token nbytes_data
+ /''/
+ {
+ input.push( make_token( typeid<nbytes_data> input.pull(nbytes) ) )
+ }
+
+def nbytes
+ [nb_empty nbytes_data]
+
+def name_part
+ [part_len nbytes]
+
+
+def part_len
+ [octet]
+ {
+ # A name part list is terminated either by a zero length or a pointer,
+ # which must have the two high bits set.
+ count: int = r1.data.uord8()
+ if count == 0 || count >= 64 {
+ reject
+ } else {
+ # Set the number of bytes to get for the name part.
+ nbytes = count
+ }
+ }
+
+#
+# Resource Records
+#
+
+# 1 1 1 1 1 1
+# 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | |
+# / /
+# / NAME /
+# | |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | TYPE |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | CLASS |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | TTL |
+# | |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | RDLENGTH |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
+# / RDATA /
+# / /
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+
+def resource_record
+ [name rr_type rr_class ttl rdlength rdata]
+
+def rr_type
+ [octet octet]
+ {
+ rr_type_value = network_uord16( r1 r2 )
+ }
+
+def rr_class
+ value: int
+ [octet octet]
+ {
+ rr_class_value = network_uord16( r1 r2 )
+ }
+
+def ttl
+ [octet octet octet octet]
+
+token rdata_bytes
+ /''/
+ {
+ input.push( make_token( typeid<rdata_bytes> input.pull(rdata_length) ) )
+ }
+
+def rdlength
+ [octet octet]
+ {
+ rdata_length = network_uord16( r1 r2 )
+ }
+
+rdata_length: int
+
+def rdata
+ [RR_UNKNOWN rdata_bytes]
+| [RR_A address]
+| [RR_NS name]
+| [RR_CNAME name]
+| [RR_PTR name]
+| [RR_MX octet octet name]
+| [RR_TXT rdata_bytes]
+
+
+#
+# Address
+#
+def address [octet octet octet octet]
+
+#
+# List of Questions
+#
+
+def questions
+ [load_question_count question_list]
+
+def load_question_count
+ []
+ {
+ start_list( question_count )
+ }
+
+def question_list
+ [count_inc question question_list]
+| [count_end]
+
+#
+# Question
+#
+
+# 1 1 1 1 1 1
+# 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | |
+# / QNAME /
+# / /
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | QTYPE |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+# | QCLASS |
+# +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
+
+def question
+ [name qtype qclass]
+
+def qtype
+ [octet octet]
+
+def qclass
+ [octet octet]
+
+#
+# List of Answers
+#
+
+def answers
+ [load_answer_count answer_list]
+
+def load_answer_count
+ []
+ {
+ start_list( answer_count )
+ }
+
+def answer_list
+ [count_inc answer answer_list]
+| [count_end]
+
+#
+# Answer
+#
+
+def answer
+ [resource_record]
+
+#
+# List of Authorities
+#
+
+def authorities
+ [load_authority_count authority_list]
+
+def load_authority_count
+ []
+ {
+ start_list( authority_count )
+ }
+
+def authority_list
+ [count_inc authority authority_list]
+| [count_end]
+
+#
+# Authority
+#
+
+def authority
+ [resource_record]
+
+#
+# List of Additionals
+#
+
+def additionals
+ [load_additional_count additional_list]
+
+def load_additional_count
+ []
+ {
+ start_list( additional_count )
+ }
+
+def additional_list
+ [count_inc additional additional_list]
+| [count_end]
+
+#
+# Additional
+#
+
+def additional
+ [resource_record]
+
+
+def start
+ [message*]
+
+#
+# Grammar End.
+#
+
+int print_RR_UNKNOWN( s: start )
+{
+ for I:rdata in s {
+ if match I [u:RR_UNKNOWN rdata_bytes] {
+ print( 'UNKNOWN TYPE\n' )
+ }
+ }
+}
+
+int print_RR_A( s: start )
+{
+ for I:rdata in s {
+ if match I [RR_A o1:octet o2:octet o3:octet o4:octet] {
+ print( 'RR_A: ' o1.data.uord8() '.' o2.data.uord8() '.'
+ o3.data.uord8() '.' o4.data.uord8() '\n' )
+ }
+ }
+}
+
+int print_name( n: name m: map<int name> )
+{
+ for P: name_part in n {
+ match P [part_len D:nbytes]
+ print( D '.' )
+ }
+
+ for E:name_end in n {
+ if match E [o1:octet o2:octet] {
+ val: int = (o1.data.uord8() - 192) * 256 + o2.data.uord8()
+ print( '[' val ']' )
+ nameInMap: name = m.find( val )
+ print_name( nameInMap m )
+ }
+ }
+}
+
+int print_all_names( s: start )
+{
+ for M: message in s {
+ construct m: map<int name> []
+
+ O: octet = octet in M
+
+ for N: name in M {
+ match N [name_part* E:name_end]
+
+ for NP: name_part* in N {
+ if match NP [L: octet nbytes name_part*] {
+ messageOffset: int = L.pos - O.pos
+ construct n: name [NP E]
+ m.insert( messageOffset n )
+ }
+ }
+ }
+
+ for I: name in M {
+ print_name( I m )
+ print( '\n' )
+ }
+ }
+}
+
+end # binary
+
+cons Binary: binary[]
+Binary.CL = cons list<int> []
+
+parse S: binary::start(Binary) [ stdin ]
+print_all_names( S )
+print( '*** SUCCESS ***\n' )
+##### EXP #####
+www.google.ca.
+www.google.ca.
+[12]www.google.ca.
+www.google.com.
+[43]www.google.com.
+www.l.[47]google.com.
+[71]www.l.[47]google.com.
+[75]l.[47]google.com.
+a.[75]l.[47]google.com.
+[75]l.[47]google.com.
+d.[75]l.[47]google.com.
+[75]l.[47]google.com.
+e.[75]l.[47]google.com.
+[75]l.[47]google.com.
+f.[75]l.[47]google.com.
+[75]l.[47]google.com.
+g.[75]l.[47]google.com.
+[75]l.[47]google.com.
+b.[75]l.[47]google.com.
+[107]a.[75]l.[47]google.com.
+[123]d.[75]l.[47]google.com.
+[139]e.[75]l.[47]google.com.
+[155]f.[75]l.[47]google.com.
+[171]g.[75]l.[47]google.com.
+[187]b.[75]l.[47]google.com.
+clients1.google.ca.
+clients1.google.ca.
+[12]clients1.google.ca.
+clients.l.google.com.
+[48]clients.l.google.com.
+[56]l.google.com.
+e.[56]l.google.com.
+[56]l.google.com.
+f.[56]l.google.com.
+[56]l.google.com.
+g.[56]l.google.com.
+[56]l.google.com.
+b.[56]l.google.com.
+[56]l.google.com.
+a.[56]l.google.com.
+[56]l.google.com.
+d.[56]l.google.com.
+[98]e.[56]l.google.com.
+[114]f.[56]l.google.com.
+[130]g.[56]l.google.com.
+[146]b.[56]l.google.com.
+[162]a.[56]l.google.com.
+[178]d.[56]l.google.com.
+en-us.fxfeeds.mozilla.com.
+en-us.fxfeeds.mozilla.com.
+[12]en-us.fxfeeds.mozilla.com.
+fxfeeds.mozilla.org.
+[55]fxfeeds.mozilla.org.
+[63]mozilla.org.
+ns1.[63]mozilla.org.
+[63]mozilla.org.
+ns2.[63]mozilla.org.
+[63]mozilla.org.
+ns3.[63]mozilla.org.
+[104]ns1.[63]mozilla.org.
+[122]ns2.[63]mozilla.org.
+[140]ns3.[63]mozilla.org.
+fxfeeds.mozilla.com.
+fxfeeds.mozilla.com.
+[12]fxfeeds.mozilla.com.
+fxfeeds.mozilla.org.
+[49]fxfeeds.mozilla.org.
+[57]mozilla.org.
+ns2.[57]mozilla.org.
+[57]mozilla.org.
+ns3.[57]mozilla.org.
+[57]mozilla.org.
+ns1.[57]mozilla.org.
+[98]ns2.[57]mozilla.org.
+[116]ns3.[57]mozilla.org.
+[134]ns1.[57]mozilla.org.
+newsrss.bbc.co.uk.
+newsrss.bbc.co.uk.
+[12]newsrss.bbc.co.uk.
+newsrss.bbc.net.uk.
+[47]newsrss.bbc.net.uk.
+[55]bbc.net.uk.
+ns0.thdo.bbc.co.[63]uk.
+[55]bbc.net.uk.
+ns0.rbsov.[104]bbc.co.[63]uk.
+[95]ns0.thdo.bbc.co.[63]uk.
+[125]ns0.rbsov.[104]bbc.co.[63]uk.
+news.google.ca.
+news.google.ca.
+[12]news.google.ca.
+news.google.com.
+[44]news.google.com.
+news.l.[49]google.com.
+[73]news.l.[49]google.com.
+[78]l.[49]google.com.
+d.[78]l.[49]google.com.
+[78]l.[49]google.com.
+e.[78]l.[49]google.com.
+[78]l.[49]google.com.
+f.[78]l.[49]google.com.
+[78]l.[49]google.com.
+g.[78]l.[49]google.com.
+[78]l.[49]google.com.
+b.[78]l.[49]google.com.
+[78]l.[49]google.com.
+a.[78]l.[49]google.com.
+[110]d.[78]l.[49]google.com.
+[126]e.[78]l.[49]google.com.
+[142]f.[78]l.[49]google.com.
+[158]g.[78]l.[49]google.com.
+[174]b.[78]l.[49]google.com.
+[190]a.[78]l.[49]google.com.
+nt3.ggpht.com.
+nt3.ggpht.com.
+[12]nt3.ggpht.com.
+news.l.google.com.
+[43]news.l.google.com.
+[48]l.google.com.
+f.[48]l.google.com.
+[48]l.google.com.
+g.[48]l.google.com.
+[48]l.google.com.
+b.[48]l.google.com.
+[48]l.google.com.
+a.[48]l.google.com.
+[48]l.google.com.
+d.[48]l.google.com.
+[48]l.google.com.
+e.[48]l.google.com.
+[90]f.[48]l.google.com.
+[106]g.[48]l.google.com.
+[122]b.[48]l.google.com.
+[138]a.[48]l.google.com.
+[154]d.[48]l.google.com.
+[170]e.[48]l.google.com.
+csi.gstatic.com.
+csi.gstatic.com.
+[12]csi.gstatic.com.
+csi.l.google.com.
+[45]csi.l.google.com.
+[49]l.google.com.
+d.[49]l.google.com.
+[49]l.google.com.
+e.[49]l.google.com.
+[49]l.google.com.
+f.[49]l.google.com.
+[49]l.google.com.
+g.[49]l.google.com.
+[49]l.google.com.
+b.[49]l.google.com.
+[49]l.google.com.
+a.[49]l.google.com.
+[91]d.[49]l.google.com.
+[107]e.[49]l.google.com.
+[123]f.[49]l.google.com.
+[139]g.[49]l.google.com.
+[155]b.[49]l.google.com.
+[171]a.[49]l.google.com.
+www.nytimes.com.
+www.nytimes.com.
+[12]www.nytimes.com.
+nytimes.com.
+nydns1.about.[57]com.
+[49]nytimes.com.
+ns1t.[49]nytimes.com.
+[49]nytimes.com.
+nydns2.[79]about.[57]com.
+[72]nydns1.about.[57]com.
+[99]ns1t.[49]nytimes.com.
+[118]nydns2.[79]about.[57]com.
+graphics8.nytimes.com.
+graphics8.nytimes.com.
+[12]graphics8.nytimes.com.
+graphics478.nytimes.com.edgesuite.net.
+[51]graphics478.nytimes.com.edgesuite.net.
+a1116.x.akamai.[85]net.
+[102]a1116.x.akamai.[85]net.
+[102]a1116.x.akamai.[85]net.
+[108]x.akamai.[85]net.
+n0x.[110]akamai.[85]net.
+[108]x.akamai.[85]net.
+n1x.[110]akamai.[85]net.
+[108]x.akamai.[85]net.
+n6x.[110]akamai.[85]net.
+[108]x.akamai.[85]net.
+n3x.[110]akamai.[85]net.
+[108]x.akamai.[85]net.
+n2x.[110]akamai.[85]net.
+[108]x.akamai.[85]net.
+n7x.[110]akamai.[85]net.
+[108]x.akamai.[85]net.
+n5x.[110]akamai.[85]net.
+[108]x.akamai.[85]net.
+n8x.[110]akamai.[85]net.
+[108]x.akamai.[85]net.
+n4x.[110]akamai.[85]net.
+[163]n0x.[110]akamai.[85]net.
+[181]n1x.[110]akamai.[85]net.
+[199]n6x.[110]akamai.[85]net.
+[217]n3x.[110]akamai.[85]net.
+[235]n2x.[110]akamai.[85]net.
+[253]n7x.[110]akamai.[85]net.
+[271]n5x.[110]akamai.[85]net.
+[289]n8x.[110]akamai.[85]net.
+[307]n4x.[110]akamai.[85]net.
+timespeople.nytimes.com.
+timespeople.nytimes.com.
+[12]timespeople.nytimes.com.
+nytimes.com.
+nydns2.about.[65]com.
+[57]nytimes.com.
+nydns1.[87]about.[65]com.
+[57]nytimes.com.
+ns1t.[57]nytimes.com.
+[80]nydns2.about.[65]com.
+[107]nydns1.[87]about.[65]com.
+[128]ns1t.[57]nytimes.com.
+googleads.g.doubleclick.net.
+googleads.g.doubleclick.net.
+[12]googleads.g.doubleclick.net.
+pagead.l.doubleclick.net.
+[57]pagead.l.doubleclick.net.
+[64]l.doubleclick.net.
+b.l.google.com.
+[64]l.doubleclick.net.
+d.[113]l.google.com.
+[64]l.doubleclick.net.
+e.[113]l.google.com.
+[64]l.doubleclick.net.
+f.[113]l.google.com.
+[64]l.doubleclick.net.
+g.[113]l.google.com.
+[64]l.doubleclick.net.
+a.[113]l.google.com.
+[111]b.l.google.com.
+[139]d.[113]l.google.com.
+[155]e.[113]l.google.com.
+[171]f.[113]l.google.com.
+[187]g.[113]l.google.com.
+[203]a.[113]l.google.com.
+up.nytimes.com.
+up.nytimes.com.
+[12]up.nytimes.com.
+up.about.akadns.net.
+[44]up.about.akadns.net.
+[53]akadns.net.
+eur1.[53]akadns.net.
+[53]akadns.net.
+use3.[53]akadns.net.
+[53]akadns.net.
+use4.[53]akadns.net.
+[53]akadns.net.
+usw2.[53]akadns.net.
+[53]akadns.net.
+za.akadns.org.
+[53]akadns.net.
+zb.[172]akadns.org.
+[53]akadns.net.
+zc.[172]akadns.org.
+[53]akadns.net.
+zd.[172]akadns.org.
+[53]akadns.net.
+asia9.[53]akadns.net.
+[93]eur1.[53]akadns.net.
+[112]use3.[53]akadns.net.
+[131]use4.[53]akadns.net.
+[150]usw2.[53]akadns.net.
+[169]za.akadns.org.
+[196]zb.[172]akadns.org.
+[213]zc.[172]akadns.org.
+[230]zd.[172]akadns.org.
+[247]asia9.[53]akadns.net.
+pix04.revsci.net.
+pix04.revsci.net.
+[12]pix04.revsci.net.
+revsci.net.
+ns2.p16.dynect.[57]net.
+[50]revsci.net.
+ns3.[76]p16.dynect.[57]net.
+[50]revsci.net.
+ns1.[76]p16.dynect.[57]net.
+[50]revsci.net.
+ns4.[76]p16.dynect.[57]net.
+[72]ns2.p16.dynect.[57]net.
+[101]ns3.[76]p16.dynect.[57]net.
+[119]ns1.[76]p16.dynect.[57]net.
+[137]ns4.[76]p16.dynect.[57]net.
+wt.o.nytimes.com.
+wt.o.nytimes.com.
+[12]wt.o.nytimes.com.
+nytimes.webtrends.akadns.net.
+[46]nytimes.webtrends.akadns.net.
+[64]akadns.net.
+use3.[64]akadns.net.
+[64]akadns.net.
+use4.[64]akadns.net.
+[64]akadns.net.
+usw2.[64]akadns.net.
+[64]akadns.net.
+za.akadns.org.
+[64]akadns.net.
+zb.[164]akadns.org.
+[64]akadns.net.
+zc.[164]akadns.org.
+[64]akadns.net.
+zd.[164]akadns.org.
+[64]akadns.net.
+asia9.[64]akadns.net.
+[64]akadns.net.
+eur1.[64]akadns.net.
+[104]use3.[64]akadns.net.
+[123]use4.[64]akadns.net.
+[142]usw2.[64]akadns.net.
+[161]za.akadns.org.
+[188]zb.[164]akadns.org.
+[205]zc.[164]akadns.org.
+[222]zd.[164]akadns.org.
+[239]asia9.[64]akadns.net.
+[259]eur1.[64]akadns.net.
+te.nytimes.com.
+ar.voicefive.com.
+te.nytimes.com.
+[12]te.nytimes.com.
+nytd.te.tacoda.net.
+[44]nytd.te.tacoda.net.
+te.tacoda.akadns.[59]net.
+[76]te.tacoda.akadns.[59]net.
+[86]akadns.[59]net.
+use4.[86]akadns.[59]net.
+[86]akadns.[59]net.
+usw2.[86]akadns.[59]net.
+[86]akadns.[59]net.
+za.akadns.org.
+[86]akadns.[59]net.
+zb.[164]akadns.org.
+[86]akadns.[59]net.
+zc.[164]akadns.org.
+[86]akadns.[59]net.
+zd.[164]akadns.org.
+[86]akadns.[59]net.
+asia9.[86]akadns.[59]net.
+[86]akadns.[59]net.
+eur1.[86]akadns.[59]net.
+[86]akadns.[59]net.
+use3.[86]akadns.[59]net.
+[123]use4.[86]akadns.[59]net.
+[142]usw2.[86]akadns.[59]net.
+[161]za.akadns.org.
+[188]zb.[164]akadns.org.
+[205]zc.[164]akadns.org.
+[222]zd.[164]akadns.org.
+[239]asia9.[86]akadns.[59]net.
+[259]eur1.[86]akadns.[59]net.
+[278]use3.[86]akadns.[59]net.
+ar.voicefive.com.
+[12]ar.voicefive.com.
+ar.gta.voicefive.com.
+[46]ar.gta.voicefive.com.
+[49]gta.voicefive.com.
+gta02.ord.[53]voicefive.com.
+[49]gta.voicefive.com.
+gta01.iad.[53]voicefive.com.
+[49]gta.voicefive.com.
+gta01.[102]ord.[53]voicefive.com.
+[49]gta.voicefive.com.
+gta02.[126]iad.[53]voicefive.com.
+[96]gta02.ord.[53]voicefive.com.
+[120]gta01.iad.[53]voicefive.com.
+[144]gta01.[102]ord.[53]voicefive.com.
+[164]gta02.[126]iad.[53]voicefive.com.
+www.google.com.
+www.google.com.
+[12]www.google.com.
+www.l.google.com.
+[44]www.l.google.com.
+[48]l.google.com.
+d.[48]l.google.com.
+[48]l.google.com.
+e.[48]l.google.com.
+[48]l.google.com.
+f.[48]l.google.com.
+[48]l.google.com.
+g.[48]l.google.com.
+[48]l.google.com.
+b.[48]l.google.com.
+[48]l.google.com.
+a.[48]l.google.com.
+[90]d.[48]l.google.com.
+[106]e.[48]l.google.com.
+[122]f.[48]l.google.com.
+[138]g.[48]l.google.com.
+[154]b.[48]l.google.com.
+[170]a.[48]l.google.com.
+www.google-analytics.com.
+www.google-analytics.com.
+[12]www.google-analytics.com.
+www-google-analytics.l.google.com.
+[54]www-google-analytics.l.google.com.
+[75]l.google.com.
+f.[75]l.google.com.
+[75]l.google.com.
+g.[75]l.google.com.
+[75]l.google.com.
+b.[75]l.google.com.
+[75]l.google.com.
+a.[75]l.google.com.
+[75]l.google.com.
+d.[75]l.google.com.
+[75]l.google.com.
+e.[75]l.google.com.
+[117]f.[75]l.google.com.
+[133]g.[75]l.google.com.
+[149]b.[75]l.google.com.
+[165]a.[75]l.google.com.
+[181]d.[75]l.google.com.
+[197]e.[75]l.google.com.
+pagead2.googlesyndication.com.
+pagead2.googlesyndication.com.
+[12]pagead2.googlesyndication.com.
+pagead.l.google.com.
+[59]pagead.l.google.com.
+[66]l.google.com.
+g.[66]l.google.com.
+[66]l.google.com.
+b.[66]l.google.com.
+[66]l.google.com.
+a.[66]l.google.com.
+[66]l.google.com.
+d.[66]l.google.com.
+[66]l.google.com.
+e.[66]l.google.com.
+[66]l.google.com.
+f.[66]l.google.com.
+[108]g.[66]l.google.com.
+[124]b.[66]l.google.com.
+[140]a.[66]l.google.com.
+[156]d.[66]l.google.com.
+[172]e.[66]l.google.com.
+[188]f.[66]l.google.com.
+maps.google.com.
+maps.google.com.
+[12]maps.google.com.
+maps.l.google.com.
+[45]maps.l.google.com.
+[50]l.google.com.
+b.[50]l.google.com.
+[50]l.google.com.
+a.[50]l.google.com.
+[50]l.google.com.
+d.[50]l.google.com.
+[50]l.google.com.
+e.[50]l.google.com.
+[50]l.google.com.
+f.[50]l.google.com.
+[50]l.google.com.
+g.[50]l.google.com.
+[92]b.[50]l.google.com.
+[108]a.[50]l.google.com.
+[124]d.[50]l.google.com.
+[140]e.[50]l.google.com.
+[156]f.[50]l.google.com.
+[172]g.[50]l.google.com.
+maps.gstatic.com.
+maps.gstatic.com.
+[12]maps.gstatic.com.
+www2.l.google.com.
+[46]www2.l.google.com.
+[51]l.google.com.
+a.[51]l.google.com.
+[51]l.google.com.
+d.[51]l.google.com.
+[51]l.google.com.
+e.[51]l.google.com.
+[51]l.google.com.
+f.[51]l.google.com.
+[51]l.google.com.
+g.[51]l.google.com.
+[51]l.google.com.
+b.[51]l.google.com.
+[93]a.[51]l.google.com.
+[109]d.[51]l.google.com.
+[125]e.[51]l.google.com.
+[141]f.[51]l.google.com.
+[157]g.[51]l.google.com.
+[173]b.[51]l.google.com.
+www.calgaryherald.com.
+www.calgaryherald.com.
+[12]www.calgaryherald.com.
+calgaryherald.com.
+ns1.canwest.[69]com.
+[55]calgaryherald.com.
+ns2.[88]canwest.[69]com.
+[84]ns1.canwest.[69]com.
+[110]ns2.[88]canwest.[69]com.
+a123.g.akamai.net.
+a123.g.akamai.net.
+[12]a123.g.akamai.net.
+[12]a123.g.akamai.net.
+members.canada.com.
+members.canada.com.
+[12]members.canada.com.
+canada.com.
+ns2.canwest.[59]com.
+[52]canada.com.
+ns1.[78]canwest.[59]com.
+[74]ns2.canwest.[59]com.
+[100]ns1.[78]canwest.[59]com.
+www.canada.com.
+www.canada.com.
+[12]www.canada.com.
+canada.com.
+ns1.canwest.[55]com.
+[48]canada.com.
+ns2.[74]canwest.[55]com.
+[70]ns1.canwest.[55]com.
+[96]ns2.[74]canwest.[55]com.
+s9.addthis.com.
+s9.addthis.com.
+[12]s9.addthis.com.
+wildcard.addthis.com.edgekey.net.
+[44]wildcard.addthis.com.edgekey.net.
+e2943.c.akamaiedge.[73]net.
+[90]e2943.c.akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n7c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n5c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n8c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n0c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n6c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n1c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n4c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n3c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n2c.[98]akamaiedge.[73]net.
+[139]n7c.[98]akamaiedge.[73]net.
+[157]n5c.[98]akamaiedge.[73]net.
+[175]n8c.[98]akamaiedge.[73]net.
+[193]n0c.[98]akamaiedge.[73]net.
+[211]n6c.[98]akamaiedge.[73]net.
+[229]n1c.[98]akamaiedge.[73]net.
+[247]n4c.[98]akamaiedge.[73]net.
+[265]n3c.[98]akamaiedge.[73]net.
+[283]n2c.[98]akamaiedge.[73]net.
+communities.canada.com.
+communities.canada.com.
+[12]communities.canada.com.
+canada.com.
+ns1.canwest.[63]com.
+[56]canada.com.
+ns2.[82]canwest.[63]com.
+[78]ns1.canwest.[63]com.
+[104]ns2.[82]canwest.[63]com.
+canwestglobal.112.2o7.net.
+beacon.securestudies.com.
+beacon.securestudies.com.
+[12]beacon.securestudies.com.
+beacon.gta.securestudies.com.
+[54]beacon.gta.securestudies.com.
+[61]gta.securestudies.com.
+gta02.iad.[65]securestudies.com.
+[61]gta.securestudies.com.
+gta02.ord.[65]securestudies.com.
+[61]gta.securestudies.com.
+gta01.[118]iad.[65]securestudies.com.
+[61]gta.securestudies.com.
+gta01.[142]ord.[65]securestudies.com.
+[112]gta02.iad.[65]securestudies.com.
+[136]gta02.ord.[65]securestudies.com.
+[160]gta01.[118]iad.[65]securestudies.com.
+[180]gta01.[142]ord.[65]securestudies.com.
+canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+2o7.net.
+ns1.dal.omniture.com.
+[155]2o7.net.
+ns1.sj1.[182]omniture.com.
+[155]2o7.net.
+ns1.sj2.[182]omniture.com.
+[174]ns1.dal.omniture.com.
+[208]ns1.sj1.[182]omniture.com.
+[230]ns1.sj2.[182]omniture.com.
+s7.addthis.com.
+s7.addthis.com.
+[12]s7.addthis.com.
+wildcard.addthis.com.edgekey.net.
+[44]wildcard.addthis.com.edgekey.net.
+e2943.c.akamaiedge.[73]net.
+[90]e2943.c.akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n5c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n8c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n0c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n6c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n1c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n4c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n3c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n2c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n7c.[98]akamaiedge.[73]net.
+[139]n5c.[98]akamaiedge.[73]net.
+[157]n8c.[98]akamaiedge.[73]net.
+[175]n0c.[98]akamaiedge.[73]net.
+[193]n6c.[98]akamaiedge.[73]net.
+[211]n1c.[98]akamaiedge.[73]net.
+[229]n4c.[98]akamaiedge.[73]net.
+[247]n3c.[98]akamaiedge.[73]net.
+[265]n2c.[98]akamaiedge.[73]net.
+[283]n7c.[98]akamaiedge.[73]net.
+csi.gstatic.com.
+csi.gstatic.com.
+[12]csi.gstatic.com.
+csi.l.google.com.
+[45]csi.l.google.com.
+[49]l.google.com.
+d.[49]l.google.com.
+[49]l.google.com.
+e.[49]l.google.com.
+[49]l.google.com.
+f.[49]l.google.com.
+[49]l.google.com.
+g.[49]l.google.com.
+[49]l.google.com.
+b.[49]l.google.com.
+[49]l.google.com.
+a.[49]l.google.com.
+[91]d.[49]l.google.com.
+[107]e.[49]l.google.com.
+[123]f.[49]l.google.com.
+[139]g.[49]l.google.com.
+[155]b.[49]l.google.com.
+[171]a.[49]l.google.com.
+www.thestar.com.
+www.thestar.com.
+[12]www.thestar.com.
+[16]thestar.com.
+ns1.[16]thestar.com.
+[16]thestar.com.
+ns2.[16]thestar.com.
+[61]ns1.[16]thestar.com.
+[79]ns2.[16]thestar.com.
+beacon.scorecardresearch.com.
+beacon.scorecardresearch.com.
+[12]beacon.scorecardresearch.com.
+beacon.gta.scorecardresearch.com.
+[58]beacon.gta.scorecardresearch.com.
+[65]gta.scorecardresearch.com.
+gta01.iad.[69]scorecardresearch.com.
+[65]gta.scorecardresearch.com.
+gta02.ord.[69]scorecardresearch.com.
+[65]gta.scorecardresearch.com.
+gta01.[150]ord.[69]scorecardresearch.com.
+[65]gta.scorecardresearch.com.
+gta02.[126]iad.[69]scorecardresearch.com.
+[120]gta01.iad.[69]scorecardresearch.com.
+[144]gta02.ord.[69]scorecardresearch.com.
+[168]gta01.[150]ord.[69]scorecardresearch.com.
+[188]gta02.[126]iad.[69]scorecardresearch.com.
+media.thestar.topscms.com.
+media.thestar.topscms.com.
+[12]media.thestar.topscms.com.
+media.thestar.topscms.com.edgesuite.net.
+[55]media.thestar.topscms.com.edgesuite.net.
+a1520.g.akamai.[91]net.
+[108]a1520.g.akamai.[91]net.
+[108]a1520.g.akamai.[91]net.
+[114]g.akamai.[91]net.
+n0g.[116]akamai.[91]net.
+[114]g.akamai.[91]net.
+n4g.[116]akamai.[91]net.
+[114]g.akamai.[91]net.
+n2g.[116]akamai.[91]net.
+[114]g.akamai.[91]net.
+n5g.[116]akamai.[91]net.
+[114]g.akamai.[91]net.
+n7g.[116]akamai.[91]net.
+[114]g.akamai.[91]net.
+n6g.[116]akamai.[91]net.
+[114]g.akamai.[91]net.
+n8g.[116]akamai.[91]net.
+[114]g.akamai.[91]net.
+n1g.[116]akamai.[91]net.
+[114]g.akamai.[91]net.
+n3g.[116]akamai.[91]net.
+[169]n0g.[116]akamai.[91]net.
+[187]n4g.[116]akamai.[91]net.
+[205]n2g.[116]akamai.[91]net.
+[223]n5g.[116]akamai.[91]net.
+[241]n7g.[116]akamai.[91]net.
+[259]n6g.[116]akamai.[91]net.
+[277]n8g.[116]akamai.[91]net.
+[295]n1g.[116]akamai.[91]net.
+[313]n3g.[116]akamai.[91]net.
+www.addthis.com.
+www.addthis.com.
+[12]www.addthis.com.
+vp-www.addthis.com.
+[45]vp-www.addthis.com.
+[52]addthis.com.
+eur2.akam.net.
+[52]addthis.com.
+usc1.[98]akam.net.
+[52]addthis.com.
+usc2.[98]akam.net.
+[52]addthis.com.
+usw1.[98]akam.net.
+[52]addthis.com.
+usw6.[98]akam.net.
+[52]addthis.com.
+asia3.[98]akam.net.
+[52]addthis.com.
+ns1-33.[98]akam.net.
+[52]addthis.com.
+ns1-43.[98]akam.net.
+[93]eur2.akam.net.
+[120]usc1.[98]akam.net.
+[139]usc2.[98]akam.net.
+[158]usw1.[98]akam.net.
+[177]usw6.[98]akam.net.
+[196]asia3.[98]akam.net.
+[216]ns1-33.[98]akam.net.
+[237]ns1-43.[98]akam.net.
+n.thestar.com.
+n.thestar.com.
+[12]n.thestar.com.
+thestar.com.122.2o7.net.
+[43]thestar.com.122.2o7.net.
+[43]thestar.com.122.2o7.net.
+[43]thestar.com.122.2o7.net.
+[43]thestar.com.122.2o7.net.
+[43]thestar.com.122.2o7.net.
+[43]thestar.com.122.2o7.net.
+[59]2o7.net.
+ns1.sj1.omniture.com.
+[59]2o7.net.
+ns1.sj2.[184]omniture.com.
+[59]2o7.net.
+ns1.dal.[184]omniture.com.
+[176]ns1.sj1.omniture.com.
+[210]ns1.sj2.[184]omniture.com.
+[232]ns1.dal.[184]omniture.com.
+news.therecord.com.
+news.therecord.com.
+[12]news.therecord.com.
+therecord.com.
+ns1.thestar.[62]com.
+[52]therecord.com.
+ns2.[81]thestar.[62]com.
+[77]ns1.thestar.[62]com.
+[103]ns2.[81]thestar.[62]com.
+media.therecord.topscms.com.
+media.therecord.topscms.com.
+[12]media.therecord.topscms.com.
+media.therecord.topscms.com.edgesuite.net.
+[57]media.therecord.topscms.com.edgesuite.net.
+a847.g.akamai.[95]net.
+[112]a847.g.akamai.[95]net.
+[112]a847.g.akamai.[95]net.
+[117]g.akamai.[95]net.
+n2g.[119]akamai.[95]net.
+[117]g.akamai.[95]net.
+n5g.[119]akamai.[95]net.
+[117]g.akamai.[95]net.
+n7g.[119]akamai.[95]net.
+[117]g.akamai.[95]net.
+n6g.[119]akamai.[95]net.
+[117]g.akamai.[95]net.
+n8g.[119]akamai.[95]net.
+[117]g.akamai.[95]net.
+n1g.[119]akamai.[95]net.
+[117]g.akamai.[95]net.
+n3g.[119]akamai.[95]net.
+[117]g.akamai.[95]net.
+n0g.[119]akamai.[95]net.
+[117]g.akamai.[95]net.
+n4g.[119]akamai.[95]net.
+[172]n2g.[119]akamai.[95]net.
+[190]n5g.[119]akamai.[95]net.
+[208]n7g.[119]akamai.[95]net.
+[226]n6g.[119]akamai.[95]net.
+[244]n8g.[119]akamai.[95]net.
+[262]n1g.[119]akamai.[95]net.
+[280]n3g.[119]akamai.[95]net.
+[298]n0g.[119]akamai.[95]net.
+[316]n4g.[119]akamai.[95]net.
+media.therecord.com.
+www.goldbook.ca.
+media.therecord.com.
+[12]media.therecord.com.
+therecord.com.
+ns2.thestar.[63]com.
+[53]therecord.com.
+ns1.[82]thestar.[63]com.
+[78]ns2.thestar.[63]com.
+[104]ns1.[82]thestar.[63]com.
+www.goldbook.ca.
+[12]www.goldbook.ca.
+goldbook.ca.
+[45]goldbook.ca.
+[45]goldbook.ca.
+ns4.everydns.net.
+[45]goldbook.ca.
+ns1.[90]everydns.net.
+[45]goldbook.ca.
+ns2.[90]everydns.net.
+[45]goldbook.ca.
+ns3.[90]everydns.net.
+[86]ns4.everydns.net.
+[116]ns1.[90]everydns.net.
+[134]ns2.[90]everydns.net.
+[152]ns3.[90]everydns.net.
+torstardigital.122.2o7.net.
+torstardigital.122.2o7.net.
+[12]torstardigital.122.2o7.net.
+[12]torstardigital.122.2o7.net.
+[12]torstardigital.122.2o7.net.
+[12]torstardigital.122.2o7.net.
+[12]torstardigital.122.2o7.net.
+[12]torstardigital.122.2o7.net.
+2o7.net.
+ns1.dal.omniture.com.
+[140]2o7.net.
+ns1.sj1.[167]omniture.com.
+[140]2o7.net.
+ns1.sj2.[167]omniture.com.
+[159]ns1.dal.omniture.com.
+[193]ns1.sj1.[167]omniture.com.
+[215]ns1.sj2.[167]omniture.com.
+news.google.ca.
+news.google.ca.
+[12]news.google.ca.
+news.google.com.
+[44]news.google.com.
+news.l.[49]google.com.
+[73]news.l.[49]google.com.
+[78]l.[49]google.com.
+e.[78]l.[49]google.com.
+[78]l.[49]google.com.
+b.[78]l.[49]google.com.
+[78]l.[49]google.com.
+a.[78]l.[49]google.com.
+[78]l.[49]google.com.
+g.[78]l.[49]google.com.
+[78]l.[49]google.com.
+d.[78]l.[49]google.com.
+[78]l.[49]google.com.
+f.[78]l.[49]google.com.
+[110]e.[78]l.[49]google.com.
+[126]b.[78]l.[49]google.com.
+[142]a.[78]l.[49]google.com.
+[158]g.[78]l.[49]google.com.
+[174]d.[78]l.[49]google.com.
+[190]f.[78]l.[49]google.com.
+googleads.g.doubleclick.net.
+googleads.g.doubleclick.net.
+[12]googleads.g.doubleclick.net.
+pagead.l.doubleclick.net.
+[57]pagead.l.doubleclick.net.
+[64]l.doubleclick.net.
+g.l.google.com.
+[64]l.doubleclick.net.
+a.[113]l.google.com.
+[64]l.doubleclick.net.
+b.[113]l.google.com.
+[64]l.doubleclick.net.
+d.[113]l.google.com.
+[64]l.doubleclick.net.
+e.[113]l.google.com.
+[64]l.doubleclick.net.
+f.[113]l.google.com.
+[111]g.l.google.com.
+[139]a.[113]l.google.com.
+[155]b.[113]l.google.com.
+[171]d.[113]l.google.com.
+[187]e.[113]l.google.com.
+[203]f.[113]l.google.com.
+www.montrealgazette.com.
+www.montrealgazette.com.
+[12]www.montrealgazette.com.
+montrealgazette.com.
+ns2.canwest.[73]com.
+[57]montrealgazette.com.
+ns1.[92]canwest.[73]com.
+[88]ns2.canwest.[73]com.
+[114]ns1.[92]canwest.[73]com.
+a123.g.akamai.net.
+a123.g.akamai.net.
+[12]a123.g.akamai.net.
+[12]a123.g.akamai.net.
+members.canada.com.
+members.canada.com.
+[12]members.canada.com.
+canada.com.
+ns2.canwest.[59]com.
+[52]canada.com.
+ns1.[78]canwest.[59]com.
+[74]ns2.canwest.[59]com.
+[100]ns1.[78]canwest.[59]com.
+www.cbc.ca.
+www.cbc.ca.
+[12]www.cbc.ca.
+www.cbc.ca.edgesuite.net.
+[40]www.cbc.ca.edgesuite.net.
+a1849.gc.akamai.[61]net.
+[78]a1849.gc.akamai.[61]net.
+[78]a1849.gc.akamai.[61]net.
+[84]gc.akamai.[61]net.
+n6gc.[87]akamai.[61]net.
+[84]gc.akamai.[61]net.
+n1gc.[87]akamai.[61]net.
+[84]gc.akamai.[61]net.
+n4gc.[87]akamai.[61]net.
+[84]gc.akamai.[61]net.
+n8gc.[87]akamai.[61]net.
+[84]gc.akamai.[61]net.
+n2gc.[87]akamai.[61]net.
+[84]gc.akamai.[61]net.
+n0gc.[87]akamai.[61]net.
+[84]gc.akamai.[61]net.
+n7gc.[87]akamai.[61]net.
+[84]gc.akamai.[61]net.
+n5gc.[87]akamai.[61]net.
+[84]gc.akamai.[61]net.
+n3gc.[87]akamai.[61]net.
+[140]n6gc.[87]akamai.[61]net.
+[159]n1gc.[87]akamai.[61]net.
+[178]n4gc.[87]akamai.[61]net.
+[197]n8gc.[87]akamai.[61]net.
+[216]n2gc.[87]akamai.[61]net.
+[235]n0gc.[87]akamai.[61]net.
+[254]n7gc.[87]akamai.[61]net.
+[273]n5gc.[87]akamai.[61]net.
+[292]n3gc.[87]akamai.[61]net.
+a.cbc.ca.
+a.cbc.ca.
+[12]a.cbc.ca.
+ehg-cbc.hitbox.com.
+[38]ehg-cbc.hitbox.com.
+[46]hitbox.com.
+dns06.omniture.[53]com.
+[46]hitbox.com.
+dns05.[92]omniture.[53]com.
+[46]hitbox.com.
+dns04.[92]omniture.[53]com.
+[46]hitbox.com.
+dns03.[92]omniture.[53]com.
+[46]hitbox.com.
+dns02.[92]omniture.[53]com.
+[46]hitbox.com.
+dns01.[92]omniture.[53]com.
+[86]dns06.omniture.[53]com.
+[115]dns05.[92]omniture.[53]com.
+[135]dns04.[92]omniture.[53]com.
+[155]dns03.[92]omniture.[53]com.
+[175]dns02.[92]omniture.[53]com.
+[195]dns01.[92]omniture.[53]com.
+assets.loomia.com.
+assets.loomia.com.
+[12]assets.loomia.com.
+a.[19]loomia.com.
+[47]a.[19]loomia.com.
+[19]loomia.com.
+ns15.dnsmadeeasy.[26]com.
+[19]loomia.com.
+ns14.[84]dnsmadeeasy.[26]com.
+[19]loomia.com.
+ns12.[84]dnsmadeeasy.[26]com.
+[19]loomia.com.
+ns11.[84]dnsmadeeasy.[26]com.
+[19]loomia.com.
+ns13.[84]dnsmadeeasy.[26]com.
+[19]loomia.com.
+ns10.[84]dnsmadeeasy.[26]com.
+recs-social.loomia.com.
+recs-social.loomia.com.
+[12]recs-social.loomia.com.
+rec-assets.[24]loomia.com.
+[52]rec-assets.[24]loomia.com.
+[24]loomia.com.
+ns14.dnsmadeeasy.[31]com.
+[24]loomia.com.
+ns11.[98]dnsmadeeasy.[31]com.
+[24]loomia.com.
+ns12.[98]dnsmadeeasy.[31]com.
+[24]loomia.com.
+ns15.[98]dnsmadeeasy.[31]com.
+[24]loomia.com.
+ns10.[98]dnsmadeeasy.[31]com.
+[24]loomia.com.
+ns13.[98]dnsmadeeasy.[31]com.
+e1.clearspring.com.
+static-cache.loomia.com.
+static-cache.loomia.com.
+[12]static-cache.loomia.com.
+static-cache.loomia.com.edgesuite.net.
+[53]static-cache.loomia.com.edgesuite.net.
+a298.g.akamai.[87]net.
+[104]a298.g.akamai.[87]net.
+[104]a298.g.akamai.[87]net.
+[109]g.akamai.[87]net.
+n4g.[111]akamai.[87]net.
+[109]g.akamai.[87]net.
+n2g.[111]akamai.[87]net.
+[109]g.akamai.[87]net.
+n5g.[111]akamai.[87]net.
+[109]g.akamai.[87]net.
+n7g.[111]akamai.[87]net.
+[109]g.akamai.[87]net.
+n6g.[111]akamai.[87]net.
+[109]g.akamai.[87]net.
+n8g.[111]akamai.[87]net.
+[109]g.akamai.[87]net.
+n1g.[111]akamai.[87]net.
+[109]g.akamai.[87]net.
+n3g.[111]akamai.[87]net.
+[109]g.akamai.[87]net.
+n0g.[111]akamai.[87]net.
+[164]n4g.[111]akamai.[87]net.
+[182]n2g.[111]akamai.[87]net.
+[200]n5g.[111]akamai.[87]net.
+[218]n7g.[111]akamai.[87]net.
+[236]n6g.[111]akamai.[87]net.
+[254]n8g.[111]akamai.[87]net.
+[272]n1g.[111]akamai.[87]net.
+[290]n3g.[111]akamai.[87]net.
+[308]n0g.[111]akamai.[87]net.
+e1.clearspring.com.
+[12]e1.clearspring.com.
+[15]clearspring.com.
+usc2.akam.net.
+[15]clearspring.com.
+usw1.[69]akam.net.
+[15]clearspring.com.
+usw6.[69]akam.net.
+[15]clearspring.com.
+asia3.[69]akam.net.
+[15]clearspring.com.
+ns1-33.[69]akam.net.
+[15]clearspring.com.
+ns1-43.[69]akam.net.
+[15]clearspring.com.
+eur2.[69]akam.net.
+[15]clearspring.com.
+usc1.[69]akam.net.
+csi.gstatic.com.
+csi.gstatic.com.
+[12]csi.gstatic.com.
+csi.l.google.com.
+[45]csi.l.google.com.
+[49]l.google.com.
+b.[49]l.google.com.
+[49]l.google.com.
+e.[49]l.google.com.
+[49]l.google.com.
+d.[49]l.google.com.
+[49]l.google.com.
+a.[49]l.google.com.
+[49]l.google.com.
+f.[49]l.google.com.
+[49]l.google.com.
+g.[49]l.google.com.
+[91]b.[49]l.google.com.
+[107]e.[49]l.google.com.
+[123]d.[49]l.google.com.
+[139]a.[49]l.google.com.
+[155]f.[49]l.google.com.
+[171]g.[49]l.google.com.
+www.gstatic.com.
+www.gstatic.com.
+[12]www.gstatic.com.
+www2.l.google.com.
+[45]www2.l.google.com.
+[50]l.google.com.
+d.[50]l.google.com.
+[50]l.google.com.
+f.[50]l.google.com.
+[50]l.google.com.
+e.[50]l.google.com.
+[50]l.google.com.
+b.[50]l.google.com.
+[50]l.google.com.
+a.[50]l.google.com.
+[50]l.google.com.
+g.[50]l.google.com.
+[92]d.[50]l.google.com.
+[108]f.[50]l.google.com.
+[124]e.[50]l.google.com.
+[140]b.[50]l.google.com.
+[156]a.[50]l.google.com.
+[172]g.[50]l.google.com.
+i.ytimg.com.
+i.ytimg.com.
+[12]i.ytimg.com.
+ytimg.l.google.com.
+[41]ytimg.l.google.com.
+[47]l.google.com.
+b.[47]l.google.com.
+[47]l.google.com.
+a.[47]l.google.com.
+[47]l.google.com.
+g.[47]l.google.com.
+[47]l.google.com.
+d.[47]l.google.com.
+[47]l.google.com.
+f.[47]l.google.com.
+[47]l.google.com.
+e.[47]l.google.com.
+[89]b.[47]l.google.com.
+[105]a.[47]l.google.com.
+[121]g.[47]l.google.com.
+[137]d.[47]l.google.com.
+[153]f.[47]l.google.com.
+[169]e.[47]l.google.com.
+news.bbc.co.uk.
+news.bbc.co.uk.
+[12]news.bbc.co.uk.
+newswww.bbc.net.uk.
+[44]newswww.bbc.net.uk.
+[52]bbc.net.uk.
+ns0.rbsov.bbc.co.[60]uk.
+[52]bbc.net.uk.
+ns0.thdo.[102]bbc.co.[60]uk.
+[92]ns0.rbsov.bbc.co.[60]uk.
+[123]ns0.thdo.[102]bbc.co.[60]uk.
+node1.bbcimg.co.uk.
+node1.bbcimg.co.uk.
+[12]node1.bbcimg.co.uk.
+img.bbc.net.uk.
+[48]img.bbc.net.uk.
+[52]bbc.net.uk.
+ns0.rbsov.bbc.co.[60]uk.
+[52]bbc.net.uk.
+ns0.thdo.[102]bbc.co.[60]uk.
+[92]ns0.rbsov.bbc.co.[60]uk.
+[123]ns0.thdo.[102]bbc.co.[60]uk.
+newsimg.bbc.co.uk.
+newsimg.bbc.co.uk.
+[12]newsimg.bbc.co.uk.
+newsimg.bbc.net.uk.
+[47]newsimg.bbc.net.uk.
+news.bbc.co.uk.edgesuite.net.
+[79]news.bbc.co.uk.edgesuite.net.
+a1733.g.akamai.[104]net.
+[121]a1733.g.akamai.[104]net.
+[121]a1733.g.akamai.[104]net.
+[127]g.akamai.[104]net.
+n7g.[129]akamai.[104]net.
+[127]g.akamai.[104]net.
+n6g.[129]akamai.[104]net.
+[127]g.akamai.[104]net.
+n8g.[129]akamai.[104]net.
+[127]g.akamai.[104]net.
+n1g.[129]akamai.[104]net.
+[127]g.akamai.[104]net.
+n3g.[129]akamai.[104]net.
+[127]g.akamai.[104]net.
+n0g.[129]akamai.[104]net.
+[127]g.akamai.[104]net.
+n4g.[129]akamai.[104]net.
+[127]g.akamai.[104]net.
+n2g.[129]akamai.[104]net.
+[127]g.akamai.[104]net.
+n5g.[129]akamai.[104]net.
+[182]n7g.[129]akamai.[104]net.
+[200]n6g.[129]akamai.[104]net.
+[218]n8g.[129]akamai.[104]net.
+[236]n1g.[129]akamai.[104]net.
+[254]n3g.[129]akamai.[104]net.
+[272]n0g.[129]akamai.[104]net.
+[290]n4g.[129]akamai.[104]net.
+[308]n2g.[129]akamai.[104]net.
+[326]n5g.[129]akamai.[104]net.
+stats.bbc.co.uk.
+stats.bbc.co.uk.
+[12]stats.bbc.co.uk.
+[12]stats.bbc.co.uk.
+bbc.co.uk.
+ns1.thls.[65]bbc.co.uk.
+[65]bbc.co.uk.
+ns1.thdo.[65]bbc.co.uk.
+[65]bbc.co.uk.
+ns1.rbsov.[65]bbc.co.uk.
+[65]bbc.co.uk.
+ns1.[65]bbc.co.uk.
+[86]ns1.thls.[65]bbc.co.uk.
+[109]ns1.thdo.[65]bbc.co.uk.
+[132]ns1.rbsov.[65]bbc.co.uk.
+[156]ns1.[65]bbc.co.uk.
+visualscience.external.bbc.co.uk.
+js.revsci.net.
+visualscience.external.bbc.co.uk.
+[12]visualscience.external.bbc.co.uk.
+csvtm.interactionscience.com.
+[62]csvtm.interactionscience.com.
+[68]interactionscience.com.
+ns1.sj1.omniture.[87]com.
+[68]interactionscience.com.
+ns1.sj2.[128]omniture.[87]com.
+[68]interactionscience.com.
+ns1.dal.[128]omniture.[87]com.
+[120]ns1.sj1.omniture.[87]com.
+[151]ns1.sj2.[128]omniture.[87]com.
+[173]ns1.dal.[128]omniture.[87]com.
+js.revsci.net.
+[12]js.revsci.net.
+[15]revsci.net.
+ns3.p16.dynect.[22]net.
+[15]revsci.net.
+ns4.[63]p16.dynect.[22]net.
+[15]revsci.net.
+ns2.[63]p16.dynect.[22]net.
+[15]revsci.net.
+ns1.[63]p16.dynect.[22]net.
+pix04.revsci.net.
+pix04.revsci.net.
+[12]pix04.revsci.net.
+[18]revsci.net.
+ns4.p16.dynect.[25]net.
+[18]revsci.net.
+ns1.[66]p16.dynect.[25]net.
+[18]revsci.net.
+ns3.[66]p16.dynect.[25]net.
+[18]revsci.net.
+ns2.[66]p16.dynect.[25]net.
+pixel.quantserve.com.
+pixel.quantserve.com.
+[12]pixel.quantserve.com.
+map-pb.quantserve.com.akadns.net.
+[50]map-pb.quantserve.com.akadns.net.
+ac-na.[57]quantserve.com.akadns.net.
+[96]ac-na.[57]quantserve.com.akadns.net.
+[96]ac-na.[57]quantserve.com.akadns.net.
+[96]ac-na.[57]quantserve.com.akadns.net.
+[96]ac-na.[57]quantserve.com.akadns.net.
+[96]ac-na.[57]quantserve.com.akadns.net.
+[96]ac-na.[57]quantserve.com.akadns.net.
+[96]ac-na.[57]quantserve.com.akadns.net.
+[72]akadns.net.
+za.akadns.org.
+[72]akadns.net.
+zb.[231]akadns.org.
+[72]akadns.net.
+zc.[231]akadns.org.
+[72]akadns.net.
+zd.[231]akadns.org.
+[72]akadns.net.
+asia9.[72]akadns.net.
+[72]akadns.net.
+eur1.[72]akadns.net.
+[72]akadns.net.
+use3.[72]akadns.net.
+[72]akadns.net.
+use4.[72]akadns.net.
+[72]akadns.net.
+usw2.[72]akadns.net.
+[228]za.akadns.org.
+[255]zb.[231]akadns.org.
+[272]zc.[231]akadns.org.
+[289]zd.[231]akadns.org.
+[306]asia9.[72]akadns.net.
+[326]eur1.[72]akadns.net.
+[345]use3.[72]akadns.net.
+www.vancouversun.com.
+www.vancouversun.com.
+[12]www.vancouversun.com.
+vancouversun.com.
+ns1.canwest.[67]com.
+[54]vancouversun.com.
+ns2.[86]canwest.[67]com.
+[82]ns1.canwest.[67]com.
+[108]ns2.[86]canwest.[67]com.
+www.scan.nowpublic.com.
+www.scan.nowpublic.com.
+[12]www.scan.nowpublic.com.
+a1.panthercdn.com.
+[52]a1.panthercdn.com.
+[55]panthercdn.com.
+ns1.[55]panthercdn.com.
+[55]panthercdn.com.
+ns2.[55]panthercdn.com.
+[99]ns1.[55]panthercdn.com.
+[117]ns2.[55]panthercdn.com.
+a123.g.akamai.net.
+a123.g.akamai.net.
+[12]a123.g.akamai.net.
+[12]a123.g.akamai.net.
+feeds.theplatform.com.
+canwestglobal.112.2o7.net.
+beacon.securestudies.com.
+canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+[12]canwestglobal.112.2o7.net.
+2o7.net.
+ns1.sj1.omniture.com.
+[155]2o7.net.
+ns1.sj2.[182]omniture.com.
+[155]2o7.net.
+ns1.dal.[182]omniture.com.
+[174]ns1.sj1.omniture.com.
+[208]ns1.sj2.[182]omniture.com.
+[230]ns1.dal.[182]omniture.com.
+beacon.securestudies.com.
+[12]beacon.securestudies.com.
+beacon.gta.securestudies.com.
+[54]beacon.gta.securestudies.com.
+[61]gta.securestudies.com.
+gta02.ord.[65]securestudies.com.
+[61]gta.securestudies.com.
+gta01.iad.[65]securestudies.com.
+[61]gta.securestudies.com.
+gta01.[118]ord.[65]securestudies.com.
+[61]gta.securestudies.com.
+gta02.[142]iad.[65]securestudies.com.
+[112]gta02.ord.[65]securestudies.com.
+[136]gta01.iad.[65]securestudies.com.
+[160]gta01.[118]ord.[65]securestudies.com.
+[180]gta02.[142]iad.[65]securestudies.com.
+feeds.theplatform.com.
+[12]feeds.theplatform.com.
+[18]theplatform.com.
+sea1tpgtm01.[18]theplatform.com.
+[18]theplatform.com.
+bfi1tpgtm01.[18]theplatform.com.
+[67]sea1tpgtm01.[18]theplatform.com.
+[93]bfi1tpgtm01.[18]theplatform.com.
+s7.addthis.com.
+s7.addthis.com.
+[12]s7.addthis.com.
+wildcard.addthis.com.edgekey.net.
+[44]wildcard.addthis.com.edgekey.net.
+e2943.c.akamaiedge.[73]net.
+[90]e2943.c.akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n5c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n8c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n0c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n6c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n1c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n4c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n3c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n2c.[98]akamaiedge.[73]net.
+[96]c.akamaiedge.[73]net.
+n7c.[98]akamaiedge.[73]net.
+[139]n5c.[98]akamaiedge.[73]net.
+[157]n8c.[98]akamaiedge.[73]net.
+[175]n0c.[98]akamaiedge.[73]net.
+[193]n6c.[98]akamaiedge.[73]net.
+[211]n1c.[98]akamaiedge.[73]net.
+[229]n4c.[98]akamaiedge.[73]net.
+[247]n3c.[98]akamaiedge.[73]net.
+[265]n2c.[98]akamaiedge.[73]net.
+[283]n7c.[98]akamaiedge.[73]net.
+ad.doubleclick.net.
+ad.doubleclick.net.
+[12]ad.doubleclick.net.
+dart-ad.l.doubleclick.net.
+[48]dart-ad.l.doubleclick.net.
+[48]dart-ad.l.doubleclick.net.
+[56]l.doubleclick.net.
+g.l.google.com.
+[56]l.doubleclick.net.
+a.[121]l.google.com.
+[56]l.doubleclick.net.
+b.[121]l.google.com.
+[56]l.doubleclick.net.
+d.[121]l.google.com.
+[56]l.doubleclick.net.
+e.[121]l.google.com.
+[56]l.doubleclick.net.
+f.[121]l.google.com.
+[119]g.l.google.com.
+[147]a.[121]l.google.com.
+[163]b.[121]l.google.com.
+[179]d.[121]l.google.com.
+[195]e.[121]l.google.com.
+[211]f.[121]l.google.com.
+*** SUCCESS ***
diff --git a/test/btscan1.lm b/test/btscan1.lm
new file mode 100644
index 0000000..558b890
--- /dev/null
+++ b/test/btscan1.lm
@@ -0,0 +1,47 @@
+##### LM #####
+#
+# R1
+#
+namespace r1
+
+ lex
+ literal `! `a `b
+ ignore /[ \n\t]+/
+ end
+
+ def line [ `! `a `b `b `a]
+
+end # r1
+
+#
+# R2
+#
+namespace r2
+
+ lex
+ literal `!
+ token id /[a-zA-Z_]+/
+ ignore /[ \n\t]+/
+ end
+
+ def line [ `! id ]
+
+end # r2
+
+def item
+ [r1::line]
+| [r2::line]
+
+def btscan
+ [item*]
+
+parse P: btscan[ stdin ]
+
+match P ~!abb !abba !aab
+print_xml(P)
+print( '\n' )
+##### IN #####
+!abb !abba !aab
+
+##### EXP #####
+<btscan><_repeat_item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>abb</r2::id></r2::line></item><item><r1::line><r1::_literal_0001>!</r1::_literal_0001><r1::_literal_0003>a</r1::_literal_0003><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0003>a</r1::_literal_0003></r1::line></item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>aab</r2::id></r2::line></item></_repeat_item></btscan>
diff --git a/test/btscan2.lm b/test/btscan2.lm
new file mode 100644
index 0000000..bfc77db
--- /dev/null
+++ b/test/btscan2.lm
@@ -0,0 +1,42 @@
+##### LM #####
+namespace r1
+
+ lex
+ literal `! `a `b
+ ignore /[ \n\t]+/
+ end
+
+ def line [ `! `a `b `b `a]
+
+end # r1
+
+namespace r2
+
+ lex
+ literal `!
+ token id /[a-zA-Z_]+/
+ ignore /[ \n\t]+/
+ end
+
+ def line [ `! id ]
+
+end # r2
+
+def item
+ [r1::line]
+| [r2::line]
+
+def btscan
+ [item*]
+
+cons Parser: parser<btscan> []
+
+send Parser "!ab"
+send Parser "b "
+send Parser "!ab"
+send Parser "ba !aab\n"
+
+print_xml( Parser() )
+print( '\n' )
+##### EXP #####
+<btscan><_repeat_item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>abb</r2::id></r2::line></item><item><r1::line><r1::_literal_0001>!</r1::_literal_0001><r1::_literal_0003>a</r1::_literal_0003><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0005>b</r1::_literal_0005><r1::_literal_0003>a</r1::_literal_0003></r1::line></item><item><r2::line><r2::_literal_0009>!</r2::_literal_0009><r2::id>aab</r2::id></r2::line></item></_repeat_item></btscan>
diff --git a/test/call1.lm b/test/call1.lm
new file mode 100644
index 0000000..82f6c76
--- /dev/null
+++ b/test/call1.lm
@@ -0,0 +1,17 @@
+##### LM #####
+int f1( i: int j: int )
+{
+ return i + j
+}
+
+int main()
+{
+ print( f1(
+ f1( f1( 1 1 ) f1( 1 1 ) )
+ f1( f1( 1 1 ) f1( 1 1 ) )
+ ) '\n' )
+}
+
+main()
+##### EXP #####
+8
diff --git a/test/commitbt.lm b/test/commitbt.lm
new file mode 100644
index 0000000..da78807
--- /dev/null
+++ b/test/commitbt.lm
@@ -0,0 +1,109 @@
+##### LM #####
+# 2010: I'm not sure what the following means.
+
+#
+# Local commit:
+# -clears reparse flags underneath
+# -must be possible to backtrack after
+# Global commit (revertOn)
+# -clears all reparse flags
+# -must be possible to backtrack after
+# Global commit (!revertOn)
+# -clears all reparse flags
+# -clears all 'parsed' reverse code
+# -clears all reverse code
+# -clears all alg structures
+#
+
+# This test shows that a global commit with revertOn correctly does not clear
+# 'parsed' items because it must entertain the possibility of backtracking.
+
+lex
+ ignore /[\t\n ]+/
+ literal `^ `| `- `, `: `! `? `.
+ literal `( `) `{ `} `* `& `+
+
+ literal `-- `:> `:>> `<: `-> `**
+
+ token word /[a-zA-Z_][a-zA-Z0-9_]*/
+ token uint /[0-9]+/
+end
+
+
+def expression [term expression_op*]
+
+def expression_op
+ [`| term]
+| [`& term]
+| [`- term]
+| [`-- term]
+
+def term [factor_rep term_rest]
+
+# This list is done manually to get shortest match.
+def term_rest
+ []
+| [term_op term_rest]
+
+def term_op
+ [factor_rep]
+| [`. factor_rep]
+| [`:> factor_rep]
+| [`:>> factor_rep]
+| [`<: factor_rep]
+
+def factor_rep
+ [factor_neg factor_rep_op*]
+
+def factor_rep_op
+ [`*]
+| [`**]
+| [`?]
+| [`+]
+| [`{ factor_rep_num `}]
+| [`{ `, factor_rep_num `}]
+| [`{ factor_rep_num `, `}]
+| [`{ factor_rep_num `, factor_rep_num `}]
+
+def factor_rep_num [uint]
+
+def factor_neg
+ [`! factor_neg]
+| [`^ factor_neg]
+| [factor]
+
+def factor
+ [alphabet_num]
+| [word]
+| [`( expression `)]
+
+def alphabet_num
+ [uint]
+
+def suint
+ i: int
+ [uint]
+
+def sub
+ [suint* `*]
+
+token item
+ S: sub
+ /[0-9]+/
+ {
+ M: str = input.pull(match_length)
+ parse_stop S: sub[input]
+ input.push( make_token( typeid<item> M S ) )
+ }
+
+def stuff
+ [item* `!]
+| [sub]
+
+parse S: stuff[ stdin ]
+print_xml( S )
+print( '\n' )
+##### IN #####
+1 2 3 * !
+##### EXP #####
+<stuff><_repeat_item><item>1</item></_repeat_item><_literal_000d>!</_literal_000d></stuff>
diff --git a/test/concat1.lm b/test/concat1.lm
new file mode 100644
index 0000000..ee92409
--- /dev/null
+++ b/test/concat1.lm
@@ -0,0 +1,100 @@
+##### LM #####
+
+lex
+ literal `type `include
+ token id /[A-Za-z_][A-Za-z_0-9]*/
+ ignore /'#' [^\n]* '\n'/
+ ignore /[ \t\r\n]+/
+end
+
+lex
+ token ifn_part /[a-zA-Z0-9_.\-]+/
+ token ifn_slash /'/'/
+end
+
+def ifn_path_part
+ [ifn_part]
+| [ifn_slash]
+
+def ifn_path
+ [ifn_path_part ifn_path]
+| [ifn_path_part]
+
+
+literal `%%
+
+lex
+ token em_ws /( any - 33..126 )+/
+end
+
+def em_item
+ [em_ws]
+
+def prelude
+ [em_item* `%%]
+
+def item
+ [`include ifn_path]
+| [`type id]
+
+def start
+ [prelude item*]
+
+start parseStart( InputFile: stream )
+{
+ return parse start[ InputFile ]
+}
+
+start parseTxt( T: str )
+{
+ cons a: parser<start>[]
+ send a [T] eos
+ return a.tree
+}
+
+item* concatItems( IL1: item* IL2: item* )
+{
+ for IL: item* in IL1 {
+ if match IL [] {
+ IL = IL2
+ break
+ }
+ }
+ return IL1
+}
+
+item* expandIncludes( ItemList: ref<item*> )
+{
+ for IL: item* in ItemList {
+ if match IL
+ [`include FN: ifn_path Rest: item*]
+ {
+ S: start = parseTxt(
+ "
+ "%%
+ "
+ )
+
+ match S [em_item* `%% IncludedItems: item*]
+
+ IL = concatItems( IncludedItems Rest )
+ }
+ }
+}
+
+int main()
+{
+ S: start = parseStart(stdin)
+ match S [em_item* `%% ItemList: item*]
+ expandIncludes( ItemList )
+}
+
+main()
+##### IN #####
+
+%%
+
+type foo
+
+include smtp.vpt
+##### EXP #####
diff --git a/test/concat2.lm b/test/concat2.lm
new file mode 100644
index 0000000..781c2f2
--- /dev/null
+++ b/test/concat2.lm
@@ -0,0 +1,98 @@
+##### LM #####
+
+lex
+ literal `type `include
+ token id /[A-Za-z_][A-Za-z_0-9]*/
+ ignore /'#' [^\n]* '\n'/
+ ignore /[ \t\r\n]+/
+end
+
+lex
+ token ifn_part /[a-zA-Z0-9_.\-]+/
+ token ifn_slash /'/'/
+end
+
+def ifn_path_part
+ [ifn_part]
+| [ifn_slash]
+
+def ifn_path
+ [ifn_path_part ifn_path]
+| [ifn_path_part]
+
+
+literal `%%
+
+lex
+ token em_ws /( any - 33..126 )+/
+end
+
+def em_item
+ [em_ws]
+
+def prelude
+ [em_item* `%%]
+
+def item
+ [`include ifn_path]
+| [`type id]
+
+def start
+ [prelude item*]
+
+start parseStart( InputFile: stream )
+{
+ return parse start[ InputFile ]
+}
+
+start parseTxt( T: str )
+{
+ cons a: accum<start>[]
+ send a [T] eos
+ return a.tree
+}
+
+item* concatItems( IL1: item* IL2: item* )
+{
+ for IL: item* in IL1 {
+ if match IL [] {
+ IL = IL2
+ break
+ }
+ }
+ return IL1
+}
+
+item* expandIncludes( ItemList: ref<item*> )
+{
+ for IL: item* in ItemList {
+ if match IL
+ [`include FN: ifn_path Rest: item*]
+ {
+ S: start = parseTxt(
+ "
+ "%%
+ "
+ )
+
+ match S [em_item* `%% IncludedItems: item*]
+
+ IL = concatItems( IncludedItems Rest )
+ }
+ }
+}
+
+int main()
+{
+ S: start = parseStart(stdin)
+ match S [em_item* `%% ItemList: item*]
+ expandIncludes( ItemList )
+}
+
+main()
+##### IN #####
+
+%%
+
+include smtp.vpt
+##### EXP #####
diff --git a/test/construct1.lm b/test/construct1.lm
new file mode 100644
index 0000000..ee9b36b
--- /dev/null
+++ b/test/construct1.lm
@@ -0,0 +1,19 @@
+##### LM #####
+rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/
+rl number_pattern /[0-9]+/
+
+lex
+ ignore /[ \t\n]+/
+ token id /ident_pattern/
+ token number /number_pattern/
+end
+
+def four_ids
+ [id id id id]
+
+Constructed: four_ids = construct four_ids "a b c d"
+print_xml( Constructed )
+print( '\n' )
+
+##### EXP #####
+<four_ids><id>a</id><id>b</id><id>c</id><id>d</id></four_ids>
diff --git a/test/construct2.lm b/test/construct2.lm
new file mode 100644
index 0000000..fd60e9d
--- /dev/null
+++ b/test/construct2.lm
@@ -0,0 +1,14 @@
+##### LM #####
+
+lex
+ ignore /[ \t\n]+/
+ token id /[a-z]+/
+ literal `, `. `* `( `)
+end
+
+def lang [id*]
+
+print( construct lang "a b c" '\n' )
+
+##### EXP #####
+a b c
diff --git a/test/construct3.lm b/test/construct3.lm
new file mode 100644
index 0000000..8edb038
--- /dev/null
+++ b/test/construct3.lm
@@ -0,0 +1,19 @@
+##### LM #####
+
+lex
+ ignore /[ \t\n]+/
+ token id /[a-z0-9]+/
+ literal `, `. `* `( `)
+end
+
+def bigger [`( item* `)]
+
+def item [id] | [bigger]
+
+def lang [item*]
+
+B: bigger = construct bigger "( b1 b2 )"
+print( construct lang "a [B] c" '\n' )
+
+##### EXP #####
+a ( b1 b2 ) c
diff --git a/test/constructex.lm b/test/constructex.lm
new file mode 100644
index 0000000..3596363
--- /dev/null
+++ b/test/constructex.lm
@@ -0,0 +1,44 @@
+##### LM #####
+lex
+ token id /[a-zA-Z_][a-zA-Z0-9_]*/
+ literal `= `< `> `/
+ ignore /[ \t\n\r\v]+/
+end
+
+def attr
+ [id `= id]
+
+def open_tag
+ [`< id attr* `>]
+
+def close_tag
+ [`< `/ id `>]
+
+def tag
+ [open_tag item* close_tag]
+
+def item
+ [tag]
+| [id]
+
+parse PersonTag: tag[ stdin ]
+
+match PersonTag
+ ["<person name=" Val:id attr*">" item* "</person>"]
+
+NameTag1: tag = construct tag
+ ["<name type=person>" ^Val "</name>"]
+
+NameTag2: tag = construct tag
+ "<name type=person>[^Val]</name>"
+
+print( NameTag1 '\n' )
+print( NameTag2 '\n' )
+
+##### IN #####
+<person name=adrian hometown=kingston>
+ <t1 foo=bar2 e=f></t2>
+</person>
+##### EXP #####
+<name type=person>adrian</name>
+<name type=person>adrian</name>
diff --git a/test/context1.lm b/test/context1.lm
new file mode 100644
index 0000000..2832045
--- /dev/null
+++ b/test/context1.lm
@@ -0,0 +1,39 @@
+##### LM #####
+
+context ctx
+ i: int
+ j: int
+ k: int
+
+ lex
+ ignore /space+/
+ literal `* `( `)
+ token id /[a-zA-Z_]+/
+ end
+
+ def foo [id]
+
+ def item
+ [id]
+ | [foo]
+ | [`( item* `)]
+ {
+ i = 0
+ j = i + 1
+ k = j + 1
+ print( k '\n' )
+ }
+
+ def start
+ [item*]
+end # ctx
+
+cons CTX: ctx[]
+parse Input: ctx::start( CTX ) [ stdin ]
+print( Input )
+
+##### IN #####
+a b c ( d e f )
+##### EXP #####
+2
+a b c ( d e f )
diff --git a/test/context2.lm b/test/context2.lm
new file mode 100644
index 0000000..e04354a
--- /dev/null
+++ b/test/context2.lm
@@ -0,0 +1,124 @@
+##### LM #####
+context ruby_here
+
+ rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/
+ rl number_pattern /[0-9]+/
+
+ lex
+ ignore /[ \t\n]+/
+ token id /ident_pattern/
+ token number /number_pattern/
+ literal `<< `* `, `( `) `!
+ end
+
+ HereId: str
+
+ token rest_of_line /[^\n]*'\n'/
+
+ lex
+ ignore /[ \t\n]+/
+ token here_id
+ HereData: here_data
+ /ident_pattern/
+ {
+ # Take the text of the here_id from the input stream.
+ HereId = input.pull( match_length )
+
+ # Get the data up to the rest of the line.
+ parse_stop ROL: rest_of_line(ctx)[ input ]
+
+ # Parse the heredoc data.
+ parse_stop HereData: here_data(ctx)[ input ]
+
+ # Push the rest-of-line data back to the input stream.
+ input.push( $ROL )
+
+ # Send the here_id token. Attach the heredoc data as an attribute.
+ input.push( make_token( typeid<here_id> HereId HereData ) )
+ }
+ end
+
+ lex
+ token here_close_id
+ / ident_pattern '\n' /
+ {
+ if match_text == HereId + '\n' {
+ input.push( make_token(
+ typeid<here_close_id>
+ input.pull( match_length ) ) )
+ }
+ else
+ input.push( make_token( typeid<here_line> input.pull(match_length) ) )
+ }
+
+ token here_line
+ / [^\n]* '\n' /
+ end
+
+ def here_data
+ [here_line* here_close_id]
+
+ def heredoc
+ [`<< here_id]
+
+ def primary
+ [id]
+ | [number]
+ | [heredoc]
+
+ def arglist
+ [primary arglist_more*]
+
+ def arglist_more
+ [`, primary]
+
+ def call
+ [id `( arglist? `)]
+
+ def statement
+ [primary]
+ | [call]
+
+ token foobar /any+/
+
+ def item
+ [statement `!]
+ | [foobar]
+
+ def start
+ [item*]
+
+end # ruby_here
+
+CTX: ruby_here = cons ruby_here []
+
+parse S: ruby_here::start( CTX ) [ stdin ]
+print_xml(S)
+print('\n')
+##### IN #####
+print( <<DATA1, more, <<DATA2, 99 )
+"&^#(@ almost
+!arbitrary text!
+DATA1
+hello
+world
+DATA2
+!
+print( <<DATA1, more, <<DATA2, 99 )
+"&^#(@ almost
+!arbitrary text!
+DATA1
+hello
+world
+DATA2
+# error here
+##### EXP #####
+<ruby_here::start><ruby_here::_repeat_item><ruby_here::item><ruby_here::statement><ruby_here::call><ruby_here::id>print</ruby_here::id><ruby_here::_literal_000d>(</ruby_here::_literal_000d><ruby_here::_opt_arglist><ruby_here::arglist><ruby_here::primary><ruby_here::heredoc><ruby_here::_literal_0007>&lt;&lt;</ruby_here::_literal_0007><ruby_here::here_id>DATA1</ruby_here::here_id></ruby_here::heredoc></ruby_here::primary><ruby_here::_repeat_arglist_more><ruby_here::arglist_more><ruby_here::_literal_000b>,</ruby_here::_literal_000b><ruby_here::primary><ruby_here::id>more</ruby_here::id></ruby_here::primary></ruby_here::arglist_more><ruby_here::arglist_more><ruby_here::_literal_000b>,</ruby_here::_literal_000b><ruby_here::primary><ruby_here::heredoc><ruby_here::_literal_0007>&lt;&lt;</ruby_here::_literal_0007><ruby_here::here_id>DATA2</ruby_here::here_id></ruby_here::heredoc></ruby_here::primary></ruby_here::arglist_more><ruby_here::arglist_more><ruby_here::_literal_000b>,</ruby_here::_literal_000b><ruby_here::primary><ruby_here::number>99</ruby_here::number></ruby_here::primary></ruby_here::arglist_more></ruby_here::_repeat_arglist_more></ruby_here::arglist></ruby_here::_opt_arglist><ruby_here::_literal_000f>)</ruby_here::_literal_000f></ruby_here::call></ruby_here::statement><ruby_here::_literal_0011>!</ruby_here::_literal_0011></ruby_here::item><ruby_here::item><ruby_here::foobar>print( &lt;&lt;DATA1, more, &lt;&lt;DATA2, 99 )
+"&amp;^#(@ almost
+!arbitrary text!
+DATA1
+hello
+world
+DATA2
+# error here
+</ruby_here::foobar></ruby_here::item></ruby_here::_repeat_item></ruby_here::start>
diff --git a/test/context3.lm b/test/context3.lm
new file mode 100644
index 0000000..f990837
--- /dev/null
+++ b/test/context3.lm
@@ -0,0 +1,47 @@
+##### LM #####
+context ctx
+
+ i: int
+ j: int
+ k: int
+
+ lex
+ ignore /space+/
+ literal `* `( `)
+ token id /[a-zA-Z_]+/
+ end
+
+ def foo [id]
+
+ int f()
+ {
+ i = i + 1
+ }
+
+ def item
+ [id]
+ | [foo]
+ | [`( item* `)]
+ {
+ i = 0
+ f()
+ f()
+ f()
+ print( i '\n' )
+ }
+
+
+ def start
+ [item*]
+
+end # ctx
+
+CTX: ctx = cons ctx []
+parse Input: ctx::start( CTX ) [stdin]
+print( Input )
+
+##### IN #####
+a b c ( d ) e f
+##### EXP #####
+3
+a b c ( d ) e f
diff --git a/test/counting1.lm b/test/counting1.lm
new file mode 100644
index 0000000..83e70d5
--- /dev/null
+++ b/test/counting1.lm
@@ -0,0 +1,109 @@
+##### LM #####
+context counting
+
+ #
+ # Regular Definitions
+ #
+ rl rl_ws /[ \t\n\r\v]+/
+ rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
+ rl rl_num /[0-9]+/
+
+ #
+ # Tokens
+ #
+
+ lex
+ # Ignore whitespace.
+ ignore /rl_ws/
+
+ # Tokens.
+ token id /rl_id/
+ token number /rl_num/
+ end
+
+ #
+ # Global Data
+ #
+
+ target: int
+
+ #
+ # Productions
+ #
+
+
+ def get_target
+ [number]
+ {
+ match lhs [Number:number]
+ target = Number.data.atoi()
+ }
+
+ # Arbitrary item.
+ def item
+ [number]
+ | [id]
+
+ # Type definition for the count_items nonterminal.
+ def count_items
+ count: int
+
+ # List production one. The condition stops the
+ # greedy list when it has gone too far.
+ [count_items item]
+ {
+ # Pass up the data
+ lhs.count = r1.count + 1
+ if lhs.count > target {
+ reject
+ }
+ }
+
+ # List production two, the base.
+ | []
+ {
+ lhs.count = 0
+ }
+
+ # Wrapper which prevents short lists from getting through if the parser
+ # encounters an error and needs to backtrack over counted list.
+ def counted_list
+ [get_target count_items]
+ {
+ if r2.count < target {
+ reject
+ }
+ }
+
+ def start
+ [counted_list*]
+ {
+ for List:counted_list in lhs {
+ match List [Count:number Items:count_items]
+ print( 'num items: ' Count.data.atoi() '\n' )
+
+ i: int = 1
+ for Item:item in Items {
+ print( ' item ' i ': ' ^Item '\n' )
+ i = i + 1
+ }
+ }
+ }
+end # counting
+
+cons Counting: counting[]
+parse counting::start(Counting)[ stdin ]
+##### IN #####
+3 1 b c 1 1 0 3 a b c
+##### EXP #####
+num items: 3
+ item 1: 1
+ item 2: b
+ item 3: c
+num items: 1
+ item 1: 1
+num items: 0
+num items: 3
+ item 1: a
+ item 2: b
+ item 3: c
diff --git a/test/counting2.lm b/test/counting2.lm
new file mode 100644
index 0000000..0ca75be
--- /dev/null
+++ b/test/counting2.lm
@@ -0,0 +1,98 @@
+##### LM #####
+
+#
+# Regular Definitions
+#
+
+rl rl_ws /[ \t\n\r\v]+/
+rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
+rl rl_num /[0-9]+/
+
+#
+# Tokens
+#
+
+lex
+ # Ignore whitespace.
+ ignore /rl_ws/
+
+ # Tokens.
+ token id /rl_id/
+ token number /rl_num/
+end
+
+#
+# Productions
+#
+
+# Arbitrary item.
+def item
+ [id]
+| [number]
+
+# List production one. The condition stops the
+# greedy list when it has gone too far.
+def count_items
+ target: int
+ count: int
+
+ [count_items item]
+ {
+ # Pass up the data
+ lhs.target = r1.target
+ lhs.count = r1.count + 1
+
+ if lhs.count > lhs.target {
+ reject
+ }
+ }
+
+ # List production two, the base.
+| [number]
+ {
+ match lhs [Number: number]
+ lhs.target = Number.data.atoi()
+ lhs.count = 0
+ }
+
+
+# Wrapper which prevents short lists from getting through if the parser
+# encounters an error and needs to backtrack over counted list.
+def counted_list
+ [count_items]
+ {
+ if r1.count < r1.target {
+ reject
+ }
+ }
+
+def start
+ [counted_list*]
+ {
+ for List: counted_list in lhs {
+ match List [CountItems:count_items]
+ print( 'num items: ' CountItems.target '\n' )
+
+ i: int = 1
+ for Item:item in CountItems {
+ print( ' item ' i ': ' ^Item '\n' )
+ i = i + 1
+ }
+ }
+ }
+
+parse start[ stdin ]
+##### IN #####
+3 1 b c 1 1 0 3 a b c
+##### EXP #####
+num items: 3
+ item 1: 1
+ item 2: b
+ item 3: c
+num items: 1
+ item 1: 1
+num items: 0
+num items: 3
+ item 1: a
+ item 2: b
+ item 3: c
diff --git a/test/counting3.lm b/test/counting3.lm
new file mode 100644
index 0000000..027f456
--- /dev/null
+++ b/test/counting3.lm
@@ -0,0 +1,130 @@
+##### LM #####
+context counting
+
+ #
+ # Regular Definitions
+ #
+ rl rl_ws /[ \t\n\r\v]+/
+ rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
+ rl rl_num /[0-9]+/
+
+ #
+ # Tokens
+ #
+
+ lex
+ # Ignore whitespace.
+ ignore /rl_ws/
+
+ literal `;
+
+ # Tokens.
+ token id /rl_id/
+ token number /rl_num/
+ end
+
+ #
+ # Global Data
+ #
+
+ target: int
+ count: int
+
+ #
+ # Productions
+ #
+
+ def get_target
+ [number]
+ {
+ count = 0
+ target = r1.data.atoi()
+ print( 'target: ' target '\n' )
+ }
+
+ # Arbitrary item.
+ def item
+ [number]
+ | [id]
+
+ def count_items
+ [one_item count_items]
+ | []
+
+ def one_item
+ [item]
+ {
+ count = count + 1
+ if count > target {
+ reject
+ }
+ print( 'ITEM\n' )
+ }
+
+
+ # Wrapper which prevents short lists from getting through if the parser
+ # encounters an error and needs to backtrack over counted list.
+ def counted_list
+ [get_target count_items]
+ {
+ print( 'trying: ' count ' for: ' target '\n' )
+ if count < target {
+ reject
+ }
+ }
+
+
+ def start
+ [counted_list*]
+ {
+
+ for List: counted_list in lhs {
+ match List [Count: number Items: count_items]
+ print( 'num items: ' Count.data.atoi() '\n' )
+
+ i: int = 1
+ for Item: item in Items {
+ print( ' item ' i ': ' ^Item '\n' )
+ i = i + 1
+ }
+ }
+ print( '*** SUCCESS ***\n' )
+ }
+
+end # counting
+
+cons Counting: counting[]
+parse counting::start(Counting)[ stdin ]
+##### IN #####
+3 1 b c 1 1 0 3 a b c
+##### EXP #####
+target: 3
+ITEM
+ITEM
+ITEM
+ITEM
+trying: 3 for: 3
+target: 1
+ITEM
+ITEM
+trying: 1 for: 1
+target: 0
+ITEM
+trying: 0 for: 0
+target: 3
+ITEM
+ITEM
+ITEM
+trying: 3 for: 3
+num items: 3
+ item 1: 1
+ item 2: b
+ item 3: c
+num items: 1
+ item 1: 1
+num items: 0
+num items: 3
+ item 1: a
+ item 2: b
+ item 3: c
+*** SUCCESS ***
diff --git a/test/counting4.lm b/test/counting4.lm
new file mode 100644
index 0000000..ef9f87f
--- /dev/null
+++ b/test/counting4.lm
@@ -0,0 +1,111 @@
+##### LM #####
+context counting
+
+ #
+ # Regular Definitions
+ #
+ rl rl_ws /[ \t\n\r\v]+/
+ rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
+ rl rl_num /[0-9]+/
+
+ #
+ # Tokens
+ #
+
+ lex
+ # Ignore whitespace.
+ ignore /rl_ws/
+
+ literal `;
+
+ # Tokens.
+ token id /rl_id/
+ token number /rl_num/
+ end
+
+ #
+ # Global Data
+ #
+
+ target: int
+ count: int
+
+ #
+ # Productions
+ #
+
+
+ def get_target
+ [number]
+ {
+ count = 0
+ target = r1.data.atoi()
+ print( 'target: ' target '\n' )
+ }
+
+ # Arbitrary item.
+ def item
+ [number]
+ | [id]
+
+ def count_items
+ [count_inc item count_items]
+ | [count_end]
+
+ def count_inc
+ []
+ {
+ if count < target
+ count = count + 1
+ else
+ reject
+ }
+
+ def count_end
+ []
+ {
+ if count < target
+ reject
+ }
+
+ def counted_list
+ [get_target count_items]
+
+ def start
+ [counted_list*]
+ {
+ for List: counted_list in lhs {
+ match List [Count: number Items: count_items]
+ print( 'num items: ' Count.data.atoi() '\n' )
+
+ i: int = 1
+ for Item: item in Items {
+ print( ' item ' i ': ' ^Item '\n' )
+ i = i + 1
+ }
+ }
+ print( '*** SUCCESS ***\n' )
+ }
+end # counting
+
+cons Counting: counting[]
+parse counting::start(Counting)[stdin]
+##### IN #####
+3 1 b c 1 1 0 3 a b c
+##### EXP #####
+target: 3
+target: 1
+target: 0
+target: 3
+num items: 3
+ item 1: 1
+ item 2: b
+ item 3: c
+num items: 1
+ item 1: 1
+num items: 0
+num items: 3
+ item 1: a
+ item 2: b
+ item 3: c
+*** SUCCESS ***
diff --git a/test/decl1.lm b/test/decl1.lm
new file mode 100644
index 0000000..2d3c03b
--- /dev/null
+++ b/test/decl1.lm
@@ -0,0 +1,5 @@
+##### LM #####
+Int: int = 7
+print( Int '\n' )
+##### EXP #####
+7
diff --git a/test/decl2.lm b/test/decl2.lm
new file mode 100644
index 0000000..79fdc67
--- /dev/null
+++ b/test/decl2.lm
@@ -0,0 +1,5 @@
+##### LM #####
+Str: str = '77'
+print( Str '\n' )
+##### EXP #####
+77
diff --git a/test/decl3.lm b/test/decl3.lm
new file mode 100644
index 0000000..1c9ef23
--- /dev/null
+++ b/test/decl3.lm
@@ -0,0 +1,3 @@
+##### LM #####
+Int: int
+##### EXP #####
diff --git a/test/div.lm b/test/div.lm
new file mode 100644
index 0000000..84dd807
--- /dev/null
+++ b/test/div.lm
@@ -0,0 +1,42 @@
+##### LM #####
+
+i: int = 0
+while ( i < 34 ) {
+ print( (i / 4) '\n' )
+ i = i + 1
+}
+##### EXP #####
+0
+0
+0
+0
+1
+1
+1
+1
+2
+2
+2
+2
+3
+3
+3
+3
+4
+4
+4
+4
+5
+5
+5
+5
+6
+6
+6
+6
+7
+7
+7
+7
+8
+8
diff --git a/test/exit1.lm b/test/exit1.lm
new file mode 100644
index 0000000..1a4f82a
--- /dev/null
+++ b/test/exit1.lm
@@ -0,0 +1,7 @@
+##### LM #####
+
+print( 'before\n' )
+exit( 0 )
+print( 'after\n' )
+##### EXP #####
+before
diff --git a/test/exit2.lm b/test/exit2.lm
new file mode 100644
index 0000000..2105f98
--- /dev/null
+++ b/test/exit2.lm
@@ -0,0 +1,24 @@
+##### LM #####
+
+int f3()
+{
+ I: int = 1
+ exit( 0 )
+}
+
+int f2()
+{
+ I: int = 1
+ f3()
+}
+
+int f1()
+{
+ I: int = 1
+ f2()
+}
+
+I: int = 1
+
+f1()
+##### EXP #####
diff --git a/test/exit3.lm b/test/exit3.lm
new file mode 100644
index 0000000..4cf4686
--- /dev/null
+++ b/test/exit3.lm
@@ -0,0 +1,24 @@
+##### LM #####
+
+int f3()
+{
+ I: int = 1
+ print( "hello\n" )
+}
+
+int f2()
+{
+ I: int = 1
+ f3()
+}
+
+int f1()
+{
+ I: int = 1
+ f2()
+}
+
+I: int = 1
+
+exit( 0 )
+##### EXP #####
diff --git a/test/export1.lm b/test/export1.lm
new file mode 100644
index 0000000..253b688
--- /dev/null
+++ b/test/export1.lm
@@ -0,0 +1,16 @@
+##### LM #####
+lex
+ token id /[a-z]+/
+ ignore /[ \t]+/
+end
+
+def start
+ [id*]
+
+export Start: start
+export Error: str
+
+parse P: start[ stdin ]
+Error = error
+##### IN #####
+##### EXP #####
diff --git a/test/factor1.lm b/test/factor1.lm
new file mode 100644
index 0000000..74c7453
--- /dev/null
+++ b/test/factor1.lm
@@ -0,0 +1,4 @@
+##### LM #####
+print( 'hello\n')
+##### EXP #####
+hello
diff --git a/test/factor2.lm b/test/factor2.lm
new file mode 100644
index 0000000..a368537
--- /dev/null
+++ b/test/factor2.lm
@@ -0,0 +1,4 @@
+##### LM #####
+print( 77 '\n' )
+##### EXP #####
+77
diff --git a/test/factor3.lm b/test/factor3.lm
new file mode 100644
index 0000000..cc988af
--- /dev/null
+++ b/test/factor3.lm
@@ -0,0 +1,3 @@
+##### LM #####
+open( 'x' ('r') )
+##### EXP #####
diff --git a/test/factor4.lm b/test/factor4.lm
new file mode 100644
index 0000000..f0143ea
--- /dev/null
+++ b/test/factor4.lm
@@ -0,0 +1,3 @@
+##### LM #####
+argv
+##### EXP #####
diff --git a/test/factor5.lm b/test/factor5.lm
new file mode 100644
index 0000000..e2be8c0
--- /dev/null
+++ b/test/factor5.lm
@@ -0,0 +1,6 @@
+##### LM #####
+print( argv.pop() '\n' )
+##### ARGS #####
+a
+##### EXP #####
+a
diff --git a/test/factor6.lm b/test/factor6.lm
new file mode 100644
index 0000000..a9c0c19
--- /dev/null
+++ b/test/factor6.lm
@@ -0,0 +1,12 @@
+##### LM #####
+if ( 1 )
+ print( 'a\n' )
+if ( nil )
+ print( 'b\n' )
+if ( true )
+ print( 'c\n' )
+if ( false )
+ print( 'd\n' )
+##### EXP #####
+a
+c
diff --git a/test/forloop1.lm b/test/forloop1.lm
new file mode 100644
index 0000000..31e37fd
--- /dev/null
+++ b/test/forloop1.lm
@@ -0,0 +1,19 @@
+##### LM #####
+lex
+ token id / 'a' .. 'z' /
+ ignore / '\n' | '\t' | ' ' /
+end
+
+def start
+ [id*]
+
+parse P: start[stdin]
+Start: start = P
+for Id: id in Start
+ print( ^Id '\n' )
+##### IN #####
+a b c
+##### EXP #####
+a
+b
+c
diff --git a/test/forloop2.lm b/test/forloop2.lm
new file mode 100644
index 0000000..7d54f8a
--- /dev/null
+++ b/test/forloop2.lm
@@ -0,0 +1,19 @@
+##### LM #####
+lex
+ token id / 'a' .. 'z' /
+ ignore / '\n' | '\t' | ' ' /
+end
+
+def start
+ [id*]
+
+parse P: start[stdin]
+Start: start = P
+for Id: id in triter(Start)
+ print( ^Id '\n' )
+##### IN #####
+d e f
+##### EXP #####
+d
+e
+f
diff --git a/test/forloop3.lm b/test/forloop3.lm
new file mode 100644
index 0000000..3749244
--- /dev/null
+++ b/test/forloop3.lm
@@ -0,0 +1,21 @@
+##### LM #####
+lex
+ token id / 'a' .. 'z' /
+ ignore / '\n' | '\t' | ' ' /
+end
+
+def start
+ [id*]
+
+parse P: start[stdin]
+Start: start = P
+for Id: id in triter(Start) {
+ print( ^Id )
+ print( '\n' )
+}
+##### IN #####
+d e f
+##### EXP #####
+d
+e
+f
diff --git a/test/func1.lm b/test/func1.lm
new file mode 100644
index 0000000..c973e44
--- /dev/null
+++ b/test/func1.lm
@@ -0,0 +1,9 @@
+##### LM #####
+int f()
+{
+ print( 'hello world\n' )
+}
+
+f()
+##### EXP #####
+hello world
diff --git a/test/func2.lm b/test/func2.lm
new file mode 100644
index 0000000..75de72d
--- /dev/null
+++ b/test/func2.lm
@@ -0,0 +1,9 @@
+##### LM #####
+int f( I: int Str: str )
+{
+ print( I ' ' Str '\n' )
+}
+
+f( 50 'hello world' )
+##### EXP #####
+50 hello world
diff --git a/test/func3.lm b/test/func3.lm
new file mode 100644
index 0000000..cdfcbc3
--- /dev/null
+++ b/test/func3.lm
@@ -0,0 +1,40 @@
+##### LM #####
+lex
+ literal `{ `}
+ literal `struct `type
+ token id /[A-Za-z_][A-Za-z_0-9]*/
+ ignore /[ \t\r\n]+/
+end
+
+def attribute
+ [`type id]
+
+def struct
+ [`struct id `{ attribute* `}]
+
+def program
+ [struct*]
+
+int func( P: program )
+{
+ print( P )
+}
+
+int main()
+{
+ parse P: program[ stdin ]
+ func( P )
+}
+
+main()
+
+##### IN #####
+struct S
+{
+ type T
+}
+##### EXP #####
+struct S
+{
+ type T
+}
diff --git a/test/generate1.lm b/test/generate1.lm
new file mode 100644
index 0000000..ef76f8d
--- /dev/null
+++ b/test/generate1.lm
@@ -0,0 +1,759 @@
+##### LM #####
+context generate
+ # Regular definitions
+ rl ident_char /[a-zA-Z_]/
+
+ # List used as a stack of indentations.
+ IndentStack: list<int>
+
+ # Has a newline been sent for this '\n' .. whitespace match.
+ newline_sent: int
+
+ # Tokens.
+ lex
+ # Python keywords.
+ literal `and `del `from `not `while `as `elif `global `or
+ `with `assert `else `if `pass `yield `break `except
+ `import `print `class `exec `in `raise `continue
+ `finally `is `return `def `for `lambda `try
+
+ # Identifiers
+ rl lowercase /'a'..'z'/
+ rl uppercase /'A'..'Z'/
+ rl letter /lowercase | uppercase/
+ token identifier /(letter|'_') (letter | digit | '_')*/
+
+ # Literals
+ rl escapeseq /'\\' any /
+ rl longstringchar /[^\\]/
+ rl shortstringchar_s /[^\\\n']/
+ rl shortstringchar_d /[^\\\n"]/
+ rl longstringitem /longstringchar | escapeseq/
+ rl shortstringitem_s /shortstringchar_s | escapeseq/
+ rl shortstringitem_d /shortstringchar_d | escapeseq/
+ rl longstring /"'''" longstringitem* :>> "'''" | '"""' longstringitem* :>> '"""'/
+ rl shortstring /"'" shortstringitem_s* "'" | '"' shortstringitem_d* '"'/
+ rl stringprefix /"r" | "u" | "ur" | "R" | "U" | "UR" | "Ur" | "uR"/
+ token stringliteral /stringprefix? (shortstring | longstring)/
+
+ # Integers
+ rl hexdigit /digit | 'a'..'f' | 'A'..'F'/
+ rl octdigit /'0'..'7'/
+ rl nonzerodigit /'1'..'9'/
+ rl hexinteger /'0' ('x' | 'X') hexdigit+/
+ rl octinteger /'0' octdigit+/
+ rl decimalinteger /nonzerodigit digit* | '0'/
+ token integer /decimalinteger | octinteger | hexinteger/
+ token longinteger /integer ('l' | 'L')/
+
+ # Floats.
+ rl exponent /('e' | 'E') ('+' | '-')? digit+/
+ rl fraction /'.' digit+/
+ rl intpart /digit+/
+ rl pointfloat /intpart? fraction | intpart '.'/
+ rl exponentfloat /(intpart | pointfloat) exponent/
+ token floatnumber /pointfloat | exponentfloat/
+
+ # Imaginaries.
+ token imagnumber /(floatnumber | intpart) ("j" | "J")/
+
+ # Operators.
+ literal `+ `- `* `** `/ `// `% `<< `>> `& `| `^
+ `~ `< `> `<= `>= `== `!= `<>
+
+ # Delimiters
+ literal `( `) `[ `] `{ `} `@ `, `: `. `` `= `;
+ `+= `-= `*= `/= `//= `%= `&= `|= `^= `>>= `<<=
+ `**=
+
+ literal `...
+
+ # In general whitespace is ignored.
+ ignore WS /' '+/
+
+ # Find and ignore entire blank lines.
+ token BLANK_LINE
+ / '\n' [ \t]* ('#' [^\n]*)? '\n' /
+ {
+ # Need to shorten to take off the newline.
+ # Turn it into ignore.
+ input.push_ignore( make_token( typeid<WS> input.pull(match_length - 1) ) )
+ }
+
+ # Find and ignore comments.
+ token COMMENT
+ / '#' [^\n]* '\n' /
+ {
+ # Need to shorten to take off the newline. Turn it into ignore.
+ input.push_ignore( make_token( typeid<WS> input.pull(match_length - 1) ) )
+ }
+
+ # These tokens are generated
+ token INDENT //
+ token DEDENT //
+ token NEWLINE //
+ ignore IND_WS //
+
+ token INDENTATION
+ /'\n' [ \t]*/
+ {
+ # We have squared up INDENTs and DEDENTs. Ignore the entire match.
+ input.push_ignore( make_token( typeid<WS> input.pull(match_length) ) )
+
+ # We have already sent the newline, compute the indentation level.
+ data_length: int = match_length - 1
+
+ if data_length > IndentStack.top {
+ # The indentation level is more than the level on the top
+ # of the stack. This is an indent event. Send as an INDENT.
+ input.push( make_token( typeid<INDENT> '' ) )
+
+ # Push to the stack as per python manual.
+ IndentStack.push( data_length )
+ } else {
+ while data_length < IndentStack.top {
+ # The indentation level is less than the level on the top of
+ # the stack. Pop the level and send one dedent. This flow of
+ # control will execute until we find the right indentation level
+ # to match up with.
+ IndentStack.pop()
+
+ # Send as a DEDENT
+ input.push( make_token( typeid<DEDENT> '' ) )
+ }
+ }
+
+ # FIXME: if data.length is now > top of stack then error. This
+ # means the outdent does not match anything.
+
+ # First the newline.
+ input.push( make_token( typeid<NEWLINE> '' ) )
+ }
+ end
+
+ # Blank lines or comment lines at the beginning of the file.
+ token LEADER / ( [ \t]* ('#' [^\n]*)? '\n' )* /
+
+ def start
+ [file_input]
+
+ def file_input
+ [file_input_forms*]
+
+ def file_input_forms
+ [statement]
+ | [NEWLINE]
+
+ def statement
+ [stmt_list NEWLINE]
+ | [compound_stmt]
+
+ def stmt_list
+ [simple_stmt another_stmt* opt_semi]
+
+ def another_stmt
+ [`; simple_stmt]
+
+ def opt_semi
+ [`;]
+ | []
+
+ def suite
+ [stmt_list NEWLINE]
+ | [NEWLINE INDENT statement_seq DEDENT]
+
+ def statement_seq
+ [statement_seq statement]
+ | [statement]
+
+ def compound_stmt
+ [if_stmt]
+ | [while_stmt]
+ | [for_stmt]
+ | [funcdef]
+
+ def if_stmt
+ [`if expression `: suite elif_part* opt_else_part]
+
+ def elif_part
+ [`elif expression `: suite]
+
+ def opt_else_part
+ [`else `: suite]
+ | []
+
+ def while_stmt
+ [`while expression `: suite opt_else_part]
+
+ def for_stmt
+ [`for target_list `in expression_list `: suite opt_else_part]
+
+ def funcdef
+ [`def funcname `( opt_parameter_list `) `: suite]
+
+ def funcname
+ [identifier]
+
+ def dotted_name
+ [dotted_name `. identifier]
+ | [identifier]
+
+ def opt_parameter_list
+ [parameter_list]
+ | []
+
+ def parameter_list
+ [defparameter_list defparameter opt_comma]
+
+ def defparameter_list
+ [defparameter_list defparameter `,]
+ | []
+
+ def defparameter
+ [parameter]
+ | [parameter `= expression]
+
+ def sublist
+ [sublist_pl opt_comma]
+
+ def sublist_pl
+ [sublist_pl `, parameter]
+ | [parameter]
+
+ def parameter
+ [identifier]
+ | [`( sublist `)]
+
+ def classname
+ [identifier]
+
+ def simple_stmt
+ [expression_stmt]
+ | [assignment_stmt]
+ | [print_stmt]
+
+ def expression_stmt
+ [expression_list]
+
+ def assignment_stmt
+ [target_equals_list expression_list]
+
+ def target_equals_list
+ [target_equals_list target_equals]
+ | [target_equals]
+
+ def target_equals
+ [target_list `=]
+
+ def target_list
+ [target_list_core opt_comma]
+
+ def target_list_core
+ [target_list_core `, target]
+ | [target]
+
+ def target
+ [target_atom target_ext_rep]
+
+ def target_atom
+ [identifier]
+ | [`( target_list `)]
+ | [`[ target_list `]]
+
+ def target_ext_rep
+ [target_ext target_ext_rep]
+ | []
+
+ def target_ext
+ [attributeref]
+ | [subscription]
+ | [slicing]
+
+ def print_stmt
+ [`print opt_expression_list]
+
+ def opt_expression_list
+ [expression_list]
+ | []
+
+ def expression_list
+ [expression_list_core opt_comma]
+
+ def expression_list_core
+ [expression_list_core `, expression]
+ | [expression]
+
+ def opt_comma
+ [`,]
+ | []
+
+ def expression
+ [or_test `if or_test `else test]
+ | [or_test]
+ | [lambda_form]
+
+ def or_test
+ [or_test `or and_test]
+ | [and_test]
+
+ def and_test
+ [and_test `and not_test]
+ | [not_test]
+
+ def not_test
+ [comparison]
+ | [`not not_test]
+
+ def lambda_form
+ [`lambda opt_parameter_list `: expression]
+
+ def test
+ [or_test]
+ | [lambda_form]
+
+ def comparison
+ [or_expr comparison_part*]
+
+ def comparison_part
+ [comp_operator or_expr]
+
+ def comp_operator
+ [`<] | [`>] | [`==] | [`>=] | [`<=] | [`<>] | [`!=] | [`is] |
+ [`is `not] | [`in] | [`not `in]
+
+ def or_expr
+ [primary]
+
+ def primary
+ [atom primary_ext_rep]
+
+ def atom
+ [identifier]
+ | [pyliteral]
+ | [enclosure]
+
+ def primary_ext_rep
+ [primary_ext primary_ext_rep]
+ | []
+
+ def primary_ext
+ [attributeref]
+ | [subscription]
+ | [slicing]
+ | [call]
+
+ def pyliteral
+ [stringliteral]
+ | [integer]
+ | [longinteger]
+ | [floatnumber]
+ | [imagnumber]
+
+ def enclosure
+ [parenth_form]
+ | [list_display]
+ | [generator_expression]
+ | [dict_display]
+ | [string_conversion]
+
+ def parenth_form
+ [`( opt_expression_list `)]
+
+ def list_display
+ [`[ opt_listmaker `]]
+
+ def opt_listmaker
+ [listmaker]
+ | []
+
+ def listmaker
+ [expression list_for]
+ | [expression listmaker_ext* opt_comma]
+
+ def listmaker_ext
+ [`, expression]
+
+ def opt_list_iter
+ [list_iter]
+ | []
+
+ def list_iter
+ [list_for]
+ | [list_if]
+
+ def list_if
+ [`if test opt_list_iter]
+
+ def list_for
+ [`for expression_list `in testlist opt_list_iter]
+
+ def testlist
+ [test testlist_ext* opt_comma]
+
+ def testlist_ext
+ [`, test ]
+
+ def generator_expression
+ [`( test genexpr_for `)]
+
+ def genexpr_for
+ [`for expression_list `in test opt_genexpr_iter]
+
+ def opt_genexpr_iter
+ [genexpr_iter]
+ | []
+
+ def genexpr_iter
+ [genexpr_for]
+ | [genexpr_if]
+
+ def genexpr_if
+ [`if test opt_genexpr_iter]
+
+ def dict_display
+ [`{ opt_key_datum_list `}]
+
+ def opt_key_datum_list
+ [key_datum_list]
+ | []
+
+ def key_datum_list
+ [key_datum key_datum_list_ext* opt_comma]
+
+ def key_datum_list_ext
+ [`, key_datum]
+
+ def key_datum
+ [expression `: expression]
+
+ def string_conversion
+ [`` expression_list ``]
+
+ def attributeref
+ [`. identifier]
+
+ def subscription
+ [`[ expression_list `]]
+
+ # The natural ordered choice does not suffice here. Must force it.
+
+ def slicing
+ [simple_slicing]
+ | [extended_slicing]
+
+ def simple_slicing
+ [`[ short_slice `]]
+
+ def extended_slicing
+ [`[ slice_list `]]
+
+ def slice_list
+ [slice_item slice_list_ext* opt_comma]
+
+ def slice_list_ext
+ [`, slice_item]
+
+ def slice_item
+ [expression]
+ | [proper_slice]
+ | [ellipsis]
+
+ def proper_slice
+ [short_slice]
+ | [long_slice]
+
+ def short_slice
+ [`:]
+ | [`: upper_bound]
+ | [lower_bound `:]
+ | [lower_bound `: upper_bound]
+
+ def long_slice
+ [short_slice `: stride]
+ | [short_slice `:]
+
+ def lower_bound
+ [expression]
+
+ def upper_bound
+ [expression]
+
+ def stride
+ [expression]
+
+ def ellipsis
+ [`...]
+
+ def call
+ [`( opt_argument_list `)]
+
+ def opt_argument_list
+ [argument_list opt_comma]
+ | []
+
+ def argument_list
+ [positional_arguments opt_comma_keyword_arguments]
+ | [keyword_arguments]
+
+ def positional_arguments
+ [positional_arguments `, expression]
+ | [expression]
+
+ def opt_comma_keyword_arguments
+ [`, keyword_arguments]
+ | []
+
+ def keyword_arguments
+ [keyword_arguments `, keyword_item]
+ | [keyword_item]
+
+ def keyword_item
+ [identifier `= expression]
+
+end # generate
+
+int print_stmts( S: generate::start )
+{
+ for Stmt: generate::statement in S
+ print( 'STMT: ' ^Stmt '\n' )
+}
+
+int print_target_subscriptions_and_slicings( Start: generate::start )
+{
+ for TI: generate::target_ext in Start {
+ if match TI [generate::subscription] {
+ print( 'TARGET SUBSCRIPTION: ' ^TI '\n' )
+ }
+
+ if match TI [generate::simple_slicing] {
+ print( 'TARGET SIMPLE SLICING: ' ^TI '\n' )
+ }
+
+ if match TI [generate::extended_slicing] {
+ print( 'TARGET EXTENDED SLICING: ' ^TI '\n' )
+ }
+ }
+
+}
+
+int print_primary_subscriptions_and_slicings( Start: generate::start )
+{
+ for PI: generate::primary_ext in Start {
+ if match PI [generate::subscription] {
+ print( 'PRIMARY SUBSCRIPTION: ' ^PI '\n' )
+ }
+
+ if match PI [generate::simple_slicing] {
+ print( 'PRIMARY SIMPLE SLICING: ' ^PI '\n' )
+ }
+
+ if match PI [generate::extended_slicing] {
+ print( 'PRIMARY EXTENDED SLICING: ' ^PI '\n' )
+ }
+ }
+}
+
+cons Generate: generate[]
+
+# List used as a stack of indentations.
+Generate.IndentStack = cons list<int> []
+Generate.IndentStack.push( 0 )
+
+# Has a newline been sent for this '\n' .. whitespace match.
+Generate.newline_sent = 0
+
+parse S: generate::start(Generate)[ stdin ]
+
+print( '*** SUCCESS ***\n' )
+print( ^S '\n' )
+print( '***\n' )
+print_stmts( S )
+print_target_subscriptions_and_slicings( S )
+print_primary_subscriptions_and_slicings( S )
+print( '*** SUCCESS ***\n' )
+##### IN #####
+
+# dude, this is a comment
+ # some more
+hello
+def dude():
+ yes
+ awesome;
+
+ # Here we have a comment
+ def realy_awesome(): # hi there
+ in_more
+
+ same_level
+ def one_liner(): first; second # both inside one_liner
+
+ back_down
+
+last_statement
+
+# dude, this is a comment
+ # some more
+hello
+if 1:
+ yes
+ awesome;
+
+ # Here we have a comment
+ if ('hello'): # hi there
+ in_more
+
+ same_level
+ if ['dude', 'dudess'].horsie(): first; second # both inside one_liner
+ 1
+
+ back_down
+
+last_statement
+
+hello = 1.1(20);
+
+# subscription
+a[1] = b[2];
+
+# simple slicing
+c[1:1] = d[2:2];
+
+# simple slicing
+e[1:1, 2:2] = f[3:3, 4:4];
+##### EXP #####
+*** SUCCESS ***
+
+hello
+def dude():
+ yes
+ awesome;
+
+ # Here we have a comment
+ def realy_awesome(): # hi there
+ in_more
+
+ same_level
+ def one_liner(): first; second # both inside one_liner
+
+ back_down
+
+last_statement
+
+# dude, this is a comment
+ # some more
+hello
+if 1:
+ yes
+ awesome;
+
+ # Here we have a comment
+ if ('hello'): # hi there
+ in_more
+
+ same_level
+ if ['dude', 'dudess'].horsie(): first; second # both inside one_liner
+ 1
+
+ back_down
+
+last_statement
+
+hello = 1.1(20);
+
+# subscription
+a[1] = b[2];
+
+# simple slicing
+c[1:1] = d[2:2];
+
+# simple slicing
+e[1:1, 2:2] = f[3:3, 4:4];
+***
+STMT: hello
+STMT: def dude():
+ yes
+ awesome;
+
+ # Here we have a comment
+ def realy_awesome(): # hi there
+ in_more
+
+ same_level
+ def one_liner(): first; second # both inside one_liner
+
+ back_down
+
+STMT: yes
+STMT: awesome;
+
+ # Here we have a comment
+STMT: def realy_awesome(): # hi there
+ in_more
+
+ same_level
+ def one_liner(): first; second # both inside one_liner
+
+STMT: in_more
+
+STMT: same_level
+STMT: def one_liner(): first; second # both inside one_liner
+
+STMT: back_down
+
+STMT: last_statement
+
+# dude, this is a comment
+ # some more
+STMT: hello
+STMT: if 1:
+ yes
+ awesome;
+
+ # Here we have a comment
+ if ('hello'): # hi there
+ in_more
+
+ same_level
+ if ['dude', 'dudess'].horsie(): first; second # both inside one_liner
+ 1
+
+ back_down
+
+STMT: yes
+STMT: awesome;
+
+ # Here we have a comment
+STMT: if ('hello'): # hi there
+ in_more
+
+ same_level
+ if ['dude', 'dudess'].horsie(): first; second # both inside one_liner
+ 1
+
+STMT: in_more
+
+STMT: same_level
+STMT: if ['dude', 'dudess'].horsie(): first; second # both inside one_liner
+STMT: 1
+
+STMT: back_down
+
+STMT: last_statement
+
+STMT: hello = 1.1(20);
+
+# subscription
+STMT: a[1] = b[2];
+
+# simple slicing
+STMT: c[1:1] = d[2:2];
+
+# simple slicing
+STMT: e[1:1, 2:2] = f[3:3, 4:4];
+TARGET SUBSCRIPTION: [1]
+TARGET SIMPLE SLICING: [1:1]
+TARGET EXTENDED SLICING: [1:1, 2:2]
+PRIMARY SUBSCRIPTION: [2]
+PRIMARY SIMPLE SLICING: [2:2]
+PRIMARY EXTENDED SLICING: [3:3, 4:4]
+*** SUCCESS ***
diff --git a/test/generate2.lm b/test/generate2.lm
new file mode 100644
index 0000000..946c478
--- /dev/null
+++ b/test/generate2.lm
@@ -0,0 +1,214 @@
+##### LM #####
+context generate
+ def open_item
+ type: str
+ num: int
+ []
+
+ OpenStack: list<open_item>
+
+ lex
+ token stray_close //
+
+ token ocurly /'{'+/
+ {
+ input.pull( match_length )
+
+ cons OI: open_item( '{' match_length ) []
+ OpenStack.push( OI )
+ i: int = 0
+ while ( i < match_length ) {
+ input.push( make_token( typeid<ocurly> '{' ) )
+ i = i + 1
+ }
+ }
+
+ token ccurly1 //
+ token ccurly2 //
+ token ccurly3 //
+ token missing_curly //
+
+ token tmp1 /'}'+/
+ {
+ if OpenStack.length > 0 && OpenStack.tail.type == '{' {
+ length: int = 3
+ if ( length > match_length )
+ length = match_length
+
+ Tail: open_item = OpenStack.pop()
+ if ( length > Tail.num )
+ length = Tail.num
+
+ if ( length == 1 )
+ input.push( make_token( typeid<ccurly1> input.pull( 1 ) ) )
+ else if ( length == 2 )
+ input.push( make_token( typeid<ccurly2> input.pull( 2 ) ) )
+ else if ( length == 3 )
+ input.push( make_token( typeid<ccurly3> input.pull( 3 ) ) )
+
+ Tail.num = Tail.num - length
+
+ if ( Tail.num > 0 )
+ OpenStack.push( Tail )
+ }
+ else {
+ input.push( make_token( typeid<stray_close> input.pull( match_length ) ) )
+ }
+ }
+
+ token osquare /'['+/
+ {
+ input.pull( match_length )
+ OI: open_item = construct open_item( '[' match_length ) []
+ OpenStack.push( OI )
+ i: int = 0
+ while ( i < match_length ) {
+ input.push( make_token( typeid<osquare> '[' ) )
+ i = i + 1
+ }
+ }
+
+ token csquare1 //
+ token csquare2 //
+ token missing_square //
+
+ token tmp2 /']'+/
+ {
+ if OpenStack.length > 0 && OpenStack.tail.type == '[' {
+ length: int = 2
+ if ( length > match_length )
+ length = match_length
+
+ Tail: open_item = OpenStack.pop()
+ if ( length > Tail.num )
+ length = Tail.num
+
+ if ( length == 1 )
+ input.push( make_token( typeid<csquare1> input.pull( 1 ) ) )
+ else if ( length == 2 )
+ input.push( make_token( typeid<csquare2> input.pull( 2 ) ) )
+
+ Tail.num = Tail.num - length
+
+ if ( Tail.num > 0 )
+ OpenStack.push( Tail )
+ }
+ else {
+ input.push( make_token( typeid<stray_close> input.pull( match_length ) ) )
+ }
+ }
+
+ literal `|
+ token char /any/
+
+ preeof {
+ while ( OpenStack.length > 0 ) {
+ Tail: open_item = OpenStack.pop()
+ i: int
+ if ( Tail.type == '{' ) {
+ i = 0
+ while ( i < Tail.num ) {
+ input.push( make_token( typeid<missing_curly> '}' ) )
+ i = i + 1
+ }
+ }
+ else if ( Tail.type == '[' ) {
+ i = 0
+ while ( i < Tail.num ) {
+ input.push( make_token( typeid<missing_square> ']' ) )
+ i = i + 1
+ }
+ }
+ }
+ }
+ end
+
+ #
+ # Internal Links
+ #
+
+
+ lex
+ literal `http:
+ literal `ftp:
+ literal `mailto:
+ end
+
+ def el_prefix
+ [`http:]
+ | [`ftp:]
+ | [`mailto:]
+
+ def external_link
+ [osquare item* csquare1]
+
+ def internal_link
+ [osquare osquare item* csquare2]
+
+ def unclosed_square
+ [osquare item* missing_square]
+
+ #
+ # Templates
+ #
+
+ def sing_template
+ [ocurly item* ccurly1]
+
+ def template
+ [ocurly ocurly item* ccurly2]
+
+ def parameter
+ [ocurly ocurly ocurly item* ccurly3]
+
+ def unclosed_curly
+ [ocurly item* missing_curly]
+
+ #
+ # Template Parameters
+ #
+
+
+ def U1 []
+ def U2 []
+ def U3 []
+
+ def item
+ [external_link]
+ | [internal_link]
+ | [unclosed_curly]
+ | [sing_template]
+ | [template]
+ | [parameter]
+ | [unclosed_curly]
+ | [stray_close]
+ | [osquare]
+ | [`|]
+ | [char]
+
+ def start
+ [item*]
+
+end # generate
+
+cons Generate: generate[]
+
+Generate.OpenStack = construct list<generate::open_item> []
+Sentinal: generate::open_item = construct generate::open_item( '** SENTINAL **' 1 ) []
+Generate.OpenStack.push( Sentinal )
+
+parse S: generate::start(Generate)[stdin]
+
+if S {
+ for I: generate::external_link in S
+ print( 'EXTERNAL LINK: ' I '\n' )
+
+ for I: generate::internal_link in S
+ print( 'INTERNAL LINK: ' I '\n' )
+}
+##### IN #####
+[external]
+[[internal]]
+##### EXP #####
+EXTERNAL LINK: [external]
+INTERNAL LINK: [[internal]]
diff --git a/test/heredoc.lm b/test/heredoc.lm
new file mode 100644
index 0000000..05bf300
--- /dev/null
+++ b/test/heredoc.lm
@@ -0,0 +1,59 @@
+##### LM #####
+context heredoc
+ rl ident_char /[a-zA-Z_]/
+
+ lex
+ # Tokens
+ token other /(^(ident_char|0|'\n'))+/
+
+ token here_close //
+ token id
+ /ident_char+/
+ {
+ if HereId && HereId == match_text {
+ input.push( make_token(
+ typeid<here_close>
+ input.pull(match_length - 1) ) )
+ }
+ else {
+ input.push( make_token( typeid<id> input.pull(match_length) ) )
+ }
+ }
+
+ token nl /'\n'/
+ end
+
+ def here_name
+ [id]
+ {
+ HereId = $r1
+ }
+
+ HereId: str
+
+ def here_data
+ [here_data_item*]
+
+ def here_data_item
+ [id]
+ | [other]
+ | [nl]
+
+ def start
+ [here_name here_data here_close id nl]
+end # heredoc
+
+cons HereDoc: heredoc[]
+
+parse S: heredoc::start(HereDoc)[stdin]
+print_xml(S)
+print( '\n' )
+##### IN #####
+hello
+random 9392af j9 stuff
+hello
+##### EXP #####
+<heredoc::start><heredoc::here_name><heredoc::id>hello</heredoc::id></heredoc::here_name><heredoc::here_data><heredoc::_repeat_here_data_item><heredoc::here_data_item><heredoc::nl>
+</heredoc::nl></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>random</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::other> 9392</heredoc::other></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>af</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::other> </heredoc::other></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>j</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::other>9 </heredoc::other></heredoc::here_data_item><heredoc::here_data_item><heredoc::id>stuff</heredoc::id></heredoc::here_data_item><heredoc::here_data_item><heredoc::nl>
+</heredoc::nl></heredoc::here_data_item></heredoc::_repeat_here_data_item></heredoc::here_data><heredoc::here_close>hell</heredoc::here_close><heredoc::id>o</heredoc::id><heredoc::nl>
+</heredoc::nl></heredoc::start>
diff --git a/test/ifblock1.lm b/test/ifblock1.lm
new file mode 100644
index 0000000..3797529
--- /dev/null
+++ b/test/ifblock1.lm
@@ -0,0 +1,46 @@
+##### LM #####
+if 1
+ print( '1\n' )
+
+if 2 {
+ print( '2\n' )
+}
+
+if 3 {
+ print( '3\n' )
+ print( '4\n' )
+}
+
+if 0
+ print( '0\n' )
+elsif 0
+ print( '0\n' )
+
+if 0
+ print( '0\n' )
+elsif 1
+ print( '5\n' )
+
+if 0
+ print( '0\n' )
+elsif 0
+ print( '0\n' )
+elsif 1
+ print( '6\n' )
+
+if 0
+ print( '0\n' )
+elsif 0
+ print( '0\n' )
+elsif 0
+ print( '0\n' )
+else
+ print( '7\n' )
+##### EXP #####
+1
+2
+3
+4
+5
+6
+7
diff --git a/test/ignore1.lm b/test/ignore1.lm
new file mode 100644
index 0000000..47f631c
--- /dev/null
+++ b/test/ignore1.lm
@@ -0,0 +1,59 @@
+##### LM #####
+
+#
+# Regular Definitions
+#
+rl rl_ws /[.+ \t\n\r\v]+/
+rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
+
+#
+# Tokens
+#
+
+lex
+ literal `= `< `> `/
+
+ # Ignore whitespace.
+ ignore /rl_ws/
+
+ # Open and close id
+ token id /rl_id/
+end
+
+#
+# Productions
+#
+
+def attr [id `= id]
+
+def attr_list
+ [attr_list attr]
+| []
+
+def open_tag
+ [`< id attr_list `>]
+
+def close_tag
+ [`< `/ id `>]
+
+def tag
+ [open_tag item_list close_tag]
+
+def item_list
+ [item_list tag]
+| []
+
+parse Attrs: attr_list[ stdin ]
+
+print( Attrs )
+
+construct IL: item_list
+ ["<wrapper .[Attrs]. ></wrapper>\n"]
+
+print( IL )
+##### IN #####
++ foo = asdf +
+##### EXP #####
++ foo = asdf +
+<wrapper .+ foo = asdf +
+. ></wrapper>
diff --git a/test/ignore2.lm b/test/ignore2.lm
new file mode 100644
index 0000000..f4aa963
--- /dev/null
+++ b/test/ignore2.lm
@@ -0,0 +1,36 @@
+##### LM #####
+lex
+ ignore /space+/
+ literal `* `( `)
+ token id /[a-zA-Z_]+/
+end
+
+def item
+ [id]
+| [`( item* `)]
+
+def start
+ [item*]
+
+parse Input: start[ stdin ]
+
+cons Output: accum<start> []
+
+for Id: id in Input {
+ send Output
+ "( [^Id] )
+}
+
+S: start = Output()
+
+print( S )
+##### IN #####
+a b c ( chocolate fudge ) d e
+##### EXP #####
+( a )
+( b )
+( c )
+( chocolate )
+( fudge )
+( d )
+( e )
diff --git a/test/ignore3.lm b/test/ignore3.lm
new file mode 100644
index 0000000..ccf9c13
--- /dev/null
+++ b/test/ignore3.lm
@@ -0,0 +1,53 @@
+##### LM #####
+lex
+ ignore /space+/
+ literal `*
+ literal `( -ni
+ literal ni- `)
+ literal `! `;
+ token id /[a-zA-Z_0-9]+/
+end
+
+lex
+ ignore /space+/
+ token inner_t /[a-zA-Z_0-9]+/
+ token empty -
+end
+
+def inner
+ [inner_t*]
+| [empty]
+
+def item
+ [id]
+| [`( inner `)]
+
+def start
+ [item* `;]
+
+parse Start: start[ stdin ]
+
+if ( ! Start ) {
+ print( 'parse error\n' )
+ exit( 0 )
+}
+
+for I: item in Start {
+ print( 'item: .' I '.\n' )
+ if match I [ O: `( Inner: inner C: `) ]
+ print( 'innr: .' O '.' Inner '.' C '.\n' )
+}
+
+##### IN #####
+a b c ( d ) e ( ) f g;
+##### EXP #####
+item: .a .
+item: .b .
+item: .c .
+item: .( d ) .
+innr: .(. d .) .
+item: .e .
+item: .( ) .
+innr: .(. .) .
+item: .f .
+item: .g.
diff --git a/test/ignore4.lm b/test/ignore4.lm
new file mode 100644
index 0000000..cdd94b3
--- /dev/null
+++ b/test/ignore4.lm
@@ -0,0 +1,74 @@
+##### LM #####
+namespace hash
+
+ lex
+ literal `define `include
+ token NL /'\n'/ -ni
+
+ token id /[a-zA-Z_][a-zA-Z_0-9]*/
+ token number /[0-9]+/
+ token string /'"' ( [^"\\] | '\\' any )* '"'/
+
+ ignore /[ \t]+/
+
+ end
+
+ def hash
+ [`define id number NL]
+ | [`include string NL]
+
+end # hash
+
+namespace lang
+
+ lex
+ ignore /space+/
+ literal `* `( `) `; `#
+ token id /[a-zA-Z_][a-zA-Z_0-9]*/
+ token number /[0-9]+/
+ end
+
+ def item
+ [id]
+ | [`( item* `)]
+
+ def statement
+ [item* `;]
+ | [`# hash::hash]
+
+ def start
+ [statement*]
+
+end # lang
+
+parse Input: lang::start[ stdin ]
+
+if ! Input
+ print( error '\n' )
+else {
+ #print( Input.tree '\n' )
+ for H: lang::statement in Input {
+ require H [ lang::`# hash::hash ]
+ print( '--' H '==\n' )
+ }
+}
+##### IN #####
+
+hello;
+
+#include "input1"
+
+#include "input2"
+
+#include "input3"
+
+there;
+##### EXP #####
+--#include "input1"
+==
+--
+#include "input2"
+==
+--
+#include "input3"
+==
diff --git a/test/ignore5.lm b/test/ignore5.lm
new file mode 100644
index 0000000..28a3392
--- /dev/null
+++ b/test/ignore5.lm
@@ -0,0 +1,51 @@
+##### LM #####
+lex
+ ignore /space+/
+ literal `* `! `;
+ literal `( -ni ni- `)
+ token id /[a-zA-Z_0-9]+/
+end
+
+lex
+ ignore /space+/
+ token inner_t /[a-zA-Z_0-9]+/
+
+ token empty -
+end
+
+def inner
+ [empty inner_t*]
+
+def item
+ [id]
+| [`( inner `)]
+
+def start
+ [item* `;]
+
+parse Start: start[ stdin ]
+
+if ( ! Start ) {
+ print( 'parse error\n' )
+ exit( 0 )
+}
+
+for I: item in Start {
+ print( 'item: .' I '.\n' )
+ if match I [ O: `( Inner: inner C: `) ]
+ print( 'innr: .' O '.' Inner '.' C '.\n' )
+}
+
+##### IN #####
+a b c ( d ) e ( ) f g;
+##### EXP #####
+item: .a .
+item: .b .
+item: .c .
+item: .( d ) .
+innr: .(. d .) .
+item: .e .
+item: .( ) .
+innr: .(. .) .
+item: .f .
+item: .g.
diff --git a/test/include1.lm b/test/include1.lm
new file mode 100644
index 0000000..efd29ba
--- /dev/null
+++ b/test/include1.lm
@@ -0,0 +1,5 @@
+##### LM #####
+include 'include1a.lmi'
+print( ' world\n' )
+##### EXP #####
+hello world
diff --git a/test/include1a.lmi b/test/include1a.lmi
new file mode 100644
index 0000000..5de6f69
--- /dev/null
+++ b/test/include1a.lmi
@@ -0,0 +1,2 @@
+
+print( 'hello' )
diff --git a/test/inpush1.lm b/test/inpush1.lm
new file mode 100644
index 0000000..9f7be15
--- /dev/null
+++ b/test/inpush1.lm
@@ -0,0 +1,134 @@
+##### LM #####
+namespace string
+ lex
+ literal `"
+ token data /[^"\\]+/
+ token escape /'\\' any/
+ end
+
+ def string_data
+ [data]
+ | [escape]
+
+ def string
+ [`" string_data* `"]
+
+ str unquote( S: string )
+ {
+ match S [`" DL: string_data* `"]
+ for E: escape in DL
+ E.data = 'x'
+ return $DL
+ }
+
+end # string
+
+namespace hash
+
+ lex
+ literal `define `include
+ literal `#
+ token NL /'\n'/ -ni
+
+ token id /[a-zA-Z_][a-zA-Z_0-9]*/
+ token number /[0-9]+/
+
+ ignore /[ \t]/
+ end
+
+ def hash
+ [`# `define Id: id number NL]
+ | [`# `include Inc: string::string NL]
+
+end # hash
+
+token rest_of_line /[^\n]* '\n'/
+
+namespace lang
+
+ lex
+ ignore /space/
+ literal `* `( `) `;
+ token id /[a-zA-Z_][a-zA-Z_0-9]*/
+ token number /[0-9]+/
+
+ token hash /'#'/ {
+ parse_stop H: hash::hash[ input ]
+ if ( H ) {
+ if ( H.Inc ) {
+ FN: str = unquote( H.Inc )
+ print( 'opening ' FN '\n' )
+ IS: stream = open( FN 'r' )
+ if ( ! IS ) {
+ print( 'ERROR: failed to open ' FN '\n' )
+ exit(1)
+ }
+ input.push( IS )
+ }
+ }
+ else {
+ parse_stop L: rest_of_line[ input ]
+ if ! L {
+ print( "ERROR: stuck: " error )
+ exit(1)
+ }
+ print( "ERROR: failed to parse # directive: " L )
+ }
+ }
+ end
+
+ def item
+ [id]
+ | [`( item* `)]
+
+ def statement
+ [item* `;]
+
+ def start
+ [statement*]
+
+end # lang
+
+parse Input: lang::start[ stdin ]
+
+if ! Input
+ print( error '\n' )
+else {
+ print( Input )
+}
+##### IN #####
+
+hello;
+
+#include "inpush1a.in"
+
+there;
+
+#include "inpush1b.in"
+
+dude;
+
+#include "inpush1c.in"
+
+and dudettes;
+##### EXP #####
+opening inpush1a.in
+opening inpush1b.in
+opening inpush1c.in
+
+hello;
+
+a;
+b;
+
+there;
+
+c;
+d;
+
+dude;
+
+e;
+f;
+
+and dudettes;
diff --git a/test/inpush1a.in b/test/inpush1a.in
new file mode 100644
index 0000000..26da0af
--- /dev/null
+++ b/test/inpush1a.in
@@ -0,0 +1,2 @@
+a;
+b;
diff --git a/test/inpush1b.in b/test/inpush1b.in
new file mode 100644
index 0000000..6c57432
--- /dev/null
+++ b/test/inpush1b.in
@@ -0,0 +1,2 @@
+c;
+d;
diff --git a/test/inpush1c.in b/test/inpush1c.in
new file mode 100644
index 0000000..5373832
--- /dev/null
+++ b/test/inpush1c.in
@@ -0,0 +1,2 @@
+e;
+f;
diff --git a/test/island.lm b/test/island.lm
new file mode 100644
index 0000000..8515eb4
--- /dev/null
+++ b/test/island.lm
@@ -0,0 +1,85 @@
+##### LM #####
+
+lex
+ token func_chr /[^{}]+/
+ token func_open /'{'/
+ token func_close /'}'/
+end
+
+def func_item
+ [func_chr]
+| [func_open func_body func_close]
+
+def func_body
+ [func_item*]
+
+def func
+ [ident `( `) `{ func_body func_close ]
+
+lex
+ token ident /[a-zA-Z_]+/
+ token number /[0-9]+/
+
+ rl s_string / "'" ([^'\\\n] | '\\' any )* "'" /
+ rl d_string / '"' ([^"\\\n] | '\\' any )* '"' /
+ token string /s_string | d_string/
+
+ literal `+ `* `; `( `) `{ `}
+
+ ignore wp / [ \t\n]+ /
+end
+
+def class_item
+ [func]
+| [class]
+| [ident `;]
+| [number `;]
+| [string `;]
+
+def class_body
+ [class_item*]
+
+def class
+ [ident `{ class_body `} ]
+
+def top_item
+ [func]
+| [class]
+
+def start
+ [top_item*]
+
+parse S: start[ stdin ]
+print_xml( S )
+print( '\n' )
+
+#pattern start
+# ~class { func() { func() { 1+{2}} } } func() {{a}}
+##### IN #####
+class
+{
+ 1;
+ "string";
+ foo;
+ func()
+ {
+ func()
+ {
+ 1+{2}
+ }
+ }
+}
+
+func()
+{
+ "data"
+ {a}
+}
+##### EXP #####
+<start><_repeat_top_item><top_item><class><ident>class</ident><_literal_0017>{</_literal_0017><class_body><_repeat_class_item><class_item><number>1</number><_literal_0011>;</_literal_0011></class_item><class_item><string>"string"</string><_literal_0011>;</_literal_0011></class_item><class_item><ident>foo</ident><_literal_0011>;</_literal_0011></class_item><class_item><func><ident>func</ident><_literal_0013>(</_literal_0013><_literal_0015>)</_literal_0015><_literal_0017>{</_literal_0017><func_body><_repeat_func_item><func_item><func_chr>func()
+ </func_chr></func_item><func_item><func_open>{</func_open><func_body><_repeat_func_item><func_item><func_chr>
+ 1+</func_chr></func_item><func_item><func_open>{</func_open><func_body><_repeat_func_item><func_item><func_chr>2</func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func_item><func_item><func_chr>
+ </func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func_item><func_item><func_chr>
+ </func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func></class_item></_repeat_class_item></class_body><_literal_0019>}</_literal_0019></class></top_item><top_item><func><ident>func</ident><_literal_0013>(</_literal_0013><_literal_0015>)</_literal_0015><_literal_0017>{</_literal_0017><func_body><_repeat_func_item><func_item><func_chr>"data"
+ </func_chr></func_item><func_item><func_open>{</func_open><func_body><_repeat_func_item><func_item><func_chr>a</func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func_item><func_item><func_chr>
+</func_chr></func_item></_repeat_func_item></func_body><func_close>}</func_close></func></top_item></_repeat_top_item></start>
diff --git a/test/lhs1.lm b/test/lhs1.lm
new file mode 100644
index 0000000..f40297f
--- /dev/null
+++ b/test/lhs1.lm
@@ -0,0 +1,42 @@
+##### LM #####
+
+lex
+ ignore /space+/
+ literal `* `( `) `!
+ token SEMI_NL /';\n'/
+ token id /[a-zA-Z_0-9]+/
+end
+
+def item
+ [id]
+ {
+ lhs = cons item ["( " ^r1 " )"]
+ }
+| [`( item* `)]
+ {
+ lhs = cons item ["( " ^r2 " )"]
+ }
+
+def A
+ [] {
+ print( 'A\n' )
+ }
+
+def B
+ [] {
+ print( 'B\n' )
+ }
+
+def start
+ [A item* `!]
+| [B item* SEMI_NL]
+
+parse Start: start[ stdin ]
+print( Start "\n" )
+##### IN #####
+a b c ( d1 d2 ) e f g ;
+##### EXP #####
+A
+B
+( a )( b )( c )( ( d1 )( d2 ) )( e )( f )( g );
+
diff --git a/test/liftattrs.lm b/test/liftattrs.lm
new file mode 100644
index 0000000..574ea35
--- /dev/null
+++ b/test/liftattrs.lm
@@ -0,0 +1,83 @@
+##### LM #####
+
+#
+# Regular Definitions
+#
+rl rl_ws /[ \t\n\r\v]+/
+rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
+
+#
+# Tokens
+#
+
+lex
+ literal `= `< `> `/
+
+ # Ignore whitespace.
+ ignore /rl_ws/
+
+ # Open and close id
+ token id /rl_id/
+end
+
+#
+# Productions
+#
+
+def attr [id `= id]
+
+def attr_list
+ [attr_list attr]
+| []
+
+def open_tag
+ [`< id attr_list `>]
+
+def close_tag
+ [`< `/ id `>]
+
+def tag
+ [open_tag item_list close_tag]
+
+def item_list
+ [item_list tag]
+| []
+
+parse ILP: item_list[stdin]
+IL: item_list = ILP
+
+# Get the item list
+match IL [RootItemList: item_list]
+
+# List for collecting the attrs we pull out.
+CollectedAttrs: attr_list = construct attr_list []
+
+# Iterate through all attributes
+for AttrListIter:attr_list in RootItemList {
+ # If the name of the attr is foo, remove it.
+ if match AttrListIter
+ [SubAttrList:attr_list "foo=" Val:id]
+ {
+ # Remove the attribute
+ AttrListIter = construct attr_list
+ [SubAttrList]
+
+ # Add it to the colection
+ CollectedAttrs = construct attr_list
+ [CollectedAttrs " foo=" ^Val]
+ }
+}
+
+# Reconstruct the left hand side with the
+IL = construct item_list
+ ["<wrapper " ^CollectedAttrs ">" ^RootItemList "</wrapper>"]
+
+print( ^IL '\n' )
+##### IN #####
+<t1 a=b foo=bar1 c=d>
+ <t2 foo=bar2 e=f></t2>
+</t1>
+##### EXP #####
+<wrapper foo=bar1 foo=bar2><t1 a=b c=d>
+ <t2 e=f></t2>
+</t1></wrapper>
diff --git a/test/literal1.lm b/test/literal1.lm
new file mode 100644
index 0000000..b18c2b7
--- /dev/null
+++ b/test/literal1.lm
@@ -0,0 +1,4 @@
+##### LM #####
+print( '\hello\tworld\n' )
+##### EXP #####
+hello world
diff --git a/test/lookup1.lm b/test/lookup1.lm
new file mode 100644
index 0000000..7eaf58f
--- /dev/null
+++ b/test/lookup1.lm
@@ -0,0 +1,2416 @@
+##### LM #####
+context lookup
+ #
+ # Data types for global data.
+ #
+
+ # Language objects.
+ def lang_object
+ typeId: int
+ name: str
+
+ # If the object is a typedef, this points to the real object.
+ typedefOf: ptr<lang_object>
+
+ objectMap: map<str list<ptr<lang_object>>>
+ inherited: list<ptr<lang_object>>
+ lookupParent: ptr<lang_object>
+ specializationOf: ptr<lang_object>
+ []
+
+ # This structure is used to keep track of information necessary to make a
+ # declaration. While parsing a declaration it records the declaration's
+ # attributes.
+ def declaration_data
+ isTypedef: int
+ isFriend: int
+ isTemplate: int
+
+ typeObj: ptr<lang_object>
+ []
+
+ def declarator_data
+ qualObj: ptr<lang_object>
+ pdcScope: ptr<lang_object>
+ lookupObj: ptr<lang_object>
+ []
+
+ # Constants for language object types.
+ NamespaceType: int
+ ClassType: int
+ TemplateClassType: int
+ EnumType: int
+ IdType: int
+ TypedefType: int
+ TemplateIdType: int
+
+ #
+ # Global data declarations
+ #
+
+ # Object stacks.
+ curNamespace: list<ptr<lang_object>>
+ declNs: list<ptr<lang_object>>
+ lookupNs: list<ptr<lang_object>>
+ qualNs: list<ptr<lang_object>>
+ templateParamNs: list<ptr<lang_object>>
+
+ # Declaration, declarator data.
+ declarationData: list<declaration_data>
+ declaratorData: list<declarator_data>
+
+ # Template declarations
+ templDecl: list<int>
+
+ # Root namespace object
+ rootNamespace: ptr<lang_object>
+
+ #
+ # Identifier lookup.
+ #
+
+ # Lookup the token in the members of an object.
+ ptr<lang_object> lookupInObject( obj: ptr<lang_object> name: str )
+ {
+ # LOG print( ' looking in ', obj->name, '\n' )
+
+ ol: list<ptr<lang_object>> = obj->objectMap.find( name )
+ if ol {
+ # LOG print( ' * found an object: ', ol.head, '\n' )
+ return ol.head
+ }
+
+ return nil
+ }
+
+ # Lookup in an object and all the objects beneath it in the inheritance
+ # tree.
+ ptr<lang_object> lookupWithInheritance( obj: ptr<lang_object> name: str )
+ {
+ found: ptr<lang_object> = lookupInObject( obj name )
+ if found
+ return found
+
+ localObjInherited: list<ptr<lang_object>> = obj->inherited
+ for II: ptr<lang_object> in localObjInherited {
+ inh: ptr<lang_object> = II
+
+ # First check if the inherited object is the one we are after.
+ if inh->name == name && inh->typeId == ClassType {
+ # LOG print( ' * found a class name\n' )
+ return inh
+ }
+
+ # Otherwise look inside the inherited object.
+ found = lookupWithInheritance( inh name )
+ if found
+ return found
+ }
+
+ return nil
+ }
+
+ ptr<lang_object> unqualifiedLookup( name: str )
+ {
+ found: ptr<lang_object>
+
+ # Start with the objects in the templateParamNs.
+ localTemplateParamNs: list<ptr<lang_object>> = templateParamNs
+ for TemplParaObjIter: ptr<lang_object> in rev_child(localTemplateParamNs) {
+ found = lookupWithInheritance( TemplParaObjIter name )
+ if found
+ break
+ }
+
+ if !found {
+ # Iterator over the objects starting at the head of the lookup stack
+ # and going up through the lookup parents.
+ lookupIn: ptr<lang_object> = lookupNs.top
+ while lookupIn {
+ found = lookupWithInheritance( lookupIn name )
+ if found
+ break
+ lookupIn = lookupIn->lookupParent
+ }
+ }
+
+ return found
+ }
+
+ # The C++ scanner.
+ lex
+ rl fract_const / digit* '.' digit+ | digit+ '.' /
+ rl exponent / [eE] [+\-]? digit+ /
+ rl float_suffix / [flFL] /
+
+ # Single and double literals.
+ token TK_SingleLit /( 'L'? "'" ( [^'\\\n] | '\\' any )* "'" )/
+ token TK_DoubleLit /( 'L'? '"' ( [^"\\\n] | '\\' any )* '"' )/
+
+ literal `extern `namespace `friend `typedef `auto `register
+ `static `mutable `inline `virtual `explicit `const
+ `volatile `restrict `class `struct `union `template
+ `private `protected `public `using `void `char
+ `wchar_t `bool `int `float `double `short `long
+ `signed `unsigned `enum `new `delete `operator
+ `typename `export `throw `try `catch `sizeof
+ `dynamic_cast `static_cast `reinterpret_cast `const_cast
+ `typeid `this `true `false `switch `case `default
+ `if `else `while `do `for `break `continue
+ `return `goto
+
+ # Extensions
+ literal `__typeof `__is_pod `__is_empty
+
+ literal `{ `} `; `, `= `( `) `: `& `* `[ `] `~ `+ `-
+ `/ `< `> `| `^ `% `! `? `.
+
+ literal `:: `== `!= `&& `|| `*= `/= `%= `+= `-= `&=
+ `^= `|= `++ `-- `-> `->* `.* `... `<<= `>>=
+
+ # Token translation targets.
+ def unknown_id [lookup_id]
+ def class_id [lookup_id]
+ def namespace_id [lookup_id]
+ def templ_class_id [lookup_id]
+ def enum_id [lookup_id]
+ def typedef_id [lookup_id]
+ def identifier [lookup_id]
+ def template_id [lookup_id]
+
+ # Identifiers
+ token lookup_id
+ obj: ptr<lang_object>
+ qualObj: ptr<lang_object>
+
+ /( [a-zA-Z_] [a-zA-Z0-9_]* )/
+ {
+ name: str = match_text
+ found: ptr<lang_object> = nil
+ qualObj: ptr<lang_object> = nil
+ if qualNs.top {
+ # LOG print( 'qualified lookup of ', name, '\n' )
+
+ # Transfer the qualification to the token and reset it.
+ qualObj = qualNs.top
+ qualNs.top = nil
+
+ # Lookup using the qualification.
+ found = lookupWithInheritance( qualObj name )
+ }
+ else {
+ # No qualification, full search.
+ # LOG print( 'unqualified lookup of ', name, '\n' )
+ found = unqualifiedLookup( name )
+ }
+
+ # If no match, return an Unknown ID
+ id: int = typeid<unknown_id>
+ if found
+ id = found->typeId
+
+ LookupId: any = make_token( typeid<lookup_id>
+ input.pull(match_length) found qualObj )
+ input.push( make_tree( id LookupId ) )
+
+ }
+
+ # Floats.
+ token TK_Float /( fract_const exponent? float_suffix? |
+ digit+ exponent float_suffix? )/
+
+ # Integer decimal. Leading part buffered by float.
+ token TK_IntegerDecimal /( ( '0' | [1-9] [0-9]* ) [ulUL]{0,3} )/
+
+ # Integer octal. Leading part buffered by float.
+ token TK_IntegerOctal /( '0' [0-9]+ [ulUL]{0,2} )/
+
+ # Integer hex. Leading 0 buffered by float.
+ token TK_IntegerHex /( '0x' [0-9a-fA-F]+ [ulUL]{0,2} )/
+
+ # Preprocessor line.
+ ignore /'#' [^\n]* '\n'/
+
+ # Comments and whitespace.
+ ignore /( '/*' (any | '\n')* :>> '*/' )/
+ ignore /( '//' any* :> '\n' )/
+ ignore /( any - 33..126 )+/
+ end
+
+ #
+ # Support functions
+ #
+
+ typeId: int
+ name: str
+
+ # If the object is a typedef, this points to the real object.
+ typedefOf: ptr<lang_object>
+
+ objectMap: map<str list<ptr<lang_object>>>
+ inherited: list<ptr<lang_object>>
+ lookupParent: ptr<lang_object>
+ specializationOf: ptr<lang_object>
+
+ ptr<lang_object> createLangObject( typeId: int name: str lookupParent: ptr<lang_object> )
+ {
+ obj: ptr<lang_object> = new construct lang_object(
+ typeId
+ name
+ nil
+ construct map<str list<ptr<lang_object>>> []
+ construct list<ptr<lang_object>> []
+ lookupParent ) []
+ return obj
+ }
+
+ # Building the language object tree.
+ int insertObject( definedIn: ptr<lang_object> name: str obj: ptr<lang_object> )
+ {
+ ol: list<ptr<lang_object>> = definedIn->objectMap.find( name )
+ if !ol {
+ # Element not in the map already
+ ol = construct list<ptr<lang_object>> []
+ }
+ ol.append( obj )
+ definedIn->objectMap.store( name ol )
+ }
+
+ ptr<lang_object> findClass( inObj: ptr<lang_object>name: str )
+ {
+ ol: list<ptr<lang_object>> = inObj->objectMap.find( name )
+ if ol {
+ for ObjIter: ptr<lang_object> in ol {
+ obj: ptr<lang_object> = ObjIter
+ if obj->typeId == ClassType {
+ return obj
+ }
+ }
+ }
+ return nil
+ }
+
+ ptr<lang_object> findTemplateClass( inObj: ptr<lang_object> name: str )
+ {
+ ol: list<ptr<lang_object>> = inObj->objectMap.find( name )
+ if ol {
+ for ObjIter: ptr<lang_object> in ol {
+ obj: ptr<lang_object> = ObjIter
+ if obj->typeId == TemplateClassType
+ return obj
+ }
+ }
+ return nil
+ }
+
+ def root_qual_opt
+ []
+ | [`::]
+
+ def nested_name_specifier_opt
+ [nested_name_specifier_opt qualifying_name `:: designated_qualifying_name `::]
+ | [nested_name_specifier_opt qualifying_name `::]
+ | []
+
+ def nested_name_specifier
+ [nested_name_specifier designated_qualifying_name `::]
+ | [nested_name_specifier qualifying_name `::]
+ | [qualifying_name `::]
+
+ def qualifying_name
+ [class_name]
+ {
+ qualNs.top = r1.lookupId.obj
+ }
+
+ | [namespace_id]
+ {
+ match r1 [Id: lookup_id]
+ qualNs.top = Id.obj
+ }
+
+ | [typedef_id]
+ {
+ match r1 [Id: lookup_id]
+ qualNs.top = Id.obj->typedefOf
+ }
+
+ def designated_qualifying_name
+ [`template any_id]
+ {
+ # FIXME: nulling qualNs is not the right thing to do here.
+ qualNs.top = nil
+ }
+
+ | [`template any_id
+ templ_arg_open template_argument_list_opt templ_arg_close]
+ {
+ # FIXME: nulling qualNs is not the right thing to do here.
+ qualNs.top = nil
+ }
+
+ #
+ # Id Expression
+ #
+
+ def id_expression
+ lookupId: lookup_id
+
+ [root_qual_opt nested_name_specifier_opt unknown_id]
+ {
+ lhs.lookupId = lookup_id in r3
+ }
+
+ | [root_qual_opt nested_name_specifier_opt identifier]
+ {
+ lhs.lookupId = lookup_id in r3
+ }
+
+ | [root_qual_opt nested_name_specifier_opt operator_function_id]
+ {
+ # Normally the token translation transfers the qualification. Since
+ # the operator_function_id does not end in a lookup we must do it ourselves.
+ qualObj: ptr<lang_object> = qualNs.top
+ qualNs.top = nil
+
+ lhs.lookupId = construct lookup_id ["x"]
+ lhs.lookupId.data = '<operator_function_id>'
+ lhs.lookupId.qualObj = qualObj
+ }
+
+ | [root_qual_opt nested_name_specifier_opt conversion_function_id]
+ {
+ # Normally the token translation transfers the qualification. Since
+ # the operator_function_id does not } in a lookup we must do it ourselves.
+ qualObj: ptr<lang_object> = qualNs.top
+ qualNs.top = nil
+
+ # Do we need qual reset here becauase operator_function_id does not do it?
+ lhs.lookupId = construct lookup_id ["x"]
+ lhs.lookupId.data = '<conversion_function_id>'
+ lhs.lookupId.qualObj = qualObj
+ }
+
+ | [root_qual_opt nested_name_specifier_opt `~ class_name]
+ {
+ lhs.lookupId = r4.lookupId
+ }
+
+ | [root_qual_opt nested_name_specifier_opt template_name]
+ {
+ lhs.lookupId = r3.lookupId
+ }
+
+ def template_name
+ lookupId: lookup_id
+
+ [template_id templ_arg_open template_argument_list_opt templ_arg_close]
+ {
+ lhs.lookupId = lookup_id in r1
+ }
+
+ | [template_id]
+ {
+ lhs.lookupId = lookup_id in r1
+ }
+
+
+ #
+ # Class Names
+ #
+
+ def class_name
+ lookupId: lookup_id
+
+ [class_id]
+ {
+ lhs.lookupId = lookup_id in r1
+ }
+
+ | [templ_class_id]
+ {
+ lhs.lookupId = lookup_id in r1
+ }
+
+ | [templ_class_id templ_arg_open template_argument_list_opt templ_arg_close]
+ {
+ # TODO: Look for a specialization.
+ lhs.lookupId = lookup_id in r1
+ }
+
+ def templ_arg_open
+ [`<]
+ {
+ qualNs.push( nil )
+ }
+
+ def templ_arg_close
+ [`>]
+ {
+ qualNs.pop()
+ }
+
+ def declaration
+ [block_declaration] commit
+ | [function_definition] commit
+ | [template_declaration] commit
+ | [explicit_instantiation] commit
+ | [explicit_specialization] commit
+ | [linkage_specification] commit
+ | [namespace_definition] commit
+
+ #
+ # Declarations
+ #
+
+ def block_declaration
+ [simple_declaration]
+ | [using_declaration]
+ | [using_directive]
+
+ def simple_declaration
+ [declaration_start simple_declaration_forms declaration_end `;]
+
+ # Ordering is important for optimization. The form with the optional
+ # decl_specifier_sing should go second.
+ def simple_declaration_forms
+ [decl_specifier_mult_seq_opt decl_specifier_sing
+ decl_specifier_mult_seq_opt init_declarator_list_opt]
+
+ | [decl_specifier_mult_seq_opt init_declarator_list_opt]
+
+ def declaration_start
+ []
+ {
+ # LOG print( 'opening new declaration_data with templDecl: ', templDecl.top, '\n' )
+ declarationData.push( construct declaration_data ( 0 0 0 ) [] )
+
+ # Transfer the template flag and reset it.
+ declarationData.top.isTemplate = templDecl.top
+ templDecl.push( 0 )
+ }
+
+ def declaration_end
+ []
+ {
+ # LOG print( 'closing declaration_data\n' )
+ declarationData.pop()
+ templDecl.pop()
+ }
+
+ def decl_specifier_sing
+ [type_specifier_sing]
+ {
+ # Store the object type of the declaration (if any) for use
+ # by typedefs.
+ declarationData.top.typeObj = r1.lookupId.obj
+ }
+
+ def type_specifier_seq
+ lookupId: lookup_id
+
+ [type_specifier_mult_seq_opt type_specifier_sing type_specifier_mult_seq_opt]
+ {
+ lhs.lookupId = r2.lookupId
+ }
+
+ def type_specifier_sing
+ lookupId: lookup_id
+
+ [simple_type_specifier]
+ {
+ lhs.lookupId = r1.lookupId
+ }
+
+ | [class_specifier]
+ {
+ lhs.lookupId = construct lookup_id ["x"]
+ lhs.lookupId.data = '<class_specifier>'
+ }
+
+ | [enum_specifier]
+ {
+ lhs.lookupId = construct lookup_id ["x"]
+ lhs.lookupId.data = '<enum_specifier>'
+ }
+
+ | [elaborated_type_specifier]
+ {
+ lhs.lookupId = construct lookup_id ["x"]
+ lhs.lookupId.data = '<elaborated_type_specifier>'
+ }
+
+ # Type specifier sequence without enum specifier or class specifier.
+ def necs_type_specifier_seq
+ [type_specifier_mult_seq_opt necs_type_specifier_sing type_specifier_mult_seq_opt]
+
+ # Type specifier singular without enum specifier or class specifier.
+ def necs_type_specifier_sing
+ [simple_type_specifier]
+ | [elaborated_type_specifier]
+
+ def type_specifier_mult_seq_opt
+ [type_specifier_mult_seq_opt type_specifier_mult]
+ | []
+
+ def type_specifier_mult_seq
+ [type_specifier_mult_seq type_specifier_mult]
+ | [type_specifier_mult]
+
+ def simple_type_specifier
+ lookupId: lookup_id
+
+ [simple_type_specifier_name]
+ {
+ lhs.lookupId = r1.lookupId
+ }
+
+ | [simple_type_specifier_kw_seq]
+ {
+ lhs.lookupId = construct lookup_id ["x"]
+ lhs.lookupId.data = '<simple_type_specifier_kw_seq>'
+ }
+
+ | [`typename root_qual_opt nested_name_specifier type_name]
+ {
+ lhs.lookupId = r4.lookupId
+ }
+
+ | [`typename root_qual_opt nested_name_specifier identifier]
+ {
+ lhs.lookupId = lookup_id in r4
+ }
+
+ | [`typename root_qual_opt nested_name_specifier unknown_id]
+ {
+ lhs.lookupId = lookup_id in r4
+ }
+
+ # Extension.
+ | [`__typeof `( expression `)]
+ {
+ lhs.lookupId = construct lookup_id ["x"]
+ lhs.lookupId.data = '<simple_type_specifier_kw_seq>'
+ }
+
+ def simple_type_specifier_name
+ lookupId: lookup_id
+
+ [qual_type_name]
+ {
+ lhs.lookupId = r1.lookupId
+ }
+
+ def simple_type_specifier_kw_seq
+ [simple_type_specifier_kw_seq simple_type_specifier_kw]
+ | [simple_type_specifier_kw]
+
+ def simple_type_specifier_kw
+ [`void]
+ | [`char]
+ | [`wchar_t]
+ | [`bool]
+ | [`int]
+ | [`float]
+ | [`double]
+ | [`short]
+ | [`long]
+ | [`signed]
+ | [`unsigned]
+
+ def qual_type_name
+ lookupId: lookup_id
+
+ [root_qual_opt nested_name_specifier_opt type_name]
+ {
+ lhs.lookupId = r3.lookupId
+ }
+
+ def type_name
+ lookupId: lookup_id
+
+ [class_name]
+ {
+ lhs.lookupId = r1.lookupId
+ }
+
+ | [enum_id]
+ {
+ lhs.lookupId = lookup_id in r1
+ }
+
+ | [typedef_id]
+ {
+ lhs.lookupId = lookup_id in r1
+ }
+
+ # NOTE: the typename case is moved to simple type specifier
+ # to take advantage of its conflict resolution.
+ def elaborated_type_specifier
+ [class_key nested_name_specifier_opt class_head_name]
+ {
+ Id: lookup_id = lookup_id in r3
+ name: str = Id.data
+
+ # Get the ns the class is declared in.
+ parentObj: ptr<lang_object> = declNs.top
+ if Id.qualObj
+ parentObj = Id.qualObj
+
+ # Look for the class in the given scope.
+ declaredClass: ptr<lang_object> = findClass( parentObj name )
+ if !declaredClass
+ declaredClass = findTemplateClass( parentObj name )
+
+ if !declaredClass {
+ # LOG print( 'creating new class: ', name, '\n' )
+
+ # Class does not exist in the parent scope, create it.
+ nsType: int = declaredClassType()
+
+ declaredClass = createLangObject( nsType name lookupNs.top )
+
+ # FIXME: handle friends. Make the class visible only if we are NOT
+ # in a friend declaration. The new class object is necessary to
+ # properly process the body of the class.
+ if declarationData.top.isFriend == 0
+ insertObject( parentObj name declaredClass )
+ }
+ }
+
+ # TODO: Lookup type specialization.
+ | [class_key nested_name_specifier_opt templ_class_id
+ templ_arg_open template_argument_list_opt templ_arg_close]
+
+ | [`enum nested_name_specifier_opt enum_head_name]
+ {
+ # TODO: should look for existing enums of the same name.
+ Id: lookup_id = lookup_id in r3
+ # LOG print( 'creating enumeration ' Id.data '\n' )
+ enum: ptr<lang_object> = createLangObject( EnumType Id.data lookupNs.top )
+ insertObject( declNs.top Id.data enum )
+ }
+
+ def decl_specifier_mult_seq_opt
+ [decl_specifier_mult_seq_opt decl_specifier_mult]
+ | []
+
+ def decl_specifier_mult_seq
+ [decl_specifier_mult_seq decl_specifier_mult]
+ | [decl_specifier_mult]
+
+ def decl_specifier_mult
+ [type_specifier_mult]
+ | [storage_class_specifier]
+ | [function_specifier]
+
+ | [`friend]
+ {
+ declarationData.top.isFriend = 1
+ }
+
+ | [`typedef]
+ {
+ declarationData.top.isTypedef = 1
+ }
+
+ def storage_class_specifier
+ [`auto]
+ | [`register]
+ | [`static]
+ | [`extern]
+ | [`mutable]
+
+ def function_specifier
+ [`inline]
+ | [`virtual]
+ | [`explicit]
+
+ def type_specifier_mult
+ [cv_qualifier]
+
+ def cv_qualifier
+ [`const]
+ | [`volatile]
+ | [`restrict]
+
+ def cv_qualifier_rep
+ [cv_qualifier_rep cv_qualifier]
+ | []
+
+ def namespace_definition
+ [named_namespace_definition]
+ | [unnamed_namespace_definition]
+
+ def named_namespace_definition
+ [original_namespace_definition]
+ | [extension_namespace_definition]
+
+ #
+ # Enumerations
+ #
+
+ def enum_specifier
+ [`enum nested_name_specifier_opt
+ enum_head_name `{ enumerator_list_opt `}]
+ {
+ # TODO: should look for existing enums of the same name.
+ Id: lookup_id = lookup_id in r3
+ # LOG print( 'creating enumeration ' Id.data '\n' )
+ enum: ptr<lang_object> = createLangObject( EnumType Id.data lookupNs.top )
+ insertObject( declNs.top Id.data enum )
+ }
+
+ | [`enum `{ enumerator_list_opt `}]
+
+ def enum_head_name
+ [class_id]
+ | [templ_class_id]
+ | [namespace_id]
+ | [typedef_id]
+ | [enum_id]
+ | [identifier]
+ | [template_id]
+ | [unknown_id]
+
+ def enumerator_list_opt
+ [enumerator_list]
+ | [enumerator_list `,]
+ | []
+
+ def enumerator_list
+ [enumerator_list `, enumerator_definition]
+ | [enumerator_definition]
+
+ def enumerator_definition
+ [enumerator_id]
+ {
+ Id: lookup_id = lookup_id in r1
+ enumId: ptr<lang_object> = createLangObject( IdType Id.data lookupNs.top )
+ insertObject( declNs.top Id.data enumId )
+ }
+
+ | [enumerator_id `= constant_expression]
+ {
+ Id: lookup_id = lookup_id in r1
+ enumId: ptr<lang_object> = createLangObject( IdType Id.data lookupNs.top )
+ insertObject( declNs.top Id.data enumId )
+ }
+
+ def enumerator_id
+ [namespace_id]
+ | [typedef_id]
+ | [enum_id]
+ | [class_id]
+ | [templ_class_id]
+ | [template_id]
+ | [identifier]
+ | [unknown_id]
+
+ #
+ # Declarators
+ #
+
+ def init_declarator_list_opt
+ [init_declarator_list]
+ | []
+
+ def init_declarator_list
+ [init_declarator_list `, init_declarator]
+ | [init_declarator]
+
+ def init_declarator
+ [declarator initializer_opt]
+
+ def initializer_opt
+ [`= initializer_clause]
+ | [`( expression `)]
+ | []
+
+ def initializer_clause
+ [assignment_expression]
+ | [`{ initializer_list `}]
+ | [`{ initializer_list `, `}]
+ | [`{ `}]
+
+ def initializer_list
+ [initializer_list `, initializer_clause]
+ | [initializer_clause]
+
+ #
+ # Expressions
+ #
+
+ def expression
+ [expression `, assignment_expression]
+ | [assignment_expression]
+
+ def expression_opt
+ [expression]
+ | []
+
+ def constant_expression
+ [conditional_expression]
+
+ def constant_expression_opt
+ [constant_expression]
+ | []
+
+ def assignment_expression
+ [conditional_expression]
+ | [logical_or_expression assignment_op assignment_expression]
+ | [throw_expression]
+
+ def assignment_op
+ [`=]
+ | [`*=]
+ | [`/=]
+ | [`%=]
+ | [`+=]
+ | [`-=]
+ | [`>>=]
+ | [`<<=]
+ | [`&=]
+ | [`^=]
+ | [`|=]
+
+ def conditional_expression
+ [logical_or_expression]
+ | [logical_or_expression `? expression `: assignment_expression]
+
+ def logical_or_expression
+ [logical_or_expression `|| logical_and_expression]
+ | [logical_and_expression]
+
+ def logical_and_expression
+ [logical_and_expression `&& inclusive_or_expression]
+ | [inclusive_or_expression]
+
+ def inclusive_or_expression
+ [inclusive_or_expression `| exclusive_or_expression]
+ | [exclusive_or_expression]
+
+ def exclusive_or_expression
+ [exclusive_or_expression `^ and_expression]
+ | [and_expression]
+
+ def and_expression
+ [and_expression `& equality_expression]
+ | [equality_expression]
+
+ def equality_expression
+ [equality_expression `== relational_expression]
+ | [equality_expression `!= relational_expression]
+ | [relational_expression]
+
+ def relational_expression
+ [relational_expression `< shift_expression]
+ | [relational_expression `> shift_expression]
+ | [relational_expression lt_eq shift_expression]
+ | [relational_expression gt_eq shift_expression]
+ | [shift_expression]
+
+ def shift_expression
+ [shift_expression shift_left additive_expression]
+ | [shift_expression shift_right additive_expression]
+ | [additive_expression]
+
+ def additive_expression
+ [additive_expression `+ multiplicative_expression]
+ | [additive_expression `- multiplicative_expression]
+ | [multiplicative_expression]
+
+ def multiplicative_expression
+ [multiplicative_expression `* pm_expression]
+ | [multiplicative_expression `/ pm_expression]
+ | [multiplicative_expression `% pm_expression]
+ | [pm_expression]
+
+ def pm_expression
+ [pm_expression `->* cast_expression]
+ | [pm_expression `.* cast_expression]
+ | [cast_expression]
+
+ def cast_expression
+ [unary_expression]
+ | [`( type_id `) cast_expression]
+
+ def delete_expression
+ [root_qual_opt `delete cast_expression]
+ | [root_qual_opt `delete `[ `] cast_expression]
+
+ def new_initializer_opt
+ [new_initializer]
+ | []
+
+ def new_initializer
+ [`( expression_opt `)]
+
+ def direct_new_declarator
+ [`[ expression `]]
+ | [direct_new_declarator `[ constant_expression `]]
+
+ def new_declarator_opt
+ [new_declarator]
+ | []
+
+ def new_declarator
+ [direct_new_declarator]
+ | [ptr_operator_seq direct_new_declarator]
+ | [ptr_operator_seq]
+
+ def new_type_id
+ [necs_type_specifier_seq new_declarator_opt]
+
+ def new_placement
+ [`( expression `)]
+
+ def new_expression
+ [root_qual_opt `new new_type_id new_initializer_opt]
+ | [root_qual_opt `new new_placement new_type_id new_initializer_opt]
+ | [root_qual_opt `new `( type_id `) new_initializer_opt]
+ | [root_qual_opt `new new_placement `( type_id `) new_initializer_opt]
+
+ def unary_operator
+ [`*]
+ | [`&]
+ | [`+]
+ | [`-]
+ | [`!]
+ | [`~]
+
+ def unary_expression
+ [postfix_expression]
+ | [`++ cast_expression]
+ | [`-- cast_expression]
+ | [unary_operator cast_expression]
+ | [`sizeof `( type_id `)]
+ | [`sizeof unary_expression]
+ | [new_expression]
+ | [delete_expression]
+
+ def function_style_type_conv
+ [simple_type_specifier]
+
+
+ def postfix_expression
+ [primary_expression]
+ | [postfix_expression `[ expression `]]
+ | [postfix_expression `( expression_opt `)]
+ | [function_style_type_conv `( expression_opt `)]
+ | [member_request_expr dot_arrow id_expression]
+ | [member_request_expr dot_arrow pseudo_destructor_call]
+ | [postfix_expression `++]
+ | [postfix_expression `--]
+ | [`dynamic_cast templ_arg_open type_id templ_arg_close `( expression `)]
+ | [`static_cast templ_arg_open type_id templ_arg_close `( expression `)]
+ | [`reinterpret_cast templ_arg_open type_id templ_arg_close `( expression `)]
+ | [`const_cast templ_arg_open type_id templ_arg_close `( expression `)]
+ | [`typeid `( expression `)]
+ | [`typeid `( type_id `)]
+
+ def pseudo_destructor_call
+ [root_qual_opt nested_name_specifier_opt `~ pdc_type_name]
+
+ def primary_expression
+ [expr_lit]
+ | [`this]
+ | [`( expression `)]
+ | [id_expression]
+ # GNU extensions
+ | [`( `{ statement_rep `} `)]
+ | [`__is_pod `( type_id `)]
+ | [`__is_empty `( type_id `)]
+
+ def expr_lit
+ [TK_IntegerDecimal]
+ | [TK_IntegerOctal]
+ | [TK_IntegerHex]
+ | [TK_SingleLit]
+ | [TK_Float]
+ | [double_lit_list]
+ | [`true]
+ | [`false]
+
+ def double_lit_list
+ [TK_DoubleLit double_lit_list]
+ | [TK_DoubleLit]
+
+ def member_request_expr
+ [postfix_expression]
+ # {
+ # # FIXME: If no proper type is found, we must fail.
+ # # LOG print( 'setting member request scope\n' )
+ # # qualNs.set( $1->type != 0 ? $1->type->getObject() : 0 );
+ # }
+
+ def dot_arrow
+ [`->]
+ | [`.]
+
+ def pdc_type_name
+ [enum_id]
+ | [typedef_id]
+
+ #
+ # Statements
+ #
+
+ def statement_rep
+ [statement_rep statement]
+ | []
+
+ def statement
+ [declaration_statement]
+ | [labeled_statement]
+ | [expression_statement]
+ | [compound_statement]
+ | [selection_statement]
+ | [iteration_statement]
+ | [jump_statement]
+ | [try_block]
+
+ def labeled_statement
+ [label_id `: statement]
+ | [`case constant_expression `: statement]
+ | [`default `: statement]
+
+ def label_id
+ [unknown_id]
+ | [identifier]
+ | [class_id]
+ | [templ_class_id]
+ | [namespace_id]
+ | [typedef_id]
+ | [enum_id]
+ | [template_id]
+
+ def compound_statement
+ [`{ compound_begin statement_rep compound_end `}]
+
+ def compound_begin
+ []
+ {
+ newCompound: ptr<lang_object> = createLangObject( 0 '<compound_begin>' lookupNs.top )
+ lookupNs.push( newCompound )
+ declNs.push( newCompound )
+ # LOG print( 'opening <compound>\n' )
+ }
+
+ def compound_end
+ []
+ {
+ lookupNs.pop()
+ declNs.pop()
+ # LOG print( 'closing <compound>\n' )
+ }
+
+ def selection_statement
+ [`if `( condition `) statement elseif_clauses else_clause]
+ | [`switch `( condition `) statement]
+
+ def elseif_clauses
+ [elseif_clauses `else `if `( condition `) statement]
+ | []
+
+ def else_clause
+ [`else statement]
+ | []
+
+ def iteration_statement
+ [`while `( condition `) statement]
+ | [`do statement `while `( expression `) `;]
+ | [`for `( for_init_statement condition_opt `; expression_opt `) statement]
+
+ def jump_statement
+ [`break `;]
+ | [`continue `;]
+ | [`return expression_opt `;]
+ | [`goto any_id `;]
+
+ def any_id
+ [unknown_id]
+ | [class_id]
+ | [namespace_id]
+ | [templ_class_id]
+ | [enum_id]
+ | [typedef_id]
+ | [identifier]
+ | [template_id]
+
+
+ def for_init_statement
+ [expression_statement]
+ | [stmt_block_declaration_forms `;]
+
+ def condition
+ [expression]
+ | [type_specifier_seq declarator `= assignment_expression]
+
+ def condition_opt
+ [condition]
+ | []
+
+ def expression_statement
+ [expression `;]
+ | [`;]
+
+ def declaration_statement
+ [stmt_block_declaration]
+
+ def stmt_block_declaration
+ [declaration_start stmt_block_declaration_forms declaration_end `;]
+ | [using_declaration]
+ | [using_directive]
+
+ def stmt_block_declaration_forms
+ [decl_specifier_mult_seq_opt decl_specifier_sing decl_specifier_mult_seq_opt
+ init_declarator_list_opt]
+ | [decl_specifier_mult_seq init_declarator_list_opt]
+
+ #
+ # Declarators
+ #
+
+ def declarator
+ lookupObj: ptr<lang_object>
+
+ [ptr_operator_seq_opt declarator_id decl_array_or_param_rep declarator_end]
+ {
+ lhs.lookupObj = r4.lookupObj
+ }
+
+ | [ptr_operator_seq_opt `( sub_declarator `) decl_array_or_param_rep declarator_end]
+ {
+ lhs.lookupObj = r6.lookupObj
+ }
+
+ def sub_declarator
+ [ptr_operator_seq declarator_id decl_array_or_param_rep]
+ | [ptr_operator_seq `( sub_declarator `) decl_array_or_param_rep]
+ | [`( sub_declarator `) decl_array_or_param_rep]
+ | [declarator_id decl_array_or_param_rep]
+
+ def decl_array_or_param_rep
+ [decl_array_or_param_rep decl_array_or_param]
+ | []
+
+ def decl_array_or_param
+ [`[ constant_expression_opt `]]
+ | [`( parameter_declaration_clause `) cv_qualifier_rep exception_specification_opt]
+
+ def declarator_id
+ [declarator_id_forms]
+ {
+ name: str = r1.lookupId.data
+ qualObj: ptr<lang_object> = r1.lookupId.qualObj
+
+ parentObj: ptr<lang_object> = declNs.top
+ if qualObj {
+ parentObj = qualObj
+ }
+
+ # Decide if we are declaring a constructor/destructor.
+ isConstructor: bool
+ if parentObj == r1.lookupId.obj {
+ isConstructor = true
+ # LOG print( 'making declarator ' name ' a constructor/destructor\n' )
+ }
+
+ if parentObj->specializationOf &&
+ parentObj->specializationOf == r1.lookupId.obj
+ {
+ isConstructor = true
+ # LOG print( 'making declarator ' name ' a constructor/destructor\n' )
+ }
+
+ obj: ptr<lang_object> = nil
+ if name && !isConstructor && declarationData.top.isFriend == 0 {
+ if declarationData.top.isTypedef {
+ obj = createLangObject( TypedefType name lookupNs.top )
+ obj->typedefOf = declarationData.top.typeObj
+ insertObject( parentObj name obj )
+
+ # LOG print( 'making declarator ' name ' a typedef\n' )
+ }
+ else {
+ if !qualObj {
+ if declarationData.top.isTemplate {
+ # If in a template declaration and the name is not qualified then
+ # create the template id.
+ obj = createLangObject( TemplateIdType name lookupNs.top )
+ #object->objType = declarationData.top.type
+ insertObject( declNs.top name obj )
+
+ # LOG print( 'making declarator ' name ' a template id\n' )
+ }
+ else {
+ obj = createLangObject( IdType name lookupNs.top )
+ #object->objType = declarationData.top().type;
+ insertObject( declNs.top name obj )
+
+ # LOG print( 'making declarator ' name ' an id\n' )
+ }
+ }
+ }
+ }
+
+ declaratorData.push( construct declarator_data (
+ qualObj nil lookupNs.top ) [] )
+
+ # If the declarator is qualified, push the qualification to the lookup
+ # stack. Also save it in the declarator data so it can be passed to a
+ # function body if needed.
+ if qualObj {
+ lookupNs.push( qualObj )
+ declaratorData.top.lookupObj = qualObj
+ }
+
+ # LOG print( 'reduced declarator_id: ' name '\n' )
+ }
+
+ # Undoes the setup done by declarator_id and pdc_start.
+ def declarator_end
+ lookupObj: ptr<lang_object>
+
+ []
+ {
+ # Get the lookupObject from the scope and pass it up. If we are about to
+ # parse a function body it will be needed.
+ lhs.lookupObj = declaratorData.top.lookupObj
+
+ pdcScope: ptr<lang_object> = declaratorData.top.pdcScope
+ qualObj: ptr<lang_object> = declaratorData.top.qualObj
+
+ declaratorData.pop()
+
+ if pdcScope {
+ # LOG print( 'closing <pdc_scope>\n' )
+ lookupNs.pop()
+ declNs.pop()
+ }
+
+ if qualObj {
+ # LOG print( 'popping lookupNs\n' )
+ lookupNs.pop()
+ }
+ }
+
+ def declarator_id_forms
+ lookupId: lookup_id
+
+ [id_expression]
+ {
+ lhs.lookupId = r1.lookupId
+ }
+
+ | [root_qual_opt nested_name_specifier_opt type_name]
+ {
+ lhs.lookupId = r3.lookupId
+ }
+
+ | [root_qual_opt nested_name_specifier_opt `~ class_id]
+ {
+ lhs.lookupId = lookup_id in r4
+ }
+
+ | [root_qual_opt nested_name_specifier_opt `~ templ_class_id]
+ {
+ lhs.lookupId = lookup_id in r4
+ }
+ | [root_qual_opt nested_name_specifier_opt `~ unknown_id]
+ {
+ lhs.lookupId = lookup_id in r4
+ }
+
+ def type_id
+ lookupId: lookup_id
+
+ [type_specifier_seq abstract_declarator_opt]
+ {
+ lhs.lookupId = r1.lookupId
+ }
+
+ def abstract_declarator_opt
+ [abstract_declarator]
+ | []
+
+ def abstract_declarator
+ [ptr_operator_seq abstract_noid abstract_decl_array_or_param_seq_opt declarator_end]
+ | [ptr_operator_seq `( sub_abstract_declarator `)
+ abstract_decl_array_or_param_seq_opt declarator_end]
+ | [abstract_noid abstract_decl_array_or_param_seq declarator_end]
+ | [`( sub_abstract_declarator `) abstract_decl_array_or_param_seq_opt declarator_end]
+
+ def sub_abstract_declarator
+ [ptr_operator_seq abstract_noid abstract_decl_array_or_param_seq_opt]
+
+ | [ptr_operator_seq `( sub_abstract_declarator `)
+ abstract_decl_array_or_param_seq_opt]
+
+ | [`( sub_abstract_declarator `) abstract_decl_array_or_param_seq_opt]
+
+ def abstract_noid
+ []
+ {
+ # Make scope for declarator.
+ declaratorData.push( construct declarator_data [] )
+ }
+
+ def abstract_decl_array_or_param_seq_opt
+ [abstract_decl_array_or_param_seq_opt abstract_decl_array_or_param]
+ | []
+
+ def abstract_decl_array_or_param_seq
+ [abstract_decl_array_or_param_seq abstract_decl_array_or_param]
+ | [abstract_decl_array_or_param]
+
+ def abstract_decl_array_or_param
+ [`[ constant_expression_opt `]]
+ | [`( parameter_declaration_clause `) cv_qualifier_rep
+ exception_specification_opt]
+
+ def parameter_declaration_clause
+ [pdc_start parameter_declaration_list]
+ | [pdc_start parameter_declaration_list `...]
+ | [pdc_start parameter_declaration_list `, `...]
+ | [pdc_start `...]
+ | [pdc_start]
+
+ def pdc_start
+ []
+ {
+ if !declaratorData.top.pdcScope {
+ # We are going to need a scope for the declarator.
+ pdcScope: ptr<lang_object> = createLangObject( 0 '<pdc_scope>' lookupNs.top )
+ lookupNs.push( pdcScope )
+ declNs.push( pdcScope )
+
+ declaratorData.top.pdcScope = pdcScope
+ declaratorData.top.lookupObj = pdcScope
+ # LOG print( 'opening <pdc_scope>\n' )
+ }
+ }
+
+ def parameter_declaration_list
+ [parameter_declaration_list `, parameter_declaration]
+ | [parameter_declaration]
+
+ def parameter_declaration
+ [declaration_start parameter_declaration_forms declaration_end]
+
+ # Ordering the productions such that decl_specifier_sing is tried first is good
+ # for performance.
+ def parameter_declaration_forms
+ [decl_specifier_mult_seq_opt decl_specifier_sing decl_specifier_mult_seq_opt
+ param_maybe_declarator maybe_parameter_init]
+
+ | [decl_specifier_mult_seq param_maybe_declarator maybe_parameter_init]
+
+ def param_maybe_declarator
+ [abstract_declarator]
+ | [declarator]
+ | []
+
+ def maybe_parameter_init
+ [`= constant_expression]
+ | []
+
+ def ptr_operator
+ [`&]
+ | [root_qual_opt nested_name_specifier_opt `* cv_qualifier_rep]
+
+ def ptr_operator_seq
+ [ptr_operator_seq ptr_operator]
+ | [ptr_operator]
+
+ def ptr_operator_seq_opt
+ [ptr_operator_seq_opt ptr_operator]
+ | []
+
+ #
+ # Functions
+ #
+
+ def function_definition
+ [function_def_declaration ctor_initializer_opt function_body function_def_end]
+
+ def function_def_declaration
+ [declaration_start function_def_declaration_forms declaration_end]
+
+ def function_def_declaration_forms
+ [decl_specifier_mult_seq_opt decl_specifier_sing
+ decl_specifier_mult_seq_opt function_def_declarator]
+ | [decl_specifier_mult_seq function_def_declarator]
+ | [function_def_declarator]
+
+ def function_def_declarator
+ [declarator]
+ {
+ # The lookupObj from the declarator is the deepest lookup object found
+ # while parsing the declarator. Make it visible in the function body.
+ # This could be the args, the qualObj, or the parent to the function.
+ lookupNs.push( r1.lookupObj )
+ }
+
+ def function_def_end
+ []
+ {
+ # Pop the lookup object.
+ lookupNs.pop()
+ }
+
+ def function_body
+ [function_body_begin `{ statement_rep function_body_end `}]
+
+ def function_body_begin
+ []
+ {
+ newFunctionBody: ptr<lang_object> = createLangObject( 0
+ '<function_body_begin>' lookupNs.top )
+ lookupNs.push( newFunctionBody )
+ declNs.push( newFunctionBody )
+ templDecl.push( 0 )
+ # LOG print( 'opening <function_body>\n' )
+ }
+
+ def function_body_end
+ []
+ {
+ # First undoes the function body begin work. Then undoes the setup in
+ # function_def_declarator.
+ declNs.pop()
+ lookupNs.pop()
+ templDecl.pop()
+ # LOG print( 'closing <function_body>\n' )
+ }
+
+
+
+ #
+ # Classs
+ #
+
+ int declaredClassType()
+ {
+ if declarationData.top.isTemplate {
+ return TemplateClassType
+ } else {
+ return ClassType
+ }
+ }
+
+ def class_specifier
+ [class_head base_clause_opt `{ class_member_rep class_body_end `}]
+ {
+ # FIXME: reparse not implemented yet
+ # FIXME FIXME: reparse is actually implemented now implemented
+ # # Visit class function bodies, but skip nested classes.
+ # for CFB: class_function_body in lhs {
+ # skipping class_specifier
+ #
+ # # Reparse the text of the class function body as a function body
+ # function_body FB = parse function_body[ $CFB ]
+ #
+ # # Replace the class function body with the parsed function body.
+ # CFB = cons class_function_body [FB.tree]
+ # }
+ }
+
+ def class_head
+ [class_key]
+ {
+ nsType: int = declaredClassType()
+
+ # LOG print( 'creating new anonymous class\n' )
+ newClass: ptr<lang_object> = createLangObject( nsType
+ '<anon_class>' lookupNs.top )
+ lookupNs.push( newClass )
+ declNs.push( newClass )
+ }
+
+ | [class_key nested_name_specifier_opt class_head_name]
+ {
+ Id: lookup_id = lookup_id in r3
+ name: str = Id.data
+
+ # Get the ns the class is declared in.
+ parentObj: ptr<lang_object> = declNs.top
+ if Id.qualObj
+ parentObj = Id.qualObj
+
+ # Look for the class in the given scope.
+ declaredClass: ptr<lang_object> = findClass( parentObj name )
+ if !declaredClass
+ declaredClass = findTemplateClass( parentObj name )
+
+ if !declaredClass {
+ # LOG print( 'creating new class: ' name '\n' )
+
+ # Class does not exist in the parent scope, create it.
+ nsType: int = declaredClassType()
+
+ declaredClass = createLangObject( nsType name lookupNs.top )
+
+ # FIXME: handle friends. Make the class visible only if we are NOT
+ # in a friend declaration. The new class object is necessary to
+ # properly process the body of the class.
+ if declarationData.top.isFriend == 0
+ insertObject( parentObj name declaredClass )
+ }
+
+ # Push the found/new class.
+ lookupNs.push( declaredClass )
+ declNs.push( declaredClass )
+ }
+
+ | [class_key nested_name_specifier_opt templ_class_id
+ templ_arg_open template_argument_list_opt templ_arg_close]
+ {
+ match r3 [Id: lookup_id]
+ id: str = Id.data
+ classObj: ptr<lang_object> = Id.obj
+
+ # TODO: Try to find the specializaition in the template class object.
+ # TypeList typeList;
+ # makeTypeList( typeList $6->last );
+
+ declaredClass: ptr<lang_object>
+ #declaredClass = classObj->findSpecExact( typeList );
+ if !declaredClass {
+ # LOG print( 'making new template specialization\n' )
+ nsType: int = declaredClassType()
+ declaredClass = createLangObject( nsType id lookupNs.top )
+ # LOG print( 'declaredClass: ' declaredClass '\n' )
+ declaredClass->specializationOf = classObj
+ # $$->typeListMapEl = classObj->typeListMap.insert( typeList declaredClass );
+ }
+
+ # Push the found/new class.
+ lookupNs.push( declaredClass )
+ declNs.push( declaredClass )
+ }
+
+ def class_body_end
+ []
+ {
+ # Pop the class ns.
+ lookupNs.pop()
+ declNs.pop()
+
+ # LOG print( 'closing off class\n' )
+ }
+
+ def class_head_name
+ [class_id]
+ | [templ_class_id]
+ | [namespace_id]
+ | [typedef_id]
+ | [enum_id]
+ | [unknown_id]
+ | [identifier]
+ | [template_id]
+
+ def class_key
+ [`class]
+ | [`struct]
+ | [`union]
+
+ def class_member_rep
+ [class_member_rep class_member]
+ | []
+
+ def class_member
+ [member_declaration]
+ | [access_specifier `:]
+
+ def member_declaration
+ [declaration_start member_declaration_forms declaration_end `;]
+ | [class_function_definition]
+ | [using_declaration]
+ | [template_declaration]
+
+ def class_function_definition
+ [function_def_declaration ctor_initializer_opt class_function_body function_def_end]
+
+ lex
+ token cfb_open /'{'/
+ token cfb_close /'}'/
+ token cfb_string /
+ "'" ( [^'\\\n] | '\\' any )* "'" |
+ '"' ( [^"\\\n] | '\\' any )* '"'/
+ token cfb_comment /
+ ( '/*' (any | '\n')* :>> '*/' ) |
+ ( '//' any* :> '\n' )/
+ token cfb_data /[^{}'"/]+ | '/'/
+ end
+
+ def cfb_item
+ [cfb_data]
+ | [cfb_string]
+ | [cfb_comment]
+ | [cfb_open cfb_item* cfb_close]
+
+ def cfb_conts
+ [cfb_item* cfb_close]
+
+
+
+ def class_function_body
+ # ['{' cfb_conts]
+ #| [function_body]
+ [function_body]
+
+ # Get better performance if the form with decl_specifier_sing comes first.
+ def member_declaration_forms
+ [decl_specifier_mult_seq_opt decl_specifier_sing
+ decl_specifier_mult_seq_opt member_declarator_list_opt]
+ | [decl_specifier_mult_seq_opt member_declarator_list_opt]
+
+ def member_declarator_list_opt
+ [member_declarator_list]
+ | []
+
+ def member_declarator_list
+ [member_declarator_list `, member_declarator]
+ | [member_declarator]
+
+ def member_declarator
+ [declarator]
+ | [declarator `= constant_expression]
+ | [declarator `: constant_expression]
+ | [`: constant_expression]
+
+ def access_specifier
+ [`private]
+ | [`protected]
+ | [`public]
+
+ def access_specifier_opt
+ [access_specifier]
+ | []
+
+ def using_declaration
+ [`using id_expression `;]
+ {
+ obj: ptr<lang_object> = r2.lookupId.obj
+ if obj
+ insertObject( declNs.top obj->name obj )
+ }
+
+ | [`using type_id `;]
+ {
+ obj: ptr<lang_object> = r2.lookupId.obj
+ if obj
+ insertObject( declNs.top obj->name obj )
+ }
+
+ def using_directive
+ [`using `namespace root_qual_opt nested_name_specifier_opt
+ namespace_id `;]
+ {
+ # This uses a simple, incomplete guard against cycles in the graph of
+ # using namespaces. A more sophisticated and complete guard would look
+ # for longer cycles as well. Note that even gcc 3.3.5 does not bother.
+ match r5 [Id: lookup_id]
+ usingObject: ptr<lang_object> = Id.obj
+ inObject: ptr<lang_object> = declNs.top
+ if usingObject != inObject
+ inObject->inherited.append( usingObject )
+ }
+
+
+ #
+ # Derived classes
+ #
+
+ def base_clause_opt
+ [base_clause]
+ | []
+
+ def base_clause
+ [`: base_specifier_list]
+
+ def base_specifier_list
+ [base_specifier_list `, base_specifier]
+ | [base_specifier]
+
+ int addBaseSpecifier( inObject: ptr<lang_object> inheritedObject: ptr<lang_object> )
+ {
+ # Resolve typedefs.
+ if inheritedObject->typeId == TypedefType
+ inheritedObject = inheritedObject->typedefOf
+
+ inObject->inherited.append( inheritedObject )
+ }
+
+ def base_specifier
+ [root_qual_opt nested_name_specifier_opt type_name]
+ {
+ addBaseSpecifier( declNs.top r3.lookupId.obj )
+ }
+
+ | [`virtual access_specifier_opt root_qual_opt nested_name_specifier_opt type_name]
+ {
+ addBaseSpecifier( declNs.top r5.lookupId.obj )
+ }
+
+ | [access_specifier virtual_opt root_qual_opt nested_name_specifier_opt type_name]
+ {
+ addBaseSpecifier( declNs.top r5.lookupId.obj )
+ }
+
+ def virtual_opt
+ [`virtual]
+ | []
+
+ #
+ # Special member functions
+ #
+
+ def conversion_function_id
+ [`operator conversion_type_id]
+
+ def conversion_type_id
+ [necs_type_specifier_seq ptr_operator_seq_opt]
+
+ def ctor_initializer_opt
+ [ctor_initializer]
+ | []
+
+ def ctor_initializer
+ [`: mem_initializer_list]
+
+ def mem_initializer_list
+ [mem_initializer_list `, mem_initializer]
+ | [mem_initializer]
+
+ def mem_initializer
+ [mem_initializer_id `( expression_opt `)]
+
+ def mem_initializer_id
+ [root_qual_opt nested_name_specifier_opt unknown_id]
+ | [root_qual_opt nested_name_specifier_opt identifier]
+ | [root_qual_opt nested_name_specifier_opt type_name]
+ | [root_qual_opt nested_name_specifier_opt template_name]
+
+
+ #
+ # Overloading
+ #
+ def operator_function_id
+ [`operator operator]
+
+ def operator
+ [`+] | [`-] | [`*] | [`/] | [`=] | [`<] | [`>] | [`&] | [`|] |
+ [`^] | [`%] | [`~] | [`!] | [`( `)] | [`[ `]] | [`new] |
+ [`delete] | [`->] | [`++] | [`--] | [`*=] | [`/=] | [`%=] |
+ [`+=] | [`-=] | [`>>=] | [`<<=] | [`&=] | [`^=] | [`|=] | [`==] |
+ [`!=] | [`&&] | [`||] | [lt_eq] | [gt_eq] | [shift_left] | [shift_right]
+
+ def lt_eq
+ [`< `=]
+ # try {
+ # if ( $2->leader != 0 ) {
+ # #ifdef LOG_REDUCE
+ # cerr << "rejecting less-than equals-to" << endl;
+ # #endif
+ # reject();
+ # }
+ # };
+
+ def gt_eq
+ [`> `=]
+ # try {
+ # if ( $2->leader != 0 ) {
+ # #ifdef LOG_REDUCE
+ # cerr << "rejecting greater-than equals-to" << endl;
+ # #endif
+ # reject();
+ # }
+ # };
+
+ def shift_left
+ [`< `<]
+ # try {
+ # if ( $2->leader != 0 ) {
+ # #ifdef LOG_REDUCE
+ # cerr << "rejecting shift left" << endl;
+ # #endif
+ # reject();
+ # }
+ # };
+
+ def shift_right
+ [`> `>]
+ # try {
+ # if ( $2->leader != 0 ) {
+ # #ifdef LOG_REDUCE
+ # cerr << "rejecting shift right" << endl;
+ # #endif
+ # reject();
+ # }
+ # };
+
+ #
+ # Templates
+ #
+
+ def template_declaration
+ [template_declaration_params declaration]
+ {
+ templDecl.pop()
+ templateParamNs.pop()
+ }
+
+ def template_declaration_params
+ [`template `< tpl_start template_parameter_list `>]
+ {
+ templDecl.push( 1 )
+ }
+
+ | [`export `template `< tpl_start template_parameter_list `>]
+ {
+ templDecl.push( 1 )
+ }
+
+ def tpl_start
+ []
+ {
+ # Create a new scope for the template parameters.
+ newTemplateParamScope: ptr<lang_object> =
+ createLangObject( 0 '<tpl_start>' lookupNs.top )
+ templateParamNs.push( newTemplateParamScope )
+ }
+
+ def template_parameter_list
+ [template_parameter_list `, template_parameter]
+ | [template_parameter]
+
+ def template_parameter
+ [type_parameter]
+ | [template_parameter_declaration]
+
+ def template_parameter_declaration
+ [declaration_start template_parameter_declaration_forms declaration_end]
+
+ def template_parameter_declaration_forms
+ [decl_specifier_mult_seq param_maybe_declarator maybe_parameter_init]
+
+ | [temp_param_decl_specifier_sing decl_specifier_mult_seq_opt
+ param_maybe_declarator maybe_parameter_init]
+
+ | [decl_specifier_mult_seq temp_param_decl_specifier_sing
+ decl_specifier_mult_seq_opt param_maybe_declarator maybe_parameter_init]
+
+ def temp_param_decl_specifier_sing
+ [temp_param_type_specifier_sing]
+
+ # Template parameters cannot support elaborated type specifer or class specifier.
+ def temp_param_type_specifier_sing
+ [templ_simple_type_specifier]
+ | [enum_specifier]
+
+ def templ_simple_type_specifier
+ [simple_type_specifier_name]
+ | [simple_type_specifier_kw_seq]
+
+ def type_parameter
+ [`class type_param_id type_param_init_opt]
+ {
+ Id: lookup_id = lookup_id in r2
+ if Id {
+ # The lookup ns should be a template param scope.
+ newClass: ptr<lang_object> =
+ createLangObject( ClassType Id.data lookupNs.top )
+ insertObject( templateParamNs.top Id.data newClass )
+ }
+ }
+
+ | [`typename type_param_id type_param_init_opt]
+ {
+ Id: lookup_id = lookup_id in r2
+ if Id {
+ # The lookup ns should be a template param scope.
+ newClass: ptr<lang_object> =
+ createLangObject( ClassType Id.data lookupNs.top )
+ insertObject( templateParamNs.top Id.data newClass )
+ }
+ }
+
+ | [`template `< tpl_start template_parameter_list `>
+ `class type_param_id templ_type_param_init_opt]
+ {
+ Id: lookup_id = lookup_id in r7
+ if Id {
+ newClass: ptr<lang_object> =
+ createLangObject( TemplateClassType Id.data lookupNs.top )
+ insertObject( templateParamNs.top Id.data newClass )
+ }
+ }
+
+ def templ_type_param_init_opt
+ [`= id_expression]
+ | []
+
+ def type_param_init_opt
+ [`= type_id]
+ | []
+
+ def type_param_id
+ [namespace_id]
+ | [typedef_id]
+ | [enum_id]
+ | [class_id]
+ | [templ_class_id]
+ | [identifier]
+ | [template_id]
+ | [unknown_id]
+ | []
+
+ def template_argument_list_opt
+ [template_argument_list]
+ | []
+
+ def template_argument_list
+ [template_argument_list `, template_argument]
+ | [template_argument]
+
+ def template_argument
+ [type_id]
+ | [assignment_expression]
+
+ def explicit_instantiation
+ [`template declaration]
+ | [declaration_start decl_specifier_mult_seq `template declaration declaration_end]
+
+ def explicit_specialization
+ [`template `< `> declaration]
+
+ ## Not sure what this one is about?
+ #explicit_specialization:
+ # declaration_start decl_specifier_mult_seq KW_Template '<' '>'
+ # declaration declaration_end;
+
+
+ #
+ # Original namespace definition
+ #
+
+ def original_namespace_definition
+ [orig_namespace_def_name `{ declaration* namespace_end `}]
+
+ def orig_namespace_def_name [`namespace unknown_id]
+ {
+ match r2 [Id: lookup_id]
+ nspace: ptr<lang_object> = createLangObject(
+ NamespaceType Id.data lookupNs.top )
+
+ # Insert the new object into the dictionary of the parent.
+ insertObject( curNamespace.top Id.data nspace )
+
+ # Push the namespace
+ curNamespace.push( nspace )
+ declNs.push( nspace )
+ lookupNs.push( nspace )
+
+ # LOG print( 'created original namespace: ' Id.data '\n' )
+ }
+
+ def namespace_end []
+ {
+ # Pop the namespace.
+ curNamespace.pop()
+ declNs.pop()
+ lookupNs.pop()
+
+ # LOG print( 'closed namespace\n' )
+ }
+
+ #
+ # Extension namespace definition
+ #
+
+ def extension_namespace_definition
+ [ext_namespace_def_name `{ declaration* namespace_end `}]
+
+ def ext_namespace_def_name [`namespace namespace_id]
+ {
+ match r2 [Id: lookup_id]
+ nspace: ptr<lang_object> = Id.obj
+
+ # Push the namespace
+ curNamespace.push( nspace )
+ declNs.push( nspace )
+ lookupNs.push( nspace )
+
+ # LOG print( 'found extended namespace: ' Id.data '\n' )
+ }
+
+ #
+ # Unnamed namespace definition
+ #
+ def unnamed_namespace_definition
+ [unnamed_namespace_def_name `{ declaration* namespace_end `}]
+
+ def unnamed_namespace_def_name [`namespace]
+ {
+ nspace: ptr<lang_object> = createLangObject(
+ NamespaceType '<unnamed_namespace>'
+ lookupNs.top )
+
+ # Push the namespace
+ curNamespace.push( nspace )
+ declNs.push( nspace )
+ lookupNs.push( nspace )
+
+ # LOG print( 'parsed unnamed namespace\n' )
+ }
+
+ #
+ # linkage_specification
+ #
+ def linkage_specification
+ [`extern TK_DoubleLit `{ declaration* `}]
+ | [`extern TK_DoubleLit declaration]
+
+ #
+ # Exception Handling.
+ #
+
+ def try_block
+ [`try compound_statement handler_seq]
+
+ def handler_seq
+ [handler_seq handler]
+ | [handler]
+
+ def handler
+ [`catch `( exception_declaration `) compound_statement]
+
+ def exception_declaration
+ [type_specifier_seq declarator]
+ | [type_specifier_seq abstract_declarator]
+ | [type_specifier_seq]
+ | [`...]
+
+ def throw_expression
+ [`throw assignment_expression]
+ | [`throw]
+
+ def exception_specification_opt
+ [exception_specification]
+ | []
+
+ def exception_specification
+ [`throw `( type_id_list_opt `)]
+
+ def type_id_list_opt
+ [type_id_list]
+ | []
+
+ def type_id_list
+ [type_id_list `, type_id]
+ | [type_id]
+
+ def start
+ [declaration*]
+
+ #
+ # Grammar done.
+ #
+
+ int printObject( indent: str obj: ptr<lang_object> )
+ {
+ print( indent obj->name )
+
+ if obj->objectMap.length > 0
+ print( ' {\n' )
+
+ ChildNames: map<str list<ptr<lang_object>>> = obj->objectMap
+ for MapEl: list<ptr<lang_object>> in child( ChildNames ) {
+ for Obj: ptr<lang_object> in MapEl
+ printObject( indent + ' ' Obj )
+ }
+
+ if obj->objectMap.length > 0
+ print( indent '}' )
+
+ print( '\n' )
+ }
+
+end # lookup
+
+#
+# Global data declarations
+#
+
+cons Lookup: lookup[]
+
+# Constants for language object types.
+Lookup.NamespaceType = typeid<lookup::namespace_id>
+Lookup.ClassType = typeid<lookup::class_id>
+Lookup.TemplateClassType = typeid<lookup::templ_class_id>
+Lookup.EnumType = typeid<lookup::enum_id>
+Lookup.IdType = typeid<lookup::identifier>
+Lookup.TypedefType = typeid<lookup::typedef_id>
+Lookup.TemplateIdType = typeid<lookup::template_id>
+
+
+# Object stacks.
+Lookup.curNamespace = construct list<ptr<lookup::lang_object>> []
+Lookup.declNs = construct list<ptr<lookup::lang_object>> []
+Lookup.lookupNs = construct list<ptr<lookup::lang_object>> []
+Lookup.qualNs = construct list<ptr<lookup::lang_object>> []
+Lookup.templateParamNs = construct list<ptr<lookup::lang_object>> []
+
+# Declaration, declarator data.
+Lookup.declarationData = construct list<lookup::declaration_data> []
+Lookup.declaratorData = construct list<lookup::declarator_data> []
+
+# Template declarations
+Lookup.templDecl = construct list<int> []
+
+# Root namespace object
+Lookup.rootNamespace = createLangObject( Lookup.NamespaceType '<root_namespace>' nil )
+
+# Initialize the namespace and declaration stacks with the root namespace
+Lookup.curNamespace.push( Lookup.rootNamespace )
+Lookup.declNs.push( Lookup.rootNamespace )
+Lookup.lookupNs.push( Lookup.rootNamespace )
+
+# Start with no qualification (note variables are initialized to zero)
+Lookup.qualNs.push( nil )
+
+Lookup.templDecl.push( 0 )
+Lookup.declarationData.push( construct lookup::declaration_data( 0 0 0 ) [] )
+
+parse S: lookup::start( Lookup )[ stdin ]
+if ! S {
+ print( error )
+ exit( 1 )
+}
+
+print( '***** NAMSPACES *****\n' )
+printObject( '' Lookup.rootNamespace )
+print( '***** UNKNOWN DECLARATORS *****\n' )
+for DI: lookup::declarator_id in S {
+ if match DI
+ [lookup::root_qual_opt lookup::nested_name_specifier_opt lookup::`~ UID: lookup::unknown_id]
+ {
+ print( UID '\n' )
+ }
+}
+##### IN #####
+namespace ns1
+{
+ namespace sub1 { class A {}; }
+ namespace sub2 { class B {}; }
+}
+
+namespace ns2
+{
+ int i = b;
+ class C
+ {
+ };
+
+ using namespace ns1;
+}
+
+ns2::sub1::A a;
+
+struct A
+{
+ struct B {};
+};
+
+struct C
+{
+ struct D : virtual public A {};
+};
+
+C::D::A d;
+
+C c;
+
+struct C
+{
+
+};
+
+enum E
+{
+ C,
+ b
+};
+
+E e;
+
+enum E
+{
+ C,
+ b
+};
+
+
+int i;
+class C
+{
+ int j;
+};
+
+class D
+{
+ int ~D();
+};
+
+int C::k;
+int C::~C;
+
+typedef int Int;
+
+class C {};
+void ~C( );
+void C::operator +( int i );
+
+int i;
+
+//void operator C( void k );
+
+class C
+{
+
+};
+
+int C::f( int i, int j( void v ) );
+class C
+{
+ class D {};
+
+ typedef C I;
+
+ I::D i;
+};
+
+C c;
+
+void function( int i, int j )
+{
+ function();
+}
+
+
+
+class B { class Find {}; };
+
+typedef B T;
+
+class C : public T
+{
+ Find find;
+};
+
+
+template <class X> struct Y
+{
+ X t;
+ void f();
+};
+
+template <class X> void Y<X>::f();
+template <class X> struct Y
+{
+ class Z {};
+};
+
+class Y<int>
+{
+ int i;
+};
+
+//void f( class C<int> i, int j );
+
+int f( int (*) [](), void );
+void f();
+class C
+{
+ class D {};
+ void g();
+};
+
+//typename C c;
+
+class C
+{
+ class D {};
+ int f();
+};
+
+int f()
+{
+}
+
+int C::f()
+{
+ D d;
+}
+##### EXP #####
+***** NAMSPACES *****
+<root_namespace> {
+ A {
+ B
+ }
+ B {
+ Find
+ }
+ C {
+ D
+ I
+ f
+ g
+ i
+ j
+ find
+ }
+ C
+ C
+ C
+ D
+ E
+ E
+ T
+ Y {
+ Z
+ f
+ t
+ }
+ a
+ b
+ b
+ c
+ c
+ d
+ e
+ f
+ f
+ f
+ i
+ i
+ Int
+ ns1 {
+ sub1 {
+ A
+ }
+ sub2 {
+ B
+ }
+ }
+ ns2 {
+ C
+ i
+ }
+ function
+}
+***** UNKNOWN DECLARATORS *****
+C
diff --git a/test/mailbox.lm b/test/mailbox.lm
new file mode 100644
index 0000000..ca3b9a9
--- /dev/null
+++ b/test/mailbox.lm
@@ -0,0 +1,106 @@
+##### LM #####
+
+# lines, and fromlines
+lex
+ rl day /[A-Z][a-z][a-z]/
+ rl month /[A-Z][a-z][a-z]/
+ rl year /[0-9][0-9][0-9][0-9]/
+ rl time /[0-9][0-9] ':' [0-9][0-9] ( ':' [0-9][0-9] )? /
+ rl letterZone /[A-Z][A-Z][A-Z]/
+ rl numZone /[+\-][0-9][0-9][0-9][0-9]/
+ rl zone / letterZone | numZone/
+ rl dayNum /[0-9 ][0-9]/
+
+ # These are the different formats of the date minus an obscure
+ # type that has a funny string 'remote from xxx' on the end. Taken
+ # from c-client in the imap-2000 distribution.
+ rl date / day ' ' month ' ' dayNum ' ' time ' '
+ ( year | year ' ' zone | zone ' ' year ) /
+
+ # From lines separate messages. We will exclude from_line from a message
+ # body line. This will cause us to stay in message line up until an
+ # entirely correct from line is matched.
+ token from_line / 'From ' (any-'\n')* ' ' date '\n' /
+ token simple_line / [^\n]* '\n' /
+end
+
+rl hchar /print - [ :]/
+token header_name /hchar+/
+
+token colon /':' ' '*/
+token header_content / ([^\n] | '\n' [ \t])* '\n'/
+token blank_line / '\n' /
+
+def header
+ [header_name colon header_content]
+
+def message
+ [from_line header* blank_line simple_line*]
+
+def start
+ [message*]
+
+parse S: start[ stdin ]
+print_xml( S )
+print( '\n' )
+##### IN #####
+From thurston Tue Jan 2 21:16:50 2007
+Return-Path: <unknown>
+X-Spam-Level: *
+Received: from [109.111.71.111] (helo=twfmtr)
+ by zifreax with smtp (Exim 4.43)
+ id 1H1vfs-0005LN-HW; Tue, 2 Jan 2007 21:16:16 -0500
+Message-ID: <459B113F.8050903@immoarthabitatge.com>
+X-Keywords:
+X-UID: 1
+
+Content-Type: text/html; charset=ISO-8859-1
+</body>
+</html>
+
+From thurston Wed Jan 3 02:35:48 2007
+Return-Path: <unknown>
+X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on mambo.cs.queensu.ca
+X-Spam-Level: **
+X-Spam-Status: No, score=2.9 required=5.0 tests=BAYES_20,EXTRA_MPART_TYPE,
+ HTML_40_50,HTML_IMAGE_ONLY_16,HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET
+ autolearn=no version=3.1.1
+X-Bogosity: Unsure, tests=bogofilter, spamicity=0.971708, version=1.0.2
+Status: RO
+X-UID: 2
+
+------=_NextPart_000_0010_01C72F11.F137BD60
+ charset="windows-1252"
+Content-Transfer-Encoding: quoted-printable
+
+##### EXP #####
+<start><_repeat_message><message><from_line>From thurston Tue Jan 2 21:16:50 2007
+</from_line><_repeat_header><header><header_name>Return-Path</header_name><colon>: </colon><header_content>&lt;unknown&gt;
+</header_content></header><header><header_name>X-Spam-Level</header_name><colon>: </colon><header_content>*
+</header_content></header><header><header_name>Received</header_name><colon>: </colon><header_content>from [109.111.71.111] (helo=twfmtr)
+ by zifreax with smtp (Exim 4.43)
+ id 1H1vfs-0005LN-HW; Tue, 2 Jan 2007 21:16:16 -0500
+</header_content></header><header><header_name>Message-ID</header_name><colon>: </colon><header_content>&lt;459B113F.8050903@immoarthabitatge.com&gt;
+</header_content></header><header><header_name>X-Keywords</header_name><colon>: </colon><header_content>
+</header_content></header><header><header_name>X-UID</header_name><colon>: </colon><header_content>1
+</header_content></header></_repeat_header><blank_line>
+</blank_line><_repeat_simple_line><simple_line>Content-Type: text/html; charset=ISO-8859-1
+</simple_line><simple_line>&lt;/body&gt;
+</simple_line><simple_line>&lt;/html&gt;
+</simple_line><simple_line>
+</simple_line></_repeat_simple_line></message><message><from_line>From thurston Wed Jan 3 02:35:48 2007
+</from_line><_repeat_header><header><header_name>Return-Path</header_name><colon>: </colon><header_content>&lt;unknown&gt;
+</header_content></header><header><header_name>X-Spam-Checker-Version</header_name><colon>: </colon><header_content>SpamAssassin 3.1.1 (2006-03-10) on mambo.cs.queensu.ca
+</header_content></header><header><header_name>X-Spam-Level</header_name><colon>: </colon><header_content>**
+</header_content></header><header><header_name>X-Spam-Status</header_name><colon>: </colon><header_content>No, score=2.9 required=5.0 tests=BAYES_20,EXTRA_MPART_TYPE,
+ HTML_40_50,HTML_IMAGE_ONLY_16,HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET
+ autolearn=no version=3.1.1
+</header_content></header><header><header_name>X-Bogosity</header_name><colon>: </colon><header_content>Unsure, tests=bogofilter, spamicity=0.971708, version=1.0.2
+</header_content></header><header><header_name>Status</header_name><colon>: </colon><header_content>RO
+</header_content></header><header><header_name>X-UID</header_name><colon>: </colon><header_content>2
+</header_content></header></_repeat_header><blank_line>
+</blank_line><_repeat_simple_line><simple_line>------=_NextPart_000_0010_01C72F11.F137BD60
+</simple_line><simple_line> charset="windows-1252"
+</simple_line><simple_line>Content-Transfer-Encoding: quoted-printable
+</simple_line><simple_line>
+</simple_line></_repeat_simple_line></message></_repeat_message></start>
diff --git a/test/matchex.lm b/test/matchex.lm
new file mode 100644
index 0000000..9dd24c4
--- /dev/null
+++ b/test/matchex.lm
@@ -0,0 +1,41 @@
+##### LM #####
+lex
+ token id /[a-zA-Z_][a-zA-Z0-9_]*/
+ literal `= `< `> `/
+ ignore /[ \t\n\r\v]+/
+end
+
+def attr
+ [id `= id]
+
+def open_tag
+ [`< id attr* `>]
+
+def close_tag
+ [`< `/ id `>]
+
+def tag
+ [open_tag item* close_tag]
+
+def item
+ [tag]
+| [id]
+
+parse Tag: tag[ stdin ]
+
+# Style: List of literal text and types.
+match Tag ["<person name=" Val1:id attr*">" item* "</person>"]
+
+# Style: Literal text with embedded lists of types.
+match Tag "<person name=[Val2:id attr*]>[item*]</person>"
+
+print( ^Val1 '\n' )
+print( ^Val2 '\n' )
+
+##### IN #####
+<person name=adrian hometown=kingston>
+ <t1 foo=bar2 e=f></t2>
+</person>
+##### EXP #####
+adrian
+adrian
diff --git a/test/maxlen.lm b/test/maxlen.lm
new file mode 100644
index 0000000..2d220d1
--- /dev/null
+++ b/test/maxlen.lm
@@ -0,0 +1,57 @@
+##### LM #####
+
+context maxlen
+
+ #
+ # Regular Definitions
+ #
+ rl rl_ws /[ \t\n\r\v]+/
+ rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
+
+ #
+ # Tokens
+ #
+
+ lex
+ ignore /rl_ws/
+ token id /rl_id/
+ end
+
+ num: int
+ allow: int
+
+ def item
+ [id]
+ {
+ num = num + 1
+ toomuch: int = allow+1
+ if num == toomuch {
+ reject
+ }
+ }
+
+ def open
+ []
+ {
+ num = 0
+ }
+
+ def close []
+
+ def restricted_list
+ [open item*]
+
+ def start
+ [restricted_list id*]
+end # maxlen
+
+cons MaxLen: maxlen[]
+MaxLen.allow = 3
+
+parse S: maxlen::start(MaxLen)[stdin]
+print_xml( S )
+print('\n')
+##### IN #####
+a b c d e f g
+##### EXP #####
+<maxlen::start><maxlen::restricted_list><maxlen::open></maxlen::open><maxlen::_repeat_item><maxlen::item><maxlen::id>a</maxlen::id></maxlen::item><maxlen::item><maxlen::id>b</maxlen::id></maxlen::item><maxlen::item><maxlen::id>c</maxlen::id></maxlen::item></maxlen::_repeat_item></maxlen::restricted_list><maxlen::_repeat_id><maxlen::id>d</maxlen::id><maxlen::id>e</maxlen::id><maxlen::id>f</maxlen::id><maxlen::id>g</maxlen::id></maxlen::_repeat_id></maxlen::start>
diff --git a/test/multiregion1.lm b/test/multiregion1.lm
new file mode 100644
index 0000000..5c8bdea
--- /dev/null
+++ b/test/multiregion1.lm
@@ -0,0 +1,242 @@
+##### LM #####
+
+
+token newline / '\n' /
+token index / 'Index:' [ \t]* /
+token consume_line / [^\n]* /
+
+
+def index_stmt [index consume_line newline]
+
+token separator_line / '='+ '\n' /
+
+# Whitespace separated word list
+lex
+ token word /[^\t \n]+/
+ ignore /[\t ]+/
+
+ def word_list
+ [word word_list]
+ | []
+end
+
+token old_file_start / '---' [\t ]+ /
+token new_file_start / '+++' [\t ]+ /
+
+def old_file
+ [old_file_start word_list newline]
+
+def new_file
+ [new_file_start word_list newline]
+
+def file_header
+ [index_stmt separator_line old_file new_file]
+
+token hunk_header / '@@' any* :>> '@@' '\n' /
+token hunk_line / ( ' ' | '-' | '+' ) [^\n]* '\n' /
+
+def hunk_body
+ [hunk_line*]
+
+def hunk
+ [hunk_header hunk_body]
+
+# diff of a single file: header followed by a hunk list.
+def file_diff
+ [file_header hunk*]
+
+def start
+ [file_diff*]
+
+parse S: start[ stdin ]
+
+for OF: old_file in S {
+ # Get the first word and check if it is
+ # the file we are interested in.
+ if match OF [
+ "--- fsmrun.cpp"
+ Rest: word_list
+ "\n"
+ ]
+ {
+ OF = construct old_file
+ ["--- newfilename.cpp " Rest "\n"]
+ }
+}
+
+print( S )
+
+##### IN #####
+Index: fsmrun.cpp
+===================================================================
+--- fsmrun.cpp (revision 4555)
++++ fsmrun.cpp (working copy)
+@@ -150,7 +150,7 @@
+ peof = 0;
+ if ( parser != 0 ) {
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ }
+ else {
+ region = 0;
+@@ -189,7 +189,7 @@
+
+ tokstart = 0;
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ }
+
+ void FsmRun::sendToken( int id )
+@@ -222,7 +222,7 @@
+ parser = newParser;
+
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ }
+ else {
+ #ifdef LOG_ACTIONS
+@@ -355,7 +355,7 @@
+
+ /* Set the current state from the next region. */
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ }
+ }
+
+@@ -452,7 +452,7 @@
+ /* First thing check for error. */
+ if ( cs == tables->errorState ) {
+ if ( parser != 0 ) {
+- if ( getStateFromNextRegion( 1 ) != 0 ) {
++ if ( parser->getNextRegion( 1 ) != 0 ) {
+ #ifdef LOG_BACKTRACK
+ cerr << "scanner failed, trying next region" << endl;
+ #endif
+@@ -462,7 +462,7 @@
+
+ parser->nextRegionInd += 1;
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ cerr << "new token region: " <<
+ parser->tables->gbl->regionInfo[region].name << endl;
+ continue;
+@@ -495,7 +495,7 @@
+ }
+ else {
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ cerr << "new token region: " <<
+ parser->tables->gbl->regionInfo[region].name << endl;
+ continue;
+Index: junk.cpp
+===================================================================
+---
++++ junk.cpp (working copy)
+Index: fsmrun.h
+===================================================================
+--- fsmrun.h (revision 4557)
++++ fsmrun.h (working copy)
+@@ -197,10 +197,6 @@
+ void runOnInputStream( PdaRun *parser, InputStream &in );
+ void execute();
+
+- /* Offset can be used to look at the next nextRegionInd. */
+- int getStateFromNextRegion( int offset = 0 )
+- { return tables->entryByRegion[parser->getNextRegion(offset)]; }
+-
+ FsmTables *tables;
+ PdaRun *parser;
+ InputStream *inputStream;
+##### EXP #####
+Index: fsmrun.cpp
+===================================================================
+--- newfilename.cpp (revision 4555)
++++ fsmrun.cpp (working copy)
+@@ -150,7 +150,7 @@
+ peof = 0;
+ if ( parser != 0 ) {
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ }
+ else {
+ region = 0;
+@@ -189,7 +189,7 @@
+
+ tokstart = 0;
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ }
+
+ void FsmRun::sendToken( int id )
+@@ -222,7 +222,7 @@
+ parser = newParser;
+
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ }
+ else {
+ #ifdef LOG_ACTIONS
+@@ -355,7 +355,7 @@
+
+ /* Set the current state from the next region. */
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ }
+ }
+
+@@ -452,7 +452,7 @@
+ /* First thing check for error. */
+ if ( cs == tables->errorState ) {
+ if ( parser != 0 ) {
+- if ( getStateFromNextRegion( 1 ) != 0 ) {
++ if ( parser->getNextRegion( 1 ) != 0 ) {
+ #ifdef LOG_BACKTRACK
+ cerr << "scanner failed, trying next region" << endl;
+ #endif
+@@ -462,7 +462,7 @@
+
+ parser->nextRegionInd += 1;
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ cerr << "new token region: " <<
+ parser->tables->gbl->regionInfo[region].name << endl;
+ continue;
+@@ -495,7 +495,7 @@
+ }
+ else {
+ region = parser->getNextRegion();
+- cs = getStateFromNextRegion();
++ cs = tables->entryByRegion[region];
+ cerr << "new token region: " <<
+ parser->tables->gbl->regionInfo[region].name << endl;
+ continue;
+Index: junk.cpp
+===================================================================
+---
++++ junk.cpp (working copy)
+Index: fsmrun.h
+===================================================================
+--- fsmrun.h (revision 4557)
++++ fsmrun.h (working copy)
+@@ -197,10 +197,6 @@
+ void runOnInputStream( PdaRun *parser, InputStream &in );
+ void execute();
+
+- /* Offset can be used to look at the next nextRegionInd. */
+- int getStateFromNextRegion( int offset = 0 )
+- { return tables->entryByRegion[parser->getNextRegion(offset)]; }
+-
+ FsmTables *tables;
+ PdaRun *parser;
+ InputStream *inputStream;
diff --git a/test/multiregion2.lm b/test/multiregion2.lm
new file mode 100644
index 0000000..d69b8d4
--- /dev/null
+++ b/test/multiregion2.lm
@@ -0,0 +1,124 @@
+##### LM #####
+#
+# Character classes
+#
+rl CTL /0..31 | 127/
+rl CR /13/
+rl LF /10/
+rl SP /32/
+rl HT /9/
+rl CHAR /0..127/
+
+rl separators / '(' | ')' | '<' | '>'
+ | '@' | ',' | ';' | ':' | '\\'
+ | '"' | '/' | '[' | ']' | '?'
+ | '=' | '{' | '}' | SP | HT /
+
+rl token_char /CHAR - CTL - separators/
+
+#
+# Literal tokens
+#
+
+literal `HTTP/ `:
+token SPT /' '/
+token CRLF /CR LF/
+
+#
+# Request Line
+#
+
+token method /token_char+/
+
+token request_uri /(^SP)+/
+
+token http_number /digit+ '.' digit+/
+
+def http_version
+ [ `HTTP/ http_number ]
+
+def request_line
+ [method SPT request_uri
+ SPT http_version CRLF]
+
+#
+# Header
+#
+
+token field_name /token_char+/
+
+lex
+ token fv_plain /(^(CR|LF))*/
+ token fv_ext /CR LF (SP|HT)/
+ token fv_term /CR LF/
+end
+
+def fv
+ [fv_plain]
+| [fv_ext]
+
+def field_value
+ [fv* fv_term]
+
+def header
+ [field_name `: field_value]
+
+#
+# Request
+#
+
+def request
+ [request_line header* CRLF]
+
+parse R: request*[ stdin ]
+
+if !R {
+ print( error )
+ exit( 1 )
+}
+
+for FV: fv in R {
+ if match FV [fv_ext]
+ FV = cons fv " "
+}
+
+print( R )
+
+##### IN #####
+GET /hi/there/ HTTP/1.1
+
+GET /hithere/ HTTP/1.1
+Host: localhost:3535
+User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12
+Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+Accept-Language: en-us,en;q=0.5
+Accept-Encoding: gzip,deflate
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+Keep-Alive: 300
+Connection: keep-alive
+Cache-Control: max-age=0
+
+GET foo HTTP/1.1
+hello: foo
+hi: there
+ my
+ friend
+
+##### EXP #####
+GET /hi/there/ HTTP/1.1
+
+GET /hithere/ HTTP/1.1
+Host: localhost:3535
+User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12
+Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+Accept-Language: en-us,en;q=0.5
+Accept-Encoding: gzip,deflate
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+Keep-Alive: 300
+Connection: keep-alive
+Cache-Control: max-age=0
+
+GET foo HTTP/1.1
+hello: foo
+hi: there my friend
+
diff --git a/test/mutualrec.lm b/test/mutualrec.lm
new file mode 100644
index 0000000..2eafd28
--- /dev/null
+++ b/test/mutualrec.lm
@@ -0,0 +1,18 @@
+##### LM #####
+
+int f1( i: int )
+{
+ return f2( i + 1 ) + 1
+}
+
+int f2( i: int )
+{
+ if i < 10
+ return f1( i + 1 ) + 1
+ else
+ return i
+}
+
+print( "f1() = [$f1(0)]\n" )
+##### EXP #####
+f1() = 22
diff --git a/test/namespace1.lm b/test/namespace1.lm
new file mode 100644
index 0000000..b31b453
--- /dev/null
+++ b/test/namespace1.lm
@@ -0,0 +1,24 @@
+##### LM #####
+namespace n1
+
+ lex
+ token id / 'a' .. 'z' /
+ ignore / '\n' | '\t' | ' ' /
+ end
+
+ def start
+ [id*]
+end
+
+parse P: n1::start[stdin]
+print( P )
+##### IN #####
+a
+ b
+ c
+d
+##### EXP #####
+a
+ b
+ c
+d
diff --git a/test/nestedcomm.lm b/test/nestedcomm.lm
new file mode 100644
index 0000000..1b1b6a4
--- /dev/null
+++ b/test/nestedcomm.lm
@@ -0,0 +1,55 @@
+##### LM #####
+#
+# Tokens
+#
+
+# Any single character can be a literal
+lex
+ # Ignore whitespace.
+ ignore /[ \t\n\r\v]+/
+
+ # Open and close id
+ token id /[a-zA-Z_][a-zA-Z0-9_]*/
+
+ token open_paren /'('/
+ {
+ parse_stop NC: nested_comment[ stdin ]
+ print( %NC '\n' )
+ input.push_ignore( NC )
+ }
+end
+
+#
+# Token translation
+#
+
+lex
+ literal `( `)
+ token nc_data /[^()]+/
+end
+
+def nc_item
+ [nc_data]
+| [nested_comment]
+
+def nested_comment
+ [`( nc_item* `)]
+
+def nested [id*]
+
+parse P: nested[ stdin ]
+
+print( ^P '\n' )
+print_xml( ^P )
+print( '\n' )
+print_xml_ac( ^P )
+print( '\n' )
+print( ^P '\n' )
+##### IN #####
+hello there ( (this is a nested comment /*sdf;asd_++_stuff) ) and this is not
+##### EXP #####
+( (this is a nested comment /*sdf;asd_++_stuff) )
+hello there ( (this is a nested comment /*sdf;asd_++_stuff) ) and this is not
+<nested><_repeat_id><id>hello</id><id>there</id><id>and</id><id>this</id><id>is</id><id>not</id></_repeat_id></nested>
+<nested><_repeat_id><id>hello</id><_ignore_0001> </_ignore_0001><id>there</id><_ignore_0001> </_ignore_0001><nested_comment><_literal_0007>(</_literal_0007><_repeat_nc_item><nc_item><nc_data> </nc_data></nc_item><nc_item><nested_comment><_literal_0007>(</_literal_0007><_repeat_nc_item><nc_item><nc_data>this is a nested comment /*sdf;asd_++_stuff</nc_data></nc_item></_repeat_nc_item><_literal_0009>)</_literal_0009></nested_comment></nc_item><nc_item><nc_data> </nc_data></nc_item></_repeat_nc_item><_literal_0009>)</_literal_0009></nested_comment><_ignore_0001> </_ignore_0001><id>and</id><_ignore_0001> </_ignore_0001><id>this</id><_ignore_0001> </_ignore_0001><id>is</id><_ignore_0001> </_ignore_0001><id>not</id></_repeat_id></nested>
+hello there ( (this is a nested comment /*sdf;asd_++_stuff) ) and this is not
diff --git a/test/order1.lm b/test/order1.lm
new file mode 100644
index 0000000..e510bbb
--- /dev/null
+++ b/test/order1.lm
@@ -0,0 +1,115 @@
+##### LM #####
+
+lex
+ token c_single_lit /( 'L'? "'" ( [^'\\\n] | '\\' any )* "'" )/
+ token c_double_lit /( 'L'? '"' ( [^"\\\n] | '\\' any )* '"' )/
+
+ token sym / ';' | ',' | '=' | '(' | ')' | ':' | '&' | '*' |
+ '[' | ']' | '~' | '+' | '-' | '/' | '<' | '>' | '|' |
+ '^' | '%' | '!' | '?' | '.' | '#'/
+
+ # Identifiers
+ token c_id /( [a-zA-Z_] [a-zA-Z0-9_]* )/
+
+ # Comments and whitespace.
+ token comm_c /( '/*' (any | '\n')* :>> '*/' )/
+ token comm_cxx /( '//' any* :> '\n' )/
+ token ws /( any - 33..126 )+/
+end
+
+def c_token
+ [c_single_lit]
+| [c_double_lit]
+| [sym]
+| [c_id]
+| [comm_c]
+| [comm_cxx]
+| [ws]
+
+def c_token_list
+ [c_token c_token_list]
+| [c_token]
+
+# Can parse this, use ful for single constructs.
+def c
+ [c_token*]
+
+literal `%%
+
+lex
+ literal `{ `}
+ literal `protocol `client `server `port `by `tcp `udp
+ token id /[A-Za-z_][A-Za-z_0-9]*/
+ token number /[0-9]+/
+
+ ignore /'/*' any* :>> '*/'/
+ ignore /[ \t\r\n]+/
+end
+
+def tcp_by_port
+ [`tcp `by `port]
+
+def udp_by_port
+ [`udp `by `port]
+
+def attribute
+ [`client id]
+| [`server id]
+| [`port number]
+| [`udp id]
+| [tcp_by_port]
+| [udp_by_port]
+
+def tcp_protocol
+ [`tcp `protocol id `{ attribute* `}]
+
+def udp_protocol
+ [`udp `protocol id `{ attribute* `}]
+
+def protocol
+ [tcp_protocol]
+| [udp_protocol]
+
+def program
+ [c `%% protocol*]
+
+alias output accum<c>
+
+def port
+ Port: int
+ Protocol: str
+ []
+
+# Parse the input.
+parse P: program[ stdin ]
+
+Output: output Output = construct output []
+
+# Take off the leading C from the input file and send it out.
+match P [C: c `%% protocol*]
+
+send Output [$C]
+send Output
+ "#include <assert.h>
+ "
+ eos
+
+print( Output.tree )
+##### IN #####
+#include "some_header.h"
+
+%%
+
+tcp protocol FOO
+{
+ port 99
+
+ client c
+ server s
+}
+
+##### EXP #####
+#include "some_header.h"
+
+#include <assert.h>
+
diff --git a/test/order2.lm b/test/order2.lm
new file mode 100644
index 0000000..d91dd42
--- /dev/null
+++ b/test/order2.lm
@@ -0,0 +1,116 @@
+##### LM #####
+
+lex
+ token c_single_lit /( 'L'? "'" ( [^'\\\n] | '\\' any )* "'" )/
+ token c_double_lit /( 'L'? '"' ( [^"\\\n] | '\\' any )* '"' )/
+
+ token sym / ';' | ',' | '=' | '(' | ')' | ':' | '&' | '*' |
+ '[' | ']' | '~' | '+' | '-' | '/' | '<' | '>' | '|' |
+ '^' | '!' | '?' | '.' | '#'/
+
+ # Identifiers
+ token c_id /( [a-zA-Z_] [a-zA-Z0-9_]* )/
+
+ # Comments and whitespace.
+ token comm_c /( '/*' (any | '\n')* :>> '*/' )/
+ token comm_cxx /( '//' any* :> '\n' )/
+ token ws /( any - 33..126 )+/
+end
+
+def c_token
+ [c_single_lit]
+| [c_double_lit]
+| [sym]
+| [c_id]
+| [comm_c]
+| [comm_cxx]
+| [ws]
+
+def c_token_list
+ [c_token c_token_list]
+| [c_token]
+
+# Can parse this, use ful for single constructs.
+#def c
+# [c_token*]
+
+def c
+ [c_token_list]
+
+lex
+ literal `%%
+ literal `{ `}
+ literal `protocol `client `server `port `by `tcp `udp
+ token id /[A-Za-z_][A-Za-z_0-9]*/
+ token number /[0-9]+/
+
+ ignore /'/*' any* :>> '*/'/
+ ignore /[ \t\r\n]+/
+end
+
+def tcp_by_port
+ [`tcp `by `port]
+
+def udp_by_port
+ [`udp `by `port]
+
+def attribute
+ [`client id]
+| [`server id]
+| [`port number]
+| [`udp id]
+| [tcp_by_port]
+| [udp_by_port]
+
+def tcp_protocol
+ [`tcp `protocol id `{ attribute* `}]
+
+def udp_protocol
+ [`udp `protocol id `{ attribute* `}]
+
+def protocol
+ [tcp_protocol]
+| [udp_protocol]
+
+def program
+ [c `%% protocol*]
+
+alias output parser<c>
+
+def port
+ Port: int
+ Protocol: str
+ []
+
+# Parse the input.
+parse P: program[ stdin ]
+
+Output: output Output = construct output []
+
+# Take off the leading C from the input file and send it out.
+match P [C: c '%%' protocol*]
+
+send Output [
+ $C
+ "#include <assert.h>
+ "
+ ] eos
+print( Output.tree )
+##### IN #####
+#include "some_header.h"
+
+%%
+
+tcp protocol FOO
+{
+ port 99
+
+ client c
+ server s
+}
+
+##### EXP #####
+#include "some_header.h"
+
+#include <assert.h>
+
diff --git a/test/parse1.lm b/test/parse1.lm
new file mode 100644
index 0000000..f8ecab8
--- /dev/null
+++ b/test/parse1.lm
@@ -0,0 +1,14 @@
+##### LM #####
+lex
+ token id / [a-z] /
+ ignore / [\n\t ] /
+end
+
+def start [id*]
+
+parse S: start[stdin]
+print( S )
+##### IN #####
+ab cd ef
+##### EXP #####
+ab cd ef
diff --git a/test/prints.lm b/test/prints.lm
new file mode 100644
index 0000000..ad08220
--- /dev/null
+++ b/test/prints.lm
@@ -0,0 +1,17 @@
+##### LM #####
+lex
+ token word /[a-z]+/
+ ignore /[\t\n ]+/
+end
+
+def start
+ [word*]
+
+parse Start: start[stdin]
+
+prints( stderr 'fd stderr: ' ^Start '\n' )
+prints( stdout 'fd stdout: ' ^Start '\n' )
+##### IN #####
+a b c
+##### EXP #####
+fd stdout: a b c
diff --git a/test/pull1.lm b/test/pull1.lm
new file mode 100644
index 0000000..f86bd6c
--- /dev/null
+++ b/test/pull1.lm
@@ -0,0 +1,7 @@
+##### LM #####
+String: str = stdin.pull( 10 )
+print( String '\n' )
+##### IN #####
+this is input for a non-parse pull
+##### EXP #####
+this is in
diff --git a/test/pull2.lm b/test/pull2.lm
new file mode 100644
index 0000000..7b50092
--- /dev/null
+++ b/test/pull2.lm
@@ -0,0 +1,8 @@
+##### LM #####
+Stream: stream = open( 'working/pull2.in' ('r') )
+String: str = Stream.pull( 10 )
+print( String '\n' )
+##### IN #####
+this is input for a non-parse pull
+##### EXP #####
+this is in
diff --git a/test/ragelambig1.lm b/test/ragelambig1.lm
new file mode 100644
index 0000000..845a07b
--- /dev/null
+++ b/test/ragelambig1.lm
@@ -0,0 +1,72 @@
+##### LM #####
+lex
+ ignore /[\t\n ]+/
+ literal `^ `| `- `, `: `! `? `.
+ literal `( `) `{ `} `* `& `+
+
+ literal `-- `:> `:>> `<: `-> `**
+
+ token word /[a-zA-Z_][a-zA-Z0-9_]*/
+ token uint /[0-9]+/
+end
+
+
+def start
+ [expression]
+ {
+ print_xml( lhs )
+ }
+
+def expression
+ [expression `| term]
+| [expression `& term]
+| [expression `- term]
+| [expression `-- term]
+| [term]
+
+def term
+ [term factor_with_rep]
+ {
+ if match lhs [term `- uint]
+ reject
+ }
+| [term `. factor_with_rep]
+| [term `:> factor_with_rep]
+| [term `:>> factor_with_rep]
+| [term `<: factor_with_rep]
+| [factor_with_rep]
+
+def factor_with_rep
+ [factor_with_rep `*]
+| [factor_with_rep `**]
+| [factor_with_rep `?]
+| [factor_with_rep `+]
+| [factor_with_rep `{ factor_rep_num `}]
+| [factor_with_rep `{ `, factor_rep_num `}]
+| [factor_with_rep `{ factor_rep_num `, `}]
+| [factor_with_rep `{ factor_rep_num `, factor_rep_num `}]
+| [factor_with_neg]
+
+def factor_rep_num [uint]
+
+def factor_with_neg
+ [`! factor_with_neg]
+| [`^ factor_with_neg]
+| [factor]
+
+def factor
+ [alphabet_num]
+| [word]
+| [`( expression `)]
+
+def alphabet_num
+ [uint]
+| [`- uint]
+
+parse start[ stdin ]
+
+print( '\n' )
+##### IN #####
+1 - 1
+##### EXP #####
+<start><expression><expression><term><factor_with_rep><factor_with_neg><factor><alphabet_num><uint>1</uint></alphabet_num></factor></factor_with_neg></factor_with_rep></term></expression><_literal_0007>-</_literal_0007><term><factor_with_rep><factor_with_neg><factor><alphabet_num><uint>1</uint></alphabet_num></factor></factor_with_neg></factor_with_rep></term></expression></start>
diff --git a/test/ragelambig2.lm b/test/ragelambig2.lm
new file mode 100644
index 0000000..39602bc
--- /dev/null
+++ b/test/ragelambig2.lm
@@ -0,0 +1,72 @@
+##### LM #####
+lex
+ ignore /[\t\n ]+/
+ literal `^ `| `- `, `: `! `? `.
+ literal `( `) `{ `} `* `& `+
+
+ literal `-- `:> `:>> `<: `-> `**
+
+ token word /[a-zA-Z_][a-zA-Z0-9_]*/
+ token uint /[0-9]+/
+end
+
+
+def start
+ [expression]
+ {
+ print_xml( lhs )
+ }
+
+def expression
+ [expression `| term]
+| [expression `& term]
+| [expression `- term]
+| [expression `-- term]
+| [term]
+
+def term
+ [factor_with_rep more_term]
+
+# Can resolve the ambiguity by making more_term shortest match.
+def more_term
+ []
+| [factor_with_rep more_term]
+| [`. factor_with_rep more_term]
+| [`:> factor_with_rep more_term]
+| [`:>> factor_with_rep more_term]
+| [`<: factor_with_rep more_term]
+
+def factor_with_rep
+ [factor_with_rep `*]
+| [factor_with_rep `**]
+| [factor_with_rep `?]
+| [factor_with_rep `+]
+| [factor_with_rep `{ factor_rep_num `}]
+| [factor_with_rep `{ `, factor_rep_num `}]
+| [factor_with_rep `{ factor_rep_num `, `}]
+| [factor_with_rep `{ factor_rep_num `, factor_rep_num `}]
+| [factor_with_neg]
+
+def factor_rep_num
+ [uint]
+
+def factor_with_neg
+ [`! factor_with_neg]
+| [`^ factor_with_neg]
+| [factor]
+
+def factor
+ [alphabet_num]
+| [word]
+| [`( expression `)]
+
+def alphabet_num
+ [uint]
+| [`- uint]
+
+parse start[ stdin ]
+print( '\n' )
+##### IN #####
+1 - 1
+##### EXP #####
+<start><expression><expression><term><factor_with_rep><factor_with_neg><factor><alphabet_num><uint>1</uint></alphabet_num></factor></factor_with_neg></factor_with_rep><more_term></more_term></term></expression><_literal_0007>-</_literal_0007><term><factor_with_rep><factor_with_neg><factor><alphabet_num><uint>1</uint></alphabet_num></factor></factor_with_neg></factor_with_rep><more_term></more_term></term></expression></start>
diff --git a/test/ragelambig3.lm b/test/ragelambig3.lm
new file mode 100644
index 0000000..74b7254
--- /dev/null
+++ b/test/ragelambig3.lm
@@ -0,0 +1,72 @@
+##### LM #####
+lex
+ ignore /[\t\n ]+/
+ literal `^ `| `- `, `: `! `? `.
+ literal `( `) `{ `} `* `& `+
+
+ literal `-- `:> `:>> `<: `-> `**
+
+ token word /[a-zA-Z_][a-zA-Z0-9_]*/
+ token uint /[0-9]+/
+end
+
+
+def start
+ [expression]
+ {
+ print_xml( lhs )
+ }
+
+def expression
+ [expression `| term_short]
+| [expression `& term_short]
+| [expression `- term_short]
+| [expression `-- term_short]
+| [term_short]
+
+# Works, but is confusing.
+def term_short
+ reducefirst
+ [term]
+
+def term
+ [term factor_with_rep]
+| [term `. factor_with_rep]
+| [term `:> factor_with_rep]
+| [term `:>> factor_with_rep]
+| [term `<: factor_with_rep]
+| [factor_with_rep]
+
+def factor_with_rep
+ [factor_with_rep `*]
+| [factor_with_rep `**]
+| [factor_with_rep `?]
+| [factor_with_rep `+]
+| [factor_with_rep `{ factor_rep_num `}]
+| [factor_with_rep `{ `, factor_rep_num `}]
+| [factor_with_rep `{ factor_rep_num `, `}]
+| [factor_with_rep `{ factor_rep_num `, factor_rep_num `}]
+| [factor_with_neg]
+
+def factor_rep_num [uint]
+
+def factor_with_neg
+ [`! factor_with_neg]
+| [`^ factor_with_neg]
+| [factor]
+
+def factor
+ [alphabet_num]
+| [word]
+| [`( expression `)]
+
+def alphabet_num
+ [uint]
+| [`- uint]
+
+parse start[ stdin ]
+print( '\n' )
+##### IN #####
+1 - 1
+##### EXP #####
+<start><expression><expression><term_short><term><factor_with_rep><factor_with_neg><factor><alphabet_num><uint>1</uint></alphabet_num></factor></factor_with_neg></factor_with_rep></term></term_short></expression><_literal_0007>-</_literal_0007><term_short><term><factor_with_rep><factor_with_neg><factor><alphabet_num><uint>1</uint></alphabet_num></factor></factor_with_neg></factor_with_rep></term></term_short></expression></start>
diff --git a/test/ragelambig4.lm b/test/ragelambig4.lm
new file mode 100644
index 0000000..e841b80
--- /dev/null
+++ b/test/ragelambig4.lm
@@ -0,0 +1,76 @@
+##### LM #####
+lex
+ ignore /[\t\n ]+/
+ literal `^ `| `- `, `: `! `? `.
+ literal `( `) `{ `} `* `& `+
+
+ literal `-- `:> `:>> `<: `-> `**
+
+ token word /[a-zA-Z_][a-zA-Z0-9_]*/
+ token uint /[0-9]+/
+end
+
+
+def start
+ [expression]
+ {
+ print_xml( lhs )
+ }
+
+def expression [term expression_op*]
+
+def expression_op
+ [`| term]
+| [`& term]
+| [`- term]
+| [`-- term]
+
+def term [factor_rep term_op_list_short]
+
+# This list is done manually to get shortest match.
+def term_op_list_short
+ []
+| [term_op term_op_list_short]
+
+def term_op
+ [factor_rep]
+| [`. factor_rep]
+| [`:> factor_rep]
+| [`:>> factor_rep]
+| [`<: factor_rep]
+
+def factor_rep
+ [factor_neg factor_rep_op*]
+
+def factor_rep_op
+ [`*]
+| [`**]
+| [`?]
+| [`+]
+| [`{ factor_rep_num `}]
+| [`{ `, factor_rep_num `}]
+| [`{ factor_rep_num `, `}]
+| [`{ factor_rep_num `, factor_rep_num `}]
+
+def factor_rep_num [uint]
+
+def factor_neg
+ [`! factor_neg]
+| [`^ factor_neg]
+| [factor]
+
+def factor
+ [alphabet_num]
+| [word]
+| [`( expression `)]
+
+def alphabet_num
+ [uint]
+| [`- uint]
+
+parse start[ stdin ]
+print( '\n' )
+##### IN #####
+1 - 1
+##### EXP #####
+<start><expression><term><factor_rep><factor_neg><factor><alphabet_num><uint>1</uint></alphabet_num></factor></factor_neg><_repeat_factor_rep_op></_repeat_factor_rep_op></factor_rep><term_op_list_short></term_op_list_short></term><_repeat_expression_op><expression_op><_literal_0007>-</_literal_0007><term><factor_rep><factor_neg><factor><alphabet_num><uint>1</uint></alphabet_num></factor></factor_neg><_repeat_factor_rep_op></_repeat_factor_rep_op></factor_rep><term_op_list_short></term_op_list_short></term></expression_op></_repeat_expression_op></expression></start>
diff --git a/test/rediv.lm b/test/rediv.lm
new file mode 100644
index 0000000..c5ac955
--- /dev/null
+++ b/test/rediv.lm
@@ -0,0 +1,99 @@
+##### LM #####
+# Or-literal scanner
+lex
+ token orlit_dash /'-' /
+ token orlit_close /']'/
+
+ rl orlit_specials /[\-\]]/
+ token orlit_chr /^orlit_specials | '\\' any/
+end
+
+def orlit_item
+ [orlit_chr]
+| [orlit_chr orlit_dash orlit_chr]
+
+def orlit
+ [orlit_item*]
+
+# Regex scanner
+lex
+ token orlit_open /'['/
+ token orlit_neg_open /'[^'/
+ token regex_dot /'.'/
+ token regex_star /'*'/
+ token regex_close /'/'/
+
+ rl regex_specials /[\[\.\*\/\\]/
+ token regex_chr /(^regex_specials)+ | '\\' any/
+end
+
+def regex_rep
+ [regex_star]
+| []
+
+def regex_base
+ [regex_chr]
+| [regex_dot]
+| [orlit_open orlit orlit_close]
+| [orlit_neg_open orlit orlit_close]
+
+def regex_item
+ [regex_base regex_rep]
+
+def regex_body
+ [regex_item*]
+
+rl s_string /"'" ([^'\\\n] | '\\' any )* "'"/
+rl d_string /'"' ([^"\\\n] | '\\' any )* '"'/
+
+# Root scanner
+lex
+ token ident /[a-zA-Z_]+/
+ token number /[0-9]+/
+ token string /s_string | d_string/
+
+ literal `+ `- `* `; `/
+ token slash /'/'/
+ token semi /';'/
+
+ ignore wp /[ \t\n]+/
+end
+
+def factor
+ [ident]
+| [number]
+| [string]
+| [`/ regex_body regex_close]
+
+def term
+ [term `* factor]
+| [term `/ factor]
+| [factor]
+
+def expr
+ [expr `+ term]
+| [expr `- term]
+| [term]
+
+def statement
+ [expr `;]
+
+def start
+ [statement*]
+
+parse S: start[ stdin ]
+
+for I:orlit_item in S {
+ if match I [orlit_chr] {
+ print( I '\n' )
+ }
+}
+print_xml( S )
+print( '\n' )
+##### IN #####
+2 / /[^gu-zy].*o[\d-xa]*/;
+##### EXP #####
+g
+y
+a
+<start><_repeat_statement><statement><expr><term><term><factor><number>2</number></factor></term><_literal_0021>/</_literal_0021><factor><_literal_0021>/</_literal_0021><regex_body><_repeat_regex_item><regex_item><regex_base><orlit_neg_open>[^</orlit_neg_open><orlit><_repeat_orlit_item><orlit_item><orlit_chr>g</orlit_chr></orlit_item><orlit_item><orlit_chr>u</orlit_chr><orlit_dash>-</orlit_dash><orlit_chr>z</orlit_chr></orlit_item><orlit_item><orlit_chr>y</orlit_chr></orlit_item></_repeat_orlit_item></orlit><orlit_close>]</orlit_close></regex_base><regex_rep></regex_rep></regex_item><regex_item><regex_base><regex_dot>.</regex_dot></regex_base><regex_rep><regex_star>*</regex_star></regex_rep></regex_item><regex_item><regex_base><regex_chr>o</regex_chr></regex_base><regex_rep></regex_rep></regex_item><regex_item><regex_base><orlit_open>[</orlit_open><orlit><_repeat_orlit_item><orlit_item><orlit_chr>\d</orlit_chr><orlit_dash>-</orlit_dash><orlit_chr>x</orlit_chr></orlit_item><orlit_item><orlit_chr>a</orlit_chr></orlit_item></_repeat_orlit_item></orlit><orlit_close>]</orlit_close></regex_base><regex_rep><regex_star>*</regex_star></regex_rep></regex_item></_repeat_regex_item></regex_body><regex_close>/</regex_close></factor></term></expr><_literal_001f>;</_literal_001f></statement></_repeat_statement></start>
diff --git a/test/reor1.lm b/test/reor1.lm
new file mode 100644
index 0000000..816b2f1
--- /dev/null
+++ b/test/reor1.lm
@@ -0,0 +1,27 @@
+##### LM #####
+lex
+ token id / [abcdef] /
+ token number / [0-9] /
+ ignore / [\n\t ] /
+end
+
+def item [id] | [number]
+
+def start [item*]
+
+parse P: start[stdin]
+print( P )
+##### IN #####
+ab cd ef
+##### EXP #####
+ab cd ef
+##### IN #####
+ag
+##### EXP #####
+NIL--noeol
+##### IN #####
+93
+ab 22
+##### EXP #####
+93
+ab 22
diff --git a/test/reor2.lm b/test/reor2.lm
new file mode 100644
index 0000000..51f0dd3
--- /dev/null
+++ b/test/reor2.lm
@@ -0,0 +1,24 @@
+##### LM #####
+context undo
+
+ lex
+ ignore /[ ]+/
+ literal `;
+ token NL /'\n'/
+ token id /[a-zA-Z_]+/
+ end
+
+ def item
+ [id]
+
+ def start
+ [item* `; NL]
+end
+
+cons Undo: undo[]
+parse Input: undo::start( Undo )[ stdin ]
+print( Input )
+##### IN #####
+a b;
+##### EXP #####
+a b;
diff --git a/test/reparse.lm b/test/reparse.lm
new file mode 100644
index 0000000..907ca6a
--- /dev/null
+++ b/test/reparse.lm
@@ -0,0 +1,26 @@
+##### LM #####
+lex
+ ignore /space+/
+ literal `* `( `)
+ token id /[a-zA-Z_]+/
+end
+
+def item
+ [id]
+| [`( item* `)]
+
+def start
+ [item*]
+
+parse Input: item*[ stdin ]
+
+S: start = cons start[ Input ]
+
+parse Again: start[ %Input ]
+
+print( Again )
+
+##### IN #####
+a b c ( chocolate fudge ) d e
+##### EXP #####
+a b c ( chocolate fudge ) d e
diff --git a/test/repeat1.lm b/test/repeat1.lm
new file mode 100644
index 0000000..315a63e
--- /dev/null
+++ b/test/repeat1.lm
@@ -0,0 +1,42 @@
+##### LM #####
+lex
+ ignore /space+/
+ literal `* `( `)
+ token id /[a-zA-Z_]+/
+end
+
+def item
+ [id]
+| [`( item* `)]
+
+def start
+ [item*]
+
+parse Input: start[ stdin ]
+
+match Input [ItemList: item*]
+
+for I: item* in repeat( ItemList )
+ print( ^I '\n' )
+
+for I: item* in rev_repeat( ItemList )
+ print( ^I '\n' )
+##### IN #####
+a b ( c d ) e ( f g ) h i
+##### EXP #####
+a b ( c d ) e ( f g ) h i
+b ( c d ) e ( f g ) h i
+( c d ) e ( f g ) h i
+e ( f g ) h i
+( f g ) h i
+h i
+i
+
+
+i
+h i
+( f g ) h i
+e ( f g ) h i
+( c d ) e ( f g ) h i
+b ( c d ) e ( f g ) h i
+a b ( c d ) e ( f g ) h i
diff --git a/test/repeat2.lm b/test/repeat2.lm
new file mode 100644
index 0000000..e001d8f
--- /dev/null
+++ b/test/repeat2.lm
@@ -0,0 +1,7408 @@
+##### LM #####
+#
+# Copyright 2012 Adrian Thurston <thurston@complang.org>
+#
+
+# This file is part of Ragel.
+#
+# Ragel 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.
+#
+# Ragel 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 Ragel; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+lex
+ token word /( [^. \t\n]+ | '.' )/
+ token lws /[ \t]+/
+ token nl / '\n'/
+
+ token cmd_verb1 /'.verb|'/
+ token cmd_verb2 /'.verb/'/
+ token cmd_label /'.label{'/
+ token cmd_ref /'.ref{'/
+ token cmd_em /'.em{'/
+ token cmd_tt /'.tt{'/
+
+ token cmd_title /'.title' lws/
+ token cmd_sub_title /'.subtitle' lws/
+ token cmd_author /'.author' lws/
+
+ token cmd_chapter /'.chapter' lws/
+ token cmd_section /'.section' lws/
+ token cmd_sub_section /'.subsection' lws/
+ token cmd_sub_sub_section /'.subsubsection' lws/
+
+ token cmd_graphic /'.graphic' lws/
+ token cmd_comment /'.comment' lws? '\n'/
+ token cmd_verbatim /'.verbatim' lws? '\n'/
+ token cmd_code /'.code' lws? '\n'/
+
+ token cmd_itemize /'.itemize' lws? '\n'/
+ token end_itemize /'.end' lws 'itemize' lws? '\n'/
+ token cmd_item /'.item' lws/
+
+ token cmd_center /'.center' lws? '\n'/
+ token end_center /'.end' lws 'center' lws? '\n'/
+
+ token cmd_tabular /'.tabular' lws? '\n'/
+ token cmd_row /'.row' lws/
+ token end_tabular /'.end' lws 'tabular' lws? '\n'/
+
+ token cmd_multicols /'.multicols' lws? '\n'/
+ token cmd_columnbreak /'.columnbreak' lws? '\n'/
+ token end_multicols /'.end' lws 'multicols' lws? '\n'/
+
+ token cmd_figure / '.figure' lws?/
+ token cmd_caption / '.caption' lws/
+ token end_figure / '.end' lws 'figure' lws? '\n'/
+
+ token cmd_list /'.list' lws? '\n'/
+ token end_list /'.end' lws 'list' lws? '\n'/
+ token cmd_li /'.li' lws/
+
+ token cmd_license /'.license' lws? '\n'/
+end
+
+lex
+ token bar_data /[^|]*/
+ token end_bar /'|'/
+end
+
+lex
+ token slash_data /[^/]*/
+ token end_slash /'/'/
+end
+
+lex
+ token curly_data /[^}]*/
+ token end_curly /'}'/
+end
+
+def cmd_il
+ [cmd_verb1 bar_data end_bar]
+| [cmd_verb2 slash_data end_slash]
+| [cmd_label curly_data end_curly]
+| [cmd_ref curly_data end_curly]
+| [cmd_em curly_data end_curly]
+| [cmd_tt curly_data end_curly]
+
+def text
+ [word]
+| [lws]
+| [cmd_il]
+
+lex
+ token end_verbatim /lws? '.' lws? 'end' lws 'verbatim' lws? '\n'/
+ token verbatim_line /[^\n]* '\n'/
+end
+
+def verbatim
+ [cmd_verbatim verbatim_line* end_verbatim]
+
+lex
+ token end_code /lws? '.' lws? 'end' lws 'code' lws? '\n'/
+ token code_line /[^\n]* '\n'/
+end
+
+def code
+ [cmd_code code_line* end_code]
+
+lex
+ token end_comment /lws? '.' lws? 'end' lws 'comment' lws? '\n'/
+ token comment_line /[^\n]* '\n'/
+end
+
+def comment
+ [cmd_comment comment_line* end_comment]
+
+def figure
+ [cmd_figure text nl line* caption? end_figure]
+
+def li
+ [cmd_li text* nl]
+
+def _list
+ [cmd_list li* end_list]
+
+def scale
+ [lws word word*]
+
+def graphic
+ [cmd_graphic word scale? nl]
+
+def itemize
+ [cmd_itemize line* item* end_itemize]
+
+def center
+ [cmd_center line* end_center]
+
+def row
+ [cmd_row text* nl]
+
+def tabular
+ [cmd_tabular row* end_tabular]
+
+def multicols_line
+ [cmd_columnbreak]
+| [line]
+
+def multicols
+ [cmd_multicols multicols_line* end_multicols]
+
+def item
+ [cmd_item line*]
+
+def caption
+ [cmd_caption line*]
+
+def line
+ [text]
+| [nl]
+| [comment]
+| [verbatim]
+| [code]
+| [graphic]
+| [itemize]
+| [center]
+| [tabular]
+| [multicols]
+| [figure]
+| [_list]
+
+def sub_sub_section
+ [cmd_sub_sub_section text* nl line*]
+
+def sub_section
+ [cmd_sub_section text* nl line* sub_sub_section*]
+
+def section
+ [cmd_section text* nl line* sub_section*]
+
+def chapter
+ [cmd_chapter text* nl line* section*]
+
+def title
+ [cmd_title text* nl]
+
+def subtitle
+ [cmd_sub_title text* nl]
+
+def author
+ [cmd_author text* nl]
+
+#
+# Paragraphs.
+#
+
+def pline
+ [text text* nl]
+
+def paragraph
+ [pline pline*]
+
+def pextra
+ [nl paragraph]
+
+def block
+ [paragraph pextra*]
+
+def license
+ [cmd_license nl* block nl*]
+
+#
+# Preamble.
+#
+
+def preamble_item
+ [text]
+| [nl]
+| [title]
+| [subtitle]
+| [author]
+
+def preamble
+ [preamble_item* license]
+
+def start
+ [preamble chapter*]
+
+parse Start: start[ stdin ]
+if ( ! Start ) {
+ print( error '\n' )
+ exit( 1 )
+}
+
+int printPlData( Pld: cmd_il )
+{
+ if match Pld [ cmd_verb1 V: bar_data end_bar] {
+ print( '\\verb|' )
+ print( V )
+ print( '|' )
+ }
+ else if match Pld [cmd_verb2 V: slash_data end_slash] {
+ print( '\\verb/' )
+ print( V )
+ print( '/' )
+ }
+ else if match Pld [cmd_label L: curly_data end_curly] {
+ print( '\\label{' )
+ print( L )
+ print( '}' )
+ }
+ else if match Pld [cmd_ref L: curly_data end_curly] {
+ print( '\\ref{' )
+ print( L )
+ print( '}' )
+ }
+ else if match Pld [cmd_em L: curly_data end_curly] {
+ print( '{\\em ' )
+ print( L )
+ print( '}' )
+ }
+ else if match Pld [cmd_tt L: curly_data end_curly] {
+ print( '{\\tt ' )
+ print( L )
+ print( '}' )
+ }
+ else {
+ print( Pld )
+ }
+}
+
+int printText( Lines: text* )
+{
+ for L: text in repeat(Lines) {
+ if match L [PlData: cmd_il] {
+ printPlData( PlData )
+ }
+ else {
+ print( L )
+ }
+ }
+}
+
+int printLines( Lines: line* )
+{
+ for L: line in repeat(Lines) {
+ if match L [word] {
+ print( L )
+ }
+ if match L [lws] {
+ print( L )
+ }
+ if match L [nl] {
+ print( L )
+ }
+ if match L [PlData: cmd_il] {
+ printPlData( PlData )
+ }
+ if match L [cmd_verbatim Lines: verbatim_line* end_verbatim] {
+ print( '\\begin{verbatim}\n' )
+ print( Lines )
+ print( '\\end{verbatim}\n' )
+ print( '\\verbspace\n' )
+ }
+ if match L [cmd_code Lines: code_line* end_code] {
+ print( '\\begin{inline_code}\n' )
+ print( '\\begin{verbatim}\n' )
+ print( Lines )
+ print( '\\end{verbatim}\n' )
+ print( '\\end{inline_code}\n' )
+ print( '\\verbspace\n' )
+ }
+ if match L [cmd_graphic Name: word Scale: scale? nl] {
+ print( '\\graphspace\n' )
+ print( '\\begin{center}\n' )
+ print( '\\includegraphics' )
+ if match Scale [lws Spd: word Spd2: word*]
+ print( '[scale=' Spd Spd2 ']' )
+ else
+ print( '[scale=0.55]' )
+ print( '{' Name '}\n' )
+ print( '\\end{center}\n' )
+ print( '\\graphspace\n' )
+ }
+ if match L [cmd_itemize Lines: line* Items: item* end_itemize] {
+ print( '\\begin{itemize}\n' )
+ printLines( Lines )
+ for Item: item in repeat(Items) {
+ match Item [cmd_item Lines: line*]
+ print( '\\item ' )
+ printLines( Lines )
+ }
+ print( '\\end{itemize}\n' )
+ }
+ if match L [cmd_figure DirData: text nl Lines: line* Caption: caption? end_figure] {
+ print( '\\begin{figure}\n' )
+ print( '\\small\n' )
+ printLines( Lines )
+ if match Caption [cmd_caption CL: line*] {
+ print( '\\caption{' )
+ printLines( CL )
+ print( '}\n' )
+ }
+ print( '\\label{' DirData '}\n' )
+ print( '\\end{figure}\n' )
+ }
+ if match L [cmd_list LiList: li* end_list] {
+ for Li: li* in LiList {
+ if match Li [cmd_li Lines: text* nl Rest: li*] {
+ print( '\\noindent\\\hspace*{24pt}' )
+ printText( Lines )
+ if match Rest [ li li* ]
+ print( '\\\\' )
+ print( '\n' )
+ }
+ }
+ print( '\\vspace{12pt}\n' )
+ }
+ if match L [cmd_center Lines: line* end_center] {
+ print( '\\begin{center}\n' )
+ printLines( Lines )
+ print( '\\end{center}\n' )
+ }
+ if match L [cmd_tabular Rows: row* end_tabular] {
+ print( '\\begin{tabular}{|c|c|c|}\n' )
+ print( '\\hline\n' )
+ for Row: row in repeat(Rows) {
+ if match Row [cmd_row Lines: text* nl ] {
+ printText( Lines )
+ print( '\\\\' '\n' )
+ print( '\\hline\n' )
+ }
+ }
+ print( '\\end{tabular}\n' )
+ }
+ if match L [cmd_multicols Lines: multicols_line* end_multicols] {
+ print( '\\begin{multicols}{2}\n' )
+ for McLine: multicols_line in repeat( Lines ) {
+ if match McLine [Line: line]
+ printLines( cons line* [Line] )
+ else if match McLine [cmd_columnbreak] {
+ print( '\\columnbreak\n' )
+ }
+ }
+ print( '\\end{multicols}\n' )
+ }
+ }
+}
+
+match Start
+ [Preamble: preamble Chapters: chapter*]
+
+Title: title = title in Preamble
+match Title [cmd_title TitleData: text* nl]
+
+SubTitle: subtitle = subtitle in Preamble
+match SubTitle [cmd_sub_title SubTitleData: text* nl]
+
+Author: author = author in Preamble
+match Author [cmd_author AuthorData: text* nl]
+
+License: license = license in Preamble
+
+print(
+ ~\documentclass[letterpaper,11pt,oneside]{book}
+ ~\usepackage{graphicx}
+ ~\usepackage{comment}
+ ~\usepackage{multicol}
+ ~\usepackage[
+ ~ colorlinks=true,
+ ~ linkcolor=black,
+ ~ citecolor=green,
+ ~ filecolor=black,
+ ~ urlcolor=black]{hyperref}
+ ~
+ ~\topmargin -0.20in
+ ~\oddsidemargin 0in
+ ~\textwidth 6.5in
+ ~\textheight 9in
+ ~
+ ~\setlength{\parskip}{0pt}
+ ~\setlength{\topsep}{0pt}
+ ~\setlength{\partopsep}{0pt}
+ ~\setlength{\itemsep}{0pt}
+ ~
+ ~\input{version}
+ ~
+ ~\newcommand{\verbspace}{\vspace{10pt}}
+ ~\newcommand{\graphspace}{\vspace{10pt}}
+ ~
+ ~\renewcommand\floatpagefraction{.99}
+ ~\renewcommand\topfraction{.99}
+ ~\renewcommand\bottomfraction{.99}
+ ~\renewcommand\textfraction{.01}
+ ~\setcounter{totalnumber}{50}
+ ~\setcounter{topnumber}{50}
+ ~\setcounter{bottomnumber}{50}
+ ~
+ ~\newenvironment{inline_code}{\def\baselinestretch{1}\vspace{12pt}\small}{}
+ ~
+ ~\begin{document}
+ ~
+ ~\thispagestyle{empty}
+ ~\begin{center}
+ ~\vspace*{3in}
+)
+
+print( '{\\huge ' TitleData '}\\\\\n' )
+
+print( '\\vspace*{12pt}\n' )
+
+print( '{\\Large ' SubTitleData '}\\\\\n' )
+
+print(
+ ~\vspace{1in}
+ ~by\\
+ ~\vspace{12pt}
+)
+
+print( '{\\large ' AuthorData '}\\\\\n' )
+
+print(
+ ~\end{center}
+ ~\clearpage
+ ~
+ ~\pagenumbering{roman}
+ ~
+ ~\chapter*{License}
+)
+
+print(
+ ~Ragel version \version, \pubdate\\
+ ~Copyright \copyright\ 2003-2012 Adrian D. Thurston
+ ~\vspace{6mm}
+ ~
+)
+
+i: int = 0
+for P: paragraph in License {
+ if ( i != 0 ) {
+ print(
+ ~
+ ~\vspace{5pt}
+ ~
+ )
+ }
+ print( "{\\bf\\it\\noindent " )
+ print( P )
+ print( "}\n" )
+ i = i + 1
+}
+
+print(
+ ~
+ ~\clearpage
+ ~\tableofcontents
+ ~\clearpage
+ ~
+ ~\pagenumbering{arabic}
+)
+
+
+for Chapter: chapter in repeat(Chapters) {
+ match Chapter
+ [cmd_chapter DirData: text* nl Lines: line* SectionList: section*]
+
+ print( '\\chapter{' DirData '}\n' )
+ printLines( Lines )
+
+ for Section: section in repeat(SectionList) {
+ match Section
+ [cmd_section DirData: text* nl Lines: line* SubSectionList: sub_section*]
+
+ print( '\\section{' DirData '}\n' )
+ printLines( Lines )
+ for SubSection: sub_section in repeat(SubSectionList) {
+ match SubSection
+ [cmd_sub_section DirData: text* nl Lines: line*
+ SubSubSectionList: sub_sub_section*]
+
+ print( '\\subsection{' DirData '}\n' )
+ printLines( Lines )
+
+ for SubSubSection: sub_sub_section in repeat(SubSubSectionList) {
+ match SubSubSection
+ [cmd_sub_sub_section DirData: text* nl Lines: line*]
+
+ print( '\\subsubsection{' DirData '}\n' )
+ printLines( Lines )
+ }
+ }
+ }
+}
+
+print(
+ ~
+ ~\end{document}
+)
+##### IN #####
+.title Ragel State Machine Compiler
+
+.subtitle User Guide
+
+.author Adrian Thurston
+
+.license
+
+This document is part of Ragel, and as such, this document is
+released 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.
+
+Ragel 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 Ragel; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+.chapter Introduction
+
+.section Abstract
+
+Regular expressions are used heavily in practice for the purpose of specifying
+parsers. They are normally used as black boxes linked together with program
+logic. User actions are executed in between invocations of the regular
+expression engine. Adding actions before a pattern terminates requires patterns
+to be broken and pasted back together with program logic. The more user actions
+are needed, the less the advantages of regular expressions are seen.
+
+Ragel is a software development tool that allows user actions to be
+embedded into the transitions of a regular expression's corresponding state
+machine, eliminating the need to switch from the regular expression engine and
+user code execution environment and back again. As a result, expressions can be
+maximally continuous. One is free to specify an entire parser using a single
+regular expression. The single-expression model affords concise and elegant
+descriptions of languages and the generation of very simple, fast and robust
+code. Ragel compiles executable finite state machines from a high level regular language
+notation. Ragel targets C, C++, Objective-C, D, Go, Java and Ruby.
+
+In addition to building state machines from regular expressions, Ragel allows
+the programmer to directly specify state machines with state charts. These two
+notations may be freely combined. There are also facilities for controlling
+nondeterminism in the resulting machines and building scanners using patterns
+that themselves have embedded actions. Ragel can produce code that is small and
+runs very fast. Ragel can handle integer-sized alphabets and can compile very
+large state machines.
+
+.section Motivation
+
+When a programmer is faced with the task of producing a parser for a
+context-free language there are many tools to choose from. It is quite common
+to generate useful and efficient parsers for programming languages from a
+formal grammar. It is also quite common for programmers to avoid such tools
+when making parsers for simple computer languages, such as file formats and
+communication protocols. Such languages are often regular and tools for
+processing the context-free languages are viewed as too heavyweight for the
+purpose of parsing regular languages. The extra run-time effort required for
+supporting the recursive nature of context-free languages is wasted.
+
+When we turn to the regular expression-based parsing tools, such as Lex, Re2C,
+and scripting languages such as Sed, Awk and Perl we find that they are split
+into two levels: a regular expression matching engine and some kind of program
+logic for linking patterns together. For example, a Lex program is composed of
+sets of regular expressions. The implied program logic repeatedly attempts to
+match a pattern in the current set. When a match is found the associated user
+code executed. It requires the user to consider a language as a sequence of
+independent tokens. Scripting languages and regular expression libraries allow
+one to link patterns together using arbitrary program code. This is very
+flexible and powerful, however we can be more concise and clear if we avoid
+gluing together regular expressions with if statements and while loops.
+
+This model of execution, where the runtime alternates between regular
+expression matching and user code exectution places restrictions on when
+action code may be executed. Since action code can only be associated with
+complete patterns, any action code that must be executed before an entire
+pattern is matched requires that the pattern be broken into smaller units.
+Instead of being forced to disrupt the regular expression syntax and write
+smaller expressions, it is desirable to retain a single expression and embed
+code for performing actions directly into the transitions that move over the
+characters. After all, capable programmers are astutely aware of the machinery
+underlying their programs, so why not provide them with access to that
+machinery? To achieve this we require an action execution model for associating
+code with the sub-expressions of a regular expression in a way that does not
+disrupt its syntax.
+
+The primary goal of Ragel is to provide developers with an ability to embed
+actions into the transitions and states of a regular expression's state machine
+in support of the definition of entire parsers or large sections of parsers
+using a single regular expression. From the regular expression we gain a clear
+and concise statement of our language. From the state machine we obtain a very
+fast and robust executable that lends itself to many kinds of analysis and
+visualization.
+
+.section Overview
+
+Ragel is a language for specifying state machines. The Ragel program is a
+compiler that assembles a state machine definition to executable code. Ragel
+is based on the principle that any regular language can be converted to a
+deterministic finite state automaton. Since every regular language has a state
+machine representation and vice versa, the terms regular language and state
+machine (or just machine) will be used interchangeably in this document.
+
+Ragel outputs machines to C, C++, Objective-C, D, Go, Java or Ruby code. The output is
+designed to be generic and is not bound to any particular input or processing
+method. A Ragel machine expects to have data passed to it in buffer blocks.
+When there is no more input, the machine can be queried for acceptance. In
+this way, a Ragel machine can be used to simply recognize a regular language
+like a regular expression library. By embedding code into the regular language,
+a Ragel machine can also be used to parse input.
+
+The Ragel language has many operators for constructing and manipulating
+machines. Machines are built up from smaller machines, to bigger ones, to the
+final machine representing the language that needs to be recognized or parsed.
+
+The core state machine construction operators are those found in most theory
+of computation textbooks. They date back to the 1950s and are widely studied.
+They are based on set operations and permit one to think of languages as a set
+of strings. They are Union, Intersection, Difference, Concatenation and Kleene
+Star. Put together, these operators make up what most people know as regular
+expressions. Ragel also provides a scanner construction operator
+and provides operators for explicitly constructing machines
+using a state chart method. In the state chart method, one joins machines
+together without any implied transitions and then explicitly specifies where
+epsilon transitions should be drawn.
+
+The state machine manipulation operators are specific to Ragel. They allow the
+programmer to access the states and transitions of regular language's
+corresponding machine. There are two uses of the manipulation operators. The
+first and primary use is to embed code into transitions and states, allowing
+the programmer to specify the actions of the state machine.
+
+Ragel attempts to make the action embedding facility as intuitive as possible.
+To do so, a number of issues need to be addressed. For example, when making a
+nondeterministic specification into a DFA using machines that have embedded
+actions, new transitions are often made that have the combined actions of
+several source transitions. Ragel ensures that multiple actions associated with
+a single transition are ordered consistently with respect to the order of
+reference and the natural ordering implied by the construction operators.
+
+The second use of the manipulation operators is to assign priorities to
+transitions. Priorities provide a convenient way of controlling any
+nondeterminism introduced by the construction operators. Suppose two
+transitions leave from the same state and go to distinct target states on the
+same character. If these transitions are assigned conflicting priorities, then
+during the determinization process the transition with the higher priority will
+take precedence over the transition with the lower priority. The lower priority
+transition gets abandoned. The transitions would otherwise be combined into a new
+transition that goes to a new state that is a combination of the original
+target states. Priorities are often required for segmenting machines. The most
+common uses of priorities have been encoded into a set of simple operators
+that should be used instead of priority embeddings whenever possible.
+
+For the purposes of embedding, Ragel divides transitions and states into
+different classes. There are four operators for embedding actions and
+priorities into the transitions of a state machine. It is possible to embed
+into entering transitions, finishing transitions, all transitions and leaving
+transitions. The embedding into leaving transitions is a special case.
+These transition embeddings get stored in the final states of a machine. They
+are transferred to any transitions that are made going out of the machine by
+future concatenation or kleene star operations.
+
+There are several more operators for embedding actions into states. Like the
+transition embeddings, there are various different classes of states that the
+embedding operators access. For example, one can access start states, final
+states or all states, among others. Unlike the transition embeddings, there are
+several different types of state action embeddings. These are executed at
+various different times during the processing of input. It is possible to embed
+actions that are exectued on transitions into a state, on transitions out of a
+state, on transitions taken on the error event, or on transitions taken on the
+EOF event.
+
+Within actions, it is possible to influence the behaviour of the state machine.
+The user can write action code that jumps or calls to another portion of the
+machine, changes the current character being processed, or breaks out of the
+processing loop. With the state machine calling feature Ragel can be used to
+parse languages that are not regular. For example, one can parse balanced
+parentheses by calling into a parser when an open parenthesis character is seen
+and returning to the state on the top of the stack when the corresponding
+closing parenthesis character is seen. More complicated context-free languages
+such as expressions in C are out of the scope of Ragel.
+
+Ragel also provides a scanner construction operator that can be used to build
+scanners much the same way that Lex is used. The Ragel generated code, which
+relies on user-defined variables for backtracking, repeatedly tries to match
+patterns to the input, favouring longer patterns over shorter ones and patterns
+that appear ahead of others when the lengths of the possible matches are
+identical. When a pattern is matched the associated action is executed.
+
+The key distinguishing feature between scanners in Ragel and scanners in Lex is
+that Ragel patterns may be arbitrary Ragel expressions and can therefore
+contain embedded code. With a Ragel-based scanner the user need not wait until
+the end of a pattern before user code can be executed.
+
+Scanners do take Ragel out of the domain of pure state machines and require the
+user to maintain the backtracking related variables. However, scanners
+integrate well with regular state machine instantiations. They can be called to
+or jumped to only when needed, or they can be called out of or jumped out of
+when a simpler, pure state machine model is appropriate.
+
+Two types of output code style are available. Ragel can produce a table-driven
+machine or a directly executable machine. The directly executable machine is
+much faster than the table-driven. On the other hand, the table-driven machine
+is more compact and less demanding on the host language compiler. It is better
+suited to compiling large state machines.
+
+.section Related Work
+
+Lex is perhaps the best-known tool for constructing parsers from regular
+expressions. In the Lex processing model, generated code attempts to match one
+of the user's regular expression patterns, favouring longer matches over
+shorter ones. Once a match is made it then executes the code associated with
+the pattern and consumes the matching string. This process is repeated until
+the input is fully consumed.
+
+Through the use of start conditions, related sets of patterns may be defined.
+The active set may be changed at any time. This allows the user to define
+different lexical regions. It also allows the user to link patterns together by
+requiring that some patterns come before others. This is quite like a
+concatenation operation. However, use of Lex for languages that require a
+considerable amount of pattern concatenation is inappropriate. In such cases a
+Lex program deteriorates into a manually specified state machine, where start
+conditions define the states and pattern actions define the transitions. Lex
+is therefore best suited to parsing tasks where the language to be parsed can
+be described in terms of regions of tokens.
+
+Lex is useful in many scenarios and has undoubtedly stood the test of time.
+There are, however, several drawbacks to using Lex. Lex can impose too much
+overhead for parsing applications where buffering is not required because all
+the characters are available in a single string. In these cases there is
+structure to the language to be parsed and a parser specification tool can
+help, but employing a heavyweight processing loop that imposes a stream
+``pull'' model and dynamic input buffer allocation is inappropriate. An
+example of this kind of scenario is the conversion of floating point numbers
+contained in a string to their corresponding numerical values.
+
+Another drawback is the very issue that Ragel attempts to solve.
+It is not possible to execute a user action while
+matching a character contained inside a pattern. For example, if scanning a
+programming language and string literals can contain newlines which must be
+counted, a Lex user must break up a string literal pattern so as to associate
+an action with newlines. This forces the definition of a new start condition.
+Alternatively the user can reprocess the text of the matched string literal to
+count newlines.
+
+.comment
+
+How ragel is different from Lex.
+
+Like Re2c, Ragel provides a simple execution model that does not make any
+assumptions as to how the input is collected. Also, Ragel does not do any
+buffering in the generated code. Consequently there are no dependencies on
+external functions such as .verb|malloc|.
+
+If buffering is required it can be manually implemented by embedding actions
+that copy the current character to a buffer, or data can be passed to the
+parser using known block boundaries. If the longest-match operator is used,
+Ragel requires the user to ensure that the ending portion of the input buffer
+is preserved when the buffer is exhaused before a token is fully matched. The
+user should move the token prefix to a new memory location, such as back to the
+beginning of the input buffer, then place the subsequently read input
+immediately after the prefix.
+
+These properties of Ragel make it more work to write a program that requires
+the longest-match operator or buffering of input, however they make Ragel a
+more flexible tool that can produce very simple and fast-running programs under
+a variety of input acquisition arrangements.
+
+In Ragel, it is not necessary
+to introduce start conditions to concatenate tokens and retain action
+execution. Ragel allows one to structure a parser as a series of tokens, but
+does not require it.
+
+Like Lex and Re2C, Ragel is able to process input using a longest-match
+execution model, however the core of the Ragel language specifies parsers at a
+much lower level. This core is built around a pure state machine model. When
+building basic machines there is no implied algorithm for processing input
+other than to move from state to state on the transitions of the machine. This
+core of pure state machine operations makes Ragel well suited to handling
+parsing problems not based on token scanning. Should one need to use a
+longest-match model, the functionality is available and the lower level state
+machine construction facilities can be used to specify the patterns of a
+longest-match machine.
+
+This is not possible in Ragel. One can only program
+a longest-match instantiation with a fixed set of rules. One can jump to
+another longest-match machine that employs the same machine definitions in the
+construction of its rules, however no states will be shared.
+
+In Ragel, input may be re-parsed using a
+different machine, but since the action to be executed is associated with
+transitions of the compiled state machine, the longest-match construction does
+not permit a single rule to be excluded from the active set. It cannot be done
+ahead of time nor in the excluded rule's action.
+
+.end comment
+
+The Re2C program defines an input processing model similar to that of Lex.
+Re2C focuses on making generated state machines run very fast and
+integrate easily into any program, free of dependencies. Re2C generates
+directly executable code and is able to claim that generated parsers run nearly
+as fast as their hand-coded equivalents. This is very important for user
+adoption, as programmers are reluctant to use a tool when a faster alternative
+exists. A consideration to ease of use is also important because developers
+need the freedom to integrate the generated code as they see fit.
+
+Many scripting languages provide ways of composing parsers by linking regular
+expressions using program logic. For example, Sed and Awk are two established
+Unix scripting tools that allow the programmer to exploit regular expressions
+for the purpose of locating and extracting text of interest. High-level
+programming languages such as Perl, Python, PHP and Ruby all provide regular
+expression libraries that allow the user to combine regular expressions with
+arbitrary code.
+
+In addition to supporting the linking of regular expressions with arbitrary
+program logic, the Perl programming language permits the embedding of code into
+regular expressions. Perl embeddings do not translate into the embedding of
+code into deterministic state machines. Perl regular expressions are in fact
+not fully compiled to deterministic machines when embedded code is involved.
+They are instead interpreted and involve backtracking. This is shown by the
+following Perl program. When it is fed the input .verb|abcd| the interpretor
+attempts to match the first alternative, printing .verb|a1 b1|. When this
+possibility fails it backtracks and tries the second possibility, printing
+.verb|a2 b2|, at which point it succeeds.
+
+.code
+print "YES\n" if ( <STDIN> =~
+ /( a (?{ print "a1 "; }) b (?{ print "b1 "; }) cX ) |
+ ( a (?{ print "a2 "; }) b (?{ print "b2 "; }) cd )/x )
+.end code
+
+In Ragel there is no regular expression interpretor. Aside from the scanner
+operator, all Ragel expressions are made into deterministic machines and the
+run time simply moves from state to state as it consumes input. An equivalent
+parser expressed in Ragel would attempt both of the alternatives concurrently,
+printing .verb|a1 a2 b1 b2|.
+
+.section Development Status
+
+Ragel is a relatively new tool and is under continuous development. As a rough
+release guide, minor revision number changes are for implementation
+improvements and feature additions. Major revision number changes are for
+implementation and language changes that do not preserve backwards
+compatibility. Though in the past this has not always held true: changes that
+break code have crept into minor version number changes. Typically, the
+documentation lags behind the development in the interest of documenting only
+the lasting features. The latest changes are always documented in the ChangeLog
+file.
+
+.chapter Constructing State Machines
+
+.section Ragel State Machine Specifications
+
+A Ragel input file consists of a program in the host language that contains embedded machine
+specifications. Ragel normally passes input straight to output. When it sees
+a machine specification it stops to read the Ragel statements and possibly generate
+code in place of the specification.
+Afterwards it continues to pass input through. There
+can be any number of FSM specifications in an input file. A multi-line FSM spec
+starts with .verb|%%{| and ends with .verb|}%%|. A single-line FSM spec starts
+with .verb|%%| and ends at the first newline.
+
+While Ragel is looking for FSM specifications it does basic lexical analysis on
+the surrounding input. It interprets literal strings and comments so a
+.verb|%%| sequence in either of those will not trigger the parsing of an FSM
+specification. Ragel does not pass the input through any preprocessor nor does it
+interpret preprocessor directives itself so includes, defines and ifdef logic
+cannot be used to alter the parse of a Ragel input file. It is therefore not
+possible to use an .verb|#if 0| directive to comment out a machine as is
+commonly done in C code. As an alternative, a machine can be prevented from
+causing any generated output by commenting out write statements.
+
+In Figure .ref{cmd-line-parsing}, a multi-line specification is used to define the
+machine and single line specifications are used to trigger the writing of the machine
+data and execution code.
+
+.figure cmd-line-parsing
+.multicols
+.verbatim
+#include <string.h>
+#include <stdio.h>
+
+%%{
+ machine foo;
+ main :=
+ ( 'foo' | 'bar' )
+ 0 @{ res = 1; };
+}%%
+
+%% write data;
+.end verbatim
+.columnbreak
+.verbatim
+int main( int argc, char **argv )
+{
+ int cs, res = 0;
+ if ( argc > 1 ) {
+ char *p = argv[1];
+ char *pe = p + strlen(p) + 1;
+ %% write init;
+ %% write exec;
+ }
+ printf("result = %i\n", res );
+ return 0;
+}
+.end verbatim
+.end multicols
+.caption Parsing a command line argument.
+.end figure
+
+.subsection Naming Ragel Blocks
+
+.verbatim
+machine fsm_name;
+.end verbatim
+
+The .verb|machine| statement gives the name of the FSM. If present in a
+specification, this statement must appear first. If a machine specification
+does not have a name then Ragel uses the previous specification name. If no
+previous specification name exists then this is an error. Because FSM
+specifications persist in memory, a machine's statements can be spread across
+multiple machine specifications. This allows one to break up a machine across
+several files or draw in statements that are common to multiple machines using
+the .verb|include| statement.
+
+.subsection Machine Definition
+.label{definition}
+
+.verbatim
+<name> = <expression>;
+.end verbatim
+
+The machine definition statement associates an FSM expression with a name. Machine
+expressions assigned to names can later be referenced in other expressions. A
+definition statement on its own does not cause any states to be generated. It is simply a
+description of a machine to be used later. States are generated only when a definition is
+instantiated, which happens when a definition is referenced in an instantiated
+expression.
+
+.subsection Machine Instantiation
+.label{instantiation}
+
+.verbatim
+<name> := <expression>;
+.end verbatim
+
+The machine instantiation statement generates a set of states representing an
+expression. Each instantiation generates a distinct set of states. The starting
+state of the instantiation is written in the data section of the generated code
+using the instantiation name. If a machine named
+.verb|main| is instantiated, its start state is used as the
+specification's start state and is assigned to the .verb|cs| variable by the
+.verb|write init| command. If no .verb|main| machine is given, the start state
+of the last machine instantiation to appear is used as the specification's
+start state.
+
+From outside the execution loop, control may be passed to any machine by
+assigning the entry point to the .verb|cs| variable. From inside the execution
+loop, control may be passed to any machine instantiation using .verb|fcall|,
+.verb|fgoto| or .verb|fnext| statements.
+
+.subsection Including Ragel Code
+
+.verbatim
+include FsmName "inputfile.rl";
+.end verbatim
+
+The .verb|include| statement can be used to draw in the statements of another FSM
+specification. Both the name and input file are optional, however at least one
+must be given. Without an FSM name, the given input file is searched for an FSM
+of the same name as the current specification. Without an input file the
+current file is searched for a machine of the given name. If both are present,
+the given input file is searched for a machine of the given name.
+
+Ragel searches for included files from the location of the current file.
+Additional directories can be added to the search path using the .verb|-I|
+option.
+
+.subsection Importing Definitions
+.label{import}
+
+.verbatim
+import "inputfile.h";
+.end verbatim
+
+The .verb|import| statement scrapes a file for sequences of tokens that match
+the following forms. Ragel treats these forms as state machine definitions.
+
+.list
+.li .verb|name '=' number|
+.li .verb|name '=' lit_string|
+.li .verb|'define' name number|
+.li .verb|'define' name lit_string|
+.end list
+
+If the input file is a Ragel program then tokens inside any Ragel
+specifications are ignored. See Section .ref{export} for a description of
+exporting machine definitions.
+
+Ragel searches for imported files from the location of the current file.
+Additional directories can be added to the search path using the .verb|-I|
+option.
+
+.section Lexical Analysis of a Ragel Block
+.label{lexing}
+
+Within a machine specification the following lexical rules apply to the input.
+
+.itemize
+
+.item The .verb|#| symbol begins a comment that terminates at the next newline.
+
+.item The symbols .verb|""|, .verb|''|, .verb|//|, .verb|[]| behave as the
+delimiters of literal strings. Within them, the following escape sequences
+are interpreted:
+
+.verb| \0 \a \b \t \n \v \f \r|
+
+A backslash at the end of a line joins the following line onto the current. A
+backslash preceding any other character removes special meaning. This applies
+to terminating characters and to special characters in regular expression
+literals. As an exception, regular expression literals do not support escape
+sequences as the operands of a range within a list. See the bullet on regular
+expressions in Section .ref{basic}.
+
+.item The symbols .verb|{}| delimit a block of host language code that will be
+embedded into the machine as an action. Within the block of host language
+code, basic lexical analysis of comments and strings is done in order to
+correctly find the closing brace of the block. With the exception of FSM
+commands embedded in code blocks, the entire block is preserved as is for
+identical reproduction in the output code.
+
+.item The pattern .verb|[+-]?[0-9]+| denotes an integer in decimal format.
+Integers used for specifying machines may be negative only if the alphabet type
+is signed. Integers used for specifying priorities may be positive or negative.
+
+.item The pattern .verb|0x[0-9A-Fa-f]+| denotes an integer in hexadecimal
+format.
+
+.item The keywords are .verb|access|, .verb|action|, .verb|alphtype|,
+.verb|getkey|, .verb|write|, .verb|machine| and .verb|include|.
+
+.item The pattern .verb|[a-zA-Z_][a-zA-Z_0-9]*| denotes an identifier.
+
+.comment
+.item The allowable symbols are:
+
+.verb/ ( ) ! ^ * ? + : -> - | & . , := = ; > @ $ % /\\
+.verb| >/ $/ %/ </ @/ <>/ >! $! %! <! @! <>!|\\
+.verb| >^ $^ %^ <^ @^ <>^ >~ $~ %~ <~ @~ <>~|\\
+.verb| >* $* %* <* @* <>*|
+.end comment
+
+.item Any amount of whitespace may separate tokens.
+
+.end itemize
+
+.comment
+.section Parse of an FSM Specification
+
+The following statements are possible within an FSM specification. The
+requirements for trailing semicolons loosely follow that of C.
+A block
+specifying code does not require a trailing semicolon. An expression
+statement does require a trailing semicolon.
+.end comment
+
+.section Basic Machines
+.label{basic}
+
+The basic machines are the base operands of regular language expressions. They
+are the smallest unit to which machine construction and manipulation operators
+can be applied.
+
+.itemize
+
+.item .verb|'hello'| -- Concatenation Literal. Produces a machine that matches
+the sequence of characters in the quoted string. If there are 5 characters
+there will be 6 states chained together with the characters in the string. See
+Section .ref{lexing} for information on valid escape sequences.
+
+.comment
+% GENERATE: bmconcat
+% OPT: -p
+% %%{
+% machine bmconcat;
+.verbatim
+main := 'hello';
+.end verbatim
+% }%%
+% END GENERATE
+.end comment
+
+.graphic bmconcat
+
+It is possible
+to make a concatenation literal case-insensitive by appending an .verb|i| to
+the string, for example .verb|'cmd'i|.
+
+.item .verb|"hello"| -- Identical to the single quoted version.
+
+.item .verb|[hello]| -- Or Expression. Produces a union of characters. There
+will be two states with a transition for each unique character between the two states.
+The .verb|[]| delimiters behave like the quotes of a literal string. For example,
+.verb|[ \t]| means tab or space. The .verb|or| expression supports character ranges
+with the .verb|-| symbol as a separator. The meaning of the union can be negated
+using an initial .verb|^| character as in standard regular expressions.
+See Section .ref{lexing} for information on valid escape sequences
+in .verb|or| expressions.
+
+.comment
+% GENERATE: bmor
+% OPT: -p
+% %%{
+% machine bmor;
+.verbatim
+main := [hello];
+.end verbatim
+% }%%
+% END GENERATE
+.end comment
+
+.graphic bmor
+
+.item .verb|''|, .verb|""|, and .verb|[]| -- Zero Length Machine. Produces a machine
+that matches the zero length string. Zero length machines have one state that is both
+a start state and a final state.
+
+.comment
+% GENERATE: bmnull
+% OPT: -p
+% %%{
+% machine bmnull;
+.verbatim
+main := '';
+.end verbatim
+% }%%
+% END GENERATE
+.end comment
+
+.graphic bmnull
+
+% FIXME: More on the range of values here.
+.item .verb|42| -- Numerical Literal. Produces a two state machine with one
+transition on the given number. The number may be in decimal or hexadecimal
+format and should be in the range allowed by the alphabet type. The minimum and
+maximum values permitted are defined by the host machine that Ragel is compiled
+on. For example, numbers in a .verb|short| alphabet on an i386 machine should
+be in the range .verb|-32768| to .verb|32767|.
+
+.comment
+% GENERATE: bmnum
+% %%{
+% machine bmnum;
+.verbatim
+main := 42;
+.end verbatim
+% }%%
+% END GENERATE
+.end comment
+
+.graphic bmnum
+
+.item .verb|/simple_regex/| -- Regular Expression. Regular expressions are
+parsed as a series of expressions that are concatenated together. Each
+concatenated expression
+may be a literal character, the ``any'' character specified by the .verb|.|
+symbol, or a union of characters specified by the .verb|[]| delimiters. If the
+first character of a union is .verb|^| then it matches any character not in the
+list. Within a union, a range of characters can be given by separating the first
+and last characters of the range with the .verb|-| symbol. Each
+concatenated machine may have repetition specified by following it with the
+.verb|*| symbol. The standard escape sequences described in Section
+.ref{lexing} are supported everywhere in regular expressions except as the
+operands of a range within in a list. This notation also supports the .verb|i|
+trailing option. Use it to produce case-insensitive machines, as in .verb|/GET/i|.
+
+Ragel does not support very complex regular expressions because the desired
+results can always be achieved using the more general machine construction
+operators listed in Section .ref{machconst}. The following diagram shows the
+result of compiling .verb|/ab*[c-z].*[123]/|. .verb|DEF| represents the default
+transition, which is taken if no other transition can be taken.
+
+.comment
+% GENERATE: bmregex
+% OPT: -p
+% %%{
+% machine bmregex;
+.verbatim
+main := /ab*[c-z].*[123]/;
+.end verbatim
+% }%%
+% END GENERATE
+.end comment
+
+.graphic bmregex
+
+.item .verb|'a' .. 'z'| -- Range. Produces a machine that matches any
+characters in the specified range. Allowable upper and lower bounds of the
+range are concatenation literals of length one and numerical literals. For
+example, .verb|0x10..0x20|, .verb|0..63|, and .verb|'a'..'z'| are valid ranges.
+The bounds should be in the range allowed by the alphabet type.
+
+.comment
+% GENERATE: bmrange
+% OPT: -p
+% %%{
+% machine bmrange;
+.verbatim
+main := 'a' .. 'z';
+.end verbatim
+% }%%
+% END GENERATE
+.end comment
+
+.graphic bmrange
+
+.item .verb|variable_name| -- Lookup the machine definition assigned to the
+variable name given and use an instance of it. See Section .ref{definition} for
+an important note on what it means to reference a variable name.
+
+.item .verb|builtin_machine| -- There are several built-in machines available
+for use. They are all two state machines for the purpose of matching common
+classes of characters. They are:
+
+.itemize
+
+.item .verb|any | -- Any character in the alphabet.
+
+.item .verb|ascii | -- Ascii characters. .verb|0..127|
+
+.item .verb|extend| -- Ascii extended characters. This is the range
+.verb|-128..127| for signed alphabets and the range .verb|0..255| for unsigned
+alphabets.
+
+.item .verb|alpha | -- Alphabetic characters. .verb|[A-Za-z]|
+
+.item .verb|digit | -- Digits. .verb|[0-9]|
+
+.item .verb|alnum | -- Alpha numerics. .verb|[0-9A-Za-z]|
+
+.item .verb|lower | -- Lowercase characters. .verb|[a-z]|
+
+.item .verb|upper | -- Uppercase characters. .verb|[A-Z]|
+
+.item .verb|xdigit| -- Hexadecimal digits. .verb|[0-9A-Fa-f]|
+
+.item .verb|cntrl | -- Control characters. .verb|0..31|
+
+.item .verb|graph | -- Graphical characters. .verb|[!-~]|
+
+.item .verb|print | -- Printable characters. .verb|[ -~]|
+
+.item .verb|punct | -- Punctuation. Graphical characters that are not alphanumerics.
+.verb|[!-/:-@[-`{-~]|
+
+.item .verb|space | -- Whitespace. .verb|[\t\v\f\n\r ]|
+
+.item .verb|zlen | -- Zero length string. .verb|""|
+
+.item .verb|empty | -- Empty set. Matches nothing. .verb|^any|
+
+.end itemize
+.end itemize
+
+.section Operator Precedence
+The following table shows operator precedence from lowest to highest. Operators
+in the same precedence group are evaluated from left to right.
+
+.tabular
+.row 1&.verb| , |&Join
+.row 2&.verb/ | & - --/&Union, Intersection and Subtraction
+.row 3&.verb| . <: :> :>> |&Concatenation
+.row 4&.verb| : |&Label
+.row 5&.verb| -> |&Epsilon Transition
+.row 6&.verb| > @ $ % |&Transitions Actions and Priorities
+.row 6&.verb| >/ $/ %/ </ @/ <>/ |&EOF Actions
+.row 6&.verb| >! $! %! <! @! <>! |&Global Error Actions
+.row 6&.verb| >^ $^ %^ <^ @^ <>^ |&Local Error Actions
+.row 6&.verb| >~ $~ %~ <~ @~ <>~ |&To-State Actions
+.row 6&.verb| >* $* %* <* @* <>* |&From-State Action
+.row 7&.verb| * ** ? + {n} {,n} {n,} {n,m} |&Repetition
+.row 8&.verb| ! ^ |&Negation and Character-Level Negation
+.row 9&.verb| ( <expr> ) |&Grouping
+.end tabular
+
+.section Regular Language Operators
+.label{machconst}
+
+When using Ragel it is helpful to have a sense of how it constructs machines.
+The determinization process can produce results that seem unusual to someone
+not familiar with the NFA to DFA conversion algorithm. In this section we
+describe Ragel's state machine operators. Though the operators are defined
+using epsilon transitions, it should be noted that this is for discussion only.
+The epsilon transitions described in this section do not persist, but are
+immediately removed by the determinization process which is executed at every
+operation. Ragel does not make use of any nondeterministic intermediate state
+machines.
+
+To create an epsilon transition between two states .verb|x| and .verb|y| is to
+copy all of the properties of .verb|y| into .verb|x|. This involves drawing in
+all of .verb|y|'s to-state actions, EOF actions, etc., in addition to its
+transitions. If .verb|x| and .verb|y| both have a transition out on the same
+character, then the transitions must be combined. During transition
+combination a new transition is made that goes to a new state that is the
+combination of both target states. The new combination state is created using
+the same epsilon transition method. The new state has an epsilon transition
+drawn to all the states that compose it. Since the creation of new epsilon
+transitions may be triggered every time an epsilon transition is drawn, the
+process of drawing epsilon transitions is repeated until there are no more
+epsilon transitions to be made.
+
+A very common error that is made when using Ragel is to make machines that do
+too much. That is, to create machines that have unintentional
+nondetermistic properties. This usually results from being unaware of the common strings
+between machines that are combined together using the regular language
+operators. This can involve never leaving a machine, causing its actions to be
+propagated through all the following states. Or it can involve an alternation
+where both branches are unintentionally taken simultaneously.
+
+This problem forces one to think hard about the language that needs to be
+matched. To guard against this kind of problem one must ensure that the machine
+specification is divided up using boundaries that do not allow ambiguities from
+one portion of the machine to the next. See Chapter
+.ref{controlling-nondeterminism} for more on this problem and how to solve it.
+
+The Graphviz tool is an immense help when debugging improperly compiled
+machines or otherwise learning how to use Ragel. Graphviz Dot files can be
+generated from Ragel programs using the .verb|-V| option. See Section
+.ref{visualization} for more information.
+
+
+.subsection Union
+
+.verb/expr | expr/
+
+The union operation produces a machine that matches any string in machine one
+or machine two. The operation first creates a new start state. Epsilon
+transitions are drawn from the new start state to the start states of both
+input machines. The resulting machine has a final state set equivalent to the
+union of the final state sets of both input machines. In this operation, there
+is the opportunity for nondeterminism among both branches. If there are
+strings, or prefixes of strings that are matched by both machines then the new
+machine will follow both parts of the alternation at once. The union operation is
+shown below.
+
+.graphic opor 1.0
+
+The following example demonstrates the union of three machines representing
+common tokens.
+
+% GENERATE: exor
+% OPT: -p
+% %%{
+% machine exor;
+.code
+# Hex digits, decimal digits, or identifiers
+main := '0x' xdigit+ | digit+ | alpha alnum*;
+.end code
+% }%%
+% END GENERATE
+
+.graphic exor
+
+.subsection Intersection
+
+.verb|expr & expr|
+
+Intersection produces a machine that matches any
+string that is in both machine one and machine two. To achieve intersection, a
+union is performed on the two machines. After the result has been made
+deterministic, any final state that is not a combination of final states from
+both machines has its final state status revoked. To complete the operation,
+paths that do not lead to a final state are pruned from the machine. Therefore,
+if there are any such paths in either of the expressions they will be removed
+by the intersection operator. Intersection can be used to require that two
+independent patterns be simultaneously satisfied as in the following example.
+
+% GENERATE: exinter
+% OPT: -p
+% %%{
+% machine exinter;
+.code
+# Match lines four characters wide that contain
+# words separated by whitespace.
+main :=
+ /[^\n][^\n][^\n][^\n]\n/* &
+ (/[a-z][a-z]*/ | [ \n])**;
+.end code
+% }%%
+% END GENERATE
+
+.graphic exinter
+
+.subsection Difference
+
+.verb|expr - expr|
+
+The difference operation produces a machine that matches
+strings that are in machine one but are not in machine two. To achieve subtraction,
+a union is performed on the two machines. After the result has been made
+deterministic, any final state that came from machine two or is a combination
+of states involving a final state from machine two has its final state status
+revoked. As with intersection, the operation is completed by pruning any path
+that does not lead to a final state. The following example demonstrates the
+use of subtraction to exclude specific cases from a set.
+
+% GENERATE: exsubtr
+% OPT: -p
+% %%{
+% machine exsubtr;
+.code
+# Subtract keywords from identifiers.
+main := /[a-z][a-z]*/ - ( 'for' | 'int' );
+.end code
+% }%%
+% END GENERATE
+
+.graphic exsubtr
+
+.subsection Strong Difference
+.label{strong_difference}
+
+.verb|expr -- expr|
+
+Strong difference produces a machine that matches any string of the first
+machine that does not have any string of the second machine as a substring. In
+the following example, strong subtraction is used to excluded .verb|CRLF| from
+a sequence. In the corresponding visualization, the label .verb|DEF| is short
+for default. The default transition is taken if no other transition can be
+taken.
+
+% GENERATE: exstrongsubtr
+% OPT: -p
+% %%{
+% machine exstrongsubtr;
+.code
+crlf = '\r\n';
+main := [a-z]+ ':' ( any* -- crlf ) crlf;
+.end code
+% }%%
+% END GENERATE
+
+.graphic exstrongsubtr
+
+This operator is equivalent to the following.
+
+.verbatim
+expr - ( any* expr any* )
+.end verbatim
+
+.subsection Concatenation
+
+.verb|expr . expr|
+
+Concatenation produces a machine that matches all the strings in machine one followed by all
+the strings in machine two. Concatenation draws epsilon transitions from the
+final states of the first machine to the start state of the second machine. The
+final states of the first machine lose their final state status, unless the
+start state of the second machine is final as well.
+Concatenation is the default operator. Two machines next to each other with no
+operator between them results in concatenation.
+
+.graphic opconcat 1.0
+
+The opportunity for nondeterministic behaviour results from the possibility of
+the final states of the first machine accepting a string that is also accepted
+by the start state of the second machine.
+The most common scenario in which this happens is the
+concatenation of a machine that repeats some pattern with a machine that gives
+a terminating string, but the repetition machine does not exclude the
+terminating string. The example in Section .ref{strong_difference}
+guards against this. Another example is the expression .verb|("'" any* "'")|.
+When executed the thread of control will
+never leave the .verb|any*| machine. This is a problem especially if actions
+are embedded to process the characters of the .verb|any*| component.
+
+In the following example, the first machine is always active due to the
+nondeterministic nature of concatenation. This particular nondeterminism is intended
+however because we wish to permit EOF strings before the end of the input.
+
+% GENERATE: exconcat
+% OPT: -p
+% %%{
+% machine exconcat;
+.code
+# Require an eof marker on the last line.
+main := /[^\n]*\n/* . 'EOF\n';
+.end code
+% }%%
+% END GENERATE
+
+.graphic exconcat
+
+There is a language
+ambiguity involving concatenation and subtraction. Because concatenation is the
+default operator for two
+adjacent machines there is an ambiguity between subtraction of
+a positive numerical literal and concatenation of a negative numerical literal.
+For example, .verb|(x-7)| could be interpreted as .verb|(x . -7)| or
+.verb|(x - 7)|. In the Ragel language, the subtraction operator always takes precedence
+over concatenation of a negative literal. We adhere to the rule that the default
+concatenation operator takes effect only when there are no other operators between
+two machines. Beware of writing machines such as .verb|(any -1)| when what is
+desired is a concatenation of .verb|any| and .verb|-1|. Instead write
+.verb|(any . -1)| or .verb|(any (-1))|. If in doubt of the meaning of your program do not
+rely on the default concatenation operator; always use the .verb|.| symbol.
+
+
+.subsection Kleene Star
+
+.verb|expr*|
+
+The machine resulting from the Kleene Star operator will match zero or more
+repetitions of the machine it is applied to.
+It creates a new start state and an additional final
+state. Epsilon transitions are drawn between the new start state and the old start
+state, between the new start state and the new final state, and
+between the final states of the machine and the new start state. After the
+machine is made deterministic the effect is of the final states getting all the
+transitions of the start state.
+
+.graphic opstar 1.0
+
+The possibility for nondeterministic behaviour arises if the final states have
+transitions on any of the same characters as the start state. This is common
+when applying kleene star to an alternation of tokens. Like the other problems
+arising from nondeterministic behavior, this is discussed in more detail in Chapter
+.ref{controlling-nondeterminism}. This particular problem can also be solved
+by using the longest-match construction discussed in Section
+.ref{generating-scanners} on scanners.
+
+In this
+example, there is no nondeterminism introduced by the exterior kleene star due to
+the newline at the end of the regular expression. Without the newline the
+exterior kleene star would be redundant and there would be ambiguity between
+repeating the inner range of the regular expression and the entire regular
+expression. Though it would not cause a problem in this case, unnecessary
+nondeterminism in the kleene star operator often causes undesired results for
+new Ragel users and must be guarded against.
+
+% GENERATE: exstar
+% OPT: -p
+% %%{
+% machine exstar;
+.code
+# Match any number of lines with only lowercase letters.
+main := /[a-z]*\n/*;
+.end code
+% }%%
+% END GENERATE
+
+.graphic exstar
+
+.subsection One Or More Repetition
+
+.verb|expr+|
+
+This operator produces the concatenation of the machine with the kleene star of
+itself. The result will match one or more repetitions of the machine. The plus
+operator is equivalent to .verb|(expr . expr*)|.
+
+% GENERATE: explus
+% OPT: -p
+% %%{
+% machine explus;
+.code
+# Match alpha-numeric words.
+main := alnum+;
+.end code
+% }%%
+% END GENERATE
+
+.graphic explus
+
+.subsection Optional
+
+.verb|expr?|
+
+The .em{optional} operator produces a machine that accepts the machine
+given or the zero length string. The optional operator is equivalent to
+.verb/(expr | '' )/. In the following example the optional operator is used to
+possibly extend a token.
+
+% GENERATE: exoption
+% OPT: -p
+% %%{
+% machine exoption;
+.code
+# Match integers or floats.
+main := digit+ ('.' digit+)?;
+.end code
+% }%%
+% END GENERATE
+
+.graphic exoption
+
+.subsection Repetition
+
+.list
+.li .verb|expr {n}| -- Exactly N copies of expr.
+.li .verb|expr {,n}| -- Zero to N copies of expr.
+.li .verb|expr {n,}| -- N or more copies of expr.
+.li .verb|expr {n,m}| -- N to M copies of expr.
+.end list
+
+.subsection Negation
+
+.verb|!expr|
+
+Negation produces a machine that matches any string not matched by the given
+machine. Negation is equivalent to .verb|(any* - expr)|.
+
+% GENERATE: exnegate
+% OPT: -p
+% %%{
+% machine exnegate;
+.code
+# Accept anything but a string beginning with a digit.
+main := ! ( digit any* );
+.end code
+% }%%
+% END GENERATE
+
+.graphic exnegate
+
+.subsection Character-Level Negation
+
+.verb|^expr|
+
+Character-level negation produces a machine that matches any single character
+not matched by the given machine. Character-Level Negation is equivalent to
+.verb|(any - expr)|. It must be applied only to machines that match strings of
+length one.
+
+.section State Machine Minimization
+
+State machine minimization is the process of finding the minimal equivalent FSM accepting
+the language. Minimization reduces the number of states in machines
+by merging equivalent states. It does not change the behaviour of the machine
+in any way. It will cause some states to be merged into one because they are
+functionally equivalent. State minimization is on by default. It can be turned
+off with the .verb|-n| option.
+
+The algorithm implemented is similar to Hopcroft's state minimization
+algorithm. Hopcroft's algorithm assumes a finite alphabet that can be listed in
+memory, whereas Ragel supports arbitrary integer alphabets that cannot be
+listed in memory. Though exact analysis is very difficult, Ragel minimization
+runs close to O(n * log(n)) and requires O(n) temporary storage where
+$n$ is the number of states.
+
+.section Visualization
+.label{visualization}
+
+%In many cases, practical
+%parsing programs will be too large to completely visualize with Graphviz. The
+%proper approach is to reduce the language to the smallest subset possible that
+%still exhibits the characteristics that one wishes to learn about or to fix.
+%This can be done without modifying the source code using the .verb|-M| and
+%.verb|-S| options. If a machine cannot be easily reduced,
+%embeddings of unique actions can be very useful for tracing a
+%particular component of a larger machine specification, since action names are
+%written out on transition labels.
+
+Ragel is able to emit compiled state machines in Graphviz's Dot file format.
+This is done using the .verb|-V| option.
+Graphviz support allows users to perform
+incremental visualization of their parsers. User actions are displayed on
+transition labels of the graph.
+
+If the final graph is too large to be
+meaningful, or even drawn, the user is able to inspect portions of the parser
+by naming particular regular expression definitions with the .verb|-S| and
+.verb|-M| options to the .verb|ragel| program. Use of Graphviz greatly
+improves the Ragel programming experience. It allows users to learn Ragel by
+experimentation and also to track down bugs caused by unintended
+nondeterminism.
+
+Ragel has another option to help debugging. The .verb|-x| option causes Ragel
+to emit the compiled machine in an XML format.
+
+.chapter User Actions
+
+Ragel permits the user to embed actions into the transitions of a regular
+expression's corresponding state machine. These actions are executed when the
+generated code moves over a transition. Like the regular expression operators,
+the action embedding operators are fully compositional. They take a state
+machine and an action as input, embed the action and yield a new state machine
+that can be used in the construction of other machines. Due to the
+compositional nature of embeddings, the user has complete freedom in the
+placement of actions.
+
+A machine's transitions are categorized into four classes. The action embedding
+operators access the transitions defined by these classes. The .em{entering
+transition} operator .verb|>| isolates the start state, then embeds an action
+into all transitions leaving it. The .em{finishing transition} operator
+.verb|@| embeds an action into all transitions going into a final state. The
+.em{all transition} operator .verb|$| embeds an action into all transitions of
+an expression. The .em{leaving transition} operator .verb|%| provides access
+to the yet-unmade transitions moving out of the machine via the final states.
+
+.section Embedding Actions
+
+.verbatim
+action ActionName {
+ /* Code an action here. */
+ count += 1;
+}
+.end verbatim
+
+The action statement defines a block of code that can be embedded into an FSM.
+Action names can be referenced by the action embedding operators in
+expressions. Though actions need not be named in this way (literal blocks
+of code can be embedded directly when building machines), defining reusable
+blocks of code whenever possible is good practice because it potentially increases the
+degree to which the machine can be minimized.
+
+Within an action some Ragel expressions and statements are parsed and
+translated. These allow the user to interact with the machine from action code.
+See Section .ref{vals} for a complete list of statements and values available
+in code blocks.
+
+.subsection Entering Action
+
+.verb|expr > action|
+
+The entering action operator embeds an action into all transitions
+that enter into the machine from the start state. If the start state is final,
+then the action is also embedded into the start state as a leaving action. This
+means that if a machine accepts the zero-length string and control passes
+through the start state then the entering action is executed. Note
+that this can happen on both a following character and on the EOF event.
+
+In some machines the start state has transtions coming in from within the
+machine. In these cases the start state is first isolated from the rest of the
+machine ensuring that the entering actions are exected once only.
+
+% GENERATE: exstact
+% OPT: -p
+% %%{
+% machine exstact;
+.code
+# Execute A at the beginning of a string of alpha.
+action A {}
+main := ( lower* >A ) . ' ';
+.end code
+% }%%
+% END GENERATE
+
+.graphic exstact
+
+.subsection Finishing Action
+
+.verb|expr @ action|
+
+The finishing action operator embeds an action into any transitions that move
+the machine into a final state. Further input may move the machine out of the
+final state, but keep it in the machine. Therefore finishing actions may be
+executed more than once if a machine has any internal transitions out of a
+final state. In the following example the final state has no transitions out
+and the finishing action is executed only once.
+
+% GENERATE: exdoneact
+% OPT: -p
+% %%{
+% machine exdoneact;
+% action A {}
+.code
+# Execute A when the trailing space is seen.
+main := ( lower* ' ' ) @A;
+.end code
+% }%%
+% END GENERATE
+
+.graphic exdoneact
+
+.subsection All Transition Action
+
+.verb|expr $ action|
+
+The all transition operator embeds an action into all transitions of a machine.
+The action is executed whenever a transition of the machine is taken. In the
+following example, A is executed on every character matched.
+
+% GENERATE: exallact
+% OPT: -p
+% %%{
+% machine exallact;
+% action A {}
+.code
+# Execute A on any characters of the machine.
+main := ( 'm1' | 'm2' ) $A;
+.end code
+% }%%
+% END GENERATE
+
+.graphic exallact
+
+.subsection Leaving Actions
+.label{out-actions}
+
+.verb|expr % action|
+
+The leaving action operator queues an action for embedding into the transitions
+that go out of a machine via a final state. The action is first stored in
+the machine's final states and is later transferred to any transitions that are
+made going out of the machine by a kleene star or concatenation operation.
+
+If a final state of the machine is still final when compilation is complete
+then the leaving action is also embedded as an EOF action. Therefore, leaving
+the machine is defined as either leaving on a character or as state machine
+acceptance.
+
+This operator allows one to associate an action with the termination of a
+sequence, without being concerned about what particular character terminates
+the sequence. In the following example, A is executed when leaving the alpha
+machine on the newline character.
+
+% GENERATE: exoutact1
+% OPT: -p
+% %%{
+% machine exoutact1;
+% action A {}
+.code
+# Match a word followed by a newline. Execute A when
+# finishing the word.
+main := ( lower+ %A ) . '\n';
+.end code
+% }%%
+% END GENERATE
+
+.graphic exoutact1
+
+In the following example, the .verb|term_word| action could be used to register
+the appearance of a word and to clear the buffer that the .verb|lower| action used
+to store the text of it.
+
+% GENERATE: exoutact2
+% OPT: -p
+% %%{
+% machine exoutact2;
+% action lower {}
+% action space {}
+% action term_word {}
+% action newline {}
+.code
+word = ( [a-z] @lower )+ %term_word;
+main := word ( ' ' @space word )* '\n' @newline;
+.end code
+% }%%
+% END GENERATE
+
+.graphic exoutact2
+
+In this final example of the action embedding operators, A is executed upon entering
+the alpha machine, B is executed on all transitions of the
+alpha machine, C is executed when the alpha machine is exited by moving into the
+newline machine and N is executed when the newline machine moves into a final
+state.
+
+% GENERATE: exaction
+% OPT: -p
+% %%{
+% machine exaction;
+% action A {}
+% action B {}
+% action C {}
+% action N {}
+.code
+# Execute A on starting the alpha machine, B on every transition
+# moving through it and C upon finishing. Execute N on the newline.
+main := ( lower* >A $B %C ) . '\n' @N;
+.end code
+% }%%
+% END GENERATE
+
+.graphic exaction
+
+
+.section State Action Embedding Operators
+
+The state embedding operators allow one to embed actions into states. Like the
+transition embedding operators, there are several different classes of states
+that the operators access. The meanings of the symbols are similar to the
+meanings of the symbols used for the transition embedding operators. The design
+of the state selections was driven by a need to cover the states of an
+expression with exactly one error action.
+
+Unlike the transition embedding operators, the state embedding operators are
+also distinguished by the different kinds of events that embedded actions can
+be associated with. Therefore the state embedding operators have two
+components. The first, which is the first one or two characters, specifies the
+class of states that the action will be embedded into. The second component
+specifies the type of event the action will be executed on. The symbols of the
+second component also have equivalent kewords.
+
+.multicols
+The different classes of states are:
+
+.list
+.li .verb|> | -- the start state
+.li .verb|< | -- any state except the start state
+.li .verb|$ | -- all states
+.li .verb|% | -- final states
+.li .verb|@ | -- any state except final states
+.li .verb|<>| -- any except start and final (middle)
+.end list
+
+.columnbreak
+
+The different kinds of embeddings are:
+
+.list
+.li .verb|~| -- to-state actions (.verb|to|)
+.li .verb|*| -- from-state actions (.verb|from|)
+.li .verb|/| -- EOF actions (.verb|eof|)
+.li .verb|!| -- error actions (.verb|err|)
+.li .verb|^| -- local error actions (.verb|lerr|)
+.end list
+
+.end multicols
+
+.subsection To-State and From-State Actions
+
+.subsubsection To-State Actions
+
+.list
+.li .verb|>~action >to(name) >to{...} | -- the start state
+.li .verb|<~action <to(name) <to{...} | -- any state except the start state
+.li .verb|$~action $to(name) $to{...} | -- all states
+.li .verb|%~action %to(name) %to{...} | -- final states
+.li .verb|@~action @to(name) @to{...} | -- any state except final states
+.li .verb|<>~action <>to(name) <>to{...}| -- any except start and final (middle)
+.end list
+
+
+To-state actions are executed whenever the state machine moves into the
+specified state, either by a natural movement over a transition or by an
+action-based transfer of control such as .verb|fgoto|. They are executed after the
+in-transition's actions but before the current character is advanced and
+tested against the end of the input block. To-state embeddings stay with the
+state. They are irrespective of the state's current set of transitions and any
+future transitions that may be added in or out of the state.
+
+Note that the setting of the current state variable .verb|cs| outside of the
+execute code is not considered by Ragel as moving into a state and consequently
+the to-state actions of the new current state are not executed. This includes
+the initialization of the current state when the machine begins. This is
+because the entry point into the machine execution code is after the execution
+of to-state actions.
+
+.subsubsection From-State Actions
+
+.list
+.li .verb|>*action >from(name) >from{...} | -- the start state
+.li .verb|<*action <from(name) <from{...} | -- any state except the start state
+.li .verb|$*action $from(name) $from{...} | -- all states
+.li .verb|%*action %from(name) %from{...} | -- final states
+.li .verb|@*action @from(name) @from{...} | -- any state except final states
+.li .verb|<>*action <>from(name) <>from{...}| -- any except start and final (middle)
+.end list
+
+From-state actions are executed whenever the state machine takes a transition from a
+state, either to itself or to some other state. These actions are executed
+immediately after the current character is tested against the input block end
+marker and before the transition to take is sought based on the current
+character. From-state actions are therefore executed even if a transition
+cannot be found and the machine moves into the error state. Like to-state
+embeddings, from-state embeddings stay with the state.
+
+.subsection EOF Actions
+
+.list
+.li .verb|>/action >eof(name) >eof{...} | -- the start state
+.li .verb|</action <eof(name) <eof{...} | -- any state except the start state
+.li .verb|$/action $eof(name) $eof{...} | -- all states
+.li .verb|%/action %eof(name) %eof{...} | -- final states
+.li .verb|@/action @eof(name) @eof{...} | -- any state except final states
+.li .verb|<>/action <>eof(name) <>eof{...}| -- any except start and final (middle)
+.end list
+
+The EOF action embedding operators enable the user to embed actions that are
+executed at the end of the input stream. EOF actions are stored in states and
+generated in the .verb|write exec| block. They are run when .verb|p == pe == eof|
+as the execute block is finishing. EOF actions are free to adjust .verb|p| and
+jump to another part of the machine to restart execution.
+
+.subsection Handling Errors
+
+In many applications it is useful to be able to react to parsing errors. The
+user may wish to print an error message that depends on the context. It
+may also be desirable to consume input in an attempt to return the input stream
+to some known state and resume parsing. To support error handling and recovery,
+Ragel provides error action embedding operators. There are two kinds of error
+actions: global error actions and local error actions.
+Error actions can be used to simply report errors, or by jumping to a machine
+instantiation that consumes input, can attempt to recover from errors.
+
+.subsubsection Global Error Actions
+
+.list
+.li .verb|>!action >err(name) >err{...} | -- the start state
+.li .verb|<!action <err(name) <err{...} | -- any state except the start state
+.li .verb|$!action $err(name) $err{...} | -- all states
+.li .verb|%!action %err(name) %err{...} | -- final states
+.li .verb|@!action @err(name) @err{...} | -- any state except final states
+.li .verb|<>!action <>err(name) <>err{...}| -- any except start and final (middle)
+.end list
+
+Global error actions are stored in the states they are embedded into until
+compilation is complete. They are then transferred to the transitions that move
+into the error state. These transitions are taken on all input characters that
+are not already covered by the state's transitions. If a state with an error
+action is not final when compilation is complete, then the action is also
+embedded as an EOF action.
+
+Error actions can be used to recover from errors by jumping back into the
+machine with .verb|fgoto| and optionally altering .verb|p|.
+
+.subsubsection Local Error Actions
+
+.list
+.li .verb|>^action >lerr(name) >lerr{...} | -- the start state
+.li .verb|<^action <lerr(name) <lerr{...} | -- any state except the start state
+.li .verb|$^action $lerr(name) $lerr{...} | -- all states
+.li .verb|%^action %lerr(name) %lerr{...} | -- final states
+.li .verb|@^action @lerr(name) @lerr{...} | -- any state except final states
+.li .verb|<>^action <>lerr(name) <>lerr{...}| -- any except start and final (middle)
+.end list
+
+Like global error actions, local error actions are also stored in the states
+they are embedded into until a transfer point. The transfer point is different
+however. Each local error action embedding is associated with a name. When a
+machine definition has been fully constructed, all local error action
+embeddings associated with the same name as the machine definition are
+transferred to the error transitions. At this time they are also embedded as
+EOF actions in the case of non-final states.
+
+Local error actions can be used to specify an action to take when a particular
+section of a larger state machine fails to match. A particular machine
+definition's ``thread'' may die and the local error actions executed, however
+the machine as a whole may continue to match input.
+
+There are two forms of local error action embeddings. In the first form the
+name defaults to the current machine. In the second form the machine name can
+be specified. This is useful when it is more convenient to specify the local
+error action in a sub-definition that is used to construct the machine
+definition that the local error action is associated with. To embed local
+error actions and
+explicitly state the machine definition on which the transfer is to happen use
+.verb|(name, action)| as the action.
+
+.subsubsection Example
+
+The following example uses error actions to report an error and jump to a
+machine that consumes the remainder of the line when parsing fails. After
+consuming the line, the error recovery machine returns to the main loop.
+
+% GENERATE: erract
+% %%{
+% machine erract;
+% ws = ' ';
+% address = 'foo AT bar..com';
+% date = 'Monday May 12';
+.code
+action cmd_err {
+ printf( "command error\n" );
+ fhold; fgoto line;
+}
+action from_err {
+ printf( "from error\n" );
+ fhold; fgoto line;
+}
+action to_err {
+ printf( "to error\n" );
+ fhold; fgoto line;
+}
+
+line := [^\n]* '\n' @{ fgoto main; };
+
+main := (
+ (
+ 'from' @err(cmd_err)
+ ( ws+ address ws+ date '\n' ) $err(from_err) |
+ 'to' @err(cmd_err)
+ ( ws+ address '\n' ) $err(to_err)
+ )
+)*;
+.end code
+% }%%
+% %% write data;
+% void f()
+% {
+% %% write init;
+% %% write exec;
+% }
+% END GENERATE
+
+
+
+.section Action Ordering and Duplicates
+
+When combining expressions that have embedded actions it is often the case that
+a number of actions must be executed on a single input character. For example,
+following a concatenation the leaving action of the left expression and the
+entering action of the right expression will be embedded into one transition.
+This requires a method of ordering actions that is intuitive and
+predictable for the user, and repeatable for the compiler.
+
+We associate with the embedding of each action a unique timestamp that is
+used to order actions that appear together on a single transition in the final
+state machine. To accomplish this we recursively traverse the parse tree of
+regular expressions and assign timestamps to action embeddings. References to
+machine definitions are followed in the traversal. When we visit a
+parse tree node we assign timestamps to all .em{entering} action embeddings,
+recurse on the parse tree, then assign timestamps to the remaining .em{all},
+.em{finishing}, and .em{leaving} embeddings in the order in which they
+appear.
+
+By default Ragel does not permit a single action to appear multiple times in an action
+list. When the final machine has been created, actions that appear more than
+once in a single transition, to-state, from-state or EOF action list have their
+duplicates removed.
+The first appearance of the action is preserved. This is useful in a number of
+scenarios. First, it allows us to union machines with common prefixes without
+worrying about the action embeddings in the prefix being duplicated. Second, it
+prevents leaving actions from being transferred multiple times. This can
+happen when a machine is repeated, then followed with another machine that
+begins with a common character. For example:
+
+.verbatim
+word = [a-z]+ %act;
+main := word ( '\n' word )* '\n\n';
+.end verbatim
+
+Note that Ragel does not compare action bodies to determine if they have
+identical program text. It simply checks for duplicates using each action
+block's unique location in the program.
+
+The removal of duplicates can be turned off using the .verb|-d| option.
+
+.section Values and Statements Available in Code Blocks
+.label{vals}
+
+The following values are available in code blocks:
+
+.itemize
+.item .verb|fpc| -- A pointer to the current character. This is equivalent to
+accessing the .verb|p| variable.
+
+.item .verb|fc| -- The current character. This is equivalent to the expression .verb|(*p)|.
+
+.item .verb|fcurs| -- An integer value representing the current state. This
+value should only be read from. To move to a different place in the machine
+from action code use the .verb|fgoto|, .verb|fnext| or .verb|fcall| statements.
+Outside of the machine execution code the .verb|cs| variable may be modified.
+
+.item .verb|ftargs| -- An integer value representing the target state. This
+value should only be read from. Again, .verb|fgoto|, .verb|fnext| and
+.verb|fcall| can be used to move to a specific entry point.
+
+.item .verb|fentry(<label>)| -- Retrieve an integer value representing the
+entry point .verb|label|. The integer value returned will be a compile time
+constant. This number is suitable for later use in control flow transfer
+statements that take an expression. This value should not be compared against
+the current state because any given label can have multiple states representing
+it. The value returned by .verb|fentry| can be any one of the multiple states that
+it represents.
+.end itemize
+
+The following statements are available in code blocks:
+
+.itemize
+
+.item .verb|fhold;| -- Do not advance over the current character. If processing
+data in multiple buffer blocks, the .verb|fhold| statement should only be used
+once in the set of actions executed on a character. Multiple calls may result
+in backing up over the beginning of the buffer block. The .verb|fhold|
+statement does not imply any transfer of control. It is equivalent to the
+.verb|p--;| statement.
+
+.item .verb|fexec <expr>;| -- Set the next character to process. This can be
+used to backtrack to previous input or advance ahead.
+Unlike .verb|fhold|, which can be used
+anywhere, .verb|fexec| requires the user to ensure that the target of the
+backtrack is in the current buffer block or is known to be somewhere ahead of
+it. The machine will continue iterating forward until .verb|pe| is arrived at,
+.verb|fbreak| is called or the machine moves into the error state. In actions
+embedded into transitions, the .verb|fexec| statement is equivalent to setting
+.verb|p| to one position ahead of the next character to process. If the user
+also modifies .verb|pe|, it is possible to change the buffer block entirely.
+
+.item .verb|fgoto <label>;| -- Jump to an entry point defined by
+.verb|<label>|. The .verb|fgoto| statement immediately transfers control to
+the destination state.
+
+.item .verb|fgoto *<expr>;| -- Jump to an entry point given by .verb|<expr>|.
+The expression must evaluate to an integer value representing a state.
+
+.item .verb|fnext <label>;| -- Set the next state to be the entry point defined
+by .verb|label|. The .verb|fnext| statement does not immediately jump to the
+specified state. Any action code following the statement is executed.
+
+.item .verb|fnext *<expr>;| -- Set the next state to be the entry point given
+by .verb|<expr>|. The expression must evaluate to an integer value representing
+a state.
+
+.item .verb|fcall <label>;| -- Push the target state and jump to the entry
+point defined by .verb|<label>|. The next .verb|fret| will jump to the target
+of the transition on which the call was made. Use of .verb|fcall| requires
+the declaration of a call stack. An array of integers named .verb|stack| and a
+single integer named .verb|top| must be declared. With the .verb|fcall|
+construct, control is immediately transferred to the destination state.
+See section .ref{modularization} for more information.
+
+.item .verb|fcall *<expr>;| -- Push the current state and jump to the entry
+point given by .verb|<expr>|. The expression must evaluate to an integer value
+representing a state.
+
+.item .verb|fret;| -- Return to the target state of the transition on which the
+last .verb|fcall| was made. Use of .verb|fret| requires the declaration of a
+call stack. Control is immediately transferred to the destination state.
+
+.item .verb|fbreak;| -- Advance .verb|p|, save the target state to .verb|cs|
+and immediately break out of the execute loop. This statement is useful
+in conjunction with the .verb|noend| write option. Rather than process input
+until .verb|pe| is arrived at, the fbreak statement
+can be used to stop processing from an action. After an .verb|fbreak|
+statement the .verb|p| variable will point to the next character in the input. The
+current state will be the target of the current transition. Note that .verb|fbreak|
+causes the target state's to-state actions to be skipped.
+
+.end itemize
+
+Once actions with control-flow commands are embedded into a
+machine, the user must exercise caution when using the machine as the operand
+to other machine construction operators. If an action jumps to another state
+then unioning any transition that executes that action with another transition
+that follows some other path will cause that other path to be lost. Using
+commands that manually jump around a machine takes us out of the domain of
+regular languages because transitions that the
+machine construction operators are not aware of are introduced. These
+commands should therefore be used with caution.
+
+
+.chapter Controlling Nondeterminism
+.label{controlling-nondeterminism}
+
+Along with the flexibility of arbitrary action embeddings comes a need to
+control nondeterminism in regular expressions. If a regular expression is
+ambiguous, then sub-components of a parser other than the intended parts may become
+active. This means that actions that are irrelevant to the
+current subset of the parser may be executed, causing problems for the
+programmer.
+
+Tools that are based on regular expression engines and that are used for
+recognition tasks will usually function as intended regardless of the presence
+of ambiguities. It is quite common for users of scripting languages to write
+regular expressions that are heavily ambiguous and it generally does not
+matter. As long as one of the potential matches is recognized, there can be any
+number of other matches present. In some parsing systems the run-time engine
+can employ a strategy for resolving ambiguities, for example always pursuing
+the longest possible match and discarding others.
+
+In Ragel, there is no regular expression run-time engine, just a simple state
+machine execution model. When we begin to embed actions and face the
+possibility of spurious action execution, it becomes clear that controlling
+nondeterminism at the machine construction level is very important. Consider
+the following example.
+
+% GENERATE: lines1
+% OPT: -p
+% %%{
+% machine lines1;
+% action first {}
+% action tail {}
+% word = [a-z]+;
+.code
+ws = [\n\t ];
+line = word $first ( ws word $tail )* '\n';
+lines = line*;
+.end code
+% main := lines;
+% }%%
+% END GENERATE
+
+.graphic lines1 0.53
+
+Since the .verb|ws| expression includes the newline character, we will
+not finish the .verb|line| expression when a newline character is seen. We will
+simultaneously pursue the possibility of matching further words on the same
+line and the possibility of matching a second line. Evidence of this fact is
+in the state tables. On several transitions both the .verb|first| and
+.verb|tail| actions are executed. The solution here is simple: exclude
+the newline character from the .verb|ws| expression.
+
+% GENERATE: lines2
+% OPT: -p
+% %%{
+% machine lines2;
+% action first {}
+% action tail {}
+% word = [a-z]+;
+.code
+ws = [\t ];
+line = word $first ( ws word $tail )* '\n';
+lines = line*;
+.end code
+% main := lines;
+% }%%
+% END GENERATE
+
+.graphic lines2
+
+Solving this kind of problem is straightforward when the ambiguity is created
+by strings that are a single character long. When the ambiguity is created by
+strings that are multiple characters long we have a more difficult problem.
+The following example is an incorrect attempt at a regular expression for C
+language comments.
+
+% GENERATE: comments1
+% OPT: -p
+% %%{
+% machine comments1;
+% action comm {}
+.code
+comment = '/*' ( any @comm )* '*/';
+main := comment ' ';
+.end code
+% }%%
+% END GENERATE
+
+.graphic comments1
+
+Using standard concatenation, we will never leave the .verb|any*| expression.
+We will forever entertain the possibility that a .verb|'*/'| string that we see
+is contained in a longer comment and that, simultaneously, the comment has
+ended. The concatenation of the .verb|comment| machine with .verb|SP| is done
+to show this. When we match space, we are also still matching the comment body.
+
+One way to approach the problem is to exclude the terminating string
+from the .verb|any*| expression using set difference. We must be careful to
+exclude not just the terminating string, but any string that contains it as a
+substring. A verbose, but proper specification of a C comment parser is given
+by the following regular expression.
+
+% GENERATE: comments2
+% OPT: -p
+% %%{
+% machine comments2;
+% action comm {}
+.code
+comment = '/*' ( ( any @comm )* - ( any* '*/' any* ) ) '*/';
+.end code
+% main := comment;
+% }%%
+% END GENERATE
+
+.graphic comments2
+
+Note that Ragel's strong subtraction operator .verb|--| can also be used here.
+In doing this subtraction we have phrased the problem of controlling non-determinism in
+terms of excluding strings common to two expressions that interact when
+combined.
+We can also phrase the problem in terms of the transitions of the state
+machines that implement these expressions. During the concatenation of
+.verb|any*| and .verb|'*/'| we will be making transitions that are composed of
+both the loop of the first expression and the final character of the second.
+At this time we want the transition on the .verb|'/'| character to take precedence
+over and disallow the transition that originated in the .verb|any*| loop.
+
+In another parsing problem, we wish to implement a lightweight tokenizer that we can
+utilize in the composition of a larger machine. For example, some HTTP headers
+have a token stream as a sub-language. The following example is an attempt
+at a regular expression-based tokenizer that does not function correctly due to
+unintended nondeterminism.
+
+% GENERATE: smallscanner
+% OPT: -p
+% %%{
+% machine smallscanner;
+% action start_str {}
+% action on_char {}
+% action finish_str {}
+.code
+header_contents = (
+ lower+ >start_str $on_char %finish_str |
+ ' '
+)*;
+.end code
+% main := header_contents;
+% }%%
+% END GENERATE
+
+.graphic smallscanner
+
+In this case, the problem with using a standard kleene star operation is that
+there is an ambiguity between extending a token and wrapping around the machine
+to begin a new token. Using the standard operator, we get an undesirable
+nondeterministic behaviour. Evidence of this can be seen on the transition out
+of state one to itself. The transition extends the string, and simultaneously,
+finishes the string only to immediately begin a new one. What is required is
+for the
+transitions that represent an extension of a token to take precedence over the
+transitions that represent the beginning of a new token. For this problem
+there is no simple solution that uses standard regular expression operators.
+
+.section Priorities
+
+A priority mechanism was devised and built into the determinization
+process, specifically for the purpose of allowing the user to control
+nondeterminism. Priorities are integer values embedded into transitions. When
+the determinization process is combining transitions that have different
+priorities, the transition with the higher priority is preserved and the
+transition with the lower priority is dropped.
+
+Unfortunately, priorities can have unintended side effects because their
+operation requires that they linger in transitions indefinitely. They must linger
+because the Ragel program cannot know when the user is finished with a priority
+embedding. A solution whereby they are explicitly deleted after use is
+conceivable; however this is not very user-friendly. Priorities were therefore
+made into named entities. Only priorities with the same name are allowed to
+interact. This allows any number of priorities to coexist in one machine for
+the purpose of controlling various different regular expression operations and
+eliminates the need to ever delete them. Such a scheme allows the user to
+choose a unique name, embed two different priority values using that name
+and be confident that the priority embedding will be free of any side effects.
+
+In the first form of priority embedding the name defaults to the name of the machine
+definition that the priority is assigned in. In this sense priorities are by
+default local to the current machine definition or instantiation. Beware of
+using this form in a longest-match machine, since there is only one name for
+the entire set of longest match patterns. In the second form the priority's
+name can be specified, allowing priority interaction across machine definition
+boundaries.
+
+.itemize
+.item .verb|expr > int| -- Sets starting transitions to have priority int.
+.item .verb|expr @ int| -- Sets transitions that go into a final state to have priority int.
+.item .verb|expr $ int| -- Sets all transitions to have priority int.
+.item .verb|expr % int| -- Sets leaving transitions to
+have priority int. When a transition is made going out of the machine (either
+by concatenation or kleene star) its priority is immediately set to the
+leaving priority.
+.end itemize
+
+The second form of priority assignment allows the programmer to specify the name
+to which the priority is assigned.
+
+.itemize
+.item .verb|expr > (name, int)| -- Starting transitions.
+.item .verb|expr @ (name, int)| -- Finishing transitions (into a final state).
+.item .verb|expr $ (name, int)| -- All transitions.
+.item .verb|expr % (name, int)| -- Leaving transitions.
+.end itemize
+
+.section Guarded Operators that Encapsulate Priorities
+
+Priority embeddings are a very expressive mechanism. At the same time they
+can be very confusing for the user. They force the user to imagine
+the transitions inside two interacting expressions and work out the precise
+effects of the operations between them. When we consider
+that this problem is worsened by the
+potential for side effects caused by unintended priority name collisions, we
+see that exposing the user to priorities is undesirable.
+
+Fortunately, in practice the use of priorities has been necessary only in a
+small number of scenarios. This allows us to encapsulate their functionality
+into a small set of operators and fully hide them from the user. This is
+advantageous from a language design point of view because it greatly simplifies
+the design.
+
+Going back to the C comment example, we can now properly specify
+it using a guarded concatenation operator which we call .em{finish-guarded
+concatenation}. From the user's point of view, this operator terminates the
+first machine when the second machine moves into a final state. It chooses a
+unique name and uses it to embed a low priority into all
+transitions of the first machine. A higher priority is then embedded into the
+transitions of the second machine that enter into a final state. The following
+example yields a machine identical to the example in Section
+.ref{controlling-nondeterminism}.
+
+.code
+comment = '/*' ( any @comm )* :>> '*/';
+.end code
+
+.graphic comments2
+
+Another guarded operator is .em{left-guarded concatenation}, given by the
+.verb|<:| compound symbol. This operator places a higher priority on all
+transitions of the first machine. This is useful if one must forcibly separate
+two lists that contain common elements. For example, one may need to tokenize a
+stream, but first consume leading whitespace.
+
+Ragel also includes a .em{longest-match kleene star} operator, given by the
+.verb|**| compound symbol. This
+guarded operator embeds a high
+priority into all transitions of the machine.
+A lower priority is then embedded into the leaving transitions. When the
+kleene star operator makes the epsilon transitions from
+the final states into the new start state, the lower priority will be transferred
+to the epsilon transitions. In cases where following an epsilon transition
+out of a final state conflicts with an existing transition out of a final
+state, the epsilon transition will be dropped.
+
+Other guarded operators are conceivable, such as guards on union that cause one
+alternative to take precedence over another. These may be implemented when it
+is clear they constitute a frequently used operation.
+In the next section we discuss the explicit specification of state machines
+using state charts.
+
+.subsection Entry-Guarded Concatenation
+
+.verb|expr :> expr|
+
+This operator concatenates two machines, but first assigns a low
+priority to all transitions
+of the first machine and a high priority to the starting transitions of the
+second machine. This operator is useful if from the final states of the first
+machine it is possible to accept the characters in the entering transitions of
+the second machine. This operator effectively terminates the first machine
+immediately upon starting the second machine, where otherwise they would be
+pursued concurrently. In the following example, entry-guarded concatenation is
+used to move out of a machine that matches everything at the first sign of an
+end-of-input marker.
+
+% GENERATE: entryguard
+% OPT: -p
+% %%{
+% machine entryguard;
+.code
+# Leave the catch-all machine on the first character of FIN.
+main := any* :> 'FIN';
+.end code
+% }%%
+% END GENERATE
+
+.graphic entryguard
+
+Entry-guarded concatenation is equivalent to the following:
+
+.verbatim
+expr $(unique_name,0) . expr >(unique_name,1)
+.end verbatim
+
+.subsection Finish-Guarded Concatenation
+
+.verb|expr :>> expr|
+
+This operator is
+like the previous operator, except the higher priority is placed on the final
+transitions of the second machine. This is useful if one wishes to entertain
+the possibility of continuing to match the first machine right up until the
+second machine enters a final state. In other words it terminates the first
+machine only when the second accepts. In the following example, finish-guarded
+concatenation causes the move out of the machine that matches everything to be
+delayed until the full end-of-input marker has been matched.
+
+% GENERATE: finguard
+% OPT: -p
+% %%{
+% machine finguard;
+.code
+# Leave the catch-all machine on the last character of FIN.
+main := any* :>> 'FIN';
+.end code
+% }%%
+% END GENERATE
+
+.graphic finguard
+
+Finish-guarded concatenation is equivalent to the following, with one
+exception. If the right machine's start state is final, the higher priority is
+also embedded into it as a leaving priority. This prevents the left machine
+from persisting via the zero-length string.
+
+.verbatim
+expr $(unique_name,0) . expr @(unique_name,1)
+.end verbatim
+
+.subsection Left-Guarded Concatenation
+
+.verb|expr <: expr|
+
+This operator places
+a higher priority on the left expression. It is useful if you want to prefix a
+sequence with another sequence composed of some of the same characters. For
+example, one can consume leading whitespace before tokenizing a sequence of
+whitespace-separated words as in:
+
+% GENERATE: leftguard
+% OPT: -p
+% %%{
+% machine leftguard;
+% action alpha {}
+% action ws {}
+% action start {}
+% action fin {}
+.code
+main := ( ' '* >start %fin ) <: ( ' ' $ws | [a-z] $alpha )*;
+.end code
+% }%%
+% END GENERATE
+
+.graphic leftguard
+
+Left-guarded concatenation is equivalent to the following:
+
+.verbatim
+expr $(unique_name,1) . expr >(unique_name,0)
+.end verbatim
+
+.subsection Longest-Match Kleene Star
+.label{longest_match_kleene_star}
+
+.verb|expr**|
+
+This version of kleene star puts a higher priority on staying in the
+machine versus wrapping around and starting over. The LM kleene star is useful
+when writing simple tokenizers. These machines are built by applying the
+longest-match kleene star to an alternation of token patterns, as in the
+following.
+
+% GENERATE: lmkleene
+% OPT: -p
+% %%{
+% machine exfinpri;
+% action A {}
+% action B {}
+.code
+# Repeat tokens, but make sure to get the longest match.
+main := (
+ lower ( lower | digit )* %A |
+ digit+ %B |
+ ' '
+)**;
+.end code
+% }%%
+% END GENERATE
+
+.graphic lmkleene
+
+If a regular kleene star were used the machine above would not be able to
+distinguish between extending a word and beginning a new one. This operator is
+equivalent to:
+
+.verbatim
+( expr $(unique_name,1) %(unique_name,0) )*
+.end verbatim
+
+When the kleene star is applied, transitions that go out of the machine and
+back into it are made. These are assigned a priority of zero by the leaving
+transition mechanism. This is less than the priority of one assigned to the
+transitions leaving the final states but not leaving the machine. When
+these transitions clash on the same character, the
+transition that stays in the machine takes precedence. The transition
+that wraps around is dropped.
+
+Note that this operator does not build a scanner in the traditional sense
+because there is never any backtracking. To build a scanner with backtracking
+use the Longest-Match machine construction described in Section
+.ref{generating-scanners}.
+
+.chapter Interface to Host Program
+
+The Ragel code generator is very flexible. The generated code has no
+dependencies and can be inserted in any function, perhaps inside a loop if
+desired. The user is responsible for declaring and initializing a number of
+required variables, including the current state and the pointer to the input
+stream. These can live in any scope. Control of the input processing loop is
+also possible: the user may break out of the processing loop and return to it
+at any time.
+
+In the case of the C, D, and Go host languages, Ragel is able to generate very
+fast-running code that implements state machines as directly executable code.
+Since very large files strain the host language compiler, table-based code
+generation is also supported. In the future we hope to provide a partitioned,
+directly executable format that is able to reduce the burden on the host
+compiler by splitting large machines across multiple functions.
+
+In the case of Java and Ruby, table-based code generation is the only code
+style supported. In the future this may be expanded to include other code
+styles.
+
+Ragel can be used to parse input in one block, or it can be used to parse input
+in a sequence of blocks as it arrives from a file or socket. Parsing the input
+in a sequence of blocks brings with it a few responsibilities. If the parser
+utilizes a scanner, care must be taken to not break the input stream anywhere
+but token boundaries. If pointers to the input stream are taken during
+parsing, care must be taken to not use a pointer that has been invalidated by
+movement to a subsequent block. If the current input data pointer is moved
+backwards it must not be moved past the beginning of the current block.
+
+Figure .ref{basic-example} shows a simple Ragel program that does not have any
+actions. The example tests the first argument of the program against a number
+pattern and then prints the machine's acceptance status.
+
+.figure basic-example
+.verbatim
+#include <stdio.h>
+#include <string.h>
+%%{
+ machine foo;
+ write data;
+}%%
+int main( int argc, char **argv )
+{
+ int cs;
+ if ( argc > 1 ) {
+ char *p = argv[1];
+ char *pe = p + strlen( p );
+ %%{
+ main := [0-9]+ ( '.' [0-9]+ )?;
+
+ write init;
+ write exec;
+ }%%
+ }
+ printf("result = %i\n", cs >= foo_first_final );
+ return 0;
+}
+.end verbatim
+.caption A basic Ragel example without any actions.
+.end figure
+
+.section Variables Used by Ragel
+
+There are a number of variables that Ragel expects the user to declare. At a
+very minimum the .verb|cs|, .verb|p| and .verb|pe| variables must be declared.
+In Go, Java and Ruby code the .verb|data| variable must also be declared. If
+EOF actions are used then the .verb|eof| variable is required. If
+stack-based state machine control flow statements are used then the
+.verb|stack| and .verb|top| variables are required. If a scanner is declared
+then the .verb|act|, .verb|ts| and .verb|te| variables must be
+declared.
+
+.itemize
+
+.item .verb|cs| - Current state. This must be an integer and it should persist
+across invocations of the machine when the data is broken into blocks that are
+processed independently. This variable may be modified from outside the
+execution loop, but not from within.
+
+.item .verb|p| - Data pointer. In C/D code this variable is expected to be a
+pointer to the character data to process. It should be initialized to the
+beginning of the data block on every run of the machine. In Go, Java and Ruby it is
+used as an offset to .verb|data| and must be an integer. In this case it should
+be initialized to zero on every run of the machine.
+
+.item .verb|pe| - Data end pointer. This should be initialized to .verb|p| plus
+the data length on every run of the machine. In Go, Java and Ruby code this should
+be initialized to the data length.
+
+.item .verb|eof| - End of file pointer. This should be set to .verb|pe| when
+the buffer block being processed is the last one, otherwise it should be set to
+null. In Go, Java and Ruby code .verb|-1| must be used instead of null. If the EOF
+event can be known only after the final buffer block has been processed, then
+it is possible to set .verb|p = pe = eof| and run the execute block.
+
+.item .verb|data| - This variable is only required in Go, Java and Ruby code. It
+must be an array containting the data to process.
+
+.item .verb|stack| - This must be an array of integers. It is used to store
+integer values representing states. If the stack must resize dynamically the
+Pre-push and Post-Pop statements can be used to do this (Sections
+.ref{prepush} and .ref{postpop}).
+
+.item .verb|top| - This must be an integer value and will be used as an offset
+to .verb|stack|, giving the next available spot on the top of the stack.
+
+.item .verb|act| - This must be an integer value. It is a variable sometimes
+used by scanner code to keep track of the most recent successful pattern match.
+
+.item .verb|ts| - This must be a pointer to character data. In Go, Java and
+Ruby code this must be an integer. See Section .ref{generating-scanners} for
+more information.
+
+.item .verb|te| - Also a pointer to character data.
+
+.end itemize
+
+.section Alphtype Statement
+
+.verbatim
+alphtype unsigned int;
+.end verbatim
+
+The alphtype statement specifies the alphabet data type that the machine
+operates on. During the compilation of the machine, integer literals are
+expected to be in the range of possible values of the alphtype. The default
+is .verb|char| for all languages except Go where the default is .verb|byte|.
+
+.multicols
+C/C++/Objective-C:
+.verbatim
+ char unsigned char
+ short unsigned short
+ int unsigned int
+ long unsigned long
+.end verbatim
+
+Go:
+.verbatim
+ byte
+ int8 uint8
+ int16 uint16
+ int32 uint32
+ int
+.end verbatim
+
+Ruby:
+.verbatim
+ char
+ int
+.end verbatim
+
+.columnbreak
+
+Java:
+.verbatim
+ char
+ byte
+ short
+ int
+.end verbatim
+
+D:
+.verbatim
+ char
+ byte ubyte
+ short ushort
+ wchar
+ int uint
+ dchar
+.end verbatim
+
+.end multicols
+
+.section Getkey Statement
+
+.verbatim
+getkey fpc->id;
+.end verbatim
+
+This statement specifies to Ragel how to retrieve the current character from
+from the pointer to the current element (.verb|p|). Any expression that returns
+a value of the alphabet type
+may be used. The getkey statement may be used for looking into element
+structures or for translating the character to process. The getkey expression
+defaults to .verb|(*p)|. In goto-driven machines the getkey expression may be
+evaluated more than once per element processed, therefore it should not incur a
+large cost nor preclude optimization.
+
+.section Access Statement
+
+.verbatim
+access fsm->;
+.end verbatim
+
+The access statement specifies how the generated code should
+access the machine data that is persistent across processing buffer blocks.
+This applies to all variables except .verb|p|, .verb|pe| and .verb|eof|. This includes
+.verb|cs|, .verb|top|, .verb|stack|, .verb|ts|, .verb|te| and .verb|act|.
+The access statement is useful if a machine is to be encapsulated inside a
+structure in C code. It can be used to give the name of
+a pointer to the structure.
+
+.section Variable Statement
+
+.verbatim
+variable p fsm->p;
+.end verbatim
+
+The variable statement specifies how to access a specific
+variable. All of the variables that are declared by the user and
+used by Ragel can be changed. This includes .verb|p|, .verb|pe|, .verb|eof|, .verb|cs|,
+.verb|top|, .verb|stack|, .verb|ts|, .verb|te| and .verb|act|.
+In Go, Ruby and Java code generation the .verb|data| variable can also be changed.
+
+.section Pre-Push Statement
+.label{prepush}
+
+.verbatim
+prepush {
+ /* stack growing code */
+}
+.end verbatim
+
+The prepush statement allows the user to supply stack management code that is
+written out during the generation of fcall, immediately before the current
+state is pushed to the stack. This statement can be used to test the number of
+available spaces and dynamically grow the stack if necessary.
+
+.section Post-Pop Statement
+.label{postpop}
+
+.verbatim
+postpop {
+ /* stack shrinking code */
+}
+.end verbatim
+
+The postpop statement allows the user to supply stack management code that is
+written out during the generation of fret, immediately after the next state is
+popped from the stack. This statement can be used to dynamically shrink the
+stack.
+
+.section Write Statement
+.label{write-statement}
+
+.verbatim
+write <component> [options];
+.end verbatim
+
+The write statement is used to generate parts of the machine.
+There are seven
+components that can be generated by a write statement. These components make up the
+state machine's data, initialization code, execution code, and export definitions.
+A write statement may appear before a machine is fully defined.
+This allows one to write out the data first then later define the machine where
+it is used. An example of this is shown in Figure .ref{fbreak-example}.
+
+.subsection Write Data
+.verbatim
+write data [options];
+.end verbatim
+
+The write data statement causes Ragel to emit the constant static data needed
+by the machine. In table-driven output styles (see Section .ref{genout}) this
+is a collection of arrays that represent the states and transitions of the
+machine. In goto-driven machines much less data is emitted. At the very
+minimum a start state .verb|name_start| is generated. All variables written
+out in machine data have both the .verb|static| and .verb|const| properties and
+are prefixed with the name of the machine and an
+underscore. The data can be placed inside a class, inside a function, or it can
+be defined as global data.
+
+Two variables are written that may be used to test the state of the machine
+after a buffer block has been processed. The .verb|name_error| variable gives
+the id of the state that the machine moves into when it cannot find a valid
+transition to take. The machine immediately breaks out of the processing loop when
+it finds itself in the error state. The error variable can be compared to the
+current state to determine if the machine has failed to parse the input. If the
+machine is complete, that is from every state there is a transition to a proper
+state on every possible character of the alphabet, then no error state is required
+and this variable will be set to -1.
+
+The .verb|name_first_final| variable stores the id of the first final state.
+All of the machine's states are sorted by their final state status before
+having their ids assigned. Checking if the machine has accepted its input can
+then be done by checking if the current state is greater-than or equal to the
+first final state.
+
+Data generation has several options:
+
+.list
+.li .verb|noerror | - Do not generate the integer variable that gives the id of the error state.
+.li .verb|nofinal | - Do not generate the integer variable that gives the id of the first final state.
+.li .verb|noprefix | - Do not prefix the variable names with the name of the machine.
+.end list
+
+.figure fbreak-example
+.verbatim
+#include <stdio.h>
+%% machine foo;
+%% write data;
+int main( int argc, char **argv )
+{
+ int cs, res = 0;
+ if ( argc > 1 ) {
+ char *p = argv[1];
+ %%{
+ main :=
+ [a-z]+
+ 0 @{ res = 1; fbreak; };
+ write init;
+ write exec noend;
+ }%%
+ }
+ printf("execute = %i\n", res );
+ return 0;
+}
+.end verbatim
+.caption Use of .tt{noend} write option and the .tt{fbreak} statement for
+processing a string.
+.end figure
+
+.subsection Write Start, First Final and Error
+
+.verbatim
+write start;
+write first_final;
+write error;
+.end verbatim
+
+These three write statements provide an alternative means of accessing the
+.verb|start|, .verb|first_final| and .verb|error| states. If there are many
+different machine specifications in one file it is easy to get the prefix for
+these wrong. This is especially true if the state machine boilerplate is
+frequently made by a copy-paste-edit process. These write statements allow the
+problem to be avoided. They can be used as follows:
+
+.verbatim
+/* Did parsing succeed? */
+if ( cs < %%{ write first_final; }%% ) {
+ result = ERR_PARSE_ERROR;
+ goto fail;
+}
+.end verbatim
+
+.subsection Write Init
+.verbatim
+write init [options];
+.end verbatim
+
+The write init statement causes Ragel to emit initialization code. This should
+be executed once before the machine is started. At a very minimum this sets the
+current state to the start state. If other variables are needed by the
+generated code, such as call stack variables or scanner management
+variables, they are also initialized here.
+
+The .verb|nocs| option to the write init statement will cause ragel to skip
+intialization of the cs variable. This is useful if the user wishes to use
+custom logic to decide which state the specification should start in.
+
+.subsection Write Exec
+.verbatim
+write exec [options];
+.end verbatim
+
+The write exec statement causes Ragel to emit the state machine's execution code.
+Ragel expects several variables to be available to this code. At a very minimum, the
+generated code needs access to the current character position .verb|p|, the ending
+position .verb|pe| and the current state .verb|cs| (though .verb|pe|
+can be omitted using the .verb|noend| write option).
+The .verb|p| variable is the cursor that the execute code will
+used to traverse the input. The .verb|pe| variable should be set up to point to one
+position past the last valid character in the buffer.
+
+Other variables are needed when certain features are used. For example using
+the .verb|fcall| or .verb|fret| statements requires .verb|stack| and
+.verb|top| variables to be defined. If a longest-match construction is used,
+variables for managing backtracking are required.
+
+The write exec statement has one option. The .verb|noend| option tells Ragel
+to generate code that ignores the end position .verb|pe|. In this
+case the user must explicitly break out of the processing loop using
+.verb|fbreak|, otherwise the machine will continue to process characters until
+it moves into the error state. This option is useful if one wishes to process a
+null terminated string. Rather than traverse the string to discover then length
+before processing the input, the user can break out when the null character is
+seen. The example in Figure .ref{fbreak-example} shows the use of the
+.verb|noend| write option and the .verb|fbreak| statement for processing a string.
+
+.subsection Write Exports
+.label{export}
+
+.verbatim
+write exports;
+.end verbatim
+
+The export feature can be used to export simple machine definitions. Machine definitions
+are marked for export using the .verb|export| keyword.
+
+.verbatim
+export machine_to_export = 0x44;
+.end verbatim
+
+When the write exports statement is used these machines are
+written out in the generated code. Defines are used for C and constant integers
+are used for D, Java and Ruby. See Section .ref{import} for a description of the
+import statement.
+
+.section Maintaining Pointers to Input Data
+
+In the creation of any parser it is not uncommon to require the collection of
+the data being parsed. It is always possible to collect data into a growable
+buffer as the machine moves over it, however the copying of data is a somewhat
+wasteful use of processor cycles. The most efficient way to collect data from
+the parser is to set pointers into the input then later reference them. This
+poses a problem for uses of Ragel where the input data arrives in blocks, such
+as over a socket or from a file. If a pointer is set in one buffer block but
+must be used while parsing a following buffer block, some extra consideration
+to correctness must be made.
+
+The scanner constructions exhibit this problem, requiring the maintenance
+code described in Section .ref{generating-scanners}. If a longest-match
+construction has been used somewhere in the machine then it is possible to
+take advantage of the required prefix maintenance code in the driver program to
+ensure pointers to the input are always valid. If laying down a pointer one can
+set .verb|ts| at the same spot or ahead of it. When data is shifted in
+between loops the user must also shift the pointer. In this way it is possible
+to maintain pointers to the input that will always be consistent.
+
+.figure line-oriented
+.verbatim
+ int have = 0;
+ while ( 1 ) {
+ char *p, *pe, *data = buf + have;
+ int len, space = BUFSIZE - have;
+
+ if ( space == 0 ) {
+ fprintf(stderr, "BUFFER OUT OF SPACE\n");
+ exit(1);
+ }
+
+ len = fread( data, 1, space, stdin );
+ if ( len == 0 )
+ break;
+
+ /* Find the last newline by searching backwards. */
+ p = buf;
+ pe = data + len - 1;
+ while ( *pe != '\n' && pe >= buf )
+ pe--;
+ pe += 1;
+
+ %% write exec;
+
+ /* How much is still in the buffer? */
+ have = data + len - pe;
+ if ( have > 0 )
+ memmove( buf, pe, have );
+
+ if ( len < space )
+ break;
+ }
+.end verbatim
+.caption An example of line-oriented processing.
+.end figure
+
+In general, there are two approaches for guaranteeing the consistency of
+pointers to input data. The first approach is the one just described;
+lay down a marker from an action,
+then later ensure that the data the marker points to is preserved ahead of
+the buffer on the next execute invocation. This approach is good because it
+allows the parser to decide on the pointer-use boundaries, which can be
+arbitrarily complex parsing conditions. A downside is that it requires any
+pointers that are set to be corrected in between execute invocations.
+
+The alternative is to find the pointer-use boundaries before invoking the execute
+routine, then pass in the data using these boundaries. For example, if the
+program must perform line-oriented processing, the user can scan backwards from
+the end of an input block that has just been read in and process only up to the
+first found newline. On the next input read, the new data is placed after the
+partially read line and processing continues from the beginning of the line.
+An example of line-oriented processing is given in Figure .ref{line-oriented}.
+
+.section Specifying the Host Language
+
+The .verb|ragel| program has a number of options for specifying the host
+language. The host-language options are:
+
+.itemize
+.item .verb|-C | for C/C++/Objective-C code (default)
+.item .verb|-D | for D code.
+.item .verb|-Z | for Go code.
+.item .verb|-J | for Java code.
+.item .verb|-R | for Ruby code.
+.item .verb|-A | for C\# code.
+.end itemize
+
+.section Choosing a Generated Code Style
+.label{genout}
+
+There are three styles of code output to choose from. Code style affects the
+size and speed of the compiled binary. Changing code style does not require any
+change to the Ragel program. There are two table-driven formats and a goto
+driven format.
+
+In addition to choosing a style to emit, there are various levels of action
+code reuse to choose from. The maximum reuse levels (.verb|-T0|, .verb|-F0|
+and .verb|-G0|) ensure that no FSM action code is ever duplicated by encoding
+each transition's action list as static data and iterating
+through the lists on every transition. This will normally result in a smaller
+binary. The less action reuse options (.verb|-T1|, .verb|-F1| and .verb|-G1|)
+will usually produce faster running code by expanding each transition's action
+list into a single block of code, eliminating the need to iterate through the
+lists. This duplicates action code instead of generating the logic necessary
+for reuse. Consequently the binary will be larger. However, this tradeoff applies to
+machines with moderate to dense action lists only. If a machine's transitions
+frequently have less than two actions then the less reuse options will actually
+produce both a smaller and a faster running binary due to less action sharing
+overhead. The best way to choose the appropriate code style for your
+application is to perform your own tests.
+
+The table-driven FSM represents the state machine as constant static data. There are
+tables of states, transitions, indices and actions. The current state is
+stored in a variable. The execution is simply a loop that looks up the current
+state, looks up the transition to take, executes any actions and moves to the
+target state. In general, the table-driven FSM can handle any machine, produces
+a smaller binary and requires a less expensive host language compile, but
+results in slower running code. Since the table-driven format is the most
+flexible it is the default code style.
+
+The flat table-driven machine is a table-based machine that is optimized for
+small alphabets. Where the regular table machine uses the current character as
+the key in a binary search for the transition to take, the flat table machine
+uses the current character as an index into an array of transitions. This is
+faster in general, however is only suitable if the span of possible characters
+is small.
+
+The goto-driven FSM represents the state machine using goto and switch
+statements. The execution is a flat code block where the transition to take is
+computed using switch statements and directly executable binary searches. In
+general, the goto FSM produces faster code but results in a larger binary and a
+more expensive host language compile.
+
+The goto-driven format has an additional action reuse level (.verb|-G2|) that
+writes actions directly into the state transitioning logic rather than putting
+all the actions together into a single switch. Generally this produces faster
+running code because it allows the machine to encode the current state using
+the processor's instruction pointer. Again, sparse machines may actually
+compile to smaller binaries when .verb|-G2| is used due to less state and
+action management overhead. For many parsing applications .verb|-G2| is the
+preferred output format.
+
+.center
+
+Code Output Style Options
+
+.tabular
+.row .verb|-T0|&binary search table-driven&C/D/Java/Ruby/C\#
+.row .verb|-T1|&binary search, expanded actions&C/D/Ruby/C\#
+.row .verb|-F0|&flat table-driven&C/D/Ruby/C\#
+.row .verb|-F1|&flat table, expanded actions&C/D/Ruby/C\#
+.row .verb|-G0|&goto-driven&C/D/C\#
+.row .verb|-G1|&goto, expanded actions&C/D/C\#
+.row .verb|-G2|&goto, in-place actions&C/D/Go
+.end tabular
+.end center
+
+.chapter Beyond the Basic Model
+
+.section Parser Modularization
+.label{modularization}
+
+It is possible to use Ragel's machine construction and action embedding
+operators to specify an entire parser using a single regular expression. In
+many cases this is the desired way to specify a parser in Ragel. However, in
+some scenarios the language to parse may be so large that it is difficult to
+think about it as a single regular expression. It may also shift between distinct
+parsing strategies, in which case modularization into several coherent blocks
+of the language may be appropriate.
+
+It may also be the case that patterns that compile to a large number of states
+must be used in a number of different contexts and referencing them in each
+context results in a very large state machine. In this case, an ability to reuse
+parsers would reduce code size.
+
+To address this, distinct regular expressions may be instantiated and linked
+together by means of a jumping and calling mechanism. This mechanism is
+analogous to the jumping to and calling of processor instructions. A jump
+command, given in action code, causes control to be immediately passed to
+another portion of the machine by way of setting the current state variable. A
+call command causes the target state of the current transition to be pushed to
+a state stack before control is transferred. Later on, the original location
+may be returned to with a return statement. In the following example, distinct
+state machines are used to handle the parsing of two types of headers.
+
+% GENERATE: call
+% %%{
+% machine call;
+.code
+action return { fret; }
+action call_date { fcall date; }
+action call_name { fcall name; }
+
+# A parser for date strings.
+date := [0-9][0-9] '/'
+ [0-9][0-9] '/'
+ [0-9][0-9][0-9][0-9] '\n' @return;
+
+# A parser for name strings.
+name := ( [a-zA-Z]+ | ' ' )** '\n' @return;
+
+# The main parser.
+headers =
+ ( 'from' | 'to' ) ':' @call_name |
+ ( 'departed' | 'arrived' ) ':' @call_date;
+
+main := headers*;
+.end code
+% }%%
+% %% write data;
+% void f()
+% {
+% %% write init;
+% %% write exec;
+% }
+% END GENERATE
+
+Calling and jumping should be used carefully as they are operations that take
+one out of the domain of regular languages. A machine that contains a call or
+jump statement in one of its actions should be used as an argument to a machine
+construction operator only with considerable care. Since DFA transitions may
+actually represent several NFA transitions, a call or jump embedded in one
+machine can inadvertently terminate another machine that it shares prefixes
+with. Despite this danger, theses statements have proven useful for tying
+together sub-parsers of a language into a parser for the full language,
+especially for the purpose of modularizing code and reducing the number of
+states when the machine contains frequently recurring patterns.
+
+Section .ref{vals} describes the jump and call statements that are used to
+transfer control. These statements make use of two variables that must be
+declared by the user, .verb|stack| and .verb|top|. The .verb|stack| variable
+must be an array of integers and .verb|top| must be a single integer, which
+will point to the next available space in .verb|stack|. Sections .ref{prepush}
+and .ref{postpop} describe the Pre-Push and Post-Pop statements which can be
+used to implement a dynamically resizable array.
+
+.section Referencing Names
+.label{labels}
+
+This section describes how to reference names in epsilon transitions (Section
+.ref{state-charts}) and
+action-based control-flow statements such as .verb|fgoto|. There is a hierarchy
+of names implied in a Ragel specification. At the top level are the machine
+instantiations. Beneath the instantiations are labels and references to machine
+definitions. Beneath those are more labels and references to definitions, and
+so on.
+
+Any name reference may contain multiple components separated with the .verb|::|
+compound symbol. The search for the first component of a name reference is
+rooted at the join expression that the epsilon transition or action embedding
+is contained in. If the name reference is not contained in a join,
+the search is rooted at the machine definition that the epsilon transition or
+action embedding is contained in. Each component after the first is searched
+for beginning at the location in the name tree that the previous reference
+component refers to.
+
+In the case of action-based references, if the action is embedded more than
+once, the local search is performed for each embedding and the result is the
+union of all the searches. If no result is found for action-based references then
+the search is repeated at the root of the name tree. Any action-based name
+search may be forced into a strictly global search by prefixing the name
+reference with .verb|::|.
+
+The final component of the name reference must resolve to a unique entry point.
+If a name is unique in the entire name tree it can be referenced as is. If it
+is not unique it can be specified by qualifying it with names above it in the
+name tree. However, it can always be renamed.
+
+% FIXME: Should fit this in somewhere.
+% Some kinds of name references are illegal. Cannot call into longest-match
+% machine, can only call its start state. Cannot make a call to anywhere from
+% any part of a longest-match machine except a rule's action. This would result
+% in an eventual return to some point inside a longest-match other than the
+% start state. This is banned for the same reason a call into the LM machine is
+% banned.
+
+
+.section Scanners
+.label{generating-scanners}
+
+Scanners are very much intertwined with regular-languages and their
+corresponding processors. For this reason Ragel supports the definition of
+scanners. The generated code will repeatedly attempt to match patterns from a
+list, favouring longer patterns over shorter patterns. In the case of
+equal-length matches, the generated code will favour patterns that appear ahead
+of others. When a scanner makes a match it executes the user code associated
+with the match, consumes the input then resumes scanning.
+
+.verbatim
+<machine_name> := |*
+ pattern1 => action1;
+ pattern2 => action2;
+ ...
+ *|;
+.end verbatim
+
+On the surface, Ragel scanners are similar to those defined by Lex. Though
+there is a key distinguishing feature: patterns may be arbitrary Ragel
+expressions and can therefore contain embedded code. With a Ragel-based scanner
+the user need not wait until the end of a pattern before user code can be
+executed.
+
+Scanners can be used to process sub-languages, as well as for tokenizing
+programming languages. In the following example a scanner is used to tokenize
+the contents of a header field.
+
+.code
+word = [a-z]+;
+head_name = 'Header';
+
+header := |*
+ word;
+ ' ';
+ '\n' => { fret; };
+*|;
+
+main := ( head_name ':' @{ fcall header; } )*;
+.end code
+
+The scanner construction has a purpose similar to the longest-match kleene star
+operator .verb|**|. The key
+difference is that a scanner is able to backtrack to match a previously matched
+shorter string when the pursuit of a longer string fails. For this reason the
+scanner construction operator is not a pure state machine construction
+operator. It relies on several variables that enable it to backtrack and make
+pointers to the matched input text available to the user. For this reason
+scanners must be immediately instantiated. They cannot be defined inline or
+referenced by another expression. Scanners must be jumped to or called.
+
+Scanners rely on the .verb|ts|, .verb|te| and .verb|act|
+variables to be present so that they can backtrack and make pointers to the
+matched text available to the user. If input is processed using multiple calls
+to the execute code then the user must ensure that when a token is only
+partially matched that the prefix is preserved on the subsequent invocation of
+the execute code.
+
+The .verb|ts| variable must be defined as a pointer to the input data.
+It is used for recording where the current token match begins. This variable
+may be used in action code for retrieving the text of the current match. Ragel
+ensures that in between tokens and outside of the longest-match machines that
+this pointer is set to null. In between calls to the execute code the user must
+check if .verb|ts| is set and if so, ensure that the data it points to is
+preserved ahead of the next buffer block. This is described in more detail
+below.
+
+The .verb|te| variable must also be defined as a pointer to the input data.
+It is used for recording where a match ends and where scanning of the next
+token should begin. This can also be used in action code for retrieving the
+text of the current match.
+
+The .verb|act| variable must be defined as an integer type. It is used for
+recording the identity of the last pattern matched when the scanner must go
+past a matched pattern in an attempt to make a longer match. If the longer
+match fails it may need to consult the .verb|act| variable. In some cases, use
+of the .verb|act|
+variable can be avoided because the value of the current state is enough
+information to determine which token to accept, however in other cases this is
+not enough and so the .verb|act| variable is used.
+
+When the longest-match operator is in use, the user's driver code must take on
+some buffer management functions. The following algorithm gives an overview of
+the steps that should be taken to properly use the longest-match operator.
+
+.itemize
+.item Read a block of input data.
+.item Run the execute code.
+.item If .verb|ts| is set, the execute code will expect the incomplete
+token to be preserved ahead of the buffer on the next invocation of the execute
+code.
+.itemize
+.item Shift the data beginning at .verb|ts| and ending at .verb|pe| to the
+beginning of the input buffer.
+.item Reset .verb|ts| to the beginning of the buffer.
+.item Shift .verb|te| by the distance from the old value of .verb|ts|
+to the new value. The .verb|te| variable may or may not be valid. There is
+no way to know if it holds a meaningful value because it is not kept at null
+when it is not in use. It can be shifted regardless.
+.end itemize
+.item Read another block of data into the buffer, immediately following any
+preserved data.
+.item Run the scanner on the new data.
+.end itemize
+
+Figure .ref{preserve_example} shows the required handling of an input stream in
+which a token is broken by the input block boundaries. After processing up to
+and including the ``t'' of ``characters'', the prefix of the string token must be
+retained and processing should resume at the ``e'' on the next iteration of
+the execute code.
+
+If one uses a large input buffer for collecting input then the number of times
+the shifting must be done will be small. Furthermore, if one takes care not to
+define tokens that are allowed to be very long and instead processes these
+items using pure state machines or sub-scanners, then only a small amount of
+data will ever need to be shifted.
+
+.figure preserve_example
+.verbatim
+ a) A stream "of characters" to be scanned.
+ | | |
+ p ts pe
+
+ b) "of characters" to be scanned.
+ | | |
+ ts p pe
+.end verbatim
+.caption Following an invocation of the execute code there may be a partially
+matched token (a). The data of the partially matched token
+must be preserved ahead of the new data on the next invocation (b).
+.end figure
+
+Since scanners attempt to make the longest possible match of input, patterns
+such as identifiers require one character of lookahead in order to trigger a
+match. In the case of the last token in the input stream the user must ensure
+that the .verb|eof| variable is set so that the final token is flushed out.
+
+An example scanner processing loop is given in Figure .ref{scanner-loop}.
+
+.figure scanner-loop
+.verbatim
+ int have = 0;
+ bool done = false;
+ while ( !done ) {
+ /* How much space is in the buffer? */
+ int space = BUFSIZE - have;
+ if ( space == 0 ) {
+ /* Buffer is full. */
+ cerr << "TOKEN TOO BIG" << endl;
+ exit(1);
+ }
+
+ /* Read in a block after any data we already have. */
+ char *p = inbuf + have;
+ cin.read( p, space );
+ int len = cin.gcount();
+
+ char *pe = p + len;
+ char *eof = 0;
+
+ /* If no data was read indicate EOF. */
+ if ( len == 0 ) {
+ eof = pe;
+ done = true;
+ }
+
+ %% write exec;
+
+ if ( cs == Scanner_error ) {
+ /* Machine failed before finding a token. */
+ cerr << "PARSE ERROR" << endl;
+ exit(1);
+ }
+
+ if ( ts == 0 )
+ have = 0;
+ else {
+ /* There is a prefix to preserve, shift it over. */
+ have = pe - ts;
+ memmove( inbuf, ts, have );
+ te = inbuf + (te-ts);
+ ts = inbuf;
+ }
+ }
+.end verbatim
+.caption A processing loop for a scanner.
+.end figure
+
+.section State Charts
+.label{state-charts}
+
+In addition to supporting the construction of state machines using regular
+languages, Ragel provides a way to manually specify state machines using
+state charts. The comma operator combines machines together without any
+implied transitions. The user can then manually link machines by specifying
+epsilon transitions with the .verb|->| operator. Epsilon transitions are drawn
+between the final states of a machine and entry points defined by labels. This
+makes it possible to build machines using the explicit state-chart method while
+making minimal changes to the Ragel language.
+
+An interesting feature of Ragel's state chart construction method is that it
+can be mixed freely with regular expression constructions. A state chart may be
+referenced from within a regular expression, or a regular expression may be
+used in the definition of a state chart transition.
+
+.subsection Join
+
+.verb|expr , expr , ...|
+
+Join a list of machines together without
+drawing any transitions, without setting up a start state, and without
+designating any final states. Transitions between the machines may be specified
+using labels and epsilon transitions. The start state must be explicity
+specified with the ``start'' label. Final states may be specified with an
+epsilon transition to the implicitly created ``final'' state. The join
+operation allows one to build machines using a state chart model.
+
+.subsection Label
+
+.verb|label: expr|
+
+Attaches a label to an expression. Labels can be
+used as the target of epsilon transitions and explicit control transfer
+statements such as .verb|fgoto| and .verb|fnext| in action
+code.
+
+.subsection Epsilon
+
+.verb|expr -> label|
+
+Draws an epsilon transition to the state defined
+by .verb|label|. Epsilon transitions are made deterministic when join
+operators are evaluated. Epsilon transitions that are not in a join operation
+are made deterministic when the machine definition that contains the epsilon is
+complete. See Section .ref{labels} for information on referencing labels.
+
+.subsection Simplifying State Charts
+
+There are two benefits to providing state charts in Ragel. The first is that it
+allows us to take a state chart with a full listing of states and transitions
+and simplify it in selective places using regular expressions.
+
+The state chart method of specifying parsers is very common. It is an
+effective programming technique for producing robust code. The key disadvantage
+becomes clear when one attempts to comprehend a large parser specified in this
+way. These programs usually require many lines, causing logic to be spread out
+over large distances in the source file. Remembering the function of a large
+number of states can be difficult and organizing the parser in a sensible way
+requires discipline because branches and repetition present many file layout
+options. This kind of programming takes a specification with inherent
+structure such as looping, alternation and concatenation and expresses it in a
+flat form.
+
+If we could take an isolated component of a manually programmed state chart,
+that is, a subset of states that has only one entry point, and implement it
+using regular language operators then we could eliminate all the explicit
+naming of the states contained in it. By eliminating explicitly named states
+and replacing them with higher-level specifications we simplify a state machine
+specification.
+
+For example, sometimes chains of states are needed, with only a small number of
+possible characters appearing along the chain. These can easily be replaced
+with a concatenation of characters. Sometimes a group of common states
+implement a loop back to another single portion of the machine. Rather than
+manually duplicate all the transitions that loop back, we may be able to
+express the loop using a kleene star operator.
+
+Ragel allows one to take this state map simplification approach. We can build
+state machines using a state map model and implement portions of the state map
+using regular languages. In place of any transition in the state machine,
+entire sub-machines can be given. These can encapsulate functionality
+defined elsewhere. An important aspect of the Ragel approach is that when we
+wrap up a collection of states using a regular expression we do not lose
+access to the states and transitions. We can still execute code on the
+transitions that we have encapsulated.
+
+.subsection Dropping Down One Level of Abstraction
+.label{down}
+
+The second benefit of incorporating state charts into Ragel is that it permits
+us to bypass the regular language abstraction if we need to. Ragel's action
+embedding operators are sometimes insufficient for expressing certain parsing
+tasks. In the same way that is useful for C language programmers to drop down
+to assembly language programming using embedded assembler, it is sometimes
+useful for the Ragel programmer to drop down to programming with state charts.
+
+In the following example, we wish to buffer the characters of an XML CDATA
+sequence. The sequence is terminated by the string .verb|]]>|. The challenge
+in our application is that we do not wish the terminating characters to be
+buffered. An expression of the form .verb|any* @buffer :>> ']]>'| will not work
+because the buffer will always contain the characters .verb|]]| on the end.
+Instead, what we need is to delay the buffering of .verb|]|
+characters until a time when we
+abandon the terminating sequence and go back into the main loop. There is no
+easy way to express this using Ragel's regular expression and action embedding
+operators, and so an ability to drop down to the state chart method is useful.
+
+% GENERATE: dropdown
+% OPT: -p
+% %%{
+% machine dropdown;
+.code
+action bchar { buff( fpc ); } # Buffer the current character.
+action bbrack1 { buff( "]" ); }
+action bbrack2 { buff( "]]" ); }
+
+CDATA_body =
+start: (
+ ']' -> one |
+ (any-']') @bchar ->start
+),
+one: (
+ ']' -> two |
+ [^\]] @bbrack1 @bchar ->start
+),
+two: (
+ '>' -> final |
+ ']' @bbrack1 -> two |
+ [^>\]] @bbrack2 @bchar ->start
+);
+.end code
+% main := CDATA_body;
+% }%%
+% END GENERATE
+
+.graphic dropdown
+
+
+.section Semantic Conditions
+.label{semantic}
+
+Many communication protocols contain variable-length fields, where the length
+of the field is given ahead of the field as a value. This
+problem cannot be expressed using regular languages because of its
+context-dependent nature. The prevalence of variable-length fields in
+communication protocols motivated us to introduce semantic conditions into
+the Ragel language.
+
+A semantic condition is a block of user code that is interpreted as an
+expression and evaluated immediately
+before a transition is taken. If the code returns a value of true, the
+transition may be taken. We can now embed code that extracts the length of a
+field, then proceed to match $n$ data values.
+
+% GENERATE: conds1
+% OPT: -p
+% %%{
+% machine conds1;
+% number = digit+;
+.code
+action rec_num { i = 0; n = getnumber(); }
+action test_len { i++ < n }
+data_fields = (
+ 'd'
+ [0-9]+ %rec_num
+ ':'
+ ( [a-z] when test_len )*
+)**;
+.end code
+% main := data_fields;
+% }%%
+% END GENERATE
+
+.graphic conds1
+
+The Ragel implementation of semantic conditions does not force us to give up the
+compositional property of Ragel definitions. For example, a machine that tests
+the length of a field using conditions can be unioned with another machine
+that accepts some of the same strings, without the two machines interfering with
+one another. The user need not be concerned about whether or not the result of the
+semantic condition will affect the matching of the second machine.
+
+To see this, first consider that when a user associates a condition with an
+existing transition, the transition's label is translated from the base character
+to its corresponding value in the space that represents ``condition $c$ true''. Should
+the determinization process combine a state that has a conditional transition
+with another state that has a transition on the same input character but
+without a condition, then the condition-less transition first has its label
+translated into two values, one to its corresponding value in the space that
+represents ``condition $c$ true'' and another to its corresponding value in the
+space that represents ``condition $c$ false''. It
+is then safe to combine the two transitions. This is shown in the following
+example. Two intersecting patterns are unioned, one with a condition and one
+without. The condition embedded in the first pattern does not affect the second
+pattern.
+
+% GENERATE: conds2
+% OPT: -p
+% %%{
+% machine conds2;
+% number = digit+;
+.code
+action test_len { i++ < n }
+action one { /* accept pattern one */ }
+action two { /* accept pattern two */ }
+patterns =
+ ( [a-z] when test_len )+ %one |
+ [a-z][a-z0-9]* %two;
+main := patterns '\n';
+.end code
+% }%%
+% END GENERATE
+
+.graphic conds2
+
+There are many more potential uses for semantic conditions. The user is free to
+use arbitrary code and may therefore perform actions such as looking up names
+in dictionaries, validating input using external parsing mechanisms or
+performing checks on the semantic structure of input seen so far. In the next
+section we describe how Ragel accommodates several common parser engineering
+problems.
+
+The semantic condition feature works only with alphabet types that are smaller
+in width than the .verb|long| type. To implement semantic conditions Ragel
+needs to be able to allocate characters from the alphabet space. Ragel uses
+these allocated characters to express "character C with condition P true" or "C
+with P false." Since internally Ragel uses longs to store characters there is
+no room left in the alphabet space unless an alphabet type smaller than long is
+used.
+
+.section Implementing Lookahead
+
+There are a few strategies for implementing lookahead in Ragel programs.
+Leaving actions, which are described in Section .ref{out-actions}, can be
+used as a form of lookahead. Ragel also provides the .verb|fhold| directive
+which can be used in actions to prevent the machine from advancing over the
+current character. It is also possible to manually adjust the current character
+position by shifting it backwards using .verb|fexec|, however when this is
+done, care must be taken not to overstep the beginning of the current buffer
+block. In both the use of .verb|fhold| and .verb|fexec| the user must be
+cautious of combining the resulting machine with another in such a way that the
+transition on which the current position is adjusted is not combined with a
+transition from the other machine.
+
+.section Parsing Recursive Language Structures
+
+In general Ragel cannot handle recursive structures because the grammar is
+interpreted as a regular language. However, depending on what needs to be
+parsed it is sometimes practical to implement the recursive parts using manual
+coding techniques. This often works in cases where the recursive structures are
+simple and easy to recognize, such as in the balancing of parentheses
+
+One approach to parsing recursive structures is to use actions that increment
+and decrement counters or otherwise recognize the entry to and exit from
+recursive structures and then jump to the appropriate machine defnition using
+.verb|fcall| and .verb|fret|. Alternatively, semantic conditions can be used to
+test counter variables.
+
+A more traditional approach is to call a separate parsing function (expressed
+in the host language) when a recursive structure is entered, then later return
+when the end is recognized.
+##### EXP #####
+\documentclass[letterpaper,11pt,oneside]{book}
+\usepackage{graphicx}
+\usepackage{comment}
+\usepackage{multicol}
+\usepackage[
+ colorlinks=true,
+ linkcolor=black,
+ citecolor=green,
+ filecolor=black,
+ urlcolor=black]{hyperref}
+
+\topmargin -0.20in
+\oddsidemargin 0in
+\textwidth 6.5in
+\textheight 9in
+
+\setlength{\parskip}{0pt}
+\setlength{\topsep}{0pt}
+\setlength{\partopsep}{0pt}
+\setlength{\itemsep}{0pt}
+
+\input{version}
+
+\newcommand{\verbspace}{\vspace{10pt}}
+\newcommand{\graphspace}{\vspace{10pt}}
+
+\renewcommand\floatpagefraction{.99}
+\renewcommand\topfraction{.99}
+\renewcommand\bottomfraction{.99}
+\renewcommand\textfraction{.01}
+\setcounter{totalnumber}{50}
+\setcounter{topnumber}{50}
+\setcounter{bottomnumber}{50}
+
+\newenvironment{inline_code}{\def\baselinestretch{1}\vspace{12pt}\small}{}
+
+\begin{document}
+
+\thispagestyle{empty}
+\begin{center}
+\vspace*{3in}
+{\huge Ragel State Machine Compiler}\\
+\vspace*{12pt}
+{\Large User Guide}\\
+\vspace{1in}
+by\\
+\vspace{12pt}
+{\large Adrian Thurston}\\
+\end{center}
+\clearpage
+
+\pagenumbering{roman}
+
+\chapter*{License}
+Ragel version \version, \pubdate\\
+Copyright \copyright\ 2003-2012 Adrian D. Thurston
+\vspace{6mm}
+
+{\bf\it\noindent This document is part of Ragel, and as such, this document is
+released 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.
+}
+
+\vspace{5pt}
+
+{\bf\it\noindent Ragel 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.
+}
+
+\vspace{5pt}
+
+{\bf\it\noindent You should have received a copy of the GNU General Public
+License along with Ragel; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+}
+
+\clearpage
+\tableofcontents
+\clearpage
+
+\pagenumbering{arabic}
+\chapter{Introduction}
+
+\section{Abstract}
+
+Regular expressions are used heavily in practice for the purpose of specifying
+parsers. They are normally used as black boxes linked together with program
+logic. User actions are executed in between invocations of the regular
+expression engine. Adding actions before a pattern terminates requires patterns
+to be broken and pasted back together with program logic. The more user actions
+are needed, the less the advantages of regular expressions are seen.
+
+Ragel is a software development tool that allows user actions to be
+embedded into the transitions of a regular expression's corresponding state
+machine, eliminating the need to switch from the regular expression engine and
+user code execution environment and back again. As a result, expressions can be
+maximally continuous. One is free to specify an entire parser using a single
+regular expression. The single-expression model affords concise and elegant
+descriptions of languages and the generation of very simple, fast and robust
+code. Ragel compiles executable finite state machines from a high level regular language
+notation. Ragel targets C, C++, Objective-C, D, Go, Java and Ruby.
+
+In addition to building state machines from regular expressions, Ragel allows
+the programmer to directly specify state machines with state charts. These two
+notations may be freely combined. There are also facilities for controlling
+nondeterminism in the resulting machines and building scanners using patterns
+that themselves have embedded actions. Ragel can produce code that is small and
+runs very fast. Ragel can handle integer-sized alphabets and can compile very
+large state machines.
+
+\section{Motivation}
+
+When a programmer is faced with the task of producing a parser for a
+context-free language there are many tools to choose from. It is quite common
+to generate useful and efficient parsers for programming languages from a
+formal grammar. It is also quite common for programmers to avoid such tools
+when making parsers for simple computer languages, such as file formats and
+communication protocols. Such languages are often regular and tools for
+processing the context-free languages are viewed as too heavyweight for the
+purpose of parsing regular languages. The extra run-time effort required for
+supporting the recursive nature of context-free languages is wasted.
+
+When we turn to the regular expression-based parsing tools, such as Lex, Re2C,
+and scripting languages such as Sed, Awk and Perl we find that they are split
+into two levels: a regular expression matching engine and some kind of program
+logic for linking patterns together. For example, a Lex program is composed of
+sets of regular expressions. The implied program logic repeatedly attempts to
+match a pattern in the current set. When a match is found the associated user
+code executed. It requires the user to consider a language as a sequence of
+independent tokens. Scripting languages and regular expression libraries allow
+one to link patterns together using arbitrary program code. This is very
+flexible and powerful, however we can be more concise and clear if we avoid
+gluing together regular expressions with if statements and while loops.
+
+This model of execution, where the runtime alternates between regular
+expression matching and user code exectution places restrictions on when
+action code may be executed. Since action code can only be associated with
+complete patterns, any action code that must be executed before an entire
+pattern is matched requires that the pattern be broken into smaller units.
+Instead of being forced to disrupt the regular expression syntax and write
+smaller expressions, it is desirable to retain a single expression and embed
+code for performing actions directly into the transitions that move over the
+characters. After all, capable programmers are astutely aware of the machinery
+underlying their programs, so why not provide them with access to that
+machinery? To achieve this we require an action execution model for associating
+code with the sub-expressions of a regular expression in a way that does not
+disrupt its syntax.
+
+The primary goal of Ragel is to provide developers with an ability to embed
+actions into the transitions and states of a regular expression's state machine
+in support of the definition of entire parsers or large sections of parsers
+using a single regular expression. From the regular expression we gain a clear
+and concise statement of our language. From the state machine we obtain a very
+fast and robust executable that lends itself to many kinds of analysis and
+visualization.
+
+\section{Overview}
+
+Ragel is a language for specifying state machines. The Ragel program is a
+compiler that assembles a state machine definition to executable code. Ragel
+is based on the principle that any regular language can be converted to a
+deterministic finite state automaton. Since every regular language has a state
+machine representation and vice versa, the terms regular language and state
+machine (or just machine) will be used interchangeably in this document.
+
+Ragel outputs machines to C, C++, Objective-C, D, Go, Java or Ruby code. The output is
+designed to be generic and is not bound to any particular input or processing
+method. A Ragel machine expects to have data passed to it in buffer blocks.
+When there is no more input, the machine can be queried for acceptance. In
+this way, a Ragel machine can be used to simply recognize a regular language
+like a regular expression library. By embedding code into the regular language,
+a Ragel machine can also be used to parse input.
+
+The Ragel language has many operators for constructing and manipulating
+machines. Machines are built up from smaller machines, to bigger ones, to the
+final machine representing the language that needs to be recognized or parsed.
+
+The core state machine construction operators are those found in most theory
+of computation textbooks. They date back to the 1950s and are widely studied.
+They are based on set operations and permit one to think of languages as a set
+of strings. They are Union, Intersection, Difference, Concatenation and Kleene
+Star. Put together, these operators make up what most people know as regular
+expressions. Ragel also provides a scanner construction operator
+and provides operators for explicitly constructing machines
+using a state chart method. In the state chart method, one joins machines
+together without any implied transitions and then explicitly specifies where
+epsilon transitions should be drawn.
+
+The state machine manipulation operators are specific to Ragel. They allow the
+programmer to access the states and transitions of regular language's
+corresponding machine. There are two uses of the manipulation operators. The
+first and primary use is to embed code into transitions and states, allowing
+the programmer to specify the actions of the state machine.
+
+Ragel attempts to make the action embedding facility as intuitive as possible.
+To do so, a number of issues need to be addressed. For example, when making a
+nondeterministic specification into a DFA using machines that have embedded
+actions, new transitions are often made that have the combined actions of
+several source transitions. Ragel ensures that multiple actions associated with
+a single transition are ordered consistently with respect to the order of
+reference and the natural ordering implied by the construction operators.
+
+The second use of the manipulation operators is to assign priorities to
+transitions. Priorities provide a convenient way of controlling any
+nondeterminism introduced by the construction operators. Suppose two
+transitions leave from the same state and go to distinct target states on the
+same character. If these transitions are assigned conflicting priorities, then
+during the determinization process the transition with the higher priority will
+take precedence over the transition with the lower priority. The lower priority
+transition gets abandoned. The transitions would otherwise be combined into a new
+transition that goes to a new state that is a combination of the original
+target states. Priorities are often required for segmenting machines. The most
+common uses of priorities have been encoded into a set of simple operators
+that should be used instead of priority embeddings whenever possible.
+
+For the purposes of embedding, Ragel divides transitions and states into
+different classes. There are four operators for embedding actions and
+priorities into the transitions of a state machine. It is possible to embed
+into entering transitions, finishing transitions, all transitions and leaving
+transitions. The embedding into leaving transitions is a special case.
+These transition embeddings get stored in the final states of a machine. They
+are transferred to any transitions that are made going out of the machine by
+future concatenation or kleene star operations.
+
+There are several more operators for embedding actions into states. Like the
+transition embeddings, there are various different classes of states that the
+embedding operators access. For example, one can access start states, final
+states or all states, among others. Unlike the transition embeddings, there are
+several different types of state action embeddings. These are executed at
+various different times during the processing of input. It is possible to embed
+actions that are exectued on transitions into a state, on transitions out of a
+state, on transitions taken on the error event, or on transitions taken on the
+EOF event.
+
+Within actions, it is possible to influence the behaviour of the state machine.
+The user can write action code that jumps or calls to another portion of the
+machine, changes the current character being processed, or breaks out of the
+processing loop. With the state machine calling feature Ragel can be used to
+parse languages that are not regular. For example, one can parse balanced
+parentheses by calling into a parser when an open parenthesis character is seen
+and returning to the state on the top of the stack when the corresponding
+closing parenthesis character is seen. More complicated context-free languages
+such as expressions in C are out of the scope of Ragel.
+
+Ragel also provides a scanner construction operator that can be used to build
+scanners much the same way that Lex is used. The Ragel generated code, which
+relies on user-defined variables for backtracking, repeatedly tries to match
+patterns to the input, favouring longer patterns over shorter ones and patterns
+that appear ahead of others when the lengths of the possible matches are
+identical. When a pattern is matched the associated action is executed.
+
+The key distinguishing feature between scanners in Ragel and scanners in Lex is
+that Ragel patterns may be arbitrary Ragel expressions and can therefore
+contain embedded code. With a Ragel-based scanner the user need not wait until
+the end of a pattern before user code can be executed.
+
+Scanners do take Ragel out of the domain of pure state machines and require the
+user to maintain the backtracking related variables. However, scanners
+integrate well with regular state machine instantiations. They can be called to
+or jumped to only when needed, or they can be called out of or jumped out of
+when a simpler, pure state machine model is appropriate.
+
+Two types of output code style are available. Ragel can produce a table-driven
+machine or a directly executable machine. The directly executable machine is
+much faster than the table-driven. On the other hand, the table-driven machine
+is more compact and less demanding on the host language compiler. It is better
+suited to compiling large state machines.
+
+\section{Related Work}
+
+Lex is perhaps the best-known tool for constructing parsers from regular
+expressions. In the Lex processing model, generated code attempts to match one
+of the user's regular expression patterns, favouring longer matches over
+shorter ones. Once a match is made it then executes the code associated with
+the pattern and consumes the matching string. This process is repeated until
+the input is fully consumed.
+
+Through the use of start conditions, related sets of patterns may be defined.
+The active set may be changed at any time. This allows the user to define
+different lexical regions. It also allows the user to link patterns together by
+requiring that some patterns come before others. This is quite like a
+concatenation operation. However, use of Lex for languages that require a
+considerable amount of pattern concatenation is inappropriate. In such cases a
+Lex program deteriorates into a manually specified state machine, where start
+conditions define the states and pattern actions define the transitions. Lex
+is therefore best suited to parsing tasks where the language to be parsed can
+be described in terms of regions of tokens.
+
+Lex is useful in many scenarios and has undoubtedly stood the test of time.
+There are, however, several drawbacks to using Lex. Lex can impose too much
+overhead for parsing applications where buffering is not required because all
+the characters are available in a single string. In these cases there is
+structure to the language to be parsed and a parser specification tool can
+help, but employing a heavyweight processing loop that imposes a stream
+``pull'' model and dynamic input buffer allocation is inappropriate. An
+example of this kind of scenario is the conversion of floating point numbers
+contained in a string to their corresponding numerical values.
+
+Another drawback is the very issue that Ragel attempts to solve.
+It is not possible to execute a user action while
+matching a character contained inside a pattern. For example, if scanning a
+programming language and string literals can contain newlines which must be
+counted, a Lex user must break up a string literal pattern so as to associate
+an action with newlines. This forces the definition of a new start condition.
+Alternatively the user can reprocess the text of the matched string literal to
+count newlines.
+
+
+The Re2C program defines an input processing model similar to that of Lex.
+Re2C focuses on making generated state machines run very fast and
+integrate easily into any program, free of dependencies. Re2C generates
+directly executable code and is able to claim that generated parsers run nearly
+as fast as their hand-coded equivalents. This is very important for user
+adoption, as programmers are reluctant to use a tool when a faster alternative
+exists. A consideration to ease of use is also important because developers
+need the freedom to integrate the generated code as they see fit.
+
+Many scripting languages provide ways of composing parsers by linking regular
+expressions using program logic. For example, Sed and Awk are two established
+Unix scripting tools that allow the programmer to exploit regular expressions
+for the purpose of locating and extracting text of interest. High-level
+programming languages such as Perl, Python, PHP and Ruby all provide regular
+expression libraries that allow the user to combine regular expressions with
+arbitrary code.
+
+In addition to supporting the linking of regular expressions with arbitrary
+program logic, the Perl programming language permits the embedding of code into
+regular expressions. Perl embeddings do not translate into the embedding of
+code into deterministic state machines. Perl regular expressions are in fact
+not fully compiled to deterministic machines when embedded code is involved.
+They are instead interpreted and involve backtracking. This is shown by the
+following Perl program. When it is fed the input \verb|abcd| the interpretor
+attempts to match the first alternative, printing \verb|a1 b1|. When this
+possibility fails it backtracks and tries the second possibility, printing
+\verb|a2 b2|, at which point it succeeds.
+
+\begin{inline_code}
+\begin{verbatim}
+print "YES\n" if ( <STDIN> =~
+ /( a (?{ print "a1 "; }) b (?{ print "b1 "; }) cX ) |
+ ( a (?{ print "a2 "; }) b (?{ print "b2 "; }) cd )/x )
+\end{verbatim}
+\end{inline_code}
+\verbspace
+
+In Ragel there is no regular expression interpretor. Aside from the scanner
+operator, all Ragel expressions are made into deterministic machines and the
+run time simply moves from state to state as it consumes input. An equivalent
+parser expressed in Ragel would attempt both of the alternatives concurrently,
+printing \verb|a1 a2 b1 b2|.
+
+\section{Development Status}
+
+Ragel is a relatively new tool and is under continuous development. As a rough
+release guide, minor revision number changes are for implementation
+improvements and feature additions. Major revision number changes are for
+implementation and language changes that do not preserve backwards
+compatibility. Though in the past this has not always held true: changes that
+break code have crept into minor version number changes. Typically, the
+documentation lags behind the development in the interest of documenting only
+the lasting features. The latest changes are always documented in the ChangeLog
+file.
+
+\chapter{Constructing State Machines}
+
+\section{Ragel State Machine Specifications}
+
+A Ragel input file consists of a program in the host language that contains embedded machine
+specifications. Ragel normally passes input straight to output. When it sees
+a machine specification it stops to read the Ragel statements and possibly generate
+code in place of the specification.
+Afterwards it continues to pass input through. There
+can be any number of FSM specifications in an input file. A multi-line FSM spec
+starts with \verb|%%{| and ends with \verb|}%%|. A single-line FSM spec starts
+with \verb|%%| and ends at the first newline.
+
+While Ragel is looking for FSM specifications it does basic lexical analysis on
+the surrounding input. It interprets literal strings and comments so a
+\verb|%%| sequence in either of those will not trigger the parsing of an FSM
+specification. Ragel does not pass the input through any preprocessor nor does it
+interpret preprocessor directives itself so includes, defines and ifdef logic
+cannot be used to alter the parse of a Ragel input file. It is therefore not
+possible to use an \verb|#if 0| directive to comment out a machine as is
+commonly done in C code. As an alternative, a machine can be prevented from
+causing any generated output by commenting out write statements.
+
+In Figure \ref{cmd-line-parsing}, a multi-line specification is used to define the
+machine and single line specifications are used to trigger the writing of the machine
+data and execution code.
+
+\begin{figure}
+\small
+\begin{multicols}{2}
+\begin{verbatim}
+#include <string.h>
+#include <stdio.h>
+
+%%{
+ machine foo;
+ main :=
+ ( 'foo' | 'bar' )
+ 0 @{ res = 1; };
+}%%
+
+%% write data;
+\end{verbatim}
+\verbspace
+\columnbreak
+\begin{verbatim}
+int main( int argc, char **argv )
+{
+ int cs, res = 0;
+ if ( argc > 1 ) {
+ char *p = argv[1];
+ char *pe = p + strlen(p) + 1;
+ %% write init;
+ %% write exec;
+ }
+ printf("result = %i\n", res );
+ return 0;
+}
+\end{verbatim}
+\verbspace
+\end{multicols}
+\caption{Parsing a command line argument.
+}
+\label{cmd-line-parsing}
+\end{figure}
+
+\subsection{Naming Ragel Blocks}
+
+\begin{verbatim}
+machine fsm_name;
+\end{verbatim}
+\verbspace
+
+The \verb|machine| statement gives the name of the FSM. If present in a
+specification, this statement must appear first. If a machine specification
+does not have a name then Ragel uses the previous specification name. If no
+previous specification name exists then this is an error. Because FSM
+specifications persist in memory, a machine's statements can be spread across
+multiple machine specifications. This allows one to break up a machine across
+several files or draw in statements that are common to multiple machines using
+the \verb|include| statement.
+
+\subsection{Machine Definition}
+\label{definition}
+
+\begin{verbatim}
+<name> = <expression>;
+\end{verbatim}
+\verbspace
+
+The machine definition statement associates an FSM expression with a name. Machine
+expressions assigned to names can later be referenced in other expressions. A
+definition statement on its own does not cause any states to be generated. It is simply a
+description of a machine to be used later. States are generated only when a definition is
+instantiated, which happens when a definition is referenced in an instantiated
+expression.
+
+\subsection{Machine Instantiation}
+\label{instantiation}
+
+\begin{verbatim}
+<name> := <expression>;
+\end{verbatim}
+\verbspace
+
+The machine instantiation statement generates a set of states representing an
+expression. Each instantiation generates a distinct set of states. The starting
+state of the instantiation is written in the data section of the generated code
+using the instantiation name. If a machine named
+\verb|main| is instantiated, its start state is used as the
+specification's start state and is assigned to the \verb|cs| variable by the
+\verb|write init| command. If no \verb|main| machine is given, the start state
+of the last machine instantiation to appear is used as the specification's
+start state.
+
+From outside the execution loop, control may be passed to any machine by
+assigning the entry point to the \verb|cs| variable. From inside the execution
+loop, control may be passed to any machine instantiation using \verb|fcall|,
+\verb|fgoto| or \verb|fnext| statements.
+
+\subsection{Including Ragel Code}
+
+\begin{verbatim}
+include FsmName "inputfile.rl";
+\end{verbatim}
+\verbspace
+
+The \verb|include| statement can be used to draw in the statements of another FSM
+specification. Both the name and input file are optional, however at least one
+must be given. Without an FSM name, the given input file is searched for an FSM
+of the same name as the current specification. Without an input file the
+current file is searched for a machine of the given name. If both are present,
+the given input file is searched for a machine of the given name.
+
+Ragel searches for included files from the location of the current file.
+Additional directories can be added to the search path using the \verb|-I|
+option.
+
+\subsection{Importing Definitions}
+\label{import}
+
+\begin{verbatim}
+import "inputfile.h";
+\end{verbatim}
+\verbspace
+
+The \verb|import| statement scrapes a file for sequences of tokens that match
+the following forms. Ragel treats these forms as state machine definitions.
+
+\noindent\hspace*{24pt}\verb|name '=' number|\\
+\noindent\hspace*{24pt}\verb|name '=' lit_string|\\
+\noindent\hspace*{24pt}\verb|'define' name number|\\
+\noindent\hspace*{24pt}\verb|'define' name lit_string|
+\vspace{12pt}
+
+If the input file is a Ragel program then tokens inside any Ragel
+specifications are ignored. See Section \ref{export} for a description of
+exporting machine definitions.
+
+Ragel searches for imported files from the location of the current file.
+Additional directories can be added to the search path using the \verb|-I|
+option.
+
+\section{Lexical Analysis of a Ragel Block}
+\label{lexing}
+
+Within a machine specification the following lexical rules apply to the input.
+
+\begin{itemize}
+
+\item The \verb|#| symbol begins a comment that terminates at the next newline.
+
+\item The symbols \verb|""|, \verb|''|, \verb|//|, \verb|[]| behave as the
+delimiters of literal strings. Within them, the following escape sequences
+are interpreted:
+
+\verb| \0 \a \b \t \n \v \f \r|
+
+A backslash at the end of a line joins the following line onto the current. A
+backslash preceding any other character removes special meaning. This applies
+to terminating characters and to special characters in regular expression
+literals. As an exception, regular expression literals do not support escape
+sequences as the operands of a range within a list. See the bullet on regular
+expressions in Section \ref{basic}.
+
+\item The symbols \verb|{}| delimit a block of host language code that will be
+embedded into the machine as an action. Within the block of host language
+code, basic lexical analysis of comments and strings is done in order to
+correctly find the closing brace of the block. With the exception of FSM
+commands embedded in code blocks, the entire block is preserved as is for
+identical reproduction in the output code.
+
+\item The pattern \verb|[+-]?[0-9]+| denotes an integer in decimal format.
+Integers used for specifying machines may be negative only if the alphabet type
+is signed. Integers used for specifying priorities may be positive or negative.
+
+\item The pattern \verb|0x[0-9A-Fa-f]+| denotes an integer in hexadecimal
+format.
+
+\item The keywords are \verb|access|, \verb|action|, \verb|alphtype|,
+\verb|getkey|, \verb|write|, \verb|machine| and \verb|include|.
+
+\item The pattern \verb|[a-zA-Z_][a-zA-Z_0-9]*| denotes an identifier.
+
+
+\item Any amount of whitespace may separate tokens.
+
+\end{itemize}
+
+
+\section{Basic Machines}
+\label{basic}
+
+The basic machines are the base operands of regular language expressions. They
+are the smallest unit to which machine construction and manipulation operators
+can be applied.
+
+\begin{itemize}
+
+\item \verb|'hello'| -- Concatenation Literal. Produces a machine that matches
+the sequence of characters in the quoted string. If there are 5 characters
+there will be 6 states chained together with the characters in the string. See
+Section \ref{lexing} for information on valid escape sequences.
+
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{bmconcat}
+\end{center}
+\graphspace
+
+It is possible
+to make a concatenation literal case-insensitive by appending an \verb|i| to
+the string, for example \verb|'cmd'i|.
+
+\item \verb|"hello"| -- Identical to the single quoted version.
+
+\item \verb|[hello]| -- Or Expression. Produces a union of characters. There
+will be two states with a transition for each unique character between the two states.
+The \verb|[]| delimiters behave like the quotes of a literal string. For example,
+\verb|[ \t]| means tab or space. The \verb|or| expression supports character ranges
+with the \verb|-| symbol as a separator. The meaning of the union can be negated
+using an initial \verb|^| character as in standard regular expressions.
+See Section \ref{lexing} for information on valid escape sequences
+in \verb|or| expressions.
+
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{bmor}
+\end{center}
+\graphspace
+
+\item \verb|''|, \verb|""|, and \verb|[]| -- Zero Length Machine. Produces a machine
+that matches the zero length string. Zero length machines have one state that is both
+a start state and a final state.
+
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{bmnull}
+\end{center}
+\graphspace
+
+% FIXME: More on the range of values here.
+\item \verb|42| -- Numerical Literal. Produces a two state machine with one
+transition on the given number. The number may be in decimal or hexadecimal
+format and should be in the range allowed by the alphabet type. The minimum and
+maximum values permitted are defined by the host machine that Ragel is compiled
+on. For example, numbers in a \verb|short| alphabet on an i386 machine should
+be in the range \verb|-32768| to \verb|32767|.
+
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{bmnum}
+\end{center}
+\graphspace
+
+\item \verb|/simple_regex/| -- Regular Expression. Regular expressions are
+parsed as a series of expressions that are concatenated together. Each
+concatenated expression
+may be a literal character, the ``any'' character specified by the \verb|.|
+symbol, or a union of characters specified by the \verb|[]| delimiters. If the
+first character of a union is \verb|^| then it matches any character not in the
+list. Within a union, a range of characters can be given by separating the first
+and last characters of the range with the \verb|-| symbol. Each
+concatenated machine may have repetition specified by following it with the
+\verb|*| symbol. The standard escape sequences described in Section
+\ref{lexing} are supported everywhere in regular expressions except as the
+operands of a range within in a list. This notation also supports the \verb|i|
+trailing option. Use it to produce case-insensitive machines, as in \verb|/GET/i|.
+
+Ragel does not support very complex regular expressions because the desired
+results can always be achieved using the more general machine construction
+operators listed in Section \ref{machconst}. The following diagram shows the
+result of compiling \verb|/ab*[c-z].*[123]/|. \verb|DEF| represents the default
+transition, which is taken if no other transition can be taken.
+
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{bmregex}
+\end{center}
+\graphspace
+
+\item \verb|'a' .. 'z'| -- Range. Produces a machine that matches any
+characters in the specified range. Allowable upper and lower bounds of the
+range are concatenation literals of length one and numerical literals. For
+example, \verb|0x10..0x20|, \verb|0..63|, and \verb|'a'..'z'| are valid ranges.
+The bounds should be in the range allowed by the alphabet type.
+
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{bmrange}
+\end{center}
+\graphspace
+
+\item \verb|variable_name| -- Lookup the machine definition assigned to the
+variable name given and use an instance of it. See Section \ref{definition} for
+an important note on what it means to reference a variable name.
+
+\item \verb|builtin_machine| -- There are several built-in machines available
+for use. They are all two state machines for the purpose of matching common
+classes of characters. They are:
+
+\begin{itemize}
+
+\item \verb|any | -- Any character in the alphabet.
+
+\item \verb|ascii | -- Ascii characters. \verb|0..127|
+
+\item \verb|extend| -- Ascii extended characters. This is the range
+\verb|-128..127| for signed alphabets and the range \verb|0..255| for unsigned
+alphabets.
+
+\item \verb|alpha | -- Alphabetic characters. \verb|[A-Za-z]|
+
+\item \verb|digit | -- Digits. \verb|[0-9]|
+
+\item \verb|alnum | -- Alpha numerics. \verb|[0-9A-Za-z]|
+
+\item \verb|lower | -- Lowercase characters. \verb|[a-z]|
+
+\item \verb|upper | -- Uppercase characters. \verb|[A-Z]|
+
+\item \verb|xdigit| -- Hexadecimal digits. \verb|[0-9A-Fa-f]|
+
+\item \verb|cntrl | -- Control characters. \verb|0..31|
+
+\item \verb|graph | -- Graphical characters. \verb|[!-~]|
+
+\item \verb|print | -- Printable characters. \verb|[ -~]|
+
+\item \verb|punct | -- Punctuation. Graphical characters that are not alphanumerics.
+\verb|[!-/:-@[-`{-~]|
+
+\item \verb|space | -- Whitespace. \verb|[\t\v\f\n\r ]|
+
+\item \verb|zlen | -- Zero length string. \verb|""|
+
+\item \verb|empty | -- Empty set. Matches nothing. \verb|^any|
+
+\end{itemize}
+\end{itemize}
+
+\section{Operator Precedence}
+The following table shows operator precedence from lowest to highest. Operators
+in the same precedence group are evaluated from left to right.
+
+\begin{tabular}{|c|c|c|}
+\hline
+1&\verb| , |&Join\\
+\hline
+2&\verb/ | & - --/&Union, Intersection and Subtraction\\
+\hline
+3&\verb| . <: :> :>> |&Concatenation\\
+\hline
+4&\verb| : |&Label\\
+\hline
+5&\verb| -> |&Epsilon Transition\\
+\hline
+6&\verb| > @ $ % |&Transitions Actions and Priorities\\
+\hline
+6&\verb| >/ $/ %/ </ @/ <>/ |&EOF Actions\\
+\hline
+6&\verb| >! $! %! <! @! <>! |&Global Error Actions\\
+\hline
+6&\verb| >^ $^ %^ <^ @^ <>^ |&Local Error Actions\\
+\hline
+6&\verb| >~ $~ %~ <~ @~ <>~ |&To-State Actions\\
+\hline
+6&\verb| >* $* %* <* @* <>* |&From-State Action\\
+\hline
+7&\verb| * ** ? + {n} {,n} {n,} {n,m} |&Repetition\\
+\hline
+8&\verb| ! ^ |&Negation and Character-Level Negation\\
+\hline
+9&\verb| ( <expr> ) |&Grouping\\
+\hline
+\end{tabular}
+
+\section{Regular Language Operators}
+\label{machconst}
+
+When using Ragel it is helpful to have a sense of how it constructs machines.
+The determinization process can produce results that seem unusual to someone
+not familiar with the NFA to DFA conversion algorithm. In this section we
+describe Ragel's state machine operators. Though the operators are defined
+using epsilon transitions, it should be noted that this is for discussion only.
+The epsilon transitions described in this section do not persist, but are
+immediately removed by the determinization process which is executed at every
+operation. Ragel does not make use of any nondeterministic intermediate state
+machines.
+
+To create an epsilon transition between two states \verb|x| and \verb|y| is to
+copy all of the properties of \verb|y| into \verb|x|. This involves drawing in
+all of \verb|y|'s to-state actions, EOF actions, etc., in addition to its
+transitions. If \verb|x| and \verb|y| both have a transition out on the same
+character, then the transitions must be combined. During transition
+combination a new transition is made that goes to a new state that is the
+combination of both target states. The new combination state is created using
+the same epsilon transition method. The new state has an epsilon transition
+drawn to all the states that compose it. Since the creation of new epsilon
+transitions may be triggered every time an epsilon transition is drawn, the
+process of drawing epsilon transitions is repeated until there are no more
+epsilon transitions to be made.
+
+A very common error that is made when using Ragel is to make machines that do
+too much. That is, to create machines that have unintentional
+nondetermistic properties. This usually results from being unaware of the common strings
+between machines that are combined together using the regular language
+operators. This can involve never leaving a machine, causing its actions to be
+propagated through all the following states. Or it can involve an alternation
+where both branches are unintentionally taken simultaneously.
+
+This problem forces one to think hard about the language that needs to be
+matched. To guard against this kind of problem one must ensure that the machine
+specification is divided up using boundaries that do not allow ambiguities from
+one portion of the machine to the next. See Chapter
+\ref{controlling-nondeterminism} for more on this problem and how to solve it.
+
+The Graphviz tool is an immense help when debugging improperly compiled
+machines or otherwise learning how to use Ragel. Graphviz Dot files can be
+generated from Ragel programs using the \verb|-V| option. See Section
+\ref{visualization} for more information.
+
+
+\subsection{Union}
+
+\verb/expr | expr/
+
+The union operation produces a machine that matches any string in machine one
+or machine two. The operation first creates a new start state. Epsilon
+transitions are drawn from the new start state to the start states of both
+input machines. The resulting machine has a final state set equivalent to the
+union of the final state sets of both input machines. In this operation, there
+is the opportunity for nondeterminism among both branches. If there are
+strings, or prefixes of strings that are matched by both machines then the new
+machine will follow both parts of the alternation at once. The union operation is
+shown below.
+
+\graphspace
+\begin{center}
+\includegraphics[scale=1.0]{opor}
+\end{center}
+\graphspace
+
+The following example demonstrates the union of three machines representing
+common tokens.
+
+% GENERATE: exor
+% OPT: -p
+% %%{
+% machine exor;
+\begin{inline_code}
+\begin{verbatim}
+# Hex digits, decimal digits, or identifiers
+main := '0x' xdigit+ | digit+ | alpha alnum*;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exor}
+\end{center}
+\graphspace
+
+\subsection{Intersection}
+
+\verb|expr & expr|
+
+Intersection produces a machine that matches any
+string that is in both machine one and machine two. To achieve intersection, a
+union is performed on the two machines. After the result has been made
+deterministic, any final state that is not a combination of final states from
+both machines has its final state status revoked. To complete the operation,
+paths that do not lead to a final state are pruned from the machine. Therefore,
+if there are any such paths in either of the expressions they will be removed
+by the intersection operator. Intersection can be used to require that two
+independent patterns be simultaneously satisfied as in the following example.
+
+% GENERATE: exinter
+% OPT: -p
+% %%{
+% machine exinter;
+\begin{inline_code}
+\begin{verbatim}
+# Match lines four characters wide that contain
+# words separated by whitespace.
+main :=
+ /[^\n][^\n][^\n][^\n]\n/* &
+ (/[a-z][a-z]*/ | [ \n])**;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exinter}
+\end{center}
+\graphspace
+
+\subsection{Difference}
+
+\verb|expr - expr|
+
+The difference operation produces a machine that matches
+strings that are in machine one but are not in machine two. To achieve subtraction,
+a union is performed on the two machines. After the result has been made
+deterministic, any final state that came from machine two or is a combination
+of states involving a final state from machine two has its final state status
+revoked. As with intersection, the operation is completed by pruning any path
+that does not lead to a final state. The following example demonstrates the
+use of subtraction to exclude specific cases from a set.
+
+% GENERATE: exsubtr
+% OPT: -p
+% %%{
+% machine exsubtr;
+\begin{inline_code}
+\begin{verbatim}
+# Subtract keywords from identifiers.
+main := /[a-z][a-z]*/ - ( 'for' | 'int' );
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exsubtr}
+\end{center}
+\graphspace
+
+\subsection{Strong Difference}
+\label{strong_difference}
+
+\verb|expr -- expr|
+
+Strong difference produces a machine that matches any string of the first
+machine that does not have any string of the second machine as a substring. In
+the following example, strong subtraction is used to excluded \verb|CRLF| from
+a sequence. In the corresponding visualization, the label \verb|DEF| is short
+for default. The default transition is taken if no other transition can be
+taken.
+
+% GENERATE: exstrongsubtr
+% OPT: -p
+% %%{
+% machine exstrongsubtr;
+\begin{inline_code}
+\begin{verbatim}
+crlf = '\r\n';
+main := [a-z]+ ':' ( any* -- crlf ) crlf;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exstrongsubtr}
+\end{center}
+\graphspace
+
+This operator is equivalent to the following.
+
+\begin{verbatim}
+expr - ( any* expr any* )
+\end{verbatim}
+\verbspace
+
+\subsection{Concatenation}
+
+\verb|expr . expr|
+
+Concatenation produces a machine that matches all the strings in machine one followed by all
+the strings in machine two. Concatenation draws epsilon transitions from the
+final states of the first machine to the start state of the second machine. The
+final states of the first machine lose their final state status, unless the
+start state of the second machine is final as well.
+Concatenation is the default operator. Two machines next to each other with no
+operator between them results in concatenation.
+
+\graphspace
+\begin{center}
+\includegraphics[scale=1.0]{opconcat}
+\end{center}
+\graphspace
+
+The opportunity for nondeterministic behaviour results from the possibility of
+the final states of the first machine accepting a string that is also accepted
+by the start state of the second machine.
+The most common scenario in which this happens is the
+concatenation of a machine that repeats some pattern with a machine that gives
+a terminating string, but the repetition machine does not exclude the
+terminating string. The example in Section \ref{strong_difference}
+guards against this. Another example is the expression \verb|("'" any* "'")|.
+When executed the thread of control will
+never leave the \verb|any*| machine. This is a problem especially if actions
+are embedded to process the characters of the \verb|any*| component.
+
+In the following example, the first machine is always active due to the
+nondeterministic nature of concatenation. This particular nondeterminism is intended
+however because we wish to permit EOF strings before the end of the input.
+
+% GENERATE: exconcat
+% OPT: -p
+% %%{
+% machine exconcat;
+\begin{inline_code}
+\begin{verbatim}
+# Require an eof marker on the last line.
+main := /[^\n]*\n/* . 'EOF\n';
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exconcat}
+\end{center}
+\graphspace
+
+There is a language
+ambiguity involving concatenation and subtraction. Because concatenation is the
+default operator for two
+adjacent machines there is an ambiguity between subtraction of
+a positive numerical literal and concatenation of a negative numerical literal.
+For example, \verb|(x-7)| could be interpreted as \verb|(x . -7)| or
+\verb|(x - 7)|. In the Ragel language, the subtraction operator always takes precedence
+over concatenation of a negative literal. We adhere to the rule that the default
+concatenation operator takes effect only when there are no other operators between
+two machines. Beware of writing machines such as \verb|(any -1)| when what is
+desired is a concatenation of \verb|any| and \verb|-1|. Instead write
+\verb|(any . -1)| or \verb|(any (-1))|. If in doubt of the meaning of your program do not
+rely on the default concatenation operator; always use the \verb|.| symbol.
+
+
+\subsection{Kleene Star}
+
+\verb|expr*|
+
+The machine resulting from the Kleene Star operator will match zero or more
+repetitions of the machine it is applied to.
+It creates a new start state and an additional final
+state. Epsilon transitions are drawn between the new start state and the old start
+state, between the new start state and the new final state, and
+between the final states of the machine and the new start state. After the
+machine is made deterministic the effect is of the final states getting all the
+transitions of the start state.
+
+\graphspace
+\begin{center}
+\includegraphics[scale=1.0]{opstar}
+\end{center}
+\graphspace
+
+The possibility for nondeterministic behaviour arises if the final states have
+transitions on any of the same characters as the start state. This is common
+when applying kleene star to an alternation of tokens. Like the other problems
+arising from nondeterministic behavior, this is discussed in more detail in Chapter
+\ref{controlling-nondeterminism}. This particular problem can also be solved
+by using the longest-match construction discussed in Section
+\ref{generating-scanners} on scanners.
+
+In this
+example, there is no nondeterminism introduced by the exterior kleene star due to
+the newline at the end of the regular expression. Without the newline the
+exterior kleene star would be redundant and there would be ambiguity between
+repeating the inner range of the regular expression and the entire regular
+expression. Though it would not cause a problem in this case, unnecessary
+nondeterminism in the kleene star operator often causes undesired results for
+new Ragel users and must be guarded against.
+
+% GENERATE: exstar
+% OPT: -p
+% %%{
+% machine exstar;
+\begin{inline_code}
+\begin{verbatim}
+# Match any number of lines with only lowercase letters.
+main := /[a-z]*\n/*;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exstar}
+\end{center}
+\graphspace
+
+\subsection{One Or More Repetition}
+
+\verb|expr+|
+
+This operator produces the concatenation of the machine with the kleene star of
+itself. The result will match one or more repetitions of the machine. The plus
+operator is equivalent to \verb|(expr . expr*)|.
+
+% GENERATE: explus
+% OPT: -p
+% %%{
+% machine explus;
+\begin{inline_code}
+\begin{verbatim}
+# Match alpha-numeric words.
+main := alnum+;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{explus}
+\end{center}
+\graphspace
+
+\subsection{Optional}
+
+\verb|expr?|
+
+The {\em optional} operator produces a machine that accepts the machine
+given or the zero length string. The optional operator is equivalent to
+\verb/(expr | '' )/. In the following example the optional operator is used to
+possibly extend a token.
+
+% GENERATE: exoption
+% OPT: -p
+% %%{
+% machine exoption;
+\begin{inline_code}
+\begin{verbatim}
+# Match integers or floats.
+main := digit+ ('.' digit+)?;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exoption}
+\end{center}
+\graphspace
+
+\subsection{Repetition}
+
+\noindent\hspace*{24pt}\verb|expr {n}| -- Exactly N copies of expr.\\
+\noindent\hspace*{24pt}\verb|expr {,n}| -- Zero to N copies of expr.\\
+\noindent\hspace*{24pt}\verb|expr {n,}| -- N or more copies of expr.\\
+\noindent\hspace*{24pt}\verb|expr {n,m}| -- N to M copies of expr.
+\vspace{12pt}
+
+\subsection{Negation}
+
+\verb|!expr|
+
+Negation produces a machine that matches any string not matched by the given
+machine. Negation is equivalent to \verb|(any* - expr)|.
+
+% GENERATE: exnegate
+% OPT: -p
+% %%{
+% machine exnegate;
+\begin{inline_code}
+\begin{verbatim}
+# Accept anything but a string beginning with a digit.
+main := ! ( digit any* );
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exnegate}
+\end{center}
+\graphspace
+
+\subsection{Character-Level Negation}
+
+\verb|^expr|
+
+Character-level negation produces a machine that matches any single character
+not matched by the given machine. Character-Level Negation is equivalent to
+\verb|(any - expr)|. It must be applied only to machines that match strings of
+length one.
+
+\section{State Machine Minimization}
+
+State machine minimization is the process of finding the minimal equivalent FSM accepting
+the language. Minimization reduces the number of states in machines
+by merging equivalent states. It does not change the behaviour of the machine
+in any way. It will cause some states to be merged into one because they are
+functionally equivalent. State minimization is on by default. It can be turned
+off with the \verb|-n| option.
+
+The algorithm implemented is similar to Hopcroft's state minimization
+algorithm. Hopcroft's algorithm assumes a finite alphabet that can be listed in
+memory, whereas Ragel supports arbitrary integer alphabets that cannot be
+listed in memory. Though exact analysis is very difficult, Ragel minimization
+runs close to O(n * log(n)) and requires O(n) temporary storage where
+$n$ is the number of states.
+
+\section{Visualization}
+\label{visualization}
+
+%In many cases, practical
+%parsing programs will be too large to completely visualize with Graphviz. The
+%proper approach is to reduce the language to the smallest subset possible that
+%still exhibits the characteristics that one wishes to learn about or to fix.
+%This can be done without modifying the source code using the \verb|-M| and
+%\verb|-S| options. If a machine cannot be easily reduced,
+%embeddings of unique actions can be very useful for tracing a
+%particular component of a larger machine specification, since action names are
+%written out on transition labels.
+
+Ragel is able to emit compiled state machines in Graphviz's Dot file format.
+This is done using the \verb|-V| option.
+Graphviz support allows users to perform
+incremental visualization of their parsers. User actions are displayed on
+transition labels of the graph.
+
+If the final graph is too large to be
+meaningful, or even drawn, the user is able to inspect portions of the parser
+by naming particular regular expression definitions with the \verb|-S| and
+\verb|-M| options to the \verb|ragel| program. Use of Graphviz greatly
+improves the Ragel programming experience. It allows users to learn Ragel by
+experimentation and also to track down bugs caused by unintended
+nondeterminism.
+
+Ragel has another option to help debugging. The \verb|-x| option causes Ragel
+to emit the compiled machine in an XML format.
+
+\chapter{User Actions}
+
+Ragel permits the user to embed actions into the transitions of a regular
+expression's corresponding state machine. These actions are executed when the
+generated code moves over a transition. Like the regular expression operators,
+the action embedding operators are fully compositional. They take a state
+machine and an action as input, embed the action and yield a new state machine
+that can be used in the construction of other machines. Due to the
+compositional nature of embeddings, the user has complete freedom in the
+placement of actions.
+
+A machine's transitions are categorized into four classes. The action embedding
+operators access the transitions defined by these classes. The {\em entering
+transition} operator \verb|>| isolates the start state, then embeds an action
+into all transitions leaving it. The {\em finishing transition} operator
+\verb|@| embeds an action into all transitions going into a final state. The
+{\em all transition} operator \verb|$| embeds an action into all transitions of
+an expression. The {\em leaving transition} operator \verb|%| provides access
+to the yet-unmade transitions moving out of the machine via the final states.
+
+\section{Embedding Actions}
+
+\begin{verbatim}
+action ActionName {
+ /* Code an action here. */
+ count += 1;
+}
+\end{verbatim}
+\verbspace
+
+The action statement defines a block of code that can be embedded into an FSM.
+Action names can be referenced by the action embedding operators in
+expressions. Though actions need not be named in this way (literal blocks
+of code can be embedded directly when building machines), defining reusable
+blocks of code whenever possible is good practice because it potentially increases the
+degree to which the machine can be minimized.
+
+Within an action some Ragel expressions and statements are parsed and
+translated. These allow the user to interact with the machine from action code.
+See Section \ref{vals} for a complete list of statements and values available
+in code blocks.
+
+\subsection{Entering Action}
+
+\verb|expr > action|
+
+The entering action operator embeds an action into all transitions
+that enter into the machine from the start state. If the start state is final,
+then the action is also embedded into the start state as a leaving action. This
+means that if a machine accepts the zero-length string and control passes
+through the start state then the entering action is executed. Note
+that this can happen on both a following character and on the EOF event.
+
+In some machines the start state has transtions coming in from within the
+machine. In these cases the start state is first isolated from the rest of the
+machine ensuring that the entering actions are exected once only.
+
+% GENERATE: exstact
+% OPT: -p
+% %%{
+% machine exstact;
+\begin{inline_code}
+\begin{verbatim}
+# Execute A at the beginning of a string of alpha.
+action A {}
+main := ( lower* >A ) . ' ';
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exstact}
+\end{center}
+\graphspace
+
+\subsection{Finishing Action}
+
+\verb|expr @ action|
+
+The finishing action operator embeds an action into any transitions that move
+the machine into a final state. Further input may move the machine out of the
+final state, but keep it in the machine. Therefore finishing actions may be
+executed more than once if a machine has any internal transitions out of a
+final state. In the following example the final state has no transitions out
+and the finishing action is executed only once.
+
+% GENERATE: exdoneact
+% OPT: -p
+% %%{
+% machine exdoneact;
+% action A {}
+\begin{inline_code}
+\begin{verbatim}
+# Execute A when the trailing space is seen.
+main := ( lower* ' ' ) @A;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exdoneact}
+\end{center}
+\graphspace
+
+\subsection{All Transition Action}
+
+\verb|expr $ action|
+
+The all transition operator embeds an action into all transitions of a machine.
+The action is executed whenever a transition of the machine is taken. In the
+following example, A is executed on every character matched.
+
+% GENERATE: exallact
+% OPT: -p
+% %%{
+% machine exallact;
+% action A {}
+\begin{inline_code}
+\begin{verbatim}
+# Execute A on any characters of the machine.
+main := ( 'm1' | 'm2' ) $A;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exallact}
+\end{center}
+\graphspace
+
+\subsection{Leaving Actions}
+\label{out-actions}
+
+\verb|expr % action|
+
+The leaving action operator queues an action for embedding into the transitions
+that go out of a machine via a final state. The action is first stored in
+the machine's final states and is later transferred to any transitions that are
+made going out of the machine by a kleene star or concatenation operation.
+
+If a final state of the machine is still final when compilation is complete
+then the leaving action is also embedded as an EOF action. Therefore, leaving
+the machine is defined as either leaving on a character or as state machine
+acceptance.
+
+This operator allows one to associate an action with the termination of a
+sequence, without being concerned about what particular character terminates
+the sequence. In the following example, A is executed when leaving the alpha
+machine on the newline character.
+
+% GENERATE: exoutact1
+% OPT: -p
+% %%{
+% machine exoutact1;
+% action A {}
+\begin{inline_code}
+\begin{verbatim}
+# Match a word followed by a newline. Execute A when
+# finishing the word.
+main := ( lower+ %A ) . '\n';
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exoutact1}
+\end{center}
+\graphspace
+
+In the following example, the \verb|term_word| action could be used to register
+the appearance of a word and to clear the buffer that the \verb|lower| action used
+to store the text of it.
+
+% GENERATE: exoutact2
+% OPT: -p
+% %%{
+% machine exoutact2;
+% action lower {}
+% action space {}
+% action term_word {}
+% action newline {}
+\begin{inline_code}
+\begin{verbatim}
+word = ( [a-z] @lower )+ %term_word;
+main := word ( ' ' @space word )* '\n' @newline;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exoutact2}
+\end{center}
+\graphspace
+
+In this final example of the action embedding operators, A is executed upon entering
+the alpha machine, B is executed on all transitions of the
+alpha machine, C is executed when the alpha machine is exited by moving into the
+newline machine and N is executed when the newline machine moves into a final
+state.
+
+% GENERATE: exaction
+% OPT: -p
+% %%{
+% machine exaction;
+% action A {}
+% action B {}
+% action C {}
+% action N {}
+\begin{inline_code}
+\begin{verbatim}
+# Execute A on starting the alpha machine, B on every transition
+# moving through it and C upon finishing. Execute N on the newline.
+main := ( lower* >A $B %C ) . '\n' @N;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{exaction}
+\end{center}
+\graphspace
+
+
+\section{State Action Embedding Operators}
+
+The state embedding operators allow one to embed actions into states. Like the
+transition embedding operators, there are several different classes of states
+that the operators access. The meanings of the symbols are similar to the
+meanings of the symbols used for the transition embedding operators. The design
+of the state selections was driven by a need to cover the states of an
+expression with exactly one error action.
+
+Unlike the transition embedding operators, the state embedding operators are
+also distinguished by the different kinds of events that embedded actions can
+be associated with. Therefore the state embedding operators have two
+components. The first, which is the first one or two characters, specifies the
+class of states that the action will be embedded into. The second component
+specifies the type of event the action will be executed on. The symbols of the
+second component also have equivalent kewords.
+
+\begin{multicols}{2}
+The different classes of states are:
+
+\noindent\hspace*{24pt}\verb|> | -- the start state\\
+\noindent\hspace*{24pt}\verb|< | -- any state except the start state\\
+\noindent\hspace*{24pt}\verb|$ | -- all states\\
+\noindent\hspace*{24pt}\verb|% | -- final states\\
+\noindent\hspace*{24pt}\verb|@ | -- any state except final states\\
+\noindent\hspace*{24pt}\verb|<>| -- any except start and final (middle)
+\vspace{12pt}
+
+\columnbreak
+
+The different kinds of embeddings are:
+
+\noindent\hspace*{24pt}\verb|~| -- to-state actions (\verb|to|)\\
+\noindent\hspace*{24pt}\verb|*| -- from-state actions (\verb|from|)\\
+\noindent\hspace*{24pt}\verb|/| -- EOF actions (\verb|eof|)\\
+\noindent\hspace*{24pt}\verb|!| -- error actions (\verb|err|)\\
+\noindent\hspace*{24pt}\verb|^| -- local error actions (\verb|lerr|)
+\vspace{12pt}
+
+\end{multicols}
+
+\subsection{To-State and From-State Actions}
+
+\subsubsection{To-State Actions}
+
+\noindent\hspace*{24pt}\verb|>~action >to(name) >to{...} | -- the start state\\
+\noindent\hspace*{24pt}\verb|<~action <to(name) <to{...} | -- any state except the start state\\
+\noindent\hspace*{24pt}\verb|$~action $to(name) $to{...} | -- all states\\
+\noindent\hspace*{24pt}\verb|%~action %to(name) %to{...} | -- final states\\
+\noindent\hspace*{24pt}\verb|@~action @to(name) @to{...} | -- any state except final states\\
+\noindent\hspace*{24pt}\verb|<>~action <>to(name) <>to{...}| -- any except start and final (middle)
+\vspace{12pt}
+
+
+To-state actions are executed whenever the state machine moves into the
+specified state, either by a natural movement over a transition or by an
+action-based transfer of control such as \verb|fgoto|. They are executed after the
+in-transition's actions but before the current character is advanced and
+tested against the end of the input block. To-state embeddings stay with the
+state. They are irrespective of the state's current set of transitions and any
+future transitions that may be added in or out of the state.
+
+Note that the setting of the current state variable \verb|cs| outside of the
+execute code is not considered by Ragel as moving into a state and consequently
+the to-state actions of the new current state are not executed. This includes
+the initialization of the current state when the machine begins. This is
+because the entry point into the machine execution code is after the execution
+of to-state actions.
+
+\subsubsection{From-State Actions}
+
+\noindent\hspace*{24pt}\verb|>*action >from(name) >from{...} | -- the start state\\
+\noindent\hspace*{24pt}\verb|<*action <from(name) <from{...} | -- any state except the start state\\
+\noindent\hspace*{24pt}\verb|$*action $from(name) $from{...} | -- all states\\
+\noindent\hspace*{24pt}\verb|%*action %from(name) %from{...} | -- final states\\
+\noindent\hspace*{24pt}\verb|@*action @from(name) @from{...} | -- any state except final states\\
+\noindent\hspace*{24pt}\verb|<>*action <>from(name) <>from{...}| -- any except start and final (middle)
+\vspace{12pt}
+
+From-state actions are executed whenever the state machine takes a transition from a
+state, either to itself or to some other state. These actions are executed
+immediately after the current character is tested against the input block end
+marker and before the transition to take is sought based on the current
+character. From-state actions are therefore executed even if a transition
+cannot be found and the machine moves into the error state. Like to-state
+embeddings, from-state embeddings stay with the state.
+
+\subsection{EOF Actions}
+
+\noindent\hspace*{24pt}\verb|>/action >eof(name) >eof{...} | -- the start state\\
+\noindent\hspace*{24pt}\verb|</action <eof(name) <eof{...} | -- any state except the start state\\
+\noindent\hspace*{24pt}\verb|$/action $eof(name) $eof{...} | -- all states\\
+\noindent\hspace*{24pt}\verb|%/action %eof(name) %eof{...} | -- final states\\
+\noindent\hspace*{24pt}\verb|@/action @eof(name) @eof{...} | -- any state except final states\\
+\noindent\hspace*{24pt}\verb|<>/action <>eof(name) <>eof{...}| -- any except start and final (middle)
+\vspace{12pt}
+
+The EOF action embedding operators enable the user to embed actions that are
+executed at the end of the input stream. EOF actions are stored in states and
+generated in the \verb|write exec| block. They are run when \verb|p == pe == eof|
+as the execute block is finishing. EOF actions are free to adjust \verb|p| and
+jump to another part of the machine to restart execution.
+
+\subsection{Handling Errors}
+
+In many applications it is useful to be able to react to parsing errors. The
+user may wish to print an error message that depends on the context. It
+may also be desirable to consume input in an attempt to return the input stream
+to some known state and resume parsing. To support error handling and recovery,
+Ragel provides error action embedding operators. There are two kinds of error
+actions: global error actions and local error actions.
+Error actions can be used to simply report errors, or by jumping to a machine
+instantiation that consumes input, can attempt to recover from errors.
+
+\subsubsection{Global Error Actions}
+
+\noindent\hspace*{24pt}\verb|>!action >err(name) >err{...} | -- the start state\\
+\noindent\hspace*{24pt}\verb|<!action <err(name) <err{...} | -- any state except the start state\\
+\noindent\hspace*{24pt}\verb|$!action $err(name) $err{...} | -- all states\\
+\noindent\hspace*{24pt}\verb|%!action %err(name) %err{...} | -- final states\\
+\noindent\hspace*{24pt}\verb|@!action @err(name) @err{...} | -- any state except final states\\
+\noindent\hspace*{24pt}\verb|<>!action <>err(name) <>err{...}| -- any except start and final (middle)
+\vspace{12pt}
+
+Global error actions are stored in the states they are embedded into until
+compilation is complete. They are then transferred to the transitions that move
+into the error state. These transitions are taken on all input characters that
+are not already covered by the state's transitions. If a state with an error
+action is not final when compilation is complete, then the action is also
+embedded as an EOF action.
+
+Error actions can be used to recover from errors by jumping back into the
+machine with \verb|fgoto| and optionally altering \verb|p|.
+
+\subsubsection{Local Error Actions}
+
+\noindent\hspace*{24pt}\verb|>^action >lerr(name) >lerr{...} | -- the start state\\
+\noindent\hspace*{24pt}\verb|<^action <lerr(name) <lerr{...} | -- any state except the start state\\
+\noindent\hspace*{24pt}\verb|$^action $lerr(name) $lerr{...} | -- all states\\
+\noindent\hspace*{24pt}\verb|%^action %lerr(name) %lerr{...} | -- final states\\
+\noindent\hspace*{24pt}\verb|@^action @lerr(name) @lerr{...} | -- any state except final states\\
+\noindent\hspace*{24pt}\verb|<>^action <>lerr(name) <>lerr{...}| -- any except start and final (middle)
+\vspace{12pt}
+
+Like global error actions, local error actions are also stored in the states
+they are embedded into until a transfer point. The transfer point is different
+however. Each local error action embedding is associated with a name. When a
+machine definition has been fully constructed, all local error action
+embeddings associated with the same name as the machine definition are
+transferred to the error transitions. At this time they are also embedded as
+EOF actions in the case of non-final states.
+
+Local error actions can be used to specify an action to take when a particular
+section of a larger state machine fails to match. A particular machine
+definition's ``thread'' may die and the local error actions executed, however
+the machine as a whole may continue to match input.
+
+There are two forms of local error action embeddings. In the first form the
+name defaults to the current machine. In the second form the machine name can
+be specified. This is useful when it is more convenient to specify the local
+error action in a sub-definition that is used to construct the machine
+definition that the local error action is associated with. To embed local
+error actions and
+explicitly state the machine definition on which the transfer is to happen use
+\verb|(name, action)| as the action.
+
+\subsubsection{Example}
+
+The following example uses error actions to report an error and jump to a
+machine that consumes the remainder of the line when parsing fails. After
+consuming the line, the error recovery machine returns to the main loop.
+
+% GENERATE: erract
+% %%{
+% machine erract;
+% ws = ' ';
+% address = 'foo AT bar..com';
+% date = 'Monday May 12';
+\begin{inline_code}
+\begin{verbatim}
+action cmd_err {
+ printf( "command error\n" );
+ fhold; fgoto line;
+}
+action from_err {
+ printf( "from error\n" );
+ fhold; fgoto line;
+}
+action to_err {
+ printf( "to error\n" );
+ fhold; fgoto line;
+}
+
+line := [^\n]* '\n' @{ fgoto main; };
+
+main := (
+ (
+ 'from' @err(cmd_err)
+ ( ws+ address ws+ date '\n' ) $err(from_err) |
+ 'to' @err(cmd_err)
+ ( ws+ address '\n' ) $err(to_err)
+ )
+)*;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% %% write data;
+% void f()
+% {
+% %% write init;
+% %% write exec;
+% }
+% END GENERATE
+
+
+
+\section{Action Ordering and Duplicates}
+
+When combining expressions that have embedded actions it is often the case that
+a number of actions must be executed on a single input character. For example,
+following a concatenation the leaving action of the left expression and the
+entering action of the right expression will be embedded into one transition.
+This requires a method of ordering actions that is intuitive and
+predictable for the user, and repeatable for the compiler.
+
+We associate with the embedding of each action a unique timestamp that is
+used to order actions that appear together on a single transition in the final
+state machine. To accomplish this we recursively traverse the parse tree of
+regular expressions and assign timestamps to action embeddings. References to
+machine definitions are followed in the traversal. When we visit a
+parse tree node we assign timestamps to all {\em entering} action embeddings,
+recurse on the parse tree, then assign timestamps to the remaining {\em all},
+{\em finishing}, and {\em leaving} embeddings in the order in which they
+appear.
+
+By default Ragel does not permit a single action to appear multiple times in an action
+list. When the final machine has been created, actions that appear more than
+once in a single transition, to-state, from-state or EOF action list have their
+duplicates removed.
+The first appearance of the action is preserved. This is useful in a number of
+scenarios. First, it allows us to union machines with common prefixes without
+worrying about the action embeddings in the prefix being duplicated. Second, it
+prevents leaving actions from being transferred multiple times. This can
+happen when a machine is repeated, then followed with another machine that
+begins with a common character. For example:
+
+\begin{verbatim}
+word = [a-z]+ %act;
+main := word ( '\n' word )* '\n\n';
+\end{verbatim}
+\verbspace
+
+Note that Ragel does not compare action bodies to determine if they have
+identical program text. It simply checks for duplicates using each action
+block's unique location in the program.
+
+The removal of duplicates can be turned off using the \verb|-d| option.
+
+\section{Values and Statements Available in Code Blocks}
+\label{vals}
+
+The following values are available in code blocks:
+
+\begin{itemize}
+\item \verb|fpc| -- A pointer to the current character. This is equivalent to
+accessing the \verb|p| variable.
+
+\item \verb|fc| -- The current character. This is equivalent to the expression \verb|(*p)|.
+
+\item \verb|fcurs| -- An integer value representing the current state. This
+value should only be read from. To move to a different place in the machine
+from action code use the \verb|fgoto|, \verb|fnext| or \verb|fcall| statements.
+Outside of the machine execution code the \verb|cs| variable may be modified.
+
+\item \verb|ftargs| -- An integer value representing the target state. This
+value should only be read from. Again, \verb|fgoto|, \verb|fnext| and
+\verb|fcall| can be used to move to a specific entry point.
+
+\item \verb|fentry(<label>)| -- Retrieve an integer value representing the
+entry point \verb|label|. The integer value returned will be a compile time
+constant. This number is suitable for later use in control flow transfer
+statements that take an expression. This value should not be compared against
+the current state because any given label can have multiple states representing
+it. The value returned by \verb|fentry| can be any one of the multiple states that
+it represents.
+\end{itemize}
+
+The following statements are available in code blocks:
+
+\begin{itemize}
+
+\item \verb|fhold;| -- Do not advance over the current character. If processing
+data in multiple buffer blocks, the \verb|fhold| statement should only be used
+once in the set of actions executed on a character. Multiple calls may result
+in backing up over the beginning of the buffer block. The \verb|fhold|
+statement does not imply any transfer of control. It is equivalent to the
+\verb|p--;| statement.
+
+\item \verb|fexec <expr>;| -- Set the next character to process. This can be
+used to backtrack to previous input or advance ahead.
+Unlike \verb|fhold|, which can be used
+anywhere, \verb|fexec| requires the user to ensure that the target of the
+backtrack is in the current buffer block or is known to be somewhere ahead of
+it. The machine will continue iterating forward until \verb|pe| is arrived at,
+\verb|fbreak| is called or the machine moves into the error state. In actions
+embedded into transitions, the \verb|fexec| statement is equivalent to setting
+\verb|p| to one position ahead of the next character to process. If the user
+also modifies \verb|pe|, it is possible to change the buffer block entirely.
+
+\item \verb|fgoto <label>;| -- Jump to an entry point defined by
+\verb|<label>|. The \verb|fgoto| statement immediately transfers control to
+the destination state.
+
+\item \verb|fgoto *<expr>;| -- Jump to an entry point given by \verb|<expr>|.
+The expression must evaluate to an integer value representing a state.
+
+\item \verb|fnext <label>;| -- Set the next state to be the entry point defined
+by \verb|label|. The \verb|fnext| statement does not immediately jump to the
+specified state. Any action code following the statement is executed.
+
+\item \verb|fnext *<expr>;| -- Set the next state to be the entry point given
+by \verb|<expr>|. The expression must evaluate to an integer value representing
+a state.
+
+\item \verb|fcall <label>;| -- Push the target state and jump to the entry
+point defined by \verb|<label>|. The next \verb|fret| will jump to the target
+of the transition on which the call was made. Use of \verb|fcall| requires
+the declaration of a call stack. An array of integers named \verb|stack| and a
+single integer named \verb|top| must be declared. With the \verb|fcall|
+construct, control is immediately transferred to the destination state.
+See section \ref{modularization} for more information.
+
+\item \verb|fcall *<expr>;| -- Push the current state and jump to the entry
+point given by \verb|<expr>|. The expression must evaluate to an integer value
+representing a state.
+
+\item \verb|fret;| -- Return to the target state of the transition on which the
+last \verb|fcall| was made. Use of \verb|fret| requires the declaration of a
+call stack. Control is immediately transferred to the destination state.
+
+\item \verb|fbreak;| -- Advance \verb|p|, save the target state to \verb|cs|
+and immediately break out of the execute loop. This statement is useful
+in conjunction with the \verb|noend| write option. Rather than process input
+until \verb|pe| is arrived at, the fbreak statement
+can be used to stop processing from an action. After an \verb|fbreak|
+statement the \verb|p| variable will point to the next character in the input. The
+current state will be the target of the current transition. Note that \verb|fbreak|
+causes the target state's to-state actions to be skipped.
+
+\end{itemize}
+
+Once actions with control-flow commands are embedded into a
+machine, the user must exercise caution when using the machine as the operand
+to other machine construction operators. If an action jumps to another state
+then unioning any transition that executes that action with another transition
+that follows some other path will cause that other path to be lost. Using
+commands that manually jump around a machine takes us out of the domain of
+regular languages because transitions that the
+machine construction operators are not aware of are introduced. These
+commands should therefore be used with caution.
+
+
+\chapter{Controlling Nondeterminism}
+\label{controlling-nondeterminism}
+
+Along with the flexibility of arbitrary action embeddings comes a need to
+control nondeterminism in regular expressions. If a regular expression is
+ambiguous, then sub-components of a parser other than the intended parts may become
+active. This means that actions that are irrelevant to the
+current subset of the parser may be executed, causing problems for the
+programmer.
+
+Tools that are based on regular expression engines and that are used for
+recognition tasks will usually function as intended regardless of the presence
+of ambiguities. It is quite common for users of scripting languages to write
+regular expressions that are heavily ambiguous and it generally does not
+matter. As long as one of the potential matches is recognized, there can be any
+number of other matches present. In some parsing systems the run-time engine
+can employ a strategy for resolving ambiguities, for example always pursuing
+the longest possible match and discarding others.
+
+In Ragel, there is no regular expression run-time engine, just a simple state
+machine execution model. When we begin to embed actions and face the
+possibility of spurious action execution, it becomes clear that controlling
+nondeterminism at the machine construction level is very important. Consider
+the following example.
+
+% GENERATE: lines1
+% OPT: -p
+% %%{
+% machine lines1;
+% action first {}
+% action tail {}
+% word = [a-z]+;
+\begin{inline_code}
+\begin{verbatim}
+ws = [\n\t ];
+line = word $first ( ws word $tail )* '\n';
+lines = line*;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% main := lines;
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.53]{lines1}
+\end{center}
+\graphspace
+
+Since the \verb|ws| expression includes the newline character, we will
+not finish the \verb|line| expression when a newline character is seen. We will
+simultaneously pursue the possibility of matching further words on the same
+line and the possibility of matching a second line. Evidence of this fact is
+in the state tables. On several transitions both the \verb|first| and
+\verb|tail| actions are executed. The solution here is simple: exclude
+the newline character from the \verb|ws| expression.
+
+% GENERATE: lines2
+% OPT: -p
+% %%{
+% machine lines2;
+% action first {}
+% action tail {}
+% word = [a-z]+;
+\begin{inline_code}
+\begin{verbatim}
+ws = [\t ];
+line = word $first ( ws word $tail )* '\n';
+lines = line*;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% main := lines;
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{lines2}
+\end{center}
+\graphspace
+
+Solving this kind of problem is straightforward when the ambiguity is created
+by strings that are a single character long. When the ambiguity is created by
+strings that are multiple characters long we have a more difficult problem.
+The following example is an incorrect attempt at a regular expression for C
+language comments.
+
+% GENERATE: comments1
+% OPT: -p
+% %%{
+% machine comments1;
+% action comm {}
+\begin{inline_code}
+\begin{verbatim}
+comment = '/*' ( any @comm )* '*/';
+main := comment ' ';
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{comments1}
+\end{center}
+\graphspace
+
+Using standard concatenation, we will never leave the \verb|any*| expression.
+We will forever entertain the possibility that a \verb|'*/'| string that we see
+is contained in a longer comment and that, simultaneously, the comment has
+ended. The concatenation of the \verb|comment| machine with \verb|SP| is done
+to show this. When we match space, we are also still matching the comment body.
+
+One way to approach the problem is to exclude the terminating string
+from the \verb|any*| expression using set difference. We must be careful to
+exclude not just the terminating string, but any string that contains it as a
+substring. A verbose, but proper specification of a C comment parser is given
+by the following regular expression.
+
+% GENERATE: comments2
+% OPT: -p
+% %%{
+% machine comments2;
+% action comm {}
+\begin{inline_code}
+\begin{verbatim}
+comment = '/*' ( ( any @comm )* - ( any* '*/' any* ) ) '*/';
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% main := comment;
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{comments2}
+\end{center}
+\graphspace
+
+Note that Ragel's strong subtraction operator \verb|--| can also be used here.
+In doing this subtraction we have phrased the problem of controlling non-determinism in
+terms of excluding strings common to two expressions that interact when
+combined.
+We can also phrase the problem in terms of the transitions of the state
+machines that implement these expressions. During the concatenation of
+\verb|any*| and \verb|'*/'| we will be making transitions that are composed of
+both the loop of the first expression and the final character of the second.
+At this time we want the transition on the \verb|'/'| character to take precedence
+over and disallow the transition that originated in the \verb|any*| loop.
+
+In another parsing problem, we wish to implement a lightweight tokenizer that we can
+utilize in the composition of a larger machine. For example, some HTTP headers
+have a token stream as a sub-language. The following example is an attempt
+at a regular expression-based tokenizer that does not function correctly due to
+unintended nondeterminism.
+
+% GENERATE: smallscanner
+% OPT: -p
+% %%{
+% machine smallscanner;
+% action start_str {}
+% action on_char {}
+% action finish_str {}
+\begin{inline_code}
+\begin{verbatim}
+header_contents = (
+ lower+ >start_str $on_char %finish_str |
+ ' '
+)*;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% main := header_contents;
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{smallscanner}
+\end{center}
+\graphspace
+
+In this case, the problem with using a standard kleene star operation is that
+there is an ambiguity between extending a token and wrapping around the machine
+to begin a new token. Using the standard operator, we get an undesirable
+nondeterministic behaviour. Evidence of this can be seen on the transition out
+of state one to itself. The transition extends the string, and simultaneously,
+finishes the string only to immediately begin a new one. What is required is
+for the
+transitions that represent an extension of a token to take precedence over the
+transitions that represent the beginning of a new token. For this problem
+there is no simple solution that uses standard regular expression operators.
+
+\section{Priorities}
+
+A priority mechanism was devised and built into the determinization
+process, specifically for the purpose of allowing the user to control
+nondeterminism. Priorities are integer values embedded into transitions. When
+the determinization process is combining transitions that have different
+priorities, the transition with the higher priority is preserved and the
+transition with the lower priority is dropped.
+
+Unfortunately, priorities can have unintended side effects because their
+operation requires that they linger in transitions indefinitely. They must linger
+because the Ragel program cannot know when the user is finished with a priority
+embedding. A solution whereby they are explicitly deleted after use is
+conceivable; however this is not very user-friendly. Priorities were therefore
+made into named entities. Only priorities with the same name are allowed to
+interact. This allows any number of priorities to coexist in one machine for
+the purpose of controlling various different regular expression operations and
+eliminates the need to ever delete them. Such a scheme allows the user to
+choose a unique name, embed two different priority values using that name
+and be confident that the priority embedding will be free of any side effects.
+
+In the first form of priority embedding the name defaults to the name of the machine
+definition that the priority is assigned in. In this sense priorities are by
+default local to the current machine definition or instantiation. Beware of
+using this form in a longest-match machine, since there is only one name for
+the entire set of longest match patterns. In the second form the priority's
+name can be specified, allowing priority interaction across machine definition
+boundaries.
+
+\begin{itemize}
+\item \verb|expr > int| -- Sets starting transitions to have priority int.
+\item \verb|expr @ int| -- Sets transitions that go into a final state to have priority int.
+\item \verb|expr $ int| -- Sets all transitions to have priority int.
+\item \verb|expr % int| -- Sets leaving transitions to
+have priority int. When a transition is made going out of the machine (either
+by concatenation or kleene star) its priority is immediately set to the
+leaving priority.
+\end{itemize}
+
+The second form of priority assignment allows the programmer to specify the name
+to which the priority is assigned.
+
+\begin{itemize}
+\item \verb|expr > (name, int)| -- Starting transitions.
+\item \verb|expr @ (name, int)| -- Finishing transitions (into a final state).
+\item \verb|expr $ (name, int)| -- All transitions.
+\item \verb|expr % (name, int)| -- Leaving transitions.
+\end{itemize}
+
+\section{Guarded Operators that Encapsulate Priorities}
+
+Priority embeddings are a very expressive mechanism. At the same time they
+can be very confusing for the user. They force the user to imagine
+the transitions inside two interacting expressions and work out the precise
+effects of the operations between them. When we consider
+that this problem is worsened by the
+potential for side effects caused by unintended priority name collisions, we
+see that exposing the user to priorities is undesirable.
+
+Fortunately, in practice the use of priorities has been necessary only in a
+small number of scenarios. This allows us to encapsulate their functionality
+into a small set of operators and fully hide them from the user. This is
+advantageous from a language design point of view because it greatly simplifies
+the design.
+
+Going back to the C comment example, we can now properly specify
+it using a guarded concatenation operator which we call {\em finish-guarded
+concatenation}. From the user's point of view, this operator terminates the
+first machine when the second machine moves into a final state. It chooses a
+unique name and uses it to embed a low priority into all
+transitions of the first machine. A higher priority is then embedded into the
+transitions of the second machine that enter into a final state. The following
+example yields a machine identical to the example in Section
+\ref{controlling-nondeterminism}.
+
+\begin{inline_code}
+\begin{verbatim}
+comment = '/*' ( any @comm )* :>> '*/';
+\end{verbatim}
+\end{inline_code}
+\verbspace
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{comments2}
+\end{center}
+\graphspace
+
+Another guarded operator is {\em left-guarded concatenation}, given by the
+\verb|<:| compound symbol. This operator places a higher priority on all
+transitions of the first machine. This is useful if one must forcibly separate
+two lists that contain common elements. For example, one may need to tokenize a
+stream, but first consume leading whitespace.
+
+Ragel also includes a {\em longest-match kleene star} operator, given by the
+\verb|**| compound symbol. This
+guarded operator embeds a high
+priority into all transitions of the machine.
+A lower priority is then embedded into the leaving transitions. When the
+kleene star operator makes the epsilon transitions from
+the final states into the new start state, the lower priority will be transferred
+to the epsilon transitions. In cases where following an epsilon transition
+out of a final state conflicts with an existing transition out of a final
+state, the epsilon transition will be dropped.
+
+Other guarded operators are conceivable, such as guards on union that cause one
+alternative to take precedence over another. These may be implemented when it
+is clear they constitute a frequently used operation.
+In the next section we discuss the explicit specification of state machines
+using state charts.
+
+\subsection{Entry-Guarded Concatenation}
+
+\verb|expr :> expr|
+
+This operator concatenates two machines, but first assigns a low
+priority to all transitions
+of the first machine and a high priority to the starting transitions of the
+second machine. This operator is useful if from the final states of the first
+machine it is possible to accept the characters in the entering transitions of
+the second machine. This operator effectively terminates the first machine
+immediately upon starting the second machine, where otherwise they would be
+pursued concurrently. In the following example, entry-guarded concatenation is
+used to move out of a machine that matches everything at the first sign of an
+end-of-input marker.
+
+% GENERATE: entryguard
+% OPT: -p
+% %%{
+% machine entryguard;
+\begin{inline_code}
+\begin{verbatim}
+# Leave the catch-all machine on the first character of FIN.
+main := any* :> 'FIN';
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{entryguard}
+\end{center}
+\graphspace
+
+Entry-guarded concatenation is equivalent to the following:
+
+\begin{verbatim}
+expr $(unique_name,0) . expr >(unique_name,1)
+\end{verbatim}
+\verbspace
+
+\subsection{Finish-Guarded Concatenation}
+
+\verb|expr :>> expr|
+
+This operator is
+like the previous operator, except the higher priority is placed on the final
+transitions of the second machine. This is useful if one wishes to entertain
+the possibility of continuing to match the first machine right up until the
+second machine enters a final state. In other words it terminates the first
+machine only when the second accepts. In the following example, finish-guarded
+concatenation causes the move out of the machine that matches everything to be
+delayed until the full end-of-input marker has been matched.
+
+% GENERATE: finguard
+% OPT: -p
+% %%{
+% machine finguard;
+\begin{inline_code}
+\begin{verbatim}
+# Leave the catch-all machine on the last character of FIN.
+main := any* :>> 'FIN';
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{finguard}
+\end{center}
+\graphspace
+
+Finish-guarded concatenation is equivalent to the following, with one
+exception. If the right machine's start state is final, the higher priority is
+also embedded into it as a leaving priority. This prevents the left machine
+from persisting via the zero-length string.
+
+\begin{verbatim}
+expr $(unique_name,0) . expr @(unique_name,1)
+\end{verbatim}
+\verbspace
+
+\subsection{Left-Guarded Concatenation}
+
+\verb|expr <: expr|
+
+This operator places
+a higher priority on the left expression. It is useful if you want to prefix a
+sequence with another sequence composed of some of the same characters. For
+example, one can consume leading whitespace before tokenizing a sequence of
+whitespace-separated words as in:
+
+% GENERATE: leftguard
+% OPT: -p
+% %%{
+% machine leftguard;
+% action alpha {}
+% action ws {}
+% action start {}
+% action fin {}
+\begin{inline_code}
+\begin{verbatim}
+main := ( ' '* >start %fin ) <: ( ' ' $ws | [a-z] $alpha )*;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{leftguard}
+\end{center}
+\graphspace
+
+Left-guarded concatenation is equivalent to the following:
+
+\begin{verbatim}
+expr $(unique_name,1) . expr >(unique_name,0)
+\end{verbatim}
+\verbspace
+
+\subsection{Longest-Match Kleene Star}
+\label{longest_match_kleene_star}
+
+\verb|expr**|
+
+This version of kleene star puts a higher priority on staying in the
+machine versus wrapping around and starting over. The LM kleene star is useful
+when writing simple tokenizers. These machines are built by applying the
+longest-match kleene star to an alternation of token patterns, as in the
+following.
+
+% GENERATE: lmkleene
+% OPT: -p
+% %%{
+% machine exfinpri;
+% action A {}
+% action B {}
+\begin{inline_code}
+\begin{verbatim}
+# Repeat tokens, but make sure to get the longest match.
+main := (
+ lower ( lower | digit )* %A |
+ digit+ %B |
+ ' '
+)**;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{lmkleene}
+\end{center}
+\graphspace
+
+If a regular kleene star were used the machine above would not be able to
+distinguish between extending a word and beginning a new one. This operator is
+equivalent to:
+
+\begin{verbatim}
+( expr $(unique_name,1) %(unique_name,0) )*
+\end{verbatim}
+\verbspace
+
+When the kleene star is applied, transitions that go out of the machine and
+back into it are made. These are assigned a priority of zero by the leaving
+transition mechanism. This is less than the priority of one assigned to the
+transitions leaving the final states but not leaving the machine. When
+these transitions clash on the same character, the
+transition that stays in the machine takes precedence. The transition
+that wraps around is dropped.
+
+Note that this operator does not build a scanner in the traditional sense
+because there is never any backtracking. To build a scanner with backtracking
+use the Longest-Match machine construction described in Section
+\ref{generating-scanners}.
+
+\chapter{Interface to Host Program}
+
+The Ragel code generator is very flexible. The generated code has no
+dependencies and can be inserted in any function, perhaps inside a loop if
+desired. The user is responsible for declaring and initializing a number of
+required variables, including the current state and the pointer to the input
+stream. These can live in any scope. Control of the input processing loop is
+also possible: the user may break out of the processing loop and return to it
+at any time.
+
+In the case of the C, D, and Go host languages, Ragel is able to generate very
+fast-running code that implements state machines as directly executable code.
+Since very large files strain the host language compiler, table-based code
+generation is also supported. In the future we hope to provide a partitioned,
+directly executable format that is able to reduce the burden on the host
+compiler by splitting large machines across multiple functions.
+
+In the case of Java and Ruby, table-based code generation is the only code
+style supported. In the future this may be expanded to include other code
+styles.
+
+Ragel can be used to parse input in one block, or it can be used to parse input
+in a sequence of blocks as it arrives from a file or socket. Parsing the input
+in a sequence of blocks brings with it a few responsibilities. If the parser
+utilizes a scanner, care must be taken to not break the input stream anywhere
+but token boundaries. If pointers to the input stream are taken during
+parsing, care must be taken to not use a pointer that has been invalidated by
+movement to a subsequent block. If the current input data pointer is moved
+backwards it must not be moved past the beginning of the current block.
+
+Figure \ref{basic-example} shows a simple Ragel program that does not have any
+actions. The example tests the first argument of the program against a number
+pattern and then prints the machine's acceptance status.
+
+\begin{figure}
+\small
+\begin{verbatim}
+#include <stdio.h>
+#include <string.h>
+%%{
+ machine foo;
+ write data;
+}%%
+int main( int argc, char **argv )
+{
+ int cs;
+ if ( argc > 1 ) {
+ char *p = argv[1];
+ char *pe = p + strlen( p );
+ %%{
+ main := [0-9]+ ( '.' [0-9]+ )?;
+
+ write init;
+ write exec;
+ }%%
+ }
+ printf("result = %i\n", cs >= foo_first_final );
+ return 0;
+}
+\end{verbatim}
+\verbspace
+\caption{A basic Ragel example without any actions.
+}
+\label{basic-example}
+\end{figure}
+
+\section{Variables Used by Ragel}
+
+There are a number of variables that Ragel expects the user to declare. At a
+very minimum the \verb|cs|, \verb|p| and \verb|pe| variables must be declared.
+In Go, Java and Ruby code the \verb|data| variable must also be declared. If
+EOF actions are used then the \verb|eof| variable is required. If
+stack-based state machine control flow statements are used then the
+\verb|stack| and \verb|top| variables are required. If a scanner is declared
+then the \verb|act|, \verb|ts| and \verb|te| variables must be
+declared.
+
+\begin{itemize}
+
+\item \verb|cs| - Current state. This must be an integer and it should persist
+across invocations of the machine when the data is broken into blocks that are
+processed independently. This variable may be modified from outside the
+execution loop, but not from within.
+
+\item \verb|p| - Data pointer. In C/D code this variable is expected to be a
+pointer to the character data to process. It should be initialized to the
+beginning of the data block on every run of the machine. In Go, Java and Ruby it is
+used as an offset to \verb|data| and must be an integer. In this case it should
+be initialized to zero on every run of the machine.
+
+\item \verb|pe| - Data end pointer. This should be initialized to \verb|p| plus
+the data length on every run of the machine. In Go, Java and Ruby code this should
+be initialized to the data length.
+
+\item \verb|eof| - End of file pointer. This should be set to \verb|pe| when
+the buffer block being processed is the last one, otherwise it should be set to
+null. In Go, Java and Ruby code \verb|-1| must be used instead of null. If the EOF
+event can be known only after the final buffer block has been processed, then
+it is possible to set \verb|p = pe = eof| and run the execute block.
+
+\item \verb|data| - This variable is only required in Go, Java and Ruby code. It
+must be an array containting the data to process.
+
+\item \verb|stack| - This must be an array of integers. It is used to store
+integer values representing states. If the stack must resize dynamically the
+Pre-push and Post-Pop statements can be used to do this (Sections
+\ref{prepush} and \ref{postpop}).
+
+\item \verb|top| - This must be an integer value and will be used as an offset
+to \verb|stack|, giving the next available spot on the top of the stack.
+
+\item \verb|act| - This must be an integer value. It is a variable sometimes
+used by scanner code to keep track of the most recent successful pattern match.
+
+\item \verb|ts| - This must be a pointer to character data. In Go, Java and
+Ruby code this must be an integer. See Section \ref{generating-scanners} for
+more information.
+
+\item \verb|te| - Also a pointer to character data.
+
+\end{itemize}
+
+\section{Alphtype Statement}
+
+\begin{verbatim}
+alphtype unsigned int;
+\end{verbatim}
+\verbspace
+
+The alphtype statement specifies the alphabet data type that the machine
+operates on. During the compilation of the machine, integer literals are
+expected to be in the range of possible values of the alphtype. The default
+is \verb|char| for all languages except Go where the default is \verb|byte|.
+
+\begin{multicols}{2}
+C/C++/Objective-C:
+\begin{verbatim}
+ char unsigned char
+ short unsigned short
+ int unsigned int
+ long unsigned long
+\end{verbatim}
+\verbspace
+
+Go:
+\begin{verbatim}
+ byte
+ int8 uint8
+ int16 uint16
+ int32 uint32
+ int
+\end{verbatim}
+\verbspace
+
+Ruby:
+\begin{verbatim}
+ char
+ int
+\end{verbatim}
+\verbspace
+
+\columnbreak
+
+Java:
+\begin{verbatim}
+ char
+ byte
+ short
+ int
+\end{verbatim}
+\verbspace
+
+D:
+\begin{verbatim}
+ char
+ byte ubyte
+ short ushort
+ wchar
+ int uint
+ dchar
+\end{verbatim}
+\verbspace
+
+\end{multicols}
+
+\section{Getkey Statement}
+
+\begin{verbatim}
+getkey fpc->id;
+\end{verbatim}
+\verbspace
+
+This statement specifies to Ragel how to retrieve the current character from
+from the pointer to the current element (\verb|p|). Any expression that returns
+a value of the alphabet type
+may be used. The getkey statement may be used for looking into element
+structures or for translating the character to process. The getkey expression
+defaults to \verb|(*p)|. In goto-driven machines the getkey expression may be
+evaluated more than once per element processed, therefore it should not incur a
+large cost nor preclude optimization.
+
+\section{Access Statement}
+
+\begin{verbatim}
+access fsm->;
+\end{verbatim}
+\verbspace
+
+The access statement specifies how the generated code should
+access the machine data that is persistent across processing buffer blocks.
+This applies to all variables except \verb|p|, \verb|pe| and \verb|eof|. This includes
+\verb|cs|, \verb|top|, \verb|stack|, \verb|ts|, \verb|te| and \verb|act|.
+The access statement is useful if a machine is to be encapsulated inside a
+structure in C code. It can be used to give the name of
+a pointer to the structure.
+
+\section{Variable Statement}
+
+\begin{verbatim}
+variable p fsm->p;
+\end{verbatim}
+\verbspace
+
+The variable statement specifies how to access a specific
+variable. All of the variables that are declared by the user and
+used by Ragel can be changed. This includes \verb|p|, \verb|pe|, \verb|eof|, \verb|cs|,
+\verb|top|, \verb|stack|, \verb|ts|, \verb|te| and \verb|act|.
+In Go, Ruby and Java code generation the \verb|data| variable can also be changed.
+
+\section{Pre-Push Statement}
+\label{prepush}
+
+\begin{verbatim}
+prepush {
+ /* stack growing code */
+}
+\end{verbatim}
+\verbspace
+
+The prepush statement allows the user to supply stack management code that is
+written out during the generation of fcall, immediately before the current
+state is pushed to the stack. This statement can be used to test the number of
+available spaces and dynamically grow the stack if necessary.
+
+\section{Post-Pop Statement}
+\label{postpop}
+
+\begin{verbatim}
+postpop {
+ /* stack shrinking code */
+}
+\end{verbatim}
+\verbspace
+
+The postpop statement allows the user to supply stack management code that is
+written out during the generation of fret, immediately after the next state is
+popped from the stack. This statement can be used to dynamically shrink the
+stack.
+
+\section{Write Statement}
+\label{write-statement}
+
+\begin{verbatim}
+write <component> [options];
+\end{verbatim}
+\verbspace
+
+The write statement is used to generate parts of the machine.
+There are seven
+components that can be generated by a write statement. These components make up the
+state machine's data, initialization code, execution code, and export definitions.
+A write statement may appear before a machine is fully defined.
+This allows one to write out the data first then later define the machine where
+it is used. An example of this is shown in Figure \ref{fbreak-example}.
+
+\subsection{Write Data}
+\begin{verbatim}
+write data [options];
+\end{verbatim}
+\verbspace
+
+The write data statement causes Ragel to emit the constant static data needed
+by the machine. In table-driven output styles (see Section \ref{genout}) this
+is a collection of arrays that represent the states and transitions of the
+machine. In goto-driven machines much less data is emitted. At the very
+minimum a start state \verb|name_start| is generated. All variables written
+out in machine data have both the \verb|static| and \verb|const| properties and
+are prefixed with the name of the machine and an
+underscore. The data can be placed inside a class, inside a function, or it can
+be defined as global data.
+
+Two variables are written that may be used to test the state of the machine
+after a buffer block has been processed. The \verb|name_error| variable gives
+the id of the state that the machine moves into when it cannot find a valid
+transition to take. The machine immediately breaks out of the processing loop when
+it finds itself in the error state. The error variable can be compared to the
+current state to determine if the machine has failed to parse the input. If the
+machine is complete, that is from every state there is a transition to a proper
+state on every possible character of the alphabet, then no error state is required
+and this variable will be set to -1.
+
+The \verb|name_first_final| variable stores the id of the first final state.
+All of the machine's states are sorted by their final state status before
+having their ids assigned. Checking if the machine has accepted its input can
+then be done by checking if the current state is greater-than or equal to the
+first final state.
+
+Data generation has several options:
+
+\noindent\hspace*{24pt}\verb|noerror | - Do not generate the integer variable that gives the id of the error state.\\
+\noindent\hspace*{24pt}\verb|nofinal | - Do not generate the integer variable that gives the id of the first final state.\\
+\noindent\hspace*{24pt}\verb|noprefix | - Do not prefix the variable names with the name of the machine.
+\vspace{12pt}
+
+\begin{figure}
+\small
+\begin{verbatim}
+#include <stdio.h>
+%% machine foo;
+%% write data;
+int main( int argc, char **argv )
+{
+ int cs, res = 0;
+ if ( argc > 1 ) {
+ char *p = argv[1];
+ %%{
+ main :=
+ [a-z]+
+ 0 @{ res = 1; fbreak; };
+ write init;
+ write exec noend;
+ }%%
+ }
+ printf("execute = %i\n", res );
+ return 0;
+}
+\end{verbatim}
+\verbspace
+\caption{Use of {\tt noend} write option and the {\tt fbreak} statement for
+processing a string.
+}
+\label{fbreak-example}
+\end{figure}
+
+\subsection{Write Start, First Final and Error}
+
+\begin{verbatim}
+write start;
+write first_final;
+write error;
+\end{verbatim}
+\verbspace
+
+These three write statements provide an alternative means of accessing the
+\verb|start|, \verb|first_final| and \verb|error| states. If there are many
+different machine specifications in one file it is easy to get the prefix for
+these wrong. This is especially true if the state machine boilerplate is
+frequently made by a copy-paste-edit process. These write statements allow the
+problem to be avoided. They can be used as follows:
+
+\begin{verbatim}
+/* Did parsing succeed? */
+if ( cs < %%{ write first_final; }%% ) {
+ result = ERR_PARSE_ERROR;
+ goto fail;
+}
+\end{verbatim}
+\verbspace
+
+\subsection{Write Init}
+\begin{verbatim}
+write init [options];
+\end{verbatim}
+\verbspace
+
+The write init statement causes Ragel to emit initialization code. This should
+be executed once before the machine is started. At a very minimum this sets the
+current state to the start state. If other variables are needed by the
+generated code, such as call stack variables or scanner management
+variables, they are also initialized here.
+
+The \verb|nocs| option to the write init statement will cause ragel to skip
+intialization of the cs variable. This is useful if the user wishes to use
+custom logic to decide which state the specification should start in.
+
+\subsection{Write Exec}
+\begin{verbatim}
+write exec [options];
+\end{verbatim}
+\verbspace
+
+The write exec statement causes Ragel to emit the state machine's execution code.
+Ragel expects several variables to be available to this code. At a very minimum, the
+generated code needs access to the current character position \verb|p|, the ending
+position \verb|pe| and the current state \verb|cs| (though \verb|pe|
+can be omitted using the \verb|noend| write option).
+The \verb|p| variable is the cursor that the execute code will
+used to traverse the input. The \verb|pe| variable should be set up to point to one
+position past the last valid character in the buffer.
+
+Other variables are needed when certain features are used. For example using
+the \verb|fcall| or \verb|fret| statements requires \verb|stack| and
+\verb|top| variables to be defined. If a longest-match construction is used,
+variables for managing backtracking are required.
+
+The write exec statement has one option. The \verb|noend| option tells Ragel
+to generate code that ignores the end position \verb|pe|. In this
+case the user must explicitly break out of the processing loop using
+\verb|fbreak|, otherwise the machine will continue to process characters until
+it moves into the error state. This option is useful if one wishes to process a
+null terminated string. Rather than traverse the string to discover then length
+before processing the input, the user can break out when the null character is
+seen. The example in Figure \ref{fbreak-example} shows the use of the
+\verb|noend| write option and the \verb|fbreak| statement for processing a string.
+
+\subsection{Write Exports}
+\label{export}
+
+\begin{verbatim}
+write exports;
+\end{verbatim}
+\verbspace
+
+The export feature can be used to export simple machine definitions. Machine definitions
+are marked for export using the \verb|export| keyword.
+
+\begin{verbatim}
+export machine_to_export = 0x44;
+\end{verbatim}
+\verbspace
+
+When the write exports statement is used these machines are
+written out in the generated code. Defines are used for C and constant integers
+are used for D, Java and Ruby. See Section \ref{import} for a description of the
+import statement.
+
+\section{Maintaining Pointers to Input Data}
+
+In the creation of any parser it is not uncommon to require the collection of
+the data being parsed. It is always possible to collect data into a growable
+buffer as the machine moves over it, however the copying of data is a somewhat
+wasteful use of processor cycles. The most efficient way to collect data from
+the parser is to set pointers into the input then later reference them. This
+poses a problem for uses of Ragel where the input data arrives in blocks, such
+as over a socket or from a file. If a pointer is set in one buffer block but
+must be used while parsing a following buffer block, some extra consideration
+to correctness must be made.
+
+The scanner constructions exhibit this problem, requiring the maintenance
+code described in Section \ref{generating-scanners}. If a longest-match
+construction has been used somewhere in the machine then it is possible to
+take advantage of the required prefix maintenance code in the driver program to
+ensure pointers to the input are always valid. If laying down a pointer one can
+set \verb|ts| at the same spot or ahead of it. When data is shifted in
+between loops the user must also shift the pointer. In this way it is possible
+to maintain pointers to the input that will always be consistent.
+
+\begin{figure}
+\small
+\begin{verbatim}
+ int have = 0;
+ while ( 1 ) {
+ char *p, *pe, *data = buf + have;
+ int len, space = BUFSIZE - have;
+
+ if ( space == 0 ) {
+ fprintf(stderr, "BUFFER OUT OF SPACE\n");
+ exit(1);
+ }
+
+ len = fread( data, 1, space, stdin );
+ if ( len == 0 )
+ break;
+
+ /* Find the last newline by searching backwards. */
+ p = buf;
+ pe = data + len - 1;
+ while ( *pe != '\n' && pe >= buf )
+ pe--;
+ pe += 1;
+
+ %% write exec;
+
+ /* How much is still in the buffer? */
+ have = data + len - pe;
+ if ( have > 0 )
+ memmove( buf, pe, have );
+
+ if ( len < space )
+ break;
+ }
+\end{verbatim}
+\verbspace
+\caption{An example of line-oriented processing.
+}
+\label{line-oriented}
+\end{figure}
+
+In general, there are two approaches for guaranteeing the consistency of
+pointers to input data. The first approach is the one just described;
+lay down a marker from an action,
+then later ensure that the data the marker points to is preserved ahead of
+the buffer on the next execute invocation. This approach is good because it
+allows the parser to decide on the pointer-use boundaries, which can be
+arbitrarily complex parsing conditions. A downside is that it requires any
+pointers that are set to be corrected in between execute invocations.
+
+The alternative is to find the pointer-use boundaries before invoking the execute
+routine, then pass in the data using these boundaries. For example, if the
+program must perform line-oriented processing, the user can scan backwards from
+the end of an input block that has just been read in and process only up to the
+first found newline. On the next input read, the new data is placed after the
+partially read line and processing continues from the beginning of the line.
+An example of line-oriented processing is given in Figure \ref{line-oriented}.
+
+\section{Specifying the Host Language}
+
+The \verb|ragel| program has a number of options for specifying the host
+language. The host-language options are:
+
+\begin{itemize}
+\item \verb|-C | for C/C++/Objective-C code (default)
+\item \verb|-D | for D code.
+\item \verb|-Z | for Go code.
+\item \verb|-J | for Java code.
+\item \verb|-R | for Ruby code.
+\item \verb|-A | for C\# code.
+\end{itemize}
+
+\section{Choosing a Generated Code Style}
+\label{genout}
+
+There are three styles of code output to choose from. Code style affects the
+size and speed of the compiled binary. Changing code style does not require any
+change to the Ragel program. There are two table-driven formats and a goto
+driven format.
+
+In addition to choosing a style to emit, there are various levels of action
+code reuse to choose from. The maximum reuse levels (\verb|-T0|, \verb|-F0|
+and \verb|-G0|) ensure that no FSM action code is ever duplicated by encoding
+each transition's action list as static data and iterating
+through the lists on every transition. This will normally result in a smaller
+binary. The less action reuse options (\verb|-T1|, \verb|-F1| and \verb|-G1|)
+will usually produce faster running code by expanding each transition's action
+list into a single block of code, eliminating the need to iterate through the
+lists. This duplicates action code instead of generating the logic necessary
+for reuse. Consequently the binary will be larger. However, this tradeoff applies to
+machines with moderate to dense action lists only. If a machine's transitions
+frequently have less than two actions then the less reuse options will actually
+produce both a smaller and a faster running binary due to less action sharing
+overhead. The best way to choose the appropriate code style for your
+application is to perform your own tests.
+
+The table-driven FSM represents the state machine as constant static data. There are
+tables of states, transitions, indices and actions. The current state is
+stored in a variable. The execution is simply a loop that looks up the current
+state, looks up the transition to take, executes any actions and moves to the
+target state. In general, the table-driven FSM can handle any machine, produces
+a smaller binary and requires a less expensive host language compile, but
+results in slower running code. Since the table-driven format is the most
+flexible it is the default code style.
+
+The flat table-driven machine is a table-based machine that is optimized for
+small alphabets. Where the regular table machine uses the current character as
+the key in a binary search for the transition to take, the flat table machine
+uses the current character as an index into an array of transitions. This is
+faster in general, however is only suitable if the span of possible characters
+is small.
+
+The goto-driven FSM represents the state machine using goto and switch
+statements. The execution is a flat code block where the transition to take is
+computed using switch statements and directly executable binary searches. In
+general, the goto FSM produces faster code but results in a larger binary and a
+more expensive host language compile.
+
+The goto-driven format has an additional action reuse level (\verb|-G2|) that
+writes actions directly into the state transitioning logic rather than putting
+all the actions together into a single switch. Generally this produces faster
+running code because it allows the machine to encode the current state using
+the processor's instruction pointer. Again, sparse machines may actually
+compile to smaller binaries when \verb|-G2| is used due to less state and
+action management overhead. For many parsing applications \verb|-G2| is the
+preferred output format.
+
+\begin{center}
+
+Code Output Style Options
+
+\begin{tabular}{|c|c|c|}
+\hline
+\verb|-T0|&binary search table-driven&C/D/Java/Ruby/C\#\\
+\hline
+\verb|-T1|&binary search, expanded actions&C/D/Ruby/C\#\\
+\hline
+\verb|-F0|&flat table-driven&C/D/Ruby/C\#\\
+\hline
+\verb|-F1|&flat table, expanded actions&C/D/Ruby/C\#\\
+\hline
+\verb|-G0|&goto-driven&C/D/C\#\\
+\hline
+\verb|-G1|&goto, expanded actions&C/D/C\#\\
+\hline
+\verb|-G2|&goto, in-place actions&C/D/Go\\
+\hline
+\end{tabular}
+\end{center}
+
+\chapter{Beyond the Basic Model}
+
+\section{Parser Modularization}
+\label{modularization}
+
+It is possible to use Ragel's machine construction and action embedding
+operators to specify an entire parser using a single regular expression. In
+many cases this is the desired way to specify a parser in Ragel. However, in
+some scenarios the language to parse may be so large that it is difficult to
+think about it as a single regular expression. It may also shift between distinct
+parsing strategies, in which case modularization into several coherent blocks
+of the language may be appropriate.
+
+It may also be the case that patterns that compile to a large number of states
+must be used in a number of different contexts and referencing them in each
+context results in a very large state machine. In this case, an ability to reuse
+parsers would reduce code size.
+
+To address this, distinct regular expressions may be instantiated and linked
+together by means of a jumping and calling mechanism. This mechanism is
+analogous to the jumping to and calling of processor instructions. A jump
+command, given in action code, causes control to be immediately passed to
+another portion of the machine by way of setting the current state variable. A
+call command causes the target state of the current transition to be pushed to
+a state stack before control is transferred. Later on, the original location
+may be returned to with a return statement. In the following example, distinct
+state machines are used to handle the parsing of two types of headers.
+
+% GENERATE: call
+% %%{
+% machine call;
+\begin{inline_code}
+\begin{verbatim}
+action return { fret; }
+action call_date { fcall date; }
+action call_name { fcall name; }
+
+# A parser for date strings.
+date := [0-9][0-9] '/'
+ [0-9][0-9] '/'
+ [0-9][0-9][0-9][0-9] '\n' @return;
+
+# A parser for name strings.
+name := ( [a-zA-Z]+ | ' ' )** '\n' @return;
+
+# The main parser.
+headers =
+ ( 'from' | 'to' ) ':' @call_name |
+ ( 'departed' | 'arrived' ) ':' @call_date;
+
+main := headers*;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% %% write data;
+% void f()
+% {
+% %% write init;
+% %% write exec;
+% }
+% END GENERATE
+
+Calling and jumping should be used carefully as they are operations that take
+one out of the domain of regular languages. A machine that contains a call or
+jump statement in one of its actions should be used as an argument to a machine
+construction operator only with considerable care. Since DFA transitions may
+actually represent several NFA transitions, a call or jump embedded in one
+machine can inadvertently terminate another machine that it shares prefixes
+with. Despite this danger, theses statements have proven useful for tying
+together sub-parsers of a language into a parser for the full language,
+especially for the purpose of modularizing code and reducing the number of
+states when the machine contains frequently recurring patterns.
+
+Section \ref{vals} describes the jump and call statements that are used to
+transfer control. These statements make use of two variables that must be
+declared by the user, \verb|stack| and \verb|top|. The \verb|stack| variable
+must be an array of integers and \verb|top| must be a single integer, which
+will point to the next available space in \verb|stack|. Sections \ref{prepush}
+and \ref{postpop} describe the Pre-Push and Post-Pop statements which can be
+used to implement a dynamically resizable array.
+
+\section{Referencing Names}
+\label{labels}
+
+This section describes how to reference names in epsilon transitions (Section
+\ref{state-charts}) and
+action-based control-flow statements such as \verb|fgoto|. There is a hierarchy
+of names implied in a Ragel specification. At the top level are the machine
+instantiations. Beneath the instantiations are labels and references to machine
+definitions. Beneath those are more labels and references to definitions, and
+so on.
+
+Any name reference may contain multiple components separated with the \verb|::|
+compound symbol. The search for the first component of a name reference is
+rooted at the join expression that the epsilon transition or action embedding
+is contained in. If the name reference is not contained in a join,
+the search is rooted at the machine definition that the epsilon transition or
+action embedding is contained in. Each component after the first is searched
+for beginning at the location in the name tree that the previous reference
+component refers to.
+
+In the case of action-based references, if the action is embedded more than
+once, the local search is performed for each embedding and the result is the
+union of all the searches. If no result is found for action-based references then
+the search is repeated at the root of the name tree. Any action-based name
+search may be forced into a strictly global search by prefixing the name
+reference with \verb|::|.
+
+The final component of the name reference must resolve to a unique entry point.
+If a name is unique in the entire name tree it can be referenced as is. If it
+is not unique it can be specified by qualifying it with names above it in the
+name tree. However, it can always be renamed.
+
+% FIXME: Should fit this in somewhere.
+% Some kinds of name references are illegal. Cannot call into longest-match
+% machine, can only call its start state. Cannot make a call to anywhere from
+% any part of a longest-match machine except a rule's action. This would result
+% in an eventual return to some point inside a longest-match other than the
+% start state. This is banned for the same reason a call into the LM machine is
+% banned.
+
+
+\section{Scanners}
+\label{generating-scanners}
+
+Scanners are very much intertwined with regular-languages and their
+corresponding processors. For this reason Ragel supports the definition of
+scanners. The generated code will repeatedly attempt to match patterns from a
+list, favouring longer patterns over shorter patterns. In the case of
+equal-length matches, the generated code will favour patterns that appear ahead
+of others. When a scanner makes a match it executes the user code associated
+with the match, consumes the input then resumes scanning.
+
+\begin{verbatim}
+<machine_name> := |*
+ pattern1 => action1;
+ pattern2 => action2;
+ ...
+ *|;
+\end{verbatim}
+\verbspace
+
+On the surface, Ragel scanners are similar to those defined by Lex. Though
+there is a key distinguishing feature: patterns may be arbitrary Ragel
+expressions and can therefore contain embedded code. With a Ragel-based scanner
+the user need not wait until the end of a pattern before user code can be
+executed.
+
+Scanners can be used to process sub-languages, as well as for tokenizing
+programming languages. In the following example a scanner is used to tokenize
+the contents of a header field.
+
+\begin{inline_code}
+\begin{verbatim}
+word = [a-z]+;
+head_name = 'Header';
+
+header := |*
+ word;
+ ' ';
+ '\n' => { fret; };
+*|;
+
+main := ( head_name ':' @{ fcall header; } )*;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+
+The scanner construction has a purpose similar to the longest-match kleene star
+operator \verb|**|. The key
+difference is that a scanner is able to backtrack to match a previously matched
+shorter string when the pursuit of a longer string fails. For this reason the
+scanner construction operator is not a pure state machine construction
+operator. It relies on several variables that enable it to backtrack and make
+pointers to the matched input text available to the user. For this reason
+scanners must be immediately instantiated. They cannot be defined inline or
+referenced by another expression. Scanners must be jumped to or called.
+
+Scanners rely on the \verb|ts|, \verb|te| and \verb|act|
+variables to be present so that they can backtrack and make pointers to the
+matched text available to the user. If input is processed using multiple calls
+to the execute code then the user must ensure that when a token is only
+partially matched that the prefix is preserved on the subsequent invocation of
+the execute code.
+
+The \verb|ts| variable must be defined as a pointer to the input data.
+It is used for recording where the current token match begins. This variable
+may be used in action code for retrieving the text of the current match. Ragel
+ensures that in between tokens and outside of the longest-match machines that
+this pointer is set to null. In between calls to the execute code the user must
+check if \verb|ts| is set and if so, ensure that the data it points to is
+preserved ahead of the next buffer block. This is described in more detail
+below.
+
+The \verb|te| variable must also be defined as a pointer to the input data.
+It is used for recording where a match ends and where scanning of the next
+token should begin. This can also be used in action code for retrieving the
+text of the current match.
+
+The \verb|act| variable must be defined as an integer type. It is used for
+recording the identity of the last pattern matched when the scanner must go
+past a matched pattern in an attempt to make a longer match. If the longer
+match fails it may need to consult the \verb|act| variable. In some cases, use
+of the \verb|act|
+variable can be avoided because the value of the current state is enough
+information to determine which token to accept, however in other cases this is
+not enough and so the \verb|act| variable is used.
+
+When the longest-match operator is in use, the user's driver code must take on
+some buffer management functions. The following algorithm gives an overview of
+the steps that should be taken to properly use the longest-match operator.
+
+\begin{itemize}
+\item Read a block of input data.
+\item Run the execute code.
+\item If \verb|ts| is set, the execute code will expect the incomplete
+token to be preserved ahead of the buffer on the next invocation of the execute
+code.
+\begin{itemize}
+\item Shift the data beginning at \verb|ts| and ending at \verb|pe| to the
+beginning of the input buffer.
+\item Reset \verb|ts| to the beginning of the buffer.
+\item Shift \verb|te| by the distance from the old value of \verb|ts|
+to the new value. The \verb|te| variable may or may not be valid. There is
+no way to know if it holds a meaningful value because it is not kept at null
+when it is not in use. It can be shifted regardless.
+\end{itemize}
+\item Read another block of data into the buffer, immediately following any
+preserved data.
+\item Run the scanner on the new data.
+\end{itemize}
+
+Figure \ref{preserve_example} shows the required handling of an input stream in
+which a token is broken by the input block boundaries. After processing up to
+and including the ``t'' of ``characters'', the prefix of the string token must be
+retained and processing should resume at the ``e'' on the next iteration of
+the execute code.
+
+If one uses a large input buffer for collecting input then the number of times
+the shifting must be done will be small. Furthermore, if one takes care not to
+define tokens that are allowed to be very long and instead processes these
+items using pure state machines or sub-scanners, then only a small amount of
+data will ever need to be shifted.
+
+\begin{figure}
+\small
+\begin{verbatim}
+ a) A stream "of characters" to be scanned.
+ | | |
+ p ts pe
+
+ b) "of characters" to be scanned.
+ | | |
+ ts p pe
+\end{verbatim}
+\verbspace
+\caption{Following an invocation of the execute code there may be a partially
+matched token (a). The data of the partially matched token
+must be preserved ahead of the new data on the next invocation (b).
+}
+\label{preserve_example}
+\end{figure}
+
+Since scanners attempt to make the longest possible match of input, patterns
+such as identifiers require one character of lookahead in order to trigger a
+match. In the case of the last token in the input stream the user must ensure
+that the \verb|eof| variable is set so that the final token is flushed out.
+
+An example scanner processing loop is given in Figure \ref{scanner-loop}.
+
+\begin{figure}
+\small
+\begin{verbatim}
+ int have = 0;
+ bool done = false;
+ while ( !done ) {
+ /* How much space is in the buffer? */
+ int space = BUFSIZE - have;
+ if ( space == 0 ) {
+ /* Buffer is full. */
+ cerr << "TOKEN TOO BIG" << endl;
+ exit(1);
+ }
+
+ /* Read in a block after any data we already have. */
+ char *p = inbuf + have;
+ cin.read( p, space );
+ int len = cin.gcount();
+
+ char *pe = p + len;
+ char *eof = 0;
+
+ /* If no data was read indicate EOF. */
+ if ( len == 0 ) {
+ eof = pe;
+ done = true;
+ }
+
+ %% write exec;
+
+ if ( cs == Scanner_error ) {
+ /* Machine failed before finding a token. */
+ cerr << "PARSE ERROR" << endl;
+ exit(1);
+ }
+
+ if ( ts == 0 )
+ have = 0;
+ else {
+ /* There is a prefix to preserve, shift it over. */
+ have = pe - ts;
+ memmove( inbuf, ts, have );
+ te = inbuf + (te-ts);
+ ts = inbuf;
+ }
+ }
+\end{verbatim}
+\verbspace
+\caption{A processing loop for a scanner.
+}
+\label{scanner-loop}
+\end{figure}
+
+\section{State Charts}
+\label{state-charts}
+
+In addition to supporting the construction of state machines using regular
+languages, Ragel provides a way to manually specify state machines using
+state charts. The comma operator combines machines together without any
+implied transitions. The user can then manually link machines by specifying
+epsilon transitions with the \verb|->| operator. Epsilon transitions are drawn
+between the final states of a machine and entry points defined by labels. This
+makes it possible to build machines using the explicit state-chart method while
+making minimal changes to the Ragel language.
+
+An interesting feature of Ragel's state chart construction method is that it
+can be mixed freely with regular expression constructions. A state chart may be
+referenced from within a regular expression, or a regular expression may be
+used in the definition of a state chart transition.
+
+\subsection{Join}
+
+\verb|expr , expr , ...|
+
+Join a list of machines together without
+drawing any transitions, without setting up a start state, and without
+designating any final states. Transitions between the machines may be specified
+using labels and epsilon transitions. The start state must be explicity
+specified with the ``start'' label. Final states may be specified with an
+epsilon transition to the implicitly created ``final'' state. The join
+operation allows one to build machines using a state chart model.
+
+\subsection{Label}
+
+\verb|label: expr|
+
+Attaches a label to an expression. Labels can be
+used as the target of epsilon transitions and explicit control transfer
+statements such as \verb|fgoto| and \verb|fnext| in action
+code.
+
+\subsection{Epsilon}
+
+\verb|expr -> label|
+
+Draws an epsilon transition to the state defined
+by \verb|label|. Epsilon transitions are made deterministic when join
+operators are evaluated. Epsilon transitions that are not in a join operation
+are made deterministic when the machine definition that contains the epsilon is
+complete. See Section \ref{labels} for information on referencing labels.
+
+\subsection{Simplifying State Charts}
+
+There are two benefits to providing state charts in Ragel. The first is that it
+allows us to take a state chart with a full listing of states and transitions
+and simplify it in selective places using regular expressions.
+
+The state chart method of specifying parsers is very common. It is an
+effective programming technique for producing robust code. The key disadvantage
+becomes clear when one attempts to comprehend a large parser specified in this
+way. These programs usually require many lines, causing logic to be spread out
+over large distances in the source file. Remembering the function of a large
+number of states can be difficult and organizing the parser in a sensible way
+requires discipline because branches and repetition present many file layout
+options. This kind of programming takes a specification with inherent
+structure such as looping, alternation and concatenation and expresses it in a
+flat form.
+
+If we could take an isolated component of a manually programmed state chart,
+that is, a subset of states that has only one entry point, and implement it
+using regular language operators then we could eliminate all the explicit
+naming of the states contained in it. By eliminating explicitly named states
+and replacing them with higher-level specifications we simplify a state machine
+specification.
+
+For example, sometimes chains of states are needed, with only a small number of
+possible characters appearing along the chain. These can easily be replaced
+with a concatenation of characters. Sometimes a group of common states
+implement a loop back to another single portion of the machine. Rather than
+manually duplicate all the transitions that loop back, we may be able to
+express the loop using a kleene star operator.
+
+Ragel allows one to take this state map simplification approach. We can build
+state machines using a state map model and implement portions of the state map
+using regular languages. In place of any transition in the state machine,
+entire sub-machines can be given. These can encapsulate functionality
+defined elsewhere. An important aspect of the Ragel approach is that when we
+wrap up a collection of states using a regular expression we do not lose
+access to the states and transitions. We can still execute code on the
+transitions that we have encapsulated.
+
+\subsection{Dropping Down One Level of Abstraction}
+\label{down}
+
+The second benefit of incorporating state charts into Ragel is that it permits
+us to bypass the regular language abstraction if we need to. Ragel's action
+embedding operators are sometimes insufficient for expressing certain parsing
+tasks. In the same way that is useful for C language programmers to drop down
+to assembly language programming using embedded assembler, it is sometimes
+useful for the Ragel programmer to drop down to programming with state charts.
+
+In the following example, we wish to buffer the characters of an XML CDATA
+sequence. The sequence is terminated by the string \verb|]]>|. The challenge
+in our application is that we do not wish the terminating characters to be
+buffered. An expression of the form \verb|any* @buffer :>> ']]>'| will not work
+because the buffer will always contain the characters \verb|]]| on the end.
+Instead, what we need is to delay the buffering of \verb|]|
+characters until a time when we
+abandon the terminating sequence and go back into the main loop. There is no
+easy way to express this using Ragel's regular expression and action embedding
+operators, and so an ability to drop down to the state chart method is useful.
+
+% GENERATE: dropdown
+% OPT: -p
+% %%{
+% machine dropdown;
+\begin{inline_code}
+\begin{verbatim}
+action bchar { buff( fpc ); } # Buffer the current character.
+action bbrack1 { buff( "]" ); }
+action bbrack2 { buff( "]]" ); }
+
+CDATA_body =
+start: (
+ ']' -> one |
+ (any-']') @bchar ->start
+),
+one: (
+ ']' -> two |
+ [^\]] @bbrack1 @bchar ->start
+),
+two: (
+ '>' -> final |
+ ']' @bbrack1 -> two |
+ [^>\]] @bbrack2 @bchar ->start
+);
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% main := CDATA_body;
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{dropdown}
+\end{center}
+\graphspace
+
+
+\section{Semantic Conditions}
+\label{semantic}
+
+Many communication protocols contain variable-length fields, where the length
+of the field is given ahead of the field as a value. This
+problem cannot be expressed using regular languages because of its
+context-dependent nature. The prevalence of variable-length fields in
+communication protocols motivated us to introduce semantic conditions into
+the Ragel language.
+
+A semantic condition is a block of user code that is interpreted as an
+expression and evaluated immediately
+before a transition is taken. If the code returns a value of true, the
+transition may be taken. We can now embed code that extracts the length of a
+field, then proceed to match $n$ data values.
+
+% GENERATE: conds1
+% OPT: -p
+% %%{
+% machine conds1;
+% number = digit+;
+\begin{inline_code}
+\begin{verbatim}
+action rec_num { i = 0; n = getnumber(); }
+action test_len { i++ < n }
+data_fields = (
+ 'd'
+ [0-9]+ %rec_num
+ ':'
+ ( [a-z] when test_len )*
+)**;
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% main := data_fields;
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{conds1}
+\end{center}
+\graphspace
+
+The Ragel implementation of semantic conditions does not force us to give up the
+compositional property of Ragel definitions. For example, a machine that tests
+the length of a field using conditions can be unioned with another machine
+that accepts some of the same strings, without the two machines interfering with
+one another. The user need not be concerned about whether or not the result of the
+semantic condition will affect the matching of the second machine.
+
+To see this, first consider that when a user associates a condition with an
+existing transition, the transition's label is translated from the base character
+to its corresponding value in the space that represents ``condition $c$ true''. Should
+the determinization process combine a state that has a conditional transition
+with another state that has a transition on the same input character but
+without a condition, then the condition-less transition first has its label
+translated into two values, one to its corresponding value in the space that
+represents ``condition $c$ true'' and another to its corresponding value in the
+space that represents ``condition $c$ false''. It
+is then safe to combine the two transitions. This is shown in the following
+example. Two intersecting patterns are unioned, one with a condition and one
+without. The condition embedded in the first pattern does not affect the second
+pattern.
+
+% GENERATE: conds2
+% OPT: -p
+% %%{
+% machine conds2;
+% number = digit+;
+\begin{inline_code}
+\begin{verbatim}
+action test_len { i++ < n }
+action one { /* accept pattern one */ }
+action two { /* accept pattern two */ }
+patterns =
+ ( [a-z] when test_len )+ %one |
+ [a-z][a-z0-9]* %two;
+main := patterns '\n';
+\end{verbatim}
+\end{inline_code}
+\verbspace
+% }%%
+% END GENERATE
+
+\graphspace
+\begin{center}
+\includegraphics[scale=0.55]{conds2}
+\end{center}
+\graphspace
+
+There are many more potential uses for semantic conditions. The user is free to
+use arbitrary code and may therefore perform actions such as looking up names
+in dictionaries, validating input using external parsing mechanisms or
+performing checks on the semantic structure of input seen so far. In the next
+section we describe how Ragel accommodates several common parser engineering
+problems.
+
+The semantic condition feature works only with alphabet types that are smaller
+in width than the \verb|long| type. To implement semantic conditions Ragel
+needs to be able to allocate characters from the alphabet space. Ragel uses
+these allocated characters to express "character C with condition P true" or "C
+with P false." Since internally Ragel uses longs to store characters there is
+no room left in the alphabet space unless an alphabet type smaller than long is
+used.
+
+\section{Implementing Lookahead}
+
+There are a few strategies for implementing lookahead in Ragel programs.
+Leaving actions, which are described in Section \ref{out-actions}, can be
+used as a form of lookahead. Ragel also provides the \verb|fhold| directive
+which can be used in actions to prevent the machine from advancing over the
+current character. It is also possible to manually adjust the current character
+position by shifting it backwards using \verb|fexec|, however when this is
+done, care must be taken not to overstep the beginning of the current buffer
+block. In both the use of \verb|fhold| and \verb|fexec| the user must be
+cautious of combining the resulting machine with another in such a way that the
+transition on which the current position is adjusted is not combined with a
+transition from the other machine.
+
+\section{Parsing Recursive Language Structures}
+
+In general Ragel cannot handle recursive structures because the grammar is
+interpreted as a regular language. However, depending on what needs to be
+parsed it is sometimes practical to implement the recursive parts using manual
+coding techniques. This often works in cases where the recursive structures are
+simple and easy to recognize, such as in the balancing of parentheses
+
+One approach to parsing recursive structures is to use actions that increment
+and decrement counters or otherwise recognize the entry to and exit from
+recursive structures and then jump to the appropriate machine defnition using
+\verb|fcall| and \verb|fret|. Alternatively, semantic conditions can be used to
+test counter variables.
+
+A more traditional approach is to call a separate parsing function (expressed
+in the host language) when a recursive structure is entered, then later return
+when the end is recognized.
+
+\end{document}
diff --git a/test/rhsref1.lm b/test/rhsref1.lm
new file mode 100644
index 0000000..c905d2a
--- /dev/null
+++ b/test/rhsref1.lm
@@ -0,0 +1,117 @@
+##### LM #####
+lex
+ literal `var `if `then `else `while `do `for `read `write
+ `end `to `goto
+ literal `:= `!= `; `+ `- `* `/ `= `( `) `:
+
+ ignore /'//' [^\n]* '\n'/
+ ignore /[\n\t ]+/
+ token id /[a-zA-Z_]+/
+ token integernumber /[0-9]+/
+ token stringlit /'"' [^"]* '"'/
+end
+
+def program
+ [statement*]
+
+def statement
+ [declaration]
+| [assignment_statement]
+| [if_statement]
+| [while_statement]
+| [do_statement]
+| [for_statement]
+| [read_statement]
+| [write_statement]
+| [labelled_statement]
+| [goto_statement]
+
+def declaration
+ [`var id `;]
+
+def assignment_statement
+ [id `:= expression `;]
+
+def if_statement
+ [`if expression `then statement* opt_else_statement `end]
+
+def opt_else_statement
+ [`else statement*]
+| []
+
+def while_statement
+ [`while expression `do statement* `end]
+
+def do_statement
+ [`do statement* `while expression `;]
+
+def for_statement
+ [`for id `:= expression `to expression `do statement* `end]
+
+def read_statement
+ [`read id `;]
+
+def write_statement
+ [`write expression `;]
+
+def expression
+ [Term: term]
+| [expression eqop Term: term]
+
+def eqop [`=] | [`!=]
+
+def term
+ [Factor: factor]
+| [term addop Factor: factor]
+
+def addop [`+] | [`-]
+
+def factor
+ [Primary: primary]
+| [factor mulop Primary: primary]
+
+def mulop [`*] | [`/]
+
+def primary
+ [id]
+| [lit]
+| [`( expression `)]
+
+def lit
+ [integernumber]
+| [stringlit]
+
+def labelled_statement
+ [id `: statement]
+
+def goto_statement
+ [`goto id `;]
+
+parse P: program[stdin]
+
+for E: expression in P {
+ print( ^(E.Term.Factor.Primary) '\n' )
+}
+
+##### IN #####
+
+var a;
+a := 1;
+
+head:
+
+a := a + 1;
+c := d;
+
+if a = 10 then
+ goto head;
+end
+
+hi := there;
+##### EXP #####
+1
+1
+d
+10
+a
+there
diff --git a/test/rubyhere.lm b/test/rubyhere.lm
new file mode 100644
index 0000000..836b18c
--- /dev/null
+++ b/test/rubyhere.lm
@@ -0,0 +1,123 @@
+##### LM #####
+context rubyhere
+ rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/
+ rl number_pattern /[0-9]+/
+
+ lex
+ ignore /[ \t\n]+/
+ token id /ident_pattern/
+ token number /number_pattern/
+ literal `<< `* `, `( `) `!
+ end
+
+ HereId: str
+
+ token rest_of_line /[^\n]*'\n'/
+
+ lex
+ ignore /[ \t\n]+/
+ token here_id
+ HereData: here_data
+ /ident_pattern/
+ {
+ # Take the text of the here_id from the input stream.
+ HereId = input.pull( match_length )
+
+ # Get the data up to the rest of the line.
+ parse_stop ROL: rest_of_line(ctx)[ input ]
+
+ # Parse the heredoc data.
+ parse_stop HereData: here_data(ctx)[ input ]
+
+ # Push the rest-of-line data back to the input stream.
+ input.push( $ROL )
+
+ # Send the here_id token. Attach the heredoc data as an attribute.
+ input.push( make_token( typeid<here_id> HereId HereData ) )
+ }
+ end
+
+ lex
+ token here_close_id
+ / ident_pattern '\n' /
+ {
+ if match_text == HereId + '\n' {
+ input.push( make_token(
+ typeid<here_close_id>
+ input.pull( match_length ) ) )
+ }
+ else
+ input.push( make_token( typeid<here_line> input.pull(match_length) ) )
+ }
+
+ token here_line
+ / [^\n]* '\n' /
+ end
+
+ def here_data
+ [here_line* here_close_id]
+
+ def heredoc
+ [`<< here_id]
+
+ def primary
+ [id]
+ | [number]
+ | [heredoc]
+
+ def arglist
+ [primary arglist_more*]
+
+ def arglist_more
+ [`, primary]
+
+ def call
+ [id `( arglist? `)]
+
+ def statement
+ [primary]
+ | [call]
+
+ token foobar /any+/
+
+ def item
+ [statement `!]
+ | [foobar]
+
+ def start
+ [item*]
+end # rubyhere
+
+cons RubyHere: rubyhere[]
+
+parse S: rubyhere::start(RubyHere)[ stdin ]
+
+print_xml(S)
+print('\n')
+##### IN #####
+print( <<DATA1, more, <<DATA2, 99 )
+"&^#(@ almost
+!arbitrary text!
+DATA1
+hello
+world
+DATA2
+!
+print( <<DATA1, more, <<DATA2, 99 )
+"&^#(@ almost
+!arbitrary text!
+DATA1
+hello
+world
+DATA2
+# error here
+##### EXP #####
+<rubyhere::start><rubyhere::_repeat_item><rubyhere::item><rubyhere::statement><rubyhere::call><rubyhere::id>print</rubyhere::id><rubyhere::_literal_000d>(</rubyhere::_literal_000d><rubyhere::_opt_arglist><rubyhere::arglist><rubyhere::primary><rubyhere::heredoc><rubyhere::_literal_0007>&lt;&lt;</rubyhere::_literal_0007><rubyhere::here_id>DATA1</rubyhere::here_id></rubyhere::heredoc></rubyhere::primary><rubyhere::_repeat_arglist_more><rubyhere::arglist_more><rubyhere::_literal_000b>,</rubyhere::_literal_000b><rubyhere::primary><rubyhere::id>more</rubyhere::id></rubyhere::primary></rubyhere::arglist_more><rubyhere::arglist_more><rubyhere::_literal_000b>,</rubyhere::_literal_000b><rubyhere::primary><rubyhere::heredoc><rubyhere::_literal_0007>&lt;&lt;</rubyhere::_literal_0007><rubyhere::here_id>DATA2</rubyhere::here_id></rubyhere::heredoc></rubyhere::primary></rubyhere::arglist_more><rubyhere::arglist_more><rubyhere::_literal_000b>,</rubyhere::_literal_000b><rubyhere::primary><rubyhere::number>99</rubyhere::number></rubyhere::primary></rubyhere::arglist_more></rubyhere::_repeat_arglist_more></rubyhere::arglist></rubyhere::_opt_arglist><rubyhere::_literal_000f>)</rubyhere::_literal_000f></rubyhere::call></rubyhere::statement><rubyhere::_literal_0011>!</rubyhere::_literal_0011></rubyhere::item><rubyhere::item><rubyhere::foobar>print( &lt;&lt;DATA1, more, &lt;&lt;DATA2, 99 )
+"&amp;^#(@ almost
+!arbitrary text!
+DATA1
+hello
+world
+DATA2
+# error here
+</rubyhere::foobar></rubyhere::item></rubyhere::_repeat_item></rubyhere::start>
diff --git a/test/runtests.sh b/test/runtests.sh
new file mode 100755
index 0000000..bed1401
--- /dev/null
+++ b/test/runtests.sh
@@ -0,0 +1,244 @@
+#!/bin/bash
+#
+
+# Test cases contain sections giving the program, input and expected output.
+
+###### LM #####
+#
+# colm program
+#
+###### ARGS #####
+#
+# program arguments
+#
+###### IN #####
+#
+# program input
+#
+###### EXP #####
+#
+# expected output
+#
+###### EXIT ######
+#
+# expected exit value
+#
+
+#######################################
+
+WORKING=working
+COLM=../src/colm
+ERRORS=0
+
+cd `dirname $0`
+test -d $WORKING || mkdir $WORKING
+
+function die()
+{
+ echo
+ echo "$@"
+ echo
+ exit 1
+}
+
+function sig_exit()
+{
+ echo
+ exit 1;
+}
+
+# Parse args.
+while getopts vdm opt; do
+ case $opt in
+ v)
+ verbose=true;
+ ;;
+ d)
+ diff=true;
+ ;;
+ m)
+ VALGRIND="valgrind --leak-check=full --show-reachable=yes "
+ ;;
+ esac
+done
+shift $(($OPTIND - 1))
+
+# The files to process. If none given then glob all functions and pcap test confs.
+if [ $# != 0 ]; then
+ TEST_PAT="$*"
+else
+ TEST_PAT='*.lm'
+fi
+
+function cat_section
+{
+ local section=$1
+ local nth=$2
+ local in=$3
+
+ # Print Nth instance of the section
+ awk -vsection=$section -vnth=$nth '
+ /#+ *[a-zA-Z]+ *#+/ {
+ gsub( "[ #\n]", "", $0 );
+ in_section = 0
+ if ( $0 == section ) {
+ if ( n == nth ) {
+ in_section = 1;
+ found = 1;
+ }
+ n += 1
+ }
+ next;
+ }
+
+ in_section {
+ print $0;
+ }
+
+ END {
+ exit( found ? 0 : 1 )
+ }
+ ' $in | awk '
+ /--noeol$/ {
+ gsub(/--noeol$/,"");
+ printf("%s", $0);
+ next;
+ }
+ { print $0 }
+ '
+ return ${PIPESTATUS[0]};
+}
+
+function section
+{
+ local section=$1
+ local nth=$2
+ local in=$3
+ local out=$4
+
+ cat_section $section $nth $in > $out
+
+ # Remove the file if no section was found
+ [ $? = 0 ] || rm $out
+}
+
+function runtests()
+{
+ for TST in $TEST_PAT; do
+ ROOT=${TST/.lm}
+ LM=$WORKING/$ROOT.lm
+ ARGS=$WORKING/$ROOT.args
+ IN=$WORKING/$ROOT.in
+ EXP=$WORKING/$ROOT.exp
+
+ section LM 0 $TST $LM
+
+ BIN=$WORKING/$ROOT
+ OUT=$WORKING/$ROOT.out
+ DIFF=$WORKING/$ROOT.diff
+ LOG=$WORKING/$ROOT.log
+
+ if [ '!' -f $LM ]; then
+ echo "ERROR: $TST cannot be run: no LM section"
+ ERRORS=$(( ERRORS + 1 ))
+ continue
+ fi
+
+ # Compilation.
+ $COLM $LM &> $LOG
+ if [ $? != 0 ]; then
+ echo "ERROR: $TST cannot be run: compilation error"
+ ERRORS=$(( ERRORS + 1 ))
+ continue
+ fi
+
+ Nth=0
+ while true; do
+ section EXP $Nth $TST $EXP
+
+ # Stop when we have no Nth expected output.
+ if [ '!' -f $EXP ]; then
+ break;
+ fi
+
+ section ARGS $Nth $TST $ARGS
+ section IN $Nth $TST $IN
+ EXIT=`cat_section EXIT $Nth $TST`
+ if [ -z "$EXIT" ]; then
+ EXIT=0
+ fi
+
+ cmdargs=""
+ if [ -f $ARGS ]; then
+ cmdargs=`cat $ARGS`
+ fi
+
+ echo -n "running test $TST ($Nth)... "
+
+ if [ "$verbose" = true ]; then
+ echo
+ echo $COLM $TST
+ fi
+
+ if [ '!' -f $IN ] && [ -f $ROOT.in ]; then
+ IN=$ROOT.in;
+ fi
+
+ if [ "$verbose" = true ]; then
+ if [ -f $IN ]; then
+ echo "${VALGRIND}./$BIN $cmdargs < $IN > $OUT 2>> $LOG"
+ else
+ echo "${VALGRIND}./$BIN $cmdargs > $OUT 2>>$LOG"
+ fi
+ fi
+
+ # Execution
+ if [ -f $IN ]; then
+ ${VALGRIND}./$BIN $cmdargs < $IN > $OUT 2>> $LOG
+ else
+ ${VALGRIND}./$BIN $cmdargs > $OUT 2>>$LOG
+ fi
+
+ e=$?
+ if [ $e != "$EXIT" ]; then
+ echo "FAILED: exit value error: got: $e expected: $EXIT"
+ ERRORS=$(( ERRORS + 1 ))
+ Nth=$((Nth + 1))
+ continue
+ fi
+
+
+ # Diff of output
+ diff -u $EXP $OUT > $DIFF
+ if [ $? != 0 ]; then
+ echo "FAILED: output differs from expected output"
+ ERRORS=$(( ERRORS + 1 ))
+ Nth=$((Nth + 1))
+ if [ "$diff" = true ]; then
+ echo
+ cat $DIFF
+ echo
+ fi
+ continue
+ fi
+
+ echo ok
+ Nth=$((Nth + 1))
+ done
+ done
+
+ if [ $ERRORS != 0 ]; then
+ [ $ERRORS != 1 ] && plural="s";
+ echo
+ echo "TESTING FAILED: $ERRORS failure$plural"
+ echo
+ EXIT=1
+ fi
+}
+
+[ -d $workingdir ] || mkdir $workingdir
+
+runtests;
+
+exit $EXIT;
+
diff --git a/test/scope1.lm b/test/scope1.lm
new file mode 100644
index 0000000..e0886d3
--- /dev/null
+++ b/test/scope1.lm
@@ -0,0 +1,36 @@
+##### LM #####
+int f()
+{
+ i: int = 0
+ j: int = 100
+
+ while i < 4 {
+ j: int = 200
+ if ( i < 1 ) {
+ j: int = 300
+ print( "i: [$i] j: [$j]\n" )
+ }
+ elsif ( i < 2 ) {
+ j: int = 300
+ print( "i: [$i] j: [$j]\n" )
+ }
+ elsif ( i < 3 ) {
+ print( "i: [$i] j: [$j]\n" )
+ }
+ else {
+ print( "i: [$i] j: [$j]\n" )
+ }
+
+ i = i + 1
+ }
+
+ print( "j: [$j]\n" )
+}
+
+f()
+##### EXP #####
+i: 0 j: 300
+i: 1 j: 300
+i: 2 j: 200
+i: 3 j: 200
+j: 100
diff --git a/test/sprintf.lm b/test/sprintf.lm
new file mode 100644
index 0000000..b2a65fa
--- /dev/null
+++ b/test/sprintf.lm
@@ -0,0 +1,4 @@
+##### LM #####
+print( sprintf( "%08x\n" (256 + 11 * 16) ) )
+##### EXP #####
+000001b0
diff --git a/test/string.lm b/test/string.lm
new file mode 100644
index 0000000..ea41cb2
--- /dev/null
+++ b/test/string.lm
@@ -0,0 +1,60 @@
+##### LM #####
+lex
+ token str_escape /'\\' any/
+ token str_chr /[^\\"]+/
+end
+
+def str_item
+ [str_escape]
+| [str_chr]
+
+def string
+ [`" str_item* `"]
+
+lex
+ token ident /[a-zA-Z_]+/
+ token number /[0-9]+/
+
+ literal `+ `* `; `" `' `( `)
+ literal `+= `-= `*=
+
+ ignore wp /[ \t\n]+/
+end
+
+def expr
+ [expr `+ term]
+| [term]
+
+def term
+ [term `* primary]
+| [primary]
+
+def primary
+ [number]
+| [ident]
+| [string]
+| [`( expr `)]
+
+def expr_list
+ [expr_list expr `;]
+| []
+
+def start
+ [expr_list]
+ {
+ if match lhs
+ ~a + "%{{"; 1 * 2;
+ {
+ print( 'yes\n' )
+ }
+ }
+
+parse S: start[stdin]
+print_xml( S )
+print( '\n' )
+##### IN #####
+a + "%{{"; 1 * 2;
+
+##### EXP #####
+yes
+<start><expr_list><expr_list><expr_list></expr_list><expr><expr><term><primary><ident>a</ident></primary></term></expr><_literal_0009>+</_literal_0009><term><primary><string><_literal_000f>"</_literal_000f><_repeat_str_item><str_item><str_chr>%{{</str_chr></str_item></_repeat_str_item><_literal_000f>"</_literal_000f></string></primary></term></expr><_literal_000d>;</_literal_000d></expr_list><expr><term><term><primary><number>1</number></primary></term><_literal_000b>*</_literal_000b><primary><number>2</number></primary></term></expr><_literal_000d>;</_literal_000d></expr_list></start>
diff --git a/test/superid.lm b/test/superid.lm
new file mode 100644
index 0000000..eb19020
--- /dev/null
+++ b/test/superid.lm
@@ -0,0 +1,76 @@
+##### LM #####
+context si
+ lex
+ literal `! `a
+
+ token SEMI_NL /';\n'/
+
+ token id /'a'|'b'/
+ {
+ input.push( make_token( trans_id_to input.pull(match_length) ) )
+ }
+
+ token super_id //
+ token foo //
+
+ ignore ws / [ \n\t]+ /
+ end
+
+ trans_id_to: int
+
+ def e1
+ []
+ {
+ print( 'old_id = ' trans_id_to '\n' )
+ trans_id_to = typeid<foo>
+ print( 'new_id = ' trans_id_to '\n' )
+ }
+
+ def item1
+ msg: str
+
+ [ e1 `! `a super_id super_id `a]
+ {
+ lhs.msg = 'this is item1\n'
+ }
+
+ def e2
+ []
+ {
+ print( 'old_id = ' trans_id_to '\n' )
+ trans_id_to = typeid<super_id>
+ print( 'new_id = ' trans_id_to '\n' )
+ }
+
+ def item2
+ msg: str
+
+ [ e2 `! `a super_id super_id `a]
+ {
+ lhs.msg = 'this is item2\n'
+ }
+
+
+ def start
+ [item1 SEMI_NL]
+ | [item2 SEMI_NL]
+ {
+ match lhs [Item2:item2 ';\n']
+ print( Item2.msg )
+ }
+end # si
+
+cons SuperId: si[]
+parse S: si::start(SuperId)[stdin]
+print_xml( S )
+print( '\n' )
+##### IN #####
+!a b b a;
+##### EXP #####
+old_id = NIL
+new_id = 13
+old_id = NIL
+new_id = 12
+this is item2
+<si::start><si::item2><si::e2></si::e2><si::_literal_0001>!</si::_literal_0001><si::_literal_0003>a</si::_literal_0003><si::super_id>b</si::super_id><si::super_id>b</si::super_id><si::_literal_0003>a</si::_literal_0003></si::item2><si::SEMI_NL>;
+</si::SEMI_NL></si::start>
diff --git a/test/tags1.lm b/test/tags1.lm
new file mode 100644
index 0000000..ef17c46
--- /dev/null
+++ b/test/tags1.lm
@@ -0,0 +1,93 @@
+##### LM #####
+context tags
+ # Open and close tags by rewriting to generic close tags. Won't work if
+ # interested in unclosed tags because a token can start as not close_id, but
+ # then become a close id during the course of parsing.
+
+ #
+ # Regular Definitions
+ #
+ rl rl_ws /[ \t\n\r\v]+/
+ rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
+
+ #
+ # Tokens
+ #
+
+ # Any single character can be a literal
+ lex
+ token BANG_NL /'!\n'/
+ token SEMI_NL /';\n'/
+
+ # Ignore whitespace.
+ ignore /rl_ws/
+
+ # Open and close id
+ token id /rl_id/
+ end
+
+ #
+ # Global Data
+ #
+
+ def tag_stack
+ [id tag_stack]
+ | []
+
+ TS: tag_stack
+
+ #
+ # Productions
+ #
+
+ def open_tag
+ [id]
+ {
+ match lhs [Id:id]
+ match TS [Top:id Rest:tag_stack]
+ if Id.data == Top.data {
+ reject
+ } else {
+ TS = construct tag_stack [Id TS]
+ }
+ }
+
+ def close_tag
+ [id]
+ {
+ match lhs [Id: id]
+ match TS [Top: id Rest: tag_stack]
+
+ if Id.data == Top.data
+ TS = construct tag_stack [Rest]
+ else
+ reject
+ }
+
+ def tag
+ [open_tag tag* close_tag]
+
+ def start
+ [tag* SEMI_NL]
+ {
+ print_xml( TS )
+ print_xml( lhs )
+ print( 'got structure\n' )
+ }
+
+ | [id* SEMI_NL]
+ {
+ print_xml( TS )
+ print_xml( lhs )
+ print( 'failed\n' )
+ }
+end # tags
+
+cons Tags: tags[]
+Tags.TS = cons tags::tag_stack ["sentinal"]
+parse tags::start(Tags)[stdin]
+##### IN #####
+y y a i i b c c m m n n b a;
+##### EXP #####
+<tags::tag_stack><tags::id>sentinal</tags::id><tags::tag_stack></tags::tag_stack></tags::tag_stack><tags::start><tags::_repeat_tag><tags::tag><tags::open_tag><tags::id>y</tags::id></tags::open_tag><tags::_repeat_tag></tags::_repeat_tag><tags::close_tag><tags::id>y</tags::id></tags::close_tag></tags::tag><tags::tag><tags::open_tag><tags::id>a</tags::id></tags::open_tag><tags::_repeat_tag><tags::tag><tags::open_tag><tags::id>i</tags::id></tags::open_tag><tags::_repeat_tag></tags::_repeat_tag><tags::close_tag><tags::id>i</tags::id></tags::close_tag></tags::tag><tags::tag><tags::open_tag><tags::id>b</tags::id></tags::open_tag><tags::_repeat_tag><tags::tag><tags::open_tag><tags::id>c</tags::id></tags::open_tag><tags::_repeat_tag></tags::_repeat_tag><tags::close_tag><tags::id>c</tags::id></tags::close_tag></tags::tag><tags::tag><tags::open_tag><tags::id>m</tags::id></tags::open_tag><tags::_repeat_tag></tags::_repeat_tag><tags::close_tag><tags::id>m</tags::id></tags::close_tag></tags::tag><tags::tag><tags::open_tag><tags::id>n</tags::id></tags::open_tag><tags::_repeat_tag></tags::_repeat_tag><tags::close_tag><tags::id>n</tags::id></tags::close_tag></tags::tag></tags::_repeat_tag><tags::close_tag><tags::id>b</tags::id></tags::close_tag></tags::tag></tags::_repeat_tag><tags::close_tag><tags::id>a</tags::id></tags::close_tag></tags::tag></tags::_repeat_tag><tags::SEMI_NL>;
+</tags::SEMI_NL></tags::start>got structure
diff --git a/test/tags2.lm b/test/tags2.lm
new file mode 100644
index 0000000..e83b113
--- /dev/null
+++ b/test/tags2.lm
@@ -0,0 +1,4183 @@
+##### LM #####
+#
+# Definitions
+#
+
+rl xml_digit / (0x30..0x39) /
+
+rl base_char / 0x41..0x5A | 0x61..0x7A /
+
+rl char / 0x9 | 0xA | 0xD | 0x20..0x7f /
+
+rl letter / base_char /
+
+rl name_char / letter | digit | '.' | '-' | '_' | ':' | 0xb7 /
+
+rl name / (letter | '_' | ':') name_char* /
+
+#
+# Reference definitions. These appear in the
+# top level and also in strings.
+#
+
+rl entity_ref_pat / '&' name ';' /
+
+rl char_ref_pat / '&#' [0-9]+ ';' | '&0x' [0-9a-fA-F]+ ';' /
+
+#
+# Single quotes.
+#
+lex
+ token sq_close /'\''/
+
+ # References in single quotes
+ token sq_entity_ref /entity_ref_pat/
+ token sq_char_ref /char_ref_pat/
+
+ token sq_data / [^<&']+ /
+
+ def sq_item
+ [ sq_data ]
+ | [ sq_entity_ref ]
+ | [ sq_char_ref ]
+
+ # The opening quote belongs to the tag region.
+ def sq_string
+ [ `' sq_item* sq_close ]
+end
+
+#
+# Double quotes.
+#
+lex
+ token dq_close /'"'/
+
+ # References in double quotes
+ token dq_entity_ref /entity_ref_pat/
+ token dq_char_ref /char_ref_pat/
+
+ token dq_data / [^<&"]+ /
+
+ def dq_item
+ [ dq_data ]
+ | [ dq_entity_ref ]
+ | [ dq_char_ref ]
+
+ # The opening quote belongs to the tag region.
+ def dq_string
+ [ `" dq_item* dq_close ]
+end
+
+#
+# Tag elements.
+#
+lex
+ literal `' `" `= `/
+
+ # Within this region whitespace is not significant.
+ ignore xml_space / (0x20 | 0x9 | 0xD | 0xA)+ /
+
+ #
+ # Attributes
+ #
+ token attr_name / name /
+end
+
+literal `>
+
+#
+# Top Level
+#
+lex
+ #
+ # Comments
+ #
+
+ # Cannot contain '--'
+ rl char_no_dash / char - '-' /
+ token comment / '<!--' ( char_no_dash | '-' char_no_dash )* '-->' /
+
+
+ # Opening a tag.
+ literal `<
+
+ #
+ # Character Data
+ #
+
+ token cdata / '<![CDATA[' char* :> ']]>'/
+ token char_data / [^<&]+ /
+ token entity_ref /entity_ref_pat/
+ token char_ref /char_ref_pat/
+end
+
+
+def attribute_value
+ [ sq_string ]
+| [ dq_string ]
+
+def attribute
+ [ attr_name `= attribute_value ]
+
+def empty_tag
+ [ `< attr_name attribute* `/ `> ]
+
+def close_tag
+ [ `< `/ attr_name `> ]
+
+def open_tag
+ [ `< attr_name attribute* `> ]
+
+def tag
+ [open_tag content close_tag]
+
+def content_item
+ [tag]
+| [empty_tag]
+| [char_data]
+| [entity_ref]
+| [char_ref]
+| [cdata]
+| [comment]
+
+def content
+ [content_item*]
+
+def document
+ [content]
+
+def start
+ [document]
+
+parse S: start[stdin]
+
+for Switch:tag in S {
+ if match Switch
+ ["<lm_switch>" SwitchContent:content "</lm_switch>"]
+ {
+ print( 'SWITCH\n' )
+ for Text:tag in SwitchContent {
+ if match Text
+ ["<text>" TextContent:content "</text>"]
+ {
+ print( ' ' TextContent '\n' )
+ }
+ }
+ }
+}
+##### IN #####
+<ragel version="5.24" filename="../colm/lmscan.rl" lang="C">
+<ragel_def name="rlscan">
+ <alphtype>char</alphtype>
+ <machine>
+ <action_list length="166">
+ <action id="0" name="inc_nl" line="217" col="16"><text>
+ lastnl = p;
+ column = 0;
+ line++;
+ </text></action>
+ <action id="1" name="initts" line="1" col="1"><init_tokstart></init_tokstart></action>
+ <action id="2" name="tokstart" line="1" col="1"><set_tokstart></set_tokstart></action>
+ <action id="3" name="tokend" line="1" col="1"><set_tokend>1</set_tokend></action>
+ <action id="4" name="last1" line="238" col="12"><set_tokend>1</set_tokend><sub_action><text> token( RE_Char, '\0' ); </text></sub_action></action>
+ <action id="5" name="last2" line="239" col="12"><set_tokend>1</set_tokend><sub_action><text> token( RE_Char, '\a' ); </text></sub_action></action>
+ <action id="6" name="last3" line="240" col="12"><set_tokend>1</set_tokend><sub_action><text> token( RE_Char, '\b' ); </text></sub_action></action>
+ <action id="7" name="last4" line="241" col="12"><set_tokend>1</set_tokend><sub_action><text> token( RE_Char, '\t' ); </text></sub_action></action>
+ <action id="8" name="last5" line="242" col="12"><set_tokend>1</set_tokend><sub_action><text> token( RE_Char, '\n' ); </text></sub_action></action>
+ <action id="9" name="last6" line="243" col="12"><set_tokend>1</set_tokend><sub_action><text> token( RE_Char, '\v' ); </text></sub_action></action>
+ <action id="10" name="last7" line="244" col="12"><set_tokend>1</set_tokend><sub_action><text> token( RE_Char, '\f' ); </text></sub_action></action>
+ <action id="11" name="last8" line="245" col="12"><set_tokend>1</set_tokend><sub_action><text> token( RE_Char, '\r' ); </text></sub_action></action>
+ <action id="12" name="last9" line="246" col="13"><set_tokend>1</set_tokend><sub_action><text> updateCol(); </text></sub_action></action>
+ <action id="13" name="last10" line="247" col="15"><set_tokend>1</set_tokend><sub_action><text> token( RE_Char, tokstart+1, tokend ); </text></sub_action></action>
+ <action id="14" name="last11" line="250" col="10"><set_tokend>1</set_tokend><sub_action><text> token( RE_Dash, 0, 0 ); </text></sub_action></action>
+ <action id="15" name="last12" line="253" col="10"><set_tokend>1</set_tokend><sub_action><text> token( RE_SqClose ); </text><ret></ret><text> </text></sub_action></action>
+ <action id="16" name="last13" line="255" col="10"><set_tokend>1</set_tokend><sub_action><text>
+ scan_error() &lt;&lt; "unterminated OR literal" &lt;&lt; endl;
+ </text></sub_action></action>
+ <action id="17" name="last14" line="260" col="12"><set_tokend>1</set_tokend><sub_action><text> token( RE_Char, tokstart, tokend ); </text></sub_action></action>
+ <action id="18" name="store15" line="265" col="13"><set_act>15</set_act></action>
+ <action id="19" name="store16" line="266" col="12"><set_act>16</set_act></action>
+ <action id="20" name="store17" line="267" col="12"><set_act>17</set_act></action>
+ <action id="21" name="store18" line="268" col="13"><set_act>18</set_act></action>
+ <action id="22" name="store19" line="269" col="11"><set_act>19</set_act></action>
+ <action id="23" name="store20" line="270" col="13"><set_act>20</set_act></action>
+ <action id="24" name="store21" line="273" col="12"><set_act>21</set_act></action>
+ <action id="25" name="last24" line="281" col="7"><set_tokend>1</set_tokend><sub_action><text> token( TK_Literal, tokstart, tokend ); </text></sub_action></action>
+ <action id="26" name="last26" line="284" col="11"><set_tokend>1</set_tokend><sub_action><text> token( RE_SqOpenNeg ); </text><call>166</call><text> </text></sub_action></action>
+ <action id="27" name="last27" line="286" col="10"><set_tokend>1</set_tokend><sub_action><text> token( '/'); </text><ret></ret><text> </text></sub_action></action>
+ <action id="28" name="last28" line="289" col="20"><set_tokend>1</set_tokend><sub_action><text> updateCol(); </text></sub_action></action>
+ <action id="29" name="last29" line="291" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_ColonEquals ); </text></sub_action></action>
+ <action id="30" name="last30" line="294" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_StartToState ); </text></sub_action></action>
+ <action id="31" name="last31" line="295" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_AllToState ); </text></sub_action></action>
+ <action id="32" name="last32" line="296" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_FinalToState ); </text></sub_action></action>
+ <action id="33" name="last33" line="297" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotStartToState ); </text></sub_action></action>
+ <action id="34" name="last34" line="298" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotFinalToState ); </text></sub_action></action>
+ <action id="35" name="last35" line="299" col="12"><set_tokend>1</set_tokend><sub_action><text> token( TK_MiddleToState ); </text></sub_action></action>
+ <action id="36" name="last36" line="302" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_StartFromState ); </text></sub_action></action>
+ <action id="37" name="last37" line="303" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_AllFromState ); </text></sub_action></action>
+ <action id="38" name="last38" line="304" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_FinalFromState ); </text></sub_action></action>
+ <action id="39" name="last39" line="305" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotStartFromState ); </text></sub_action></action>
+ <action id="40" name="last40" line="306" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotFinalFromState ); </text></sub_action></action>
+ <action id="41" name="last41" line="307" col="12"><set_tokend>1</set_tokend><sub_action><text> token( TK_MiddleFromState ); </text></sub_action></action>
+ <action id="42" name="last42" line="310" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_StartEOF ); </text></sub_action></action>
+ <action id="43" name="last43" line="311" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_AllEOF ); </text></sub_action></action>
+ <action id="44" name="last44" line="312" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_FinalEOF ); </text></sub_action></action>
+ <action id="45" name="last45" line="313" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotStartEOF ); </text></sub_action></action>
+ <action id="46" name="last46" line="314" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotFinalEOF ); </text></sub_action></action>
+ <action id="47" name="last47" line="315" col="12"><set_tokend>1</set_tokend><sub_action><text> token( TK_MiddleEOF ); </text></sub_action></action>
+ <action id="48" name="last48" line="318" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_StartGblError ); </text></sub_action></action>
+ <action id="49" name="last49" line="319" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_AllGblError ); </text></sub_action></action>
+ <action id="50" name="last50" line="320" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_FinalGblError ); </text></sub_action></action>
+ <action id="51" name="last51" line="321" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotStartGblError ); </text></sub_action></action>
+ <action id="52" name="last52" line="322" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotFinalGblError ); </text></sub_action></action>
+ <action id="53" name="last53" line="323" col="12"><set_tokend>1</set_tokend><sub_action><text> token( TK_MiddleGblError ); </text></sub_action></action>
+ <action id="54" name="last54" line="326" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_StartLocalError ); </text></sub_action></action>
+ <action id="55" name="last55" line="327" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_AllLocalError ); </text></sub_action></action>
+ <action id="56" name="last56" line="328" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_FinalLocalError ); </text></sub_action></action>
+ <action id="57" name="last57" line="329" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotStartLocalError ); </text></sub_action></action>
+ <action id="58" name="last58" line="330" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotFinalLocalError ); </text></sub_action></action>
+ <action id="59" name="last59" line="331" col="12"><set_tokend>1</set_tokend><sub_action><text> token( TK_MiddleLocalError ); </text></sub_action></action>
+ <action id="60" name="last61" line="337" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_StartCond ); </text></sub_action></action>
+ <action id="61" name="last62" line="338" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_AllCond ); </text></sub_action></action>
+ <action id="62" name="last63" line="339" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_LeavingCond ); </text></sub_action></action>
+ <action id="63" name="last64" line="341" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_DotDot ); </text></sub_action></action>
+ <action id="64" name="last65" line="342" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_StarStar ); </text></sub_action></action>
+ <action id="65" name="last66" line="343" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_DashDash ); </text></sub_action></action>
+ <action id="66" name="last67" line="344" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_Arrow ); </text></sub_action></action>
+ <action id="67" name="last69" line="347" col="12"><set_tokend>1</set_tokend><sub_action><text> token( TK_ColonGtGt ); </text></sub_action></action>
+ <action id="68" name="last70" line="348" col="12"><set_tokend>1</set_tokend><sub_action><text> token( TK_LtColon ); </text></sub_action></action>
+ <action id="69" name="last72" line="354" col="9"><set_tokend>1</set_tokend><sub_action><text> updateCol(); </text></sub_action></action>
+ <action id="70" name="last73" line="357" col="6"><set_tokend>1</set_tokend></action>
+ <action id="71" name="last74" line="359" col="10"><set_tokend>1</set_tokend><sub_action><text> token( *tokstart ); </text></sub_action></action>
+ <action id="72" name="next21" line="273" col="12"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( TK_Word, tokstart, tokend ); </text></sub_action></action>
+ <action id="73" name="next22" line="276" col="13"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( TK_UInt, tokstart, tokend ); </text></sub_action></action>
+ <action id="74" name="next23" line="277" col="17"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( TK_Hex, tokstart, tokend ); </text></sub_action></action>
+ <action id="75" name="next24" line="281" col="7"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( TK_Literal, tokstart, tokend ); </text></sub_action></action>
+ <action id="76" name="next25" line="283" col="10"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( RE_SqOpen ); </text><call>166</call><text> </text></sub_action></action>
+ <action id="77" name="next60" line="334" col="11"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( TK_Middle ); </text></sub_action></action>
+ <action id="78" name="next68" line="346" col="12"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( TK_ColonGt ); </text></sub_action></action>
+ <action id="79" name="next71" line="351" col="15"><set_tokend>0</set_tokend><hold></hold><sub_action><text> updateCol(); </text></sub_action></action>
+ <action id="80" name="next74" line="359" col="10"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( *tokstart ); </text></sub_action></action>
+ <action id="81" name="lag22" line="276" col="13"><exec><get_tokend></get_tokend></exec><sub_action><text> token( TK_UInt, tokstart, tokend ); </text></sub_action></action>
+ <action id="82" name="switch" line="1" col="1"><lm_switch>
+ <sub_action id="15"><exec><get_tokend></get_tokend></exec><text> token( KW_When ); </text></sub_action>
+ <sub_action id="16"><exec><get_tokend></get_tokend></exec><text> token( KW_Eof ); </text></sub_action>
+ <sub_action id="17"><exec><get_tokend></get_tokend></exec><text> token( KW_Err ); </text></sub_action>
+ <sub_action id="18"><exec><get_tokend></get_tokend></exec><text> token( KW_Lerr ); </text></sub_action>
+ <sub_action id="19"><exec><get_tokend></get_tokend></exec><text> token( KW_To ); </text></sub_action>
+ <sub_action id="20"><exec><get_tokend></get_tokend></exec><text> token( KW_From ); </text></sub_action>
+ <sub_action id="21"><exec><get_tokend></get_tokend></exec><text> token( TK_Word, tokstart, tokend ); </text></sub_action>
+ </lm_switch></action>
+ <action id="83" name="last75" line="363" col="12"><set_tokend>1</set_tokend><sub_action><text> litBuf.append( '\a' ); </text></sub_action></action>
+ <action id="84" name="last76" line="364" col="12"><set_tokend>1</set_tokend><sub_action><text> litBuf.append( '\b' ); </text></sub_action></action>
+ <action id="85" name="last77" line="365" col="12"><set_tokend>1</set_tokend><sub_action><text> litBuf.append( '\t' ); </text></sub_action></action>
+ <action id="86" name="last78" line="366" col="12"><set_tokend>1</set_tokend><sub_action><text> litBuf.append( '\n' ); </text></sub_action></action>
+ <action id="87" name="last79" line="367" col="12"><set_tokend>1</set_tokend><sub_action><text> litBuf.append( '\v' ); </text></sub_action></action>
+ <action id="88" name="last80" line="368" col="12"><set_tokend>1</set_tokend><sub_action><text> litBuf.append( '\f' ); </text></sub_action></action>
+ <action id="89" name="last81" line="369" col="12"><set_tokend>1</set_tokend><sub_action><text> litBuf.append( '\r' ); </text></sub_action></action>
+ <action id="90" name="last82" line="371" col="12"><set_tokend>1</set_tokend><sub_action><text>
+ litBuf.append( tokstart[1] );
+ </text></sub_action></action>
+ <action id="91" name="last83" line="374" col="10"><set_tokend>1</set_tokend><sub_action><text>
+ if ( litBuf.length &gt; 0 ) {
+ token( TK_LitPat, litBuf.data, litBuf.data+litBuf.length );
+ litBuf.clear();
+ }
+ token( '"' );
+ </text><ret></ret><text>
+ </text></sub_action></action>
+ <action id="92" name="last84" line="382" col="9"><set_tokend>1</set_tokend><sub_action><text>
+ if ( litBuf.length &gt; 0 ) {
+ litBuf.append( '\n' );
+ token( TK_LitPat, litBuf.data, litBuf.data+litBuf.length );
+ litBuf.clear();
+ }
+ token( '"' );
+ </text><ret></ret><text>
+ </text></sub_action></action>
+ <action id="93" name="last85" line="391" col="10"><set_tokend>1</set_tokend><sub_action><text>
+ if ( litBuf.length &gt; 0 ) {
+ token( TK_LitPat, litBuf.data, litBuf.data+litBuf.length );
+ litBuf.clear();
+ }
+ token( '[' );
+ </text><call>10</call><text>
+ </text></sub_action></action>
+ <action id="94" name="last86" line="399" col="10"><set_tokend>1</set_tokend><sub_action><text>
+ litBuf.append( *tokstart );
+ </text></sub_action></action>
+ <action id="95" name="store87" line="406" col="12"><set_act>87</set_act></action>
+ <action id="96" name="store88" line="407" col="15"><set_act>88</set_act></action>
+ <action id="97" name="store89" line="408" col="17"><set_act>89</set_act></action>
+ <action id="98" name="store90" line="409" col="15"><set_act>90</set_act></action>
+ <action id="99" name="store91" line="410" col="13"><set_act>91</set_act></action>
+ <action id="100" name="store92" line="411" col="14"><set_act>92</set_act></action>
+ <action id="101" name="store93" line="412" col="18"><set_act>93</set_act></action>
+ <action id="102" name="store94" line="413" col="14"><set_act>94</set_act></action>
+ <action id="103" name="store95" line="414" col="16"><set_act>95</set_act></action>
+ <action id="104" name="store96" line="415" col="16"><set_act>96</set_act></action>
+ <action id="105" name="store97" line="416" col="13"><set_act>97</set_act></action>
+ <action id="106" name="store98" line="417" col="15"><set_act>98</set_act></action>
+ <action id="107" name="store99" line="418" col="16"><set_act>99</set_act></action>
+ <action id="108" name="store101" line="420" col="14"><set_act>101</set_act></action>
+ <action id="109" name="store102" line="421" col="12"><set_act>102</set_act></action>
+ <action id="110" name="store103" line="422" col="12"><set_act>103</set_act></action>
+ <action id="111" name="store104" line="424" col="11"><set_act>104</set_act></action>
+ <action id="112" name="store105" line="425" col="12"><set_act>105</set_act></action>
+ <action id="113" name="store106" line="426" col="15"><set_act>106</set_act></action>
+ <action id="114" name="store107" line="427" col="12"><set_act>107</set_act></action>
+ <action id="115" name="store108" line="428" col="16"><set_act>108</set_act></action>
+ <action id="116" name="store109" line="429" col="18"><set_act>109</set_act></action>
+ <action id="117" name="store110" line="430" col="12"><set_act>110</set_act></action>
+ <action id="118" name="store112" line="432" col="16"><set_act>112</set_act></action>
+ <action id="119" name="store113" line="433" col="17"><set_act>113</set_act></action>
+ <action id="120" name="store114" line="434" col="11"><set_act>114</set_act></action>
+ <action id="121" name="store115" line="435" col="13"><set_act>115</set_act></action>
+ <action id="122" name="store116" line="436" col="15"><set_act>116</set_act></action>
+ <action id="123" name="store117" line="437" col="14"><set_act>117</set_act></action>
+ <action id="124" name="store118" line="438" col="13"><set_act>118</set_act></action>
+ <action id="125" name="store119" line="439" col="18"><set_act>119</set_act></action>
+ <action id="126" name="store120" line="440" col="13"><set_act>120</set_act></action>
+ <action id="127" name="store121" line="441" col="14"><set_act>121</set_act></action>
+ <action id="128" name="store122" line="442" col="12"><set_act>122</set_act></action>
+ <action id="129" name="store123" line="443" col="13"><set_act>123</set_act></action>
+ <action id="130" name="store124" line="444" col="13"><set_act>124</set_act></action>
+ <action id="131" name="store125" line="445" col="13"><set_act>125</set_act></action>
+ <action id="132" name="store126" line="446" col="18"><set_act>126</set_act></action>
+ <action id="133" name="store127" line="447" col="13"><set_act>127</set_act></action>
+ <action id="134" name="store128" line="448" col="11"><set_act>128</set_act></action>
+ <action id="135" name="store129" line="449" col="18"><set_act>129</set_act></action>
+ <action id="136" name="store130" line="450" col="16"><set_act>130</set_act></action>
+ <action id="137" name="store131" line="453" col="12"><set_act>131</set_act></action>
+ <action id="138" name="last133" line="457" col="10"><set_tokend>1</set_tokend><sub_action><text>
+ token( '/' );
+ </text><call>168</call><text>
+ </text></sub_action></action>
+ <action id="139" name="last134" line="462" col="20"><set_tokend>1</set_tokend><sub_action><text>
+ token( '"' );
+ token( TK_LitPat, tokstart+1, tokend );
+ token( '"' );
+ </text></sub_action></action>
+ <action id="140" name="last135" line="468" col="16"><set_tokend>1</set_tokend><sub_action><text>
+ token( TK_Literal, tokstart, tokend );
+ </text></sub_action></action>
+ <action id="141" name="last136" line="472" col="10"><set_tokend>1</set_tokend><sub_action><text>
+ token( '"' );
+ litBuf.clear();
+ </text><call>203</call><text>
+ </text></sub_action></action>
+ <action id="142" name="last137" line="477" col="10"><set_tokend>1</set_tokend><sub_action><text>
+ token( '[' );
+ </text><call>10</call><text>
+ </text></sub_action></action>
+ <action id="143" name="last138" line="482" col="10"><set_tokend>1</set_tokend><sub_action><text>
+ token( ']' );
+ if ( top &gt; 0 )
+ </text><ret></ret><text>
+ </text></sub_action></action>
+ <action id="144" name="last139" line="489" col="20"><set_tokend>1</set_tokend><sub_action><text> updateCol(); </text></sub_action></action>
+ <action id="145" name="last140" line="491" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_ColonEquals ); </text></sub_action></action>
+ <action id="146" name="last141" line="492" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_DoubleArrow ); </text></sub_action></action>
+ <action id="147" name="last142" line="493" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_DoubleEquals ); </text></sub_action></action>
+ <action id="148" name="last143" line="494" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_NotEquals ); </text></sub_action></action>
+ <action id="149" name="last144" line="495" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_DoubleColon ); </text></sub_action></action>
+ <action id="150" name="last145" line="496" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_LessEquals ); </text></sub_action></action>
+ <action id="151" name="last146" line="497" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_GreaterEquals ); </text></sub_action></action>
+ <action id="152" name="last147" line="498" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_LeftArrow ); </text></sub_action></action>
+ <action id="153" name="last148" line="499" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_AmpAmp ); </text></sub_action></action>
+ <action id="154" name="last149" line="500" col="11"><set_tokend>1</set_tokend><sub_action><text> token( TK_BarBar ); </text></sub_action></action>
+ <action id="155" name="last150" line="502" col="43"><set_tokend>1</set_tokend><sub_action><text> token( *tokstart ); </text></sub_action></action>
+ <action id="156" name="last152" line="509" col="9"><set_tokend>1</set_tokend><sub_action><text> updateCol(); </text></sub_action></action>
+ <action id="157" name="last153" line="512" col="6"><set_tokend>1</set_tokend></action>
+ <action id="158" name="last154" line="514" col="10"><set_tokend>1</set_tokend><sub_action><text> token( *tokstart ); </text></sub_action></action>
+ <action id="159" name="next100" line="419" col="12"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( KW_Pri ); </text></sub_action></action>
+ <action id="160" name="next111" line="431" col="14"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( KW_Print ); </text></sub_action></action>
+ <action id="161" name="next131" line="453" col="12"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( TK_Word, tokstart, tokend ); </text></sub_action></action>
+ <action id="162" name="next132" line="455" col="13"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( TK_Number, tokstart, tokend ); </text></sub_action></action>
+ <action id="163" name="next151" line="506" col="15"><set_tokend>0</set_tokend><hold></hold><sub_action><text> updateCol(); </text></sub_action></action>
+ <action id="164" name="next154" line="514" col="10"><set_tokend>0</set_tokend><hold></hold><sub_action><text> token( *tokstart ); </text></sub_action></action>
+ <action id="165" name="switch" line="1" col="1"><lm_switch>
+ <sub_action id="87"><exec><get_tokend></get_tokend></exec><text> token( KW_Lex ); </text></sub_action>
+ <sub_action id="88"><exec><get_tokend></get_tokend></exec><text> token( KW_Action ); </text></sub_action>
+ <sub_action id="89"><exec><get_tokend></get_tokend></exec><text> token( KW_AlphType ); </text></sub_action>
+ <sub_action id="90"><exec><get_tokend></get_tokend></exec><text> token( KW_Commit ); </text></sub_action>
+ <sub_action id="91"><exec><get_tokend></get_tokend></exec><text> token( KW_Undo ); </text></sub_action>
+ <sub_action id="92"><exec><get_tokend></get_tokend></exec><text> token( KW_Final ); </text></sub_action>
+ <sub_action id="93"><exec><get_tokend></get_tokend></exec><text> token( KW_Translate ); </text></sub_action>
+ <sub_action id="94"><exec><get_tokend></get_tokend></exec><text> token( KW_Token ); </text></sub_action>
+ <sub_action id="95"><exec><get_tokend></get_tokend></exec><text> token( KW_Literal ); </text></sub_action>
+ <sub_action id="96"><exec><get_tokend></get_tokend></exec><text> token( KW_NonTerm ); </text></sub_action>
+ <sub_action id="97"><exec><get_tokend></get_tokend></exec><text> token( KW_Uses ); </text></sub_action>
+ <sub_action id="98"><exec><get_tokend></get_tokend></exec><text> token( KW_Parser ); </text></sub_action>
+ <sub_action id="99"><exec><get_tokend></get_tokend></exec><text> token( KW_Include ); </text></sub_action>
+ <sub_action id="101"><exec><get_tokend></get_tokend></exec><text> token( KW_Write ); </text></sub_action>
+ <sub_action id="102"><exec><get_tokend></get_tokend></exec><text> token( KW_Nfa ); </text></sub_action>
+ <sub_action id="103"><exec><get_tokend></get_tokend></exec><text> token( KW_Pda ); </text></sub_action>
+ <sub_action id="104"><exec><get_tokend></get_tokend></exec><text> token( KW_Rl ); </text></sub_action>
+ <sub_action id="105"><exec><get_tokend></get_tokend></exec><text> token( KW_Cfl ); </text></sub_action>
+ <sub_action id="106"><exec><get_tokend></get_tokend></exec><text> token( KW_Ignore ); </text></sub_action>
+ <sub_action id="107"><exec><get_tokend></get_tokend></exec><text> token( KW_End ); </text></sub_action>
+ <sub_action id="108"><exec><get_tokend></get_tokend></exec><text> token( KW_Pattern ); </text></sub_action>
+ <sub_action id="109"><exec><get_tokend></get_tokend></exec><text> token( KW_Construct ); </text></sub_action>
+ <sub_action id="110"><exec><get_tokend></get_tokend></exec><text> token( KW_Red ); </text></sub_action>
+ <sub_action id="112"><exec><get_tokend></get_tokend></exec><text> token( KW_TypeId ); </text></sub_action>
+ <sub_action id="113"><exec><get_tokend></get_tokend></exec><text> token( KW_TypeDef ); </text></sub_action>
+ <sub_action id="114"><exec><get_tokend></get_tokend></exec><text> token( KW_If ); </text></sub_action>
+ <sub_action id="115"><exec><get_tokend></get_tokend></exec><text> token( KW_Init ); </text></sub_action>
+ <sub_action id="116"><exec><get_tokend></get_tokend></exec><text> token( KW_Reject ); </text></sub_action>
+ <sub_action id="117"><exec><get_tokend></get_tokend></exec><text> token( KW_While ); </text></sub_action>
+ <sub_action id="118"><exec><get_tokend></get_tokend></exec><text> token( KW_Else ); </text></sub_action>
+ <sub_action id="119"><exec><get_tokend></get_tokend></exec><text> token( KW_SubParser ); </text></sub_action>
+ <sub_action id="120"><exec><get_tokend></get_tokend></exec><text> token( KW_Next ); </text></sub_action>
+ <sub_action id="121"><exec><get_tokend></get_tokend></exec><text> token( KW_Match ); </text></sub_action>
+ <sub_action id="122"><exec><get_tokend></get_tokend></exec><text> token( KW_For ); </text></sub_action>
+ <sub_action id="123"><exec><get_tokend></get_tokend></exec><text> token( KW_Iter ); </text></sub_action>
+ <sub_action id="124"><exec><get_tokend></get_tokend></exec><text> token( KW_Find ); </text></sub_action>
+ <sub_action id="125"><exec><get_tokend></get_tokend></exec><text> token( KW_Root ); </text></sub_action>
+ <sub_action id="126"><exec><get_tokend></get_tokend></exec><text> token( KW_PrintXML ); </text></sub_action>
+ <sub_action id="127"><exec><get_tokend></get_tokend></exec><text> token( KW_Then ); </text></sub_action>
+ <sub_action id="128"><exec><get_tokend></get_tokend></exec><text> token( KW_Do ); </text></sub_action>
+ <sub_action id="129"><exec><get_tokend></get_tokend></exec><text> token( KW_Namespace ); </text></sub_action>
+ <sub_action id="130"><exec><get_tokend></get_tokend></exec><text> token( KW_Scanner ); </text></sub_action>
+ <sub_action id="131"><exec><get_tokend></get_tokend></exec><text> token( TK_Word, tokstart, tokend ); </text></sub_action>
+ </lm_switch></action>
+ </action_list>
+ <action_table_list length="166">
+ <action_table id="0" length="2">0 144</action_table>
+ <action_table id="1" length="1">0</action_table>
+ <action_table id="2" length="1">140</action_table>
+ <action_table id="3" length="2">0 139</action_table>
+ <action_table id="4" length="2">0 28</action_table>
+ <action_table id="5" length="1">81</action_table>
+ <action_table id="6" length="1">1</action_table>
+ <action_table id="7" length="1">2</action_table>
+ <action_table id="8" length="1">158</action_table>
+ <action_table id="9" length="1">157</action_table>
+ <action_table id="10" length="2">0 156</action_table>
+ <action_table id="11" length="1">141</action_table>
+ <action_table id="12" length="1">3</action_table>
+ <action_table id="13" length="1">155</action_table>
+ <action_table id="14" length="1">138</action_table>
+ <action_table id="15" length="2">3 137</action_table>
+ <action_table id="16" length="1">142</action_table>
+ <action_table id="17" length="1">143</action_table>
+ <action_table id="18" length="1">163</action_table>
+ <action_table id="19" length="1">164</action_table>
+ <action_table id="20" length="1">148</action_table>
+ <action_table id="21" length="1">153</action_table>
+ <action_table id="22" length="1">162</action_table>
+ <action_table id="23" length="1">149</action_table>
+ <action_table id="24" length="1">145</action_table>
+ <action_table id="25" length="1">152</action_table>
+ <action_table id="26" length="1">150</action_table>
+ <action_table id="27" length="1">147</action_table>
+ <action_table id="28" length="1">146</action_table>
+ <action_table id="29" length="1">151</action_table>
+ <action_table id="30" length="1">165</action_table>
+ <action_table id="31" length="1">161</action_table>
+ <action_table id="32" length="2">3 96</action_table>
+ <action_table id="33" length="2">3 97</action_table>
+ <action_table id="34" length="2">3 112</action_table>
+ <action_table id="35" length="2">3 98</action_table>
+ <action_table id="36" length="2">3 116</action_table>
+ <action_table id="37" length="2">3 134</action_table>
+ <action_table id="38" length="2">3 124</action_table>
+ <action_table id="39" length="2">3 114</action_table>
+ <action_table id="40" length="2">3 130</action_table>
+ <action_table id="41" length="2">3 100</action_table>
+ <action_table id="42" length="2">3 128</action_table>
+ <action_table id="43" length="2">3 120</action_table>
+ <action_table id="44" length="2">3 113</action_table>
+ <action_table id="45" length="2">3 107</action_table>
+ <action_table id="46" length="2">3 121</action_table>
+ <action_table id="47" length="2">3 129</action_table>
+ <action_table id="48" length="2">3 95</action_table>
+ <action_table id="49" length="2">3 103</action_table>
+ <action_table id="50" length="2">3 127</action_table>
+ <action_table id="51" length="2">3 135</action_table>
+ <action_table id="52" length="2">3 126</action_table>
+ <action_table id="53" length="2">3 109</action_table>
+ <action_table id="54" length="2">3 104</action_table>
+ <action_table id="55" length="2">3 106</action_table>
+ <action_table id="56" length="2">3 115</action_table>
+ <action_table id="57" length="2">3 110</action_table>
+ <action_table id="58" length="1">159</action_table>
+ <action_table id="59" length="1">160</action_table>
+ <action_table id="60" length="2">3 132</action_table>
+ <action_table id="61" length="2">3 111</action_table>
+ <action_table id="62" length="2">3 117</action_table>
+ <action_table id="63" length="2">3 122</action_table>
+ <action_table id="64" length="2">3 131</action_table>
+ <action_table id="65" length="2">3 136</action_table>
+ <action_table id="66" length="2">3 125</action_table>
+ <action_table id="67" length="2">3 133</action_table>
+ <action_table id="68" length="2">3 102</action_table>
+ <action_table id="69" length="2">3 101</action_table>
+ <action_table id="70" length="2">3 119</action_table>
+ <action_table id="71" length="2">3 118</action_table>
+ <action_table id="72" length="2">3 99</action_table>
+ <action_table id="73" length="2">3 105</action_table>
+ <action_table id="74" length="2">3 123</action_table>
+ <action_table id="75" length="2">3 108</action_table>
+ <action_table id="76" length="1">154</action_table>
+ <action_table id="77" length="1">17</action_table>
+ <action_table id="78" length="1">16</action_table>
+ <action_table id="79" length="1">14</action_table>
+ <action_table id="80" length="1">15</action_table>
+ <action_table id="81" length="1">13</action_table>
+ <action_table id="82" length="1">12</action_table>
+ <action_table id="83" length="1">4</action_table>
+ <action_table id="84" length="1">5</action_table>
+ <action_table id="85" length="1">6</action_table>
+ <action_table id="86" length="1">10</action_table>
+ <action_table id="87" length="1">8</action_table>
+ <action_table id="88" length="1">11</action_table>
+ <action_table id="89" length="1">7</action_table>
+ <action_table id="90" length="1">9</action_table>
+ <action_table id="91" length="1">71</action_table>
+ <action_table id="92" length="1">70</action_table>
+ <action_table id="93" length="2">0 69</action_table>
+ <action_table id="94" length="1">27</action_table>
+ <action_table id="95" length="2">3 24</action_table>
+ <action_table id="96" length="1">79</action_table>
+ <action_table id="97" length="1">75</action_table>
+ <action_table id="98" length="1">25</action_table>
+ <action_table id="99" length="1">80</action_table>
+ <action_table id="100" length="1">49</action_table>
+ <action_table id="101" length="1">37</action_table>
+ <action_table id="102" length="1">43</action_table>
+ <action_table id="103" length="1">61</action_table>
+ <action_table id="104" length="1">55</action_table>
+ <action_table id="105" length="1">31</action_table>
+ <action_table id="106" length="1">50</action_table>
+ <action_table id="107" length="1">38</action_table>
+ <action_table id="108" length="1">44</action_table>
+ <action_table id="109" length="1">62</action_table>
+ <action_table id="110" length="1">56</action_table>
+ <action_table id="111" length="1">32</action_table>
+ <action_table id="112" length="1">64</action_table>
+ <action_table id="113" length="1">65</action_table>
+ <action_table id="114" length="1">66</action_table>
+ <action_table id="115" length="1">63</action_table>
+ <action_table id="116" length="1">73</action_table>
+ <action_table id="117" length="1">74</action_table>
+ <action_table id="118" length="1">29</action_table>
+ <action_table id="119" length="1">78</action_table>
+ <action_table id="120" length="1">67</action_table>
+ <action_table id="121" length="1">51</action_table>
+ <action_table id="122" length="1">39</action_table>
+ <action_table id="123" length="1">45</action_table>
+ <action_table id="124" length="1">68</action_table>
+ <action_table id="125" length="1">57</action_table>
+ <action_table id="126" length="1">33</action_table>
+ <action_table id="127" length="1">77</action_table>
+ <action_table id="128" length="1">53</action_table>
+ <action_table id="129" length="1">41</action_table>
+ <action_table id="130" length="1">47</action_table>
+ <action_table id="131" length="1">59</action_table>
+ <action_table id="132" length="1">35</action_table>
+ <action_table id="133" length="1">48</action_table>
+ <action_table id="134" length="1">36</action_table>
+ <action_table id="135" length="1">42</action_table>
+ <action_table id="136" length="1">60</action_table>
+ <action_table id="137" length="1">54</action_table>
+ <action_table id="138" length="1">30</action_table>
+ <action_table id="139" length="1">52</action_table>
+ <action_table id="140" length="1">40</action_table>
+ <action_table id="141" length="1">46</action_table>
+ <action_table id="142" length="1">58</action_table>
+ <action_table id="143" length="1">34</action_table>
+ <action_table id="144" length="1">82</action_table>
+ <action_table id="145" length="1">76</action_table>
+ <action_table id="146" length="1">26</action_table>
+ <action_table id="147" length="1">72</action_table>
+ <action_table id="148" length="2">3 19</action_table>
+ <action_table id="149" length="2">3 20</action_table>
+ <action_table id="150" length="2">3 23</action_table>
+ <action_table id="151" length="2">3 21</action_table>
+ <action_table id="152" length="2">3 22</action_table>
+ <action_table id="153" length="2">3 18</action_table>
+ <action_table id="154" length="1">94</action_table>
+ <action_table id="155" length="2">0 92</action_table>
+ <action_table id="156" length="1">91</action_table>
+ <action_table id="157" length="1">93</action_table>
+ <action_table id="158" length="1">90</action_table>
+ <action_table id="159" length="1">83</action_table>
+ <action_table id="160" length="1">84</action_table>
+ <action_table id="161" length="1">88</action_table>
+ <action_table id="162" length="1">86</action_table>
+ <action_table id="163" length="1">89</action_table>
+ <action_table id="164" length="1">85</action_table>
+ <action_table id="165" length="1">87</action_table>
+ </action_table_list>
+ <start_state>10</start_state>
+ <entry_points>
+ <entry name="or_literal">166</entry>
+ <entry name="regular_type">168</entry>
+ <entry name="literal_pattern">203</entry>
+ <entry name="main">10</entry>
+ </entry_points>
+ <state_list length="205">
+ <state id="0">
+ <trans_list length="3">
+ <t>-128 9 0 x</t>
+ <t>10 10 10 0</t>
+ <t>11 127 0 x</t>
+ </trans_list>
+ </state>
+
+ <state id="1">
+ <trans_list length="7">
+ <t>-128 9 1 x</t>
+ <t>10 10 1 1</t>
+ <t>11 38 1 x</t>
+ <t>39 39 10 2</t>
+ <t>40 91 1 x</t>
+ <t>92 92 2 x</t>
+ <t>93 127 1 x</t>
+ </trans_list>
+ </state>
+
+ <state id="2">
+ <trans_list length="3">
+ <t>-128 9 1 x</t>
+ <t>10 10 1 1</t>
+ <t>11 127 1 x</t>
+ </trans_list>
+ </state>
+
+ <state id="3">
+ <trans_list length="3">
+ <t>-128 9 3 x</t>
+ <t>10 10 10 3</t>
+ <t>11 127 3 x</t>
+ </trans_list>
+ </state>
+
+ <state id="4">
+ <trans_list length="7">
+ <t>-128 9 4 x</t>
+ <t>10 10 4 1</t>
+ <t>11 33 4 x</t>
+ <t>34 34 171 x</t>
+ <t>35 91 4 x</t>
+ <t>92 92 5 x</t>
+ <t>93 127 4 x</t>
+ </trans_list>
+ </state>
+
+ <state id="5">
+ <trans_list length="3">
+ <t>-128 9 4 x</t>
+ <t>10 10 4 1</t>
+ <t>11 127 4 x</t>
+ </trans_list>
+ </state>
+
+ <state id="6">
+ <trans_list length="3">
+ <t>-128 9 6 x</t>
+ <t>10 10 168 4</t>
+ <t>11 127 6 x</t>
+ </trans_list>
+ </state>
+
+ <state id="7">
+ <trans_list length="7">
+ <t>-128 9 7 x</t>
+ <t>10 10 7 1</t>
+ <t>11 38 7 x</t>
+ <t>39 39 171 x</t>
+ <t>40 91 7 x</t>
+ <t>92 92 8 x</t>
+ <t>93 127 7 x</t>
+ </trans_list>
+ </state>
+
+ <state id="8">
+ <trans_list length="3">
+ <t>-128 9 7 x</t>
+ <t>10 10 7 1</t>
+ <t>11 127 7 x</t>
+ </trans_list>
+ </state>
+
+ <state id="9">
+ <trans_list length="7">
+ <t>-128 47 168 5</t>
+ <t>48 57 181 x</t>
+ <t>58 64 168 5</t>
+ <t>65 70 181 x</t>
+ <t>71 96 168 5</t>
+ <t>97 102 181 x</t>
+ <t>103 127 168 5</t>
+ </trans_list>
+ </state>
+
+ <state id="10" final="t">
+ <state_actions>6 7 x</state_actions>
+ <trans_list length="61">
+ <t>-128 -1 10 8</t>
+ <t>0 0 10 9</t>
+ <t>1 8 10 8</t>
+ <t>9 9 11 x</t>
+ <t>10 10 10 10</t>
+ <t>11 12 10 8</t>
+ <t>13 13 11 x</t>
+ <t>14 31 10 8</t>
+ <t>32 32 11 x</t>
+ <t>33 33 12 x</t>
+ <t>34 34 10 11</t>
+ <t>35 35 13 12</t>
+ <t>36 37 10 8</t>
+ <t>38 38 14 x</t>
+ <t>39 39 15 12</t>
+ <t>40 43 10 13</t>
+ <t>44 44 10 8</t>
+ <t>45 45 10 13</t>
+ <t>46 46 10 8</t>
+ <t>47 47 10 14</t>
+ <t>48 57 16 x</t>
+ <t>58 58 17 x</t>
+ <t>59 59 10 8</t>
+ <t>60 60 18 x</t>
+ <t>61 61 19 x</t>
+ <t>62 62 20 x</t>
+ <t>63 64 10 8</t>
+ <t>65 90 21 15</t>
+ <t>91 91 10 16</t>
+ <t>92 92 10 8</t>
+ <t>93 93 10 17</t>
+ <t>94 94 10 8</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 8</t>
+ <t>97 97 22 x</t>
+ <t>98 98 21 15</t>
+ <t>99 99 33 x</t>
+ <t>100 100 45 x</t>
+ <t>101 101 46 x</t>
+ <t>102 102 50 x</t>
+ <t>103 104 21 15</t>
+ <t>105 105 55 x</t>
+ <t>106 107 21 15</t>
+ <t>108 108 68 x</t>
+ <t>109 109 75 x</t>
+ <t>110 110 79 x</t>
+ <t>111 111 21 15</t>
+ <t>112 112 95 x</t>
+ <t>113 113 21 15</t>
+ <t>114 114 112 x</t>
+ <t>115 115 119 x</t>
+ <t>116 116 132 x</t>
+ <t>117 117 152 x</t>
+ <t>118 118 21 15</t>
+ <t>119 119 157 x</t>
+ <t>120 122 21 15</t>
+ <t>123 123 10 8</t>
+ <t>124 124 164 x</t>
+ <t>125 125 10 8</t>
+ <t>126 126 165 12</t>
+ <t>127 127 10 8</t>
+ </trans_list>
+ </state>
+
+ <state id="11" final="t">
+ <trans_list length="7">
+ <t>-128 8 10 18</t>
+ <t>9 9 11 x</t>
+ <t>10 12 10 18</t>
+ <t>13 13 11 x</t>
+ <t>14 31 10 18</t>
+ <t>32 32 11 x</t>
+ <t>33 127 10 18</t>
+ </trans_list>
+ </state>
+
+ <state id="12" final="t">
+ <trans_list length="3">
+ <t>-128 60 10 19</t>
+ <t>61 61 10 20</t>
+ <t>62 127 10 19</t>
+ </trans_list>
+ </state>
+
+ <state id="13" final="t">
+ <trans_list length="3">
+ <t>-128 9 0 x</t>
+ <t>10 10 10 0</t>
+ <t>11 127 0 x</t>
+ </trans_list>
+ </state>
+
+ <state id="14" final="t">
+ <trans_list length="3">
+ <t>-128 37 10 19</t>
+ <t>38 38 10 21</t>
+ <t>39 127 10 19</t>
+ </trans_list>
+ </state>
+
+ <state id="15" final="t">
+ <trans_list length="7">
+ <t>-128 9 1 x</t>
+ <t>10 10 1 1</t>
+ <t>11 38 1 x</t>
+ <t>39 39 10 2</t>
+ <t>40 91 1 x</t>
+ <t>92 92 2 x</t>
+ <t>93 127 1 x</t>
+ </trans_list>
+ </state>
+
+ <state id="16" final="t">
+ <trans_list length="3">
+ <t>-128 47 10 22</t>
+ <t>48 57 16 x</t>
+ <t>58 127 10 22</t>
+ </trans_list>
+ </state>
+
+ <state id="17" final="t">
+ <trans_list length="5">
+ <t>-128 57 10 19</t>
+ <t>58 58 10 23</t>
+ <t>59 60 10 19</t>
+ <t>61 61 10 24</t>
+ <t>62 127 10 19</t>
+ </trans_list>
+ </state>
+
+ <state id="18" final="t">
+ <trans_list length="5">
+ <t>-128 44 10 19</t>
+ <t>45 45 10 25</t>
+ <t>46 60 10 19</t>
+ <t>61 61 10 26</t>
+ <t>62 127 10 19</t>
+ </trans_list>
+ </state>
+
+ <state id="19" final="t">
+ <trans_list length="4">
+ <t>-128 60 10 19</t>
+ <t>61 61 10 27</t>
+ <t>62 62 10 28</t>
+ <t>63 127 10 19</t>
+ </trans_list>
+ </state>
+
+ <state id="20" final="t">
+ <trans_list length="3">
+ <t>-128 60 10 19</t>
+ <t>61 61 10 29</t>
+ <t>62 127 10 19</t>
+ </trans_list>
+ </state>
+
+ <state id="21" final="t">
+ <trans_list length="9">
+ <t>-128 47 10 30</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 30</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 30</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 30</t>
+ <t>97 122 21 15</t>
+ <t>123 127 10 30</t>
+ </trans_list>
+ </state>
+
+ <state id="22" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 98 21 15</t>
+ <t>99 99 23 x</t>
+ <t>100 107 21 15</t>
+ <t>108 108 27 x</t>
+ <t>109 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="23" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 24 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="24" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 104 21 15</t>
+ <t>105 105 25 x</t>
+ <t>106 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="25" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 110 21 15</t>
+ <t>111 111 26 x</t>
+ <t>112 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="26" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 21 32</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="27" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 111 21 15</t>
+ <t>112 112 28 x</t>
+ <t>113 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="28" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 103 21 15</t>
+ <t>104 104 29 x</t>
+ <t>105 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="29" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 30 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="30" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 120 21 15</t>
+ <t>121 121 31 x</t>
+ <t>122 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="31" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 111 21 15</t>
+ <t>112 112 32 x</t>
+ <t>113 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="32" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 21 33</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="33" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 101 21 15</t>
+ <t>102 102 34 x</t>
+ <t>103 110 21 15</t>
+ <t>111 111 35 x</t>
+ <t>112 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="34" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 107 21 15</t>
+ <t>108 108 21 34</t>
+ <t>109 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="35" final="t">
+ <trans_list length="12">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 108 21 15</t>
+ <t>109 109 36 x</t>
+ <t>110 110 39 x</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="36" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 108 21 15</t>
+ <t>109 109 37 x</t>
+ <t>110 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="37" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 104 21 15</t>
+ <t>105 105 38 x</t>
+ <t>106 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="38" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 21 35</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="39" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 114 21 15</t>
+ <t>115 115 40 x</t>
+ <t>116 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="40" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 41 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="41" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 42 x</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="42" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 116 21 15</t>
+ <t>117 117 43 x</t>
+ <t>118 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="43" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 98 21 15</t>
+ <t>99 99 44 x</t>
+ <t>100 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="44" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 21 36</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="45" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 110 21 15</t>
+ <t>111 111 21 37</t>
+ <t>112 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="46" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 107 21 15</t>
+ <t>108 108 47 x</t>
+ <t>109 109 21 15</t>
+ <t>110 110 49 x</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="47" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 114 21 15</t>
+ <t>115 115 48 x</t>
+ <t>116 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="48" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 21 38</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="49" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 99 21 15</t>
+ <t>100 100 21 39</t>
+ <t>101 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="50" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 104 21 15</t>
+ <t>105 105 51 x</t>
+ <t>106 110 21 15</t>
+ <t>111 111 54 x</t>
+ <t>112 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="51" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 52 x</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="52" final="t">
+ <trans_list length="12">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 53 x</t>
+ <t>98 99 21 15</t>
+ <t>100 100 21 40</t>
+ <t>101 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="53" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 107 21 15</t>
+ <t>108 108 21 41</t>
+ <t>109 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="54" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 21 42</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="55" final="t">
+ <trans_list length="16">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 101 21 15</t>
+ <t>102 102 21 43</t>
+ <t>103 103 56 x</t>
+ <t>104 109 21 15</t>
+ <t>110 110 60 x</t>
+ <t>111 115 21 15</t>
+ <t>116 116 66 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="56" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 57 x</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="57" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 110 21 15</t>
+ <t>111 111 58 x</t>
+ <t>112 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="58" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 59 x</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="59" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 21 44</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="60" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 98 21 15</t>
+ <t>99 99 61 x</t>
+ <t>100 104 21 15</t>
+ <t>105 105 65 x</t>
+ <t>106 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="61" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 107 21 15</t>
+ <t>108 108 62 x</t>
+ <t>109 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="62" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 116 21 15</t>
+ <t>117 117 63 x</t>
+ <t>118 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="63" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 99 21 15</t>
+ <t>100 100 64 x</t>
+ <t>101 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="64" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 21 45</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="65" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 21 46</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="66" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 67 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="67" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 21 47</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="68" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 69 x</t>
+ <t>102 104 21 15</t>
+ <t>105 105 70 x</t>
+ <t>106 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="69" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 119 21 15</t>
+ <t>120 120 21 48</t>
+ <t>121 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="70" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 71 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="71" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 72 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="72" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 73 x</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="73" final="t">
+ <trans_list length="10">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 74 x</t>
+ <t>98 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="74" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 107 21 15</t>
+ <t>108 108 21 49</t>
+ <t>109 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="75" final="t">
+ <trans_list length="10">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 76 x</t>
+ <t>98 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="76" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 77 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="77" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 98 21 15</t>
+ <t>99 99 78 x</t>
+ <t>100 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="78" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 103 21 15</t>
+ <t>104 104 21 50</t>
+ <t>105 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="79" final="t">
+ <trans_list length="15">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 80 x</t>
+ <t>98 100 21 15</t>
+ <t>101 101 87 x</t>
+ <t>102 102 89 x</t>
+ <t>103 110 21 15</t>
+ <t>111 111 90 x</t>
+ <t>112 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="80" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 108 21 15</t>
+ <t>109 109 81 x</t>
+ <t>110 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="81" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 82 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="82" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 114 21 15</t>
+ <t>115 115 83 x</t>
+ <t>116 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="83" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 111 21 15</t>
+ <t>112 112 84 x</t>
+ <t>113 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="84" final="t">
+ <trans_list length="10">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 85 x</t>
+ <t>98 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="85" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 98 21 15</t>
+ <t>99 99 86 x</t>
+ <t>100 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="86" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 21 51</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="87" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 119 21 15</t>
+ <t>120 120 88 x</t>
+ <t>121 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="88" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 21 52</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="89" final="t">
+ <trans_list length="10">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 21 53</t>
+ <t>98 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="90" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 91 x</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="91" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 92 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="92" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 93 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="93" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 94 x</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="94" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 108 21 15</t>
+ <t>109 109 21 54</t>
+ <t>110 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="95" final="t">
+ <trans_list length="14">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 96 x</t>
+ <t>98 99 21 15</t>
+ <t>100 100 104 x</t>
+ <t>101 113 21 15</t>
+ <t>114 114 105 x</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="96" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 97 x</t>
+ <t>115 115 21 15</t>
+ <t>116 116 100 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="97" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 114 21 15</t>
+ <t>115 115 98 x</t>
+ <t>116 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="98" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 99 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="99" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 21 55</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="100" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 101 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="101" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 102 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="102" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 103 x</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="103" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 21 56</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="104" final="t">
+ <trans_list length="10">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 21 57</t>
+ <t>98 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="105" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 104 21 15</t>
+ <t>105 105 106 x</t>
+ <t>106 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="106" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 58</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 58</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 58</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 58</t>
+ <t>97 109 21 15</t>
+ <t>110 110 107 x</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 58</t>
+ </trans_list>
+ </state>
+
+ <state id="107" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 108 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="108" final="t">
+ <trans_list length="9">
+ <t>-128 47 10 59</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 59</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 59</t>
+ <t>95 95 109 x</t>
+ <t>96 96 10 59</t>
+ <t>97 122 21 15</t>
+ <t>123 127 10 59</t>
+ </trans_list>
+ </state>
+
+ <state id="109" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 119 21 15</t>
+ <t>120 120 110 x</t>
+ <t>121 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="110" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 108 21 15</t>
+ <t>109 109 111 x</t>
+ <t>110 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="111" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 107 21 15</t>
+ <t>108 108 21 60</t>
+ <t>109 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="112" final="t">
+ <trans_list length="15">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 113 x</t>
+ <t>102 107 21 15</t>
+ <t>108 108 21 61</t>
+ <t>109 110 21 15</t>
+ <t>111 111 117 x</t>
+ <t>112 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="113" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 99 21 15</t>
+ <t>100 100 21 62</t>
+ <t>101 105 21 15</t>
+ <t>106 106 114 x</t>
+ <t>107 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="114" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 115 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="115" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 98 21 15</t>
+ <t>99 99 116 x</t>
+ <t>100 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="116" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 21 63</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="117" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 110 21 15</t>
+ <t>111 111 118 x</t>
+ <t>112 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="118" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 21 64</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="119" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 98 21 15</t>
+ <t>99 99 120 x</t>
+ <t>100 116 21 15</t>
+ <t>117 117 125 x</t>
+ <t>118 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="120" final="t">
+ <trans_list length="10">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 121 x</t>
+ <t>98 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="121" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 122 x</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="122" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 123 x</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="123" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 124 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="124" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 21 65</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="125" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 21 15</t>
+ <t>98 98 126 x</t>
+ <t>99 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="126" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 111 21 15</t>
+ <t>112 112 127 x</t>
+ <t>113 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="127" final="t">
+ <trans_list length="10">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 128 x</t>
+ <t>98 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="128" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 129 x</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="129" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 114 21 15</t>
+ <t>115 115 130 x</t>
+ <t>116 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="130" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 131 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="131" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 113 21 15</t>
+ <t>114 114 21 66</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="132" final="t">
+ <trans_list length="17">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 103 21 15</t>
+ <t>104 104 133 x</t>
+ <t>105 110 21 15</t>
+ <t>111 111 135 x</t>
+ <t>112 113 21 15</t>
+ <t>114 114 138 x</t>
+ <t>115 120 21 15</t>
+ <t>121 121 145 x</t>
+ <t>122 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="133" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 134 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="134" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 21 67</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="135" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 106 21 15</t>
+ <t>107 107 136 x</t>
+ <t>108 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="136" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 137 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="137" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 21 68</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="138" final="t">
+ <trans_list length="10">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 139 x</t>
+ <t>98 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="139" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 140 x</t>
+ <t>111 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="140" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 114 21 15</t>
+ <t>115 115 141 x</t>
+ <t>116 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="141" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 107 21 15</t>
+ <t>108 108 142 x</t>
+ <t>109 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="142" final="t">
+ <trans_list length="10">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 97 143 x</t>
+ <t>98 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="143" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 144 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="144" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 21 69</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="145" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 111 21 15</t>
+ <t>112 112 146 x</t>
+ <t>113 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="146" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 147 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="147" final="t">
+ <trans_list length="9">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 148 x</t>
+ <t>96 96 10 31</t>
+ <t>97 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="148" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 99 21 15</t>
+ <t>100 100 149 x</t>
+ <t>101 104 21 15</t>
+ <t>105 105 151 x</t>
+ <t>106 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="149" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 150 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="150" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 101 21 15</t>
+ <t>102 102 21 70</t>
+ <t>103 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="151" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 99 21 15</t>
+ <t>100 100 21 71</t>
+ <t>101 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="152" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 109 21 15</t>
+ <t>110 110 153 x</t>
+ <t>111 114 21 15</t>
+ <t>115 115 155 x</t>
+ <t>116 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="153" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 99 21 15</t>
+ <t>100 100 154 x</t>
+ <t>101 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="154" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 110 21 15</t>
+ <t>111 111 21 72</t>
+ <t>112 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="155" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 156 x</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="156" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 114 21 15</t>
+ <t>115 115 21 73</t>
+ <t>116 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="157" final="t">
+ <trans_list length="13">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 103 21 15</t>
+ <t>104 104 158 x</t>
+ <t>105 113 21 15</t>
+ <t>114 114 161 x</t>
+ <t>115 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="158" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 104 21 15</t>
+ <t>105 105 159 x</t>
+ <t>106 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="159" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 107 21 15</t>
+ <t>108 108 160 x</t>
+ <t>109 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="160" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 21 74</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="161" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 104 21 15</t>
+ <t>105 105 162 x</t>
+ <t>106 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="162" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 115 21 15</t>
+ <t>116 116 163 x</t>
+ <t>117 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="163" final="t">
+ <trans_list length="11">
+ <t>-128 47 10 31</t>
+ <t>48 57 21 15</t>
+ <t>58 64 10 31</t>
+ <t>65 90 21 15</t>
+ <t>91 94 10 31</t>
+ <t>95 95 21 15</t>
+ <t>96 96 10 31</t>
+ <t>97 100 21 15</t>
+ <t>101 101 21 75</t>
+ <t>102 122 21 15</t>
+ <t>123 127 10 31</t>
+ </trans_list>
+ </state>
+
+ <state id="164" final="t">
+ <trans_list length="3">
+ <t>-128 123 10 19</t>
+ <t>124 124 10 76</t>
+ <t>125 127 10 19</t>
+ </trans_list>
+ </state>
+
+ <state id="165" final="t">
+ <trans_list length="3">
+ <t>-128 9 3 x</t>
+ <t>10 10 10 3</t>
+ <t>11 127 3 x</t>
+ </trans_list>
+ </state>
+
+ <state id="166" final="t">
+ <state_actions>6 7 x</state_actions>
+ <trans_list length="8">
+ <t>-128 -1 166 77</t>
+ <t>0 0 166 78</t>
+ <t>1 44 166 77</t>
+ <t>45 45 166 79</t>
+ <t>46 91 166 77</t>
+ <t>92 92 167 x</t>
+ <t>93 93 166 80</t>
+ <t>94 127 166 77</t>
+ </trans_list>
+ </state>
+
+ <state id="167" final="t">
+ <trans_list length="18">
+ <t>-128 9 166 81</t>
+ <t>10 10 166 82</t>
+ <t>11 47 166 81</t>
+ <t>48 48 166 83</t>
+ <t>49 96 166 81</t>
+ <t>97 97 166 84</t>
+ <t>98 98 166 85</t>
+ <t>99 101 166 81</t>
+ <t>102 102 166 86</t>
+ <t>103 109 166 81</t>
+ <t>110 110 166 87</t>
+ <t>111 113 166 81</t>
+ <t>114 114 166 88</t>
+ <t>115 115 166 81</t>
+ <t>116 116 166 89</t>
+ <t>117 117 166 81</t>
+ <t>118 118 166 90</t>
+ <t>119 127 166 81</t>
+ </trans_list>
+ </state>
+
+ <state id="168" final="t">
+ <state_actions>6 7 x</state_actions>
+ <trans_list length="47">
+ <t>-128 -1 168 91</t>
+ <t>0 0 168 92</t>
+ <t>1 8 168 91</t>
+ <t>9 9 169 x</t>
+ <t>10 10 168 93</t>
+ <t>11 12 168 91</t>
+ <t>13 13 169 x</t>
+ <t>14 31 168 91</t>
+ <t>32 32 169 x</t>
+ <t>33 33 168 91</t>
+ <t>34 34 170 12</t>
+ <t>35 35 172 12</t>
+ <t>36 36 173 x</t>
+ <t>37 37 174 x</t>
+ <t>38 38 168 91</t>
+ <t>39 39 175 12</t>
+ <t>40 41 168 91</t>
+ <t>42 42 176 x</t>
+ <t>43 44 168 91</t>
+ <t>45 45 177 x</t>
+ <t>46 46 178 x</t>
+ <t>47 47 168 94</t>
+ <t>48 48 179 12</t>
+ <t>49 57 180 x</t>
+ <t>58 58 182 x</t>
+ <t>59 59 168 91</t>
+ <t>60 60 184 x</t>
+ <t>61 61 168 91</t>
+ <t>62 62 186 x</t>
+ <t>63 63 168 91</t>
+ <t>64 64 187 x</t>
+ <t>65 90 188 95</t>
+ <t>91 91 189 x</t>
+ <t>92 94 168 91</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 91</t>
+ <t>97 100 188 95</t>
+ <t>101 101 190 x</t>
+ <t>102 102 193 x</t>
+ <t>103 107 188 95</t>
+ <t>108 108 196 x</t>
+ <t>109 115 188 95</t>
+ <t>116 116 199 x</t>
+ <t>117 118 188 95</t>
+ <t>119 119 200 x</t>
+ <t>120 122 188 95</t>
+ <t>123 127 168 91</t>
+ </trans_list>
+ </state>
+
+ <state id="169" final="t">
+ <trans_list length="7">
+ <t>-128 8 168 96</t>
+ <t>9 9 169 x</t>
+ <t>10 12 168 96</t>
+ <t>13 13 169 x</t>
+ <t>14 31 168 96</t>
+ <t>32 32 169 x</t>
+ <t>33 127 168 96</t>
+ </trans_list>
+ </state>
+
+ <state id="170" final="t">
+ <trans_list length="7">
+ <t>-128 9 4 x</t>
+ <t>10 10 4 1</t>
+ <t>11 33 4 x</t>
+ <t>34 34 171 x</t>
+ <t>35 91 4 x</t>
+ <t>92 92 5 x</t>
+ <t>93 127 4 x</t>
+ </trans_list>
+ </state>
+
+ <state id="171" final="t">
+ <trans_list length="3">
+ <t>-128 104 168 97</t>
+ <t>105 105 168 98</t>
+ <t>106 127 168 97</t>
+ </trans_list>
+ </state>
+
+ <state id="172" final="t">
+ <trans_list length="3">
+ <t>-128 9 6 x</t>
+ <t>10 10 168 4</t>
+ <t>11 127 6 x</t>
+ </trans_list>
+ </state>
+
+ <state id="173" final="t">
+ <trans_list length="13">
+ <t>-128 32 168 99</t>
+ <t>33 33 168 100</t>
+ <t>34 41 168 99</t>
+ <t>42 42 168 101</t>
+ <t>43 46 168 99</t>
+ <t>47 47 168 102</t>
+ <t>48 62 168 99</t>
+ <t>63 63 168 103</t>
+ <t>64 93 168 99</t>
+ <t>94 94 168 104</t>
+ <t>95 125 168 99</t>
+ <t>126 126 168 105</t>
+ <t>127 127 168 99</t>
+ </trans_list>
+ </state>
+
+ <state id="174" final="t">
+ <trans_list length="13">
+ <t>-128 32 168 99</t>
+ <t>33 33 168 106</t>
+ <t>34 41 168 99</t>
+ <t>42 42 168 107</t>
+ <t>43 46 168 99</t>
+ <t>47 47 168 108</t>
+ <t>48 62 168 99</t>
+ <t>63 63 168 109</t>
+ <t>64 93 168 99</t>
+ <t>94 94 168 110</t>
+ <t>95 125 168 99</t>
+ <t>126 126 168 111</t>
+ <t>127 127 168 99</t>
+ </trans_list>
+ </state>
+
+ <state id="175" final="t">
+ <trans_list length="7">
+ <t>-128 9 7 x</t>
+ <t>10 10 7 1</t>
+ <t>11 38 7 x</t>
+ <t>39 39 171 x</t>
+ <t>40 91 7 x</t>
+ <t>92 92 8 x</t>
+ <t>93 127 7 x</t>
+ </trans_list>
+ </state>
+
+ <state id="176" final="t">
+ <trans_list length="3">
+ <t>-128 41 168 99</t>
+ <t>42 42 168 112</t>
+ <t>43 127 168 99</t>
+ </trans_list>
+ </state>
+
+ <state id="177" final="t">
+ <trans_list length="5">
+ <t>-128 44 168 99</t>
+ <t>45 45 168 113</t>
+ <t>46 61 168 99</t>
+ <t>62 62 168 114</t>
+ <t>63 127 168 99</t>
+ </trans_list>
+ </state>
+
+ <state id="178" final="t">
+ <trans_list length="3">
+ <t>-128 45 168 99</t>
+ <t>46 46 168 115</t>
+ <t>47 127 168 99</t>
+ </trans_list>
+ </state>
+
+ <state id="179" final="t">
+ <trans_list length="5">
+ <t>-128 47 168 116</t>
+ <t>48 57 180 x</t>
+ <t>58 119 168 116</t>
+ <t>120 120 9 x</t>
+ <t>121 127 168 116</t>
+ </trans_list>
+ </state>
+
+ <state id="180" final="t">
+ <trans_list length="3">
+ <t>-128 47 168 116</t>
+ <t>48 57 180 x</t>
+ <t>58 127 168 116</t>
+ </trans_list>
+ </state>
+
+ <state id="181" final="t">
+ <trans_list length="7">
+ <t>-128 47 168 117</t>
+ <t>48 57 181 x</t>
+ <t>58 64 168 117</t>
+ <t>65 70 181 x</t>
+ <t>71 96 168 117</t>
+ <t>97 102 181 x</t>
+ <t>103 127 168 117</t>
+ </trans_list>
+ </state>
+
+ <state id="182" final="t">
+ <trans_list length="4">
+ <t>-128 60 168 99</t>
+ <t>61 61 168 118</t>
+ <t>62 62 183 x</t>
+ <t>63 127 168 99</t>
+ </trans_list>
+ </state>
+
+ <state id="183" final="t">
+ <trans_list length="3">
+ <t>-128 61 168 119</t>
+ <t>62 62 168 120</t>
+ <t>63 127 168 119</t>
+ </trans_list>
+ </state>
+
+ <state id="184" final="t">
+ <trans_list length="15">
+ <t>-128 32 168 99</t>
+ <t>33 33 168 121</t>
+ <t>34 41 168 99</t>
+ <t>42 42 168 122</t>
+ <t>43 46 168 99</t>
+ <t>47 47 168 123</t>
+ <t>48 57 168 99</t>
+ <t>58 58 168 124</t>
+ <t>59 61 168 99</t>
+ <t>62 62 185 x</t>
+ <t>63 93 168 99</t>
+ <t>94 94 168 125</t>
+ <t>95 125 168 99</t>
+ <t>126 126 168 126</t>
+ <t>127 127 168 99</t>
+ </trans_list>
+ </state>
+
+ <state id="185" final="t">
+ <trans_list length="11">
+ <t>-128 32 168 127</t>
+ <t>33 33 168 128</t>
+ <t>34 41 168 127</t>
+ <t>42 42 168 129</t>
+ <t>43 46 168 127</t>
+ <t>47 47 168 130</t>
+ <t>48 93 168 127</t>
+ <t>94 94 168 131</t>
+ <t>95 125 168 127</t>
+ <t>126 126 168 132</t>
+ <t>127 127 168 127</t>
+ </trans_list>
+ </state>
+
+ <state id="186" final="t">
+ <trans_list length="13">
+ <t>-128 32 168 99</t>
+ <t>33 33 168 133</t>
+ <t>34 41 168 99</t>
+ <t>42 42 168 134</t>
+ <t>43 46 168 99</t>
+ <t>47 47 168 135</t>
+ <t>48 62 168 99</t>
+ <t>63 63 168 136</t>
+ <t>64 93 168 99</t>
+ <t>94 94 168 137</t>
+ <t>95 125 168 99</t>
+ <t>126 126 168 138</t>
+ <t>127 127 168 99</t>
+ </trans_list>
+ </state>
+
+ <state id="187" final="t">
+ <trans_list length="11">
+ <t>-128 32 168 99</t>
+ <t>33 33 168 139</t>
+ <t>34 41 168 99</t>
+ <t>42 42 168 140</t>
+ <t>43 46 168 99</t>
+ <t>47 47 168 141</t>
+ <t>48 93 168 99</t>
+ <t>94 94 168 142</t>
+ <t>95 125 168 99</t>
+ <t>126 126 168 143</t>
+ <t>127 127 168 99</t>
+ </trans_list>
+ </state>
+
+ <state id="188" final="t">
+ <trans_list length="9">
+ <t>-128 47 168 144</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 144</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 144</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 144</t>
+ <t>97 122 188 95</t>
+ <t>123 127 168 144</t>
+ </trans_list>
+ </state>
+
+ <state id="189" final="t">
+ <trans_list length="3">
+ <t>-128 93 168 145</t>
+ <t>94 94 168 146</t>
+ <t>95 127 168 145</t>
+ </trans_list>
+ </state>
+
+ <state id="190" final="t">
+ <trans_list length="13">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 110 188 95</t>
+ <t>111 111 191 x</t>
+ <t>112 113 188 95</t>
+ <t>114 114 192 x</t>
+ <t>115 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="191" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 101 188 95</t>
+ <t>102 102 188 148</t>
+ <t>103 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="192" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 113 188 95</t>
+ <t>114 114 188 149</t>
+ <t>115 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="193" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 113 188 95</t>
+ <t>114 114 194 x</t>
+ <t>115 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="194" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 110 188 95</t>
+ <t>111 111 195 x</t>
+ <t>112 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="195" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 108 188 95</t>
+ <t>109 109 188 150</t>
+ <t>110 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="196" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 100 188 95</t>
+ <t>101 101 197 x</t>
+ <t>102 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="197" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 113 188 95</t>
+ <t>114 114 198 x</t>
+ <t>115 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="198" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 113 188 95</t>
+ <t>114 114 188 151</t>
+ <t>115 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="199" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 110 188 95</t>
+ <t>111 111 188 152</t>
+ <t>112 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="200" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 103 188 95</t>
+ <t>104 104 201 x</t>
+ <t>105 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="201" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 100 188 95</t>
+ <t>101 101 202 x</t>
+ <t>102 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="202" final="t">
+ <trans_list length="11">
+ <t>-128 47 168 147</t>
+ <t>48 57 188 95</t>
+ <t>58 64 168 147</t>
+ <t>65 90 188 95</t>
+ <t>91 94 168 147</t>
+ <t>95 95 188 95</t>
+ <t>96 96 168 147</t>
+ <t>97 109 188 95</t>
+ <t>110 110 188 153</t>
+ <t>111 122 188 95</t>
+ <t>123 127 168 147</t>
+ </trans_list>
+ </state>
+
+ <state id="203" final="t">
+ <state_actions>6 7 x</state_actions>
+ <trans_list length="8">
+ <t>-128 9 203 154</t>
+ <t>10 10 203 155</t>
+ <t>11 33 203 154</t>
+ <t>34 34 203 156</t>
+ <t>35 90 203 154</t>
+ <t>91 91 203 157</t>
+ <t>92 92 204 x</t>
+ <t>93 127 203 154</t>
+ </trans_list>
+ </state>
+
+ <state id="204" final="t">
+ <trans_list length="14">
+ <t>-128 96 203 158</t>
+ <t>97 97 203 159</t>
+ <t>98 98 203 160</t>
+ <t>99 101 203 158</t>
+ <t>102 102 203 161</t>
+ <t>103 109 203 158</t>
+ <t>110 110 203 162</t>
+ <t>111 113 203 158</t>
+ <t>114 114 203 163</t>
+ <t>115 115 203 158</t>
+ <t>116 116 203 164</t>
+ <t>117 117 203 158</t>
+ <t>118 118 203 165</t>
+ <t>119 127 203 158</t>
+ </trans_list>
+ </state>
+ </state_list>
+ </machine>
+</ragel_def>
+<ragel_def name="section_parse">
+ <alphtype>int</alphtype>
+ <machine>
+ <action_list length="5">
+ <action id="0" name="clear_words" line="97" col="21"><text> word = lit = 0; word_len = lit_len = 0; </text></action>
+ <action id="1" name="store_lit" line="98" col="19"><text> lit = tokdata; lit_len = toklen; </text></action>
+ <action id="2" name="incl_err" line="101" col="18"><text> scan_error() &lt;&lt; "bad include statement" &lt;&lt; endl; </text></action>
+ <action id="3" name="handle_include" line="105" col="2"><text>
+ #if 0
+ char *inclSectionName = word;
+ char *inclFileName = 0;
+
+ /* Implement defaults for the input file and section name. */
+ if ( inclSectionName == 0 )
+ inclSectionName = parser-&gt;sectionName;
+
+ if ( lit != 0 )
+ inclFileName = prepareFileName( lit, lit_len );
+ else
+ inclFileName = fileName;
+
+ /* Check for a recursive include structure. Add the current file/section
+ * name then check if what we are including is already in the stack. */
+ includeStack.append( IncludeStackItem( fileName, parser-&gt;sectionName ) );
+
+ if ( recursiveInclude( inclFileName, inclSectionName ) )
+ scan_error() &lt;&lt; "include: this is a recursive include operation" &lt;&lt; endl;
+ else {
+ /* Open the input file for reading. */
+ ifstream *inFile = new ifstream( inclFileName );
+ if ( ! inFile-&gt;is_open() ) {
+ scan_error() &lt;&lt; "include: could not open " &lt;&lt;
+ inclFileName &lt;&lt; " for reading" &lt;&lt; endl;
+ }
+
+ Scanner scanner( inclFileName, *inFile, output, parser,
+ inclSectionName, includeDepth+1 );
+ scanner.do_scan( );
+ delete inFile;
+ }
+
+ /* Remove the last element (len-1) */
+ includeStack.remove( -1 );
+ #endif
+ </text></action>
+ <action id="4" name="handle_token" line="152" col="2"><text>
+ InputLoc loc;
+
+ #ifdef PRINT_TOKENS
+ cerr &lt;&lt; "scanner:" &lt;&lt; line &lt;&lt; ":" &lt;&lt; column &lt;&lt;
+ ": sending token to the parser " &lt;&lt; Parser_lelNames[*p];
+ cerr &lt;&lt; " " &lt;&lt; toklen;
+ if ( tokdata != 0 )
+ cerr &lt;&lt; " " &lt;&lt; tokdata;
+ cerr &lt;&lt; endl;
+ #endif
+
+ loc.fileName = fileName;
+ loc.line = line;
+ loc.col = column;
+
+ parser-&gt;token( loc, type, tokdata, toklen );
+ </text></action>
+ </action_list>
+ <action_table_list length="4">
+ <action_table id="0" length="1">2</action_table>
+ <action_table id="1" length="2">0 1</action_table>
+ <action_table id="2" length="1">3</action_table>
+ <action_table id="3" length="1">4</action_table>
+ </action_table_list>
+ <start_state>3</start_state>
+ <error_state>0</error_state>
+ <entry_points>
+ <entry name="main">3</entry>
+ </entry_points>
+ <state_list length="4">
+ <state id="0">
+ <trans_list length="0">
+ </trans_list>
+ </state>
+
+ <state id="1">
+ <state_actions>x x 0</state_actions>
+ <trans_list length="3">
+ <t>-2147483648 131 x 0</t>
+ <t>132 132 2 1</t>
+ <t>133 2147483647 x 0</t>
+ </trans_list>
+ </state>
+
+ <state id="2">
+ <state_actions>x x 0</state_actions>
+ <trans_list length="3">
+ <t>-2147483648 58 x 0</t>
+ <t>59 59 3 2</t>
+ <t>60 2147483647 x 0</t>
+ </trans_list>
+ </state>
+
+ <state id="3" final="t">
+ <trans_list length="3">
+ <t>-2147483648 128 3 3</t>
+ <t>129 129 1 x</t>
+ <t>130 2147483647 3 3</t>
+ </trans_list>
+ </state>
+ </state_list>
+ </machine>
+</ragel_def>
+<host line="1" col="1">/*
+ * Copyright 2006-2007 Adrian Thurston &lt;thurston@complang.org&gt;
+ */
+
+/* This file is part of Ragel.
+ *
+ * Ragel 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.
+ *
+ * Ragel 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 Ragel; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include &lt;iostream&gt;
+#include &lt;fstream&gt;
+#include &lt;string.h&gt;
+
+#include "colm.h"
+#include "lmscan.h"
+#include "lmparse.h"
+#include "parsedata.h"
+#include "avltree.h"
+#include "vector.h"
+
+//#define PRINT_TOKENS
+
+using std::ifstream;
+using std::istream;
+using std::ostream;
+using std::cout;
+using std::cerr;
+using std::endl;
+
+</host>
+<write def_name="section_parse" line="45" col="2"><arg>data</arg></write>
+<host line="46">
+
+void Scanner::sectionParseInit()
+{
+ </host>
+<write def_name="section_parse" line="50" col="5"><arg>init</arg></write>
+<host line="51">}
+
+ostream &amp;Scanner::scan_error()
+{
+ /* Maintain the error count. */
+ gblErrorCount += 1;
+ cerr &lt;&lt; fileName &lt;&lt; ":" &lt;&lt; line &lt;&lt; ":" &lt;&lt; column &lt;&lt; ": ";
+ return cerr;
+}
+
+bool Scanner::recursiveInclude( char *inclFileName, char *inclSectionName )
+{
+ for ( IncludeStack::Iter si = includeStack; si.lte(); si++ ) {
+ if ( strcmp( si-&gt;fileName, inclFileName ) == 0 &amp;&amp;
+ strcmp( si-&gt;sectionName, inclSectionName ) == 0 )
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+void Scanner::updateCol()
+{
+ char *from = lastnl;
+ if ( from == 0 )
+ from = tokstart;
+ //cerr &lt;&lt; "adding " &lt;&lt; tokend - from &lt;&lt; " to column" &lt;&lt; endl;
+ column += tokend - from;
+ lastnl = 0;
+}
+
+void Scanner::token( int type, char c )
+{
+ token( type, &amp;c, &amp;c + 1 );
+}
+
+void Scanner::token( int type )
+{
+ token( type, 0, 0 );
+}
+
+</host>
+<host line="178">
+
+void Scanner::token( int type, char *start, char *end )
+{
+ char *tokdata = 0;
+ int toklen = 0;
+ int *p = &amp;type;
+ int *pe = &amp;type + 1;
+
+ if ( start != 0 ) {
+ toklen = end-start;
+ tokdata = new char[toklen+1];
+ memcpy( tokdata, start, toklen );
+ tokdata[toklen] = 0;
+ }
+
+ </host>
+<write def_name="section_parse" line="196" col="3"><arg>exec</arg></write>
+<host line="197">
+
+ updateCol();
+}
+
+void Scanner::endSection( )
+{
+ /* Execute the eof actions for the section parser. */
+ </host>
+<write def_name="section_parse" line="207" col="3"><arg>eof</arg></write>
+<host line="208">
+}
+
+</host>
+<host line="516">
+
+</host>
+<write def_name="rlscan" line="518" col="4"><arg>data</arg></write>
+<host line="519">
+void Scanner::do_scan()
+{
+ int bufsize = 8;
+ char *buf = new char[bufsize];
+ const char last_char = 0;
+ int cs, act, have = 0;
+ int top, stack[32];
+ bool execute = true;
+
+ sectionParseInit();
+ </host>
+<write def_name="rlscan" line="530" col="5"><arg>init</arg></write>
+<host line="531">
+ while ( execute ) {
+ char *p = buf + have;
+ int space = bufsize - have;
+
+ if ( space == 0 ) {
+ /* We filled up the buffer trying to scan a token. Grow it. */
+ bufsize = bufsize * 2;
+ char *newbuf = new char[bufsize];
+
+ /* Recompute p and space. */
+ p = newbuf + have;
+ space = bufsize - have;
+
+ /* Patch up pointers possibly in use. */
+ if ( tokstart != 0 )
+ tokstart = newbuf + ( tokstart - buf );
+ tokend = newbuf + ( tokend - buf );
+
+ /* Copy the new buffer in. */
+ memcpy( newbuf, buf, have );
+ delete[] buf;
+ buf = newbuf;
+ }
+
+ input.read( p, space );
+ int len = input.gcount();
+
+ /* If we see eof then append the EOF char. */
+ if ( len == 0 ) {
+ p[0] = last_char, len = 1;
+ execute = false;
+ }
+
+ char *pe = p + len;
+ </host>
+<write def_name="rlscan" line="566" col="6"><arg>exec</arg></write>
+<host line="567">
+ /* Check if we failed. */
+ if ( cs == rlscan_error ) {
+ /* Machine failed before finding a token. I'm not yet sure if this
+ * is reachable. */
+ scan_error() &lt;&lt; "scanner error" &lt;&lt; endl;
+ exit(1);
+ }
+
+ /* Decide if we need to preserve anything. */
+ char *preserve = tokstart;
+
+ /* Now set up the prefix. */
+ if ( preserve == 0 )
+ have = 0;
+ else {
+ /* There is data that needs to be shifted over. */
+ have = pe - preserve;
+ memmove( buf, preserve, have );
+ unsigned int shiftback = preserve - buf;
+ if ( tokstart != 0 )
+ tokstart -= shiftback;
+ tokend -= shiftback;
+
+ preserve = buf;
+ }
+ }
+ delete[] buf;
+
+ InputLoc loc;
+ loc.fileName = "&lt;EOF&gt;";
+ loc.line = line;
+ loc.col = 1;
+ parser-&gt;token( loc, _eof, 0, 0 );
+}
+
+void scan( char *fileName, istream &amp;input, ostream &amp;output )
+{
+ Scanner scanner( fileName, input, output, 0, 0, 0 );
+}
+</host>
+</ragel>
+##### EXP #####
+SWITCH
+ token( KW_When );
+ token( KW_Eof );
+ token( KW_Err );
+ token( KW_Lerr );
+ token( KW_To );
+ token( KW_From );
+ token( TK_Word, tokstart, tokend );
+SWITCH
+ token( KW_Lex );
+ token( KW_Action );
+ token( KW_AlphType );
+ token( KW_Commit );
+ token( KW_Undo );
+ token( KW_Final );
+ token( KW_Translate );
+ token( KW_Token );
+ token( KW_Literal );
+ token( KW_NonTerm );
+ token( KW_Uses );
+ token( KW_Parser );
+ token( KW_Include );
+ token( KW_Write );
+ token( KW_Nfa );
+ token( KW_Pda );
+ token( KW_Rl );
+ token( KW_Cfl );
+ token( KW_Ignore );
+ token( KW_End );
+ token( KW_Pattern );
+ token( KW_Construct );
+ token( KW_Red );
+ token( KW_TypeId );
+ token( KW_TypeDef );
+ token( KW_If );
+ token( KW_Init );
+ token( KW_Reject );
+ token( KW_While );
+ token( KW_Else );
+ token( KW_SubParser );
+ token( KW_Next );
+ token( KW_Match );
+ token( KW_For );
+ token( KW_Iter );
+ token( KW_Find );
+ token( KW_Root );
+ token( KW_PrintXML );
+ token( KW_Then );
+ token( KW_Do );
+ token( KW_Namespace );
+ token( KW_Scanner );
+ token( TK_Word, tokstart, tokend );
diff --git a/test/tags3.lm b/test/tags3.lm
new file mode 100644
index 0000000..645b00b
--- /dev/null
+++ b/test/tags3.lm
@@ -0,0 +1,322 @@
+##### LM #####
+context tags
+
+ #
+ # Regular Definitions
+ #
+ rl def_name_char /[\-A-Za-z0-9._:?]/
+ rl def_name /[A-Za-z_:] def_name_char*/
+ rl def_system_literal /'"' [^"]* '"' | "'" [^']* "'"/
+
+ #
+ # Scanner for tag names.
+ #
+ lex
+ ignore /space+/
+ token tag_id /def_name/
+ end
+
+ #
+ # Scanner for attributes names
+ #
+ lex
+ ignore /space+/
+ token attr_name /def_name_char+/
+ literal `=
+ end
+
+ # Scanner for attribute values.
+ lex
+ ignore /space+/
+ token dquote_val /'"' ([^"] | '\\' any)* '"'/
+ token squote_val /"'" ([^'] | '\\' any)* "'"/
+ token unq_val /[^ \t\r\n<>"'] [^ \t\r\n<>]*/
+ end
+
+ literal `> `/>
+
+ #
+ # Tokens
+ #
+
+ lex
+ ignore /space+/
+ literal `< `</ `<!DOCTYPE
+ token doc_data /[^<]+/
+ token comment /"<!--" any* :>> "-->"/
+ end
+
+ #
+ # Tags
+ #
+
+ # This scanner is just for the id in close tags. The id needs to be looked up
+ # in the tag stack so we can determine if it is a stray.
+ lex
+ # Ignore whitespace.
+ ignore /space+/
+
+ token stray_close_id //
+ token close_id /def_name/
+ {
+ # If it is in the tag stack then it is a close_id. If not then it's a
+ # stray_close_id.
+ send_id: int = typeid<stray_close_id>
+
+ LocalTagStack: tag_stack = TagStack
+ for Tag: tag_id in LocalTagStack {
+ T: tag_id = Tag
+ if match_text == T.data {
+ send_id = typeid<close_id>
+ break
+ }
+ }
+
+ input.push( make_token( send_id input.pull(match_length) ) )
+ }
+ end
+
+ #
+ # Tag Stack
+ #
+
+ def tag_stack
+ [tag_id tag_stack]
+ | []
+
+ TagStack: tag_stack
+
+ #
+ # Document Type
+ #
+ # This scanner handles inside DOCTYPE tags (except keywords).
+ lex
+ ignore /space+/
+ token dt_name /def_name/
+ token dt_literal /def_system_literal/
+ token dt_bl /"[" [^\]]* "]"/
+ end
+
+ token dt_close /'>'/
+
+ # Using a separate scanner for the keywords in DOCTYPE prevents them from
+ # covering dt_name
+ lex
+ ignore /space+/
+ literal `SYSTEM `PUBLIC
+ end
+
+ def DOCTYPE [`<!DOCTYPE dt_name external_id dt_bl? dt_close]
+
+ def external_id
+ [`SYSTEM dt_literal?]
+ | [`PUBLIC dt_literal dt_literal?]
+
+ #
+ # Tags, with optionanal close.
+ #
+
+ def tag
+ [open_tag item* opt_close_tag]
+
+ def open_tag
+ [`< tag_id attr* `>]
+ {
+ TagStack = construct tag_stack
+ [r2 TagStack]
+ }
+
+ def opt_close_tag
+ [`</ close_id `>]
+ {
+ match TagStack [Top:tag_id Rest:tag_stack]
+ if r2.data == Top.data
+ TagStack = Rest
+ else
+ reject
+ }
+
+ | []
+ {
+ match TagStack [Top:tag_id Rest:tag_stack]
+ TagStack = Rest
+ }
+
+ #
+ # Empty tags
+ #
+ def empty_tag
+ [`< tag_id attr* `/>]
+
+ #
+ # Stray close tags
+ #
+ def stray_close
+ [`</ stray_close_id `>]
+
+
+ #
+ # Attributes
+ #
+
+ def attr
+ [attr_name eql_attr_val?]
+
+ def eql_attr_val [`= attr_val]
+
+ def attr_val
+ [squote_val]
+ | [dquote_val]
+ | [unq_val]
+ | []
+
+ #
+ # Items
+ #
+
+ def item
+ [DOCTYPE]
+ | [tag]
+ | [empty_tag]
+ | [stray_close]
+ | [doc_data]
+ | [comment]
+
+
+ token trailing /any*/
+
+ def start
+ [item* trailing]
+
+ #
+ # END GRAMMAR
+ #
+
+ int addDefaultAltTags( Start: ref<start> )
+ {
+ for T: open_tag in Start {
+ require T
+ ["<img" AttrList: attr* ">"]
+
+ haveAlt: bool = false
+ for A: attr in T {
+ if match A ["alt=" attr_val]
+ haveAlt = true
+ }
+
+ if !haveAlt {
+ for AL: attr* in T {
+ if match AL [] {
+ AL = construct attr*
+ [" alt=\"default alt\""]
+ break
+ }
+ }
+ }
+ }
+ }
+
+ int printLinks( Start: start )
+ {
+ for A:tag in Start {
+ require A
+ ["<a" AttrList: attr* ">" I: item* "</a>"]
+
+ for Attr: attr in AttrList {
+ if match Attr ["href = " AttrVal: attr_val]
+ print( 'link: ' I '\ntarget: ' AttrVal '\n\n' )
+ }
+ }
+ }
+
+
+ bool should_close( TI: tag_id )
+ {
+ return true
+ }
+
+ bool should_flatten( TI: tag_id )
+ {
+ return true
+ }
+
+ # Finds unclosed tags and puts the content after the tag. Afterwards
+ # all unclosed tags will be empty 'inside'.
+ int flatten( Start: ref<start> )
+ {
+ for TL: item* in Start {
+ require TL
+ [OT: open_tag Inside: item* Trailing: item*]
+
+ match OT
+ ['<' TagId: tag_id attr* '>']
+
+ if should_flatten( TagId )
+ {
+ require Inside
+ [item item*]
+
+ # Put Trailing at the end of inside.
+ for END: item* in Inside {
+ if match END [] {
+ END = Trailing
+ break
+ }
+ }
+
+ EmptyCloseTag: opt_close_tag =
+ construct opt_close_tag []
+
+ # Close the tag and put inside after it.
+ TL = construct item*
+ [OT EmptyCloseTag Inside]
+ }
+ }
+ }
+
+# int close( Start: ref<start> )
+# {
+# for TL: item in Start {
+# require TL
+# [OpenTag: open_tag Inside: item*]
+#
+# match OpenTag
+# ['<' TagId: tag_id attr* '>']
+#
+# if should_close( TagId )
+# {
+# parse CloseId: close_id[ TagId.data ]
+#
+# CloseTag: opt_close_tag =
+# construct opt_close_tag ['</' CloseId '>']
+#
+# # Close the tag and put inside after it.
+# TL = construct item
+# [OpenTag Inside CloseTag]
+# }
+# }
+# }
+end # tags
+
+cons Tags: tags[]
+Tags.TagStack = construct tags::tag_stack []
+
+parse HTML_P: tags::start(Tags)[ stdin ]
+HTML: tags::start = HTML_P
+flatten( HTML )
+print_xml( HTML )
+printLinks( HTML )
+##### IN #####
+<t1>
+
+ <t2>
+ <a href="foo">FOO</a>
+ <t3>
+ </t3>
+
+</t1>
+##### EXP #####
+<tags::start><tags::_repeat_item><tags::item><tags::tag><tags::open_tag><tags::_literal_0019>&lt;</tags::_literal_0019><tags::tag_id>t1</tags::tag_id><tags::_repeat_attr></tags::_repeat_attr><tags::_literal_0013>&gt;</tags::_literal_0013></tags::open_tag><tags::_repeat_item><tags::item><tags::tag><tags::open_tag><tags::_literal_0019>&lt;</tags::_literal_0019><tags::tag_id>t2</tags::tag_id><tags::_repeat_attr></tags::_repeat_attr><tags::_literal_0013>&gt;</tags::_literal_0013></tags::open_tag><tags::_repeat_item></tags::_repeat_item><tags::opt_close_tag></tags::opt_close_tag></tags::tag></tags::item><tags::item><tags::tag><tags::open_tag><tags::_literal_0019>&lt;</tags::_literal_0019><tags::tag_id>a</tags::tag_id><tags::_repeat_attr><tags::attr><tags::attr_name>href</tags::attr_name><tags::_opt_eql_attr_val><tags::eql_attr_val><tags::_literal_0009>=</tags::_literal_0009><tags::attr_val><tags::dquote_val>"foo"</tags::dquote_val></tags::attr_val></tags::eql_attr_val></tags::_opt_eql_attr_val></tags::attr></tags::_repeat_attr><tags::_literal_0013>&gt;</tags::_literal_0013></tags::open_tag><tags::_repeat_item><tags::item><tags::doc_data>FOO</tags::doc_data></tags::item></tags::_repeat_item><tags::opt_close_tag><tags::_literal_001b>&lt;/</tags::_literal_001b><tags::close_id>a</tags::close_id><tags::_literal_0013>&gt;</tags::_literal_0013></tags::opt_close_tag></tags::tag></tags::item><tags::item><tags::tag><tags::open_tag><tags::_literal_0019>&lt;</tags::_literal_0019><tags::tag_id>t3</tags::tag_id><tags::_repeat_attr></tags::_repeat_attr><tags::_literal_0013>&gt;</tags::_literal_0013></tags::open_tag><tags::_repeat_item></tags::_repeat_item><tags::opt_close_tag><tags::_literal_001b>&lt;/</tags::_literal_001b><tags::close_id>t3</tags::close_id><tags::_literal_0013>&gt;</tags::_literal_0013></tags::opt_close_tag></tags::tag></tags::item></tags::_repeat_item><tags::opt_close_tag><tags::_literal_001b>&lt;/</tags::_literal_001b><tags::close_id>t1</tags::close_id><tags::_literal_0013>&gt;</tags::_literal_0013></tags::opt_close_tag></tags::tag></tags::item></tags::_repeat_item><tags::trailing>
+</tags::trailing></tags::start>link: FOO
+target: "foo"
+
diff --git a/test/tags4.lm b/test/tags4.lm
new file mode 100644
index 0000000..f710378
--- /dev/null
+++ b/test/tags4.lm
@@ -0,0 +1,350 @@
+##### LM #####
+#
+#
+# This is somewhat broken. missing_close_id is cuasing close ids to be parseed
+# when they shouldn't. Maybe remove it.
+#
+#
+
+context tags
+ #
+ # Regular Definitions
+ #
+ rl def_name_char /[\-A-Za-z0-9._:?]/
+ rl def_name /[A-Za-z_:] def_name_char*/
+ rl def_system_literal /'"' [^"]* '"' | "'" [^']* "'"/
+
+ #
+ # Scanner for tag names.
+ #
+ lex
+ ignore /space+/
+ token tag_id /def_name/
+ end
+
+ #
+ # Scanner for attributes names
+ #
+ lex
+ ignore /space+/
+ token attr_name /def_name_char+/
+ literal `=
+ end
+
+ literal `> `/>
+
+ # Scanner for attribute values.
+ lex
+ ignore /space+/
+ token dquote_val /'"' ([^"] | '\\' any)* '"'/
+ token squote_val /"'" ([^'] | '\\' any)* "'"/
+ token unq_val /[^ \t\r\n<>"'] [^ \t\r\n<>]*/
+ end
+
+ #
+ # Tokens
+ #
+
+ lex
+ ignore /space+/
+
+ literal `< `</ `<!DOCTYPE
+ token close_tag
+ /'</' [\t ]* [a-zA-Z]+ '>'/
+
+ token doc_data /[^<]+/
+ token comment /'<!--' any* :>> '-->'/
+ end
+
+ #
+ # Tags
+ #
+
+ bool inTagStack( id: str )
+ {
+ LocalTagStack: tag_stack = TagStack
+ for Tag: tag_id in LocalTagStack {
+ if id == Tag.data
+ return true
+ }
+ return false
+ }
+
+ # This scanner is just for the id in close tags. The id needs to be looked up
+ # in the tag stack so we can determine if it is a stray.
+ lex
+ # Ignore whitespace.
+ ignore /space+/
+
+ token stray_close_id //
+ token missing_close_id //
+
+ token close_id /def_name/
+ {
+ # If it is in the tag stack then it is a close_id. If not then it's a
+ # stray_close_id.
+ send_id: int = typeid<stray_close_id>
+
+ if ( inTagStack( match_text ) ) {
+ print( 'CLOSE \'' match_text '\' IN TAG STACK\n' )
+
+ # The tag is in the stack, send missing close tags until we get to it.
+ match TagStack [Top:tag_id Rest:tag_stack]
+ TagStack = Rest
+ while ( Top.data != match_text ) {
+ print( 'SENDING missing close\n' )
+ input.push( make_token( typeid<missing_close_id> '' ) )
+ match TagStack [Top2:tag_id Rest2:tag_stack]
+ Top = Top2
+ TagStack = Rest2
+ }
+
+ print( 'SENDING close\n' )
+ input.push( make_token( typeid<close_id> input.pull( match_length ) ) )
+ }
+ else {
+ print( 'CLOSE \'' match_text '\' NOT IN TAG STACK\n' )
+ # The tag is not in the tag stack so send the id as a stray close.
+ input.push( make_token( typeid<stray_close> input.pull( match_length ) ) )
+ }
+ }
+ end
+
+ #
+ # Tag Stack
+ #
+
+ def tag_stack
+ [tag_id tag_stack]
+ | []
+
+ TagStack: tag_stack
+
+ #
+ # Document Type
+ #
+ # This scanner handles inside DOCTYPE tags (except keywords).
+ lex
+ ignore /space+/
+ token dt_name /def_name/
+ token dt_literal /def_system_literal/
+ token dt_bl /"[" [^\]]* "]"/
+ token dt_close /'>'/
+ end
+
+ # Using a separate scanner for the keywords in DOCTYPE prevents them from
+ # covering dt_name
+ lex
+ ignore /space+/
+ literal `SYSTEM `PUBLIC
+ end
+
+ def DOCTYPE [`<!DOCTYPE dt_name external_id dt_bl? dt_close]
+
+ def external_id
+ [`SYSTEM dt_literal?]
+ | [`PUBLIC dt_literal dt_literal?]
+
+ #
+ # Tags, with optionanal close.
+ #
+
+ def tag
+ [open_tag item* close_tag]
+
+ def unclosed_tag
+ [open_tag item* missing_close_id]
+
+ def open_tag
+ [`< tag_id attr* `>]
+ {
+ TagStack = construct tag_stack
+ [r2 TagStack]
+ }
+
+ #
+ # Empty tags
+ #
+ def empty_tag
+ [`< tag_id attr* `/>]
+
+ #
+ # Stray close tags
+ #
+ def stray_close
+ [close_tag]
+
+
+ #
+ # Attributes
+ #
+
+ def attr
+ [attr_name eql_attr_val?]
+
+ def eql_attr_val [`= attr_val]
+
+ def attr_val
+ [squote_val]
+ | [dquote_val]
+ | [unq_val]
+ | []
+
+ #
+ # Items
+ #
+
+ def item
+ [DOCTYPE]
+ | [tag]
+ | [unclosed_tag]
+ | [empty_tag]
+ | [stray_close]
+ | [doc_data]
+ | [comment]
+
+
+ token trailing /any*/
+
+ def start
+ [item* trailing]
+
+ #
+ # END GRAMMAR
+ #
+
+ int addDefaultAltTags( Start: ref<start> )
+ {
+ for T: open_tag in Start {
+ require T
+ ["<img" AttrList: attr* '>']
+
+ haveAlt: bool = false
+ for A: attr in T {
+ if match A ["alt=" attr_val]
+ haveAlt = true
+ }
+
+ if !haveAlt {
+ for AL: attr* in T {
+ if match AL [] {
+ AL = construct attr*
+ [" alt=\"default alt\""]
+ break
+ }
+ }
+ }
+ }
+ }
+
+ int printLinks( Start: start )
+ {
+ for A:tag in Start {
+ require A
+ ["<a" AttrList: attr* ">" I: item* "</a>"]
+
+ for Attr: attr in AttrList {
+ if match Attr ["href = " AttrVal: attr_val]
+ print( 'link: ' I '\ntarget: ' AttrVal '\n\n' )
+ }
+ }
+ }
+
+
+ bool should_close( TI: tag_id )
+ {
+ return true
+ }
+
+ bool should_flatten( TI: tag_id )
+ {
+ return true
+ }
+end # tags
+
+# Finds unclosed tags and puts the content after the tag. Afterwards
+# all unclosed tags will be empty 'inside'.
+#int flatten( Start: ref<start> )
+#{
+# for TL: item* in Start {
+# require TL
+# [OT: open_tag Inside: item* Trailing: item*]
+#
+# match OT
+# ['<' TagId: tag_id attr* '>']
+#
+# if should_flatten( TagId )
+# {
+# require Inside
+# [item item*]
+#
+# # Put Trailing at the end of inside.
+# for END: item* in Inside {
+# if match END [] {
+# END = Trailing
+# break
+# }
+# }
+#
+# str empty = ''
+# missing_close_id Missing = construct missing_close_id [empty]
+# opt_close_tag EmptyCloseTag =
+# construct opt_close_tag [Missing]
+#
+# # Close the tag and put inside after it.
+# TL = construct item*
+# [OT EmptyCloseTag Inside]
+# }
+# }
+#}
+#
+#int close( Start: ref<start> )
+#{
+# for TL: item in Start {
+# require TL
+# [OpenTag: open_tag Inside: item*]
+#
+# match OpenTag
+# ['<' TagId: tag_id attr* '>']
+#
+# if should_close( TagId )
+# {
+# close_id CloseId = construct close_id
+# [TagId.data]
+#
+# opt_close_tag CloseTag =
+# construct opt_close_tag ['</' CloseId '>']
+#
+# # Close the tag and put inside after it.
+# TL = construct item
+# [OpenTag Inside CloseTag]
+# }
+# }
+#}
+
+cons Tags: tags[]
+Tags.TagStack = construct tags::tag_stack []
+parse HTML: tags::start(Tags)[ stdin ]
+print( HTML )
+
+#print_xml( HTML )
+#for C: close_tag in HTML
+# print( C '\n' )
+##### IN #####
+<t1>
+
+ <t2>
+ <a href="foo">&FOO</a>
+ <t3>
+ </t3>
+
+</t1>
+##### EXP #####
+<t1>
+
+ <t2>
+ <a href="foo">&FOO</a>
+ <t3>
+ </t3>
+
+</t1>
diff --git a/test/tcontext1.lm b/test/tcontext1.lm
new file mode 100644
index 0000000..86db718
--- /dev/null
+++ b/test/tcontext1.lm
@@ -0,0 +1,35 @@
+##### LM #####
+
+lex
+ token tIDENTIFIER /[a-z][a-zA-Z_]*/ -ni
+ ignore /[ \t\n]+/
+ ignore comment /'#' [^\n]* '\n'/
+end
+
+lex
+ ignore /[\t ]+/
+ ignore /'#' [^\n]*/
+ literal `;
+ token NL /'\n'/
+end
+
+# Required whitespace, but newline is not allowed.
+token ws_no_nl
+ /[ \t]+ [^ \t\n]/
+ {
+ input.push( make_token( typeid<ws_no_nl> input.pull(match_length-1) ) )
+ }
+
+def method_call
+ [tIDENTIFIER ws_no_nl tIDENTIFIER `; NL]
+
+parse R: method_call[stdin]
+
+print_xml( R )
+print( '\n' )
+
+##### IN #####
+a bc;
+##### EXP #####
+<method_call><tIDENTIFIER>a</tIDENTIFIER><ws_no_nl> </ws_no_nl><tIDENTIFIER>bc</tIDENTIFIER><_literal_000b>;</_literal_000b><NL>
+</NL></method_call>
diff --git a/test/til.lm b/test/til.lm
new file mode 100644
index 0000000..6a93ab3
--- /dev/null
+++ b/test/til.lm
@@ -0,0 +1,194 @@
+##### LM #####
+lex
+ literal `var `if `then `else `while `do `for `read `write
+ `end `to `goto
+
+ literal `:= `!= `; `+ `- `* `/ `= `( `) `:
+
+ ignore /'//' [^\n]* '\n'/
+ ignore /[\n\t ]+/
+ token id /[a-zA-Z_]+/
+ token integernumber /[0-9]+/
+ token stringlit /'"' [^"]* '"'/
+end
+
+def program
+ [statement*]
+
+def statement
+ [declaration]
+| [assignment_statement]
+| [if_statement]
+| [while_statement]
+| [do_statement]
+| [for_statement]
+| [read_statement]
+| [write_statement]
+| [labelled_statement]
+| [goto_statement]
+
+def declaration
+ [`var id `;]
+
+def assignment_statement
+ [id `:= expression `;]
+
+def if_statement
+ [`if expression `then statement* opt_else_statement `end]
+
+def opt_else_statement
+ [`else statement*]
+| []
+
+def while_statement
+ [`while expression `do statement* `end]
+
+def do_statement
+ [`do statement* `while expression `;]
+
+def for_statement
+ [`for id `:= expression `to expression `do statement* `end]
+
+def read_statement
+ [`read id `;]
+
+def write_statement
+ [`write expression `;]
+
+def expression
+ [term]
+| [expression eqop term]
+
+def eqop [`=] | [`!=]
+
+def term
+ [factor]
+| [term addop factor]
+
+def addop [`+] | [`-]
+
+def factor
+ [primary]
+| [factor mulop primary]
+
+def mulop [`*] | [`/]
+
+def primary
+ [id]
+| [lit]
+| [`( expression `)]
+
+def lit
+ [integernumber]
+| [stringlit]
+
+def labelled_statement
+ [id `: statement]
+
+def goto_statement
+ [`goto id `;]
+
+parse P: program[stdin]
+
+#for S:statement* in P
+#{
+# if match S [L0: id ':'
+# First: statement
+# Rest: statement*]
+# {
+# for Check: statement* in Rest
+# {
+# if match Check
+# ['if' E: expression 'then'
+# 'goto' Targ: id ';'
+# 'end'
+# T: statement*]
+# {
+# # This truncates Rest
+# Check = construct statement* []
+#
+# # Replace the labeled statement through to the goto with a
+# # do ... while.
+# S = construct statement*
+# ['do'
+# First
+# Rest
+# 'while' E ';'
+# T]
+# break
+# }
+# }
+# }
+#}
+
+for S: statement* in P
+{
+ if match S [Label: id `:
+ First: statement
+ Rest: statement*]
+ {
+ Expr: expression
+ Following: statement*
+
+ # Look though the remaining statements for a goto back to the label.
+ # The repeat iterator yields only top-level statement lists. It
+ # restricts our search to the same nesting depth as the label.
+ for Check: statement* in Rest
+ {
+ if match Check
+ [`if E: expression `then
+ `goto L:id `;
+ `end
+ SL: statement*]
+ {
+ Expr = E
+ Following = SL
+
+ # Check iterates over tails of Rest. Assigning an empty list
+ # to check truncates the Rest list. What we cut off is saved in
+ # Following (excluding the if statement).
+ Check = construct statement* []
+ }
+ }
+
+ # If a goto was found, then perform the rewrite.
+ if ( Expr )
+ {
+ # Replace the labelled statement through to the goto
+ # with a do ... while.
+ S = construct statement* [
+ "do
+ " [^First]
+ " [^Rest]
+ "while [^Expr];
+ Following]
+ }
+ }
+}
+
+print( P )
+##### IN #####
+
+var a;
+a := 1;
+
+head:
+
+a := a + 1;
+c := d;
+
+if a = 10 then
+ goto head;
+end
+
+hi := there;
+##### EXP #####
+
+var a;
+a := 1;
+
+do
+ a := a + 1;
+ c := d;
+while a = 10;
+hi := there;
diff --git a/test/translate1.lm b/test/translate1.lm
new file mode 100644
index 0000000..4403ca6
--- /dev/null
+++ b/test/translate1.lm
@@ -0,0 +1,28 @@
+##### LM #####
+lex
+ ignore /space+/
+ literal `* `( `)
+ token id /[a-zA-Z_]+/
+ {
+ t: str = input.pull( match_length )
+ input.push( make_token( typeid<id> t ) )
+ }
+end
+
+def foo [id]
+
+def item
+ [id]
+| [foo]
+| [`( item* `)]
+
+def start
+ [item*]
+
+parse Input: start[ stdin ]
+print( Input )
+
+##### IN #####
+a b ( c d ) e f
+##### EXP #####
+a b ( c d ) e f
diff --git a/test/translate2.lm b/test/translate2.lm
new file mode 100644
index 0000000..47bda35
--- /dev/null
+++ b/test/translate2.lm
@@ -0,0 +1,62 @@
+##### LM #####
+lex
+ ignore /space+/
+ literal `# `{ `}
+ token id2 /[a-zA-Z_]+/
+end
+
+def item2
+ [id2]
+| [`{ item2* `}]
+
+def start2
+ [item2*]
+
+context ctx
+
+ lex
+ ignore /space+/
+ literal `* `( `) `!
+ token SEMI_NL /';\n'/
+ token id /[a-zA-Z_0-9]+/
+
+ token ddd /'...'/ {
+ print('translating\n')
+ input.pull( match_length )
+ input.push( make_token( typeid<id> "dot" ) )
+ input.push( make_token( typeid<id> "dot" ) )
+ input.push( make_token( typeid<id> "dot" ) )
+ }
+ end
+
+ def item
+ [id]
+ | [`( item* `)]
+
+ def A [] {
+ print( 'A\n' )
+ }
+
+ def B [] {
+ print( 'B\n' )
+ }
+
+
+ def start
+ [A item* `!]
+ | [B item* SEMI_NL]
+
+end # ctx
+
+CTX: ctx = cons ctx []
+parse Input: ctx::start( CTX ) [ stdin ]
+print( Input )
+
+##### IN #####
+a b c ( d1 ... d2 ) e f g ;
+##### EXP #####
+A
+translating
+B
+translating
+a b c ( d1 dotdotdot d2 ) e f g ;
diff --git a/test/travs1.lm b/test/travs1.lm
new file mode 100644
index 0000000..c2f7171
--- /dev/null
+++ b/test/travs1.lm
@@ -0,0 +1,286 @@
+##### LM #####
+lex
+ ignore /[\t\n ]+/
+ literal `^ `| `- `, `: `! `? `.
+ literal `( `) `{ `} `* `& `+
+
+ literal `-- `:> `:>> `<: `-> `**
+
+ token word /[a-zA-Z_][a-zA-Z0-9_]*/
+ token uint /[0-9]+/
+end
+
+
+def start [expression]
+
+def expression [term expression_op*]
+
+def expression_op
+ [`| term]
+| [`& term]
+| [`- term]
+| [`-- term]
+
+def term [factor_rep term_rest]
+
+# This list is done manually to get shortest match.
+def term_rest
+ []
+| [term_op term_rest]
+
+def term_op
+ [factor_rep]
+| [`. factor_rep]
+| [`:> factor_rep]
+| [`:>> factor_rep]
+| [`<: factor_rep]
+
+def factor_rep
+ [factor_neg factor_rep_op*]
+
+def factor_rep_op
+ [`*]
+| [`**]
+| [`?]
+| [`+]
+| [`{ factor_rep_num `}]
+| [`{ `, factor_rep_num `}]
+| [`{ factor_rep_num `, `}]
+| [`{ factor_rep_num `, factor_rep_num `}]
+
+def factor_rep_num [uint]
+
+def factor_neg
+ [`! factor_neg]
+| [`^ factor_neg]
+| [factor]
+
+def factor
+ [alphabet_num]
+| [word]
+| [`( expression `)]
+
+def alphabet_num
+ [uint]
+
+parse S: start[stdin]
+
+#
+# Top-Down, Left-Right
+#
+
+int do_topdown_leftright( T: ref<any> )
+{
+ for C:any in child(T) {
+ yield C
+ do_topdown_leftright( C )
+ }
+}
+
+iter topdown_leftright( T: ref<any> )
+{
+ do_topdown_leftright( T )
+}
+
+#
+# Bottom-Up, Left-Right
+#
+
+int do_bottomup_leftright( T: ref<any> )
+{
+ for C:any in child(T) {
+ do_bottomup_leftright( C )
+ yield C
+ }
+}
+
+iter bottomup_leftright( T: ref<any> )
+{
+ do_bottomup_leftright( T )
+}
+
+
+#
+# Top-Down, Right-Left
+#
+
+int do_topdown_rightleft( T: ref<any> )
+{
+ for C:any in rev_child(T) {
+ yield C
+ do_topdown_rightleft( C )
+ }
+}
+
+iter topdown_rightleft( T: ref<any> )
+{
+ do_topdown_rightleft( T )
+}
+
+#
+# Bottom-Up, Right-Left
+#
+
+int do_bottomup_rightleft( T: ref<any> )
+{
+ for C:any in rev_child(T) {
+ do_bottomup_rightleft( C )
+ yield C
+ }
+}
+
+iter bottomup_rightleft( T: ref<any> )
+{
+ do_bottomup_rightleft( T )
+}
+
+#
+# Testing
+#
+
+print( 'bottomup_leftright\n' )
+for T1: any in bottomup_leftright( S )
+{
+ print( ^T1 '\n' )
+}
+
+print( 'bottomup_rightleft\n' )
+for T2: any in bottomup_rightleft( S )
+{
+ print( ^T2 '\n' )
+}
+
+print( 'topdown_leftright\n' )
+for T3: any in topdown_leftright( S )
+{
+ print( ^T3 '\n' )
+}
+
+print( 'topdown_rightleft\n' )
+for T4: any in topdown_rightleft( S )
+{
+ print( ^T4 '\n' )
+}
+##### IN #####
+1 | 2 3
+##### EXP #####
+bottomup_leftright
+1
+1
+1
+1
+
+1
+
+1
+|
+2
+2
+2
+2
+
+2
+3
+3
+3
+3
+
+3
+3
+
+3
+2 3
+| 2 3
+
+| 2 3
+1 | 2 3
+bottomup_rightleft
+
+
+
+3
+3
+3
+3
+3
+3
+3
+
+2
+2
+2
+2
+2
+2 3
+|
+| 2 3
+| 2 3
+
+
+1
+1
+1
+1
+1
+1
+1 | 2 3
+topdown_leftright
+1 | 2 3
+1
+1
+1
+1
+1
+1
+
+
+| 2 3
+| 2 3
+|
+2 3
+2
+2
+2
+2
+2
+
+3
+3
+3
+3
+3
+3
+3
+
+
+
+topdown_rightleft
+1 | 2 3
+| 2 3
+
+| 2 3
+2 3
+3
+
+3
+3
+
+3
+3
+3
+3
+2
+
+2
+2
+2
+2
+|
+1
+
+1
+
+1
+1
+1
+1
diff --git a/test/treecmp1.lm b/test/treecmp1.lm
new file mode 100644
index 0000000..3bd5b23
--- /dev/null
+++ b/test/treecmp1.lm
@@ -0,0 +1,25 @@
+##### LM #####
+rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/
+rl number_pattern /[0-9]+/
+
+lex
+ ignore /[ \t\n]+/
+ token id /ident_pattern/
+ token number /number_pattern/
+end
+
+def four_ids
+ [id id id id]
+
+B: id = construct id "b"
+
+parse Input: four_ids[ stdin ]
+
+for Id: id in Input {
+ if ( Id == B )
+ print( B '\n' )
+}
+##### IN #####
+a b c d
+##### EXP #####
+b
diff --git a/test/typeref1.lm b/test/typeref1.lm
new file mode 100644
index 0000000..de1fa26
--- /dev/null
+++ b/test/typeref1.lm
@@ -0,0 +1,33 @@
+##### LM #####
+namespace n1
+
+ namespace n2
+ lex
+ token id / 'a' .. 'z' /
+ ignore / '\n' | '\t' | ' ' /
+ end
+
+ def start
+ [id*]
+ end
+end
+
+parse P: n1::n2::id*[stdin]
+print( P )
+##### IN #####
+
+##### EXP #####
+##### IN #####
+a
+##### EXP #####
+a
+##### IN #####
+a
+ b
+ c
+d
+##### EXP #####
+a
+ b
+ c
+d
diff --git a/test/typeref2.lm b/test/typeref2.lm
new file mode 100644
index 0000000..d95e3f1
--- /dev/null
+++ b/test/typeref2.lm
@@ -0,0 +1,34 @@
+##### LM #####
+namespace n1
+
+ namespace n2
+ lex
+ token id / 'a' .. 'z' /
+ ignore / '\n' | '\t' | ' ' /
+ end
+
+ def start
+ [id*]
+ end
+end
+
+parse P: n1::n2::id+[stdin]
+print( P )
+##### IN #####
+
+##### EXP #####
+NIL--noeol
+##### IN #####
+a
+##### EXP #####
+a
+##### IN #####
+a
+ b
+ c
+d
+##### EXP #####
+a
+ b
+ c
+d
diff --git a/test/typeref3.lm b/test/typeref3.lm
new file mode 100644
index 0000000..dedff0a
--- /dev/null
+++ b/test/typeref3.lm
@@ -0,0 +1,27 @@
+##### LM #####
+namespace n1
+
+ namespace n2
+ lex
+ token id / 'a' .. 'z' /
+ ignore / '\n' | '\t' | ' ' /
+ end
+
+ def start
+ [id*]
+ end
+end
+
+parse P: n1::n2::id?[stdin]
+print( P )
+##### IN #####
+
+##### EXP #####
+##### IN #####
+a
+##### EXP #####
+a
+##### IN #####
+a b
+##### EXP #####
+NIL--noeol
diff --git a/test/undofrag1.lm b/test/undofrag1.lm
new file mode 100644
index 0000000..a997cb8
--- /dev/null
+++ b/test/undofrag1.lm
@@ -0,0 +1,67 @@
+##### LM #####
+
+lex
+ ignore /space+/
+ literal `# `{ `}
+ token id2 /[a-zA-Z_]+/
+end
+
+def item2
+ [id2]
+| [`{ item2* `}]
+
+def start2
+ [item2*]
+
+
+context ctx
+
+ SP: parser<start2>
+
+ lex
+ ignore /space+/
+ literal `* `( `) `!
+ token semi_nl /';\n'/
+ token id /[a-zA-Z_]+/
+ end
+
+ def item
+ [id]
+ | [`( item* `)]
+
+
+ def A [] {
+ print( 'A\n' )
+ send SP "{ A{d} }"
+ }
+
+ def B [] {
+ print( 'B\n' )
+ send SP "{ B{d} }"
+ }
+
+ def start1
+ [A item* `!]
+ | [B item* semi_nl]
+
+end # ctx
+
+
+CTX: ctx = cons ctx []
+CTX.SP = cons parser<start2> []
+send CTX.SP "a b{c}"
+
+parse Input: ctx::start1( CTX )[stdin]
+
+send CTX.SP "{e}f g"
+
+print( Input )
+print( CTX.SP() '\n' )
+
+##### IN #####
+a b c ( d ) e f g ;
+##### EXP #####
+A
+B
+a b c ( d ) e f g ;
+a b{c}{ B{d} }{e}f g
diff --git a/test/undofrag2.lm b/test/undofrag2.lm
new file mode 100644
index 0000000..bbade5e
--- /dev/null
+++ b/test/undofrag2.lm
@@ -0,0 +1,50 @@
+##### LM #####
+context undo
+
+ lex
+ ignore /( ' ' | '\t')+/
+ literal `* `( `) `^ `;
+ token NL /'\n'/
+ token id /[a-zA-Z_]+/
+ end
+
+ Out: parser<out>
+
+ def out_item
+ [id]
+ | [`( item* `)]
+
+ def out
+ [out_item*]
+
+ def item
+ [id]
+ {
+ send Out [r1]
+ }
+ | [`( item* `)]
+ {
+ send Out ['(']
+ send Out [r2]
+ send Out [')']
+ }
+
+ def A1 []
+ def A2 []
+
+ def start
+ [A1 item* `^]
+ | [A2 item* `; NL]
+
+end # undo
+
+cons Undo: undo[]
+Undo.Out = construct parser<undo::out> []
+
+parse Input: undo::start(Undo)[ stdin ]
+print( Input )
+
+##### IN #####
+a b c;
+##### EXP #####
+a b c;
diff --git a/test/undofrag3.lm b/test/undofrag3.lm
new file mode 100644
index 0000000..ed96cba
--- /dev/null
+++ b/test/undofrag3.lm
@@ -0,0 +1,56 @@
+##### LM #####
+context undo
+
+ lex
+ ignore /( ' ' | '\t' )+/
+ literal `* `( `) `^ `; `.
+ token NL /'\n'/
+ token id /[a-zA-Z_]+/
+ end
+
+ Out: parser<out>
+
+ def out_item
+ [id]
+ | [`( item* `)]
+
+ def out
+ [out_item*]
+
+ def item
+ [id]
+ {
+ send Out [r1]
+ }
+ | [`( item* `)]
+ {
+ send Out ['(']
+ send Out [r2]
+ send Out [')']
+ }
+
+ def A1 []
+ def A2 []
+
+ def F
+ []
+ {
+ print_xml( Out() )
+ }
+
+ def start
+ [A1 item* F `. `^]
+ | [A2 item* F `. `; NL]
+
+end # undo
+
+cons Undo: undo[]
+Undo.Out = construct parser<undo::out> []
+
+parse Input: undo::start(Undo)[ stdin ]
+print( Input )
+
+##### IN #####
+a . ;
+##### EXP #####
+<undo::out><undo::_repeat_out_item><undo::out_item><undo::id>a</undo::id></undo::out_item></undo::_repeat_out_item></undo::out><undo::out><undo::_repeat_out_item><undo::out_item><undo::id>a</undo::id></undo::out_item></undo::_repeat_out_item></undo::out>a . ;
diff --git a/test/while1.lm b/test/while1.lm
new file mode 100644
index 0000000..645c28d
--- /dev/null
+++ b/test/while1.lm
@@ -0,0 +1,52 @@
+##### LM #####
+while 0
+ print( '0\n' )
+
+global I: int = 3
+
+int f()
+{
+ I = I - 1
+ print( ' ' I )
+}
+
+# simple expr and stmt
+while I
+ f()
+print( '\n' )
+
+# compound stmt list
+I = 3
+while I
+{
+ I = I - 1
+ print( ' ' I )
+}
+print( '\n' )
+
+# paren expr
+I = 3
+while ( I )
+ f()
+print( '\n' )
+
+# expr with computation
+I = 3
+while ( I + 1 )
+ f()
+print( '\n' )
+
+# computation and stmt list
+I = 3
+while ( I + 2 )
+{
+ I = I - 1
+ print( ' ' I )
+}
+print( '\n' )
+##### EXP #####
+ 2 1 0
+ 2 1 0
+ 2 1 0
+ 2 1 0 -1
+ 2 1 0 -1 -2