/** \file
 *  This C header file was generated by $ANTLR version 3.4
 *
 *     -  From the grammar source file : ANTLRv3.g
 *     -                            On : 2016-01-26 14:40:45
 *     -                for the parser : ANTLRv3ParserParser
 *
 * Editing it, at least manually, is not wise.
 *
 * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws.
 *
 *
 * The parser 
ANTLRv3Parser

has the callable functions (rules) shown below,
 * which will invoke the code for the associated rule in the source grammar
 * assuming that the input stream is pointing to a token/text stream that could begin
 * this rule.
 *
 * For instance if you call the first (topmost) rule in a parser grammar, you will
 * get the results of a full parse, but calling a rule half way through the grammar will
 * allow you to pass part of a full token stream to the parser, such as for syntax checking
 * in editors and so on.
 *
 * The parser entry points are called indirectly (by function pointer to function) via
 * a parser context typedef pANTLRv3Parser, which is returned from a call to ANTLRv3ParserNew().
 *
 * The methods in pANTLRv3Parser are  as follows:
 *
 *  - 
 ANTLRv3Parser_grammarDef_return
      pANTLRv3Parser->grammarDef(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_tokensSpec_return
      pANTLRv3Parser->tokensSpec(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_tokenSpec_return
      pANTLRv3Parser->tokenSpec(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_attrScope_return
      pANTLRv3Parser->attrScope(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_action_return
      pANTLRv3Parser->action(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_actionScopeName_return
      pANTLRv3Parser->actionScopeName(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_optionsSpec_return
      pANTLRv3Parser->optionsSpec(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_option_return
      pANTLRv3Parser->option(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_optionValue_return
      pANTLRv3Parser->optionValue(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rule_return
      pANTLRv3Parser->rule(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_ruleAction_return
      pANTLRv3Parser->ruleAction(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_throwsSpec_return
      pANTLRv3Parser->throwsSpec(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_ruleScopeSpec_return
      pANTLRv3Parser->ruleScopeSpec(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_block_return
      pANTLRv3Parser->block(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_altpair_return
      pANTLRv3Parser->altpair(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_altList_return
      pANTLRv3Parser->altList(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_alternative_return
      pANTLRv3Parser->alternative(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_exceptionGroup_return
      pANTLRv3Parser->exceptionGroup(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_exceptionHandler_return
      pANTLRv3Parser->exceptionHandler(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_finallyClause_return
      pANTLRv3Parser->finallyClause(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_element_return
      pANTLRv3Parser->element(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_atom_return
      pANTLRv3Parser->atom(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_notSet_return
      pANTLRv3Parser->notSet(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_notTerminal_return
      pANTLRv3Parser->notTerminal(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_elementOptions_return
      pANTLRv3Parser->elementOptions(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_elementOption_return
      pANTLRv3Parser->elementOption(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_treeSpec_return
      pANTLRv3Parser->treeSpec(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_range_return
      pANTLRv3Parser->range(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_terminal_return
      pANTLRv3Parser->terminal(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_ebnf_return
      pANTLRv3Parser->ebnf(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_ebnfSuffix_return
      pANTLRv3Parser->ebnfSuffix(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_return
      pANTLRv3Parser->rewrite(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_alternative_return
      pANTLRv3Parser->rewrite_alternative(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_tree_block_return
      pANTLRv3Parser->rewrite_tree_block(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_tree_alternative_return
      pANTLRv3Parser->rewrite_tree_alternative(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_tree_element_return
      pANTLRv3Parser->rewrite_tree_element(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_tree_atom_return
      pANTLRv3Parser->rewrite_tree_atom(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_tree_ebnf_return
      pANTLRv3Parser->rewrite_tree_ebnf(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_tree_return
      pANTLRv3Parser->rewrite_tree(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_template_return
      pANTLRv3Parser->rewrite_template(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_template_ref_return
      pANTLRv3Parser->rewrite_template_ref(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_indirect_template_head_return
      pANTLRv3Parser->rewrite_indirect_template_head(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_template_args_return
      pANTLRv3Parser->rewrite_template_args(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_rewrite_template_arg_return
      pANTLRv3Parser->rewrite_template_arg(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_qid_return
      pANTLRv3Parser->qid(pANTLRv3Parser)
 *  - 
 ANTLRv3Parser_id_return
      pANTLRv3Parser->id(pANTLRv3Parser)
 * 
 * 
 *
 * The return type for any particular rule is of course determined by the source
 * grammar file.
 */
