00001 """ANTLR3 runtime package""" 00002 00003 # begin[licence] 00004 # 00005 # [The "BSD licence"] 00006 # Copyright (c) 2005-2008 Terence Parr 00007 # All rights reserved. 00008 # 00009 # Redistribution and use in source and binary forms, with or without 00010 # modification, are permitted provided that the following conditions 00011 # are met: 00012 # 1. Redistributions of source code must retain the above copyright 00013 # notice, this list of conditions and the following disclaimer. 00014 # 2. Redistributions in binary form must reproduce the above copyright 00015 # notice, this list of conditions and the following disclaimer in the 00016 # documentation and/or other materials provided with the distribution. 00017 # 3. The name of the author may not be used to endorse or promote products 00018 # derived from this software without specific prior written permission. 00019 # 00020 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00021 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00022 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00023 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00024 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00025 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00026 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00027 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00028 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00029 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 # 00031 # end[licence] 00032 00033 EOF = -1 00034 00035 ## All tokens go to the parser (unless skip() is called in that rule) 00036 # on a particular "channel". The parser tunes to a particular channel 00037 # so that whitespace etc... can go to the parser on a "hidden" channel. 00038 DEFAULT_CHANNEL = 0 00039 00040 ## Anything on different channel than DEFAULT_CHANNEL is not parsed 00041 # by parser. 00042 HIDDEN_CHANNEL = 99 00043 00044 # Predefined token types 00045 EOR_TOKEN_TYPE = 1 00046 00047 ## 00048 # imaginary tree navigation type; traverse "get child" link 00049 DOWN = 2 00050 ## 00051 #imaginary tree navigation type; finish with a child list 00052 UP = 3 00053 00054 MIN_TOKEN_TYPE = UP+1 00055 00056 INVALID_TOKEN_TYPE = 0 00057