// [The "BSD license"]
// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
// http://www.temporal-wave.com
// http://www.linkedin.com/in/jimidle
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
//    derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#ifndef	_ANTLRv3Parser_H
#define _ANTLRv3Parser_H
/* =============================================================================
 * Standard antlr3 C runtime definitions
 */
#include    <antlr3.h>

/* End of standard antlr 3 runtime definitions
 * =============================================================================
 */

#ifdef __cplusplus
extern "C" {
#endif

// Forward declare the context typedef so that we can use it before it is
// properly defined. Delegators and delegates (from import statements) are
// interdependent and their context structures contain pointers to each other
// C only allows such things to be declared if you pre-declare the typedef.
//
typedef struct ANTLRv3Parser_Ctx_struct ANTLRv3Parser, * pANTLRv3Parser;



#ifndef _WIN32
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wparentheses"
#ifdef __APPLE__
// Comparison of unsigned expression >= 0 is always true.
#pragma GCC diagnostic ignored "-Wtautological-compare"
#else
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6 )
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif
#endif
#else
#pragma warning(disable:4296) // Condition is always true.
#endif


#ifdef	ANTLR3_WINDOWS
// Disable: Unreferenced parameter,							- Rules with parameters that are not used
//          constant conditional,							- ANTLR realizes that a prediction is always true (synpred usually)
//          initialized but unused variable					- tree rewrite variables declared but not needed
//          Unreferenced local variable						- lexer rule declares but does not always use _type
//          potentially unitialized variable used			- retval always returned from a rule
//			unreferenced local function has been removed	- susually getTokenNames or freeScope, they can go without warnigns
//
// These are only really displayed at warning level /W4 but that is the code ideal I am aiming at
// and the codegen must generate some of these warnings by necessity, apart from 4100, which is
// usually generated when a parser rule is given a parameter that it does not use. Mostly though
// this is a matter of orthogonality hence I disable that one.
//
#pragma warning( disable : 4100 )
#pragma warning( disable : 4101 )
#pragma warning( disable : 4127 )
#pragma warning( disable : 4189 )
#pragma warning( disable : 4505 )
#pragma warning( disable : 4701 )
#endif

/* ========================
 * BACKTRACKING IS ENABLED
 * ========================
 */

typedef struct ANTLRv3Parser_grammarDef_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_grammarDef_return;



typedef struct ANTLRv3Parser_tokensSpec_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_tokensSpec_return;



typedef struct ANTLRv3Parser_tokenSpec_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_tokenSpec_return;



typedef struct ANTLRv3Parser_attrScope_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_attrScope_return;



typedef struct ANTLRv3Parser_action_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_action_return;



typedef struct ANTLRv3Parser_actionScopeName_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_actionScopeName_return;



typedef struct ANTLRv3Parser_optionsSpec_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_optionsSpec_return;



typedef struct ANTLRv3Parser_option_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_option_return;



typedef struct ANTLRv3Parser_optionValue_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_optionValue_return;



typedef struct ANTLRv3Parser_rule_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rule_return;



typedef struct ANTLRv3Parser_ruleAction_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_ruleAction_return;



typedef struct ANTLRv3Parser_throwsSpec_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_throwsSpec_return;



typedef struct ANTLRv3Parser_ruleScopeSpec_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_ruleScopeSpec_return;



typedef struct ANTLRv3Parser_block_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_block_return;



typedef struct ANTLRv3Parser_altpair_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_altpair_return;



typedef struct ANTLRv3Parser_altList_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_altList_return;



typedef struct ANTLRv3Parser_alternative_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_alternative_return;



typedef struct ANTLRv3Parser_exceptionGroup_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_exceptionGroup_return;



typedef struct ANTLRv3Parser_exceptionHandler_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_exceptionHandler_return;



typedef struct ANTLRv3Parser_finallyClause_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_finallyClause_return;



typedef struct ANTLRv3Parser_element_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_element_return;



typedef struct ANTLRv3Parser_atom_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_atom_return;



typedef struct ANTLRv3Parser_notSet_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_notSet_return;



typedef struct ANTLRv3Parser_notTerminal_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_notTerminal_return;



typedef struct ANTLRv3Parser_elementOptions_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_elementOptions_return;



typedef struct ANTLRv3Parser_elementOption_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_elementOption_return;



typedef struct ANTLRv3Parser_treeSpec_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_treeSpec_return;



typedef struct ANTLRv3Parser_range_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_range_return;



typedef struct ANTLRv3Parser_terminal_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_terminal_return;



typedef struct ANTLRv3Parser_ebnf_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_ebnf_return;



typedef struct ANTLRv3Parser_ebnfSuffix_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_ebnfSuffix_return;



typedef struct ANTLRv3Parser_rewrite_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_return;



typedef struct ANTLRv3Parser_rewrite_alternative_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_alternative_return;



typedef struct ANTLRv3Parser_rewrite_tree_block_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_tree_block_return;



typedef struct ANTLRv3Parser_rewrite_tree_alternative_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_tree_alternative_return;



typedef struct ANTLRv3Parser_rewrite_tree_element_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_tree_element_return;



typedef struct ANTLRv3Parser_rewrite_tree_atom_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_tree_atom_return;



typedef struct ANTLRv3Parser_rewrite_tree_ebnf_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_tree_ebnf_return;



typedef struct ANTLRv3Parser_rewrite_tree_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_tree_return;



typedef struct ANTLRv3Parser_rewrite_template_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_template_return;



typedef struct ANTLRv3Parser_rewrite_template_ref_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_template_ref_return;



typedef struct ANTLRv3Parser_rewrite_indirect_template_head_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_indirect_template_head_return;



typedef struct ANTLRv3Parser_rewrite_template_args_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_template_args_return;



typedef struct ANTLRv3Parser_rewrite_template_arg_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_rewrite_template_arg_return;



typedef struct ANTLRv3Parser_qid_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_qid_return;



typedef struct ANTLRv3Parser_id_return_struct
{
    /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees
     */
    pANTLR3_COMMON_TOKEN    start;
    pANTLR3_COMMON_TOKEN    stop;
    pANTLR3_BASE_TREE	tree;

}
    ANTLRv3Parser_id_return;




/* ruleAttributeScopeDecl(scope)
 */
/* makeScopeSet()
 */
 /** Definition of the rule scope variable tracking
 *  structure. An instance of this structure is created by calling
 *  ANTLRv3Parser_rulePush().
 */
typedef struct  ANTLRv3Parser_rule_SCOPE_struct
{
    /** Function that the user may provide to be called when the
     *  scope is destroyed (so you can free pANTLR3_HASH_TABLES and so on)
     *
     * \param POinter to an instance of this typedef/struct
     */
    void    (ANTLR3_CDECL *free)	(struct ANTLRv3Parser_rule_SCOPE_struct * frame);

    /* =============================================================================
     * Programmer defined variables...
     */
    pANTLR3_STRING name;

    /* End of programmer defined variables
     * =============================================================================
     */
}
    ANTLRv3Parser_rule_SCOPE, * pANTLRv3Parser_rule_SCOPE;


/** Context tracking structure for 
ANTLRv3Parser

 */
struct ANTLRv3Parser_Ctx_struct
{
    /** Built in ANTLR3 context tracker contains all the generic elements
     *  required for context tracking.
     */
    pANTLR3_PARSER   pParser;
    /* ruleAttributeScopeDef(scope)
     */
    /** Pointer to the  rule stack for use by pANTLRv3Parser_rulePush()
     *  and pANTLRv3Parser_rulePop()
     */
    pANTLR3_STACK pANTLRv3Parser_ruleStack;
    ANTLR3_UINT32 pANTLRv3Parser_ruleStack_limit;
    pANTLRv3Parser_rule_SCOPE   (*pANTLRv3Parser_rulePush)(struct ANTLRv3Parser_Ctx_struct * ctx);
    pANTLRv3Parser_rule_SCOPE   pANTLRv3Parser_ruleTop;




     ANTLRv3Parser_grammarDef_return
     (*grammarDef)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_tokensSpec_return
     (*tokensSpec)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_tokenSpec_return
     (*tokenSpec)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_attrScope_return
     (*attrScope)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_action_return
     (*action)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_actionScopeName_return
     (*actionScopeName)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_optionsSpec_return
     (*optionsSpec)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_option_return
     (*option)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_optionValue_return
     (*optionValue)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rule_return
     (*rule)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_ruleAction_return
     (*ruleAction)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_throwsSpec_return
     (*throwsSpec)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_ruleScopeSpec_return
     (*ruleScopeSpec)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_block_return
     (*block)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_altpair_return
     (*altpair)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_altList_return
     (*altList)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_alternative_return
     (*alternative)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_exceptionGroup_return
     (*exceptionGroup)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_exceptionHandler_return
     (*exceptionHandler)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_finallyClause_return
     (*finallyClause)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_element_return
     (*element)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_atom_return
     (*atom)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_notSet_return
     (*notSet)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_notTerminal_return
     (*notTerminal)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_elementOptions_return
     (*elementOptions)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_elementOption_return
     (*elementOption)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_treeSpec_return
     (*treeSpec)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_range_return
     (*range)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_terminal_return
     (*terminal)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_ebnf_return
     (*ebnf)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_ebnfSuffix_return
     (*ebnfSuffix)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_return
     (*rewrite)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_alternative_return
     (*rewrite_alternative)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_tree_block_return
     (*rewrite_tree_block)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_tree_alternative_return
     (*rewrite_tree_alternative)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_tree_element_return
     (*rewrite_tree_element)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_tree_atom_return
     (*rewrite_tree_atom)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_tree_ebnf_return
     (*rewrite_tree_ebnf)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_tree_return
     (*rewrite_tree)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_template_return
     (*rewrite_template)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_template_ref_return
     (*rewrite_template_ref)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_indirect_template_head_return
     (*rewrite_indirect_template_head)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_template_args_return
     (*rewrite_template_args)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_rewrite_template_arg_return
     (*rewrite_template_arg)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_qid_return
     (*qid)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLRv3Parser_id_return
     (*id)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLR3_BOOLEAN
     (*synpred100_ANTLRv3)	(struct ANTLRv3Parser_Ctx_struct * ctx);

     ANTLR3_BOOLEAN
     (*synpred101_ANTLRv3)	(struct ANTLRv3Parser_Ctx_struct * ctx);
    // Delegated rules

    const char * (*getGrammarFileName)();
    void            (*reset)  (struct ANTLRv3Parser_Ctx_struct * ctx);
    void	    (*free)   (struct ANTLRv3Parser_Ctx_struct * ctx);
/* @headerFile.members() */
pANTLR3_BASE_TREE_ADAPTOR	adaptor;
pANTLR3_VECTOR_FACTORY		vectors;
/* End @headerFile.members() */
};

// Function protoypes for the constructor functions that external translation units
// such as delegators and delegates may wish to call.
//
ANTLR3_API pANTLRv3Parser ANTLRv3ParserNew         (
pANTLR3_COMMON_TOKEN_STREAM
 instream);
ANTLR3_API pANTLRv3Parser ANTLRv3ParserNewSSD      (
pANTLR3_COMMON_TOKEN_STREAM
 instream, pANTLR3_RECOGNIZER_SHARED_STATE state);

/** Symbolic definitions of all the tokens that the 
parser
 will work with.
 * \{
 *
 * Antlr will define EOF, but we can't use that as it it is too common in
 * in C header files and that would be confusing. There is no way to filter this out at the moment
 * so we just undef it here for now. That isn't the value we get back from C recognizers
 * anyway. We are looking for ANTLR3_TOKEN_EOF.
 */
#ifdef	EOF
#undef	EOF
#endif
#ifdef	Tokens
#undef	Tokens
#endif
#define EOF      -1
#define T__73      73
#define T__74      74
#define T__75      75
#define T__76      76
#define T__77      77
#define T__78      78
#define T__79      79
#define T__80      80
#define T__81      81
#define T__82      82
#define T__83      83
#define T__84      84
#define T__85      85
#define T__86      86
#define T__87      87
#define T__88      88
#define T__89      89
#define T__90      90
#define T__91      91
#define T__92      92
#define T__93      93
#define T__94      94
#define T__95      95
#define T__96      96
#define ACTION      4
#define ACTION_CHAR_LITERAL      5
#define ACTION_ESC      6
#define ACTION_STRING_LITERAL      7
#define ALT_V3TOK      8
#define ARGLIST_V3TOK      9
#define ARG_ACTION      10
#define ARG_V3TOK      11
#define AT_V3TOK      12
#define BACKTRACK_SEMPRED_V3TOK      13
#define BANG_V3TOK      14
#define BLOCK_V3TOK      15
#define CATCH_SYM      16
#define CHAR_LITERAL      17
#define CHAR_RANGE_V3TOK      18
#define CLOSURE_V3TOK      19
#define COMBINED_GRAMMAR_V3TOK      20
#define DOC_COMMENT_V3TOK      21
#define DOT_SYM      22
#define DOUBLE_ANGLE_STRING_LITERAL      23
#define DOUBLE_QUOTE_STRING_LITERAL      24
#define EOA_V3TOK      25
#define EOB_V3TOK      26
#define EOR_V3TOK      27
#define EPSILON_V3TOK      28
#define ESC      29
#define FINALLY_SYM      30
#define FRAGMENT_V3TOK      31
#define GATED_SEMPRED_V3TOK      32
#define ID_V3TOK      33
#define INT      34
#define LABEL_ASSIGN_V3TOK      35
#define LABEL_V3TOK      36
#define LEXER_GRAMMAR_V3TOK      37
#define LEXER_V3TOK      38
#define LIST_LABEL_ASSIGN_V3TOK      39
#define LITERAL_CHAR      40
#define ML_COMMENT      41
#define NESTED_ACTION      42
#define NESTED_ARG_ACTION      43
#define OPTIONAL_V3TOK      44
#define OPTIONS      45
#define OPTIONS_SYM      46
#define PARSER_GRAMMAR_V3TOK      47
#define PARSER_V3TOK      48
#define POSITIVE_CLOSURE_V3TOK      49
#define RANGE_V3TOK      50
#define RET_V3TOK      51
#define REWRITE_V3TOK      52
#define ROOT_V3TOK      53
#define RULE_REF      54
#define RULE_V3TOK      55
#define SCOPE_V3TOK      56
#define SEMPRED_V3TOK      57
#define SL_COMMENT      58
#define SRC      59
#define SRC_SYM      60
#define STRING_LITERAL      61
#define SYNPRED_V3TOK      62
#define SYN_SEMPRED_V3TOK      63
#define TEMPLATE_V3TOK      64
#define TOKENS      65
#define TOKENS_SYM      66
#define TOKEN_REF      67
#define TREE_BEGIN_V3TOK      68
#define TREE_GRAMMAR_V3TOK      69
#define WS      70
#define WS_LOOP      71
#define XDIGIT      72
#ifdef	EOF
#undef	EOF
#define	EOF	ANTLR3_TOKEN_EOF
#endif

#ifndef TOKENSOURCE
#define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource
#endif

/* End of token definitions for ANTLRv3Parser
 * =============================================================================
 */
/** } */

#ifdef __cplusplus
}
#endif

#endif

/* END - Note:Keep extra line feed to satisfy UNIX systems */
