ProgressParser.java

// $ANTLR 2.7.7 (20060906): "progress.g" -> "ProgressParser.java"$

/*
** Module   : ProgressParser.java
**            ProgressParserTokenTypes.java
**            ProgressLexer.java
** Abstract : lex and parse Progress 4GL source code
**
** Copyright (c) 2004-2024, Golden Code Development Corporation.
**
** -#- -I- --Date-- --JPRM-- ----------------------------------Description-----------------------------------
** 001 GES 20041116   @18747 WARNING, THIS IS A GENERATED FILE!!! DO NOT EDIT THIS FILE. The original source
**                           file is progress.g!
*/

package com.goldencode.p2j.uast;

import java.io.*;
import java.util.*;
import java.util.function.*;
import java.util.logging.*;
import com.goldencode.ast.*;
import com.goldencode.p2j.schema.*;
import com.goldencode.util.*;
import com.goldencode.p2j.cfg.*;
import com.goldencode.p2j.convert.*;
import com.goldencode.p2j.preproc.*;
import com.goldencode.p2j.util.*;
import antlr.*;
import antlr.debug.misc.ASTFrame;

import antlr.TokenBuffer;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.ANTLRException;
import antlr.LLkParser;
import antlr.Token;
import antlr.TokenStream;
import antlr.RecognitionException;
import antlr.NoViableAltException;
import antlr.MismatchedTokenException;
import antlr.SemanticException;
import antlr.ParserSharedInputState;
import antlr.collections.impl.BitSet;
import antlr.collections.AST;
import java.util.Hashtable;
import antlr.ASTFactory;
import antlr.ASTPair;
import antlr.collections.impl.ASTArray;

/**
 * Creates an Abstract Syntax Tree (AST) representation of a Progress 4GL
 * source file from an input stream of tokens (provided by the
 * {@link ProgressLexer}).  More specifically, the parser does
 * the following:
 * <ul>
 *    <li> Drives the lexer by calling its' <code>nextToken</code> method.
 *         This method tokenizes the lexer's input stream of characters and
 *         returns the next found <code>Token</code> object.
 *    <li> Provides a set of methods designed as entry points.  The entry 
 *         points control the type of parsing that will occur. At this time
 *         there are 2 valid entry points:
 *       <ul>
 *          <li> {@link #external_proc} - this is designed to
 *               parse an entire <b>(already preprocessed)</b> Progress 4GL
 *               source file
 *          <li> {@link #expr} - designed to parse any valid 
 *               Progress 4GL expression
 *       </ul>
 *    <li> Recognizes the following Progress 4GL language features:
 *       <ul>
 *          <li> full expression processing for all data types
 *          <li> support for the data types character, logical, date, integer,
 *               decimal, handle, widget-handle (this type is actually
 *               rewritten by the lexer as a handle), raw, recid, rowid, 
 *               memptr and com-handle
 *          <li> structural features such as blocks, external procedures,
 *               internal procedures and functions
 *          <li> variables, labels, procedure names, widgets, function names
 *               streams, menus, sub-menus, menu-items and language keywords
 *               (including handling abbreviations and reserved keywords)
 *          <li> schema object support (database, table and field names)
 *          <li> assignment statements including lvalue processing
 *          <li> language statements
 *          <li> attribute and method support
 *          <li> built-in functions (including those that act like variables
 *               or which have unusual syntax like postfixed function names
 *               or no use of parenthesized parameter lists)
 *          <li> COM (Active-X) property and method support
 *          <li> ProDataSets (datasets, data-sources, data-relations)
 *          <li> object-oriented support (classes, interfaces, methods,
 *               properties, packages, data members)
 *          <li> directly embedded SQL
 *          <li> "fake" interfaces to duplicate the features that WebSpeed
 *               supports (PSC encodes the documented API for WebSpeed as
 *               4GL source code which is included in WebSpeed applications);
 *               by preloading the definitions for these features directly
 *               in the parser, we will treat these as real built-ins and
 *               eliminate the need for the PSC 4GL source code to be present
 *               in order to parse and convert WebSpeed applications; this
 *               is just an extra precaution since the WebSpeed code was
 *               open sourced and it is probably safe to convert but we will
 *               try to avoid it; 
 *       </ul>
 *    <li> Builds an AST (&quot;intermediate form representation&quot;) of
 *         all the recognized tokens.  This AST is designed for subsequent
 *         processing.  For example, an expression AST is evaluated by the
 *         {@link ExpressionEvaluator} and the related helper
 *         class {@link ExpressionEvaluator}.  The
 *         resulting AST matches the block structured nature of the Progress
 *         4GL, including the provision of nesting and the refusal to nest
 *         in certain cases (e.g. Progress 4GL does not allow nesting of
 *         procedure or function definitions, but it does allow for the
 *         nesting of blocks such as <code>do</code> or <code>repeat</code>).
 *    <li> Handles the context sensitive aspects of symbol resolution.
 *    <li> To the extent that is possible while still generating a well
 *         structured tree, the parser has been structured to enforce
 *         syntactic correctness.  This is typically well implemented in
 *         specific language statements (their structure enforces 100%
 *         syntactic correctness in more cases or it enforces nearly 100%
 *         correctness).  Due to ambiguities in the Progress 4GL language and
 *         constraints in the ANTLR parser generation, it is not always
 *         possible to make the parser's structure (i.e. the manner in which
 *         its rules nest and how the matching of each rule processes)
 *         enforce syntax checks. For some language features, these checks
 *         must be implemented using ANTLR's semantic or syntactic predicates
 *         and in other cases ANTLR's actions must be used for a completely
 *         custom set of checks.
 * </ul>
 * <p>
 * This grammar is highly specific to ANTLR 2.7.4 and it may not be valid
 * in future versions of ANTLR.  This is due to the fact that the generated
 * code and the grammar syntax of ANTLR can change between versions.  These
 * factors are the most important constraints defining the structure of the
 * resulting grammar.  As a result, it is possible that the grammar will
 * require changes to run in future versions of ANTLR.
 * <p> 
 * <b>Please note that this is a generated file using ANTLR 2.7.4 and a
 * grammar specified in <code>progress.g</code>.</b>
 * <p>
 * The generated parser is an LL(k) type parser.  This means that it is
 * top-down parser than recursively descends from top level rules through 
 * more and more specific rules until matches are found, in which case the
 * token is consumed from the input stream and the rules return up one level
 * to their calling rule and so on until processing completes a full top
 * level match and returns all the way up to the top level entry point.
 * <p>
 * The top level entry points are designed to either match a single construct
 * (e.g. <code>expr</code> which parses and matches a single expression) or 
 * to iteratively match a set of constructs that might comprise an entire
 * source file (e.g. <code>external_proc</code>).
 * <p>
 * Starting at the top level, the parser requests the next tokens from the
 * lexer in order to have the proper amount of lookahead.  The lookahead
 * depth defined as the &quot;k&quot; of the parser, and in this case the k 
 * = 2.  These lookahead tokens are compared to sets for each alternative
 * that is defined at the top level.  Where there is ambiguity, the first
 * match will trigger a call to the rule specified in the alternative (and/or
 * it will match any hard coded tokens in the alternative). Once that 
 * alternative is entered, the parser expects that it will begin matching
 * specified constructs at the top level or in one of the rules that will be
 * recursively called.  This matching consumes tokens from the lexer's stream
 * so a call to these rules is a one way process which must end in a complete 
 * match to the set of rules that can be reached from the top level
 * alternative that was predicted by the lookahead.  This means that the 
 * prediction logic is generated at the top level (outside of the rules)
 * but based on the contents of the rules.  So the consolidated lookahead of
 * all possible paths through the rules is rolled up into the prediction
 * logic at the top level while the matching doesn't occur until the
 * specific rules are recursively entered.  This roll up can create sets
 * of predictions that cannot actually occur in a given grammar, but which
 * appear to be possible based on the rolled up prediction logic.  This
 * can be the source of ambiguity and hence ANTLR warnings.  It is important
 * to keep the top level alternatives very distinct and to organize them
 * in a decreasing specificity order so that the order will naturally
 * resolve ambiguity using lookahead.
 * <p>
 * For details on how the context sensitive symbol resolution occurs, please
 * see {@link #primary_expr}, {@link #func_call}, {@link #lvalue},
 * {@link #record}, {@link #label_reference} and {@link #symbol}.  In
 * addition, it is important to review the lexer's role in symbol resolution 
 * (see {@link ProgressLexer#mSYMBOL}).
 * <p>
 * Implementation WARNING: <b>ANTLR syntactic predicates cannot be used</b> 
 * because this changes how the all code is generated such that all actions
 * are made conditional on the state of the guessing mode. The problem with
 * this is that the parser implementation is heavily designed based on an
 * assumption that all actions (especially init actions) are not conditional.
 * For example, many local variables are defined in init actions. As soon as
 * a single syntactic predicate is added to the parser, all init actions are
 * wrapped in an if () { } block which makes any defined local variables
 * immediately go out of scope and thus they are not available to the rest
 * of the method.  This breaks the parser.
 * <p>
 * Notes on understanding keyword usage: All keywords have a specific token
 * type. That type is an artificially created token which exists in one of
 * two ranges: <code>BEGIN_RESERVED</code> through <code>END_RESERVED</code>
 * (for the reserved keywords) and <code>BEGIN_UNRESERVED</code> through
 * <code>END_UNRESERVED</code> (for unreserved keywords). Then the lexer is
 * modified to have a {@link Keyword} instance definition in it's list of
 * keywords. These keywords are used for lookups and that processing handles
 * abbreviations, case-insensitivity and other features of Progress keyword
 * processing. The lexer converts symbols into keyword tokens when this
 * keyword lookup is successful. Then the parser matches on the keyword
 * token type as needed to match the 4GL language syntax. There are keywords
 * in the list which are not represented in parser rules.  This is a normal
 * case for the following: events, constants, built-in function names and
 * those built-in functions that act like global variables. All of those
 * cases provide the keyword so that downstream tree processing can easily
 * compare events, constants or the <code>oldtype</code> annotation on
 * built-in functions/variables.  Do NOT be disturbed by the lack of any
 * usage of these tokens in the parser itself.
 * <p>
 * Open TODOs/Issues:
 * <p>
 * <ul>
 *    <li> stored procedure support is present but not complete
 *    <ul>
 *       <li> procedures are schema objects that act like tables in some
 *            ways, but have additional behavior as well, this schema support
 *            does not exist
 *       <li> the stored procedure rules must be updated to dynamically
 *            create the special stored procedure names when needed, likewise
 *            there are buffer and field definitions that must be dynamically
 *            created during parsing (this will use the functionality noted
 *            above for the schema)
 *       <li> see the rules {@link #run_stored_proc_stmt} and
 *            {@link #close_stored_proc_stmt} for more details
 *    </ul>
 *    <li> schema name lookups are documented to give preference to tables
 *         over temp-tables in the case where both share the same name (this
 *         has not necessarily been explicitly tested and it isn't obvious if
 *         we have intentionally or unintentionally implemented this at all);
 *         but in addition, the DEFINE BUFFER statement now allows one to
 *         specify the TEMP-TABLE keyword to force temp-tables to be preferred
 *         over a table of the same name
 *    <li> any use of the <code>NAMESPACE-URI</code> and/or 
 *         <code>NAMESPACE-PREFIX</code> options (see 
 *         {@link #namespace_clause}) is not honored at this time
 *    <li> 4GL aggregate support seems to be implemented by using hidden
 *         variables that are created on the fly and which can be referenced
 *         and assigned directly from user code (without any explicit variable
 *         definition code); for example the integer variable COUNT can be
 *         directly referenced by user code when the COUNT aggregate is in
 *         use; these variables, their types and the exact moment of creation
 *         need to be investigated and added (it is all undocumented of
 *         course)
 *    <li> {@link #form_item} has an incomplete implementation to support
 *         inline AS or LIKE clauses; this will not match all possible cases
 *         where AS or LIKE appears later in the format phrase (since they
 *         can be arbitrarily ordered); see <code>isFormVarDefinition()</code>
 *         which is some example code for a partial solution but it does not
 *         work completely enough to be used;
 *    <li> {@link #constant_form_item}, {@link #column_ref} and
 *         {@link #browse_options_phrase} matches a subset of the format
 *         phrase but these options are not rooted as a FORMAT_PHRASE node;
 *         they should be rooted at such a node and when that happens, there
 *         will be "downstream" reporting code and conversion code that needs
 *         to be reworked (but that code will be much simpler); as a related
 *         question: should the options for the various variable definition
 *         mechanisms be rooted at a FORMAT_PHRASE?
 *    <li> {@link #def_var_stmt} may need to exclude RAW and MEMPTR fields
 *         from adding a WID_FILL_IN definition (like it does today for
 *         handle types)
 *    <li> should INPUT-VALUE be a synonym for SCREEN-VALUE or are these
 *         really different values?
 *    <li> should we support VAR_LONGCHAR and FIELD_CLOB in
 *         {@link #choose_keys_clause}?
 *    <li> confirm that properties and class data members (variables) share
 *         the same namespace as is suggested by the documentation
 *    <li> buffers, queries, temp-tables, prodatasets and data-sources can
 *         be protected resources of a parent class that are accessed from
 *         a child class; this is not implemented at this time and some
 *         example code is needed to fully demonstrate the requirements
 *         before implementation (this will affect the schema dictionary and
 *         the symbol resolver's resource lookup processing and loadViaWalk()
 *         method)
 *    <li> since the parser now provides "fake" interfaces to duplicate
 *         the features that WebSpeed supports, that support may not have
 *         been completely documented by PSC and as such it may not be
 *         complete
 *    <ul>
 *       <li> there are references in the WebSpeed documentation to variable
 *            names like "SelfURL", "AppURL" and CGI environment variables
 *            but there are no details on the types or usage of these, so at
 *            this time these are not yet added but may subsequently be found
 *            in real source code
 *       <li> it is likely that the features of HTML mapping and session
 *            management may provide procedures and functions that are not
 *            documented but which are used in real source code 
 *    </ul>
 * </ul> 
 */
public class ProgressParser extends antlr.LLkParser       implements ProgressParserTokenTypes
 {

   /** Logger. */
   private static final ConversionStatus LOG = ConversionStatus.get(ProgressParser.class);

   /** Our instance of the AstGenerator, if any. */
   private AstGenerator gen = null;
   
   /** Name of the specialized AST class to use when parsing. */
   private static final Class AST_CLASS = ProgressAst.class;

   /** Provides an efficient reverse lookup of names to token types. */
   private static Map tokenLookup = null;
   
   /** Debug mode for the parser. */
   private boolean debug = false;
   
   /** Tracks the nesting level of procedures and functions. */
   private int nestLevel = 0;
   
   /** Tracks the number of statements within a constructor. */
   private int constStmts = -1;
   
   /**
    * Contains all symbol resolution dictionaries and provides the 
    * maintenance/lookup methods.
    */
   private SymbolResolver sym = null;

   /**
    * Sets the bias in {@link #lvalue} toward (if <code>true</code>) or
    * away from (if <code>false</code>) widgets.  Defaults to 
    * <code>false</code>.
    */
   private boolean preferWidgets = false;
   
   /** Class name to use in {@link #lvalue} for data member lookups. */
   private String currentClassName = null;
   
   /** Flag to use in {@link #lvalue} for static-only data member lookups. */
   private boolean currentStaticFlag = false;
   
   /** Flag used in {@link #chained_object_members} for handling of widget qualifiers in dynamic-function. */
   private boolean inDynFunc = false;
   
   /**
    * Modify {@link #lvalue} processing when called from inside the
    * {@link #primary_expr} rule.
    */
   // private boolean inPrimaryExpr = false;
   
   /**
    * Modify {@link #lvalue} field annotations and {@link #subscript}
    * processing when inside a <code>LIKE</code> clause.
    */
   private boolean inLikeClause = false;
   
   /**
    * Modify {@link #lvalue} field annotations and {@link #subscript}
    * processing when inside a <code>FORM</code> clause.
    */
   private boolean inFormStatement = false;
   
   /** The current record being processed in this query. */
   private NameNode currentRecord = null;
   
   /** Modify {@link #expr} process when inside embedded SQL statements. */
   private boolean embeddedSql = false;
   
   /** Tracks the number of times an SQL UNION statement is nested. */
   private int sqlNestLevel = 0;
   
   /** Tracks the number of times an SQL SELECT statement is nested. */
   private int selectNestLevel = 0;
   
   /** <code>true</code> if processing an SQL UNION statement. */
   private boolean inUnion = false;
   
   /**
    * The name of the database field being currently processed for possible
    * validation.
    */
   private String validateFieldName = null;
   
   /** <code>true</code> if a validate expression is being processed. */
   private boolean validation = false;
   
   /**
    * The complete text (including hidden token text) for the combined tokens when the field name
    * quirk is fixed up.
    */
   private String fieldNameQuirkOriginalText = null;
   
   /**
    * Set to <code>false</code> when the parser is currently in an internal 
    * procedure, function or trigger, otherwise is set <code>true</code>.
    */
   private boolean bufferScope = true;
   
   /** Prefer temp-tables where the name conflicts with a table. */
   private boolean forceTemp = false;
   
   /** Prefer persistent tables where the name conflicts with a temp-table. */
   private boolean forcePersistent = false;
   
   /** Are we parsing code inside a method definition (includes constructors, destructors...). */
   private boolean inMethodDef = false;
   
   /** <code>true</code> if the parser was entered via external_proc. */
   private boolean topLevelEntry = false;
   
   /** Greater than 0 if the parser was entered via pre_scan_class. */
   private int preScanPass = 0;
   
   /** Tracks the level of recursion in the {@link #expr} rule. */
   private int exprLvl = 0;
   
   /** <code>true</code> if parsing a WebSpeed program. */
   private boolean webspeed = false;
   
   /** <code>true</code> to consume errors and automatically restart parsing. */
   private boolean consumeErr = true;
   
   /** Determines if the parser was entered for preprocessor expression evaluation. */
   private boolean evaluatingExpression = false;
   
   /**
    * Normally, the variable names are preferred when there is a collision with a field name
    * (see {@link #resolveLvalueCoreType}). However, in some cases the syntax requires a
    * field name (like {@link #field_mapping_clause}). Setting this value to {@code true}
    * will make the parser ignore variables and choose fields instead.
    */
   private boolean preferFields = false;
   
   /** Flag to allow {@link #lvalue} to match a <code>SYMBOL</code>. */
   private boolean allowSymbolMatch = false;

   /** Allows matching certain unquoted text as strings. */
   private boolean allowStringMatch = false;

   /** Avoids matching frames as an lvalue. */
   private boolean excludeFrame = false;

   /** Filter implementation to allow access to hidden tokens. */
   private TokenStreamHiddenTokenFilter hidden = null;
   
   /** Allow matching an unquoted method name in special cases. */
   private boolean insideClassEvent = false;
   
   /** Flag indicating we are processing the class body. */
   private boolean insideClass = false;
   
   /** <code>true</code> if we are parsing a built-in class/interface. */
   private boolean builtInCls = false;
   
   /** <code>true</code> if we are parsing a .NET class/interface. */
   private boolean dotNetCls = false;
   
   /** <code>true</code> if we are parsing inside a static method. */
   private boolean inStaticCtxt = false;
   
   /** The number of errors encountered during parsing */
   private int errorCount = 0;
   
   /** Flag indicating that {@link #un_type} may match a real assignment. */
   private boolean matchAssign = false;
   
   /**
    * Flag indicating the {@link #expr} must not emit an EXPRESSION node, regardless of 
    * {@code exprLvl}.
    */
   private boolean skipExpression = false;
   
   /** Honor backslashes as escape characters. */
   private boolean unixEscapes = true;

   /**
    * <code>true</code> if fields should be scoped to the default buffer. This is used in <code>FORM</code>
    * and <code>DEFINE FRAME</code> for unqualified lookups of fields.
    */
   private boolean preferDefaultBuffer = false;
   
   /**
    * Constructs a parser using a lexer and a user-defined symbol resolver.
    * This method ensures that the symbol resolver's function and variable
    * dictionaries are preloaded with the built-in symbols of the Progress
    * language.  This preloading must occur before parsing can begin.
    *
    * @param    lexer
    *           An instance of a <code>TokenStream</code> object.
    * @param    sr
    *           The user-defined (and optionally preloaded) symbol resolver.
    */
   public ProgressParser(TokenStream lexer, SymbolResolver sr)
   {
      // init our parent class
      this(lexer, 3);
      
      // shift into filter mode
      hidden = new ManagedHiddenStreamTokenFilter(lexer);
      setTokenBuffer(new TokenBuffer(hidden));
      
      // setup the lexer
      ((ProgressLexer)lexer).activateHiddenProcessing();
      unixEscapes = ((ProgressLexer)lexer).isUnixEscapes();
      setupHiddenFilter();
      
      // setup our resolver
      sym = sr;
      initializeProcedureDictionary();
      initializeStreamDictionary();
      initializeFunctionDictionary();
      initializeVariableDictionary();
      initializeAttributesDictionary();
      
      honorKeywordIgnoreList(((ProgressLexer)lexer).getIgnoredKeywords());
      
      // set the AST class
      astFactory.setASTNodeClass(AST_CLASS);      
   }
   
   /**
    * Writes error data to logger, including a full stack trace.
    *
    * @param    re
    *           The error on which to report.
    */
   public void reportError(RecognitionException re)
   {
      // keep the total error count
      errorCount++;

      if (consumeErr)
      {
         // pre_scan_class needs more detail otherwise the error is hard to find 
         if (preScanPass > 0)
         {
            try
            {
               CommonToken tok = (CommonToken) LT(1);
               System.out.println(
                  String.format("pre_scan_class failure with text '%s', error '%s' at line %d," +
                                " column %d in file %s", 
                                tok.getText(),
                                re.getMessage(),
                                tok.getLine(),
                                tok.getColumn(),
                                getFilename()));
            }
            catch (TokenStreamException e)
            {
               // ignore
            }
         }
      
         // print the error info, consume the exception then restart parsing
         LOG.log(Level.SEVERE, "", re);
      }
      else
      {
         // don't consume the error and don't restart parsing
         throw new RuntimeException(re);
      }
   }
   
   /**
    * Helper to package up an error message and the no-viable-alternative location details
    * into a single exception instance.
    *
    * @param    msg
    *           Error message for the containing <code>RuntimeException</code>
    * @param    node
    *           AST node which provides context for the no-viable-alternative location details.
    *
    * @return   The exception.
    */
   public RuntimeException genExc(String msg, Aast node)
   {
      AnnotatedAst ast = (AnnotatedAst) node;
      return new RuntimeException(msg, new NoViableAltException(ast));
   }
    
   /**
    * Helper to package up an error message and the no-viable-alternative location details
    * into a single exception instance.
    *
    * @param    msg
    *           Error message for the containing <code>RuntimeException</code>
    * @param    node
    *           Token node which provides context for the no-viable-alternative location details.
    *
    * @return   The exception.
    */
   public RuntimeException genExc(String msg, Token node)
   {
      return new RuntimeException(msg, new NoViableAltException(node, getFilename()));
   }
    
   /**
    * Tests if debug is turned on.
    */
   public boolean isDebug()
   {
      return debug;
   }
   
   /**
    * Sets the status of the debug mode member.
    *
    * @param    debug
    *           <code>true</code> to enable debug output.
    */
   public void setDebug(boolean debug)
   {
      this.debug = debug;
   }
   
   /**
    * Method to expose the AstGenerator, if any.
    *
    * @param    gen
    *           The generator that is driving this run.
    */
   public void setGenerator(AstGenerator gen)
   {
      this.gen = gen;
   }
   
   /**
    * Tests if the consume error flag is turned on.
    */
   public boolean isConsumeError()
   {
      return consumeErr;
   }
   
   /**
    * Sets the status of the consume error flag.
    *
    * @param    consume
    *           <code>true</code> to enable debug output.
    */
   public void setConsumeError(boolean consume)
   {
      this.consumeErr = consume;
   }
   
   /**
    * Gets the status of the expression evaluation member.
    */
   public boolean isEvaluatingExpression()
   {
      return evaluatingExpression;
   }
   
   /**
    * Sets the status of the expression evaluation member.
    *
    * @param    eval
    *           <code>true</code> if the current code is used to evaluate
    *           an expression.
    */
   public void setEvaluatingExpression(boolean eval)
   {
      evaluatingExpression = eval;
   }
   
   /**
    * Tests if this is parsing a WebSpeed program.
    */
   public boolean isWebSpeed()
   {
      return webspeed;
   }
   
   /**
    * Sets the status of the WebSpeed parsing flag.
    *
    * @param    webspeed
    *           <code>true</code> if the current program is a WebSpeed
    *           application.
    */
   public void setWebSpeed(boolean webspeed)
   {
      this.webspeed = webspeed;
   }
   
   /**
    * Tests if this is parsing a built-in 4GL class/interface.
    */
   public boolean isBuiltInCls()
   {
      return builtInCls;
   }
   
   /**
    * Sets the status of the built-in 4GL parsing flag.
    *
    * @param    builtInCls
    *           <code>true</code> if the current program is a built-in 4GL
    *           class/interface.
    */
   public void setBuiltInCls(boolean builtInCls)
   {
      this.builtInCls = builtInCls;
   }
   
   /**
    * Tests if this is parsing a .NET class/interface.
    */
   public boolean isDotNetCls()
   {
      return dotNetCls;
   }
   
   /**
    * Sets the status of the .NET parsing flag.
    *
    * @param    dotNetCls
    *           <code>true</code> if the current program is a .NET
    *           class/interface.
    */
   public void setDotNetCls(boolean dotNetCls)
   {
      this.dotNetCls = dotNetCls;
   }
   
   /**
    * Returns the number of errors encountered during parsing.
    *
    * @return  See above.
    */
   public int getErrorCount()
   {
      return errorCount;
   }
   
   /**
    * Translates a text representation of a parser token type into the
    * actual integer value.
    *
    * @param    tokenName
    *           The text representation of the parser token type.
    *
    * @return   A valid parser-defined integer token type value or -1 if
    *           no match was found.
    */
   public static synchronized int lookupTokenType(String tokenName)
   {
      // one-time init when we are first called
      if (tokenLookup == null)
      {
         int len = ProgressParser._tokenNames.length;
         
         tokenLookup = new HashMap();
         
         // load the map with our lowercased symbolic name as the key and
         // the wrappered int token type as the value
         for ( int i = 0; i < len; i++ )
         {
            tokenLookup.put(ProgressParser._tokenNames[i].toLowerCase(),
                            Integer.valueOf(i));
         }
      }
      
      Integer result = (Integer) tokenLookup.get(tokenName.toLowerCase());
      
      if (result == null)
      {
         return -1;
      }
      
      return result.intValue();
   }
   
   /**
    * Translates an integer value of a parser token type into the associated 
    * human readable text representation.
    *
    * @param    type
    *           The integer token type.
    *
    * @return   A valid parser-defined symbolic name or <code>null</code> if
    *           no match was found.
    */
   public static String lookupTokenName(int type)
   {
      if (type < 0 || type >= ProgressParser._tokenNames.length)
      {
         return null;
      }
      
      return ProgressParser._tokenNames[type];
   }
   
   /**
    * Create a schema validation sub-tree if the given field reference has schema-level assign
    * validation defined, and attach it to the given anchor point. If no validation expression
    * exists in the schema for the given field, no change is made.
    *
    * @param   anchor
    *          AST to which a KW_VALIDATE and/or KW_HELP sub-tree will be attached as a child.
    * @param   fieldRef
    *          The AST for a business logic reference to a database field. This AST is expected
    *          to have <code>schemaname</code> and <code>bufname</code> annotations.
    * @param   sym
    *          Symbol resolver which will be used to parse the schema validation expression, if
    *          any, for the given field.
    *
    * @return  Schema validation node that was attached, if any, or <code>null</code> if nothing
    *          was attached.
    */
   private List<Aast> attachAssignSchemaValidation(Aast anchor, Aast fieldRef, SymbolResolver sym)
   {
      String schemaName = (String) fieldRef.getAnnotation("schemaname");
      String bufName = (String) fieldRef.getAnnotation("bufname");
      Aast schemaRef = sym.lookupFieldAst(fieldRef.getText());
      
      validateFieldName = schemaName;
      List<Aast> ret = attachAssignSchemaValidation(anchor, schemaRef, schemaName, bufName, sym);
      validateFieldName = null;
      return ret;
   }
   
   /**
    * Create a schema validation sub-tree if the given field reference has schema-level assign
    * validation defined, and attach it to the given anchor point. If no validation expression
    * exists in the schema for the given field, no change is made.
    *
    * @param   anchor
    *          AST to which a KW_VALIDATE and/or KW_HELP sub-tree will be attached as a child.
    * @param   schemaRef
    *          The AST for a field provided by the schema dictionary, from which the validation
    *          expression and message are retrieved.
    * @param   schemaName
    *          Fully qualified schema name of the field for which validation is being processed.
    * @param   bufName
    *          Qualified name of the buffer referencing the table which contains the field for
    *          which validation is being processed.
    * @param   sym
    *          Symbol resolver which will be used to parse the schema validation expression, if
    *          any, for the given field.
    *
    * @return  Schema validation node that was attached, if any, or <code>null</code> if nothing
    *          was attached.
    */
   private List<Aast> attachAssignSchemaValidation(Aast anchor,
                                                   Aast schemaRef,
                                                   String schemaName,
                                                   String bufName,
                                                   SymbolResolver sym)
   {
      Aast valExp = schemaRef.getImmediateChild(VALEXP, null);
      Aast valMsg = schemaRef.getImmediateChild(VALMSG, null);
      String like = (String) schemaRef.getAnnotation("like");
      String help = null;
      
      if (schemaRef.isAnnotation("help"))
      {
         help = (String) schemaRef.getAnnotation("help");
      }
      else if (schemaRef.downPath(KW_HELP))
      {
         Aast helpRef = schemaRef.getImmediateChild(KW_HELP, null);
         helpRef = (Aast) helpRef.getFirstChild();
         help = helpRef.getText();
      }
      
      return attachSchemaValidation(anchor, valExp, valMsg, schemaName, bufName, like, sym, help);
   }
   
   /**
    * Given a record reference, find all fields in the corresponding table for which schema-level
    * assign validation is defined; create a schema validation sub-tree for each, and attach
    * these sub-trees to the given anchor point. If no validation expressions exist for any of
    * the fields in the table, no change is made.
    *
    * @param   anchor
    *          AST to which zero or more KW_VALIDATE and/or KW_HELP sub-trees will be attached as
    *          children.
    * @param   recordRef
    *          The AST for a business logic reference to a database record. This AST is expected
    *          to have <code>schemaname</code> and <code>bufname</code> annotations.
    * @param   sym
    *          Symbol resolver which will be used to parse the schema validation expressions, if
    *          any, for the fields in the given table.
    * @param   exceptFields
    *          The fully-qualified names of all fields to be omitted, or <code>null</code> 
    *          if not in use.
    */
   private void attachAllAssignSchemaValidation(Aast anchor,
                                                Aast recordRef,
                                                SymbolResolver sym,
                                                Set<String> exceptFields)
   {
      String tableSchemaName = (String) recordRef.getAnnotation("schemaname");
      String bufName = (String) recordRef.getAnnotation("bufname");
      
      Iterator<Aast> fieldIter = sym.fields(tableSchemaName);
      while (fieldIter.hasNext())
      {
         Aast schemaRef = fieldIter.next();

         String fieldSchemaName = tableSchemaName + "." + schemaRef.getText().toLowerCase();
         if (exceptFields != null && exceptFields.contains(fieldSchemaName))
         {
            continue;
         }

         // build intermediate format phrase node to which to attach KW_VALIDATE nodes, if any
         Aast fpRef = new ProgressAst();
         fpRef.setType(FORMAT_PHRASE);
         fpRef.setText("format phrase");
         
         attachAssignSchemaValidation(fpRef, schemaRef, fieldSchemaName, bufName, sym);

         // if any sub-trees were attached to format phrase node, attach it to anchor, just after
         // TABLE or BUFFER node
         if (fpRef.getFirstChild() != null)
         {
            fpRef.putAnnotation("schemaname", fieldSchemaName);
            anchor.addChild(fpRef);
         }
      }
   }
   
   /**
    * Create a schema validation sub-tree if the given record reference has schema-level delete
    * validation defined, and attach it to the given anchor point. If no validation expression
    * exists in the schema for the given table, no change is made.
    *
    * @param   anchor
    *          AST to which a KW_VALIDATE and/or HW_HELP sub-tree will be attached as a child.
    * @param   recordRef
    *          The AST for a business logic reference to a database record. This AST is expected
    *          to have <code>schemaname</code> and <code>bufname</code> annotations.
    * @param   sym
    *          Symbol resolver which will be used to parse the schema validation expression, if
    *          any, for the given field.
    */
   private void attachDeleteSchemaValidation(Aast anchor, Aast recordRef, SymbolResolver sym)
   {
      Aast schemaRef = sym.lookupTableAst(recordRef.getText());
      
      Aast props = schemaRef.getImmediateChild(PROPERTIES, null);
      if (props == null)
      {
         // some temp-/work-tables will not have a PROPERTIES node
         return;
      }
      
      Aast valExp = props.getImmediateChild(VALEXP, null);
      if (valExp == null)
      {
         return;
      }
      
      Aast valMsg = props.getImmediateChild(VALMSG, null);
      String schemaName = (String) recordRef.getAnnotation("schemaname");
      String bufName = (String) recordRef.getAnnotation("bufname");
      String like = (String) schemaRef.getAnnotation("like");
      
      attachSchemaValidation(anchor, valExp, valMsg, schemaName, bufName, like, sym, null);
   }
   
   /**
    * Create a schema validation sub-tree for the field or record indicated by the given schema
    * and buffer names, and attach it to the given anchor point. If no validation expression
    * exists in the schema for the given field or record, no change is made.
    *
    * @param   anchor
    *          AST to which a KW_VALIDATE and/or KW_HELP sub-tree will be attached as a child.
    * @param   valExp
    *          Validation expression AST.
    * @param   valMsg
    *          Validation message AST.
    * @param   schemaName
    *          Fully qualified schema name of database field for which validation is needed.
    * @param   bufName
    *          Name of buffer referenced in business logic, which contains field.
    * @param   like
    *          If this is a LIKE-defined field, this contains the fully-qualified source field
    *          name.
    * @param   sym
    *          Symbol resolver which will be used to parse the schema validation expression, if
    *          any, for the given field or record.
    * @param   help
    *          The schema-level help text.
    *
    * @return  Schema validation node that was attached, if any, or <code>null</code> if nothing
    *          was attached.
    */
   private List<Aast> attachSchemaValidation(Aast anchor,
                                             Aast valExp,
                                             Aast valMsg,
                                             String schemaName,
                                             String bufName,
                                             String like,
                                             SymbolResolver sym,
                                             String help)
   {
      // TODO: the anchor in is not in all cases a FORMAT_PHRASE, when BROWSE DISPLAY/ENABLE is
      // involved; if this gets changed, then TRPL conversion rules need to be adjusted, to work 
      // with the new AST structure.
      boolean isFP = anchor.getType() == FORMAT_PHRASE;
   
      List<Aast> res = new ArrayList<>();
      
      // do not attach if there is already a KW_VALIDATE in this FORMAT_PHRASE
      if (valExp != null && (!isFP || !anchor.downPath(KW_VALIDATE)))
      {
         // expression text is at VALEXP->STRING:text
         String expText = valExp.getFirstChild().getText();
         
         String msgText = "\"\"";
         if (valMsg != null)
         {
            // message text is at VALMSG->EXPRESSION->STRING:text
            msgText = valMsg.getFirstChild().getFirstChild().getText();
         }
         
         try
         {
            // preprocess text, in case there are any includes that need to be resolved
            String[] paths = gen.getPaths();  // Use getter for hints RFB20190911
            UastHints hints = gen.getHints(); // Use new getter for hints RFB20190911
            Options options = AstGenerator.buildOptions(paths, null, hints);
            StringWriter out = new StringWriter();
            FileScope fs = new FileScope("<inline>", new StringReader(expText));
            new Preprocessor(fs, out, new PrintWriter(System.err), null, options);
            expText = out.toString();
            
            if (expText.length() > 0)
            {
               // parse expText using a new Progress parser, but with the provided symbol resolver
               StringReader reader = new StringReader(expText);
               ProgressLexer lexer = new ProgressLexer(reader, sym);
               ProgressParser parser = new ProgressParser(lexer, sym);

               sym.addSchemaScope(false);

               // the current table has precendence - add it first
               String table = schemaName.substring(0, schemaName.indexOf('.'));
               sym.promoteTableName(table, true, true);
               // make all the tables in the source schema available
               sym.promoteAllTables(like == null ? schemaName : like);
               
               // make the new parser aware of the field being validated. In case of CAN-FIND,
               // when resolving an unqualified field name, the [validateFieldName] takes
               // precedence during parsing of this expression.
               parser.validateFieldName = this.validateFieldName;
               parser.validation = true;
               parser.setConsumeError(false);
               parser.expr();
               Aast ve = (Aast) parser.getAST();
               
               // verify if any of the VALEXP field reference is for the 'like' field - if so,
               // replace the text, schemaname, etc with this field's info
               sym.deleteSchemaScope(false);
               String fldName = schemaName.substring(schemaName.lastIndexOf('.') + 1);
               
               Iterator<Aast> iter = ve.iterator();
               while (iter.hasNext())
               {
                  Aast ast = iter.next();
                  int type = ast.getType();
                  
                  if (type >= BEGIN_FIELDTYPES && type <= END_FIELDTYPES)
                  {
                     String schemaname = (String) ast.getAnnotation("schemaname");
                     if (like != null && like.equals(schemaname))
                     {
                        ast.putAnnotation("schemaname", schemaName);
                        ast.putAnnotation("bufname", bufName);
                        ast.removeAnnotation("dbname");
                        ast.putAnnotation("name", fldName);
                        ast.setText(fldName);
                     }
                  }
               }
               
               // add KW_VALIDATE child to anchor node
               Aast valParent = new ProgressAst();
               valParent.setType(KW_VALIDATE);
               valParent.setText(expText);
               valParent.putAnnotation("schema_validation", true);
               valParent.putAnnotation("schemaname", schemaName);
               valParent.putAnnotation("bufname", bufName);
               anchor.addChild(valParent);
               
               // add first EXPRESSION child to KW_VALIDATE node (for condition)
               Aast exp = new ProgressAst();
               exp.setType(EXPRESSION);
               exp.setText("expression");
               valParent.addChild(exp);
               
               // add validation expression subtree to condition EXPRESSION node
               exp.addChild(ve);
               
               // add second EXPRESSION child to KW_VALIDATE node (for message)
               exp = new ProgressAst();
               exp.setType(EXPRESSION);
               exp.setText("expression");
               valParent.addChild(exp);
               
               // add STRING child to message EXPRESSION node
               Aast str = new ProgressAst();
               str.setType(STRING);
               str.setText(msgText);
               exp.addChild(str);
               
               res.add(valParent);
            }
         }
         catch (Exception exc)
         {
            boolean verbose = Configuration.getParameter("broken-schema-validation-warnings", true);
            if (verbose == true)
            {
               LOG.log(Level.WARNING, expText);
               LOG.log(Level.WARNING, "Ignoring invalid schema validation expression for field '" +
                                  schemaName +
                                  "':", exc);
            }
         }
      }

      // do not attach if there is already a KW_HELP in this FORMAT_PHRASE; skip COLUMN_REF for
      // BROWSE enable option, as HELP will be pulled automatically by conversion rules, if needed
      if (help != null                   &&
          anchor.getType() != COLUMN_REF &&
          (!isFP || !anchor.downPath(KW_HELP)))
      {
         Aast helpAst = new ProgressAst();
         helpAst.setType(KW_HELP);
         helpAst.setText("help");
         helpAst.putAnnotation("schema_help", true);
         anchor.addChild(helpAst);
         
         Aast str = new ProgressAst();
         str.setType(STRING);
         str.setText(help);
         helpAst.addChild(str);
         
         res.add(helpAst);
      }

      return res;
   }
   
   /**
    * Matches and consumes a token that must be within a specific range of
    * token types.  This code is based on other matching methods provided
    * by ANTLR.  The ANTLR generator will properly create code to call
    * this method using the &quot;..&quot; range operator.  While the 
    * generated lexer does contain a <code>matchRange</code> method, the
    * parser does not!  This method was added manually to resolve this
    * condition.
    * <p>
    * Note that to make this useful, one must maintain a list of the
    * artificial token types (using the tokens { } section in the parser's
    * grammar). More importantly, all needed tokens to be matched in a range
    * need to be kept contiguous so that the range neither includes token
    * types it should not, nor excludes types it should not.  Since ANTLR
    * generates the token types in order found in that section, one trick
    * used is to add a special token to mark the begin and end of any such
    * range.  These can be used instead of the actual first and last tokens.
    * This makes it easier to edit without introducing an error.
    */
   public void matchRange( int t1, int t2 )
   throws MismatchedTokenException,
          TokenStreamException
   {
      if ( LA(1) < t1 || LA(1) > t2 )
      {
         throw new MismatchedTokenException(tokenNames,
                                            LT(1),
                                            t1,
                                            false,
                                            getFilename());
      }
      else
      {
         // mark token as consumed -- fetch next token deferred until LA/LT
         consume();
      }
   }
   
   /**
    * Remove any built-in functions or global variables that are defined with the given
    * keywords.
    *
    * @param    ignored
    *           The list to process.
    */
   private void honorKeywordIgnoreList(Keyword[] ignored)
   {
      if (ignored != null)
      {
         for (Keyword word : ignored)
         {
            sym.removeBuiltinFunction(word);
            sym.removeGlobalVariable(word);
         }
      }
   }
   
   /**
    * Configure the hidden filter to ensure that token types that are not
    * normally recognized by the parser, are hidden (but still accessible)
    * using the filter.
    */
   private void setupHiddenFilter()
   {
      hidden.hide(WS);
      hidden.hide(TILDE);
      hidden.hide(COMMENT);
      hidden.hide(BACKSLASH);
   }
   
   /**
    * Check if the given token is for a statement which can act as a left-side of an assignment.
    *
    * @param    type
    *           The token type.
    *
    * @return   <code>true</code> if this token is for a statement which can act as a left-side of
    *           an assignment.
    */
   private boolean isLstmt(long type)
   {
      return type == KW_CUR_VAL  || type == KW_DYN_CURV || type == KW_DYN_PROP || type == KW_ENTRY    ||
             type == KW_EXTENT   || type == KW_FIX_CP   || type == KW_LENGTH   || type == KW_OVERLAY  ||
             type == KW_PUT_BITS || type == KW_PUT_BYTE || type == KW_PUT_BYTS || type == KW_PUT_DBL  ||
             type == KW_PUT_FLT  || type == KW_PUT_I64  || type == KW_PUT_LONG || type == KW_PUT_SHT  || 
             type == KW_PUT_STR  || type == KW_PUT_UL   || type == KW_PUT_USHT || type == KW_RAW      ||
             type == KW_SET_B_OR || type == KW_SET_PTR  || type == KW_SET_SZ   || type == KW_SUBSTR;
   }
   
   /**
    * Determine if the tokens can represent a static class dereference (a class name followed by a
    * {@code COLON} that has no following whitespace.
    *
    * @param    la1
    *           The lookahead 1 token to test.
    * @param    la2
    *           The lookahead 2 token to test.
    *
    * @return   {@code true} if the tokens could be a static class dereference.
    */
   private boolean isClassDereference(Token la1, Token la2)
   {
      return la2.getType() == COLON && !followedByWhitespace(la2) && sym.canLoadClass(la1.getText());
   }
   
   /**
    * Determine if the token is valid as the leftmost token in an expression. If this is a reserved keyword
    * it is checked to see if it is valid as the leftmost keyword OR if it is a valid class name.  If the
    * token is not a reserved keyword, then it is assumed valid.
    * <p>
    * Only a small number of reserved keywords are allowed in the leftmost token of an expression except
    * for class names.  The problem is that allowing all reserved keywords to "pull" into the assignment
    * rule will break parsing badly (except for the leftmost static references to class names that are also
    * reserved keywords).  This method provides a means to detect only those cases that are valid.
    *
    * @param    la1
    *           The lookahead 1 token to test.
    * @param    la2
    *           The lookahead 2 token to test.
    *
    * @return   {@code true} if the token should be allowed as the leftmost token in an expression.
    */
   private boolean isValidLeftmostReserved(Token la1, Token la2)
   {
      int type = la1.getType();
   
      boolean valid = (type == KW_U_CTRL   || type == KW_U_MSG    || type == KW_U_PCTRL  || 
                       type == KW_U_SERIAL || type == KW_ACCUM    || type == KW_ASC      || 
                       type == KW_ACT_FORM || type == KW_ACT_WIN  || type == KW_ALIAS    || 
                       type == KW_AMBIG    || type == KW_AUD_CTRL || type == KW_AUD_POL  || 
                       type == KW_AVAIL    || type == KW_B_ENDIAN || type == KW_CAN_DO   || 
                       type == KW_CAN_FIND || type == KW_CAST     || type == KW_CHR      || 
                       type == KW_CLIP     || type == KW_CODEBASE || type == KW_COMPILER || 
                       type == KW_CONN_ED  || type == KW_COUNT_OF || type == KW_CUR_CHG  || 
                       type == KW_CUR_LANG || type == KW_CUR_WIN  || type == KW_DATA_SRC || 
                       type == KW_DATASRV  || type == KW_DATASET  || type == KW_DBCP     || 
                       type == KW_DBCOLL   || type == KW_DBNAME   || type == KW_DBPARAM  || 
                       type == KW_DBREST   || type == KW_DBTASKID || type == KW_DBTYPE   || 
                       type == KW_DBVERS   || type == KW_DEBUGGER || type == KW_DEF_WIN  || 
                       type == KW_DLL_C_T  || type == KW_DSET_HND || type == KW_DYN_ENUM || 
                       type == KW_DYN_FUNC || type == KW_DYN_INVK || type == KW_DYN_NEW  || 
                       type == KW_DYN_PROP || type == KW_ENCODE   || type == KW_ENTRY    || 
                       type == KW_ERR_STAT || type == KW_EXC_LOCK || type == KW_ETIME    || 
                       type == KW_FIL_INFO || type == KW_FILL     || type == KW_FIND_CS  || 
                       type == KW_FIND_GLO || type == KW_FIND_NO  || type == KW_FIND_PO  || 
                       type == KW_FIND_SEL || type == KW_FIND_WA  || type == KW_FIRST    || 
                       type == KW_FIRST_OF || type == KW_FOCUS    || type == KW_FRAME    || 
                       type == KW_FR_COL   || type == KW_FR_DB    || type == KW_FR_DOWN  || 
                       type == KW_FR_FIELD || type == KW_FR_FILE  || type == KW_FR_INDEX || 
                       type == KW_FR_LINE  || type == KW_FR_NAME  || type == KW_FR_ROW   || 
                       type == KW_FR_VAL   || type == KW_FUNC_C_T || type == KW_GW       || 
                       type == KW_GET_A_CT || type == KW_GET_BYTE || type == KW_GET_CODP || 
                       type == KW_GET_COLL || type == KW_GO_PEND  || type == KW_HOST_B_O ||
                       type == KW_HASHCODE || type == KW_IF       || type == KW_INDEX    || 
                       type == KW_INPUT    || type == KW_IS_ATTR  || type == KW_IS_LEAD  || 
                       type == KW_KBLABEL  || type == KW_KEYCODE  || type == KW_KEYFUNC  || 
                       type == KW_KEYLAB   || type == KW_KW       || type == KW_L_ENDIAN || 
                       type == KW_LAST     || type == KW_LASTKEY  || type == KW_LAST_EVT || 
                       type == KW_LAST_OF  || type == KW_LDBNAME  || type == KW_LIB      || 
                       type == KW_LINE_CNT || type == KW_LOCKED   || type == KW_LOG_MGR  || 
                       type == KW_LOOKUP   || type == KW_MEMBER   || type == KW_MSG_LINE || 
                       type == KW_NEW      || type == KW_NO_LOCK  || type == KW_NO_RET_V || 
                       type == KW_NO_WAIT  || type == KW_NOT      || type == KW_NOW      || 
                       type == KW_NUM_ALIA || type == KW_NUM_DBS  || type == KW_NUM_ENT  || 
                       type == KW_OPSYS    || type == KW_OVERLAY  || type == KW_PAGE_NUM || 
                       type == KW_PDBNAME  || type == KW_PROC_C_T || type == KW_PROC_HND || 
                       type == KW_PROC_ST  || type == KW_PROFILER || type == KW_PROGNAME || 
                       type == KW_PROGRESS || type == KW_PROMSGS  || type == KW_PROPATH  || 
                       type == KW_PROVER   || type == KW_PUT_BYTE || type == KW_QUERY    || 
                       type == KW_QRY_OFF  || type == KW_R_INDEX  || type == KW_RCOD_INF || 
                       type == KW_READ_AVL || type == KW_READ_E_N || type == KW_RECID    || 
                       type == KW_RETRY    || type == KW_ROW_CRTD || type == KW_ROW_DELD || 
                       type == KW_ROW_MODD || type == KW_ROW_UMOD || type == KW_RTOPSYS  || 
                       type == KW_SAX_COMP || type == KW_SAX_PARE || type == KW_SAX_RUNN || 
                       type == KW_SAX_UNIN || type == KW_SAX_WBEG || type == KW_SAX_WCOM || 
                       type == KW_SAX_WCON || type == KW_SAX_WELM || type == KW_SAX_WERR || 
                       type == KW_SAX_WIDL || type == KW_SAX_WTAG || type == KW_SCRN_LNS || 
                       type == KW_SDBNAME  || type == KW_SEAR_SLF || type == KW_SEAR_TRG || 
                       type == KW_SEARCH   || type == KW_SECUR_P  || type == KW_SEEK     || 
                       type == KW_SELF     || type == KW_SESSION  || type == KW_SET_A_CT || 
                       type == KW_SETUSER  || type == KW_SH_LOCK  || type == KW_STREAM   || 
                       type == KW_STRM_HND || type == KW_SUPER    || type == KW_TABLE    || 
                       type == KW_TERM     || type == KW_THIS_OBJ || type == KW_THIS_PRC || 
                       type == KW_TIME     || type == KW_TO_ROWID || type == KW_TRANS    || 
                       type == KW_TRIM     || type == KW_USERID   || type == KW_WIN_DMIN || 
                       type == KW_WIN_MAX  || type == KW_WIN_MIN  || type == KW_WIN_NORM || 
                       type == KW_FWD_DRIV || type == KW_DSL_MGR);
                       
      return !(type > BEGIN_RESERVED && type < END_RESERVED) || valid || isClassDereference(la1, la2);
   }
   
   /**
    * Determine if the specified type belongs to a binary operator.
    *
    * @param    type
    *           The parameter to check.
    *
    * @return   <code>true</code> if the type belongs to a binary operator.
    */
   private boolean isBinaryOp(long type)
   {
      return type == KW_OR       || type == KW_AND      ||
             type == KW_NOT      || type == KW_EQ       || 
             type == NOT_EQ      || type == KW_NE       ||
             type == GT          || type == KW_GT       ||
             type == LT          || type == KW_LT       ||
             type == GTE         || type == KW_GTE      ||
             type == LTE         || type == KW_LTE      ||
             type == KW_BEGINS   || type == KW_MATCHES  ||
             type == KW_CONTAINS || type == PLUS        ||
             type == MINUS       || type == MULTIPLY    ||
             type == DIVIDE      || type == KW_MOD;
   }
   
   /**
    * Determine if the passed reference can act as a l-value in an assignment.
    *
    * @param    ref
    *           The AST to check if is a possible l-value.
    *
    * @return   <code>true</code> if the passed AST can act as an l-value.
    */
   private boolean isLvalue(Aast ref)
   throws TokenStreamException
   {
      long type = ref.getType();
      
      if (type >= BEGIN_LVALUE && type <= END_LVALUE)
      {
         return true;
      }
      
      if (type == DB_REF_NON_STATIC)
      {
         return true;
      }
      
      if (type == COM_INVOCATION)
      {
         Aast ref2 = ref.getChildAt(1);
         type = ref2.getType();
         
         // indexed properties are disguised as COM_METHOD by the lexer 
         return type == COM_PROPERTY || (type == COM_METHOD && LA(1) == EQUALS);
      }
      
      if (type == OBJECT_INVOCATION)
      {
         Aast ref2 = ref.getChildAt(1);

         return isLvalue(ref2);
      }
      
      if (type == COLON)
      {
         Aast ref2 = ref.getChildAt(1);
         type = ref2.getType();
         
         return (type >= BEGIN_ATTR && type <= END_ATTR);
      }

      if (isLstmt(type))
      {
         return true;
      }

      if (type >= BEGIN_FUNCTYPES && type <= END_FUNCTYPES)
      {
         type = (long) ref.getAnnotation("oldtype");
         
         return isLstmt(type);
      }

      return false;
   }
   
   /**
    * Scan forward to determine if the current node is an inline variable 
    * definition.  For this to be the case, the current node must be a
    * symbol which is not already a variable or field.  In addition, it must
    * be followed by an <code>AS</code> or <code>LIKE</code> keyword.
    * <p>
    * <b>At this time, this method will not work 100% properly so DON'T use
    * it! WARNING: this code needs to know when to stop looking ahead and
    * this test is far too permissive! We really need to stop when the format
    * phrase is done. But to predict when that might occur is not easy!</b>
    *
    * @return   <code>true</code> if this is an inline variable definition.
    */
   private boolean isFormVarDefinition()
   throws TokenStreamException
   {
      Token candidate = LT(1);
      
      int    typ = candidate.getType(); 
      String txt = candidate.getText();
      
      if (typ == SYMBOL || (typ > BEGIN_UNRESERVED && typ < END_UNRESERVED))
      {
         if (sym.lookupVariable(txt) == -1 && !sym.isField(txt))
         {
            int idx = 2;
            
            while (true)
            {
               int next = LA(idx);
               
               // WARNING: this code needs to know when to stop looking ahead
               //          and this test is far too permissive! We really
               //          need to stop when the format phrase is done. But
               //          to predict when that might occur is not easy!
               if (next == KW_WITH || next == DOT)
               {
                  break;
               }
               
               if (next == KW_AS || next == KW_LIKE)
               {
                  return true;
               }
               
               idx++;
            }
         }
      }
      
      return false;
   }
   
   /**
    * Check the tokens starting at the given index to see if they match a malformed label (that
    * starts with a reserved keyword), a colon and then is followed by the beginning of an inner
    * block.  If found, rewrite the leading reserved keyword's token type to a SYMBOL so that
    * the prediction logic for a downstream <code>single_block</code> will be engaged. This
    * should only ever be called just before a <code>single_block</code> is entered.
    *
    * @param    idx
    *           The index of the token that would start the label (and it would be a reserved
    *           keyword).
    */
   private void checkAndFixLabelWithReservedKeywordPrefix(int idx)
   throws TokenStreamException,
          MismatchedTokenException
   {
      int rtype = LA(idx);
      
      if (rtype > BEGIN_RESERVED && rtype < END_RESERVED)
      {
         Predicate<CommonToken> follow = (CommonToken tok) ->
         {
            int type = tok.getType();
            
            return (type == KW_DO || type == KW_REPEAT || type == KW_FOR || type == KW_EDITING);
         };
         
         if (isMalformedLabel(true, idx, follow))
         {
            LT(idx).setType(SYMBOL);
         }
      }
   }
   
   /**
    * Manually looks ahead an 2 tokens to determine if the next tokens represent a properly
    * formed symbol.  Normal symbols must start with an alphabetic character or an underscore.
    * They must then be followed by a colon and then whitespace.  The problem is that it is
    * legal to use nearly all unreserved keywords as labels. This method matches these cases
    * except for the one case that is unreserved but is still excluded from being a label
    * (the FINALLY keyword).
    * <p>
    * A malformed label will NOT be matched by this rule (see {@link #isMalformedLabel}).
    *
    * @param    typ
    *           The token type of the first lookahead token. This is a performance optimization
    *           only since the same value could have been queried too.
    *
    * @return   <code>true</code> if the following tokens represent a match as a properly
    *           formed label.
    */
   private boolean isProperLabel(int typ)
   throws TokenStreamException
   {
      // must be a valid symbol or unreserved keyword (except finally is unreserved
      // but cannot be used as a label!)
      if (typ == SYMBOL || ((typ > BEGIN_UNRESERVED && typ < END_UNRESERVED) &&
                             typ != KW_FINALLY))
      {
         // possible label
         if (LA(2) == COLON && followedByWhitespace(LT(2)))
         {
            // OK, this is a properly formed label
            return true;
         }
      }
      
      return false;
   }
   
   /**
    * Manually looks ahead an arbitrary number of tokens to determine if the next tokens 
    * represent a malformed symbol.  Normal symbols must start with an alphabetic character
    * or an underscore.  Labels have been found to possibly start with a pretty much any kind
    * of text including @#$%^, hyphens, operators and other "second and later" symbol
    * characters. The lexer cannot know when to lex a symbol in such a manner so it must be
    * detected and put back together in the parser.  This method detects the malformed label
    * case.
    * <p>
    * A normal label will NOT be matched by this rule so any testing for normal labels must be
    * done outside of this rule. See {@link #isProperLabel}.
    *
    * @param    def
    *           <code>true</code> if this should test for a label definition (the malformed
    *           symbol must be followed by a colon). When <code>false</code>, no colon is
    *           expected BUT the resulting text must appear in the scoped label dictionary.
    * @param    start
    *           The index of the token at which to start checking.
    * @param    follow
    *           If non-null AND a malformed label has been detected, this predicate will be
    *           checked against the AST node that immediately follows the COLON.  This is only
    *           checked in label definition mode.
    *
    * @return   <code>true</code> if the following tokens represent a match as a malformed
    *           label.
    */
   private boolean isMalformedLabel(boolean def, int start, Predicate<CommonToken> follow)
   throws TokenStreamException,
          MismatchedTokenException
   {
      int[] end = new int[] { COLON, COMMA, LPARENS, RPARENS, EOF };
      int   num = start;
   
      CommonToken current  = (CommonToken) LT(num);
      CommonToken next     = (CommonToken) LT(++num);
      int         nextType = next.getType();   
      
      StringBuilder sb = new StringBuilder();
      
      while (!followedByWhitespace(current)       &&
             !matchesList(nextType, end)          &&
             !(nextType == DOT && followedByWhitespace(next)))
      {
         // save the text of the current token
         if (!def)
            sb.append(current.getText());
         
         // update the state for next iteration
         current  = next;
         next     = (CommonToken) LT(++num);
         nextType = next.getType();
      }
      
      // did more than 1 token get processed?
      if (num > (start + 1))
      {
         if (!def)
         {
            // put the last text into the buffer
            sb.append(current.getText());
            
            // possible label reference
            if (sym.lookupLabel(sb.toString()) != -1)
            {
               return true;
            }
         }
         else
         {
            // possible new label definition
            
            // we have a candidate label (text that could be a label) but it
            // must be followed by a COLON and whitespace to fully match
            if (next.getType() == COLON && followedByWhitespace(next))
            {
               if (follow != null)
               {
                  return follow.test((CommonToken) LT(num + 1));
               }
            
               return true;
            }
         }
      }
      
      return false;
   }
   
   /**
    * The P4GL requires an additional space after keyword operators. This method checks if this
    * exists and if it is missing a parsing exception is thrown. Note that the space is not
    * required BEFORE the keyword operator and not required at either ends in case of symbol
    * operator.
    * <p>
    * Known affected keyword operators are: {@code kw_eq}, {@code kw_ne}, {@code kw_lt},
    * {@code kw_gt}, {@code kw_gte}, {@code kw_lte}, {@code kw_matches}, {@code kw_begins},
    * {@code kw_contains}, {@code kw_or} and {@code kw_and}.
    *
    * @param   binOperator
    *          Aast node of the operator to be checked.
    *
    * @param   allowUnknown
    *          Flag indicating if unknown value can be on right without any whitespace.
    *
    * @throws  MismatchedTokenException
    *          if no space is encounter after this token.
    * @throws  MismatchedTokenException
    *          if fails to extract the next token.
    */
   private void checkExtraSpace(Aast binOperator, boolean allowUnknown)
   throws MismatchedTokenException,
          TokenStreamException
   {
      if (followedByWhitespace(LT(0)) || (allowUnknown && LA(1) == UNKNOWN_VAL))
      {
         // this is how P4GL expects
         return;
      }
      
      // second chance: if the second operand is parenthesized the P4GL validates it
      if (LT(1).getType() == LPARENS) 
      {
         return;
      }
      
      MismatchedTokenException exc =
         new MismatchedTokenException(new String[] { "Unknown Field or Variable name" },
                                      binOperator, -1, -1, true);
      exc.token = LT(0); 
      throw exc;
   }
   
   /**
    * Manually looks ahead an arbitrary number of tokens to determine if the 
    * next tokens represent a malformed symbol as a function name followed by
    * an <code>LPARENS</code>.  Normal function names must start
    * with an alphabetic character or an underscore.  Other names have been
    * found which can possibly start with a number, hyphen and other
    * "second and later" symbol characters. The lexer cannot know when to
    * lex a symbol in such a manner so it must be detected and put back
    * together in the parser.
    * <p>
    * This does not match any tokens, it just reads ahead to check.
    *
    * @return   <code>true</code> if and only if the following tokens represent
    *           a match as a malformed function call name.
    */
   private boolean isMalformedSymbolFuncCall()
   throws TokenStreamException
   {
      int   idx   = 1;
      Token next  = LT(1);
      int   ttype = next.getType();
      
      StringBuilder sb = new StringBuilder();
      
      // a malformed symbol must start with one of these tokens
      if (ttype != NUM_LITERAL          &&
          ttype != HEX_LITERAL          &&
          ttype != DATE_LITERAL         &&
          ttype != DATETIME_LITERAL     &&
          ttype != DATETIME_TZ_LITERAL  &&
          ttype != MINUS                &&
          ttype != UNKNOWN_TOKEN)
      {
         return false;
      }
      
      while (true)
      {
         // any intervening whitespace before we hit text means this is not a
         // match
         if (followedByWhitespace(next))
         {
            break;
         }
         
         // store the text of the current token
         sb.append(next.getText());
         
         // get the next token (which we already know is contiguous)
         idx++;
         next  = LT(idx);
         ttype = next.getType();
         
         // when the next token falls in this range, it means there is some
         // alphabetic text following the other trash (this will cause the
         // symbol rule to be matched in the lexer, which can produce one of
         // these types), which tells us that this is a valid symbol
         if ((ttype > BEGIN_RESERVED   && ttype < END_RESERVED)   ||
             (ttype > BEGIN_UNRESERVED && ttype < END_UNRESERVED) ||
             ttype == SYMBOL)
         {
            // this should be the last bit of the function name
            sb.append(next.getText());
         
            // this is a malformed symbol, BUT is it a function call?
         
            idx++;
            next = LT(idx);
            
            boolean func = (next.getType() == LPARENS) && 
                           (sym.lookupFunction(sb.toString()) != -1);
            
            // if this is followed by an LPARENS (regardless of whitespace in
            // between) and the name can be looked up in our function dictionary
            // then this is a function call
            return func ? true : false;
         }
         
         // iterate as long as there is valid preceding crap to read through
         if (ttype == NUM_LITERAL          ||
             ttype == HEX_LITERAL          ||
             ttype == DATE_LITERAL         ||
             ttype == DATETIME_LITERAL     ||
             ttype == DATETIME_TZ_LITERAL  ||
             ttype == MINUS                ||
             ttype == UNKNOWN_TOKEN)
         {
            continue;
         }
         
         // we must not have matched anything valid, this isn't a malformed
         // symbol
         break;
      }
      
      return false;
   }
   
   /**
    * Detect if the given token type is a symbol or unreserved keyword.
    *
    * @param    ttype
    *           The token type to check;
    *
    * @return   <code>true</code> if the type is some kind of symbol.
    */
   private boolean isSomeSymbol(int ttype)
   {
      return (ttype == SYMBOL || (ttype > BEGIN_UNRESERVED && ttype < END_UNRESERVED));
   }
   
   /**
    * Manually looks ahead an arbitrary number of tokens to determine if the 
    * next tokens represent a malformed symbol.  Normal symbols must start
    * with an alphabetic character or an underscore.  Other names have been
    * found which can possibly start with a number, hyphen and other
    * "second and later" symbol characters. The lexer cannot know when to
    * lex a symbol in such a manner so it must be detected and put back
    * together in the parser.
    * <p>
    * This does not match any tokens, it just reads ahead to check.
    *
    * @param    start
    *           Starting token to check.
    *
    * @return   <code>true</code> if and only if the following tokens represent
    *           a match as a malformed symbol.
    */
   private boolean isMalformedSymbol(int start)
   throws TokenStreamException
   {
      int   idx   = start;
      Token next  = LT(idx);
      int   ttype = next.getType();
      
      // a malformed symbol must start with one of these tokens
      if (ttype != NUM_LITERAL          &&
          ttype != HEX_LITERAL          &&
          ttype != DATE_LITERAL         &&
          ttype != DATETIME_LITERAL     &&
          ttype != DATETIME_TZ_LITERAL  &&
          ttype != MINUS                &&
          ttype != UNKNOWN_TOKEN)
      {
         return false;
      }
      
      while (true)
      {
         // any intervening whitespace before we hit text means this is not a
         // match
         if (followedByWhitespace(next))
         {
            break;
         }
         
         // get the next token (which we already know is contiguous)
         idx++;
         next  = LT(idx);
         ttype = next.getType();
         
         // when the next token falls in this range, it means there is some
         // alphabetic text following the other trash (this will cause the
         // symbol rule to be matched in the lexer, which can produce one of
         // these types), which tells us that this is a valid symbol
         if ((ttype > BEGIN_RESERVED   && ttype < END_RESERVED)   ||
             (ttype > BEGIN_UNRESERVED && ttype < END_UNRESERVED) ||
             ttype == SYMBOL)
         {
            // this is a malformed symbol
            return true;
         }
         
         // iterate as long as there is valid preceding crap to read through
         if (ttype == NUM_LITERAL          ||
             ttype == HEX_LITERAL          ||
             ttype == DATE_LITERAL         ||
             ttype == DATETIME_LITERAL     ||
             ttype == DATETIME_TZ_LITERAL  ||
             ttype == MINUS                ||
             ttype == UNKNOWN_TOKEN)
         {
            continue;
         }
         
         // we must not have matched anything valid, this isn't a malformed
         // symbol
         break;
      }
      
      return false;
   }
   
   /**
    * Manually looks ahead an arbitrary number of tokens, reassembling the text 
    * and type of a malformed symbol into a single token while dropping the
    * extraneous tokens.
    * <p>
    * This discards bogus intermedite tokens and fixes up the last token in the
    * stream. You MUST already know that the following tokens ARE a malformed
    * symbol by using {@link #isMalformedSymbolFuncCall}!
    *
    * @return   The text of the token that was reassembled.
    */
   private String reassembleMalformedSymbol()
   throws TokenStreamException,
          NoViableAltException,
          MismatchedTokenException
   {
      ManagedHiddenStreamToken next  = (ManagedHiddenStreamToken) LT(1);
      
      int ttype = next.getType();
      
      // a malformed symbol must start with one of these tokens
      if (ttype != NUM_LITERAL          &&
          ttype != HEX_LITERAL          &&
          ttype != DATE_LITERAL         &&
          ttype != DATETIME_LITERAL     &&
          ttype != DATETIME_TZ_LITERAL  &&
          ttype != MINUS                &&
          ttype != UNKNOWN_TOKEN)
      {
         throw new NoViableAltException(LT(1), getFilename());
      }
      
      while (true)
      {
         // any intervening whitespace before we hit text means this is not a
         // match
         if (followedByWhitespace(next))
         {
            throw new NoViableAltException(LT(1), getFilename());
         }
         
         next.merge();
         
         // this is a token we are discarding, match it
         match(ttype);
         
         // get the next token
         next  = (ManagedHiddenStreamToken) LT(1);
         ttype = next.getType();
         
         // when the next token falls in this range, it means there is some
         // alphabetic text following the other trash (this will cause the
         // symbol rule to be matched in the lexer, which can produce one of
         // these types), which tells us that this is a valid symbol
         if ((ttype > BEGIN_RESERVED   && ttype < END_RESERVED)   ||
             (ttype > BEGIN_UNRESERVED && ttype < END_UNRESERVED) ||
             ttype == SYMBOL)
         {
            break;
         }
         
         // iterate as long as there is valid preceding crap to read through
         if (ttype != NUM_LITERAL          &&
             ttype != HEX_LITERAL          &&
             ttype != DATE_LITERAL         &&
             ttype != DATETIME_LITERAL     &&
             ttype != DATETIME_TZ_LITERAL  &&
             ttype != MINUS                &&
             ttype != UNKNOWN_TOKEN)
         {
            throw new NoViableAltException(LT(1), getFilename());
         }
      }
      
      return next.getText();
   }
   
   /**
    * Detect is the next token type is a reserved keyword that can appear in an inner block (DO, REPEAT or
    * FOR) header or in/following a query's record phrase.  This is used to detect when the next token is
    * not a valid expression but is rather a reserved keyword that should be avoided.
    *
    * @param     sql
    *            Flag indicating if this is matching from a SQL statement.
    *
    * @return    {@code true} if the next token is a reserved keyword that can appear in an inner block
    *            header or in/after a record phrase. 
    */
   private boolean isValidBlockHeaderOrQueryKeyword(boolean sql)
   throws TokenStreamException
   {
      int type = LA(1);

      // these tokens are reserved only for SQL, 4GL WHERE allows fields with such names
      return (sql && 
              (type == KW_LEFT     || type == KW_ORDER   || type == KW_OUT_JOIN || type == KW_RIGHT || 
               type == KW_TAB_SCAN || type == KW_COLLATE || type == KW_IDX_REPO || type == KW_MAX_ROWS)) ||
             
             type == KW_GROUP    || type == KW_HAVING   || type == KW_NO_PRE   || type == KW_NO_ERROR ||
             type == KW_SH_LOCK  || type == KW_EXC_LOCK || type == KW_NO_LOCK  || type == KW_NO_WAIT  ||
             type == KW_OF       || type == KW_USE_IDX  || type == KW_USING    || type == KW_WHERE    ||
             type == KW_WHILE    || type == KW_TRANS    || type == KW_STOP_AFT || type == KW_ON       ||
             type == KW_QRY_TUNE || type == KW_BREAK    || type == KW_BY       || type == KW_WITH;
   }
   
   /**
    * Core lookahead processing for the lvalue rule which checks for a match to a variable,
    * widget, class data member/property or database field.  It will NOT match qualifiers
    * frames, streams or assignment style statements.  This is useful for detecting if a
    * following token stream is an lvalue or not.  When token stream changes are allowed,
    * the text can be rewritten and tokens can even be matched.  DO NOT allow changes when
    * passing an index other than 1, as any matching done will not match on the tokens
    * expected.
    * <p>
    * This is split off from the lvalue rule itself so that other code can call this for
    * lookahead purposes (no changes allowed).
    *
    * @param    idx
    *           The token at which to start looking for an lvalue match. This is a 1-based
    *           index which is how ANTLR works.
    * @param    allowChange
    *           <code>true</code> to enable token text modification and matching.  This only
    *           occurs with certain validation and field naming quirks.
    *
    * @return   The token type if the tokens are an lvalue or -1 if no match was found.
    */
   private int resolveLvalueCoreType(int idx, boolean allowChange)
   throws TokenStreamException,
          MismatchedTokenException
   {
      String text = LT(idx).getText();
      
      // variables by the same name as a field, will hide that field 
      int newtype = sym.lookupVariable(text);
      
      // there are some cases where calling rules (possibly far up
      // the call stack) need to match a widget in preference to
      // a variable, in these cases a global state variable is
      // set and this will override any variable found with a
      // widget instead (if the widget exists)
      if (preferWidgets)
      {
         int widtype = sym.lookupWidget(text);
         
         if (widtype != -1)
            newtype = widtype;
      }
      else
      {
         // in normal processing, we might not prefer widgets but we
         // still need to check for a match
         if (newtype == -1)
         {
            // this must be a widget name
            newtype = sym.lookupWidget(text);
         }
      }
      
      int idx2 = idx + 1;
      int idx3 = idx + 2;
      boolean isFieldQuirk = isQualifiedFieldNameQuirk(LT(idx), LT(idx2), LT(idx3));
      
      // check if this is an object data member or property (may be defined somewhere in the
      // class hierarchy); calling rules may set the class name based on context to control the
      // lookup here
      if (newtype == -1 && !isFieldQuirk)
      {
         newtype = sym.lookupDataMember(currentClassName, text, currentStaticFlag);
      }
      
      // special processing for validation (if there is a match to the short name only, we
      // override with the full schema name to make it unambiguous)
      if (newtype == -1 && validation && validateFieldName != null)
      {
         int    sidx   = validateFieldName.lastIndexOf('.');
         String ambig  = validateFieldName.substring(sidx + 1).toLowerCase();
         String lcText = text.toLowerCase();
         
         // test in ignore-case and also handle abbreviations
         if (ambig.startsWith(lcText))
         {
            text = validateFieldName;
            
            // force the text to the full name
            if (allowChange)
            {
               LT(idx).setText(validateFieldName);
            }
         }
      }
      
      // handle a qualified database naming quirk in which there 
      // is whitespace between the record and the DOT and/or 
      // whitespace between the DOT and the field portion such that
      // Progress matches "record    .field" or "record.  field" or
      // "record  .  field" all as the single qualified field name
      // "record.field";
      if (newtype == -1 && isFieldQuirk)
      {                    
         StringBuilder sb = new StringBuilder();
         sb.append(text).append('.').append(LT(idx3).getText());
         
         String total = sb.toString();
         
         newtype = sym.lookupField(currentRecord, total);
         
         if (newtype != -1 && allowChange)
         {
            // we have the special case of a whitespace-infested 
            // qualified database name, put it "back together"
            
            StringBuilder orig = new StringBuilder();
            
            // merge LA(idx) into LA(idx2)
            ManagedHiddenStreamToken tok = (ManagedHiddenStreamToken) LT(idx);
            
            // save the text of all 3 tokens
            orig.append(tok.getText());
            String middle = LT(idx2).getText();
            String last   = LT(idx3).getText();
            
            // merge the first and second tokens
            String ws = tok.merge();
            
            // save off any hidden text in between
            if (ws != null)
            {
               orig.append(ws);
            }
            
            // add the middle token's text to the buffer
            orig.append(middle);
            
            // manually match the old token to remove it from the stream
            match(LA(idx));
            
            // LT(idx) is the same token that previously was LA(idx2)
            tok = (ManagedHiddenStreamToken) LT(idx);
            
            // merge LA(idx2) into LA(idx3)
            ws = tok.merge();
            
            // save off any hidden text in between
            if (ws != null)
            {
               orig.append(ws);
            }
            
            // add the third token's text to the buffer
            orig.append(last);
            
            // manually the LA(idx2) token to remove it from the stream
            match(DOT);
            
            // save the original text
            fieldNameQuirkOriginalText = orig.toString();
         }
      }
      
      // lookup a field if the variable/widget reference wasn't found the call to isField()
      // is needed because otherwise the schema dictionary may report an ambiguous name even
      // though we don't care about such reports; this is done before the name quirk processing
      // so that a simple field reference is honored in preference
      if ((preferFields || newtype == -1) && sym.isField(text))
      {
         // this may be a field name
         newtype = sym.lookupField(currentRecord, text);
      }
      
      return newtype;
   }
   
   /**
    * Common code to add a scope (symbol dictionary and schema scopes) for a
    * trigger.  See <code>clearTriggerScope()</code>.
    * <p>
    * Triggers can be nested inside procedures, functions and other triggers
    * so we must save the value found here so that it can be restored later.
    * Otherwise we would force everything else to global scope while still in
    * a nested scope.
    *
    * @return   The previous state of the <code>bufferScope</code> variable
    *           which will be set to <code>false</code> by this method and
    *           which must be reset to this returned value when the scope
    *           is popped.
    */
   private boolean setupTriggerScope()
   {
      boolean oldBufScope = bufferScope;
      
      sym.addScope();
      sym.addSchemaScope(true);
      bufferScope = false;
      
      return oldBufScope;
   }
   
   /**
    * Common code to remove a scope (symbol dictionary and schema scopes) for
    * a trigger.  See <code>setupTriggerScope()</code>.
    * <p>
    * Triggers can be nested inside procedures, functions and other triggers
    * so we must restore the value found at entry so that we don't force
    * everything else to global scope while still in a nested scope.
    *
    * @param    oldBufScope
    *           The previous state of the <code>bufferScope</code> flag 
    *           which will be restored in this call.
    */
   private void clearTriggerScope(boolean oldBufScope)
   {
      bufferScope = oldBufScope;
      
      // triggers propagate
      sym.deleteSchemaScope(true);
      sym.deleteScope();
   }
   
   /**
    * Defines a new buffer for the given record name based on the given symbol node which
    * specifies the buffer name. The resulting symbol node is annotated as a result and the
    * symbol resolver and schema dictionary are updated as needed to be aware of the new buffer.
    *
    * @param    symbol
    *           The node that defines the buffer's name.
    * @param    recordName
    *           The record that defines the buffer's structure.
    * @param    am 
    *           Access modifiers if not null. Only will be non-null if this is a resource defined
    *           as a member of a class definition.
    * @param    st
    *           Static specifier if not null. Only will be non-null if this is a resource defined
    *           as a member of a class definition.
    * @param    forceTemp
    *           if {@code true}, assume {@code recordName} represents a temp-table, and do not
    *           search for it in the global schema scope when adding fields from it to the buffer
    *           being define.
    *
    * @return   <code>true</code> if the buffer was properly built.
    */
   private boolean defineBufferFromSymbol(Aast symbol,
                                          String recordName,
                                          Aast am,
                                          Aast st,
                                          boolean forceTemp)
   {
      return defineBufferFromSymbol(symbol, recordName, am, st, forceTemp, true);
   }
   
   /**
    * Defines a new buffer for the given record name based on the given symbol node which
    * specifies the buffer name. The resulting symbol node is annotated as a result and the
    * symbol resolver and schema dictionary are updated as needed to be aware of the new buffer.
    *
    * @param    symbol
    *           The node that defines the buffer's name.
    * @param    recordName
    *           The record that defines the buffer's structure.
    * @param    am 
    *           Access modifiers if not null. Only will be non-null if this is a resource defined
    *           as a member of a class definition.
    * @param    st
    *           Static specifier if not null. Only will be non-null if this is a resource defined
    *           as a member of a class definition.
    * @param    forceTemp
    *           if {@code true}, assume {@code recordName} represents a temp-table, and do not
    *           search for it in the global schema scope when adding fields from it to the buffer
    *           being define.
    * @param    fail
    *           Flag indicating if an exception should be thrown if a match is not found.
    *
    * @return   <code>true</code> if the bufffer was properly built.
    */
   private boolean defineBufferFromSymbol(Aast symbol,
                                          String recordName,
                                          Aast am,
                                          Aast st,
                                          boolean forceTemp,
                                          boolean fail)
   {
      String name = symbol.getText();
   
      if (SymbolResolver.isPreScan() && name.equalsIgnoreCase(recordName))
      {
         // in pre-scan mode, leave only the 'default' buffer and do not allow override with the same name.
         // this 'DEFINE BUFFER b1 FOR b1' statement is possible only for temp-table buffers; for permanent
         // buffers, you can't redefine an already defined 'b1' buffer.
         return true;
      }

      // the target scope is determined by whether we are currently
      // executing in an internal procedure, function or trigger in which
      // case bufferScope is false, otherwise it is true and the
      // buffer is created in a global scope
      Object table = sym.addTable(name, BUFFER, bufferScope, symbol, am, st);
      
      Aast[] fields = sym.addFieldsFrom(table, recordName, forceTemp, false, fail);
      
      if (fields != null)
      {
         String bufname = sym.lookupBufferName(name, false);
         symbol.putAnnotation("bufname", bufname);
      }
      
      return fields != null;
   }
   
   /**
    * If the next token is DOT, COLON, RPARENS, EQUALS, RBRACE, LBRACKET, RBRACKET, PIPE, COMMA,
    * LT, GT or NOT_EQ then attempt to merge until WS is hit with an exclusion of DOT, KW_VALUE
    * and KW_NO_ERROR. If merging happens, then the resulting token will be BROKEN_PREPROC_ARG.
    * This behavior matches the possible broken_preproc_args cases.
    * <p>
    * The only exception is LPARENS which is valid for this case in the 4GL, but which cannot
    * be disambiguated from the use of LPARENS in a real expression (which also works).
    */
   private void fixupBrokenPreprocArg()
   throws TokenStreamException,
          MismatchedTokenException
   {
      boolean rbraceOrPipe = false;
   
      // there is no separate token type or RBRACE or PIPE
      if (LA(1) == UNKNOWN_TOKEN)
      {
         CommonToken tok = (CommonToken) LT(1);
         String      txt = tok.getText();
         
         rbraceOrPipe = ("}".equals(txt) || "|".equals(txt));
      }
      
      // Include check for *next* token being EOF, so we don't process farther than necessary
      boolean notDot = (LA(1) == DOT && !followedByWhitespace(LT(1)) && (LA(2) != EOF));
   
      // TODO: LPARENS should be in this list but we don't have an easy way to disambiguate it
      // from a following expr
      // NOT_EQ is a possible leading combo instead of LT
      if (notDot            || LA(1) == COLON    || LA(1) == RPARENS  || LA(1) == EQUALS   ||
          LA(1) == LBRACKET || LA(1) == RBRACKET || LA(1) == COMMA    || LA(1) == LT       ||
          LA(1) == GT       || LA(1) == NOT_EQ   || rbraceOrPipe)
      {
         // DOT and EOF are hard coded in the worker routine
         int[] exclargs = new int[]
         {
            KW_VALUE,
            KW_NO_ERROR
         };
         
         mergeUntilWS(exclargs);
         
         // even if the first token was not merged, it must be random junk so we have
         // to force the type to something that won't predict the expr rule
         LT(1).setType(BROKEN_PREPROC_ARG);
      }
   }
   
   /**
    * Merge the following non-hidden token text until (and including) a token followed by
    * whitespace or one of a list of following tokens that cannot be matched.  There are 2
    * special tokens added to the list which is passed as a parameter: <code>DOT</code> and
    * <code>EOF</code>.  The <code>DOT</code> is special, in that it is allowed to continue the
    * merging IF it is NOT followed by whitespace.  IF the <code>DOT</code> is followed by
    * whitespace then the merging process ends and the <code>DOT</code> is NOT included
    * in the merged text.
    * <p>
    * All the merged tokens will be consumed and the merged text will be stored in the last token
    * before the token that triggered the end of merging. The line and column numbers of the
    * merged token will be forced to the same values as the first token on entry.
    *
    * @param    end
    *           List of token types which trigger end of merging (in addition to <code>DOT</code>
    *           and <code>EOF</code>). May be <code>null</code> if there are no additional token
    *           types.
    *
    * @return   <code>true</code> if merging was done, <code>false</code> if no changes were
    *           made.
    */
   private boolean mergeUntilWS(int[] end)
   throws TokenStreamException,
          MismatchedTokenException
   {
      if (end == null)
      {
         end = new int[1];
      }
      else
      {
         int[] list = new int[end.length + 1];
         
         for (int i = 0; i < end.length; i++)
         {
            list[i + 1] = end[i];
         }
         
         end = list;
      }
      
      end[0] = EOF;
      
      int first = LA(1);
      
      // quick exit if the first token is in the exit list
      for (int i = 0; i < end.length; i++)
      {
         if (end[i] == first)
         {
            return false;
         }
      }
   
      boolean merged = false;
   
      ManagedHiddenStreamToken current = (ManagedHiddenStreamToken) LT(1);
      ManagedHiddenStreamToken next    = (ManagedHiddenStreamToken) LT(2);
      ManagedHiddenStreamToken after   = (ManagedHiddenStreamToken) LT(3);
      
      int type = next.getType();
      
      while (!followedByWhitespace(current)     && 
             !matchesList(type, end)            &&
             !(type == DOT &&
               (followedByWhitespace(next) || (after != null && after.getType() == EOF))))
      {
         merged = true;
         
         // merge into the next non-hidden token, the current token still exists but the token
         // stream is patched so that the current token can be dropped without any loss of data
         current.merge();
         
         // match the current token but leave the next token unmatched
         if (current.getType() == DOT)
         {
            match(DOT);
         }
         else
         {
            matchNot(DOT);
         }
         
         // update the state for next iteration
         current = next;
         next    = after;
         after   = (ManagedHiddenStreamToken) LT(3);
         type    = next.getType();
      }
      
      return merged;
   }
   
   /**
    * Check if the next token has text of "alt-", "ctrl-", "esc-" or "shift-" and if so, merge
    * that token with all others until whitespace (or some exclusion characters like COMMA) are
    * encountered. This is a special parsing mode enabled by the 4GL for event matching. No
    * changes are made if there is no match.
    */
   private void fixupKeyboardModifiers()
   throws TokenStreamException,
          MismatchedTokenException
   {
      // DOT and EOF are hard coded in the worker routine
      int[] exclude = new int[]
      {
         COLON,
         COMMA,
         EQUALS,
         LPARENS,
         RPARENS,
         NOT_EQ,
         LT,
         LTE,
         GT,
         GTE
      };
         
      String ttxt = LT(1).getText();
      
      // special parsing rules for these keyboard modifiers where they can be paired with
      // a hyphen and any other "key text" without being escaped in a string literal; for
      // example alt-+, shift-a, ctrl-down, esc-5; the problem is that the normal prediction
      // logic won't work since there are multiple tokens; only these prefixes work this
      // way!
      if (ttxt.equalsIgnoreCase("alt-") || ttxt.equalsIgnoreCase("ctrl-") ||
          ttxt.equalsIgnoreCase("esc-") || ttxt.equalsIgnoreCase("shift-"))
      {
         // parse until whitespace
         mergeUntilWS(exclude);
         LT(1).setType(SYMBOL);
      }
   }
   
   /**
    * Tests if the given <code>type</code> matches any in the given list.
    *
    * @param    type
    *           The token type to test for.
    * @param    list
    *           The list to check against.
    *
    * @return   <code>true</code> if the given type is in the list.
    */
   private boolean matchesList(int type, int[] list)
   {
      for (int i = 0; i < list.length; i++)
      {
         if (type == list[i])
            return true;
      }
      
      return false;
   }
   
   /**                          
    * Check if the given token is followed by whitespace in the original
    * source code (by reading from the hidden token stream).
    *
    * @param    tok
    *           The token from the token stream (the lexer) which is needed
    *           in order to examine if there are following hidden tokens.
    *
    * @return   <code>true</code> if the given token is followed by whitespace
    *           in the hidden token stream.
    */
   private boolean followedByWhitespace(Token tok)
   {
      ManagedHiddenStreamToken space = null;
      space = (ManagedHiddenStreamToken) hidden.getHiddenAfter((ManagedHiddenStreamToken) tok);      
      
      return (space != null && space.getType() == WS);
   }
   
   /**
    * Check all following hidden tokens to see if there is by whitespace in the original
    * source code which includes a newline character.
    *
    * @param    tok
    *           The token from the token stream (the lexer) which is needed in order to examine
    *           if there are following hidden tokens.
    *
    * @return   <code>true</code> if the given token is the last content on the line.
    */
   private boolean followedByLineEnd(Token tok)
   {
      ManagedHiddenStreamToken hid = (ManagedHiddenStreamToken) tok;
      hid = (ManagedHiddenStreamToken) hid.getHiddenAfter();      
      
      while (hid != null)
      {
         if (hid.getType() == WS && hid.getText().indexOf("\n") != -1)
         {
            return true;
         }
         
         hid = (ManagedHiddenStreamToken) hid.getHiddenAfter();
      }
      
      return false;
   }
   
   /**
    * Check if the given token is prefaced by whitespace in the original
    * source code (by reading from the hidden token stream).
    *
    * @param    tok
    *           The token from the token stream (the lexer) which is needed
    *           in order to examine any prefacing hidden tokens.
    *
    * @return   <code>true</code> if the given token is prefaced by whitespace
    *           in the hidden token stream.
    */
   private boolean prefacedByWhitespace(Token tok)
   {
      ManagedHiddenStreamToken space = null;
      space = (ManagedHiddenStreamToken) hidden.getHiddenBefore((ManagedHiddenStreamToken) tok);      
      
      return (space != null && space.getType() == WS);
   }
   
   /**
    * Helper function to convert a <code>STRING</code> node into a node of the specified type.
    *
    * @param    node
    *           The <code>STRING</code> node to modify.
    * @param    newtype
    *           The new type of the target node. If passed as -1, the type will be looked up as
    *           a keyword.
    */
   private void convertStringTo(Aast node, int newtype)
   throws TokenStreamException,
          NoViableAltException
   {
      if (node.getType() != STRING)
      {
         throw new RuntimeException("Node must be a STRING type!");
      }
      
      // remove the outer quotes, handle escapes etc...
      String clean = character.progressToJavaString(node.getText(), !unixEscapes, false);
      
      if (newtype == -1)
      {
         // simulate the keyword processing that would have happened if this wasn't a string
         Keyword found = sym.lookupKeyword(clean);
         
         if (found != null)
         {
            newtype = found.getTokenType();
         }
         else
         {
            throw new NoViableAltException(LT(1), getFilename());
         }
      }
                       
      // set the new token type and text
      saveAndReplaceTypeAndText(node, newtype, clean);
   }
   
   /**
    * Helper function to convert a {@code SYMBOL} to {@code STRING} node with the proper annotations.
    *
    * @param    node
    *           The node to modify.  Must be of type {@code SYMBOL}.
    */
   private void convertSymbolToString(Aast node)
   {
      if (node.getType() != SYMBOL)
      {
         throw new RuntimeException("Node must be a SYMBOL type!");
      }
      
      // set the new token type and text
      saveAndReplaceTypeAndText(node, STRING, "\"" + node.getText() + "\"");
      
      node.putAnnotation("is-literal", true);
   }
   
   /**
    * Helper function to replace the current token text and type with the given values, but first
    * original type and text values are saved in annotations named 'oldtype' and 'original-text'.
    *
    * @param    node
    *           The AST to annotate and modify.
    * @param    newtype
    *           The new type of the target node.
    * @param    newtxt
    *           The new text of the target node.
    */
   private void saveAndReplaceTypeAndText(Aast node, int newtype, String newtxt)
   {
      saveAndReplaceType(node, newtype);
      saveAndReplaceText(node, newtxt);
   }
   
   
   /**
    * Helper function to replace the current token text with the given text, but first the
    * original text is saved in an annotation named 'original-text'.
    *
    * @param    node
    *           The AST to annotate and modify.
    * @param    newtxt
    *           The new text of the target node.
    */
   private void saveAndReplaceText(Aast node, String newtxt)
   {
      // save off the old token type
      String oldtxt = node.getText();
      
      // set the new token text
      node.setText(newtxt);
      
      // save any original token text
      if (node.getAnnotation("original-text") == null && oldtxt != null)
      {
         node.putAnnotation("original-text", oldtxt);      
      }
   }
   
   /**
    * Helper function to replace the current token type with a new token
    * type, but first saving off the old type and then storing that old
    * token type in an annotation named 'oldtype'.
    *
    * @param    node
    *           The AST to annotate and modify.
    * @param    newtype
    *           The new type of the target node.
    */
   private void saveAndReplaceType(Aast node, int newtype)
   {
      // save off the old token type
      int oldtype = node.getType();
      
      // set the new token type
      node.setType(newtype);
      
      // save any original token type that rewriting may have erased
      // as an annotation (unless the oldtype is already set)
      if (!node.isAnnotation("oldtype"))
      {
         node.putAnnotation("oldtype", Long.valueOf(oldtype));      
      }
   }
   
   /**
    * The 4GL seems to disambiguate assignment statements from usage of the EQUALS operator, by
    * examining the lvalue.  If the lvalue is of a type that cannot be assigned to, then the
    * operator is treated as an EQUALS not an ASSIGN.  This code attempts to do the same 
    * detection and will rewrite the operator node to an EQUALS (it will be passed in as an
    * ASSIGN).
    *
    * @param    lnode
    *           The lvalue AST to examine.
    * @param    opnode
    *           The operator AST to edit.
    *
    * @return   <code>true</code> if the operator was edited.
    */
   private boolean restoreEqualsOperator(Aast lnode, Aast opnode)
   {
      if (lnode != null && opnode != null)
      {
         int type = lnode.getType();
         
         // object methods can be "bare" (within a class definition a method call can
         // be made without an object reference and colon operator) but normally they
         // use the COLON operator; handle references and COM automation cannot be
         // bare, they always use an operator
         if (type == COLON || type == OBJECT_INVOCATION || type == COM_INVOCATION)
         {
            // in these cases we find the result type of the sub-expression by looking
            // at the 2nd child of the operator (even in a deeply nested chaining case)
            lnode = lnode.getChildAt(1);
            type  = lnode.getType();
         }
         
         if ((type >= BEGIN_FUNCTYPES && type <= END_FUNCTYPES) ||
             (type >= BEGIN_METH && type <= END_METH)           ||
             (type >= BEGIN_OO_METH && type <= END_OO_METH)     ||
             type == COM_METHOD                                 ||
             isLiteral(lnode))
         {
            opnode.setType(EQUALS);
            
            return true;
         }
      }
      
      return false;
   }
   
   /**
    * Report if the node is a literal.
    *
    * @param    node
    *           The node AST to examine.
    *
    * @return   <code>true</code> if the node is a literal.
    */
   private boolean isLiteral(Aast node)
   {
      return node.isAnnotation("is-literal") && (Boolean) node.getAnnotation("is-literal");
   }
   
   /**
    * Some parts of the parser can match a function when it should have matched the same name
    * as an "lvalue-like" language statement. Such matches would be a mistake (since we can't
    * properly lookahead the arbitrary amount needed to detect if there is an EQUALS token.
    * Instead, we detect the problem here and rewrite the node to "undo" the damage. 
    *
    * @param    node
    *           The AST to restore.
    *
    * @return   <code>true</code> if the node was edited.
    */
   private boolean restoreAssignStyleStmt(Aast node)
   {
      if (node.isAnnotation("oldtype")    && 
          (node.getType() < BEGIN_VARTYPES || node.getType() > END_VARTYPES))
      {
         Long otype = (Long) node.getAnnotation("oldtype");
      
         if (otype == KW_CUR_VAL || otype == KW_DYN_CURV || otype == KW_DYN_PROP || otype == KW_ENTRY ||
             otype == KW_SUBSTR  || otype == KW_EXTENT   || otype == KW_LENGTH   || otype == KW_RAW)
         {
            node.setType(otype.intValue());
            node.removeAnnotation("oldtype");
            node.removeAnnotation("builtin");
            node.removeAnnotation("returnsunknown");
            
            return true;
         }
      }
      
      return false;
   }
   
   /**
    * Helper to instantiate a new (limited use) lexer and re-lex the input.
    * The problem is that some initializers have non-strings inside quotes
    * and the lexer doesn't know when to remove the quotes and when to leave
    * them.  This results in the <code>INITIAL</code> having children that
    * are of the <code>STRING</code> type even when they should be some other
    * kind of literal.  <b>This method removes the unnecessary enclosing
    * quote characters and then calls the lexer to obtain the resulting token. 
    * It is assumed at this time that only one token will be present in the
    * passed input string.  If this is not the case, we will have to make
    * more serious changes!</b>
    *
    * @param    input
    *           The single or double quoted enclosed string containing a
    *           token to lex. MUST NOT be <code>null</code>. MUST have
    *           enclosing quote characters as the first AND last characters.
    *
    * @return   The token of the proper token type and text OR 
    *           <code>null</code> if the input text is an empty string.
    */
   private Token relex(String input) 
   throws TokenStreamException
   {
      // we can't just remove the first and last char because string options can be present
      // for example, "<content_or_not>":U
      String cleaner = character.progressToJavaString(input, !unixEscapes, false);
      
      if ("".equals(cleaner))
         return null;
         
      SymbolResolver sr = new SymbolResolver(false);
      
      // disable the dot kludge as the following DOT will sometimes break
      // lexing, this needs to be a single token only
      ProgressLexer relex = new ProgressLexer(new StringReader(cleaner), sr, false);
                                               
      return relex.nextToken();
   }   
   
   /**
    * Loads the <code>SymbolResolver</code> with Progress 4GL built-in
    * functions (which take parameters). This is called during construction 
    * to ensure that the functions are available before parsing begins.
    * <p>
    * Each function is added with the full name (even if the keyword supports
    * abbreviations) because the {@link #func_call} method will detect when
    * a keyword is being used and it will use the keyword dictionary to
    * handle the abbreviation support.  This lookup will convert any
    * abbreviated text to the full text before lookup in the function
    * dictionary.
    * <p>
    * All functions are added with the token type associated with their
    * respective return value.  Some built-in functions may have the special
    * type of <code>FUNC_POLY</code>. This special type indicates that the
    * function can return multiple different return types. The built-in
    * functions typically implement the return type based on the type of the 
    * parameters passed.  User-defined functions cannot provide the same
    * feature, this can only occur in built-in functions.
    * <p>
    * Built-in functions that have no parameters are treated as variables.
    * See {@link #initializeVariableDictionary}.
    * <p>
    * Note that there are some built-in functions that can act like variables
    * OR as a normal parenthesized function.  In other words, for the
    * following list, the parenthesis are optional:
    * <p>
    * <ul>
    *    <li>AUDIT-ENABLED
    *    <li>ETIME
    *    <li>FRAME-COL
    *    <li>FRAME-DOWN
    *    <li>FRAME-LINE
    *    <li>FRAME-ROW
    *    <li>LINE-COUNTER
    *    <li>PAGE-NUMBER
    *    <li>PAGE-SIZE
    *    <li>SUPER (handled in the super_function rule, not here)
    *    <li>USERID (and it's synonym USER which is not an abbreviation)
    * </ul>
    * <p>
    * Such variables/functions are included in both this rule and in
    * <code>initializeVariableDictionary</code>. 
    */
   private void initializeFunctionDictionary()
   {
      if (sym.isRuntimeConfig())
      {
         // already initialized from an exemplar
         return;
      }
      sym.addBuiltinFunction("_cbit"                , FUNC_LOGICAL    , true );
      sym.addBuiltinFunction("_msg"                 , FUNC_INT        , true );
      sym.addBuiltinFunction("absolute"             , FUNC_POLY       , true ); // INT or DEC
      sym.addBuiltinFunction("accumulate"           , FUNC_POLY       , false); // used for annotations only, matches keyword text not actual function name
      sym.addBuiltinFunction("add-interval"         , FUNC_POLY       , false); // DATE, DATETIME or DATETIME-TZ
      sym.addBuiltinFunction("alias"                , FUNC_CHAR       , true );
      sym.addBuiltinFunction("ambiguous"            , FUNC_LOGICAL    , false); // used for annotations only
      sym.addBuiltinFunction("ascending"            , FUNC_INT        , true ); // this is a synonym for ASC
      sym.addBuiltinFunction("audit-enabled"        , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("available"            , FUNC_LOGICAL    , false); // used for annotations only
      sym.addBuiltinFunction("base64-decode"        , FUNC_MEMPTR     , false);
      sym.addBuiltinFunction("base64-encode"        , FUNC_LONGCHAR   , false);
      sym.addBuiltinFunction("box"                  , FUNC_CLASS      , true , "System.Object"); // TODO: this qualified class is wrong but we need a placeholder
      sym.addBuiltinFunction("can-do"               , FUNC_LOGICAL    , true );
      sym.addBuiltinFunction("can-find"             , FUNC_LOGICAL    , false); // used for annotations only
      sym.addBuiltinFunction("can-query"            , FUNC_LOGICAL    , true );
      sym.addBuiltinFunction("can-set"              , FUNC_LOGICAL    , true );
      sym.addBuiltinFunction("caps"                 , FUNC_CHAR       , true );
      sym.addBuiltinFunction("cast"                 , FUNC_CLASS      , true ); // used for annotations only
      sym.addBuiltinFunction("chr"                  , FUNC_CHAR       , true );
      sym.addBuiltinFunction("codepage-convert"     , FUNC_CHAR       , true );
      sym.addBuiltinFunction("compare"              , FUNC_LOGICAL    , true );
      sym.addBuiltinFunction("connected"            , FUNC_LOGICAL    , true );
      sym.addBuiltinFunction("count-of"             , FUNC_INT        , false);
      sym.addBuiltinFunction("current-changed"      , FUNC_LOGICAL    , false); // used for annotations only
      sym.addBuiltinFunction("current-result-row"   , FUNC_INT        , true );
      sym.addBuiltinFunction("current-value"        , FUNC_INT64      , true ); // used for annotations only
      sym.addBuiltinFunction("data-source-modified" , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("date"                 , FUNC_DATE       , true );
      sym.addBuiltinFunction("datetime"             , FUNC_DATETIME   , false);
      sym.addBuiltinFunction("datetime-tz"          , FUNC_DATETIME_TZ, false);
      sym.addBuiltinFunction("day"                  , FUNC_INT        , true );
      sym.addBuiltinFunction("dbcodepage"           , FUNC_CHAR       , true );
      sym.addBuiltinFunction("dbcollation"          , FUNC_CHAR       , true );
      sym.addBuiltinFunction("dbparam"              , FUNC_CHAR       , true );
      sym.addBuiltinFunction("db-remote-host"       , FUNC_CHAR       , true );
      sym.addBuiltinFunction("dbrestrictions"       , FUNC_CHAR       , true );
      sym.addBuiltinFunction("dbtaskid"             , FUNC_INT        , true );
      sym.addBuiltinFunction("dbtype"               , FUNC_CHAR       , true );
      sym.addBuiltinFunction("dbversion"            , FUNC_CHAR       , true );
      sym.addBuiltinFunction("decimal"              , FUNC_DEC        , true );
      sym.addBuiltinFunction("decrypt"              , FUNC_MEMPTR     , false);
      sym.addBuiltinFunction("disable-redraw"       , FUNC_LOGICAL    , false); // not real 4GL, this is a FWD extension
      sym.addBuiltinFunction("dynamic-cast"         , FUNC_CLASS      , true , "Progress.Lang.Object");  // TODO: this qualified class is wrong but we need a placeholder
      sym.addBuiltinFunction("dynamic-current-value", FUNC_INT64      , false);
      sym.addBuiltinFunction("dynamic-enum"         , FUNC_CLASS      , true,  "Progress.Lang.Enum");
      sym.addBuiltinFunction("dynamic-function"     , FUNC_POLY       , true ); // like called func, uses for annotations only
      sym.addBuiltinFunction("dynamic-invoke"       , FUNC_POLY       , true );
      sym.addBuiltinFunction("dynamic-new"          , FUNC_CLASS      , true , "Progress.Lang.Object");  // used for annotations only
      sym.addBuiltinFunction("dynamic-next-value"   , FUNC_INT64      , false);
      sym.addBuiltinFunction("dynamic-property"     , FUNC_POLY       , true );
      sym.addBuiltinFunction("encode"               , FUNC_CHAR       , true );
      sym.addBuiltinFunction("encrypt"              , FUNC_MEMPTR     , false);
      sym.addBuiltinFunction("entered"              , FUNC_LOGICAL    , false); // used for annotations only
      sym.addBuiltinFunction("entry"                , FUNC_CHAR       , true );
      sym.addBuiltinFunction("error"                , FUNC_LOGICAL    , false); // used for annotations only
      sym.addBuiltinFunction("etime"                , FUNC_INT64      , false);
      sym.addBuiltinFunction("exp"                  , FUNC_DEC        , true );
      sym.addBuiltinFunction("extent"               , FUNC_INT        , false);
      sym.addBuiltinFunction("fill"                 , FUNC_CHAR       , true );
      sym.addBuiltinFunction("first"                , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("first-of"             , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("frame-col"            , FUNC_DEC        , false);
      sym.addBuiltinFunction("frame-down"           , FUNC_INT        , false);
      sym.addBuiltinFunction("frame-line"           , FUNC_INT        , false);
      sym.addBuiltinFunction("frame-row"            , FUNC_DEC        , false);
      sym.addBuiltinFunction("generate-pbe-key"     , FUNC_RAW        , false);
      sym.addBuiltinFunction("get-bits"             , FUNC_INT        , true );
      sym.addBuiltinFunction("get-byte"             , FUNC_INT        , true );
      sym.addBuiltinFunction("get-byte-order"       , FUNC_INT        , false);
      sym.addBuiltinFunction("get-bytes"            , FUNC_POLY       , true ); // RAW or MEMPTR
      sym.addBuiltinFunction("get-class"            , FUNC_CLASS      , false, "Progress.Lang.Class"); // found in customer code
      sym.addBuiltinFunction("get-codepages"        , FUNC_CHAR       , false);
      sym.addBuiltinFunction("get-collation"        , FUNC_CHAR       , false);
      sym.addBuiltinFunction("get-collations"       , FUNC_CHAR       , true );
      sym.addBuiltinFunction("get-db-client"        , FUNC_HANDLE     , false);
      sym.addBuiltinFunction("get-double"           , FUNC_DEC        , true );
      sym.addBuiltinFunction("get-float"            , FUNC_DEC        , true );
      sym.addBuiltinFunction("get-int64"            , FUNC_INT64      , false);
      sym.addBuiltinFunction("get-license"          , FUNC_INT        , true ); // undocumented function seen in Possenet code (see adecomm/_toollic.p)
      sym.addBuiltinFunction("get-long"             , FUNC_INT        , true );
      sym.addBuiltinFunction("get-pointer-value"    , FUNC_INT64      , false);
      sym.addBuiltinFunction("get-short"            , FUNC_INT        , true );
      sym.addBuiltinFunction("get-size"             , FUNC_INT64      , false);
      sym.addBuiltinFunction("get-string"           , FUNC_CHAR       , true );
      sym.addBuiltinFunction("get-unsigned-short"   , FUNC_INT        , true );
      sym.addBuiltinFunction("get-unsigned-long"    , FUNC_INT64      , false);
      sym.addBuiltinFunction("get-working-directory", FUNC_CHAR       , false); // not real 4GL, this is a FWD extension
      sym.addBuiltinFunction("guid"                 , FUNC_CHAR       , false);
      sym.addBuiltinFunction("handle"               , FUNC_HANDLE     , false);
      sym.addBuiltinFunction("hash-code"            , FUNC_INT        , true );
      sym.addBuiltinFunction("hex-decode"           , FUNC_RAW        , false);
      sym.addBuiltinFunction("hex-encode"           , FUNC_CHAR       , false);
      sym.addBuiltinFunction("hwnd"                 , FUNC_HANDLE     , false); // FWD extension, not real 4GL!
      sym.addBuiltinFunction("if"                   , FUNC_POLY       , true ); // used for annotations only
      sym.addBuiltinFunction("index"                , FUNC_INT        , true );
      sym.addBuiltinFunction("input"                , FUNC_POLY       , false); // used for annotations only
      sym.addBuiltinFunction("integer"              , FUNC_INT        , true );
      sym.addBuiltinFunction("int64"                , FUNC_INT64      , false);
      sym.addBuiltinFunction("interval"             , FUNC_INT64      , false);
      sym.addBuiltinFunction("is-codepage-fixed"    , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("is-column-codepage"   , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("is-db-multi-tenant"   , FUNC_LOGICAL    , false);  // Added when found in customer code
      sym.addBuiltinFunction("is-lead-byte"         , FUNC_LOGICAL    , true );
      sym.addBuiltinFunction("iso-date"             , FUNC_CHAR       , false);
      sym.addBuiltinFunction("kblabel"              , FUNC_CHAR       , true );
      sym.addBuiltinFunction("keycode"              , FUNC_INT        , true );
      sym.addBuiltinFunction("key-code"             , FUNC_INT        , true );
      sym.addBuiltinFunction("keyfunction"          , FUNC_CHAR       , true );
      sym.addBuiltinFunction("key-function"         , FUNC_CHAR       , true );
      sym.addBuiltinFunction("keylabel"             , FUNC_CHAR       , true );
      sym.addBuiltinFunction("key-label"            , FUNC_CHAR       , true );
      sym.addBuiltinFunction("keyword"              , FUNC_CHAR       , true );
      sym.addBuiltinFunction("keyword-all"          , FUNC_CHAR       , true );
      sym.addBuiltinFunction("last"                 , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("last-of"              , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("lc"                   , FUNC_CHAR       , true );
      sym.addBuiltinFunction("ldbname"              , FUNC_CHAR       , true );
      sym.addBuiltinFunction("left-trim"            , FUNC_CHAR       , true );
      sym.addBuiltinFunction("length"               , FUNC_INT        , true );
      sym.addBuiltinFunction("library"              , FUNC_CHAR       , true );
      sym.addBuiltinFunction("line-counter"         , FUNC_INT        , false);
      sym.addBuiltinFunction("list-events"          , FUNC_CHAR       , true );
      sym.addBuiltinFunction("list-query-attrs"     , FUNC_CHAR       , true );
      sym.addBuiltinFunction("list-set-attrs"       , FUNC_CHAR       , true );
      sym.addBuiltinFunction("list-widgets"         , FUNC_CHAR       , true );
      sym.addBuiltinFunction("load-picture"         , FUNC_COM_HANDLE , true ); // supposed to be a "statement" but really acts like a function
      sym.addBuiltinFunction("locked"               , FUNC_LOGICAL    , false); // used for annotations only
      sym.addBuiltinFunction("log"                  , FUNC_DEC        , true );
      sym.addBuiltinFunction("logical"              , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("lookup"               , FUNC_INT        , true );
      sym.addBuiltinFunction("lower"                , FUNC_CHAR       , true );
      sym.addBuiltinFunction("maximum"              , FUNC_POLY       , true ); // same as parms
      sym.addBuiltinFunction("md5-digest"           , FUNC_RAW        , false);
      sym.addBuiltinFunction("member"               , FUNC_CHAR       , true );
      sym.addBuiltinFunction("message-digest"       , FUNC_RAW        , false);
      sym.addBuiltinFunction("minimum"              , FUNC_POLY       , true ); // same as parms
      sym.addBuiltinFunction("month"                , FUNC_INT        , true );
      sym.addBuiltinFunction("mtime"                , FUNC_INT        , false);
      sym.addBuiltinFunction("new"                  , FUNC_LOGICAL    , false); // used for annotations only
      sym.addBuiltinFunction("next-value"           , FUNC_INT64      , true ); // used for annotations only
      sym.addBuiltinFunction("normalize"            , FUNC_POLY       , false); // CHAR or LONGCHAR
      sym.addBuiltinFunction("not entered"          , FUNC_LOGICAL    , false); // used for annotations only
      sym.addBuiltinFunction("now"                  , FUNC_DATETIME_TZ, true );
      sym.addBuiltinFunction("num-entries"          , FUNC_INT        , true );
      sym.addBuiltinFunction("num-results"          , FUNC_INT        , true );
      sym.addBuiltinFunction("os-getenv"            , FUNC_CHAR       , true );
      sym.addBuiltinFunction("p2j-remote-call"      , FUNC_CHAR       , true ); // P2J-extension, not real 4GL!
      sym.addBuiltinFunction("page-number"          , FUNC_INT        , false);
      sym.addBuiltinFunction("page-size"            , FUNC_INT        , false);
      sym.addBuiltinFunction("pdbname"              , FUNC_CHAR       , true );
      sym.addBuiltinFunction("program-name"         , FUNC_CHAR       , true );
      sym.addBuiltinFunction("query-off-end"        , FUNC_LOGICAL    , true );
      sym.addBuiltinFunction("quoter"               , FUNC_CHAR       , false);
      sym.addBuiltinFunction("r-index"              , FUNC_INT        , true );
      sym.addBuiltinFunction("raw"                  , FUNC_RAW        , false);
      sym.addBuiltinFunction("random"               , FUNC_INT        , true );
      sym.addBuiltinFunction("recid"                , FUNC_RECID      , true ); // used for annotations only
      sym.addBuiltinFunction("record-length"        , FUNC_INT        , false); // used for annotations only
      sym.addBuiltinFunction("rejected"             , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("replace"              , FUNC_CHAR       , true );
      sym.addBuiltinFunction("proversion"           , FUNC_LOGICAL    , true ); // used for annotations only
      sym.addBuiltinFunction("retry"                , FUNC_LOGICAL    , true ); // used for annotations only
      sym.addBuiltinFunction("rgb-value"            , FUNC_INT        , true );
      sym.addBuiltinFunction("right-trim"           , FUNC_CHAR       , true );
      sym.addBuiltinFunction("round"                , FUNC_DEC        , true );
      sym.addBuiltinFunction("rowid"                , FUNC_ROWID      , true ); // used for annotations only
      sym.addBuiltinFunction("row-state"            , FUNC_INT        , false); // used for annotations only
      sym.addBuiltinFunction("sdbname"              , FUNC_CHAR       , true );
      sym.addBuiltinFunction("search"               , FUNC_CHAR       , true );
      sym.addBuiltinFunction("seek"                 , FUNC_INT        , true );
      sym.addBuiltinFunction("setuserid"            , FUNC_LOGICAL    , true );
      sym.addBuiltinFunction("set-db-client"        , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("set-working-directory", FUNC_LOGICAL    , false); // not real 4GL, this is a FWD extension
      sym.addBuiltinFunction("sha1-digest"          , FUNC_RAW        , false);
      sym.addBuiltinFunction("sqrt"                 , FUNC_DEC        , true );
      sym.addBuiltinFunction("ssl-server-name"      , FUNC_CHAR       , false);
      sym.addBuiltinFunction("string"               , FUNC_CHAR       , true );
      sym.addBuiltinFunction("substitute"           , FUNC_CHAR       , true );
      sym.addBuiltinFunction("substring"            , FUNC_CHAR       , true );
      sym.addBuiltinFunction("super"                , FUNC_POLY       , true ); // used for annotations only
      sym.addBuiltinFunction("tenant-id"            , FUNC_INT        , true ); // found in customer code
      sym.addBuiltinFunction("tenant-name"          , FUNC_CHAR       , true ); // found in customer code
      sym.addBuiltinFunction("tenant-name-to-id"    , FUNC_INT        , true ); // found in customer code
      sym.addBuiltinFunction("time"                 , FUNC_INT        , false); // used for annotations only
      sym.addBuiltinFunction("timezone"             , FUNC_INT        , false);
      sym.addBuiltinFunction("to-rowid"             , FUNC_ROWID      , true );
      sym.addBuiltinFunction("today"                , FUNC_DATE       , false); // used for annotations only
      sym.addBuiltinFunction("trans"                , FUNC_LOGICAL    , true ); // used for annotations only
      sym.addBuiltinFunction("transaction"          , FUNC_LOGICAL    , true ); // used for annotations only
      sym.addBuiltinFunction("trim"                 , FUNC_CHAR       , true );
      sym.addBuiltinFunction("truncate"             , FUNC_DEC        , true );
      sym.addBuiltinFunction("type-of"              , FUNC_LOGICAL    , false); // used for annotations only
      sym.addBuiltinFunction("unbox"                , FUNC_POLY       , true );
      sym.addBuiltinFunction("upper"                , FUNC_CHAR       , true );
      sym.addBuiltinFunction("user"                 , FUNC_CHAR       , false);
      sym.addBuiltinFunction("userid"               , FUNC_CHAR       , false);
      sym.addBuiltinFunction("url-encode"           , FUNC_CHAR       , false);  // not real 4GL built-in, this one is being added as a FWD extension; normally it comes with webspeed (4GL code in src/web/method/cgiutils.i)
      sym.addBuiltinFunction("valid-event"          , FUNC_LOGICAL    , true );
      sym.addBuiltinFunction("valid-handle"         , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("valid-object"         , FUNC_LOGICAL    , false);
      sym.addBuiltinFunction("weekday"              , FUNC_INT        , true );
      sym.addBuiltinFunction("widget-handle"        , FUNC_HANDLE     , true );
      sym.addBuiltinFunction("xpr-to-pdf"           , FUNC_LOGICAL    , false); // not real 4GL, this is a FWD extension
      sym.addBuiltinFunction("year"                 , FUNC_INT        , true );
      
      if (webspeed)
      {
         // add our "fake" webspeed built-in functions
         sym.addBuiltinFunction("available-messages" , FUNC_LOGICAL , false);
         sym.addBuiltinFunction("check-agent-mode"   , FUNC_LOGICAL , false);
         sym.addBuiltinFunction("convert-datetime"   , FUNC_CHAR    , false);
         sym.addBuiltinFunction("delete-cookie"      , FUNC_CHAR    , true );
         sym.addBuiltinFunction("format-datetime"    , FUNC_CHAR    , false);
         sym.addBuiltinFunction("get-cgi"            , FUNC_CHAR    , false);
         sym.addBuiltinFunction("get-cgi-long"       , FUNC_LONGCHAR, false);
         sym.addBuiltinFunction("get-config"         , FUNC_CHAR    , false);
         sym.addBuiltinFunction("get-cookie"         , FUNC_CHAR    , false);
         sym.addBuiltinFunction("get-field"          , FUNC_CHAR    , false);
         sym.addBuiltinFunction("get-long-value"     , FUNC_LONGCHAR, false);
         sym.addBuiltinFunction("get-message-groups" , FUNC_CHAR    , false);
         sym.addBuiltinFunction("get-messages"       , FUNC_CHAR    , false);
         sym.addBuiltinFunction("get-user-field"     , FUNC_CHAR    , false);
         sym.addBuiltinFunction("get-value"          , FUNC_CHAR    , false);
         sym.addBuiltinFunction("hidden-field"       , FUNC_CHAR    , false);
         sym.addBuiltinFunction("hidden-field-list"  , FUNC_CHAR    , false);
         sym.addBuiltinFunction("html-encode"        , FUNC_CHAR    , false);
         sym.addBuiltinFunction("output-content-type", FUNC_LOGICAL , false);
         sym.addBuiltinFunction("output-http-header" , FUNC_CHAR    , false);
         sym.addBuiltinFunction("output-messages"    , FUNC_INT     , false);
         sym.addBuiltinFunction("queue-message"      , FUNC_INT     , false);
         sym.addBuiltinFunction("set-cookie"         , FUNC_CHAR    , false);
         sym.addBuiltinFunction("set-user-field"     , FUNC_LOGICAL , false);
         sym.addBuiltinFunction("setwebstate"        , FUNC_LOGICAL , false);
         sym.addBuiltinFunction("url-decode"         , FUNC_CHAR    , false);
         sym.addBuiltinFunction("url-field"          , FUNC_CHAR    , false);
         sym.addBuiltinFunction("url-field-list"     , FUNC_CHAR    , false);
         sym.addBuiltinFunction("url-format"         , FUNC_CHAR    , false);
      }
   }
   
   /**
    * Loads the <code>SymbolResolver</code> with Progress 4GL attributes and
    * methods. This is called during construction to ensure that resolution 
    * is available before parsing begins.
    * <p>
    * Each attribute or method is added with the keyword's token type as the
    * key and the data type (attributes) or return type (methods) as the
    * mapped value.
    */
   private void initializeAttributesDictionary()
   {
      if (sym.isRuntimeConfig())
      {
         // already initialized from an exemplar
         return;
      }
      sym.addAllAttributesAndMethods(getAttributesAndMethods());
      
      sym.setAttributeOrMethodType( KW_CUR_RQI , "Progress.Lang.OERequestInfo" );
      sym.setAttributeOrMethodType( KW_CUR_RSI , "Progress.Lang.OERequestInfo" );
      sym.setAttributeOrMethodType( KW_FIRST_FM, "Progress.Windows.IForm" );
      sym.setAttributeOrMethodType( KW_FIRST_OB, SymbolResolver.ROOT_OBJ_NAME );
      sym.setAttributeOrMethodType( KW_LAST_FRM, "Progress.Windows.IForm" );
      sym.setAttributeOrMethodType( KW_LAST_OBJ, SymbolResolver.ROOT_OBJ_NAME );
      sym.setAttributeOrMethodType( KW_LOC_V_I , "Progress.Lang.OEVersionInfo" );
      sym.setAttributeOrMethodType( KW_REQ_INFO, "Progress.Lang.OERequestInfo" );
      sym.setAttributeOrMethodType( KW_RSP_INFO, "Progress.Lang.OERequestInfo" );
   }
   
   /**
    * Defines all built-in system handles in 4GL.
    * <p>
    * Any change in this list must be reflected in the {@link Call#setInHandle(String)} API, as
    * a system handle can be referenced by its name, via the CALL:IN-HANDLE attribute.
    *
    * @return   A set of system handle names.
    */
   public static Set<String> getSysHandles()
   {
      Set<String> res = new HashSet();

      res.add("active-window");
      res.add("audit-control");
      res.add("audit-policy");
      res.add("clipboard");
      res.add("codebase-locator");
      res.add("color-table");
      res.add("com-self");
      res.add("compiler");
      res.add("current-window");
      res.add("debugger");
      res.add("default-window");
      res.add("dslog-manager");
      res.add("error-status");
      res.add("file-information");
      res.add("focus");
      res.add("font-table");
      res.add("last-event");
      res.add("log-manager");
      res.add("profiler");
      res.add("rcode-information");
      res.add("security-policy");
      res.add("self");
      res.add("session");
      res.add("source-procedure");
      res.add("target-procedure");
      res.add("this-procedure");
      res.add("web-context");
      
      return res;
   }
   
   /**
    * Get a map with the type of all known attributes and methods.
    *
    * @return   See above.
    */
   public static Map<Integer, Integer> getAttributesAndMethods()
   {
      Map<Integer, Integer> attrsAndMethods = new HashMap<>();
      
      attrsAndMethods.put( KW_ACCEL,    ATTR_CHAR    );
      attrsAndMethods.put( KW_ACC_CHG , METH_LOGICAL );
      attrsAndMethods.put( KW_ACC_RCHG, METH_LOGICAL );
      attrsAndMethods.put( KW_ACTIVATE, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ACTIVE  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_ACTOR   , ATTR_CHAR    );
      attrsAndMethods.put( KW_ADD_BCCA, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ADD_BUF , METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_CC_A, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ADD_C_C , METH_HANDLE  );
      attrsAndMethods.put( KW_ADD_C_F , METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_EVTP, METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_F_F , METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_1ST , METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_C_N,  METH_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ADD_F_N,  METH_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ADD_L_N,  METH_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ADD_N_N,  METH_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ADD_HENT, METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_IDXF, METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_IMG,  METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ADD_LAST, METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_L_C , METH_HANDLE  );
      attrsAndMethods.put( KW_ADD_LIKF, METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_LIKI, METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_NEWF, METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_NEWI, METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_PREL, METH_HANDLE  );
      attrsAndMethods.put( KW_ADD_REL , METH_HANDLE  );
      attrsAndMethods.put( KW_ADD_SLOC, METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_SRCB, METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_SUP , METH_LOGICAL );
      attrsAndMethods.put( KW_ADD_TAB , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ADD_TO_A, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ADM_DATA, ATTR_CHAR    );
      attrsAndMethods.put( KW_AFT_BUFF, ATTR_HANDLE  );
      attrsAndMethods.put( KW_AFT_ROID, ATTR_ROWID   );
      attrsAndMethods.put( KW_AFT_TBL , ATTR_HANDLE  );
      attrsAndMethods.put( KW_ALLW_C_S, ATTR_LOGICAL );
      attrsAndMethods.put( KW_ALW_ON_T, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AMBIG   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_APPEND_C, METH_LOGICAL );
      attrsAndMethods.put( KW_APPL_A_B, ATTR_LOGICAL );
      attrsAndMethods.put( KW_APPL_CID, ATTR_CHAR    );
      attrsAndMethods.put( KW_APPL_CBK, METH_LOGICAL );
      attrsAndMethods.put( KW_APP_INFO, ATTR_CHAR    );
      attrsAndMethods.put( KW_APP_PW  , ATTR_CHAR    );
      attrsAndMethods.put( KW_APP_UID , ATTR_CHAR    );
      attrsAndMethods.put( KW_AST_ACTI, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ASYNC   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_ASYNC_RC, ATTR_INT     );
      attrsAndMethods.put( KW_ASYNC_RH, ATTR_HANDLE  );
      attrsAndMethods.put( KW_ATT_DSRC, METH_LOGICAL );
      attrsAndMethods.put( KW_ATT_FILE, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ATT_PLST, ATTR_CHAR    );
      attrsAndMethods.put( KW_ATT_URL,  METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ATTR    , ATTR_LOGICAL );
      attrsAndMethods.put( KW_ATTR_NAM, ATTR_CHAR    );
      attrsAndMethods.put( KW_AUD_EV_C, ATTR_CHAR    );
      attrsAndMethods.put( KW_AUTHBLOB, ATTR_CHAR    );; // FWD extension, not real 4GL
      attrsAndMethods.put( KW_AUTHEN_F, METH_LOGICAL );
      attrsAndMethods.put( KW_AUTO_COM, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AUTO_DEL, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AUTO_D_X, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AUTO_END, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AUTO_GO , ATTR_LOGICAL );
      attrsAndMethods.put( KW_AUTO_IND, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AUTO_RES, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AUTO_RET, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AUTO_SYN, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AUTO_VAL, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AUTO_ZAP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_AVAIL   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_AVL_FMTS, ATTR_CHAR    );
      attrsAndMethods.put( KW_BACKGRND, ATTR_HANDLE  );
      attrsAndMethods.put( KW_BAS_LOGG, ATTR_LOGICAL );
      attrsAndMethods.put( KW_BASE_ADE, ATTR_CHAR    );
      attrsAndMethods.put( KW_BATCH_MO, ATTR_LOGICAL );
      attrsAndMethods.put( KW_BATCH_SZ, ATTR_INT     );
      attrsAndMethods.put( KW_B4_BUFF , ATTR_HANDLE  );
      attrsAndMethods.put( KW_B4_ROWID, ATTR_ROWID   );
      attrsAndMethods.put( KW_B4_TABLE, ATTR_HANDLE  );
      attrsAndMethods.put( KW_BEG_EV_G, METH_CHAR    );
      attrsAndMethods.put( KW_BGCOLOR , ATTR_INT     );
      attrsAndMethods.put( KW_BGCOLRGB, ATTR_INT     ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_BLANK   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_BLK_IT_D, ATTR_LOGICAL );
      attrsAndMethods.put( KW_BL_CURGR ,ATTR_HANDLE  ); // FWD Ext. Attr:   ButtonList:CurrentGroup
      attrsAndMethods.put( KW_BL_CGR_K ,ATTR_CHAR    ); // FWD Ext. Attr:   ButtonList:CurrentGroup-Key
      attrsAndMethods.put( KW_BL_BTNFN ,ATTR_INT     ); // FWD Ext. Attr:   ButtonList:ButtonFont
      attrsAndMethods.put( KW_BL_ITMFN ,ATTR_INT     ); // FWD Ext. Attr:   ButtonList:ItemFont
      attrsAndMethods.put( KW_BL_GCLR  ,METH_LOGICAL ); // FWD Ext. Method: ButtonList:Clear-ButtonList
      attrsAndMethods.put( KW_BL_GADD  ,METH_HANDLE  ); // FWD Ext. Method: ButtonList:Add-Group
      attrsAndMethods.put( KW_BL_GIFP  ,METH_HANDLE  ); // FWD Ext. Method: ButtonListGroup:Item-FromPosition
      attrsAndMethods.put( KW_BL_IADD  ,METH_HANDLE  ); // FWD Ext. Method: ButtonListGroup:Add-Item
      attrsAndMethods.put( KW_BL_G_KEY ,ATTR_CHAR    ); // FWD Ext. Attr:   ButtonListGroup:Group-Key
      attrsAndMethods.put( KW_BL_GIKEY ,ATTR_CHAR    ); // FWD Ext. Attr:   ButtonListGroupItem:Item-Key
      attrsAndMethods.put( KW_BL_NGR   , ATTR_INT    ); // FWD Ext. Attr:   ButtonList:Num-Groups
      attrsAndMethods.put( KW_BL_NGRI  , ATTR_INT    ); // FWD Ext. Attr:   ButtonListGroup:Num-Group-Items
      attrsAndMethods.put( KW_BL_G_GR  ,METH_HANDLE  ); // FWD Ext. Method: ButtonList:Get-Group
      attrsAndMethods.put( KW_BL_G_GRI ,METH_HANDLE  ); // FWD Ext. Method: ButtonListGroup:Get-Group-Item
      attrsAndMethods.put( KW_BORD_B_C, ATTR_DEC     );
      attrsAndMethods.put( KW_BORD_B_P, ATTR_INT     );
      attrsAndMethods.put( KW_BORD_L_C, ATTR_DEC     );
      attrsAndMethods.put( KW_BORD_L_P, ATTR_INT     );
      attrsAndMethods.put( KW_BORD_R_C, ATTR_DEC     );
      attrsAndMethods.put( KW_BORD_R_P, ATTR_INT     );
      attrsAndMethods.put( KW_BORD_T_C, ATTR_DEC     );
      attrsAndMethods.put( KW_BORD_T_P, ATTR_INT     );
      attrsAndMethods.put( KW_BOX     , ATTR_LOGICAL );
      attrsAndMethods.put( KW_BOX_SEL , ATTR_LOGICAL );
      attrsAndMethods.put( KW_BR_AGENT, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_BR_IP   , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_BR_PORT , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_BR_TZ   , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_BUFFER_C, ATTR_INT     );
      attrsAndMethods.put( KW_BUFFER_L, ATTR_INT     );
      attrsAndMethods.put( KW_BUF_COMP, METH_LOGICAL );
      attrsAndMethods.put( KW_BUF_COPY, METH_LOGICAL );
      attrsAndMethods.put( KW_BUF_CREA, METH_LOGICAL );
      attrsAndMethods.put( KW_BUF_DEL , METH_LOGICAL );
      attrsAndMethods.put( KW_BUF_FLD , ATTR_HANDLE  ); // warning: this can have LPARENS-based subscripting!
      attrsAndMethods.put( KW_BUF_GRPI, ATTR_INT     );
      attrsAndMethods.put( KW_BUF_GRPN, ATTR_CHAR    );
      attrsAndMethods.put( KW_BUF_HNDL, ATTR_HANDLE  );
      attrsAndMethods.put( KW_BUF_NAME, ATTR_CHAR    );
      attrsAndMethods.put( KW_BUF_PARI, ATTR_INT     );
      attrsAndMethods.put( KW_BUF_REL , METH_LOGICAL );
      attrsAndMethods.put( KW_BUF_TENI, ATTR_INT     );
      attrsAndMethods.put( KW_BUF_TENN, ATTR_CHAR    );
      attrsAndMethods.put( KW_BUF_VLID, METH_LOGICAL );
      attrsAndMethods.put( KW_BUF_VAL , ATTR_POLY    );
      attrsAndMethods.put( KW_BUILD_TR, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_BYTES_R , ATTR_INT     );
      attrsAndMethods.put( KW_BYTES_W , ATTR_INT     );
      attrsAndMethods.put( KW_CACHE,    ATTR_INT     );
      attrsAndMethods.put( KW_CALBGCLR, ATTR_INT     ); // FWD CALENDAR:CalendarBackColor extension, not real 4GL
      attrsAndMethods.put( KW_CALCUFMT, ATTR_CHAR    ); // FWD CALENDAR:CustomFormat extension, not real 4GL
      attrsAndMethods.put( KW_CALFGCLR, ATTR_INT     ); // FWD CALENDAR:CalendarForeColor extension, not real 4GL
      attrsAndMethods.put( KW_CALFMTST, ATTR_INT     ); // FWD CALENDAR:FormatStyle extension, not real 4GL
      attrsAndMethods.put( KW_CALL_NAM, ATTR_CHAR    );
      attrsAndMethods.put( KW_CALL_TYP, ATTR_INT     );
      attrsAndMethods.put( KW_CALLBACK, ATTR_CHAR    ); // FWD TIMER extension
      attrsAndMethods.put( KW_CALTITBG, ATTR_INT     ); // FWD CALENDAR:TitleBackColor extension, not real 4GL
      attrsAndMethods.put( KW_CALTITFG, ATTR_INT     ); // FWD CALENDAR:TitleForeColor extension, not real 4GL
      attrsAndMethods.put( KW_CALTRLFG, ATTR_INT     ); // FWD CALENDAR:TrailingForeColor extension, not real 4GL
      attrsAndMethods.put( KW_CALUPDWN, ATTR_LOGICAL ); // FWD CALENDAR:UpDown extension, not real 4GL
      attrsAndMethods.put( KW_CALVALUE, ATTR_CHAR    ); // FWD CALENDAR:CalendarValue extension, not real 4GL
      attrsAndMethods.put( KW_CANC_BRK, METH_LOGICAL );
      attrsAndMethods.put( KW_CANCEL_B, ATTR_HANDLE  );
      attrsAndMethods.put( KW_CANCEL_R, METH_LOGICAL );
      attrsAndMethods.put( KW_CANCELLD, ATTR_LOGICAL );
      attrsAndMethods.put( KW_CAN_CREA, ATTR_LOGICAL );
      attrsAndMethods.put( KW_CAN_DEL , ATTR_LOGICAL );
      attrsAndMethods.put( KW_CAN_READ, ATTR_LOGICAL );
      attrsAndMethods.put( KW_CAN_WRT , ATTR_LOGICAL );
      attrsAndMethods.put( KW_CAPFNT  , ATTR_INT     ); // FWD extension WithCaption:CAPTIONFONT, not real 4GL
      attrsAndMethods.put( KW_CAPFNTSZ, ATTR_INT     ); // FWD extension WithCaption:CAPTIONFONT-SIZE, not real 4GL
      attrsAndMethods.put( KW_CARE_PNT, ATTR_LOGICAL );
      attrsAndMethods.put( KW_CASE_SEN, ATTR_LOGICAL );
      attrsAndMethods.put( KW_CEASE,    METH_VOID    ); // FWD TIMER extension
      attrsAndMethods.put( KW_CENTER  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_CFG_NAME, ATTR_CHAR    );
      attrsAndMethods.put( KW_CHARSET , ATTR_CHAR    );
      attrsAndMethods.put( KW_CHECK_BO, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CHECKED , ATTR_LOGICAL );
      attrsAndMethods.put( KW_NODES   , ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CHLD_BUF, ATTR_HANDLE  );
      attrsAndMethods.put( KW_CHLD_NUM, ATTR_INT     );
      attrsAndMethods.put( KW_CLEA_TAB, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLEA_WIN, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLEAR   , METH_LOGICAL );
      attrsAndMethods.put( KW_CLR_ALL , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLR_AP_C, METH_LOGICAL );
      attrsAndMethods.put( KW_CLR_ATTL, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLR_BCCL, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLR_CC_L, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLR_EMBL, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLR_LOG , METH_LOGICAL );
      attrsAndMethods.put( KW_CLR_NIML, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLR_NODS, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLR_SEL , METH_LOGICAL );
      attrsAndMethods.put( KW_CLR_S_AR, METH_LOGICAL );
      attrsAndMethods.put( KW_CLR_TABS, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLR_TO_L, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLS_TYPE, ATTR_CHAR    );
      attrsAndMethods.put( KW_CLN_IP,   ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLN_PORT, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLN_TZ  , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLN_TIME, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLNT_C_I, ATTR_CHAR    );
      attrsAndMethods.put( KW_CLNT_DIS, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CLNT_TTY, ATTR_CHAR    );
      attrsAndMethods.put( KW_CLNT_TYP, ATTR_CHAR    );
      attrsAndMethods.put( KW_CLNT_WS , ATTR_CHAR    );
      attrsAndMethods.put( KW_CLONE_ND, METH_LOGICAL );
      attrsAndMethods.put( KW_CLOSE_LG, METH_LOGICAL );
      attrsAndMethods.put( KW_CNCL_R_A, METH_LOGICAL );
      attrsAndMethods.put( KW_CNTRL_BX, ATTR_LOGICAL );
      attrsAndMethods.put( KW_CP      , ATTR_CHAR    );
      attrsAndMethods.put( KW_CPY_DSET, METH_LOGICAL );
      attrsAndMethods.put( KW_CPY_SATR, METH_LOGICAL );
      attrsAndMethods.put( KW_CPY_TTBL, METH_LOGICAL );
      attrsAndMethods.put( KW_CODE    , ATTR_INT     );
      attrsAndMethods.put( KW_COL     , ATTR_DEC     );
      attrsAndMethods.put( KW_COLUMNS , ATTR_DEC     );
      attrsAndMethods.put( KW_COL_BGC , ATTR_INT     );
      attrsAndMethods.put( KW_COL_CP  , ATTR_CHAR    );
      attrsAndMethods.put( KW_COL_DC  , ATTR_INT     );
      attrsAndMethods.put( KW_COL_FGC , ATTR_INT     );
      attrsAndMethods.put( KW_COL_FONT, ATTR_INT     );
      attrsAndMethods.put( KW_COL_LAB , ATTR_CHAR    );
      attrsAndMethods.put( KW_COL_MOV , ATTR_LOGICAL );
      attrsAndMethods.put( KW_COL_NODE, METH_VOID    ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_COL_PFC , ATTR_INT     );
      attrsAndMethods.put( KW_COL_R_O , ATTR_LOGICAL );
      attrsAndMethods.put( KW_COL_RES , ATTR_LOGICAL );
      attrsAndMethods.put( KW_COL_SCR , ATTR_LOGICAL );
      attrsAndMethods.put( KW_COLL_A_E, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_COLL_ALL, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_COLOR   , ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_COM_HNDL, ATTR_COM_HANDLE );
      attrsAndMethods.put( KW_COMPLETE, ATTR_LOGICAL );
      attrsAndMethods.put( KW_CONN    , METH_LOGICAL );
      attrsAndMethods.put( KW_CONN_ED , METH_LOGICAL );
      attrsAndMethods.put( KW_CONNTYPE, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CTX_H   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_CTX_H_F , ATTR_CHAR    );
      attrsAndMethods.put( KW_CTX_H_ID, ATTR_INT     );
      attrsAndMethods.put( KW_CTX_PATH, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CVT_3D_C, ATTR_LOGICAL );
      attrsAndMethods.put( KW_COVERAGE, ATTR_LOGICAL ); // undocumented, found in customer code
      attrsAndMethods.put( KW_CPCASE  , ATTR_CHAR    );
      attrsAndMethods.put( KW_CPCOLL  , ATTR_CHAR    );
      attrsAndMethods.put( KW_CPINTERN, ATTR_CHAR    );
      attrsAndMethods.put( KW_CPLOG   , ATTR_CHAR    );
      attrsAndMethods.put( KW_CPPRINT , ATTR_CHAR    );
      attrsAndMethods.put( KW_CPRCODEI, ATTR_CHAR    );
      attrsAndMethods.put( KW_CPRCODEO, ATTR_CHAR    );
      attrsAndMethods.put( KW_CPSTREAM, ATTR_CHAR    );
      attrsAndMethods.put( KW_CPTERM  , ATTR_CHAR    );
      attrsAndMethods.put( KW_CRC_VAL , ATTR_INT     );
      attrsAndMethods.put( KW_CREAT_LK, METH_LOGICAL );
      attrsAndMethods.put( KW_CREAT_SN, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CR_LK_SQ, METH_LOGICAL );
      attrsAndMethods.put( KW_CRE_IMAG, METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CREAT_OA, ATTR_LOGICAL );  // undocumented, found in customer code
      attrsAndMethods.put( KW_CREAT_ND, METH_LOGICAL );
      attrsAndMethods.put( KW_CREAT_NN, METH_LOGICAL );
      attrsAndMethods.put( KW_CREAT_RL, METH_LOGICAL );
      attrsAndMethods.put( KW_CRT_COL , METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CRT_MIMG, METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CUR_CHG , ATTR_LOGICAL );
      attrsAndMethods.put( KW_CUR_CHAR, ATTR_INT     );
      attrsAndMethods.put( KW_CUR_COL , ATTR_HANDLE  );
      attrsAndMethods.put( KW_CUR_ITER, ATTR_HANDLE  );
      attrsAndMethods.put( KW_CUR_LINE, ATTR_INT     );
      attrsAndMethods.put( KW_CUR_ENV , ATTR_CHAR    );
      attrsAndMethods.put( KW_CUR_OFF , ATTR_INT     );
      attrsAndMethods.put( KW_CUR_RES , ATTR_INT     );
      attrsAndMethods.put( KW_CUR_RQI , ATTR_CLASS   );
      attrsAndMethods.put( KW_CUR_RSI , ATTR_CLASS   );
      attrsAndMethods.put( KW_CUR_R_M , ATTR_LOGICAL );
      attrsAndMethods.put( KW_CUR_WIN , ATTR_HANDLE  );
      attrsAndMethods.put( KW_CUR_QRY , METH_HANDLE  );
      attrsAndMethods.put( KW_CURR_TAB, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_CVT_2OFF, METH_INT     );
      attrsAndMethods.put( KW_ADD_TAB , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ALIGN   , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DATA_E_R, ATTR_LOGICAL );
      attrsAndMethods.put( KW_DATA_SCM, ATTR_CHAR    );
      attrsAndMethods.put( KW_DATA_SM , ATTR_LOGICAL );
      attrsAndMethods.put( KW_DATA_SRC, ATTR_HANDLE  );
      attrsAndMethods.put( KW_DATA_SRI, ATTR_ROWID   ); // assigning this is done as an attribute, but reading looks like a method with a parenthsized parameter but the 4GL docs call it an attribute
      attrsAndMethods.put( KW_DATASET , ATTR_HANDLE  );
      attrsAndMethods.put( KW_DATATYPE, ATTR_CHAR    );
      attrsAndMethods.put( KW_DATE_FMT, ATTR_CHAR    );
      attrsAndMethods.put( KW_DATE_SEP, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DB_CTXT , ATTR_CHAR    );
      attrsAndMethods.put( KW_DB_JOIN , ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DB_LIST , ATTR_CHAR    );
      attrsAndMethods.put( KW_DB_REF  , ATTR_CHAR    );
      attrsAndMethods.put( KW_DBNAME  , ATTR_CHAR    );
      attrsAndMethods.put( KW_DCLK_EXP, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DCOLOR  , ATTR_INT     );
      attrsAndMethods.put( KW_DD_OTREE, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DDE_ERR , ATTR_INT     );
      attrsAndMethods.put( KW_DDE_ID  , ATTR_INT     );
      attrsAndMethods.put( KW_DDE_ITEM, ATTR_CHAR    );
      attrsAndMethods.put( KW_DDE_NAME, ATTR_CHAR    );
      attrsAndMethods.put( KW_DDE_TOPI, ATTR_CHAR    );
      attrsAndMethods.put( KW_DBG_ALRT, ATTR_LOGICAL );
      attrsAndMethods.put( KW_DEBLANK , ATTR_LOGICAL );
      attrsAndMethods.put( KW_DEBUG   , METH_LOGICAL );
      attrsAndMethods.put( KW_DEC_SEP , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DECIMALS, ATTR_INT     );
      attrsAndMethods.put( KW_DECL_NSP, METH_LOGICAL );
      attrsAndMethods.put( KW_DEFAULT , ATTR_LOGICAL );
      attrsAndMethods.put( KW_DEF_BUFH, ATTR_HANDLE  );
      attrsAndMethods.put( KW_DEF_COMM, ATTR_LOGICAL );
      attrsAndMethods.put( KW_DEFLT_BN, ATTR_HANDLE  );
      attrsAndMethods.put( KW_DEF_STR , ATTR_CHAR    );
      attrsAndMethods.put( KW_DEF_VAL , ATTR_POLY    );
      attrsAndMethods.put( KW_DEL_CHAR, METH_LOGICAL );
      attrsAndMethods.put( KW_DEL_C_R , METH_LOGICAL );
      attrsAndMethods.put( KW_DEL_H_EN, METH_LOGICAL );
      attrsAndMethods.put( KW_DEL_LINE, METH_LOGICAL );
      attrsAndMethods.put( KW_DEL_NODE, METH_LOGICAL );
      attrsAndMethods.put( KW_DEL_R_L , METH_LOGICAL );
      attrsAndMethods.put( KW_DEL_S_R , METH_LOGICAL );
      attrsAndMethods.put( KW_DEL_S_RS, METH_LOGICAL );
      attrsAndMethods.put( KW_DELETE  , METH_LOGICAL );
      attrsAndMethods.put( KW_DELIMIT , ATTR_CHAR    );
      attrsAndMethods.put( KW_DESCR   , ATTR_CHAR    ); // undocumented, found in customer code
      attrsAndMethods.put( KW_DESEL_R , METH_LOGICAL );
      attrsAndMethods.put( KW_DESEL_FR, METH_LOGICAL );
      attrsAndMethods.put( KW_DESEL_SR, METH_LOGICAL );
      attrsAndMethods.put( KW_DET_DSRC, METH_LOGICAL );
      attrsAndMethods.put( KW_DEVICEID, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DIRECTRY, ATTR_CHAR    ); // undocumented, found in customer code
      attrsAndMethods.put( KW_DIS_A_ZA, ATTR_LOGICAL );
      attrsAndMethods.put( KW_DIS_CEDT, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DIS_D_TR, METH_LOGICAL );
      attrsAndMethods.put( KW_DIS_L_TR, METH_LOGICAL );
      attrsAndMethods.put( KW_DIS_REDR, ATTR_LOGICAL ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_DIS_STRP, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DISABL_C, METH_LOGICAL );
      attrsAndMethods.put( KW_DISABLE , METH_LOGICAL );
      attrsAndMethods.put( KW_DISCONN , METH_LOGICAL );
      attrsAndMethods.put( KW_DISP_MSG, METH_LOGICAL );
      attrsAndMethods.put( KW_DISP_TZ , ATTR_INT     );
      attrsAndMethods.put( KW_DISP_TYP, ATTR_CHAR    );
      attrsAndMethods.put( KW_DOMAIN_D, ATTR_CHAR    );
      attrsAndMethods.put( KW_DOMAIN_N, ATTR_CHAR    );
      attrsAndMethods.put( KW_DOMAIN_T, ATTR_CHAR    );
      attrsAndMethods.put( KW_DOWN    , ATTR_INT     );
      attrsAndMethods.put( KW_DRAG_EN , ATTR_LOGICAL );
      attrsAndMethods.put( KW_DRAGDROP, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DROP_TAR, ATTR_LOGICAL );
      attrsAndMethods.put( KW_DUMP_LGN, METH_LOGICAL );
      attrsAndMethods.put( KW_DYNAMIC , ATTR_LOGICAL );
      attrsAndMethods.put( KW_EDGE_C  , ATTR_DEC     );
      attrsAndMethods.put( KW_EDGE_P  , ATTR_INT     );
      attrsAndMethods.put( KW_EDIT_C_P, ATTR_LOGICAL );
      attrsAndMethods.put( KW_EDIT_C_U, ATTR_LOGICAL );
      attrsAndMethods.put( KW_EDIT_CLR, METH_LOGICAL );
      attrsAndMethods.put( KW_EDIT_CPY, METH_LOGICAL );
      attrsAndMethods.put( KW_EDIT_CUT, METH_LOGICAL );
      attrsAndMethods.put( KW_EDIT_PAS, METH_LOGICAL );
      attrsAndMethods.put( KW_EDIT_UND, METH_LOGICAL );
      attrsAndMethods.put( KW_EH_FL,    ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_EH_SR,    ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_EMB_FILE, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_EMB_URL,  METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_EMPTY   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_EMPTY_DS, METH_LOGICAL );
      attrsAndMethods.put( KW_EMPTY_TT, METH_LOGICAL );
      attrsAndMethods.put( KW_ENABLE  , METH_LOGICAL );
      attrsAndMethods.put( KW_ENABLE_C, METH_LOGICAL );
      attrsAndMethods.put( KW_ENABLE_E, METH_CHAR    );
      attrsAndMethods.put( KW_ENABLED , ATTR_LOGICAL ); // undocumented, found in customer code
      attrsAndMethods.put( KW_ENC_AMK , METH_CHAR    );
      attrsAndMethods.put( KW_ENC_SALT, ATTR_RAW     ); 
      attrsAndMethods.put( KW_ENCODING, ATTR_CHAR    );
      attrsAndMethods.put( KW_END_DOC , METH_LOGICAL );
      attrsAndMethods.put( KW_END_ELEM, METH_LOGICAL );
      attrsAndMethods.put( KW_END_EV_G, METH_LOGICAL );
      attrsAndMethods.put( KW_END_F_D , METH_LOGICAL );
      attrsAndMethods.put( KW_END_USER, ATTR_CHAR    );
      attrsAndMethods.put( KW_ENS_N_V , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ENT_EX_L, ATTR_INT     );
      attrsAndMethods.put( KW_ENT_TLST, ATTR_CHAR    );
      attrsAndMethods.put( KW_ENTRY   , METH_CHAR    );
      attrsAndMethods.put( KW_ERROR   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_ERR_COL , ATTR_INT     );
      attrsAndMethods.put( KW_ERR_OBJD, ATTR_HANDLE  );
      attrsAndMethods.put( KW_ERR_ROW , ATTR_INT     );
      attrsAndMethods.put( KW_ERR_S_T , ATTR_LOGICAL );
      attrsAndMethods.put( KW_ERR_STR , ATTR_CHAR    );
      attrsAndMethods.put( KW_EVT_ACTI, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_EVT_GRID, ATTR_CHAR    );
      attrsAndMethods.put( KW_EVT_PROC, ATTR_CHAR    );
      attrsAndMethods.put( KW_EVT_TYPE, ATTR_CHAR    );
      attrsAndMethods.put( KW_E_PROC_C, ATTR_HANDLE  );
      attrsAndMethods.put( KW_EXEC_LOG, ATTR_LOGICAL );
      attrsAndMethods.put( KW_EXCL_ID , ATTR_CHAR    );
      attrsAndMethods.put( KW_EXITCODE, ATTR_INT     );
      attrsAndMethods.put( KW_EXP_N_IC, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_EXP_NODE, METH_VOID    ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_EXP_ON_E, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_EXP_SCLK, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_EXPA_ALL, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_EXPAND  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_EXPANDBL, ATTR_LOGICAL );
      attrsAndMethods.put( KW_EXPORT  , METH_LOGICAL );
      attrsAndMethods.put( KW_EXPORT_P, METH_RAW     );
      attrsAndMethods.put( KW_EXTENT  , ATTR_INT     );
      attrsAndMethods.put( KW_FETCH_SR, METH_LOGICAL );
      attrsAndMethods.put( KW_FGCOLOR , ATTR_INT     );
      attrsAndMethods.put( KW_FGCOLRGB, ATTR_INT     ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_FIL_C_D , ATTR_DATE    );
      attrsAndMethods.put( KW_FIL_C_T , ATTR_INT     );
      attrsAndMethods.put( KW_FIL_NAME, ATTR_CHAR    );
      attrsAndMethods.put( KW_FIL_OFF,  ATTR_INT     );
      attrsAndMethods.put( KW_FIL_M_D , ATTR_DATE    );
      attrsAndMethods.put( KW_FIL_M_T , ATTR_INT     );
      attrsAndMethods.put( KW_FIL_SIZE, ATTR_INT     );
      attrsAndMethods.put( KW_FIL_TYPE, ATTR_CHAR    );
      attrsAndMethods.put( KW_FILL    , METH_LOGICAL );
      attrsAndMethods.put( KW_FILL_MOD, ATTR_CHAR    );
      attrsAndMethods.put( KW_FILL_WST, ATTR_CHAR    );
      attrsAndMethods.put( KW_FILLED  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_FIND_BR , METH_LOGICAL );
      attrsAndMethods.put( KW_FIND_CUR, METH_LOGICAL );
      attrsAndMethods.put( KW_FIND_1ST, METH_LOGICAL );
      attrsAndMethods.put( KW_FIND_LST, METH_LOGICAL );
      attrsAndMethods.put( KW_FIND_NOD, METH_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FIND_UNI, METH_LOGICAL );
      attrsAndMethods.put( KW_FIR_DSET, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_AR, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_BU, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_CH, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_CO, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_DS, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_FM, ATTR_CLASS   );
      attrsAndMethods.put( KW_FIRST_N , ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FIRST_OB, ATTR_CLASS   );
      attrsAndMethods.put( KW_FIRST_OF, METH_LOGICAL );
      attrsAndMethods.put( KW_FIT_LCOL, ATTR_LOGICAL );
      attrsAndMethods.put( KW_FIRST_PR, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_QR, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_SR, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_SS, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_SO, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIRST_TI, ATTR_HANDLE  );
      attrsAndMethods.put( KW_FIX_C_L , METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FLAT_BUT, ATTR_LOGICAL );
      attrsAndMethods.put( KW_FLTR_MAP, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FNT_BOLD, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FNT_ITAL, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FNT_NAME, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FNT_SIZE, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FNT_UNDL, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FOC_ASEL, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FOC_NKEY, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FOC_NODE, ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FOCUS_R , ATTR_INT     );
      attrsAndMethods.put( KW_FOCUS_RS, ATTR_LOGICAL );
      attrsAndMethods.put( KW_FONT    , ATTR_INT     );
      attrsAndMethods.put( KW_FORE    , ATTR_LOGICAL );
      attrsAndMethods.put( KW_F_KEY_H , ATTR_LOGICAL );
      attrsAndMethods.put( KW_DB_JOIN , ATTR_LOGICAL );
      attrsAndMethods.put( KW_FORM_INP, ATTR_CHAR    );
      attrsAndMethods.put( KW_FORM_LIN, ATTR_MEMPTR  );
      attrsAndMethods.put( KW_FORMAT  , ATTR_CHAR    );
      attrsAndMethods.put( KW_FORMATTE, ATTR_LOGICAL );
      attrsAndMethods.put( KW_FRAGMENT, ATTR_LOGICAL );
      attrsAndMethods.put( KW_FRAME   , ATTR_HANDLE  );
      attrsAndMethods.put( KW_FR_COL  , ATTR_DEC     );
      attrsAndMethods.put( KW_FR_NAME , ATTR_CHAR    );
      attrsAndMethods.put( KW_FR_ROW  , ATTR_DEC     );
      attrsAndMethods.put( KW_FR_SPACE, ATTR_INT     );
      attrsAndMethods.put( KW_FR_X    , ATTR_INT     );
      attrsAndMethods.put( KW_FR_Y    , ATTR_INT     );
      attrsAndMethods.put( KW_FREQ    , ATTR_INT     );
      attrsAndMethods.put( KW_FS_NKEY , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FS_NODE , ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FULL_H_C, ATTR_DEC     );
      attrsAndMethods.put( KW_FULL_H_P, ATTR_INT     );
      attrsAndMethods.put( KW_FULL_W_C, ATTR_DEC     );
      attrsAndMethods.put( KW_FULL_W_P, ATTR_INT     );
      attrsAndMethods.put( KW_FULLPATH, ATTR_CHAR    );
      attrsAndMethods.put( KW_FUNCT   , ATTR_CHAR    );
      attrsAndMethods.put( KW_FV_NODE , ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_FWD_LOGF, ATTR_CHAR    ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_FWD_ONLY, ATTR_LOGICAL );
      attrsAndMethods.put( KW_G_C_BGCO, METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_G_C_FGCO, METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_G_COL_P , METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_G_COL_W , METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_ATTL, METH_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_ATTR, METH_CHAR    );  // the 4GL docs say this should return LOGICAL, but that is not actually correct
      attrsAndMethods.put( KW_GET_A_N , METH_LOGICAL );
      attrsAndMethods.put( KW_GET_BCCL, METH_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_BDAT, METH_MEMPTR  );
      attrsAndMethods.put( KW_GET_BLUE, METH_INT     );
      attrsAndMethods.put( KW_GET_BR_C, METH_HANDLE  );
      attrsAndMethods.put( KW_GET_BUFH, METH_HANDLE  );
      attrsAndMethods.put( KW_GET_B_A , ATTR_INT     );
      attrsAndMethods.put( KW_GET_C_S , METH_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_CBPC, METH_HANDLE  );
      attrsAndMethods.put( KW_GET_CBPN, METH_CHAR    );
      attrsAndMethods.put( KW_GET_CC_L, METH_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_CFGV, METH_CHAR    );
      attrsAndMethods.put( KW_GET_CGIL, METH_CHAR    );
      attrsAndMethods.put( KW_GET_CGIV, METH_CHAR    );
      attrsAndMethods.put( KW_GET_CGLV, METH_LONGCHAR);
      attrsAndMethods.put( KW_GET_CHG , METH_LOGICAL );
      attrsAndMethods.put( KW_GET_CHLD, METH_LOGICAL );
      attrsAndMethods.put( KW_GET_CLNT, METH_HANDLE  );
      attrsAndMethods.put( KW_GET_CREL, METH_HANDLE  );
      attrsAndMethods.put( KW_GET_CUR , METH_LOGICAL );
      attrsAndMethods.put( KW_GET_D_E , METH_LOGICAL );
      attrsAndMethods.put( KW_GET_D_F , METH_CHAR    );
      attrsAndMethods.put( KW_GET_DS_B, METH_HANDLE  );
      attrsAndMethods.put( KW_GET_DYN , METH_LOGICAL );
      attrsAndMethods.put( KW_GET_EMBL, METH_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_ERRC, METH_INT     );
      attrsAndMethods.put( KW_GET_ERRR, METH_INT     );
      attrsAndMethods.put( KW_GET_FCN , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_FNAM, METH_CHAR    );
      attrsAndMethods.put( KW_GET_FOFF, METH_INT     );
      attrsAndMethods.put( KW_GET_1ST , METH_LOGICAL );
      attrsAndMethods.put( KW_GET_GRN , METH_INT     );
      attrsAndMethods.put( KW_GET_HD_E, METH_LOGICAL );
      attrsAndMethods.put( KW_GET_IBNN, METH_INT     );
      attrsAndMethods.put( KW_GET_IBQN, METH_INT     );
      attrsAndMethods.put( KW_GET_ITER, METH_HANDLE  );
      attrsAndMethods.put( KW_GET_LAST, METH_LOGICAL );
      attrsAndMethods.put( KW_GET_LNBI, METH_CHAR    );
      attrsAndMethods.put( KW_GET_LPRM, METH_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_MOP , METH_POLY    ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_GET_MSG , METH_CHAR    );
      attrsAndMethods.put( KW_GET_N_AT, METH_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_N_BG, METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_N_FG, METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_N_HC, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_N_N , METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_NEXT, METH_LOGICAL );
      attrsAndMethods.put( KW_GET_NLEV, METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_NODE, METH_LOGICAL );
      attrsAndMethods.put( KW_GET_NSN , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_NTXT, METH_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_NUM , METH_INT     );
      attrsAndMethods.put( KW_GET_NVV,  METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_PAR , METH_LOGICAL );
      attrsAndMethods.put( KW_GET_PARN, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_PREV, METH_LOGICAL );
      attrsAndMethods.put( KW_GET_PROP, METH_CHAR    );
      attrsAndMethods.put( KW_GET_PRT , METH_CHAR    );
      attrsAndMethods.put( KW_GET_PSN , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_QNBI, METH_CHAR    );
      attrsAndMethods.put( KW_GET_RED , METH_INT     );
      attrsAndMethods.put( KW_GET_REL , METH_HANDLE  );
      attrsAndMethods.put( KW_GET_R_R , METH_INT     );
      attrsAndMethods.put( KW_GET_RGB , METH_INT     );
      attrsAndMethods.put( KW_GET_SELW, METH_HANDLE  );
      attrsAndMethods.put( KW_GET_SER , METH_LONGCHAR);
      attrsAndMethods.put( KW_GET_SIG , METH_CHAR    );
      attrsAndMethods.put( KW_GET_SIMG, METH_MEMPTR  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_S_O , METH_CHAR    );
      attrsAndMethods.put( KW_GET_SNC , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_SRCB, ATTR_HANDLE  );
      attrsAndMethods.put( KW_GET_TBI , METH_CHAR    );
      attrsAndMethods.put( KW_GET_TBNN, METH_CHAR    );
      attrsAndMethods.put( KW_GET_TBQN, METH_CHAR    );
      attrsAndMethods.put( KW_GET_TI  , METH_HANDLE  );
      attrsAndMethods.put( KW_GET_THCH, METH_DEC     );
      attrsAndMethods.put( KW_GET_THPX, METH_INT     );
      attrsAndMethods.put( KW_GET_TNOD, METH_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_TO_L, METH_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_GET_TOPB, METH_HANDLE  );
      attrsAndMethods.put( KW_GET_TWCH, METH_DEC     );
      attrsAndMethods.put( KW_GET_TWPX, METH_INT     );
      attrsAndMethods.put( KW_GET_UBI , METH_CHAR    );
      attrsAndMethods.put( KW_GET_VBI , METH_CHAR    );
      attrsAndMethods.put( KW_GET_VBNN, METH_CHAR    );
      attrsAndMethods.put( KW_GET_VBQN, METH_CHAR    );
      attrsAndMethods.put( KW_GET_WAIT, METH_CHAR    );
      attrsAndMethods.put( KW_GRAPHIC , ATTR_LOGICAL );
      attrsAndMethods.put( KW_GRD_F_H , ATTR_INT     );
      attrsAndMethods.put( KW_GRD_F_V , ATTR_INT     );
      attrsAndMethods.put( KW_GRD_SNAP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_GRD_UHC , ATTR_DEC     );
      attrsAndMethods.put( KW_GRD_UHP , ATTR_INT     );
      attrsAndMethods.put( KW_GRD_UWC , ATTR_DEC     );
      attrsAndMethods.put( KW_GRD_UWP , ATTR_INT     );
      attrsAndMethods.put( KW_GRD_VIS , ATTR_LOGICAL );
      attrsAndMethods.put( KW_GROUP_BX, ATTR_LOGICAL );
      attrsAndMethods.put( KW_H_SCRL_P, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_HIT_TEST, METH_COM_HANDLE); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_HIT_TFWD, METH_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_HANDLE  , ATTR_HANDLE  );
      attrsAndMethods.put( KW_HANDLER , ATTR_HANDLE  );
      attrsAndMethods.put( KW_HAS_LOBS, ATTR_LOGICAL );
      attrsAndMethods.put( KW_HAS_REC , ATTR_LOGICAL );
      attrsAndMethods.put( KW_HEIGHT_C, ATTR_DEC     );
      attrsAndMethods.put( KW_HEIGHT_P, ATTR_INT     );
      attrsAndMethods.put( KW_HELP    , ATTR_CHAR    );
      attrsAndMethods.put( KW_HIDDEN  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_HORIZ   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_HTML_CHS, ATTR_CHAR    );
      attrsAndMethods.put( KW_HTML_EOL, ATTR_CHAR    );
      attrsAndMethods.put( KW_HTML_EOP, ATTR_CHAR    );
      attrsAndMethods.put( KW_HTML_FRB, ATTR_CHAR    );
      attrsAndMethods.put( KW_HTML_FRE, ATTR_CHAR    );
      attrsAndMethods.put( KW_HTML_H_B, ATTR_CHAR    );
      attrsAndMethods.put( KW_HTML_H_E, ATTR_CHAR    );
      attrsAndMethods.put( KW_HTML_T_B, ATTR_CHAR    );
      attrsAndMethods.put( KW_HTML_T_E, ATTR_CHAR    );
      attrsAndMethods.put( KW_HWND    , ATTR_INT     );
      attrsAndMethods.put( KW_HYPERLNK, ATTR_CHAR    );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_ICON    , ATTR_CHAR    );
      attrsAndMethods.put( KW_ICFPARM , ATTR_CHAR    );
      attrsAndMethods.put( KW_IDEPHWND, ATTR_INT     );  // undocumented, found in customer code as INT (not HANDLE)
      attrsAndMethods.put( KW_IDEWNTYP, ATTR_INT     );  // undocumented
      attrsAndMethods.put( KW_IGN_CMOD, ATTR_LOGICAL );
      attrsAndMethods.put( KW_IMAGE   , ATTR_CHAR    );
      attrsAndMethods.put( KW_IMG_DOWN, ATTR_CHAR    );
      attrsAndMethods.put( KW_IMG_INS , ATTR_CHAR    );
      attrsAndMethods.put( KW_IMG_LIST, ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IMG_ONLY, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IL_BGCOL, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IL_HEIGH, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IL_WIDTH, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IL_LIST , ATTR_COM_HANDLE ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IL_MASK , ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IL_OVER , ATTR_COM_HANDLE ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IL_UMASK, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IMG_UP  , ATTR_CHAR    );
      attrsAndMethods.put( KW_IMM_DISP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_IMP_NODE, METH_LOGICAL );
      attrsAndMethods.put( KW_IMP_PRNC, METH_LOGICAL );
      attrsAndMethods.put( KW_IDX_INFO, ATTR_CHAR    );
      attrsAndMethods.put( KW_IN_HNDL , ATTR_HANDLE  );
      attrsAndMethods.put( KW_INC_EX_I, METH_INT     );
      attrsAndMethods.put( KW_INDENT,   ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_INDEX   , ATTR_INT     );
      attrsAndMethods.put( KW_INH_BGC , ATTR_LOGICAL );
      attrsAndMethods.put( KW_INH_FGC , ATTR_LOGICAL );
      attrsAndMethods.put( KW_INIT    , ATTR_CHAR    );
      attrsAndMethods.put( KW_INIT_C_P, METH_LOGICAL );
      attrsAndMethods.put( KW_INIT_D_T, METH_LOGICAL );
      attrsAndMethods.put( KW_INITIATE, METH_LOGICAL );
      attrsAndMethods.put( KW_INNER_C , ATTR_INT     );
      attrsAndMethods.put( KW_INNER_L , ATTR_INT     );
      attrsAndMethods.put( KW_INPT_VAL, ATTR_POLY    );
      attrsAndMethods.put( KW_INS_ATTR, METH_LOGICAL );
      attrsAndMethods.put( KW_INS_B4  , METH_LOGICAL );
      attrsAndMethods.put( KW_INS_BTAB, METH_LOGICAL );
      attrsAndMethods.put( KW_INS_FILE, METH_LOGICAL );
      attrsAndMethods.put( KW_INS_ROW , METH_LOGICAL );
      attrsAndMethods.put( KW_INS_STR , METH_LOGICAL );
      attrsAndMethods.put( KW_INS_TAB , METH_LOGICAL );
      attrsAndMethods.put( KW_INSERT  , METH_LOGICAL );
      attrsAndMethods.put( KW_INST_PRC, ATTR_HANDLE  );
      attrsAndMethods.put( KW_INT_ENT , ATTR_CHAR    );
      attrsAndMethods.put( KW_INTERVAL, ATTR_INT64   ); // FWD TIMER extension
      attrsAndMethods.put( KW_INVOKE  , METH_VOID    );
      attrsAndMethods.put( KW_IP_TIME , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IS_C_VIS, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IS_CLASS, ATTR_LOGICAL );
      attrsAndMethods.put( KW_IS_DB_MT, FUNC_LOGICAL ); // latest language reference includes this
      attrsAndMethods.put( KW_IS_JSON , ATTR_LOGICAL );
      attrsAndMethods.put( KW_IS_M_TEN, ATTR_LOGICAL ); // undocumented, found in customer code
      attrsAndMethods.put( KW_IS_MSEL,  METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IS_N_EXP, METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_IS_OPEN , ATTR_LOGICAL );
      attrsAndMethods.put( KW_IS_PART , ATTR_LOGICAL );
      attrsAndMethods.put( KW_IS_P_SET, ATTR_LOGICAL );
      attrsAndMethods.put( KW_IS_R_SEL, METH_LOGICAL );
      attrsAndMethods.put( KW_IS_SEL  , METH_LOGICAL );
      attrsAndMethods.put( KW_IS_XML  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_ITEM_ROW, ATTR_INT     );
      attrsAndMethods.put( KW_KEEP_CON, ATTR_LOGICAL );
      attrsAndMethods.put( KW_KEEP_ZOR, ATTR_LOGICAL );
      attrsAndMethods.put( KW_KEEP_SEC, ATTR_LOGICAL );
      attrsAndMethods.put( KW_KEY     , ATTR_LOGICAL );
      attrsAndMethods.put( KW_KEYS    , ATTR_CHAR    );
      attrsAndMethods.put( KW_KPAD_HOT, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_KPAD_CLE, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_KPAD_QRY, METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_LABEL   , ATTR_CHAR    );
      attrsAndMethods.put( KW_LAB_BGC , ATTR_INT     );
      attrsAndMethods.put( KW_LAB_DC  , ATTR_INT     );
      attrsAndMethods.put( KW_LAB_FGC , ATTR_INT     );
      attrsAndMethods.put( KW_LAB_FONT, ATTR_INT     );
      attrsAndMethods.put( KW_LABELS  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_LAB_H_C , ATTR_LOGICAL );
      attrsAndMethods.put( KW_LANGUAGE, ATTR_CHAR    );
      attrsAndMethods.put( KW_LARGE   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_LAST_AR , ATTR_HANDLE  );
      attrsAndMethods.put( KW_LAST_BAT, ATTR_LOGICAL );
      attrsAndMethods.put( KW_LAST_CH , ATTR_HANDLE  );
      attrsAndMethods.put( KW_LAST_FRM, ATTR_CLASS   );
      attrsAndMethods.put( KW_LAST_OBJ, ATTR_CLASS   );
      attrsAndMethods.put( KW_LAST_OF , METH_LOGICAL );
      attrsAndMethods.put( KW_LAST_PRC, ATTR_HANDLE  );
      attrsAndMethods.put( KW_LAST_SRV, ATTR_HANDLE  );
      attrsAndMethods.put( KW_LAST_SS , ATTR_HANDLE  );
      attrsAndMethods.put( KW_LAST_SOC, ATTR_HANDLE  );
      attrsAndMethods.put( KW_LAST_TI , ATTR_HANDLE  );
      attrsAndMethods.put( KW_LCD_REFR, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_LCD_SWIN, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_LCD_WSTR, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_LCHR_2NV, METH_LOGICAL );
      attrsAndMethods.put( KW_LENGTH  , ATTR_INT     );
      attrsAndMethods.put( KW_LG_2_SM , ATTR_LOGICAL );
      attrsAndMethods.put( KW_LIB     , ATTR_CHAR    );
      attrsAndMethods.put( KW_LIB_C_C , ATTR_CHAR    );
      attrsAndMethods.put( KW_LINE    , ATTR_INT     );
      attrsAndMethods.put( KW_LISTINGS, ATTR_LOGICAL );  // undocumented, found in customer code
      attrsAndMethods.put( KW_LIST_PNM, METH_CHAR    );
      attrsAndMethods.put( KW_LIT_QSTN, ATTR_LOGICAL );
      attrsAndMethods.put( KW_LOAD    , METH_LOGICAL );
      attrsAndMethods.put( KW_LOAD_DMN, METH_LOGICAL );
      attrsAndMethods.put( KW_LOAD_ICO, METH_LOGICAL );
      attrsAndMethods.put( KW_LOAD_IMG, METH_LOGICAL );
      attrsAndMethods.put( KW_LOAD_I_D, METH_LOGICAL );
      attrsAndMethods.put( KW_LOAD_I_I, METH_LOGICAL );
      attrsAndMethods.put( KW_LOAD_I_U, METH_LOGICAL );
      attrsAndMethods.put( KW_LOAD_M_P, METH_LOGICAL );
      attrsAndMethods.put( KW_LOAD_S_I, METH_LOGICAL );
      attrsAndMethods.put( KW_LOC_V_I , ATTR_CLASS   );
      attrsAndMethods.put( KW_LOC_C_N , ATTR_INT     );
      attrsAndMethods.put( KW_LOC_HOST, ATTR_CHAR    );
      attrsAndMethods.put( KW_LOC_L_N , ATTR_INT     );
      attrsAndMethods.put( KW_LOC_NAME, ATTR_CHAR    );
      attrsAndMethods.put( KW_LOC_PORT, ATTR_INT     );
      attrsAndMethods.put( KW_LOC_P_ID, ATTR_CHAR    );
      attrsAndMethods.put( KW_LOC_S_ID, ATTR_CHAR    );
      attrsAndMethods.put( KW_LOC_TYPE, ATTR_CHAR    );
      attrsAndMethods.put( KW_LOCKED  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_LOCK_REG, METH_LOGICAL );
      attrsAndMethods.put( KW_LOOKUP  , METH_INT     );
      attrsAndMethods.put( KW_LOG_A_EV, METH_CHAR    );
      attrsAndMethods.put( KW_LOG_E_TS, ATTR_DATETIME_TZ );
      attrsAndMethods.put( KW_LOG_EN_T, ATTR_CHAR    );
      attrsAndMethods.put( KW_LOG_ID  , ATTR_INT     );
      attrsAndMethods.put( KW_LOG_HOST, ATTR_CHAR    );
      attrsAndMethods.put( KW_LOG_STAT, ATTR_CHAR    );
      attrsAndMethods.put( KW_LOG_THRS, ATTR_INT     );
      attrsAndMethods.put( KW_LOGF_NAM, ATTR_CHAR    );
      attrsAndMethods.put( KW_LOGG_LEV, ATTR_INT     );
      attrsAndMethods.put( KW_LOGOUT  , METH_LOGICAL );
      attrsAndMethods.put( KW_LST_PAIR, ATTR_CHAR    );
      attrsAndMethods.put( KW_LIST_ITM, ATTR_CHAR    );
      attrsAndMethods.put( KW_M_D_I_P,  METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_M_U_I_P,  METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_MAND    , ATTR_LOGICAL );
      attrsAndMethods.put( KW_MAN_HIGH, ATTR_LOGICAL );
      attrsAndMethods.put( KW_MARG_H_C, ATTR_DEC     ); // undocumented attributes found in customer source code
      attrsAndMethods.put( KW_MARG_H_P, ATTR_INT     ); // undocumented attributes found in customer source code
      attrsAndMethods.put( KW_MARG_W_C, ATTR_DEC     ); // undocumented attributes found in customer source code
      attrsAndMethods.put( KW_MARG_W_P, ATTR_INT     ); // undocumented attributes found in customer source code
      attrsAndMethods.put( KW_MARK_NEW, METH_LOGICAL );
      attrsAndMethods.put( KW_MARK_RS , METH_LOGICAL );
      attrsAndMethods.put( KW_MAX_BTN , ATTR_LOGICAL );
      attrsAndMethods.put( KW_MAX_CHAR, ATTR_INT     );
      attrsAndMethods.put( KW_MAX_D_G , ATTR_INT     );
      attrsAndMethods.put( KW_MAX_HT  , ATTR_DEC     );
      attrsAndMethods.put( KW_MAX_H_C , ATTR_DEC     );
      attrsAndMethods.put( KW_MAX_H_P , ATTR_INT     );
      attrsAndMethods.put( KW_MAX_LVL , ATTR_INT     );
      attrsAndMethods.put( KW_MAX_VAL , ATTR_INT     );
      attrsAndMethods.put( KW_MAX_WID , ATTR_INT     );
      attrsAndMethods.put( KW_MAX_W_C , ATTR_DEC     );
      attrsAndMethods.put( KW_MAX_W_P , ATTR_INT     );
      attrsAndMethods.put( KW_MD5_VAL , ATTR_CHAR    );
      attrsAndMethods.put( KW_MPTR_2NV, METH_LOGICAL );
      attrsAndMethods.put( KW_MENU_BAR, ATTR_HANDLE  );
      attrsAndMethods.put( KW_MENU_KEY, ATTR_CHAR    );
      attrsAndMethods.put( KW_MENU_MOU, ATTR_INT     );
      attrsAndMethods.put( KW_MERGE_BF, ATTR_LOGICAL );
      attrsAndMethods.put( KW_MERGE_CH, METH_LOGICAL );
      attrsAndMethods.put( KW_MERGE_RC, METH_LOGICAL );
      attrsAndMethods.put( KW_MIN_BTN , ATTR_LOGICAL );
      attrsAndMethods.put( KW_MIN_CWCH, ATTR_DEC     );
      attrsAndMethods.put( KW_MIN_CWPX, ATTR_INT     );
      attrsAndMethods.put( KW_MIN_H_C , ATTR_DEC     );
      attrsAndMethods.put( KW_MIN_H_P , ATTR_INT     );
      attrsAndMethods.put( KW_MIN_SCHM, ATTR_LOGICAL );
      attrsAndMethods.put( KW_MIN_VAL , ATTR_INT     );
      attrsAndMethods.put( KW_MIN_W_C , ATTR_DEC     );
      attrsAndMethods.put( KW_MIN_W_P , ATTR_INT     );
      attrsAndMethods.put( KW_MSICON,   ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_MODIFIRS, ATTR_INT     ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_MSG_AREA, ATTR_LOGICAL );
      attrsAndMethods.put( KW_MSG_AFNT, ATTR_INT     );
      attrsAndMethods.put( KW_MSG_AMSG, METH_CHAR    ); // undocumented SESSION method
      attrsAndMethods.put( KW_MSPNTNUM, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_MNEMON,   ATTR_INT     ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_MODIFIED, ATTR_LOGICAL );
      attrsAndMethods.put( KW_MOU_PTR , ATTR_CHAR    );
      attrsAndMethods.put( KW_MOVABLE , ATTR_LOGICAL );
      attrsAndMethods.put( KW_MOV_A_T , METH_LOGICAL );
      attrsAndMethods.put( KW_MOV_B_T , METH_LOGICAL );
      attrsAndMethods.put( KW_MOV_COL , METH_LOGICAL );
      attrsAndMethods.put( KW_MOV_2_B , METH_LOGICAL );
      attrsAndMethods.put( KW_MOV_2_T , METH_LOGICAL );
      attrsAndMethods.put( KW_MOV_2EOF, METH_LOGICAL );
      attrsAndMethods.put( KW_MULT_CMP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_MULTIPLE, ATTR_LOGICAL );
      attrsAndMethods.put( KW_MULTI_IN, ATTR_INT     );
      attrsAndMethods.put( KW_MUST_UND, ATTR_LOGICAL );
      attrsAndMethods.put( KW_OWN_DOC , ATTR_HANDLE  );
      attrsAndMethods.put( KW_OVERLAY , ATTR_LOGICAL );
      attrsAndMethods.put( KW_NAME    , ATTR_CHAR    );
      attrsAndMethods.put( KW_NAMESP_P, ATTR_CHAR    );
      attrsAndMethods.put( KW_NAMESP_U, ATTR_CHAR    );
      attrsAndMethods.put( KW_NEEDS_AP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_NEEDS_PR, ATTR_LOGICAL );
      attrsAndMethods.put( KW_NESTED  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_NEW     , ATTR_LOGICAL );
      attrsAndMethods.put( KW_NEW_ROW , ATTR_LOGICAL );
      attrsAndMethods.put( KW_NEW_SESS, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NEXT_COL, ATTR_HANDLE  );
      attrsAndMethods.put( KW_NEXT_RID, ATTR_ROWID   );
      attrsAndMethods.put( KW_NEXT_SIB, ATTR_HANDLE  );
      attrsAndMethods.put( KW_NEXT_TAB, ATTR_HANDLE  );
      attrsAndMethods.put( KW_NNMSP_SL, ATTR_CHAR    );
      attrsAndMethods.put( KW_N_HEIGHT, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_N_KEY_ID, METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NO_COLS,  ATTR_LOGICAL );
      attrsAndMethods.put( KW_NO_FOCUS, ATTR_LOGICAL );
      attrsAndMethods.put( KW_NO_CUR_V, ATTR_LOGICAL );
      attrsAndMethods.put( KW_NO_EM_SP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_NO_SCH_M, ATTR_LOGICAL );
      attrsAndMethods.put( KW_NO_VALID, ATTR_LOGICAL );
      attrsAndMethods.put( KW_NODE_BLD, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NODE_CNT, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NODE_EXP, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NODE_ICO, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NODE_ID , ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NODE_IDX, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NODE_KEY, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NODE_PAR, ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NODE_TXT, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NODE_VAL, ATTR_CHAR    );
      attrsAndMethods.put( KW_NODE_V2M, METH_LOGICAL );
      attrsAndMethods.put( KW_NODV_2LC, METH_LOGICAL );
      attrsAndMethods.put( KW_NORMALZE, METH_LOGICAL );
      attrsAndMethods.put( KW_NUM_BUFF, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_BUTT, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_CH_R, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_DROP, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_ENT , ATTR_INT     );
      attrsAndMethods.put( KW_NUM_FLD , ATTR_INT     );
      attrsAndMethods.put( KW_NUM_FMTS, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_HD_E, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_ITMS, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_ITER, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_LK_C, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_LNS,  ATTR_INT     );
      attrsAndMethods.put( KW_NUM_LOGF, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_MSG , ATTR_INT     );
      attrsAndMethods.put( KW_NUM_PNTS, METH_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_NUM_CHLN, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_COL , ATTR_INT     );
      attrsAndMethods.put( KW_NUM_PARM, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_REF , ATTR_INT     );
      attrsAndMethods.put( KW_NUM_REL , ATTR_INT     );
      attrsAndMethods.put( KW_NUM_REPL, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_RES , ATTR_INT     );
      attrsAndMethods.put( KW_NUM_SR  , ATTR_INT     );
      attrsAndMethods.put( KW_NUM_SW  , ATTR_INT     );
      attrsAndMethods.put( KW_NUM_TABS, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_2RTN, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_V_C , ATTR_INT     );
      attrsAndMethods.put( KW_NUM_D_P , ATTR_CHAR    );
      attrsAndMethods.put( KW_NUM_FMT , ATTR_CHAR    );
      attrsAndMethods.put( KW_NUM_SEP , ATTR_CHAR    );
      attrsAndMethods.put( KW_NUM_SRCB, ATTR_INT     );
      attrsAndMethods.put( KW_NUM_TOPB, ATTR_INT     );
      attrsAndMethods.put( KW_OPENHTML, METH_VOID    ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_OPENPAGE, METH_LOGICAL ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_OLE_INVL, ATTR_INT     );
      attrsAndMethods.put( KW_OLE_NAML, ATTR_INT     );
      attrsAndMethods.put( KW_ON_FR_B , ATTR_LOGICAL );
      attrsAndMethods.put( KW_ORDINAL,  ATTR_INT     );
      attrsAndMethods.put( KW_ORG_HAND, ATTR_HANDLE  );
      attrsAndMethods.put( KW_ORG_ROID, ATTR_ROWID   );
      attrsAndMethods.put( KW_OWNER   , ATTR_HANDLE  );
      attrsAndMethods.put( KW_PAGE_B  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_PAGE_T  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_PAR_BUFF, ATTR_HANDLE  );
      attrsAndMethods.put( KW_PAR_IREL, ATTR_LOGICAL );
      attrsAndMethods.put( KW_PAR_REL , ATTR_HANDLE  );
      attrsAndMethods.put( KW_PARENT  , ATTR_HANDLE  );
      attrsAndMethods.put( KW_PARM    , ATTR_CHAR    );
      attrsAndMethods.put( KW_PARSE_ST, ATTR_INT     );
      attrsAndMethods.put( KW_PAR_FLDA, ATTR_CHAR    );
      attrsAndMethods.put( KW_PAR_FLDB, ATTR_CHAR    );
      attrsAndMethods.put( KW_PASSWD_F, ATTR_LOGICAL );
      attrsAndMethods.put( KW_PATHNAME, ATTR_CHAR    );
      attrsAndMethods.put( KW_PBE_H_AL, ATTR_CHAR    );
      attrsAndMethods.put( KW_PBE_KEYR, ATTR_INT     );
      attrsAndMethods.put( KW_POSTMSG,  METH_VOID    ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_OCX_MBTN, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_OCX_MSHT, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_OCX_MSX,  ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_OCX_MSY,  ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_OLE_AEFF, ATTR_INT     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_OLE_DATF, ATTR_INT     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_OLE_DEFC, ATTR_LOGICAL ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_OLE_EFFE, ATTR_INT     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_OLE_DRAG, METH_VOID    ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_OLE_DGMD, ATTR_INT     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_OLE_DRMD, ATTR_INT     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_OLE_STAT, ATTR_INT     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_OLE_X,    ATTR_DEC     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_OLE_Y,    ATTR_DEC     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_DRAG_NOD, ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_DRAG_OVR, ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_OPENPOPU, METH_VOID    ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_PB_APPEA, ATTR_INT     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_PB_BRSTY, ATTR_INT     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_COM_DATA, ATTR_HANDLE  ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_PB_ENABL, ATTR_LOGICAL ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_PB_MAX,   ATTR_DEC     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_PB_MIN,   ATTR_DEC     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_PB_ORIEN, ATTR_INT     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_PB_SCROL, ATTR_INT     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_PB_VALUE, ATTR_DEC     ); // FWD PROGRESS-BAR extension, not real 4GL
      attrsAndMethods.put( KW_PREF_DS , ATTR_LOGICAL );
      attrsAndMethods.put( KW_PRS_PROC, ATTR_HANDLE  );
      attrsAndMethods.put( KW_PRS_C_D , ATTR_LOGICAL );
      attrsAndMethods.put( KW_PERSIST , ATTR_LOGICAL );
      attrsAndMethods.put( KW_PFCOLOR , ATTR_INT     );
      attrsAndMethods.put( KW_PIX_COL , ATTR_INT     );
      attrsAndMethods.put( KW_PIX_ROW , ATTR_INT     );
      attrsAndMethods.put( KW_POP_MENU, ATTR_HANDLE  );
      attrsAndMethods.put( KW_POP_ONLY, ATTR_LOGICAL );
      attrsAndMethods.put( KW_POS     , ATTR_INT     );
      attrsAndMethods.put( KW_PREP_STR, ATTR_CHAR    );
      attrsAndMethods.put( KW_PREPARED, ATTR_LOGICAL );
      attrsAndMethods.put( KW_PREV_COL, ATTR_HANDLE  );
      attrsAndMethods.put( KW_PREV_SIB, ATTR_HANDLE  );
      attrsAndMethods.put( KW_PREV_T_I, ATTR_HANDLE  );
      attrsAndMethods.put( KW_PRE_LBL,  ATTR_CHAR    ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_PRIM_P_P, ATTR_CHAR    );
      attrsAndMethods.put( KW_PRIMARY , ATTR_CHAR    );
      attrsAndMethods.put( KW_PRINT   , METH_VOID    ); // FWD extension, not real 4GL!
      attrsAndMethods.put( KW_PROFILNG, ATTR_LOGICAL ); // undocumented, found in customer code
      attrsAndMethods.put( KW_PROG_SRC, ATTR_LOGICAL );
      attrsAndMethods.put( KW_PRT_C_H , ATTR_INT     );
      attrsAndMethods.put( KW_PRT_HDC , ATTR_INT     );
      attrsAndMethods.put( KW_PRT_NAME, ATTR_CHAR    );
      attrsAndMethods.put( KW_PRT_PORT, ATTR_CHAR    );
      attrsAndMethods.put( KW_PRIV_DAT, ATTR_CHAR    );
      attrsAndMethods.put( KW_PROCNAME, ATTR_CHAR    );
      attrsAndMethods.put( KW_PROCTYPE, ATTR_CHAR    );
      attrsAndMethods.put( KW_PROXY   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_PROX_PWD, ATTR_CHAR    );
      attrsAndMethods.put( KW_PROX_UID, ATTR_CHAR    );
      attrsAndMethods.put( KW_PUB_ID  , ATTR_CHAR    );
      attrsAndMethods.put( KW_PUB_EVTS, ATTR_CHAR    );
      attrsAndMethods.put( KW_QUAL_UID, ATTR_CHAR    );
      attrsAndMethods.put( KW_QUERY   , ATTR_HANDLE  );
      attrsAndMethods.put( KW_QRY_CLOS, METH_LOGICAL );
      attrsAndMethods.put( KW_QRY_OFF , ATTR_LOGICAL );
      attrsAndMethods.put( KW_QRY_OPEN, METH_LOGICAL );
      attrsAndMethods.put( KW_QRY_PREP, METH_LOGICAL );
      attrsAndMethods.put( KW_QUIT    , ATTR_LOGICAL );
      attrsAndMethods.put( KW_RADIO_B , ATTR_CHAR    );
      attrsAndMethods.put( KW_RAW_TRAN, METH_LOGICAL );
      attrsAndMethods.put( KW_READ    , METH_LOGICAL );
      attrsAndMethods.put( KW_READ_FIL, METH_LOGICAL );
      attrsAndMethods.put( KW_READ_JSN, METH_LOGICAL );
      attrsAndMethods.put( KW_READ_ONL, ATTR_LOGICAL );
      attrsAndMethods.put( KW_READ_XML, METH_LOGICAL );
      attrsAndMethods.put( KW_READ_XSC, METH_LOGICAL );
      attrsAndMethods.put( KW_RECID   , ATTR_RECID   );
      attrsAndMethods.put( KW_REC_LEN , ATTR_INT     );
      attrsAndMethods.put( KW_RECURSE , ATTR_LOGICAL );
      attrsAndMethods.put( KW_REFRESH , METH_LOGICAL );
      attrsAndMethods.put( KW_REFR_A_P, METH_LOGICAL );
      attrsAndMethods.put( KW_REFRABLE, ATTR_LOGICAL );
      attrsAndMethods.put( KW_REG_DMN , METH_LOGICAL );
      attrsAndMethods.put( KW_REJ_CHGS, METH_LOGICAL );
      attrsAndMethods.put( KW_REJ_RCHG, METH_LOGICAL );
      attrsAndMethods.put( KW_REJECTED, ATTR_LOGICAL );
      attrsAndMethods.put( KW_REL_FLDS, ATTR_CHAR    );
      attrsAndMethods.put( KW_RELS_ACT, ATTR_LOGICAL );
      attrsAndMethods.put( KW_RELSESID, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_REM_EVTP, METH_LOGICAL );
      attrsAndMethods.put( KW_REM_HOST, ATTR_CHAR    );
      attrsAndMethods.put( KW_REM_PORT, ATTR_INT     );
      attrsAndMethods.put( KW_REMOTE  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_REM_NOCO, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_REM_NODE, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_REM_ATTR, METH_LOGICAL );
      attrsAndMethods.put( KW_REM_CHLD, METH_LOGICAL );
      attrsAndMethods.put( KW_REM_SUP , METH_LOGICAL );
      attrsAndMethods.put( KW_REPLACE , METH_LOGICAL );
      attrsAndMethods.put( KW_REP_CHLD, METH_LOGICAL );
      attrsAndMethods.put( KW_REP_STXT, METH_LOGICAL );
      attrsAndMethods.put( KW_REPORT,   ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_REPOS   , ATTR_LOGICAL );
      attrsAndMethods.put( KW_REPOS_B , METH_LOGICAL );
      attrsAndMethods.put( KW_REPOS_F , METH_LOGICAL );
      attrsAndMethods.put( KW_REPOS_2R, METH_LOGICAL );
      attrsAndMethods.put( KW_REPOS_2I, METH_LOGICAL );
      attrsAndMethods.put( KW_REQ_INFO, ATTR_CLASS   );
      attrsAndMethods.put( KW_RFRSH_UI, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RSP_INFO, ATTR_CLASS   );
      attrsAndMethods.put( KW_RES_BASE, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RESET   , METH_LOGICAL );
      attrsAndMethods.put( KW_RESIZE  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_RESIZABL, ATTR_LOGICAL );
      attrsAndMethods.put( KW_RESORT  , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_REST_RID, ATTR_ROWID   );
      attrsAndMethods.put( KW_REST_ROW, ATTR_INT     );
      attrsAndMethods.put( KW_RET_INS , ATTR_LOGICAL );
      attrsAndMethods.put( KW_RET_SHAP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_RET_VAL , ATTR_POLY    );
      attrsAndMethods.put( KW_RET_VDT , ATTR_CHAR    );
      attrsAndMethods.put( KW_RET_VLT , ATTR_CHAR    );
      attrsAndMethods.put( KW_ROLE    , ATTR_CHAR    );
      attrsAndMethods.put( KW_ROLES   , ATTR_CHAR    );
      attrsAndMethods.put( KW_ROUNDED , ATTR_LOGICAL );
      attrsAndMethods.put( KW_ROW     , ATTR_DEC     );
      attrsAndMethods.put( KW_ROW_H_C , ATTR_DEC     );
      attrsAndMethods.put( KW_ROW_H_P , ATTR_INT     );
      attrsAndMethods.put( KW_ROWID   , ATTR_ROWID   );
      attrsAndMethods.put( KW_ROW_MARK, ATTR_LOGICAL );
      attrsAndMethods.put( KW_ROW_RESZ, ATTR_LOGICAL );
      attrsAndMethods.put( KW_ROW_STAT, ATTR_INT     );
      attrsAndMethods.put( KW_RPT_ADDC, METH_VOID    );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_CAP , METH_VOID    );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_DSGN, ATTR_CHAR    );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_CSV , METH_LOGICAL );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_DOCX, METH_LOGICAL );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_GSRC, METH_INT     );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_GSRR, METH_INT     );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_HTML, METH_LOGICAL );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_ICSV, METH_LOGICAL );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_PDF , METH_LOGICAL );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_RTF , METH_LOGICAL );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_SRC,  ATTR_HANDLE  );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_XLS , METH_LOGICAL );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RPT_XLSX, METH_LOGICAL );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_RULE_ROW, ATTR_DEC     );  // undocumented attribute seen in Possenet code (see adecomm/_report.p)
      attrsAndMethods.put( KW_SCR_NODC , ATTR_INT     );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SAVE    , METH_LOGICAL );
      attrsAndMethods.put( KW_SAVE_FIL, METH_LOGICAL );
      attrsAndMethods.put( KW_SAVE_RCH, METH_LOGICAL );
      attrsAndMethods.put( KW_SAVE_WST, ATTR_CHAR    );
      attrsAndMethods.put( KW_SAX_PARF, METH_VOID    );
      attrsAndMethods.put( KW_SAX_PARN, METH_VOID    );
      attrsAndMethods.put( KW_SAX_PARS, METH_VOID    );
      attrsAndMethods.put( KW_SCH_CHG , ATTR_CHAR    );
      attrsAndMethods.put( KW_SCH_LOC , ATTR_CHAR    );
      attrsAndMethods.put( KW_SCH_MARS, ATTR_CHAR    );
      attrsAndMethods.put( KW_SCH_PATH, ATTR_CHAR    );
      attrsAndMethods.put( KW_SCR_COL , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SCR_HGHT, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SCR_NTOP, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SCR_SCAL, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SCR_WDTH, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SCRN_VAL, ATTR_CHAR    );
      attrsAndMethods.put( KW_SCRN_LNS, ATTR_DEC     );
      attrsAndMethods.put( KW_SCROLLBA, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SCR_2CR , METH_LOGICAL );
      attrsAndMethods.put( KW_SCR_2ITM, METH_LOGICAL );
      attrsAndMethods.put( KW_SCR_2SR , METH_LOGICAL );
      attrsAndMethods.put( KW_SCR_VERT, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SCROLLBL, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SCROLL_H, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SCROLL_V, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SEAL    , METH_LOGICAL );
      attrsAndMethods.put( KW_SEAL_TST, ATTR_DATETIME_TZ );
      attrsAndMethods.put( KW_SEARCH  , METH_LOGICAL );
      attrsAndMethods.put( KW_SELECTBL, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SEL_ALL , METH_LOGICAL );
      attrsAndMethods.put( KW_SEL_END , ATTR_INT     );
      attrsAndMethods.put( KW_SEL_FOCR, METH_LOGICAL );
      attrsAndMethods.put( KW_SEL_NEXT, METH_LOGICAL );
      attrsAndMethods.put( KW_SEL_PREV, METH_LOGICAL );
      attrsAndMethods.put( KW_SEL_ROW , METH_LOGICAL );
      attrsAndMethods.put( KW_SEL_STRT, ATTR_INT     );
      attrsAndMethods.put( KW_SEL_TXT , ATTR_CHAR    );
      attrsAndMethods.put( KW_SELECTED, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SEND    , METH_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SENSITIV, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SEPS    , ATTR_LOGICAL );
      attrsAndMethods.put( KW_SEP_FGC , ATTR_INT     );
      attrsAndMethods.put( KW_SERIALZH, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SERIALZN, ATTR_CHAR    );
      attrsAndMethods.put( KW_SERIALZR, METH_LOGICAL );
      attrsAndMethods.put( KW_SERVER  , ATTR_HANDLE  );
      attrsAndMethods.put( KW_SESS_END, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SESSN_ID, ATTR_CHAR    );
      attrsAndMethods.put( KW_S_C_BGCO, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_S_C_FGCO, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_S_COL_C , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_S_COL_W , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SRV_C_B , ATTR_LOGICAL );
      attrsAndMethods.put( KW_SRV_C_BR, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SRV_C_C , ATTR_CHAR    );
      attrsAndMethods.put( KW_SRV_C_I , ATTR_CHAR    );
      attrsAndMethods.put( KW_SRV_OP_M, ATTR_CHAR    );
      attrsAndMethods.put( KW_SCR_WLNS, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SEL_SFVN, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SEL_NID,  ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SEL_NKEY, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SEL_NODE, ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_ACTR, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_ACTX, METH_CHAR    );
      attrsAndMethods.put( KW_SET_ATTR, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_A_N , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_BLUE, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_BRK , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_BUF , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_C_IC, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_C_S , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_C_VI, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_CB_P, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_CBAC, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_CLNT, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_COMM, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_C_P , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_CPTM, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_DYN , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_F_D , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_GRN , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_ISRC, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_LSTK, METH_LOGICAL ); // undocumented method (for LAST-EVENT handle) found in customer source, confirmed with test code
      attrsAndMethods.put( KW_SET_IMGF, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_IMGH, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_IMGW, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_JMOD, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_JSTX, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_JSTY, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_M_UN, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_MSEL, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_N_BG, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_N_FG, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_N_HC, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_N_F , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_NODE, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_NTXT, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_ODST, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_PARM, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_PENW, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_PROP, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_RED , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_RGB , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_RRP , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_RPOS, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_ROLL, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_SEL , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_SERD, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_SWIN, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_R_P,  METH_LOGICAL );  // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_S_AR, METH_LOGICAL );
      attrsAndMethods.put( KW_SET_S_O , METH_LOGICAL );
      attrsAndMethods.put( KW_SET_SNC , METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_TBME, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_TN_I, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_TSTA, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SET_WAIT, METH_LOGICAL );
      attrsAndMethods.put( KW_SHOW_BUT, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SHOW_ITB, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SHOW_HDR, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SHR_D_F , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SOR_C_C , ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SOR_COLS, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SIDE_L  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_SIDE_L_H, ATTR_HANDLE  );
      attrsAndMethods.put( KW_SING_RUN, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SINGLTON, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SKIP_D_R, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SMAL_ICO, ATTR_CHAR    );
      attrsAndMethods.put( KW_SMAL_TTL, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SMTPFROM, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SMTPHOST, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SMTPHTML, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SMTP_PW,  ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SMTPPORT, ATTR_CHAR    ); // FWD extension, not real 4GL 
      attrsAndMethods.put( KW_SMTPREPL, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SMTPSUBJ, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SMTPTEXT, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SMTPUSER, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SMTP_VAL, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SOAP_F_A, ATTR_CHAR    );
      attrsAndMethods.put( KW_SOAP_F_C, ATTR_CHAR    );
      attrsAndMethods.put( KW_SOAP_F_D, ATTR_HANDLE  );
      attrsAndMethods.put( KW_SOAP_FMH, ATTR_CHAR    );
      attrsAndMethods.put( KW_SOAP_F_N, ATTR_CHAR    );
      attrsAndMethods.put( KW_SOAP_F_R, ATTR_CHAR    );
      attrsAndMethods.put( KW_SOAP_F_S, ATTR_CHAR    );
      attrsAndMethods.put( KW_SOAP_FSC, ATTR_CHAR    );
      attrsAndMethods.put( KW_SOAP_VER, ATTR_CHAR    );
      attrsAndMethods.put( KW_SOR_C_C,  ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SOR_COLS, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SORT    , ATTR_LOGICAL );
      attrsAndMethods.put( KW_SORT_ASC, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SORT_MAP, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_SORT_NUM, ATTR_INT     );
      attrsAndMethods.put( KW_SSL_SRVN, ATTR_CHAR    );
      attrsAndMethods.put( KW_STANDALN, ATTR_LOGICAL );
      attrsAndMethods.put( KW_STATUS_A, ATTR_LOGICAL );
      attrsAndMethods.put( KW_START_DC, METH_LOGICAL );
      attrsAndMethods.put( KW_START_EL, METH_LOGICAL );
      attrsAndMethods.put( KW_STAT_DET, ATTR_CHAR    );
      attrsAndMethods.put( KW_STAT_A_F, ATTR_INT     );
      attrsAndMethods.put( KW_STREAM  , ATTR_CHAR    );
      attrsAndMethods.put( KW_START,    METH_VOID    ); // FWD TIMER extension
      attrsAndMethods.put( KW_STOP    , ATTR_LOGICAL );
      attrsAndMethods.put( KW_STOP_PRS, METH_LOGICAL );
      attrsAndMethods.put( KW_STOPPED , ATTR_LOGICAL );
      attrsAndMethods.put( KW_STRICT  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_STRIC_ER, ATTR_LOGICAL );
      attrsAndMethods.put( KW_STR_VAL , ATTR_CHAR    );
      attrsAndMethods.put( KW_STUP_PAR, ATTR_CHAR    );
      attrsAndMethods.put( KW_ST_2_FIT, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SUBTYPE , ATTR_CHAR    );
      attrsAndMethods.put( KW_SUB_M_H , ATTR_LOGICAL ); // undocumented attribute seen in Possenet code, see adeshar/_mupdatm.p
      attrsAndMethods.put( KW_SUP_NS_P, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SUP_PROC, ATTR_CHAR    );
      attrsAndMethods.put( KW_SUP_WARN, ATTR_LOGICAL );
      attrsAndMethods.put( KW_SUPW_LST, ATTR_CHAR    );
      attrsAndMethods.put( KW_SYM_EN_A, ATTR_CHAR    );
      attrsAndMethods.put( KW_SYM_EN_I, ATTR_RAW     );
      attrsAndMethods.put( KW_SYM_EN_K, ATTR_RAW     );
      attrsAndMethods.put( KW_SYM_SUPP, ATTR_CHAR    );
      attrsAndMethods.put( KW_SYNCHRON, METH_LOGICAL );
      attrsAndMethods.put( KW_SYS_A_B , ATTR_LOGICAL );
      attrsAndMethods.put( KW_SYS_ID  , ATTR_CHAR    );
      attrsAndMethods.put( KW_3D      , ATTR_LOGICAL );
      attrsAndMethods.put( KW_TABS    , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_TAB_IDX , ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_TAB_ML  , ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_TAB_MOD,  METH_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_TAB_POS , ATTR_INT     );
      attrsAndMethods.put( KW_TAB_SHOW, METH_VOID    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_TAB_STOP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_TABLE   , ATTR_CHAR    );
      attrsAndMethods.put( KW_TAB_CRCL, ATTR_CHAR    );
      attrsAndMethods.put( KW_TAB_HAND, ATTR_HANDLE  );
      attrsAndMethods.put( KW_TAB_LIST, ATTR_CHAR    );
      attrsAndMethods.put( KW_TAB_NUM , ATTR_INT     );
      attrsAndMethods.put( KW_TEMP_DIR, ATTR_CHAR    );
      attrsAndMethods.put( KW_TEN_ID  , METH_INT     );
      attrsAndMethods.put( KW_TENNAME , METH_CHAR    );
      attrsAndMethods.put( KW_TERM_HK , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_TEXTEDIT, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_THO_SEP , ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_THR_SAFE, ATTR_LOGICAL );
      attrsAndMethods.put( KW_TRC_FILT, ATTR_CHAR    ); // undocumented, found in customer code
      attrsAndMethods.put( KW_TRAC_CHG, ATTR_LOGICAL );
      attrsAndMethods.put( KW_TREE_R_H, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_TXT_SEL , ATTR_LOGICAL );
      attrsAndMethods.put( KW_TIC_MARK, ATTR_CHAR    );
      attrsAndMethods.put( KW_TITLE   , ATTR_CHAR    );
      attrsAndMethods.put( KW_TIMEZONE, ATTR_INT     );
      attrsAndMethods.put( KW_TIME_SRC, ATTR_CHAR    );
      attrsAndMethods.put( KW_TITL_BGC, ATTR_INT     );
      attrsAndMethods.put( KW_TITL_DC , ATTR_INT     );
      attrsAndMethods.put( KW_TITL_FGC, ATTR_INT     );
      attrsAndMethods.put( KW_TITL_FON, ATTR_INT     );
      attrsAndMethods.put( KW_TT_PREP , METH_LOGICAL );
      attrsAndMethods.put( KW_TNOD_VAL, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_TOGGL_BX, ATTR_LOGICAL );
      attrsAndMethods.put( KW_TOOLTIP , ATTR_CHAR    );
      attrsAndMethods.put( KW_TOOLTIPS, ATTR_LOGICAL );
      attrsAndMethods.put( KW_TOP_NAVQ, ATTR_HANDLE  );
      attrsAndMethods.put( KW_TOP_ONLY, ATTR_LOGICAL );
      attrsAndMethods.put( KW_TRACING,  ATTR_CHAR    ); // undocumented, found in customer code
      attrsAndMethods.put( KW_TRANS   , ATTR_HANDLE  );
      attrsAndMethods.put( KW_TRAN_I_P, ATTR_HANDLE  );
      attrsAndMethods.put( KW_TRANSPAR, ATTR_LOGICAL );
      attrsAndMethods.put( KW_TRIG_NOD, ATTR_HANDLE  ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_TRIG_COL, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_TYPE    , ATTR_CHAR    );
      attrsAndMethods.put( KW_UNDO    , ATTR_LOGICAL );
      attrsAndMethods.put( KW_UNDO_T_S, ATTR_CHAR    );
      attrsAndMethods.put( KW_UNIQ_ID , ATTR_INT     );
      attrsAndMethods.put( KW_UNIQ_KEY, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_UNIQ_MAT, ATTR_LOGICAL );
      attrsAndMethods.put( KW_UPD_ATTR, METH_LOGICAL );
      attrsAndMethods.put( KW_URL     , ATTR_CHAR    );
      attrsAndMethods.put( KW_URL_DECO, METH_CHAR    );
      attrsAndMethods.put( KW_URL_ENCO, METH_CHAR    );
      attrsAndMethods.put( KW_URL_PW  , ATTR_CHAR    );
      attrsAndMethods.put( KW_URL_UID , ATTR_CHAR    );
      attrsAndMethods.put( KW_USR_DATA, METH_LOGICAL ); // undocumented, found in customer code
      attrsAndMethods.put( KW_USER_ID , ATTR_CHAR    );
      attrsAndMethods.put( KW_UTC_OFF , ATTR_INT     );
      attrsAndMethods.put( KW_V_N_CNT , ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_V_R_CNT , ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_V_SCRL_P, ATTR_INT     ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_V6DISP  , ATTR_LOGICAL );
      attrsAndMethods.put( KW_VALUE   , ATTR_CHAR    );
      attrsAndMethods.put( KW_VAL_ENAB, ATTR_LOGICAL );
      attrsAndMethods.put( KW_VAL_EXPR, ATTR_CHAR    );
      attrsAndMethods.put( KW_VAL_MSG , ATTR_CHAR    );
      attrsAndMethods.put( KW_VAL_SEAL, METH_LOGICAL );
      attrsAndMethods.put( KW_VAL_XML , ATTR_LOGICAL );
      attrsAndMethods.put( KW_VALIDATE, METH_LOGICAL );
      attrsAndMethods.put( KW_VERSION , ATTR_CHAR    );
      attrsAndMethods.put( KW_VIEW_AS , ATTR_CHAR    );
      attrsAndMethods.put( KW_VIEW_FCR, ATTR_LOGICAL );
      attrsAndMethods.put( KW_VIRT_HC , ATTR_DEC     );
      attrsAndMethods.put( KW_VIRT_HP , ATTR_INT     );
      attrsAndMethods.put( KW_VIRT_WC , ATTR_DEC     );
      attrsAndMethods.put( KW_VIRT_WP , ATTR_INT     );
      attrsAndMethods.put( KW_VISIBLE , ATTR_LOGICAL );
      attrsAndMethods.put( KW_WHERE_ST, ATTR_CHAR    );
      attrsAndMethods.put( KW_WID_ENT , ATTR_HANDLE  );
      attrsAndMethods.put( KW_WID_ID  , ATTR_INT     );
      attrsAndMethods.put( KW_WID_LEAV, ATTR_HANDLE  );
      attrsAndMethods.put( KW_WIDTH_C , ATTR_DEC     );
      attrsAndMethods.put( KW_WIDTH_P , ATTR_INT     );
      attrsAndMethods.put( KW_WIN_STAT, ATTR_INT     );
      attrsAndMethods.put( KW_WIN_SYS , ATTR_CHAR    );
      attrsAndMethods.put( KW_WINDOW  , ATTR_HANDLE  );
      attrsAndMethods.put( KW_WA_H_P  , ATTR_INT     );
      attrsAndMethods.put( KW_WA_W_P  , ATTR_INT     );
      attrsAndMethods.put( KW_WA_X    , ATTR_INT     );
      attrsAndMethods.put( KW_WA_Y    , ATTR_INT     );
      attrsAndMethods.put( KW_WARN    , ATTR_LOGICAL );
      attrsAndMethods.put( KW_WC_AD_AP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_WORD_WRP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_WRITE   , METH_LOGICAL );
      attrsAndMethods.put( KW_WR_CDATA, METH_LOGICAL );
      attrsAndMethods.put( KW_WR_CHARS, METH_LOGICAL );
      attrsAndMethods.put( KW_WR_CMNT , METH_LOGICAL );
      attrsAndMethods.put( KW_WR_DATA , METH_LOGICAL ); // undocumented, found in customer code
      attrsAndMethods.put( KW_WR_D_ELM, METH_LOGICAL );
      attrsAndMethods.put( KW_WR_E_ELM, METH_LOGICAL );
      attrsAndMethods.put( KW_WR_ENT_R, METH_LOGICAL );
      attrsAndMethods.put( KW_WR_EXDTD, METH_LOGICAL );
      attrsAndMethods.put( KW_WR_FRAGM, METH_LOGICAL );
      attrsAndMethods.put( KW_WR_JSON , METH_LOGICAL );
      attrsAndMethods.put( KW_WR_MSG  , METH_LOGICAL );
      attrsAndMethods.put( KW_WR_PRINS, METH_LOGICAL );
      attrsAndMethods.put( KW_WR_STAT , ATTR_INT     );
      attrsAndMethods.put( KW_WR_XML  , METH_LOGICAL );
      attrsAndMethods.put( KW_WR_XMLSC, METH_LOGICAL );
      attrsAndMethods.put( KW_WUPL_ERR, ATTR_LOGICAL ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_WUPL_FLS, ATTR_CHAR    ); // FWD extension, not real 4GL
      attrsAndMethods.put( KW_X       , ATTR_INT     );
      attrsAndMethods.put( KW_XML_DTYP, ATTR_CHAR    );
      attrsAndMethods.put( KW_XML_E_EL, ATTR_INT     );
      attrsAndMethods.put( KW_XML_NNAM, ATTR_CHAR    );
      attrsAndMethods.put( KW_XML_NTYP, ATTR_CHAR    );
      attrsAndMethods.put( KW_XML_SCHP, ATTR_CHAR    );
      attrsAndMethods.put( KW_XML_S_ER, ATTR_LOGICAL );
      attrsAndMethods.put( KW_XML_SNSP, ATTR_LOGICAL );
      attrsAndMethods.put( KW_X_DOC   , ATTR_HANDLE  );
      attrsAndMethods.put( KW_Y       , ATTR_INT     );
      attrsAndMethods.put( KW_YEAR_OFF, ATTR_INT     );
      
      return attrsAndMethods;
   }
   
   /**
    * Loads the <code>SymbolResolver</code> with Progress 4GL built-in
    * variables and any built-in functions which DO NOT take parameters. This 
    * is called during construction to ensure that the functions are 
    * available before parsing begins.
    * <p>
    * Built-in functions that have no parameters are treated as variables.    
    * This is done because this is an exact syntactic and semantic match
    * for such constructions.  The fact that the Progress language names
    * such items functions has no meaning.  For this reason, this function is 
    * used to handle such built-ins.
    * <p>
    * Each variable is added with the full name (even if the keyword supports
    * abbreviations) because the {@link #lvalue} method will detect when
    * a keyword is being used and it will use the keyword dictionary to
    * handle the abbreviation support.  This lookup will convert any
    * abbreviated text to the full text before lookup in the variable
    * dictionary.
    * <p>
    * All variables are added with the token type associated with their
    * respective return value.
    * <p>
    * For built-in functions that take parameters, see
    * {@link #initializeFunctionDictionary}.
    * <p>
    * This method also enables the matching of all valid system handles:
    * <p>
    * <pre>
    * ACTIVE_WINDOW
    * CLIPBOARD
    * CODEBASE-LOCATOR
    * COLOR-TABLE
    * COM-SELF
    * COMPILER
    * CURRENT-WINDOW
    * DEBUGGER
    * DEFAULT-WINDOW
    * ERROR-STATUS
    * FILE-INFO
    * FOCUS
    * FONT-TABLE
    * LAST-EVENT
    * RCODE-INFO
    * SELF
    * SESSION
    * SOURCE-PROCEDURE
    * TARGET-PROCEDURE
    * THIS-PROCEDURE
    * WEB-CONTEXT
    * </pre>
    * <p> 
    * Note that there are some built-in functions that can act like variables
    * OR as a normal parenthesized function.  In other words, for the
    * following list, the parenthesis are optional:
    * <p>
    * <ul>
    *    <li>AUDIT-ENABLED
    *    <li>ETIME
    *    <li>FRAME-COL
    *    <li>FRAME-DOWN
    *    <li>FRAME-LINE
    *    <li>FRAME-ROW
    *    <li>GUID
    *    <li>LINE-COUNTER
    *    <li>PAGE-NUMBER
    *    <li>PAGE-SIZE
    *    <li>SUPER (handled in super_function rule instead of here)
    *    <li>TRANS or TRANSACTION
    *    <li>USERID (and it's synonym USER which is not an abbreviation)
    * </ul>
    * <p>
    * Such variables/functions are included in both this rule and in
    * <code>initializeFunctionDictionary</code>.  The token type for such
    * constructs is set to the function version <code>FUNC_</code> instead of
    * the variable version <code>VAR_</code>.
    */
   private void initializeVariableDictionary()
   {
      if (sym.isRuntimeConfig())
      {
         // already initialized from an exemplar
         return;
      }
      for (String kw : getSysHandles())
      {
         sym.addGlobalVariable(kw, SYS_HANDLE);
      }
   
      sym.addGlobalVariable("_control"           , VAR_CHAR         );
      sym.addGlobalVariable("_msg"               , FUNC_INT         );
      sym.addGlobalVariable("_pcontrol"          , VAR_CHAR         );
      sym.addGlobalVariable("_serial-num"        , VAR_INT          );
      sym.addGlobalVariable("active-form"        , VAR_CLASS        , "Progress.Windows.IForm" );
      sym.addGlobalVariable("audit-enabled"      , FUNC_LOGICAL     );
      sym.addGlobalVariable("current-language"   , VAR_CHAR         );
      sym.addGlobalVariable("dataservers"        , VAR_CHAR         );
      sym.addGlobalVariable("dbname"             , VAR_CHAR         );
      sym.addGlobalVariable("etime"              , FUNC_INT64       );
      sym.addGlobalVariable("exclusive-lock"     , VAR_INT          ); // used as a symbolic constant in handle-based method calls as a valid integer expression
      sym.addGlobalVariable("frame-col"          , FUNC_DEC         );
      sym.addGlobalVariable("frame-db"           , VAR_CHAR         );
      sym.addGlobalVariable("frame-down"         , FUNC_INT         );
      sym.addGlobalVariable("frame-field"        , VAR_CHAR         );
      sym.addGlobalVariable("frame-file"         , VAR_CHAR         );
      sym.addGlobalVariable("frame-index"        , VAR_INT          );
      sym.addGlobalVariable("frame-line"         , FUNC_INT         );
      sym.addGlobalVariable("frame-name"         , VAR_CHAR         );
      sym.addGlobalVariable("frame-row"          , FUNC_DEC         );
      sym.addGlobalVariable("frame-value"        , VAR_CHAR         );
      sym.addGlobalVariable("fwd-client-driver"  , VAR_CHAR         );  // FWD extension, not real 4GL!
      sym.addGlobalVariable("gateways"           , VAR_CHAR         );
      sym.addGlobalVariable("generate-pbe-salt"  , VAR_RAW          );
      sym.addGlobalVariable("generate-random-key", VAR_RAW          );
      sym.addGlobalVariable("generate-uuid"      , VAR_RAW          );
      sym.addGlobalVariable("get-codepages"      , VAR_CHAR         );
      sym.addGlobalVariable("go-pending"         , VAR_LOGICAL      );
      sym.addGlobalVariable("guid"               , FUNC_CHAR        ); // built-in function with optional parens, this is the undocumented form
      sym.addGlobalVariable("is-attr-space"      , VAR_LOGICAL      );
      sym.addGlobalVariable("lastkey"            , VAR_INT          );
      sym.addGlobalVariable("last-key"           , VAR_INT          );
      sym.addGlobalVariable("line-counter"       , FUNC_INT         );
      sym.addGlobalVariable("message-lines"      , VAR_INT          );
      sym.addGlobalVariable("mtime"              , FUNC_INT         ); // entry here with a FUNC_ type suggests this can have optional parens, is that correct?
      sym.addGlobalVariable("no-lock"            , VAR_INT          ); // used as a symbolic constant in handle-based method calls as a valid integer expression
      sym.addGlobalVariable("no-wait"            , VAR_INT          ); // used as a symbolic constant in handle-based method calls as a valid integer expression
      sym.addGlobalVariable("now"                , FUNC_DATETIME_TZ ); // entry here with a FUNC_ type suggests this can have optional parens, is that correct?
      sym.addGlobalVariable("num-aliases"        , VAR_INT          );
      sym.addGlobalVariable("num-dbs"            , VAR_INT          );
      sym.addGlobalVariable("opsys"              , VAR_CHAR         );
      sym.addGlobalVariable("os-drives"          , VAR_CHAR         );
      sym.addGlobalVariable("os-error"           , VAR_INT          );
      sym.addGlobalVariable("os-userid"          , VAR_CHAR         );  // FWD extension, not real 4GL!
      sym.addGlobalVariable("page-number"        , FUNC_INT         );
      sym.addGlobalVariable("page-size"          , FUNC_INT         );
      sym.addGlobalVariable("process-architecture", VAR_INT         );
      sym.addGlobalVariable("proc-handle"        , VAR_INT          );
      sym.addGlobalVariable("proc-status"        , VAR_INT          );
      sym.addGlobalVariable("progress"           , VAR_CHAR         );
      sym.addGlobalVariable("promsgs"            , VAR_CHAR         );
      sym.addGlobalVariable("propath"            , VAR_CHAR         );
      sym.addGlobalVariable("proversion"         , FUNC_CHAR        ); // can have optional parens (and a single parameter)
      sym.addGlobalVariable("retry"              , FUNC_LOGICAL     ); // entry here with a FUNC_ type suggests this can have optional parens, is that correct?
      sym.addGlobalVariable("return-value"       , VAR_CHAR         );
      sym.addGlobalVariable("rt-opsys"           , VAR_CHAR         );  // FWD extension, not real 4GL!
      sym.addGlobalVariable("screen-lines"       , VAR_INT          );
      sym.addGlobalVariable("share-lock"         , VAR_INT          ); // used as a symbolic constant in handle-based method calls as a valid integer expression
      sym.addGlobalVariable("term"               , VAR_CHAR         ); // TODO: is this needed?
      sym.addGlobalVariable("terminal"           , VAR_CHAR         ); 
      sym.addGlobalVariable("time"               , FUNC_INT         ); // entry here with a FUNC_ type suggests this can have optional parens, is that correct?
      sym.addGlobalVariable("timezone"           , FUNC_INT         ); // entry here with a FUNC_ type suggests this can have optional parens, is that correct?
      sym.addGlobalVariable("today"              , FUNC_DATE        ); // entry here with a FUNC_ type suggests this can have optional parens, is that correct?
      sym.addGlobalVariable("trans"              , FUNC_LOGICAL     );
      sym.addGlobalVariable("transaction"        , FUNC_LOGICAL     );
      sym.addGlobalVariable("user"               , FUNC_CHAR        );
      sym.addGlobalVariable("userid"             , FUNC_CHAR        );
   }
   
   /**
    * Loads the <code>SymbolResolver</code> with Progress 4GL internal
    * procedures that are well known. This is called during construction 
    * to ensure that the functions are available before parsing begins.
    * <p>
    * These procedures are normally implemented by 4GL code in WebSpeed
    * but their definitions are being placed here so that code can parse
    * without any PSC 4GL code. Most of these are old WebSpeed 1.0 interfaces
    * that are deprecated but still supported for backwards compatibility. 
    */
   private void initializeProcedureDictionary()
   {
      if (webspeed)
      {
         sym.addProcedure("adm-timing-out"       , WEB_PROC );
         sym.addProcedure("AsciiToHtml"          , WEB_PROC ); // html-encode()
         sym.addProcedure("CookieDate"           , WEB_PROC ); // format-cookie()
         sym.addProcedure("DeleteCookie"         , WEB_PROC ); // delete-cookie()
         sym.addProcedure("dispatch"             , WEB_PROC );
         sym.addProcedure("get-transaction-state", WEB_PROC );
         sym.addProcedure("getAttribute"         , WEB_PROC );
         sym.addProcedure("GetCGI"               , WEB_PROC ); // get-cgi()
         sym.addProcedure("GetCookie"            , WEB_PROC ); // get-cookie()
         sym.addProcedure("GetField"             , WEB_PROC ); // get-field()
         sym.addProcedure("HtmlError"            , WEB_PROC );
         sym.addProcedure("init-session"         , WEB_PROC );
         sym.addProcedure("OutputContentType"    , WEB_PROC ); // output-content-type()
         sym.addProcedure("outputHeader"         , WEB_PROC );
         sym.addProcedure("outputHeaders"        , WEB_PROC ); // same as outputHeader
         sym.addProcedure("OutputHttpHeader"     , WEB_PROC ); // output-http-header()
         sym.addProcedure("process-web-request"  , WEB_PROC );
         sym.addProcedure("run-web-object"       , WEB_PROC );
         sym.addProcedure("set-attribute-list"   , WEB_PROC );
         sym.addProcedure("set-transaction-state", WEB_PROC );
         sym.addProcedure("SetCookie"            , WEB_PROC ); // set-cookie()
         sym.addProcedure("UrlDecode"            , WEB_PROC ); // url-decode()
         sym.addProcedure("UrlEncode"            , WEB_PROC ); // url-encode()
         sym.addProcedure("web.output"           , WEB_PROC );
      }
   }
   
   /**
    * Loads the <code>SymbolResolver</code> with Progress 4GL internal
    * streams that are well known. This is called during construction 
    * to ensure that the streams are available before parsing begins.
    * <p>
    * These streams are normally implemented by 4GL code in WebSpeed
    * but their definitions are being placed here so that code can parse
    * without any PSC 4GL code. 
    */
   private void initializeStreamDictionary()
   {
      if (webspeed)
      {
         sym.addStream("WebStream", STREAM);
      }
   }
   
   /**
    * Common routine to rewrite the data, field type based on a requirement
    * for additional abbreviation support (beyond that which can normally be
    * used in the rest of the Progress language.
    * <p>
    * The 2nd lookahead token is read for its text. If it is one of the
    * valid (expected) keywords, then this method returns immediately.
    * Otherwise, a check is made for any of the special abbreviations
    * that follow:
    * <pre>
    *    Data Type Keyword        Actual Minimum Abbrev      Lexer Abbrev
    *    -----------------        ---------------------      -------------
    *    KW_BLOB                  n/a                        n/a
    *    KW_CHAR                  c                          char
    *    KW_CLASS                 n/a                        n/a
    *    KW_CLOB                  n/a                        n/a
    *    KW_COM_HNDL              n/a                        n/a
    *    KW_DATE                  da                         n/a
    *    KW_DATETIME              n/a                        n/a
    *    KW_DATE_TZ               n/a                        n/a
    *    KW_DEC                   de                         dec
    *    KW_HANDLE                handle                     n/a
    *    KW_INT                   i                          int
    *    KW_INT64                 n/a                        n/a
    *    KW_LOGICAL               l                          n/a
    *    KW_LONGCHAR              n/a                        n/a
    *    KW_MEMPTR                m                          mem
    *    KW_RAW                   ra                         n/a
    *    KW_RECID                 re                         n/a
    *    KW_ROWID                 row                        n/a
    *    KW_WID_HAND              widg                       widget-h
    *    The following are supported in native interfaces:
    *    KW_BYTE                  n/a                        n/a
    *    KW_DOUBLE                n/a                        n/a
    *    KW_FLOAT                 n/a                        n/a
    *    KW_LONG                  n/a                        n/a
    *    KW_SHORT                 n/a                        n/a
    *    KW_UNS_SHRT              n/a                        n/a
    * </pre>
    * <p>
    * If one of these (from the actual column above) is matched, the token
    * type of the 2nd lookahead token is rewritten with the associated
    * data/field type keyword.  Otherwise an exception is thrown.
    * <p>
    * This method exists simply to centralize the processing that is used
    * in both {@link #as_clause} and {@link #as_field_clause}.  NOTE that
    * callers MUST ensure that any necessary pull methods (such as 
    * {@link #reserved_or_symbol}) are included to properly generate the
    * predication logic that will allow the full set of possibilities to
    * actually be encountered.
    *
    * @param   lookahead
    *          Number of tokens to look ahead.
    */
   private void specialDataTypeKeywordAbbreviations(int lookahead)
   throws TokenStreamException
   {
      int sec = LA(lookahead);
      
      // override token type for 2nd token IF it already is NOT a match
      // to one of our required data type keywords
      if (sec != KW_BLOB     &&
          sec != KW_CHAR     &&
          sec != KW_CLASS    &&
          sec != KW_CLOB     &&
          sec != KW_COM_HNDL &&
          sec != KW_DATE     &&
          sec != KW_DATETIME &&
          sec != KW_DATE_TZ  &&
          sec != KW_DEC      &&
          sec != KW_INT      &&
          sec != KW_INT64    &&
          sec != KW_LOGICAL  &&
          sec != KW_LONGCHAR &&
          sec != KW_RECID    &&
          sec != KW_ROWID    &&
          sec != KW_HANDLE   &&
          sec != KW_WID_HAND &&
          sec != KW_RAW      &&
          sec != KW_MEMPTR   &&
          sec != KW_BYTE     &&
          sec != KW_DOUBLE   &&
          sec != KW_FLOAT    &&
          sec != KW_LONG     &&
          sec != KW_SHORT    &&
          sec != KW_UNS_SHRT &&
          sec != KW_POLY)
      {
         String text    = LT(lookahead).getText().toLowerCase();
         int    newtype = -1;
         
         if (text.equals("c") || text.equals("ch") || text.equals("cha"))
         {
            newtype = KW_CHAR; 
         }
         else if (text.equals("da") || text.equals("dat"))
         {
            newtype = KW_DATE; 
         }
         else if (text.equals("de"))
         {
            newtype = KW_DEC; 
         }            
         else if (text.equals("i") || text.equals("in"))
         {
            newtype = KW_INT; 
         }
         else if (text.equals("l")     || text.equals("lo")   ||
                  text.equals("log")   || text.equals("logi") ||
                  text.equals("logic") || text.equals("logica"))
         {
            newtype = KW_LOGICAL; 
         }
         else if (text.equals("m") || text.equals("me"))
         {
            newtype = KW_MEMPTR; 
         }
         else if (text.equals("ra"))
         {
            newtype = KW_RAW; 
         }
         else if (text.equals("re") || text.equals("rec") ||
                  text.equals("reci"))
         {
            newtype = KW_RECID; 
         }
         else if (text.equals("row") || text.equals("rowi"))
         {
            newtype = KW_ROWID; 
         }
         else if (text.equals("widg")   || text.equals("widge") || 
                  text.equals("widget") || text.equals("widget-"))
         {
            newtype = KW_WID_HAND; 
         }            
         
         // at this point, there should always be a match in valid
         // Progress 4GL source so we throw an exception if this is
         // not the case
         if (newtype != -1)
         {
            LT(lookahead).setType(newtype);
         }
      }
   }
   
   /**
    * Check if this token is a user-defined function call. The method checks whether the first
    * token is marked as type <code>KW_CLOSE</code> or <code>KW_COMPILE</code> with next token
    * being a <code>LPARENS</code>: in this case, transform it to <code>SYMBOL</code>, as it
    * will be a function or OO method call.
    *
    * @param    tok1
    *           First token, typically LT(1).
    * @param    tok2
    *           Second token, typically LT(2).
    *
    * @return    <code>true</code> if the type of this token was changed.
    */
   private boolean isUserDefFunctionCall(Token tok1, Token tok2)
   {
      if (tok2.getType() != LPARENS)
      {
        return false;
      }

      // CLOSE or COMPILE is not a reserved keyword, thus can be used in a function name;
      // we need to disambiguate between a close or compile function call and close or
      // compile statement.

      // this needs to be disambiguated done here, otherwise it wouldn't be converted
      // properly
      if (tok1.getType() == KW_CLOSE ||
          tok1.getType() == KW_COMPILE)
      {
         tok1.setType(SYMBOL);
         
         return true;
      }
      
      return false;
   }
   
   /**
    * Simple helper to return the given node if it is a field type or if it
    * is an expression node, its first child will be returned if that child
    * is a field type.
    *
    * @param    possible
    *           The given node to test, cannot be <code>null</code>.
    *
    * @return   The field node found or <code>null</code> if no field node
    *           was found.
    */
   private Aast findFieldNode(Aast possible)
   {
      int ttype = possible.getType();
      
      // dereference first child if this is an expression node
      if (ttype == EXPRESSION)
      {
         possible = (Aast) possible.getFirstChild();
         ttype    = possible.getType();
      }      
      
      // is the node a field type
      if (ttype > BEGIN_FIELDTYPES && ttype < END_FIELDTYPES)
      {
         return possible;
      }
      
      return null;
   }
   
   /**
    * Check if the USE-DICT-EXPS frame option is set for this frame.  If is not active, then also
    * remove all validation and help options pulled from the schema by this statement.
    *
    * @param    frame
    *           The frame name.
    * @param    framePhrase
    *           The FRAME_PHRASE AST.
    * @param    stmt
    *           The current UI statement.
    */
   private void setUseDictExps(String frame, Aast framePhrase, Aast stmt)
   {
      // clear the "schema-processed" annotation for all fields
      Set<Aast> fields = sym.getFrameFields(frame);
      
      if (fields != null)
      {
         for (Aast fld : fields)
         {
            fld.removeAnnotation("schema-processed");
         }
      }

      boolean prevUseDictExps = sym.isUseDictExps(frame);
      
      if (framePhrase != null && framePhrase.downPath(KW_USE_DCT))
      {
         sym.markUseDictExps(frame);
      }

      // if USE-DICT-EXPS is not set for this frame and this statement is not one which pulls the
      // schema validation automatically, then remove all KW_VALIDATE[schema_validation=true] and
      // KW_HELP[schema_help=true] nodes from this statement.
      
      int type = stmt.getType();
      
      if (!sym.isUseDictExps(frame) &&
          !(type == KW_ENABLE   ||
            type == KW_SET      ||
            type == KW_UPDATE   ||
            type == KW_PRMT_FOR ||
            type == KW_INSERT))
      {
         // fixup the parents so nodes can be removed
         ((ProgressAst) stmt).fixupParent(null);
         
         List<Aast> remove = new ArrayList<>();
         Iterator<Aast> iter = stmt.iterator();
         while (iter.hasNext())
         {
            Aast ref = iter.next();
            
            int rtype = ref.getType();
            
            if (rtype == KW_VALIDATE                  &&
                ref.isAnnotation("schema_validation") &&
                (Boolean) ref.getAnnotation("schema_validation"))
            {
               remove.add(ref);
            }
            
            // schema-level help is allowed to remain only if we are an UI statement which
            // enables the field.  otherwise, both the KW_HELP node and the field-level "help"
            // annotation will be removed.
            if (rtype == KW_HELP                &&
                ref.isAnnotation("schema_help") &&
                (Boolean) ref.getAnnotation("schema_help"))
            {
               remove.add(ref);
            }
            
            if (rtype > BEGIN_FIELDTYPES && rtype < END_FIELDTYPES)
            {
               ref.removeAnnotation("help");
            }
         }
         
         Set<Aast> formatPhrases = new HashSet<>();

         for (Aast ref : remove)
         {
            formatPhrases.add(ref.getParent());

            ref.remove();
         }
         
         for (Aast ref : formatPhrases)
         {
            if (ref.getNumImmediateChildren() == 0)
            {
               ref.remove();
            }
         }
      }
      
      // if USE-DICT-EXPS is set before this statement, then remove the VALEXP and HELP nodes for
      // all field widgets
      if (prevUseDictExps)
      {
         // fixup the parents so nodes can be removed
         ((ProgressAst) stmt).fixupParent(null);
         
         List<Aast> remove = new ArrayList<>();
         Iterator<Aast> iter = stmt.iterator();
         while (iter.hasNext())
         {
            Aast ref = iter.next();
            
            int rtype = ref.getType();
            
            if (rtype == KW_HELP || rtype == KW_VALIDATE)
            {
               // check if the format_phrase is associated with a widget...
               Aast formatPhrase = ref.getParent();
               Aast widgetRef = formatPhrase.getPrevSibling();
               if (widgetRef.getType() == EXPRESSION)
               {
                  widgetRef = (Aast) widgetRef.getFirstChild();
               }
               int wtype = widgetRef.getType();
               
               if (wtype > BEGIN_FIELDTYPES && wtype < END_FIELDTYPES)
               {
                  // this is a HELP or VALEXP associated with a field, so remove it...
                  remove.add(ref);
               }
            }

            if (rtype > BEGIN_FIELDTYPES && rtype < END_FIELDTYPES)
            {
               ref.removeAnnotation("help");
            }
         }
         
         Set<Aast> formatPhrases = new HashSet<>();

         for (Aast ref : remove)
         {
            formatPhrases.add(ref.getParent());

            ref.remove();
         }
         
         for (Aast ref : formatPhrases)
         {
            if (ref.getNumImmediateChildren() == 0)
            {
               ref.remove();
            }
         }
      }
   }
   
   /**
    * Simple helper to extract a frame name from a frame phrase node. If a null frame phrase node
    * is provided, or the given node has no KW_FRAME child, an empty string is returned.
    *
    * @param   framePhrase
    *          Frame phrase node, or <code>null</code>.
    *
    * @return  The frame name extracted from FRAME_PHRASE/KW_FRAME/WID_FRAME, or empty string if
    *          a name could not be found (this is the equivalent to the default frame).
    */
   private String getFrameName(Aast framePhrase)
   {
      if (framePhrase == null)
      {
         return "";
      }
      
      Aast kwFrame = framePhrase.getImmediateChild(KW_FRAME, null);
      if (kwFrame == null)
      {
         return "";
      }
      
      return kwFrame.getFirstChild().getText();
   }
   
   /**
    * Disambiguates a record reference from an {@link #lvalue} or an
    * {@link #expr} by checking that there is no exact match with a
    * variable name and that the name would match a table name in the
    * schema dictionary.  The variable dictionary lookup must be handled
    * here since variable names hide table names AND since we match record
    * references in a different rule ({@link #record}) than where we match
    * variables and fields (<code>lvalue</code>).  In particular, this
    * rule must force a match on records before fields, but since the
    * matching of variables and fields is hidden in <code>lvalue</code>
    * we must disambiguate here.
    *
    * @param    text
    *           The name (possibly abbreviated) of the potential record 
    *           reference.
    *
    * @return   <code>true</code> if this is a record reference.
    */
   private boolean isRecord(String text)
   {
      return ((sym.lookupVariable(text) == -1) && sym.isTable(text));
   }
   
   /**
    * Use lookahead to determine if the qualified database name quirk is
    * present in the given tokens. In such a case, the source code has
    * whitespace between the record name and the DOT and/or whitespace
    * between the DOT and the fieldname portions but Progress treats this as
    * a properly qualified field name.
    *
    * @param    tok1
    *           First token, typically LT(1).
    * @param    tok2
    *           Second token, typically LT(2).
    * @param    tok3
    *           Third token, typically LT(3).
    *
    * @return   <code>true</code> if the name quirk is detected.
    */
   private boolean isQualifiedFieldNameQuirk(Token tok1,
                                             Token tok2,
                                             Token tok3)
   {
      int t3 = tok3.getType();
      if (t3 >= BEGIN_RESERVED && t3 <= END_RESERVED)
      {
         // can't use reserved names as field names (abbreviations or not).
         return false;
      }
      
      boolean result = false;
      
      String text = tok1.getText();
      
      if (isRecord(text) && tok2.getType() == DOT)
      {
         if (followedByWhitespace(tok1) || followedByWhitespace(tok2))
         {
            StringBuilder sb = new StringBuilder();
            sb.append(text).append('.').append(tok3.getText());
            
            result = (sym.lookupField(currentRecord, sb.toString()) != -1);
         }
      }
         
      return result;
   }
   
   /**
    * Returns <code>true</code> if the given type is <code>KW_CHAR</code>,
    * <code>KW_LONGCHAR</code>, <code>VAR_CHAR</code>,
    * <code>VAR_LONGCHAR</code>, <code>FIELD_CHAR</code> or
    * <code>FIELD_CLOB</code>.
    *
    * @param    type
    *           Token type to test.
    *
    * @return   <code>true</code> if the type represents character data.
    */
   private boolean isCharType(int type)
   {
      return (type == KW_CHAR      ||
              type == KW_LONGCHAR  ||
              type == VAR_CHAR     ||
              type == VAR_LONGCHAR ||
              type == FIELD_CHAR   ||
              type == FIELD_CLOB); 
   }
   
   /**
    * Returns <code>true</code> if the given type is <code>KW_DATE</code>,
    * <code>KW_DATETIME</code>, <code>KW_DATE_TZ</code>, <code>VAR_DATE</code>,
    * <code>VAR_DATETIME</code>, <code>VAR_DATETIME_TZ</code>, <code>FIELD_DATE</code>,
    * <code>FIELD_DATETIME</code> or <code>FIELD_DATETIME_TZ</code>.
    *
    * @param    type
    *           Token type to test.
    *
    * @return   <code>true</code> if the type represents date data.
    */
   private boolean isDateType(int type)
   {
      return (type == KW_DATE         ||
              type == KW_DATETIME     ||
              type == KW_DATE_TZ      ||
              type == VAR_DATE        ||
              type == VAR_DATETIME    ||
              type == VAR_DATETIME_TZ ||
              type == FIELD_DATE      ||
              type == FIELD_DATETIME  ||
              type == FIELD_DATETIME_TZ); 
   }
   
   /**
    * Returns <code>true</code> if the given type is <code>KW_DATETIME</code>, <code>VAR_DATETIME</code> or
    * <code>FIELD_DATETIME</code>.
    *
    * @param    type
    *           Token type to test.
    *
    * @return   <code>true</code> if the type represents datetime data.
    */
   private boolean isDateTimeType(int type)
   {
      return (type == KW_DATETIME || type == VAR_DATETIME || type == FIELD_DATETIME); 
   }
   
   /**
    * Returns <code>true</code> if the given type is <code>KW_DATE_TZ</code>, <code>VAR_DATETIME_TZ</code> or 
    * <code>FIELD_DATETIME_TZ</code>.
    *
    * @param    type
    *           Token type to test.
    *
    * @return   <code>true</code> if the type represents datetime-tz data.
    */
   private boolean isDateTimeTzType(int type)
   {
      return (type == KW_DATE_TZ  || type == VAR_DATETIME_TZ || type == FIELD_DATETIME_TZ); 
   }

   /**
    * Returns <code>true</code> if the given type is <code>KW_INT</code>,
    * <code>KW_INT64</code>, <code>KW_RECID</code>, <code>VAR_INT</code>,
    * <code>VAR_INT64</code>, <code>VAR_RECID</code>, <code>FIELD_INT</code>,
    * <code>FIELD_INT64</code> or <code>FIELD_RECID</code>.
    *
    * @param    type
    *           Token type to test.
    *
    * @return   <code>true</code> if the type represents date data.
    */
   private boolean isNumericType(int type)
   {
      return (type == KW_INT      ||
              type == KW_INT64    ||
              type == KW_RECID    ||
              type == KW_DEC      ||
              type == VAR_INT     ||
              type == VAR_INT64   ||
              type == VAR_RECID   ||
              type == VAR_DEC     ||
              type == FIELD_INT   ||
              type == FIELD_INT64 ||
              type == FIELD_RECID ||
              type == FIELD_DEC); 
   }
   
   /**
    * Returns <code>true</code> if the given type is a variable, field,
    * function, method, attribute that refers to a handle or if it is a
    * system handle.
    *
    * @param    node
    *           AST node to test.
    *
    * @return   <code>true</code> if the type represents handle data.
    */
   private boolean isHandleType(Aast node)
   {
      int type = node.getType();
      
      return (type == VAR_HANDLE     ||
              type == FIELD_HANDLE   ||
              type == FUNC_HANDLE    ||
              type == ATTR_HANDLE    ||
              type == METH_HANDLE    ||
              type == OO_METH_HANDLE ||
              type == SYS_HANDLE); 
   }
   
   /**
    * Returns <code>true</code> if the given type is a variable, field, function, method,
    * attribute or system handle that refers to a COM-HANDLE.
    *
    * @param    lvalue
    *           AST node to test.
    *
    * @return   <code>true</code> if the type represents COM-HANDLE data.
    */
   private boolean isComHandleType(Aast lvalue)
   {
      int     type = lvalue.getType();
      String  text = null;
      
      if (type == FIELD_HANDLE)
      {
         text = (String) lvalue.getAnnotation("schemaname");
      }
      
      if (type == VAR_HANDLE)
      {
         text = lvalue.getText();
      }
      
      if (type == SYS_HANDLE)
      {
         Long otype = (Long) lvalue.getAnnotation("oldtype");
         
         if (otype != null && otype.longValue() == KW_COM_SELF)
            return true;
      }
      
      return (type == VAR_COM_HANDLE   ||
              type == FIELD_COM_HANDLE ||
              type == FUNC_COM_HANDLE  ||
              type == ATTR_COM_HANDLE  ||
              type == METH_COM_HANDLE  ||
              type == OO_METH_COM_HANDLE);
   }              
   
   /**
    * Returns <code>true</code> if the given subtree resolves to a <code>VAR_CLASS</code>,
    * <code>FIELD_CLASS</code>, <code>FUNC_CLASS</code>, <code>METH_CLASS</code>,
    * <code>CLASS_NAME</code> or if this is a built-in attribute or non-user defined method call
    * <code>COLON</code> that has a <code>ATTR_CLASS</code> or <code>METH_CLASS</code> in the
    * index position 1.
    * <p>
    * Parenthesis will be ignored and the contained sub-expression will be checked.
    *
    * @param    node
    *           AST node to test.
    *
    * @return   <code>true</code> if the type represents an object reference.
    */
   private boolean isObjectSubtree(Aast node)
   {
      int  type = node.getType();
      Aast ref  = node;
   
      while (ref != null && type == LPARENS)
      {
         ref = ref.getChildAt(0);
         
         if (ref == null)
         {
            break;
         }
         
         type = ref.getType();
      }
   
      return isObjectType(type);
   }
   
   /**
    * Returns <code>true</code> if the given type is <code>VAR_CLASS</code>,
    * <code>FIELD_CLASS</code>, <code>FUNC_CLASS</code>, <code>METH_CLASS</code>,  
    * <code>CLASS_NAME</code>, <code>ATTR_CLASS</code> or a bitwise operator.
    *
    * @param    type
    *           The type to test.
    *
    * @return   <code>true</code> if the type represents an object reference.
    */
   private boolean isObjectType(int type)
   {
      return (type == CLASS_NAME     ||
              type == VAR_CLASS      ||
              type == FIELD_CLASS    ||
              type == FUNC_CLASS     ||
              type == ATTR_CLASS     ||
              type == METH_CLASS     ||
              type == OO_METH_CLASS  ||
              type == BITWISE_OR     ||
              type == BITWISE_AND    ||
              type == BITWISE_XOR    ||
              type == BITWISE_NOT);
   }
   
   /**
    * Report if this token type is one of the primitive types.
    *
    * @param    type
    *           The token type to check.
    *
    * @return   {@code true} if this is a primitive type.
    */
   private boolean isPrimitiveType(int type)
   {
      switch (type)
      {
         case KW_CHAR:
         case KW_COM_HNDL:
         case KW_DATE:
         case KW_DATETIME:
         case KW_DATE_TZ:                            
         case KW_DEC:
         case KW_HANDLE:
         case KW_WID_HAND:
         case KW_INT:
         case KW_INT64:             
         case KW_LOGICAL:
         case KW_LONGCHAR:
         case KW_RECID:
         case KW_ROWID:
         case KW_RAW:
         case KW_MEMPTR:
         case KW_BYTE:
         case KW_DOUBLE:
         case KW_FLOAT:
         case KW_LONG:
         case KW_SHORT:
         case KW_UNS_LONG:
         case KW_UNS_SHRT:
         case KW_POLY:
            return true;
      }
      
      return false;
   }
   
   /**
    * Returns <code>true</code> if the given type is an object reference (including a class name)
    * whose fully qualified classname is an enum.
    *
    * @param    node
    *           The node to test.
    *
    * @return   <code>true</code> if the type represents an enum reference.
    */
   private boolean isEnum(Aast node)
   {
      int  type = node.getType();
      Aast ref  = node;
   
      while (ref != null && type == LPARENS)
      {
         ref = ref.getChildAt(0);
         
         if (ref == null)
         {
            break;
         }
         
         type = ref.getType();
      }
      
      // bitwise operators as operands means the result is an enum
      if (type == BITWISE_OR || type == BITWISE_AND || type == BITWISE_XOR || type == BITWISE_NOT)
      {
         return true;
      }
      
      // the most common case is enum-type-name:enum-member; the 2nd child is the result type for the
      // expression
      if (type == OBJECT_INVOCATION)
      {
         ref  = ref.getChildAt(1);
         type = ref.getType();
      }
      
      if (isObjectType(type))
      {
         String cname = getObjectClassName(ref);
         
         if (cname == null)
         {
            // should not happen, but safety first
            return false;
         }
         
         if ("Progress.Lang.Enum".equalsIgnoreCase(cname)      ||
             "Progress.Lang.FlagsEnum".equalsIgnoreCase(cname) ||
             "System.Enum".equalsIgnoreCase(cname))
         {
            // the class def won't report as an enum, but these are the parent classes for all
            // enums, so they also count as enums
            return true;
         }
         
         ClassDefinition cls = sym.lookupClass(cname);
         
         if (cls != null && cls.isEnum())
         {
            return true;
         }
      }
   
      return false;
   }
   
   /**
    * Returns <code>true</code> if the given subtree resolves to a <code>CLASS_NAME</code>.
    * Parenthesis will be ignored and the contained sub-expression will be checked.
    *
    * @param    node
    *           AST node to test.
    *
    * @return   <code>true</code> if the type represents an class reference.
    */
   private boolean isStaticObject(Aast node)
   {
      int  type = node.getType();
      Aast ref  = node;
   
      while (ref != null && type == LPARENS)
      {
         ref = ref.getChildAt(0);
         
         if (ref == null)
         {
            break;
         }
         
         type = ref.getType();
      }
   
      return (type == CLASS_NAME);
   }
   
   /**
    * Bypass any LPARENS and return the referenced node.
    *
    * @param    node
    *           AST node which is the object reference.
    *
    * @return   The referenced node.
    */
   private Aast findRefnode(Aast node)
   {
      int  type = node.getType();
      Aast ref  = node;
      
      while (ref != null && type == LPARENS)
      {
         ref = ref.getChildAt(0);
         
         if (ref == null)
         {
            break;
         }
         
         type = ref.getType();
      }
      
      return ref;
   }
   
   /**
    * Annotate the given member if it should be a generic type parameter.
    *
    * @param    node
    *           AST node which is the object reference.
    * @param    member
    *           The member to be checked.
    */
   private void testAndSaveGenericType(Aast node, Aast member)
   {
      // special case for .NET classes that implement generics
      if (member != null && member.getText().toLowerCase().equals("item"))
      {
         Aast ref = findRefnode(node);
         
         if (ref.isAnnotation("generic-type-parameter"))
         {
            String type = (String) ref.getAnnotation("generic-type-parameter");
         
            member.putAnnotation("generic-type-parameter", type);
         }
         if (ref.isAnnotation("generic-type-is-primitive"))
         {
            boolean prim = (boolean) ref.getAnnotation("generic-type-is-primitive");
            
            member.putAnnotation("generic-type-is-primitive", prim);
         }         
      }
   }   
   
   /**
    * Find the class name referenced by the given object reference.
    *
    * @param    node
    *           AST node which is the object reference.
    *
    * @return   The fully qualified class name of the object this node references or <code>null</code> if
    *           the reference is not to an object.
    */
   private String getObjectClassName(Aast node)
   {
      Aast   ref = findRefnode(node);
      String cls = (String) ref.getAnnotation("qualified");
      
      // the Item property of an object instance that has a generic type parameter will be returned as
      // that generic type; this was saved off earlier in the chaining process; this is only for .NET
      if (("item".equals(ref.getText().toLowerCase()) || node.downPath(LBRACKET)) && 
          ref.isAnnotation("generic-type-parameter"))
      {
         return (String) ref.getAnnotation("generic-type-parameter");
      }
      
      if (ref.downPath(LBRACKET))
      {
         // a subscript on a non-extent var might be a .NET collection which can be dereferenced
         if (!ref.isAnnotation("extent") || (long) ref.getAnnotation("extent") == 0)
         {
            // this is an implicit reference to the "Item" property
            String itemCls = sym.lookupDataMemberClass(cls, "Item", false);
            
            if (itemCls != null)
            {
               cls = itemCls;
            }
         }
      }
      else
      {
         if (ref.isAnnotation("dotnet-array"))
         {
            // we have a .NET-style array without a '[' bracket, treat this as an array
            cls = "System.Array";
         }
      }
      
      return cls;
   }
   
   /**
    * Handle annotation of variables.
    *
    * @param    name
    *           Variable name.
    * @param    type
    *           Variable type.
    * @param    node
    *           AST node to be annotated.
    */
   private void annotateVariable(String name, int type, Aast node)
   {
      // write any non-standard options into annotations
      sym.annotateVariableOptions(currentClassName,
                                  currentStaticFlag,
                                  name,
                                  node,
                                  false);
      
      if (type == VAR_CLASS && !node.isAnnotation("qualified"))
      {
         // this must be a class-based data member (var or property)
         // so we need to lookup the class name and force the
         // annotation
         String qname = sym.lookupDataMemberClass(currentClassName,
                                                  name,
                                                  currentStaticFlag);
                                                  
         // make our best effort to recover from an unknown class ref
         if (qname == null)
         {
            ClassDefinition cls = sym.getCurrentClassDef();
            
            int otype = -1;
            
            if (node.isAnnotation("oldtype"))
            {
               Long ot = (Long) node.getAnnotation("oldtype");
               otype = ot.intValue();
            }
         
            // this should only be possible for two special cases
            if (otype == KW_THIS_OBJ)
            {
               qname = cls.getName();
            }
            else if (otype == KW_SUPER)
            {
               // super cannot be used unless there is a parent class, but we are going to be
               // safe here so we have a null check; note that by definition interfaces and
               // enums cannot have any 4GL code that is an implementation and SUPER can only
               // appear in an implementation (e.g. a method body); thus we know that only
               // a class (not an interface or enum) can be used here which means a single
               // possible parent
               ClassDefinition[] parents = cls.getParents();
               qname = parents != null && parents[0] != null ? parents[0].getName() : null;
            }
         }
         
         // should always be non-null, but we are being safe here
         if (qname != null)
            sym.annotateClassRef(qname, node);
      }
   }
   
   /**
    * Add the data member to a class definition if needed (this should only be called for
    * variables, properties and events.
    *
    * @param    varname
    *           Resource name being defined.
    * @param    ttype
    *           The stmt type being processed.
    * @param    def
    *           The definition node for this member.
    * @param    typeDef
    *           AS node (vars or props),  LIKE node (vars) or SIGNATURE (events).
    * @param    am
    *           Access mode node if specified.
    * @param    st
    *           Static node if specified.
    * @param    ov
    *           Override node if specified.
    * @param    ab
    *           Abstract node if specified.
    * @param    extent
    *           The extent value or 0 if there is no extent.
    */
   private void processMember(String varname,
                              int    ttype,
                              Aast   def,
                              Aast   typeDef,
                              Aast   am,
                              Aast   st,
                              Aast   ov,
                              Aast   ab,
                              int    extent)
   {
      // only define a new data member if we are not inside an OO code block
      if (!inMethodDef)
      {
         // force this as a data member of any active class definition (all 3 types share the
         // same namespace); this must be done before the annotations are written into the
         // definition because the Variable instance state is modified for properties and this
         // may result in different annotations
         if (ttype == DEFINE_VARIABLE || ttype == DEFINE_PROPERTY  || ttype == DEFINE_EVENT)
         {
            String qname = null;
         
            // calc the fully qualified name for class vars and props
            if (ttype == DEFINE_VARIABLE || ttype == DEFINE_PROPERTY)
            {
               // typeDef must not be null here, it will be either an AS clause (vars or props)
               // or it will be a LIKE clause (vars only);  it will always have a child node
               // which defines the type
               Aast child = typeDef.getChildAt(0);
               int  ctype = child.getType();
               
               // some types reference classes and we must know the qualified name in those
               // cases
               if (ctype == CLASS_NAME ||   // AS object instance reference
                   ctype == VAR_CLASS  ||   // LIKE object instance var
                   ctype == FIELD_CLASS)    // LIKE object instance field
               {
                  qname = (String) child.getAnnotation("qualified");
               }
            }
         
            sym.addDataMember(ttype, varname, def, am, st, ov, ab, qname, extent);
            
            if (ttype == DEFINE_EVENT)
            {
               // annotate the parameters for this class event
               SymbolResolver.processDefinitionSignature(typeDef, (Aast ast, ParameterKey pk, int idx) -> 
               {
                  ast.putAnnotation("jtype", pk.toJava());
               });
            }
         }
      }
   }
   
   /**
    * Post processing for variables and other data members (e.g. properties, events).
    *
    * @param    varname
    *           Resource name being defined.
    * @param    root
    *           The define stmt root node.
    * @param    am
    *           Access mode node if specified.
    * @param    st
    *           Static node if specified.
    * @param    force
    *           Mark parameter type as input when c<code>true</code>.
    */
   private void postDefineVar(String varname, Aast root, Aast am, Aast st, boolean force)
   {
      int ttype = root.getType();
      
      // force this as a data member of any active class definition (all 3 types share the same
      // namespace); this must be done before the annotations are written into the definition
      // because the Variable instance state is modified for properties and this may result
      // in different annotations
      if (ttype == DEFINE_VARIABLE || ttype == DEFINE_PROPERTY  || ttype == DEFINE_EVENT)
      {
         String qname = null;
      
         // calc the fully qualified name for class vars and props
         if (ttype == DEFINE_VARIABLE || ttype == DEFINE_PROPERTY)
         {
            Aast as = root.getImmediateChild(KW_AS, null);
            
            // look for an AS clause
            if (as != null)
            {
               // if this is an object instance reference, get the class
               // name of the type
               Aast cname = as.getChildAt(0);
               
               if (cname.getType() == CLASS_NAME)
               {
                  qname = (String) cname.getAnnotation("qualified");
               }
            }
            else
            {
               // must be a LIKE clause
               Aast like  = root.getImmediateChild(KW_LIKE, null);
               Aast lval  = like.getChildAt(0);
               int  ltype = lval.getType();
               
               if (ltype == VAR_CLASS || ltype == FIELD_CLASS)
               {
                  qname = (String) lval.getAnnotation("qualified");
               }
            }
         }
         
         if (qname != null)
         {
            sym.annotateClassRef(qname, root);
         }
      }
      
      // pass the AST with all options to the symbol resolver to set
      // those variable options accordingly
      sym.setVariableOptions(varname, root);
      
      // write any non-standard options into annotations
      sym.annotateVariableOptions(varname, root, true);
      
      // check if this is a define_parameter and if the parameter type
      // was specified
      if (force)
      {
         // no type specified, default to KW_INPUT
         root.putAnnotation("parmtype", Long.valueOf(KW_INPUT));
      }
   }
   
   /**
    * Post processing for buffers.
    *
    * @param    tablename
    *           Buffer name being defined.
    * @param    root
    *           The define stmt root node.
    */
   private void postDefineBuf(String tablename, Aast root)
   {
      // now store an annotation with the fully qualified name and the
      // shorted unabbreviated unique buffer name
      String fullname = sym.lookupFullTableName(tablename);
      String bufname  = sym.lookupBufferName(tablename, false);
      String dbname   = sym.lookupDatabaseName(tablename);
               
      if (fullname != null)
      {
         root.putAnnotation("schemaname", fullname);
      }
         
      if (bufname != null)
      {
         root.putAnnotation("bufname", bufname);
      }
         
      if (dbname != null)
      {
         root.putAnnotation("dbname", dbname);
      }
   }
   
   /**
    * Patch the given token into the hidden token stream as if it was lexed that way.
    *
    * @param    t
    *           The token to be hidden.
    */
   private void hide(Token t)
   {
      ManagedHiddenStreamToken tok = (ManagedHiddenStreamToken) t;
      tok.hide();
   }
   
   /**
    * Walk the given subtree and for each node, patch the original token into the hidden token
    * stream as if it was lexed that way.
    *
    * @param    ast
    *           The subtree to walk.
    */
   private void hide(Aast ast)
   {
      Iterator<Aast> iter = ast.iterator();
      
      while (iter.hasNext())
      {
         Aast node = iter.next();
         
         // if the subtree has artificial nodes, there won't be an original token to retrieve
         if (node.isAnnotation("original-token"))
         {
            ManagedHiddenStreamToken tok =
               (ManagedHiddenStreamToken) node.getAnnotation("original-token");
            tok.hide();            
         }
         // TODO: remove this temporary debugging code
         else
         {
            System.out.printf("Missing original-token annotation for %s\n", node.dumpTree());
         }
      }
   }
   
   /**                      
    * Provides a command line interface for an end user to drive and/or test
    * this class.
    * <p>
    * Syntax:
    * <pre>
    *   java ProgressParser [-v] &lt;Progress_4GL_source_file&gt;
    * </pre>
    * Where:
    * <ul>
    *   <li> [-v] if present will enable visual mode, causing the tree to be
    *        displayed inside a Swing GUI panel
    *   <li> &lt;Progress_4GL_source_file&gt; is the filename of a
    *        preprocessed Progress 4GL source file (enclose the name in
    *        double quotes if spaces or other reserved command line 
    *        characters are part of the filename)
    * </ul>
    *
    * @param   args 
    *          List of command line arguments.
    */
   public static void main(String[] args) 
   {
      String syntax = "Syntax: java ProgressParser [-v] <4gl_source_file>";
      
      // filename is required
      if (args.length < 1)
      {
         LOG.log(Level.SEVERE, syntax);
         System.exit(-1);
      }
      
      boolean visual = false;
      String  fname  = args[0];
      
      // honor visual mode
      if (args.length == 2 && "-v".equals(args[0]))
      {
         visual = true;
         fname  = args[1];
      }
         
      try
      {
         // setup
         SymbolResolver  sym    = new SymbolResolver(true);
         FileReader      fr     = new FileReader(fname);
         BufferedReader  br     = new BufferedReader(fr);
         ProgressLexer   lexer  = new ProgressLexer(br, sym);
         ProgressParser  parser = new ProgressParser(lexer, sym);
         
         // parse the input file and create a tree
         parser.external_proc();
         
         AnnotatedAst result = (AnnotatedAst) parser.getAST();
         
         // this is needed to ensure the parents are set right, or DumpTree
         // will be unable to calculate indents AND features like the
         // Aast.iterator() will also fail to operate properly
         result.fixups((Aast) null, null);
         
         // print a report to stdout
         DumpTree visitor = new DumpTree();
         visitor.visit(result);         
         
         if (visual)
         {
            // display the tree in a frame window if debug is on
            ASTFrame frame = new ASTFrame("Progress 4GL Source File", result);                                                
            frame.setVisible(true);
         }
      }
       
      catch(Exception excpt)
      {
         LOG.log(Level.SEVERE, "", excpt);
      }
   }

protected ProgressParser(TokenBuffer tokenBuf, int k) {
  super(tokenBuf,k);
  tokenNames = _tokenNames;
  buildTokenTypeASTClassMap();
  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
}

public ProgressParser(TokenBuffer tokenBuf) {
  this(tokenBuf,3);
}

protected ProgressParser(TokenStream lexer, int k) {
  super(lexer,k);
  tokenNames = _tokenNames;
  buildTokenTypeASTClassMap();
  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
}

public ProgressParser(TokenStream lexer) {
  this(lexer,3);
}

public ProgressParser(ParserSharedInputState state) {
  super(state,3);
  tokenNames = _tokenNames;
  buildTokenTypeASTClassMap();
  astFactory = new ASTFactory(getTokenTypeToASTClassMap());
}

/** 
 * Pre-scan (1st pass) at reading a class definition to pre-load the symbol
 * resolver with the class' internal resources.  Class resources can be
 * referenced before their definitions appear which is why this pre-scan
 * is needed.  This does not fully parse the code.  Instead it takes a
 * highly abbreviated scan which ignores most content.  This should only
 * be called on a class definition.  The AST that results should be ignored.
 * <p>
 * At this time, the only things processed here are the following (everything
 * else is ignored):
 * <p>
 * <ul>
 *    <li> {@link #using_stmt}
 *    <li> {@link #class_stmt}
 *    <li> {@link #interface_stmt}
 *    <li> {@link #define_stmt_pre_scan}
 *    <li> {@link #method_stmt}
 * </ul>
 * <p>
 * The above are reparsed on the 2nd pass but some of the configuration is only
 * processed on the 1st pass.  The <code>method_stmt</code> is an exception
 * since the method AST nodes need to be annotated.
 */
	public final void pre_scan_class() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast pre_scan_class_AST = null;
		Aast cstmt_AST = null;
		
		try {      // for error handling
			
			preScanPass++;
			topLevelEntry = true;
			
			boolean all = false;
			boolean explicitCtor = false;
			boolean enumStmt = false;
			
			{
			_loop3:
			do {
				if ((LA(1)==KW_USING) && (_tokenSet_0.member(LA(2))) && (LA(3)==DOT||LA(3)==KW_FROM)) {
					using_stmt();
				}
				else if ((((LA(1) >= DOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( LA(1) != KW_CLASS && LA(1) != KW_INTERFAC && LA(1) != KW_ENUM )) {
					matchNot(EOF);
				}
				else {
					break _loop3;
				}
				
			} while (true);
			}
			sym.addScope();
			{
			switch ( LA(1)) {
			case KW_CLASS:
			{
				class_stmt();
				cstmt_AST = (Aast)returnAST;
				break;
			}
			case KW_INTERFAC:
			{
				interface_stmt();
				break;
			}
			case KW_ENUM:
			{
				enum_stmt();
				enumStmt = true;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop7:
			do {
				if (((LA(1)==KW_DEFINE) && (LA(2)==KW_ENUM) && (_tokenSet_1.member(LA(3))))&&( enumStmt )) {
					def_enum_stmt();
				}
				else if ((LA(1)==KW_DEFINE) && (_tokenSet_2.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					define_stmt_pre_scan();
				}
				else if ((LA(1)==KW_METHOD) && (_tokenSet_0.member(LA(2))) && (_tokenSet_4.member(LA(3)))) {
					sym.addScope();
					method_stmt();
					sym.deleteScope();
				}
				else if ((LA(1)==KW_RUN) && (LA(2)==KW_CONSTRUC) && (_tokenSet_3.member(LA(3)))) {
					{
					Aast tmp2_AST = null;
					tmp2_AST = (Aast)astFactory.create(LT(1));
					match(KW_RUN);
					Aast tmp3_AST = null;
					tmp3_AST = (Aast)astFactory.create(LT(1));
					match(KW_CONSTRUC);
					}
				}
				else if ((LA(1)==KW_CONSTRUC) && (_tokenSet_1.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
					sym.addScope();
					constructor_stmt();
					sym.deleteScope(); explicitCtor = true;
				}
				else if ((((LA(1) >= DOT && LA(1) <= JUNK)) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) != EOF )) {
					matchNot(EOF);
				}
				else {
					break _loop7;
				}
				
			} while (true);
			}
			
			if (!explicitCtor && cstmt_AST != null)
			{
			String clsName = sym.getCurrentClassName();
			int dotIdx = clsName.lastIndexOf('.');
			if (dotIdx >= 0)
			{
			clsName = clsName.substring(dotIdx + 1);
			}
			
			Aast ctorNode = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(KW_CONSTRUC,"constructor")).add((Aast)astFactory.create(KW_PUBLIC,"public")).add((Aast)astFactory.create(LPARENS,"(")));
			cstmt_AST.graft(ctorNode);
			sym.addObjectMethod(clsName, OO_METH_VOID, KW_PUBLIC, false, ctorNode, null);
			}
			sym.deleteScope();
			preScanPass--;
			
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = pre_scan_class_AST;
	}
	
/**
 * Matches the <code>USING</code> language statement which has a
 * <code>KW_USING</code> node followed by an {@link #any_symbol_at_all}.
 * After the symbol, because of the way the lexer works, it is possible to
 * match a <code>DOT</code> and then a <code>MULTIPLY</code>.  This text is
 * merged into the symbol if found.  Finally, an optional {@link #from_assembly}
 * clause can be matched. 
 * <p>
 * This updates the symbol resolver's package list with the symbol text. That
 * is subsequently used to resolve unqualified class names into fully
 * qualified package + class names.
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void using_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast using_stmt_AST = null;
		Token  u = null;
		Aast u_AST = null;
		Aast sy_AST = null;
		Token  dt = null;
		Aast dt_AST = null;
		Token  m = null;
		Aast m_AST = null;
		Token  st = null;
		Aast st_AST = null;
		Aast f_AST = null;
		
		try {      // for error handling
			u = LT(1);
			u_AST = (Aast)astFactory.create(u);
			astFactory.makeASTRoot(currentAST, u_AST);
			match(KW_USING);
			{
			if ((_tokenSet_1.member(LA(1)))) {
				any_symbol_at_all();
				sy_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				{
				if ((LA(1)==DOT) && (LA(2)==MULTIPLY) && (LA(3)==DOT||LA(3)==KW_FROM)) {
					dt = LT(1);
					dt_AST = (Aast)astFactory.create(dt);
					match(DOT);
					hide(dt);
					m = LT(1);
					m_AST = (Aast)astFactory.create(m);
					match(MULTIPLY);
					hide(m);
				}
				else if ((LA(1)==DOT||LA(1)==KW_FROM) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else if ((LA(1)==STRING)) {
				st = LT(1);
				st_AST = (Aast)astFactory.create(st);
				astFactory.addASTChild(currentAST, st_AST);
				match(STRING);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_FROM:
			{
				from_assembly();
				f_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			using_stmt_AST = (Aast)currentAST.root;
			
			StringBuilder sb = new StringBuilder();
			
			if (st_AST != null)
			{
			// we aren't saving this back into the node's text so we don't have to do anything
			// special
			String txt = character.progressToJavaString(st_AST.getText(), !unixEscapes, false);
			sb.append(StringHelper.processEscapes(txt));
			}
			else
			{
			sb.append(sy_AST.getText());
			
			if (m_AST != null)
			{
			sb.append(".*");
			saveAndReplaceText(sy_AST, sb.toString());
			}
			}
			
			sym.addPackage(getFilename(), u_AST, sb.toString(), f_AST);
			
			if (preScanPass == 0)
			{
			String searchSpec = sb.toString();
			using_stmt_AST.putAnnotation("search_spec", searchSpec);
			
			if (!searchSpec.endsWith("*"))
			{
			String simpleName = searchSpec.substring(searchSpec.lastIndexOf('.') + 1);
			using_stmt_AST.putAnnotation("simple_name", simpleName.toLowerCase());
			}
			}
			
			using_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = using_stmt_AST;
	}
	
/**
 * Implements the structure of a <code>CLASS</code> language statement. 
 * <p>
 * The most important feature of this rule is the direct usage of the {@link #any_symbol_at_all} rule to
 * force the second token to a <code>SYMBOL</code> token type. This token is then used in the exit action
 * to add the class definition.  .NET inner classes are supported by matching a {@code PLUS}
 * followed by another {@code any_symbol_at_all}.
 */
	public final void class_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast class_stmt_AST = null;
		Aast s_AST = null;
		Token  pl = null;
		Aast pl_AST = null;
		Aast innerCls_AST = null;
		Token  st = null;
		Aast st_AST = null;
		Aast inher_AST = null;
		Aast impl_AST = null;
		
		try {      // for error handling
			{
			Aast tmp5_AST = null;
			tmp5_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp5_AST);
			match(KW_CLASS);
			{
			if ((_tokenSet_1.member(LA(1)))) {
				any_symbol_at_all();
				s_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case PLUS:
				{
					pl = LT(1);
					pl_AST = (Aast)astFactory.create(pl);
					match(PLUS);
					hide(pl);
					any_symbol_at_all();
					innerCls_AST = (Aast)returnAST;
					
					hide(innerCls_AST);
					saveAndReplaceText(s_AST, s_AST.getText() + "+" + innerCls_AST.getText());
					
					break;
				}
				case DOT:
				case KW_ABSTRACT:
				case KW_FINAL:
				case KW_IMPLEMTS:
				case KW_INHERITS:
				case KW_SERIALAB:
				case KW_USE_WIDP:
				case COLON:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((LA(1)==STRING)) {
				st = LT(1);
				st_AST = (Aast)astFactory.create(st);
				astFactory.addASTChild(currentAST, st_AST);
				match(STRING);
				
				String txt = character.progressToJavaString(st_AST.getText(), !unixEscapes, false);
				saveAndReplaceTypeAndText(st_AST, SYMBOL, txt);
				s_AST = st_AST;
				
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop66:
			do {
				switch ( LA(1)) {
				case KW_INHERITS:
				{
					inherits_clause();
					inher_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_IMPLEMTS:
				{
					implements_clause();
					impl_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_ABSTRACT:
				case KW_FINAL:
				{
					{
					switch ( LA(1)) {
					case KW_ABSTRACT:
					{
						Aast tmp6_AST = null;
						tmp6_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp6_AST);
						match(KW_ABSTRACT);
						break;
					}
					case KW_FINAL:
					{
						Aast tmp7_AST = null;
						tmp7_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp7_AST);
						match(KW_FINAL);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_SERIALAB:
				{
					Aast tmp8_AST = null;
					tmp8_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp8_AST);
					match(KW_SERIALAB);
					break;
				}
				case KW_USE_WIDP:
				{
					Aast tmp9_AST = null;
					tmp9_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp9_AST);
					match(KW_USE_WIDP);
					break;
				}
				default:
				{
					break _loop66;
				}
				}
			} while (true);
			}
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			}
			
			sym.addClass(s_AST, inher_AST, impl_AST, getFilename());
			
			builtInCls = sym.isBuiltInClass(s_AST.getText()); 
			dotNetCls = sym.isDotNetClass(s_AST.getText()); 
			
			class_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = class_stmt_AST;
	}
	
/**
 * Implements the structure of a <code>INTERFACE</code> language statement. 
 * <p>
 * The most important feature of this rule is the direct usage of the {@link #any_symbol_at_all} rule to
 * force the second token to a <code>SYMBOL</code> token type. This token is then used in the exit action
 * to add the interface's definition.  .NET inner interfaces are supported by matching a {@code PLUS}
 * followed by another {@code any_symbol_at_all}.
 */
	public final void interface_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast interface_stmt_AST = null;
		Aast s_AST = null;
		Token  pl = null;
		Aast pl_AST = null;
		Aast innerCls_AST = null;
		Token  st = null;
		Aast st_AST = null;
		Aast inher_AST = null;
		
		try {      // for error handling
			{
			Aast tmp10_AST = null;
			tmp10_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp10_AST);
			match(KW_INTERFAC);
			{
			if ((_tokenSet_1.member(LA(1)))) {
				any_symbol_at_all();
				s_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case PLUS:
				{
					pl = LT(1);
					pl_AST = (Aast)astFactory.create(pl);
					match(PLUS);
					hide(pl);
					any_symbol_at_all();
					innerCls_AST = (Aast)returnAST;
					
					hide(innerCls_AST);
					saveAndReplaceText(s_AST, s_AST.getText() + "+" + innerCls_AST.getText());
					
					break;
				}
				case DOT:
				case KW_INHERITS:
				case COLON:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((LA(1)==STRING)) {
				st = LT(1);
				st_AST = (Aast)astFactory.create(st);
				astFactory.addASTChild(currentAST, st_AST);
				match(STRING);
				
				String txt = character.progressToJavaString(st_AST.getText(), !unixEscapes, false);
				saveAndReplaceTypeAndText(st_AST, SYMBOL, txt);
				s_AST = st_AST;
				
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_INHERITS:
			{
				multiple_inherits_clause();
				inher_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			}
			
			sym.addInterface(s_AST, inher_AST, getFilename()); 
			
			builtInCls = sym.isBuiltInClass(s_AST.getText()); 
			dotNetCls = sym.isDotNetClass(s_AST.getText()); 
			
			interface_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = interface_stmt_AST;
	}
	
/**
 * Implements the structure of an <code>ENUM</code> language statement. 
 * <p>
 * The most important feature of this rule is the direct usage of the
 * {@link #any_symbol_at_all} rule to force the second token to a 
 * <code>SYMBOL</code> token type. This token is then used in the exit
 * action to add the interface's definition. 
 */
	public final void enum_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast enum_stmt_AST = null;
		Aast s_AST = null;
		Token  pl = null;
		Aast pl_AST = null;
		Aast innerCls_AST = null;
		Token  st = null;
		Aast st_AST = null;
		Token  f = null;
		Aast f_AST = null;
		
		try {      // for error handling
			{
			Aast tmp11_AST = null;
			tmp11_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp11_AST);
			match(KW_ENUM);
			{
			if ((_tokenSet_1.member(LA(1)))) {
				any_symbol_at_all();
				s_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case PLUS:
				{
					pl = LT(1);
					pl_AST = (Aast)astFactory.create(pl);
					match(PLUS);
					hide(pl);
					any_symbol_at_all();
					innerCls_AST = (Aast)returnAST;
					
					hide(innerCls_AST);
					saveAndReplaceText(s_AST, s_AST.getText() + "+" + innerCls_AST.getText());
					
					break;
				}
				case DOT:
				case KW_FLAGS:
				case COLON:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((LA(1)==STRING)) {
				st = LT(1);
				st_AST = (Aast)astFactory.create(st);
				astFactory.addASTChild(currentAST, st_AST);
				match(STRING);
				
				String txt = character.progressToJavaString(st_AST.getText(), !unixEscapes, false);
				saveAndReplaceTypeAndText(st_AST, SYMBOL, txt);
				s_AST = st_AST;
				
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_FLAGS:
			{
				f = LT(1);
				f_AST = (Aast)astFactory.create(f);
				astFactory.addASTChild(currentAST, f_AST);
				match(KW_FLAGS);
				break;
			}
			case DOT:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			}
			
			sym.addEnum(s_AST, (f_AST != null), getFilename()); 
			
			builtInCls = sym.isBuiltInClass(s_AST.getText()); 
			dotNetCls = sym.isDotNetClass(s_AST.getText()); 
			
			enum_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = enum_stmt_AST;
	}
	
/**
 * Matches {@code KW_DEFINE KW_ENUM} followed by one or more {@link #enum_member} references and
 * a {@link #stmt_term}.  The root node will be {@code DEFINE_ENUM}. 
 */
	public final void def_enum_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_enum_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  e = null;
		Aast e_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DEFINE);
			d_AST.setType(DEFINE_ENUM);
			e = LT(1);
			e_AST = (Aast)astFactory.create(e);
			match(KW_ENUM);
			hide(e);
			{
			int _cnt95=0;
			_loop95:
			do {
				if ((_tokenSet_1.member(LA(1)))) {
					enum_member();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					if ( _cnt95>=1 ) { break _loop95; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt95++;
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			def_enum_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_enum_stmt_AST;
	}
	
/**
 * Matches the <code>DEFINE</code> Progress 4GL language statement and
 * switches into the correct alternative based on the lookahead tokens.
 * <p>
 * This rule is called by {@link #stmt_list} and it handles the matching
 * for the <code>DEFINE</code> keyword, the optional shared scope keywords
 * <code>NEW, GLOBAL, SHARED</code> and the optional keywords for parameter
 * types <code>INPUT, OUTPUT, INPUT-OUTPUT and RETURN</code>.  It then
 * calls the appropriate alternative to allow the specific processing to
 * occur.  The alternatives:  
 * <ul>
 *    <li> BROWSE {@link #def_browse_stmt}
 *    <li> BUTTON {@link #def_button_stmt}
 *    <li> BUFFER {@link #def_buf_stmt}
 *    <li> DATASET {@link #def_dataset_stmt}
 *    <li> DATA-SOURCE {@link #def_datasrc_stmt}
 *    <li> EVENT {@link #def_event_stmt}
 *    <li> FRAME {@link #def_frame_stmt}
 *    <li> IMAGE {@link #def_image_stmt}
 *    <li> MENU and SUB-MENU {@link #def_menu_stmt}
 *    <li> PARAMETER {@link #def_parm_stmt}
 *    <li> PROPERTY {@link #def_prop_stmt}
 *    <li> RECTANGLE {@link #def_rect_stmt}
 *    <li> STREAM {@link #def_stream_stmt}
 *    <li> QUERY {@link #def_query_stmt}
 *    <li> TEMP-TABLE (and WORK-TABLE/WORKFILE) {@link #def_temp_table_stmt}
 *    <li> VARIABLE {@link #def_var_stmt}
 * </ul>
 * <p>
 * This design allows all <code>DEFINE</code> statements to be supported
 * without ambiguity because it left-factors the common keyword.
 */
	public final void define_stmt_pre_scan() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast define_stmt_pre_scan_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Aast am_AST = null;
		Token  st = null;
		Aast st_AST = null;
		Token  ab = null;
		Aast ab_AST = null;
		Token  ov = null;
		Aast ov_AST = null;
		Aast t_AST = null;
		Token  k1 = null;
		Aast k1_AST = null;
		Token  k2 = null;
		Aast k2_AST = null;
		Token  k3 = null;
		Aast k3_AST = null;
		Token  k4 = null;
		Aast k4_AST = null;
		
		try {      // for error handling
			
			int     mtype      = -1;
			String  varname    = null;
			String  dsName    = null;
			String  tablename  = null;
			boolean force      = false;
			boolean fakeBuffer = false;
			Aast    likeast    = null;
			String  likename   = null;
			boolean tt_new     = false;
			boolean tt_global  = false;
			boolean tt_shared  = false;
			boolean always     = false;
			
			boolean[] allowColon = new boolean[] { false };
			
			Object[] df = null;
			
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DEFINE);
			{
			_loop174:
			do {
				switch ( LA(1)) {
				case KW_PK_PRIV:
				case KW_PK_PROT:
				case KW_PRIVATE:
				case KW_PROTECTD:
				case KW_PUBLIC:
				{
					access_mode();
					am_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_SERIALAB:
				{
					Aast tmp12_AST = null;
					tmp12_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp12_AST);
					match(KW_SERIALAB);
					break;
				}
				case KW_NON_SER:
				{
					Aast tmp13_AST = null;
					tmp13_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp13_AST);
					match(KW_NON_SER);
					break;
				}
				case KW_STATIC:
				{
					st = LT(1);
					st_AST = (Aast)astFactory.create(st);
					astFactory.addASTChild(currentAST, st_AST);
					match(KW_STATIC);
					break;
				}
				case KW_ABSTRACT:
				{
					ab = LT(1);
					ab_AST = (Aast)astFactory.create(ab);
					astFactory.addASTChild(currentAST, ab_AST);
					match(KW_ABSTRACT);
					break;
				}
				case KW_OVERRIDE:
				{
					ov = LT(1);
					ov_AST = (Aast)astFactory.create(ov);
					astFactory.addASTChild(currentAST, ov_AST);
					match(KW_OVERRIDE);
					break;
				}
				case KW_FINAL:
				{
					Aast tmp14_AST = null;
					tmp14_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp14_AST);
					match(KW_FINAL);
					break;
				}
				default:
				{
					break _loop174;
				}
				}
			} while (true);
			}
			{
			switch ( LA(1)) {
			case KW_DATA_SRC:
			case KW_DATASET:
			case KW_FRAME:
			case KW_NEW:
			case KW_QUERY:
			case KW_SHARED:
			case KW_STREAM:
			case KW_WORK_TAB:
			case KW_BROWSE:
			case KW_BUFFER:
			case KW_MENU:
			case KW_SUB_MENU:
			case KW_TEMP_TAB:
			case KW_VAR:
			{
				{
				if (((LA(1)==KW_NEW||LA(1)==KW_SHARED))&&( am_AST == null )) {
					{
					switch ( LA(1)) {
					case KW_NEW:
					{
						Aast tmp15_AST = null;
						tmp15_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp15_AST);
						match(KW_NEW);
						{
						switch ( LA(1)) {
						case KW_GLOBAL:
						{
							Aast tmp16_AST = null;
							tmp16_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp16_AST);
							match(KW_GLOBAL);
							tt_global = true;
							break;
						}
						case KW_SHARED:
						{
							break;
						}
						default:
						{
							throw new NoViableAltException(LT(1), getFilename());
						}
						}
						}
						tt_new = true;
						break;
					}
					case KW_SHARED:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					Aast tmp17_AST = null;
					tmp17_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp17_AST);
					match(KW_SHARED);
					tt_shared = true;
				}
				else if ((_tokenSet_7.member(LA(1)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				{
				switch ( LA(1)) {
				case KW_BROWSE:
				{
					varname=def_browse_stmt();
					astFactory.addASTChild(currentAST, returnAST);
					d_AST.setType(DEFINE_BROWSE);
					break;
				}
				case KW_BUFFER:
				{
					def_buf_stmt(true, false, (tt_shared && ! tt_new), am_AST, st_AST);
					astFactory.addASTChild(currentAST, returnAST);
					d_AST.setType(DEFINE_BUFFER);
					break;
				}
				case KW_DATASET:
				{
					dsName=def_dataset_stmt(am_AST, st_AST);
					astFactory.addASTChild(currentAST, returnAST);
					
					d_AST.setType(DEFINE_DATASET);
					// add the dataset to the namespace
					sym.addDataSet(dsName, DATA_SET, d_AST, am_AST, st_AST);
					
					break;
				}
				case KW_DATA_SRC:
				{
					dsName=def_datasrc_stmt(am_AST, st_AST);
					astFactory.addASTChild(currentAST, returnAST);
					
					d_AST.setType(DEFINE_DATA_SOURCE);
					// add the data source to the namespace
					sym.addDataSource(dsName, DATA_SOURCE, d_AST, am_AST, st_AST);
					
					break;
				}
				case KW_FRAME:
				{
					df=def_frame_stmt();
					astFactory.addASTChild(currentAST, returnAST);
					
					d_AST.setType(DEFINE_FRAME);
					
					String frame = (String) df[0];
					Aast fp = (Aast) df[1];
					setUseDictExps(frame, fp, d_AST);
					
					break;
				}
				case KW_MENU:
				case KW_SUB_MENU:
				{
					mtype=def_menu_stmt();
					astFactory.addASTChild(currentAST, returnAST);
					define_stmt_pre_scan_AST = (Aast)currentAST.root;
					
					if (mtype == WID_MENU)
					{
					d_AST.setType(DEFINE_MENU);
					}
					else
					{
					d_AST.setType(DEFINE_SUB_MENU);
					}
					varname = define_stmt_pre_scan_AST.getImmediateChild(SYMBOL, null).getText();
					
					likeast = define_stmt_pre_scan_AST.getImmediateChild(KW_LIKE, null);
					if (likeast != null)
					{
					likename = likeast.getImmediateChild(SYMBOL, null).getText();
					sym.addMenuLike(varname, likename, define_stmt_pre_scan_AST);
					}
					
					break;
				}
				case KW_QUERY:
				{
					def_query_stmt(am_AST, st_AST);
					astFactory.addASTChild(currentAST, returnAST);
					d_AST.setType(DEFINE_QUERY);
					break;
				}
				case KW_STREAM:
				{
					def_stream_stmt();
					astFactory.addASTChild(currentAST, returnAST);
					d_AST.setType(DEFINE_STREAM);
					break;
				}
				case KW_WORK_TAB:
				case KW_TEMP_TAB:
				{
					tablename=def_temp_table_stmt(tt_new, tt_global, tt_shared, am_AST, st_AST);
					t_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					fakeBuffer = true;
					if (t_AST.getType() == KW_TEMP_TAB)
					{
					d_AST.setType(DEFINE_TEMP_TABLE);
					}
					else
					{
					d_AST.setType(DEFINE_WORK_TABLE);
					}
					
					break;
				}
				case KW_VAR:
				{
					varname=def_var_stmt(allowColon, d_AST, am_AST, st_AST);
					astFactory.addASTChild(currentAST, returnAST);
					d_AST.setType(DEFINE_VARIABLE);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			case KW_INPUT:
			case KW_IN_OUT:
			case KW_OUTPUT:
			case KW_PARM:
			case KW_RETURN:
			{
				{
				switch ( LA(1)) {
				case KW_INPUT:
				{
					k1 = LT(1);
					k1_AST = (Aast)astFactory.create(k1);
					astFactory.addASTChild(currentAST, k1_AST);
					match(KW_INPUT);
					break;
				}
				case KW_OUTPUT:
				{
					k2 = LT(1);
					k2_AST = (Aast)astFactory.create(k2);
					astFactory.addASTChild(currentAST, k2_AST);
					match(KW_OUTPUT);
					break;
				}
				case KW_IN_OUT:
				{
					k3 = LT(1);
					k3_AST = (Aast)astFactory.create(k3);
					astFactory.addASTChild(currentAST, k3_AST);
					match(KW_IN_OUT);
					break;
				}
				case KW_RETURN:
				{
					k4 = LT(1);
					k4_AST = (Aast)astFactory.create(k4);
					astFactory.addASTChild(currentAST, k4_AST);
					match(KW_RETURN);
					break;
				}
				case KW_PARM:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				varname=def_parm_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				
				d_AST.setType(DEFINE_PARAMETER);
				if (k1_AST == null && k2_AST == null && k3_AST == null && k4_AST == null)
				{
				force = true;
				}
				
				break;
			}
			case KW_PROPERTY:
			{
				varname=def_prop_stmt_pre_scan(d_AST, am_AST, st_AST, ov_AST, ab_AST);
				astFactory.addASTChild(currentAST, returnAST);
				d_AST.setType(DEFINE_PROPERTY); always = true;
				break;
			}
			case KW_EVENTS:
			{
				varname=def_event_stmt(d_AST, am_AST, st_AST, ov_AST, ab_AST);
				astFactory.addASTChild(currentAST, returnAST);
				d_AST.setType(DEFINE_EVENT); always = true;
				break;
			}
			case KW_BUTTON:
			{
				varname=def_button_stmt(allowColon);
				astFactory.addASTChild(currentAST, returnAST);
				d_AST.setType(DEFINE_BUTTON);
				break;
			}
			case KW_RECT:
			{
				varname=def_rect_stmt(allowColon);
				astFactory.addASTChild(currentAST, returnAST);
				d_AST.setType(DEFINE_RECTANGLE);
				break;
			}
			case KW_IMAGE:
			{
				varname=def_image_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				d_AST.setType(DEFINE_IMAGE);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			define_stmt_pre_scan_AST = (Aast)currentAST.root;
			
			// defining data members is bypassed for default members 
			if (am_AST != null || always)
			{
			if (varname != null)
			{
			postDefineVar(varname, define_stmt_pre_scan_AST, am_AST, st_AST, force);
			}
			
			if (dsName != null)
			{
			sym.setDatasetOptions(null, false, dsName, define_stmt_pre_scan_AST, d_AST.getType(), true);
			}
			}
			
			if (fakeBuffer)
			{
			postDefineBuf(tablename, define_stmt_pre_scan_AST);
			}
			
			define_stmt_pre_scan_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = define_stmt_pre_scan_AST;
	}
	
	public final void method_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast method_stmt_AST = null;
		Aast a_AST = null;
		Token  st = null;
		Aast st_AST = null;
		Aast cls_AST = null;
		Aast s_AST = null;
		
		int mtype = -1;
		int size  = -1;
		
		
		try {      // for error handling
			Aast tmp18_AST = null;
			tmp18_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp18_AST);
			match(KW_METHOD);
			{
			_loop126:
			do {
				if ((_tokenSet_8.member(LA(1))) && (_tokenSet_0.member(LA(2))) && (_tokenSet_4.member(LA(3)))) {
					access_mode();
					a_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_STATIC) && (_tokenSet_0.member(LA(2))) && (_tokenSet_4.member(LA(3)))) {
					st = LT(1);
					st_AST = (Aast)astFactory.create(st);
					astFactory.addASTChild(currentAST, st_AST);
					match(KW_STATIC);
					inStaticCtxt = true;
				}
				else if ((LA(1)==KW_ABSTRACT) && (_tokenSet_0.member(LA(2))) && (_tokenSet_4.member(LA(3)))) {
					Aast tmp19_AST = null;
					tmp19_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp19_AST);
					match(KW_ABSTRACT);
				}
				else if ((LA(1)==KW_OVERRIDE) && (_tokenSet_0.member(LA(2))) && (_tokenSet_4.member(LA(3)))) {
					Aast tmp20_AST = null;
					tmp20_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp20_AST);
					match(KW_OVERRIDE);
				}
				else if ((LA(1)==KW_FINAL) && (_tokenSet_0.member(LA(2))) && (_tokenSet_4.member(LA(3)))) {
					Aast tmp21_AST = null;
					tmp21_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp21_AST);
					match(KW_FINAL);
				}
				else {
					break _loop126;
				}
				
			} while (true);
			}
			mtype=method_return();
			cls_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_EXTENT) && (_tokenSet_9.member(LA(2)))) {
				size=extent();
				astFactory.addASTChild(currentAST, returnAST);
				method_stmt_AST = (Aast)currentAST.root;
				
				if (size == -1 || size > 0) method_stmt_AST.putAnnotation("extent",  Long.valueOf(size));
				
			}
			else if ((_tokenSet_1.member(LA(1))) && (LA(2)==LPARENS)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			any_symbol_at_all();
			s_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			param_list_definition(true, false, true);
			astFactory.addASTChild(currentAST, returnAST);
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			method_stmt_AST = (Aast)currentAST.root;
			
			int atype = (a_AST == null) ? KW_PUBLIC : a_AST.getType();
			
			String mname = s_AST.getText();
			
			// add the method to the current class def and annotate the root
			// node with the method level annotations
			sym.addObjectMethod(mname, mtype, atype, (st_AST != null), method_stmt_AST, cls_AST);
			
			method_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = method_stmt_AST;
	}
	
	public final void constructor_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast constructor_stmt_AST = null;
		Aast a_AST = null;
		Token  st = null;
		Aast st_AST = null;
		Aast cl_AST = null;
		
		try {      // for error handling
			Aast tmp22_AST = null;
			tmp22_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp22_AST);
			match(KW_CONSTRUC);
			{
			_loop118:
			do {
				if ((_tokenSet_8.member(LA(1))) && (_tokenSet_1.member(LA(2)))) {
					access_mode();
					a_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_STATIC) && (_tokenSet_1.member(LA(2)))) {
					st = LT(1);
					st_AST = (Aast)astFactory.create(st);
					astFactory.addASTChild(currentAST, st_AST);
					match(KW_STATIC);
					inStaticCtxt = true;
				}
				else {
					break _loop118;
				}
				
			} while (true);
			}
			any_symbol_at_all();
			cl_AST = (Aast)returnAST;
			hide(cl_AST);
			param_list_definition(true, false, true);
			astFactory.addASTChild(currentAST, returnAST);
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			constructor_stmt_AST = (Aast)currentAST.root;
			
			int atype = (a_AST == null) ? KW_PUBLIC : a_AST.getType();
			
			String mname;
			
			if (st_AST != null)
			{
			mname = "static " + cl_AST.getText();
			}
			else
			{
			mname = cl_AST.getText();
			}
			
			// add the constructor to the current class def as a method and annotate the root
			// node with the method level annotations
			sym.addObjectMethod(mname, OO_METH_VOID, atype, (st_AST != null), constructor_stmt_AST, null);
			
			constructor_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = constructor_stmt_AST;
	}
	
/** 
 * Top-level program definition (and entry point) of a Progress 4GL external
 * procedure.  The only real purpose of this entry point is to create an
 * artificial root node for the external procedure itself.  Since there
 * is no prediction or looping occurring, there will only ever be a single
 * root node of an external procedure.  This entry point is simply used
 * for tree creation but no real parsing ever happens here.  The real core
 * implementation of the top-level parsing starts with {@link #block}.
 *
 * @return    <code>true</code> if all tokens in the input stream have been
 *            processed and the next token is <code>EOF</code>, otherwise
 *            some unexpected or invalid combination caused the top-level
 *            processing to end prematurely and without warnings or errors.
 */
	public final boolean  external_proc() throws RecognitionException, TokenStreamException {
		boolean complete = false;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast external_proc_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			topLevelEntry = true;
			
			block();
			b_AST = (Aast)returnAST;
			external_proc_AST = (Aast)currentAST.root;
			
			// this rule doesn't consume EOF, so if we have properly parsed the 
			// entire file, then the next token *should* be EOF;  test for this
			// and return the result of the test to the caller
			complete = (LA(1) == EOF);
			
			external_proc_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST));
			
			external_proc_AST.putAnnotation("builtin-cls", builtInCls);
			external_proc_AST.putAnnotation("dotnet-cls", dotNetCls);
			
			currentAST.root = external_proc_AST;
			currentAST.child = external_proc_AST!=null &&external_proc_AST.getFirstChild()!=null ?
				external_proc_AST.getFirstChild() : external_proc_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = external_proc_AST;
		return complete;
	}
	
/**
 * This is the primary top-level rule that recursively handles Progress 4GL 
 * source files.  Note that these source files <b>must</b> be already
 * preprocessed (Progress 4GL Preprocessor statements are not handled by
 * this parser).
 * <p>
 * The core top-level processing is actually in {@link #single_block} which
 * is the rule that matches a one and only one top-level alternative. By
 * separating the alternatives from this top-level rule, it is possible to 
 * implement recursive calls that only accept a single block, statement or
 * assignment.  The <code>THEN or ELSE</code> clauses in an <code>IF</code>
 * language statement is an example of this requirement.  Other places in the
 * code that require a match to multiple blocks, statements and assignments
 * must call this rule which implements 0 or more matches to the
 * <code>single_block</code>.  This rule implements the looping and the
 * <code>single_block</code> implements the matching.
 * <p>
 * This rule loops until end of input which makes it ideal for processing an
 * entire external procedure (see {@link #external_proc}).  This rule will
 * match a top-level alternative iteratively occurs until there are no more
 * tokens to process, in which case it returns to its caller.
 * <p>
 * Note that there are spurious ambiguity warnings generated for this rule,
 * due to the fact that many of the language constructs are simply ambiguous
 * by design. This ambiguity is resolved by ordering (precedence), token
 * rewriting and semantic predicates in the lower level rules.  For this
 * reason we disable ambiguity warnings.
 * <p>
 * This rule is also used as an entry point for {@link #procedure},
 * {@link #function} and {@link #inner_block} which allows each of these
 * rules to contain nested blocks by using recursion.  Note that the fact
 * that procedure and function definitions cannot be nested is handled by
 * semantic predicates in the <code>procedure</code> and 
 * <code>function</code> rules respectively.
 */
	public final void block() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast block_AST = null;
		
		try {      // for error handling
			{
			_loop18:
			do {
				if (((_tokenSet_10.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) != EOF && LA(1) != KW_END )) {
					single_block(false, false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop18;
				}
				
			} while (true);
			}
			block_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = block_AST;
	}
	
/** 
 * Top-level program definition (and entry point) of a code block handling a dynamic find/query. It is
 * created so that the resulted tree is the same as for a full {@code external_proc()} call but it does
 * supported only a limited set of statements.
 * Only the following cases/statements are supported:
 *  1. Dynamic find query:
 *        FIND FIRST <buffer> <find-predicate> <lock-type>.
 *  
 *  2. Dynamic query prepare:
 *        [ DEFINE BUFFER <buff-name> FOR [TEMP-TABLE] <table-name>. ]*
 *        OPEN QUERY DynGenQuery <query-predicate>.
 * In the future, if other statements will be supported, they will have to be added to 
 * {@code dynamic_query_stmt}.
 */
	public final void dynamic_query_proc() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dynamic_query_proc_AST = null;
		Aast db_AST = null;
		
		try {      // for error handling
			topLevelEntry = true;
			dynamic_query_block();
			db_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			dynamic_query_proc_AST = (Aast)currentAST.root;
			dynamic_query_proc_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"dynamic-block")).add(db_AST));
			currentAST.root = dynamic_query_proc_AST;
			currentAST.child = dynamic_query_proc_AST!=null &&dynamic_query_proc_AST.getFirstChild()!=null ?
				dynamic_query_proc_AST.getFirstChild() : dynamic_query_proc_AST;
			currentAST.advanceChildToEnd();
			dynamic_query_proc_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = dynamic_query_proc_AST;
	}
	
/**
 * Processes a set of statements inside a dynamic program. Called only from {@code dynamic_query_proc}.
 */
	public final void dynamic_query_block() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dynamic_query_block_AST = null;
		
		try {      // for error handling
			{
			_loop12:
			do {
				if ((LA(1)==KW_DEFINE||LA(1)==KW_FIND||LA(1)==KW_OPEN)) {
					dynamic_query_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop12;
				}
				
			} while (true);
			}
			dynamic_query_block_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = dynamic_query_block_AST;
	}
	
/**
 * Identifies one of the three known statements to the {@code dynamic_query_proc} and dispatches the call
 * to the appropriate rule. Puts the resulting sub-tree in a {@code STATEMENT} AST node and sets the
 * text accordingly.
 */
	public final void dynamic_query_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dynamic_query_stmt_AST = null;
		Aast f_AST = null;
		Aast ddb_AST = null;
		Aast oq_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case KW_FIND:
			{
				find_stmt();
				f_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				dynamic_query_stmt_AST = (Aast)currentAST.root;
				dynamic_query_stmt_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(STATEMENT,"dynamic-find-stmt")).add(f_AST));
				currentAST.root = dynamic_query_stmt_AST;
				currentAST.child = dynamic_query_stmt_AST!=null &&dynamic_query_stmt_AST.getFirstChild()!=null ?
					dynamic_query_stmt_AST.getFirstChild() : dynamic_query_stmt_AST;
				currentAST.advanceChildToEnd();
				dynamic_query_stmt_AST = (Aast)currentAST.root;
				break;
			}
			case KW_DEFINE:
			{
				dynamic_define_buffer_stmt();
				ddb_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				dynamic_query_stmt_AST = (Aast)currentAST.root;
				dynamic_query_stmt_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(STATEMENT,"dynamic-create-buffer")).add(ddb_AST));
				currentAST.root = dynamic_query_stmt_AST;
				currentAST.child = dynamic_query_stmt_AST!=null &&dynamic_query_stmt_AST.getFirstChild()!=null ?
					dynamic_query_stmt_AST.getFirstChild() : dynamic_query_stmt_AST;
				currentAST.advanceChildToEnd();
				dynamic_query_stmt_AST = (Aast)currentAST.root;
				break;
			}
			case KW_OPEN:
			{
				open_query_stmt();
				oq_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				dynamic_query_stmt_AST = (Aast)currentAST.root;
				dynamic_query_stmt_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(STATEMENT,"dynamic-open-query-stmt")).add(oq_AST));
				currentAST.root = dynamic_query_stmt_AST;
				currentAST.child = dynamic_query_stmt_AST!=null &&dynamic_query_stmt_AST.getFirstChild()!=null ?
					dynamic_query_stmt_AST.getFirstChild() : dynamic_query_stmt_AST;
				currentAST.advanceChildToEnd();
				dynamic_query_stmt_AST = (Aast)currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_12);
		}
		returnAST = dynamic_query_stmt_AST;
	}
	
/**
 * Matches the <code>FIND</code> language statement and implements all
 * forms with most of the core processing delegated to the 
 * {@link #record_phrase} rule.
 * <p>
 * Note that one option <code>CURRENT</code> allows more possible record
 * phrase options than are actually valid in Progress, however it is
 * simply a superset of the valid options and as such is safe.
 * <p>
 * There is inherent ambiguity here with the use of unreserved Progress
 * keywords <code>PREV, LEFT and OUTER-JOIN</code> that is detected by
 * ANTLR.  The code has been reviewed and the conflicting cases either
 * can't occur in valid Progress code or they will be properly resolved
 * anyway.  For this reason, ambiguity warnings are disabled.
 */
	public final void find_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast find_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp23_AST = null;
			tmp23_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp23_AST);
			match(KW_FIND);
			{
			switch ( LA(1)) {
			case KW_FIRST:
			{
				Aast tmp24_AST = null;
				tmp24_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp24_AST);
				match(KW_FIRST);
				break;
			}
			case KW_LAST:
			{
				Aast tmp25_AST = null;
				tmp25_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp25_AST);
				match(KW_LAST);
				break;
			}
			case KW_NEXT:
			{
				Aast tmp26_AST = null;
				tmp26_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp26_AST);
				match(KW_NEXT);
				break;
			}
			case KW_CURRENT:
			{
				Aast tmp27_AST = null;
				tmp27_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp27_AST);
				match(KW_CURRENT);
				break;
			}
			default:
				if ((LA(1)==KW_PREV) && (_tokenSet_13.member(LA(2))) && (_tokenSet_14.member(LA(3)))) {
					Aast tmp28_AST = null;
					tmp28_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp28_AST);
					match(KW_PREV);
				}
				else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_14.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			record_phrase(false, false);
			astFactory.addASTChild(currentAST, returnAST);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			find_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = find_stmt_AST;
	}
	
/**
 * Identifies and process a definition of a buffer in a dynamic environment. It seems like the {@code DOT} at
 * end of the statement is not matched automatically so it is expressly dropped if encountered after
 * processing the buffer definition.
 */
	public final void dynamic_define_buffer_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dynamic_define_buffer_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DEFINE);
			def_buf_stmt(true, false, false, null, null);
			astFactory.addASTChild(currentAST, returnAST);
			d_AST.setType(DEFINE_BUFFER);
			{
			switch ( LA(1)) {
			case DOT:
			{
				match(DOT);
				break;
			}
			case EOF:
			case KW_DEFINE:
			case KW_FIND:
			case KW_OPEN:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			dynamic_define_buffer_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_12);
		}
		returnAST = dynamic_define_buffer_stmt_AST;
	}
	
/**
 * Matches a <code>OPEN QUERY</code> language statement and all possible
 * options.  Uses: 
 * <p>
 * <ul>
 *    <li> {@link #malformed_symbol}
 *    <li> {@link #for_or_preselect_clause}
 *    <li> {@link #max_rows_clause}
 *    <li> {@link #collate_clause}
 *    <li> {@link #by_clause}
 *    <li> {@link #query_tuning_phrase}
 * </ul>
 * <p>
 * Used by {@link #stmt_list}.                
 */
	public final void open_query_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast open_query_stmt_AST = null;
		Token  o = null;
		Aast o_AST = null;
		Token  qk = null;
		Aast qk_AST = null;
		Aast q_AST = null;
		
		try {      // for error handling
			o = LT(1);
			o_AST = (Aast)astFactory.create(o);
			astFactory.makeASTRoot(currentAST, o_AST);
			match(KW_OPEN);
			o_AST.setType(OPEN_QUERY);
			qk = LT(1);
			qk_AST = (Aast)astFactory.create(qk);
			match(KW_QUERY);
			hide(qk);
			malformed_symbol();
			q_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			q_AST.setType(QUERY);
			for_or_preselect_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1210:
			do {
				switch ( LA(1)) {
				case KW_IDX_REPO:
				{
					Aast tmp30_AST = null;
					tmp30_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp30_AST);
					match(KW_IDX_REPO);
					break;
				}
				case KW_BREAK:
				{
					Aast tmp31_AST = null;
					tmp31_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp31_AST);
					match(KW_BREAK);
					sym.endIndexFieldSearch();
					break;
				}
				case KW_MAX_ROWS:
				{
					max_rows_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_BY:
				case KW_COLLATE:
				{
					{
					switch ( LA(1)) {
					case KW_COLLATE:
					{
						collate_clause();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_BY:
					{
						sort_order_clause();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_QRY_TUNE:
				{
					query_tuning_phrase();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop1210;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			
			sym.endIndexFieldSearch();
			
			if (sym.lookupQuery(q_AST.getText()) != QUERY)
			{
			// if the query is not yet defined, define it now
			sym.addQuery(q_AST.getText(), q_AST, QUERY, null, null);
			}
			
			open_query_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = open_query_stmt_AST;
	}
	
/**
 * Matches a <code>DEFINE BUFFER</code> Progress 4GL language statement.
 * This is the statement that defines or imports new user-named buffers and
 * associates these with a specific database table, temp-table or  
 * work-table.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional shared scope for
 * buffers.  This rule supports shared or local buffers and the syntax for
 * both declaring or defining (<code>NEW</code> keyword) shared buffers. 
 * HOWEVER, all the matching for these optional keywords is done in the
 * <code>define_stmt</code> rule. This refactoring allows all 
 * <code>DEFINE</code> statements to be supported without ambiguity.
 * <p>
 * This rule matches the <code>BUFFER</code> keyword and all subsequent
 * processing.  Note that due to syntax compatibility, this rule is also
 * called from {@link #def_parm_stmt} and {@link #parameter} which allows 
 * this logic to be centralized.  The following <code>FOR</code> construct
 * is only optional to support the call from the <code>parameter</code>
 * rule when it is processing a <code>RUN</code> statement parameter.  When
 * the <code>parameter</code> rule is processing a <code>FUNCTION</code> 
 * parameter, the <code>FOR</code> processing will be matched (if the code
 * is valid Progress 4GL). Anytime the <code>FOR</code> processing is matched,
 * this means that this is a new or imported buffer definition and the
 * buffer will be added to the schema namespace.
 * <p>
 * This supports an undocumented Progress feature where function parameters
 * can be specified without the symbolic name (e.g. in a forward function
 * declaration it can look like <code>BUFFER FOR record</code>).
 *
 * @param    define_stmt
 *           If <code>true</code>, this rule has been called from the
 *           <code>DEFINE BUFFER</code> statement and the 
 *           <code>KW_BUFFER</code> node should be dropped (it is 
 *           unnecessary).  If <code>false</code>, the caller is some form
 *           of parameter processing and the <code>KW_BUFFER</code> node is 
 *           used as the resulting sub-tree root.
 * @param    optionalSym
 *           If <code>true</code>, this rule has been called from a function
 *           parameter and the buffer's symbolic name is optional.
 * @param    importedShared
 *           If <code>true</code>, this definition is a non-new shared variable which is the
 *           equivalent of a FIND or CREATE.  This means we must promote the buffer name now
 *           so that it can disambiguate references within this scope. 
 * @param    am 
 *           Access modifiers if not null. Only will be non-null if this is a resource defined
 *           as a member of a class definition.
 * @param    st
 *           Static specifier if not null. Only will be non-null if this is a resource defined
 *           as a member of a class definition.
 */
	public final void def_buf_stmt(
		boolean define_stmt, boolean optionalSym, boolean importedShared, Aast am, Aast st
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_buf_stmt_AST = null;
		Token  buf = null;
		Aast buf_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			String rtext = null;
			
			{
			{
			if (((LA(1)==KW_BUFFER) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( define_stmt )) {
				buf = LT(1);
				buf_AST = (Aast)astFactory.create(buf);
				match(KW_BUFFER);
				hide(buf);
			}
			else if ((LA(1)==KW_BUFFER) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp32_AST = null;
				tmp32_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp32_AST);
				match(KW_BUFFER);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((_tokenSet_15.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				symbol();
				b_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( optionalSym )) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_FOR) && (_tokenSet_13.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				rtext=simple_for_record_spec();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop210:
			do {
				if ((LA(1)==KW_PRESEL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp33_AST = null;
					tmp33_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp33_AST);
					match(KW_PRESEL);
				}
				else if ((LA(1)==KW_LABEL) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					label(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_XML_NNAM) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					xml_node_name();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SERIALZN) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					serialize_name();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NAMESP_P||LA(1)==KW_NAMESP_U) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					namespace_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop210;
				}
				
			} while (true);
			}
			}
			
			if (b_AST != null && rtext != null)
			{
			boolean forceTemp = false;
			AST ns = b_AST.getNextSibling();
			if (ns != null && ns.getType() == KW_FOR)
			{
			AST a = ns.getFirstChild();
			if (a != null && a.getType() == KW_TEMP_TAB)
			{
			forceTemp = true;
			}
			}
			
			if (SymbolResolver.isPreScan() && rtext.equalsIgnoreCase(b_AST.getText()))
			{
			// in pre-scan mode, leave only the 'default' buffer and do not allow override with the same name.
			// this 'DEFINE BUFFER b1 FOR b1' statement is possible only for temp-table buffers; for permanent
			// buffers, you can't redefine an already defined 'b1' buffer.
			}
			else
			{
			if (!defineBufferFromSymbol(b_AST, rtext, am, st, forceTemp, false))
			{
			// fallback to physical table, if no temp-table is found.
			defineBufferFromSymbol(b_AST, rtext, am, st, false, true);
			}
			
			// imported (non-new) shared buffers are the equivalent of a FIND or CREATE, we must
			// promote these buffers to ensure proper name disambiguation
			if (importedShared || !define_stmt)
			{
			// not sure about the noProp flag here
			sym.promoteTableName(b_AST.getText(), true, false);
			}
			}
			}
			
			def_buf_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_buf_stmt_AST;
	}
	
/**
 * This rule implements the core matching of the top-level language
 * constructs.  It is called by {@link #block} which is a top-level entry 
 * point for processing an external procedure as well as the recursively
 * called entry points for implementing nesting.  This rule is also called
 * directly from any parser location that needs to implement a match for 
 * any single procedure, class definition, function, trigger, block, statement
 * or assignment. The key here is that this rule does not loop.  It matches
 * one of the 13 top-level constructs and then returns.  This makes it ideal
 * to handle the <code>THEN or ELSE</code> clauses in an <code>IF</code>
 * language statement.
 * <p>
 * There are 13 possible alternatives for a top-level Progress language
 * construct:
 * <ul>
 *    <li> {@link #procedure} (definition) - rooted at a
 *         <code>PROCEDURE</code> node
 *    <li> {@link #class_def} (definition) - rooted at a
 *         <code>CLASS_DEF</code> node
 *    <li> {@link #interface_def} (definition) - rooted at an
 *         <code>INTERFACE_DEF</code> node
 *    <li> {@link #enum_def} (definition) - rooted at an
 *         <code>ENUM_DEF</code> node
 *    <li> {@link #constructor} (definition) - rooted at an
 *         <code>CONSTRUCTOR</code> node
 *    <li> {@link #destructor} (definition) - rooted at an
 *         <code>DESTRUCTOR</code> node
 *    <li> {@link #user_defined_method} (definition) - rooted at an
 *         <code>METHOD_DEF</code> node
 *    <li> trigger (definition) - rooted at a <code>TRIGGER_BLOCK</code> node
 *    <li> {@link #function} (forward declaration or definition)  - rooted at
 *         a <code>FUNCTION</code> node
 *    <li> {@link #inner_block} (DO, REPEAT or FOR) - rooted at an
 *         <code>INNER_BLOCK</code> node
 *    <li> other language {@link #statement} - rooted at a
 *         <code>STATEMENT</code> node
 *    <li> directly embedded SQL processed by the {@link #statement} rule -
 *         rooted at an <code>EMBEDDED_SQL</code> node
 *    <li> {@link #assignment} - rooted at an <code>ASSIGNMENT</code> node
 *    <li> {@link #oea_annotations} - rooted at an <code>AT</code> node
 * </ul>
 * <p>
 * <b>Trigger support is implemented as the {@link #on_stmt} which is
 * matched as a language statement in the <code>statement</code> rule.</b>
 * So while this rule can return a <code>TRIGGER_BLOCK</code>, this is not
 * possible from the true top level of a Progress program (even though
 * Progress seems to consider triggers as top-level constructs), this parser
 * will match such constructs through <code>on_stmt</code>.
 * <p>
 * The order of evaluation is very important.  Of special significance is the
 * fact that assignments are processed last (have the lowest precedence).
 * This is important since the leftmost token of an assignment is an optional
 * <code>lvalue</code> which could be a variable or field with a name that
 * matches an unreserved keyword.  Since the lexer is biased toward setting
 * token types to a keyword when there are conflicts, ambiguity is removed by
 * allowing all the keyword processing to occur first and then overriding the 
 * token type with a variable, field or function type.
 * <p>
 * When entered, this rule predicts a match based on the 2 lookahead tokens
 * and the rolled up prediction sets from each alternative, it calls the
 * alternative which matches and consumes all tokens so described by the
 * rules and the tree of rules which can be reached from the top-level
 * alternative. At that point, the flow of control returns back to this
 * method and this method returns to its caller.
 * <p>
 * In ANTLR, any rule references that impact the leftmost k tokens (where
 * k is the lookahead depth) cause a vertical 'rollup' of all possible sets
 * of leftmost tokens.  Rollup refers to the aggregation of possibilities
 * from called rules into a set (often a BitSet) that can be checked against
 * lookahead token 1, a 2nd set that can be checked against lookahead token
 * 2 etc... The core problem is that ANTLR's rollup mechanism is not
 * sophisticated enough to detect the <b>dependencies</b> between the sets.
 * This means that a rule reference that should only be called with a very
 * specific, ordered pair of tokens (e.g. X and Y) might end up matching
 * when A, Y or X, B are encountered in the token stream, depending on the
 * grammar.  Even though the grammer encodes these dependencies, they are
 * not considered when the top-level prediction logic is written.  This leads
 * false positives that would never normally be possible in the grammar. To
 * resolve these ambiguities, the following techniques are used: 
 * <ul>
 *    <li> proper ordering of alternatives to put more specific matches
 *         before more general matches
 *    <li> token type rewriting in called rules (based on context) to
 *         ensure that:
 *    <ul>
 *       <li> more generic token types like <code>SYMBOL</code> can be
 *            matched against more specific requirements
 *       <li> more specific token types (like unreserved keywords) are
 *            matched by other possible token types that have lower
 *            precedence but would normally still be possible depending on
 *            context
 *    </ul>
 *    <li> semantic predicates are used to add specific, targeted tests into
 *         top level rules wherever the predictive logic is too broad
 *         (eliminating the false positive by limiting the matches to the
 *          strict set of possible matches based on the dependencies)
 * </ul>
 * <p>
 * These tricks don't stop ANTLR from detecting the ambiguity but as long as
 * the grammar author inspects the resulting generated code and runs tests
 * to provide there is no ambiguity, then it is proper to disable the ANTLR
 * ambiguity warnings.
 * <p>
 * At this time, the rule is structured such that ANTLR properly predicts
 * the difference between a <code>procedure</code> keyword that is being
 * followed by a colon and thus is a label (the optional beginning of a
 * do, repeat or for block) versus the use of the <code>procedure</code>
 * keyword that starts a procedure definition (and must be followed by a
 * symbol which is the procedure name).  It can do the same with the
 * <code>function</code> keyword.  There is no ambiguity due to this.
 * <p>
 * A semantic predicate is used here to force the prediction for an inner
 * block to be more narrow than ANTLR would generate on its own.  This
 * avoids some mistaken matches.  In addition to the more specific prediction,
 * this rule needs to check whether the colon that is possibly signifying
 * a label was followed by whitespace or not.  This is needed to differentiate
 * between labels (which must always be followed by whitespace) and
 * attributes/methods where the colon cannot be followed by whitespace.
 * This part of the test relies upon the lexer to store an extra space after
 * the colon (in the token's text itself) if there was any kind of following
 * whitespace.  Only the lexer can do that because the whitespace is
 * discarded before the parser encounters it (changing that is just not
 * feasible).  So this approach is lame but it is better than the alternative
 * (which is to allow the {@link ProgressLexer#mSYMBOL} rule to consume
 * embedded colons and force the parser to split up the combined token into
 * its constituent parts.  See {@link #primary_expr} which is the rule that
 * should be matched if the label's colon does not have following whitespace. 
 * <p>
 * What makes this rule (and any looping calling rule like <code>block</code>)
 * work is that the <code>END</code> keyword cannot EVER be matched in the
 * leftmost token position.  This allows each nested block to end when such
 * a construct is encountered, which allows the calling rule to return or
 * to consume the <code>END</code> and then return.
 *
 * @param    blockRoot
 *           If <code>true</code>, root all child nodes at an artificial
 *           <code>BLOCK</code> node.
 * @param    trigger
 *           If <code>true</code> then the result will be rooted at a node
 *           of type <code>TRIGGER_BLOCK</code>. Ignored if 
 *           <code>blockRoot</code> is <code>false</code>.
 */
	public final void single_block(
		boolean blockRoot, boolean trigger
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast single_block_AST = null;
		Aast c_AST = null;
		
		try {      // for error handling
			
			isUserDefFunctionCall(LT(1), LT(2));
			
			int typ1 = LA(1);
			int typ2 = LA(2);
			boolean blk = (typ1 == KW_DO || typ1 == KW_REPEAT || typ1 == KW_FOR);
			boolean proper = false;
			boolean mal = false;
			Aast malformedLabel = null;
			boolean bypassStatement = false;
			
			boolean inputFunc = (typ1 == KW_INPUT &&
			(typ2 != KW_CLEAR && typ2 != KW_STREAM && typ2 != KW_STRM_HND &&
			typ2 != KW_CLOSE && typ2 != KW_FROM   && typ2 != KW_THROUGH));
			
			// for every stmt or other feature used in a constructor, increment the counter
			if (constStmts > -1)
			{
			constStmts++;
			}
			
			if (!blk)
			{
			// not an unlabeled inner block, check for a possible label  
			proper = isProperLabel(typ1);
			
			if (!proper)
			{
			// not a proper label, check for a malformed label
			mal = isMalformedLabel(true, 1, null); 
			
			// HARD CODED call that can't be placed directly in our rule
			// below (inner_block) without very bad results on prediction
			// logic generation
			if (mal)
			{
			malformed_symbol();
			malformedLabel = (Aast)returnAST;
			colon();
			}
			}
			}
			
			if ((typ1 == KW_BLK_LVL  && typ2 != KW_ON)       ||
			(typ1 == KW_CATCH    && typ2 != SYMBOL)      ||
			typ1 == KW_CHOOSE                           ||
			(typ1 == KW_CLOSE    && typ2 != SYMBOL)      ||
			(typ1 == KW_COMPILE  && typ2 != STRING
			&& typ2 != KW_VALUE
			&& typ2 != FILENAME)    ||
			(typ1 == KW_CONN     && typ2 != STRING
			&& typ2 != KW_VALUE
			&& typ2 != FILENAME)    ||
			(typ1 == KW_EMPTY    && typ2 != KW_TEMP_TAB) ||
			(typ1 == KW_FINALLY  && typ2 != COLON)       ||
			(typ1 == KW_GET      && typ2 != KW_FIRST 
			&& typ2 != KW_LAST 
			&& typ2 != KW_PREV 
			&& typ2 != KW_NEXT 
			&& typ2 != KW_CURRENT)  ||
			typ1 == KW_LOAD                             ||
			typ1 == KW_OPENMIME                         ||
			typ1 == KW_OPEN_URL                         ||
			typ1 == KW_RAW_TRAN                         ||
			(typ1 == KW_ROUTINEL && typ2 != KW_ON)       ||
			(typ1 == KW_STOP     && typ2 != DOT)         ||
			typ1 == KW_SYS_HELP                         ||
			(typ1 == KW_TRAN_MOD && typ2 != KW_AUTOMATC) ||
			typ1 == KW_UNLOAD                           ||
			typ1 == KW_USE                              ||
			typ1 == KW_VALIDATE                         ||
			typ1 == KW_WAIT)
			{
			String tok = LT(1).getText();
			boolean varFollowingTyp2 = (typ2 == DOT               ||
			typ2 == EQUALS            ||
			typ2 == COLON             ||
			typ2 == LBRACKET          ||
			typ2 == DB_REF_NON_STATIC ||
			isBinaryOp(typ2));
			
			if ((sym.lookupVariable(tok) != -1 && varFollowingTyp2)                  ||
			(sym.lookupFunction(tok) != -1 && typ2 == LPARENS)                   ||
			(varFollowingTyp2 &&
			(inStaticCtxt && sym.lookupDataMember(null, tok, true) != -1) ||
			(!inStaticCtxt && sym.lookupDataMember(null, tok) != -1))           ||
			(typ2 == LPARENS && sym.isObjectMethod(null, tok, inStaticCtxt)))
			{
			bypassStatement = true;
			}
			}
			
			{
			if ((LA(1)==KW_PROC) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				procedure();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_CLASS) && (_tokenSet_0.member(LA(2))) && (_tokenSet_16.member(LA(3)))) {
				class_def();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_INTERFAC) && (_tokenSet_0.member(LA(2))) && (_tokenSet_17.member(LA(3)))) {
				interface_def();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_ENUM) && (_tokenSet_0.member(LA(2))) && (_tokenSet_18.member(LA(3)))) {
				enum_def();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_CONSTRUC) && (_tokenSet_1.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
				constructor();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_DESTRUCT) && (_tokenSet_1.member(LA(2))) && (_tokenSet_5.member(LA(3)))) {
				destructor();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_METHOD) && (_tokenSet_0.member(LA(2))) && (_tokenSet_4.member(LA(3)))) {
				user_defined_method();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1)==KW_FUNCT) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= FILEROOT && LA(3) <= JUNK)))&&( LA(1) == KW_FUNCT && (isSomeSymbol(LA(2)) || isMalformedSymbol(2)) )) {
				function();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_19.member(LA(1))) && (_tokenSet_20.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( blk || proper || mal )) {
				inner_block(true, malformedLabel);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1)==DOT) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == DOT && (!followedByWhitespace(LT(1)) && LA(2) != EOF) )) {
				crap_to_ignore();
				c_AST = (Aast)returnAST;
				hide(c_AST);
			}
			else if (((_tokenSet_21.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(bypassStatement)) {
				assignment();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_22.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( 
              !bypassStatement                                                                       && 
              !inputFunc                                                                             &&
              ((LA(1) != KW_SUPER && LA(1) != KW_THIS_OBJ) || (constStmts > 0 && LA(2) == LPARENS))  &&
              !isClassDereference(LT(1), LT(2))
           )) {
				statement();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_21.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( !bypassStatement && isValidLeftmostReserved(LT(1), LT(2)) )) {
				assignment();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==AT)) {
				oea_annotations();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1)==UNKNOWN_TOKEN) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( false )) {
				{
				Aast tmp34_AST = null;
				tmp34_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp34_AST);
				match(UNKNOWN_TOKEN);
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			single_block_AST = (Aast)currentAST.root;
			
			// when used in if/then/else or case/when/then/otherwise, this
			// rule can match a single statement or assignment, however this
			// flag specifies to root such statements or assignments at an 
			// artificial block node to aid at conversion time
			if (blockRoot && single_block_AST != null)
			{
			int    stype = single_block_AST.getType();
			int    ttype = TRIGGER_BLOCK;
			String ttxt  = "trigger block";
			
			// we don't expect function or procedure definitions here and
			// we MUST exclude inner_block definitions since these are
			// already rooted properly
			if (stype == STATEMENT || stype == ASSIGNMENT || stype == EMBEDDED_SQL)
			{
			single_block_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(single_block_AST));
			
			if (trigger)
			{
			// for simple STATEMENTs or ASSIGNMENTs, we previously
			// created a BLOCK root node, now this will be placed
			// under a TRIGGER_BLOCK
			single_block_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(ttype,ttxt)).add(single_block_AST));
			}
			}
			else if (stype == INNER_BLOCK)
			{
			if (trigger)
			{
			// this is the case where there is a group of statements
			// enclosed in a DO block (REPEAT and FOR cannot be used,
			// even the DO block itself MUST be unqualified) so we
			// override the type and text since this isn't a real 
			// innerblock
			saveAndReplaceTypeAndText(single_block_AST, ttype, ttxt);
			}
			}
			}
			
			currentAST.root = single_block_AST;
			currentAST.child = single_block_AST!=null &&single_block_AST.getFirstChild()!=null ?
				single_block_AST.getFirstChild() : single_block_AST;
			currentAST.advanceChildToEnd();
			single_block_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = single_block_AST;
	}
	
/**
 * This rule creates the block structure for a procedure. All procedure
 * definitions must start with the <code>PROCEDURE</code> language statement
 * (see {@link #proc_stmt}). This is followed by a recursive call to
 * {@link #block} which handles the ability to nest top-level statements
 * inside a procedure. Finally, the rule ends with an optional
 * <code>END</code> language statement. The Progress language states that it
 * is valid to not have and <code>END</code>. In this case, the procedure's
 * end is implicit at the end of the file.
 * <p>
 * The most important features of this rule are:
 * <ul>
 *    <li> The use of the <code>nestLevel</code> member to track the current
 *         nesting level of the tree.  This allows us to throw an exception
 *         (using a semantic predicate) when there is any attempt to nest
 *         procedure or function definitions (which is not allowed). The
 *         semantic predicate is used here instead of using the parser
 *         structure itself (the manner in which the rules call each other)
 *         since the ability to properly nest blocks is dependent upon the
 *         structure as implemented.  Any other approach limited the nesting
 *         in a manner that was more restrictive than the Progress language
 *         itself.
 *    <li> At the beginning of this method, a scope is added to the variable
 *         dictionary (this is the only part of the symbol dictionary that
 *         is scope aware).  At the end of this method, the current scope
 *         is removed.  This allows the definition of local variables that
 *         hide variables of the same name in higher level scopes. Note that
 *         since functions and procedures cannot be nested, there is no need
 *         to use scopes in the respective namespaces for functions and
 *         procedures.  Progress essentially implements a flat namespace for
 *         each of these respectively.
 *    <li> At the beginning of this method, a scope is added to the schema
 *         dictionary.  In addition, a flag is set to indicate that the
 *         parser is currently inside an internal procedure.  This flag is
 *         used during buffer creation (see {@link #def_buf_stmt}) to 
 *         determine the proper scope in which to create the buffer.  At the
 *         end of this method, the current scope is removed.
 * </ul>
 * <p>
 * This rule is a peer alternative to {@link #function} and
 * {@link #class_def} rules (among others).
 * <p>
 * Called by {@link #single_block}.
 */
	public final void procedure() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast procedure_AST = null;
		Aast p_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			nestLevel++;
			sym.addScope();
			sym.addSchemaScope(true);
			bufferScope = false;
			
			{
			proc_stmt();
			p_AST = (Aast)returnAST;
			block();
			b_AST = (Aast)returnAST;
			{
			if ((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				end_stmt(true);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			procedure_AST = (Aast)currentAST.root;
			
			procedure_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(PROCEDURE,"procedure")).add(p_AST).add((Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST)))); 
			
			// internal procedure and function definitions cannot be nested in
			// each other or within themselves, so whenever this exits the
			// buffer scope can be safely set to global
			bufferScope = true;
			
			// internal procedures propagate
			sym.deleteSchemaScope(true);
			sym.deleteScope();
			nestLevel--;
			
			currentAST.root = procedure_AST;
			currentAST.child = procedure_AST!=null &&procedure_AST.getFirstChild()!=null ?
				procedure_AST.getFirstChild() : procedure_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = procedure_AST;
	}
	
/**
 * This rule creates the block structure for a class definition. All class
 * definitions must start with the {@link #class_stmt}.  This is followed by
 * a recursive call to {@link #block} which handles the ability to nest
 * top-level statements inside a class definition. Finally, the rule ends
 * with an <code>END</code> language statement. 
 * <p>
 * The most important features of this rule are:
 * <ul>
 *    <li> The use of the <code>nestLevel</code> member to track the current
 *         nesting level of the tree.  This allows us to throw an exception
 *         (using a semantic predicate) when there is any attempt to nest
 *         procedure or function definitions (which is not allowed). The
 *         semantic predicate is used here instead of using the parser
 *         structure itself (the manner in which the rules call each other)
 *         since the ability to properly nest blocks is dependent upon the
 *         structure as implemented.  Any other approach limited the nesting
 *         in a manner that was more restrictive than the Progress language
 *         itself.
 *    <li> At the beginning of this method, a scope is added to the variable
 *         dictionary (this is the only part of the symbol dictionary that
 *         is scope aware).  At the end of this method, the current scope
 *         is removed.  This allows the definition of local variables that
 *         hide variables of the same name in higher level scopes. Note that
 *         since functions and procedures cannot be nested, there is no need
 *         to use scopes in the respective namespaces for functions and
 *         procedures.  Progress essentially implements a flat namespace for
 *         each of these respectively.
 *    <li> At the beginning of this method, a scope is added to the schema
 *         dictionary.  In addition, a flag is set to indicate that the
 *         parser is currently inside an internal procedure.  This flag is
 *         used during buffer creation (see {@link #def_buf_stmt}) to 
 *         determine the proper scope in which to create the buffer.  At the
 *         end of this method, the current scope is removed.
 * </ul>
 * <p>
 * This rule is a peer alternative to {@link #procedure},
 * {@link #interface_def}, {@link #function} and other top-level blocks.
 * <p>
 * Called by {@link #single_block}.
 */
	public final void class_def() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast class_def_AST = null;
		Aast c_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			insideClass = true;
			
			nestLevel++;
			sym.addScope();
			sym.addSchemaScope(true);
			
			// treat class definitions like external procedures, don't force bufferScope to false
			
			{
			class_stmt();
			c_AST = (Aast)returnAST;
			if (!( nestLevel < 2 ))
			  throw new SemanticException(" nestLevel < 2 ");
			block();
			b_AST = (Aast)returnAST;
			{
			if ((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				end_stmt(true);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			class_def_AST = (Aast)currentAST.root;
			
			class_def_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(CLASS_DEF,"class definition")).add(c_AST).add((Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST)))); 
			
			// don't know if class defs propagate, assume true for now
			sym.deleteSchemaScope(true);
			sym.deleteScope();
			nestLevel--;
			sym.classDefinitionComplete();
			
			insideClass = false;
			
			currentAST.root = class_def_AST;
			currentAST.child = class_def_AST!=null &&class_def_AST.getFirstChild()!=null ?
				class_def_AST.getFirstChild() : class_def_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = class_def_AST;
	}
	
/**
 * This rule creates the block structure for an interface definition. All
 * interface definitions must start with the {@link #interface_stmt}.
 * This is followed by a recursive call to {@link #block} which handles
 * the ability to nest top-level statements inside an interface. Finally,
 * the rule ends with an <code>END</code> language statement. 
 * <p>
 * The most important features of this rule are:
 * <ul>
 *    <li> The use of the <code>nestLevel</code> member to track the current
 *         nesting level of the tree.  This allows us to throw an exception
 *         (using a semantic predicate) when there is any attempt to nest
 *         procedure or function definitions (which is not allowed). The
 *         semantic predicate is used here instead of using the parser
 *         structure itself (the manner in which the rules call each other)
 *         since the ability to properly nest blocks is dependent upon the
 *         structure as implemented.  Any other approach limited the nesting
 *         in a manner that was more restrictive than the Progress language
 *         itself.
 *    <li> At the beginning of this method, a scope is added to the variable
 *         dictionary (this is the only part of the symbol dictionary that
 *         is scope aware).  At the end of this method, the current scope
 *         is removed.  This allows the definition of local variables that
 *         hide variables of the same name in higher level scopes. Note that
 *         since functions and procedures cannot be nested, there is no need
 *         to use scopes in the respective namespaces for functions and
 *         procedures.  Progress essentially implements a flat namespace for
 *         each of these respectively.
 *    <li> At the beginning of this method, a scope is added to the schema
 *         dictionary.  In addition, a flag is set to indicate that the
 *         parser is currently inside an internal procedure.  This flag is
 *         used during buffer creation (see {@link #def_buf_stmt}) to 
 *         determine the proper scope in which to create the buffer.  At the
 *         end of this method, the current scope is removed.
 * </ul>
 * <p>
 * This rule is a peer alternative to {@link #procedure}, {@link #class_def}
 * {@link #function} and other top-level blocks.
 * <p>
 * Called by {@link #single_block}.
 */
	public final void interface_def() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast interface_def_AST = null;
		Aast i_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			nestLevel++;
			sym.addScope();
			sym.addSchemaScope(true);
			
			// treat class definitions like external procedures, don't force bufferScope to false
			
			{
			interface_stmt();
			i_AST = (Aast)returnAST;
			if (!( nestLevel < 2 ))
			  throw new SemanticException(" nestLevel < 2 ");
			block();
			b_AST = (Aast)returnAST;
			{
			if ((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				end_stmt(true);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			interface_def_AST = (Aast)currentAST.root;
			
			interface_def_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(INTERFACE_DEF,"interface definition")).add(i_AST).add((Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST)))); 
			
			// don't know if interfaces propagate, assume true for now
			sym.deleteSchemaScope(true);
			sym.deleteScope();
			nestLevel--;
			sym.classDefinitionComplete();
			
			currentAST.root = interface_def_AST;
			currentAST.child = interface_def_AST!=null &&interface_def_AST.getFirstChild()!=null ?
				interface_def_AST.getFirstChild() : interface_def_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = interface_def_AST;
	}
	
/**
 * This rule creates the block structure for an enum definition. All
 * enum definitions must start with the {@link #enum_stmt}.
 * This is followed by a recursive call to {@link #block} which handles
 * the ability to nest multiple DEFINE ENUM statements inside the enum. Finally,
 * the rule ends with an <code>END</code> language statement. 
 * <p>
 * The most important features of this rule are:
 * <ul>
 *    <li> The use of the <code>nestLevel</code> member to track the current
 *         nesting level of the tree.  This allows us to throw an exception
 *         (using a semantic predicate) when there is any attempt to nest
 *         procedure or function definitions (which is not allowed). The
 *         semantic predicate is used here instead of using the parser
 *         structure itself (the manner in which the rules call each other)
 *         since the ability to properly nest blocks is dependent upon the
 *         structure as implemented.  Any other approach limited the nesting
 *         in a manner that was more restrictive than the Progress language
 *         itself.
 *    <li> At the beginning of this method, a scope is added to the variable
 *         dictionary (this is the only part of the symbol dictionary that
 *         is scope aware).  At the end of this method, the current scope
 *         is removed.  This allows the definition of local variables that
 *         hide variables of the same name in higher level scopes. Note that
 *         since functions and procedures cannot be nested, there is no need
 *         to use scopes in the respective namespaces for functions and
 *         procedures.  Progress essentially implements a flat namespace for
 *         each of these respectively.
 * </ul>
 * <p>
 * This rule is a peer alternative to {@link #procedure}, {@link #class_def}
 * {@link #function} and other top-level blocks.
 * <p>
 * Called by {@link #single_block}.
 */
	public final void enum_def() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast enum_def_AST = null;
		Aast e_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			nestLevel++;
			sym.addScope();
			
			// buffers and other db stuff can't be referenced inside an enum def
			
			{
			enum_stmt();
			e_AST = (Aast)returnAST;
			if (!( nestLevel < 2 ))
			  throw new SemanticException(" nestLevel < 2 ");
			enum_stmt_body();
			b_AST = (Aast)returnAST;
			{
			if ((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				end_stmt(true);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			enum_def_AST = (Aast)currentAST.root;
			
			enum_def_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(ENUM_DEF,"enum definition")).add(e_AST).add((Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST)))); 
			
			sym.deleteScope();
			nestLevel--;
			sym.classDefinitionComplete();
			
			currentAST.root = enum_def_AST;
			currentAST.child = enum_def_AST!=null &&enum_def_AST.getFirstChild()!=null ?
				enum_def_AST.getFirstChild() : enum_def_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = enum_def_AST;
	}
	
/**
 * This rule creates the block structure for a constructor definition. All
 * interface definitions must start with the {@link #constructor_stmt}.
 * This is followed by a recursive call to {@link #block} which handles
 * the ability to nest top-level statements inside a constructor. Finally,
 * the rule ends with an <code>END</code> language statement. 
 * <p>
 * The most important features of this rule are:
 * <ul>
 *    <li> The use of the <code>nestLevel</code> member to track the current
 *         nesting level of the tree.  This allows us to throw an exception
 *         (using a semantic predicate) when this is not nested inside a
 *         class definition.
 *    <li> At the beginning of this method, a scope is added to the variable
 *         dictionary (this is the only part of the symbol dictionary that
 *         is scope aware).  At the end of this method, the current scope
 *         is removed.  This allows the definition of local variables that
 *         hide variables of the same name in higher level scopes. Note that
 *         since functions and procedures cannot be nested, there is no need
 *         to use scopes in the respective namespaces for functions and
 *         procedures.  Progress essentially implements a flat namespace for
 *         each of these respectively.
 *    <li> At the beginning of this method, a scope is added to the schema
 *         dictionary.  In addition, a flag is set to indicate that the
 *         parser is currently inside an internal procedure.  This flag is
 *         used during buffer creation (see {@link #def_buf_stmt}) to 
 *         determine the proper scope in which to create the buffer.  At the
 *         end of this method, the current scope is removed.
 * </ul>
 * <p>
 * This rule is a peer alternative to {@link #procedure}, {@link #class_def}
 * {@link #interface_def}, {@link #destructor}, {@link #function} and other
 * top-level blocks.
 * <p>
 * Called by {@link #single_block}.
 */
	public final void constructor() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast constructor_AST = null;
		Aast c_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			nestLevel++;
			sym.addScope();
			sym.addSchemaScope(true);
			boolean oldBufScope = bufferScope;
			bufferScope = false;
			inMethodDef = true;
			sym.setInMethod(true);
			constStmts = 0;
			
			{
			constructor_stmt();
			c_AST = (Aast)returnAST;
			if (!( nestLevel == 2 ))
			  throw new SemanticException(" nestLevel == 2 ");
			block();
			b_AST = (Aast)returnAST;
			{
			if ((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				end_stmt(true);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			constructor_AST = (Aast)currentAST.root;
			
			constructor_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(CONSTRUCTOR,"constructor")).add(c_AST).add((Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST)))); 
			
			constStmts = -1;
			
			// constructors are always nested
			bufferScope = oldBufScope;
			inMethodDef = false;
			sym.setInMethod(false);
			
			// don't know if constructors propagate, assume true for now
			sym.deleteSchemaScope(true);
			sym.deleteScope();
			nestLevel--;
			
			inStaticCtxt = false;
			
			currentAST.root = constructor_AST;
			currentAST.child = constructor_AST!=null &&constructor_AST.getFirstChild()!=null ?
				constructor_AST.getFirstChild() : constructor_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = constructor_AST;
	}
	
/**
 * This rule creates the block structure for a destructor definition. All
 * interface definitions must start with the {@link #destructor_stmt}.
 * This is followed by a recursive call to {@link #block} which handles
 * the ability to nest top-level statements inside a destructor. Finally,
 * the rule ends with an <code>END</code> language statement. 
 * <p>
 * The most important features of this rule are:
 * <ul>
 *    <li> The use of the <code>nestLevel</code> member to track the current
 *         nesting level of the tree.  This allows us to throw an exception
 *         (using a semantic predicate) when this is not nested inside a
 *         class definition.
 *    <li> At the beginning of this method, a scope is added to the variable
 *         dictionary (this is the only part of the symbol dictionary that
 *         is scope aware).  At the end of this method, the current scope
 *         is removed.  This allows the definition of local variables that
 *         hide variables of the same name in higher level scopes. Note that
 *         since functions and procedures cannot be nested, there is no need
 *         to use scopes in the respective namespaces for functions and
 *         procedures.  Progress essentially implements a flat namespace for
 *         each of these respectively.
 *    <li> At the beginning of this method, a scope is added to the schema
 *         dictionary.  In addition, a flag is set to indicate that the
 *         parser is currently inside an internal procedure.  This flag is
 *         used during buffer creation (see {@link #def_buf_stmt}) to 
 *         determine the proper scope in which to create the buffer.  At the
 *         end of this method, the current scope is removed.
 * </ul>
 * <p>
 * This rule is a peer alternative to {@link #procedure}, {@link #class_def}
 * {@link #interface_def}, {@link #constructor}, {@link #function} and other
 * top-level blocks.
 * <p>
 * Called by {@link #single_block}.
 */
	public final void destructor() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast destructor_AST = null;
		Aast d_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			nestLevel++;
			sym.addScope();
			sym.addSchemaScope(true);
			boolean oldBufScope = bufferScope;
			bufferScope = false;
			inMethodDef = true;
			sym.setInMethod(true);
			
			{
			destructor_stmt();
			d_AST = (Aast)returnAST;
			if (!( nestLevel == 2 ))
			  throw new SemanticException(" nestLevel == 2 ");
			block();
			b_AST = (Aast)returnAST;
			{
			if ((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				end_stmt(true);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			destructor_AST = (Aast)currentAST.root;
			
			destructor_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(DESTRUCTOR,"destructor")).add(d_AST).add((Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST)))); 
			
			// destructors are always nested
			bufferScope = oldBufScope;
			inMethodDef = false;
			sym.setInMethod(false);
			
			// don't know if destructors propagate, assume true for now
			sym.deleteSchemaScope(true);
			sym.deleteScope();
			nestLevel--;
			
			currentAST.root = destructor_AST;
			currentAST.child = destructor_AST!=null &&destructor_AST.getFirstChild()!=null ?
				destructor_AST.getFirstChild() : destructor_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = destructor_AST;
	}
	
/**
 * This rule creates the block structure for a user defined method. All
 * method definitions must start with the {@link #method_stmt}. If this
 * is a class definition rather than an interface definition, then this is
 * followed by a recursive call to {@link #block} which handles the ability
 * to nest top-level statements inside a method. If there is a block then
 * the rule ends with an <code>END</code> language statement. 
 * <p>
 * The most important features of this rule are:
 * <ul>
 *    <li> The use of the <code>nestLevel</code> member to track the current
 *         nesting level of the tree.  This allows us to throw an exception
 *         (using a semantic predicate) when this is not nested inside a
 *         class definition.
 *    <li> At the beginning of this method, a scope is added to the variable
 *         dictionary (this is the only part of the symbol dictionary that
 *         is scope aware).  At the end of this method, the current scope
 *         is removed.  This allows the definition of local variables that
 *         hide variables of the same name in higher level scopes. Note that
 *         since functions and procedures cannot be nested, there is no need
 *         to use scopes in the respective namespaces for functions and
 *         procedures.  Progress essentially implements a flat namespace for
 *         each of these respectively.
 *    <li> At the beginning of this method, a scope is added to the schema
 *         dictionary.  In addition, a flag is set to indicate that the
 *         parser is currently inside an internal procedure.  This flag is
 *         used during buffer creation (see {@link #def_buf_stmt}) to 
 *         determine the proper scope in which to create the buffer.  At the
 *         end of this method, the current scope is removed.
 * </ul>
 * <p>
 * This rule is a peer alternative to {@link #procedure}, {@link #class_def}
 * {@link #interface_def}, {@link #constructor}, {@link #destructor},
 * {@link #function} and other top-level blocks.
 * <p>
 * Called by {@link #single_block}.
 */
	public final void user_defined_method() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast user_defined_method_AST = null;
		Aast m_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			nestLevel++;
			sym.addScope();
			sym.addSchemaScope(true);
			boolean oldBufScope = bufferScope;
			bufferScope = false;
			inMethodDef = true;
			sym.setInMethod(true);
			boolean iface = sym.getCurrentClassDef().isInterface();
			boolean abstr = false;
			
			{
			method_stmt();
			m_AST = (Aast)returnAST;
			if (!( nestLevel == 2 ))
			  throw new SemanticException(" nestLevel == 2 ");
			
			abstr = (m_AST.getImmediateChild(KW_ABSTRACT, null) != null);
			
			{
			if (((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( !iface && !abstr )) {
				block();
				b_AST = (Aast)returnAST;
				{
				if ((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					end_stmt(true);
				}
				else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			user_defined_method_AST = (Aast)currentAST.root;
			
			// #b can be null here even when there is an empty block (just an END stmt following
			// the block_term); we will create the block node unless it is an interface or
			// abstract method since there must have at least been an empty block; without this
			// the block node is missing which would require fixups later
			Aast blk = (iface || abstr) ? null : (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST));
			user_defined_method_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(METHOD_DEF,"method definition")).add(m_AST).add(blk));
			
			user_defined_method_AST.putAnnotation("prototype", Boolean.valueOf(blk == null));
			
			// methods are always nested
			bufferScope = oldBufScope;
			inMethodDef = false;
			sym.setInMethod(false);
			
			// don't know if methods propagate, assume true for now (since
			// methods that have not return values act like internal procs
			// and those that return values act like functions, there may be
			// 2 different cases here)
			sym.deleteSchemaScope(true);
			sym.deleteScope();
			inStaticCtxt = false;
			nestLevel--;
			
			currentAST.root = user_defined_method_AST;
			currentAST.child = user_defined_method_AST!=null &&user_defined_method_AST.getFirstChild()!=null ?
				user_defined_method_AST.getFirstChild() : user_defined_method_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = user_defined_method_AST;
	}
	
/**
 * This rule creates the block structure for a function or handles the case
 * of a forward function declaration (without a block). All function 
 * definitions must start with the <code>FUNCTION</code> language statement.
 * If this is not a forward declaration (identified by the use of the
 * <code>FORWARD</code> keyword), then the <code>FUNCTION</code> statement
 * is followed by a recursive call to {@link #block} which handles
 * the ability to nest top-level statements inside a function. Finally,
 * the rule ends with an optional <code>END</code> language statement. The
 * Progress language states that it is valid to not have and <code>END</code>.
 * In this case, the function's end is implicit at the end of the file.
 * <p>
 * The most important features of this rule are:
 * <ul>
 *    <li> The use of the <code>nestLevel</code> member to track the current
 *         nesting level of the tree.  This allows us to throw an exception
 *         (using a semantic predicate) when there is any attempt to nest
 *         procedure or function definitions (which is not allowed). The
 *         semantic predicate is used here instead of using the parser
 *         structure itself (the manner in which the rules call each other)
 *         since the ability to properly nest blocks is dependent upon the
 *         structure as implemented.  Any other approach limited the nesting
 *         in a manner that was more restrictive than the Progress language
 *         itself.
 *    <li> At the beginning of this method, a scope is added to the variable
 *         dictionary (this is the only part of the symbol dictionary that
 *         is scope aware).  At the end of this method, the current scope
 *         is removed.  This allows the definition of local variables that
 *         hide variables of the same name in higher level scopes. Note that
 *         since functions and procedures cannot be nested, there is no need
 *         to use scopes in the respective namespaces for functions and
 *         procedures.  Progress essentially implements a flat namespace for
 *         each of these respectively.
 *    <li> The subrule that implements the recursive call to 
 *         <code>block</code> cannot be made optional (using ANTLR syntax)
 *         without introducing ambiguity. Instead, a trick is used to create
 *         the same result. The subrule is split into two alternatives:
 *         <ul>
 *            <li> the original call to <code>block</code> (with its optional 
 *                 <code>END</code> statement)
 *            <li> the empty alternative (no rule or token references)
 *         </ul>
 *         Most importantly, the choice between these alternatives is made 
 *         using a semantic predicate which tests the return value from
 *         the {@link #func_stmt} rule.  This return value is a boolean that
 *         is <code>true</code> only in the case where this is a forward
 *         declaration.  This approach means that forward declarations cause
 *         no block to appear in the tree, but all other types of functions
 *         properly create the block as expected.
 *    <li> At the beginning of this method, a scope is added to the schema
 *         dictionary.  In addition, a flag is set to indicate that the
 *         parser is currently inside an internal procedure.  This flag is
 *         used during buffer creation (see {@link #def_buf_stmt}) to 
 *         determine the proper scope in which to create the buffer.  At the
 *         end of this method, the current scope is removed.
 * </ul>
 * <p>
 * This rule is a peer alternative to {@link #procedure}.
 * <p>
 * Called by {@link #single_block}.
 */
	public final void function() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast function_AST = null;
		Aast f_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			boolean fwd = false;      
			nestLevel++;
			sym.addScope();
			sym.addSchemaScope(true);
			bufferScope = false;
			
			{
			fwd=func_stmt();
			f_AST = (Aast)returnAST;
			{
			if (((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( !fwd )) {
				block();
				b_AST = (Aast)returnAST;
				{
				if ((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					end_stmt(true);
				}
				else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			function_AST = (Aast)currentAST.root;
			
			// #b can be null here even when there is an empty block (just an END stmt following
			// the block_term); we will create the block node unless it is a fwd == true case
			// since there must have at least been an empty block; without this the block node is
			// missing which would require fixups later
			Aast blk = (fwd) ? null : (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST));
			
			function_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(FUNCTION,"function")).add(f_AST).add(blk)); 
			
			// internal procedure and function definitions cannot be nested in
			// each other or within themselves, so whenever this exits the
			// buffer scope can be safely set to global
			bufferScope = true;
			
			// functions propagate
			sym.deleteSchemaScope(true);
			sym.deleteScope();
			nestLevel--;
			
			currentAST.root = function_AST;
			currentAST.child = function_AST!=null &&function_AST.getFirstChild()!=null ?
				function_AST.getFirstChild() : function_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = function_AST;
	}
	
/**
 * This rule creates the block structure for a Progress 4GL nestable block. 
 * The {@link #block_list} rule is called to start the block and this is
 * followed by a recursive call to {@link #block} which handles
 * the ability to nest top-level statements inside a block. Finally,
 * the rule ends with an optional <code>END</code> language statement. The
 * Progress language states that it is valid to omit the <code>END</code>.
 * In this case, the block's end is implicit at the end of the file.
 * <p>
 * The <code>nestLevel</code> instance member is incremented at the entry to
 * this rule and decremented on exit.  This allows the proper enforcement of
 * nesting limitations (procedures and functions cannot be nested, ever).
 * <p> 
 * In front of any of these constructs is an optional user-defined label.
 * The presence of this label is matched by the following <code>COLON</code> 
 * that <b>must precede</b> the Progress 4GL language statement that starts
 * the block.  The {@link #symbol} method is used to force the user-defined
 * name to a <code>SYMBOL</code> token type.  If matched, this symbol's text
 * is added into the label namespace and the token type of the symbol is
 * set to <code>LABEL</code>.
 * <p>
 * Schema record scopes are added before calling <code>block_list</code>
 * based on lookahead.  A scope is added in the case of
 * <code>FOR, REPEAT and DO FOR</code> statements.  In the case of 
 * <code>EDITING and normal DO</code> blocks, a scope is NOT added. If a
 * scope was added, then it is removed in the exit action.  This allows the
 * proper pushing and popping of record scopes in the same way as Progress
 * implements it. <b>Note that at this time, there is only a simple imitation
 * of the implicit expansion of a record scope from one block to another.
 * This is done by the {@link #record} rule by ALWAYS promoting a table to
 * the current scope. A more complicated solution may be necessary but it is
 * not yet known how much this is actually in use.</b>
 * <p>
 * This rule also creates an artificial node in the tree as the parent to
 * all children of the block.  This node is created as a token type of 
 * <code>INNER_BLOCK</code> if this is a <code>DO, FOR or REPEAT</code>
 * block and as a <code>EDITING_BLOCK</code> if this is an editing block.
 * <p>
 * Called by {@link #single_block}.
 *
 * @param    eat
 *           If <code>true</code>, this code will consume (and drop) a
 *           following <code>DOT</code> after the <code>END</code>.
 * @param    malformed
 *           If not <code>null</code>, this is a replacement for the match
 *           on a properly formed label but due to limits of branch prediction
 *           it had to be handled in the caller rather than here.
 */
	public final void inner_block(
		boolean eat, Aast malformed
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast inner_block_AST = null;
		Aast s_AST = null;
		Aast l_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			// procedures and functions CAN be defined inside inner blocks
			// so nestLevel should not be incremented here!
			
			boolean labeled  = false;
			boolean delScope = false;
			
			// the optional symbol section below will never trigger if this
			// is non-null so we don't have to disambiguate there
			if (malformed != null)
			{
			s_AST = malformed;
			}
			
			sym.addInnerBlockScope();
			
			{
			{
			if ((_tokenSet_15.member(LA(1)))) {
				symbol();
				s_AST = (Aast)returnAST;
				colon();
			}
			else if ((_tokenSet_23.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			if (s_AST != null)
			{
			s_AST.setType(LABEL_DEF);
			sym.addLabel(s_AST.getText(), LABEL);
			labeled = true;
			}
			
			// this code must always process next (before block_list is
			// called)
			if ( (LA(1) == KW_FOR) || (LA(1) == KW_REPEAT) || 
			(LA(1) == KW_DO   &&  LA(2) == KW_FOR) )
			{
			delScope = true;
			sym.addSchemaScope(false);
			}
			
			block_list();
			l_AST = (Aast)returnAST;
			block();
			b_AST = (Aast)returnAST;
			{
			if ((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				end_stmt(eat);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			inner_block_AST = (Aast)currentAST.root;
			
			sym.deleteInnerBlockScope();
			
			int    ttype = INNER_BLOCK;
			String ttxt  = "inner block";
			
			if (l_AST.getType() == KW_EDITING)
			{
			ttype = EDITING_BLOCK;
			ttxt  = "editing block";
			}
			
			inner_block_AST = (Aast)astFactory.make( (new ASTArray(4)).add((Aast)astFactory.create(ttype,ttxt)).add(s_AST).add(l_AST).add((Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST))));
			
			// inner blocks propagate
			if (delScope)
			sym.deleteSchemaScope(true);
			
			if (labeled)
			sym.deleteLabel();
			
			// procedures and functions CAN be defined inside inner blocks
			// so nestLevel should not be decremented here!
			
			currentAST.root = inner_block_AST;
			currentAST.child = inner_block_AST!=null &&inner_block_AST.getFirstChild()!=null ?
				inner_block_AST.getFirstChild() : inner_block_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = inner_block_AST;
	}
	
/**
 * Undocumented syntax found in working code that is ignored in Progress.  Match a DOT followed
 * by text with no intervening whitespace, then any amount of whitespace, text, numbers and
 * ended by a terminating DOT.  All of the matched tokens will be dropped.
 * <p>
 * The rules:
 * <p>
 * <ol>
 *    <li> must start with a DOT
 *    <li> must have a valid character immediately following the leading DOT without any
 *         intervening whitespace
 *    <li> valid characters are anything EXCEPT numbers, open curly braces, single, or double
 *         quote chars
 *    <li> after that any whitespace (inluding newlines), numbers or other text is matched
 *         until a following DOT
 *    <li> inclusion of unescaped single or double quote characters anywhere does not work
 *         properly but it doesn't cause an error (more testing will be needed to see how
 *         it responds)
 *    <li> unescaped opening curly braces cannot be embedded
 *    <li> can be at the beginning, middle or end of any line in the file, but must NOT be
 *         inside a statement or expression
 *    <li> this construct CANNOT be started by the ternminating DOT of a statement, it must
 *         stand on its own
 * </ol>
 * <p>
 * For example:
 * <p>
 * <pre>
 * .t  y757565gfhvbm hgj lk hkudu09sd
 * 
 * .
 * .?/.,&gt;&lt;;:~`\|][}&amp;=+-_)(*^%@!$#.
 * ./.
 * ..FDFDFD.
 * .......
 * .SDSD....SDSD.
 * .a......
 * ..dd..ddd   ...
 * .,.
 * .&gt;.
 * .&lt;.
 * .;.
 * .:.
 * .~.
 * .`.
 * .\.
 * .|.
 * .].
 * .[.
 * .}.
 * .=.
 * .+.
 * .-.
 * ._.
 * .).
 * .(.
 * .*.
 * .&amp;.
 * .^.
 * .%.
 * .@.
 * .!.
 * .$.
 * .#.
 * .~".
 * .~{.
 * .~'.
 * .s89s.
 * .hdhdhdgsgdhfdjfj.
 * .w.
 * .l87676.
 * </pre>
 */
	public final void crap_to_ignore() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast crap_to_ignore_AST = null;
		
		try {      // for error handling
			Aast tmp35_AST = null;
			tmp35_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp35_AST);
			match(DOT);
			{
			_loop37:
			do {
				if (((LA(1)==DOT) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == DOT && !followedByWhitespace(LT(1)) )) {
					Aast tmp36_AST = null;
					tmp36_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp36_AST);
					match(DOT);
				}
				else if (((LA(1) >= FILEROOT && LA(1) <= JUNK))) {
					Aast tmp37_AST = null;
					tmp37_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp37_AST);
					matchNot(DOT);
				}
				else {
					break _loop37;
				}
				
			} while (true);
			}
			Aast tmp38_AST = null;
			tmp38_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp38_AST);
			match(DOT);
			crap_to_ignore_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = crap_to_ignore_AST;
	}
	
/**
 * Matches both forms of an assignment statement (explicit assignment to 
 * an <code>lvalue</code> and the alternate implicit discard of the
 * expression's return value).  More specifically, these two forms:
 * <ul>
 *    <li> any <code>lvalue</code> followed by an <code>EQUALS</code> token
 *         and an expression (this is the traditional concept of an
 *         assignment - one which stores the expression result in a variable
 *         or field)
 *    <li> any valid expression that stands on its own, with no 
 *         <code>lvalue</code> and no <code>EQUALS</code> operator (this
 *         is necessary to allow one to execute an arbitrary function and
 *         discard the result while any side effects of the function still
 *         occur)
 * </ul>
 * <p>
 * Note that the second form is a bit odd compared to most languages since
 * it is legal (though useless) to specify a standalone non-assignment
 * expression that is not a function call (whose return value is discarded
 * but which may have side effects that are useful).  An example of a useless
 * expression is a string token followed by a <code>DOT</code>.  This is a
 * valid expression and the Progress compiler and interpreter do not complain,
 * however there are no side effects that have any useful benefits.  The 
 * Progress environment is tolerant of these useless expressions.
 * <p>
 * When the first form is encountered, the <code>EQUALS</code> token type is
 * rewritten as an <code>ASSIGN</code> token type.  Saving this context is 
 * key to subsequent evaluation of an expression since the parser already
 * has determined the exact operation to be processed (otherwise there would
 * be ambiguity left behind in the resulting expression tree).
 * <p>
 * This rule is called from the top level {@link #single_block} and calls the
 * {@link #lvalue} and {@link #expr} rules as needed.  It also creates an
 * artificial tree node (of the <code>ASSIGNMENT</code> token type) to
 * contain the resulting tree.
 * <p>
 * Note that ANTLR reports ambiguity between this rule and the {@link #assign}
 * rule.  The ambiguity is resolved by the ordering of the top level rule
 * placing the <code>ASSIGN</code> language statement (which is unambiguous)
 * with higher precedence than the <code>assignment</code> rule. As long as
 * the <code>assign</code> rule is only used by the <code>assign_stmt</code>
 * rule, there is no real ambiguity.  For this reason, ambiguity warnings
 * are suppressed for this rule.
 * <p>
 * ANTLR detects ambiguity between this rule and <code>expr</code> because of 
 * the optional <code>lvalue</code> and <code>EQUALS</code> which conflict
 * with lookahead choices for <code>expr</code>.  What makes this OK is the
 * fact that there is an implicit precedence in choosing <code>EQUALS</code>
 * as an assignment operator over the equivalence operator. This makes the
 * ambiguity resolve naturally.  For this reason, ambiguity warnings
 * are suppressed for this rule.
 * <p>
 * This rule really needs a syntactic predicate (but we can't use these, see
 * the class overview for details) to work in all cases.  The problem is
 * that it inherently relies upon lookahead (of whether there is an 
 * <code>EQUALS</code> token in the 2nd position) to disambiguate between
 * the optional <code>lvalue</code> + <code>EQUALS</code> AND a standalone  
 * expression.  In practice, this works fine for the vast majority of cases,
 * but it breaks down in the following cases:
 * <p>
 * <ul>
 *    <li> <b>an <code>lvalue</code> with &gt; 1 token is standalone on a 
 *        line</b> (e.g. <code>i[8].</code> which is 4 tokens plus the
 *        terminating <code>DOT</code>) --&gt; note that as long as there
 *        actually IS an assignment on the right side of a complex 
 *        (multi-token) <code>lvalue</code>, there would not be a problem!
 *    <li> <b>an <code>lvalue</code> based expression is used (no assignment) 
 *         </b> (e.g. <code>queryHandle:prepare(someThing).</code> which is 6
 *         tokens plus the terminating <code>DOT</code> OR even simpler is 
 *         <code>queryHandle:query-open.</code> which is only 3 tokens and
 *         a terminating <code>DOT</code>)
 *    <li> language statements that look like functions (and often have
 *         functions with matching names!) but act like lvalues (see
 *         {@link #assign_type_syntax_stmt_list} which is called indirectly
 *         via the <code>lvalue</code> rule)
 * </ul>
 * <p>
 * All of these cases are resolved by matching the in the <code>lvalue</code>
 * rule and instrumenting the following <code>EQUALS</code> to be bypassed 
 * if a <code>DOT or NO-ERROR</code> are encountered.  This would mean that 
 * there is no following expression to match so in this case, the expression 
 * is bypassed too.
 * <p>
 * This approach also requires that the preceding <code>lvalue</code> be
 * bypassed if a left parenthesis is found in the second token position
 * (otherwise the <code>lvalue</code> would match the symbol in a function
 * call but then it would bomb out at the parenthesis.  <b>An exception to
 * this 'parenthesis avoidance' approach is made for those language statements
 * that look like function calls but act like lvalues.  An explicit test for
 * this situation bypasses the normal parenthesis avoidance mechanism.</b>
 * <p>
 * Another problem is disambiguation of the case where the <code>lvalue</code>
 * is followed by an operator (that is not EQUALS).  The ANTLR lookahead does
 * not naturally disambiguate this case, so an extra test for operators is
 * done, to avoid the assignment path in this case.  The result is usually a
 * useless expression whose evaluated result is discarded, but it is valid.
 * <p>
 * To implement all of this multiple disambiguating semantic predicates had
 * to be carefully inserted, empty alternatives (sometimes triggering 
 * associated actions) were added and the tree building was modified.
 * All-in-all this was a truly nasty solution.
 */
	public final void assignment() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast assignment_AST = null;
		Token  rv = null;
		Aast rv_AST = null;
		Aast e_AST = null;
		Token  k = null;
		Aast k_AST = null;
		
		try {      // for error handling
			
			boolean lstmt = false;
			matchAssign = true;
			
			if (isLstmt(LA(1)) && LA(2) == LPARENS)
			{
			lstmt = true;
			}
			
			// check for a 2nd token which is a binary operator following
			// an lvalue; such a case is not an assignment and must flow down
			// the standalone expression path (warning: EQUALS is deliberately
			// excluded from this test since the precedence must be given to
			// the EQUALS token that will be considered an ASSIGN operator)
			if (isBinaryOp(LA(2)) || LA(1) == LPARENS)
			{
			matchAssign = false;
			}
			
			{
			if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				{
				if ((LA(1)==KW_NO_RET_V) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					rv = LT(1);
					rv_AST = (Aast)astFactory.create(rv);
					match(KW_NO_RET_V);
					
					matchAssign = false;
					
				}
				else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				expr();
				e_AST = (Aast)returnAST;
			}
			else if ((LA(1)==DOT||LA(1)==KW_NO_ERROR) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				k = LT(1);
				k_AST = (Aast)astFactory.create(k);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			assignment_AST = (Aast)currentAST.root;
			
			if (lstmt)
			{
			assignment_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(STATEMENT,"statement")).add(e_AST).add(k_AST));
			}
			else
			{
			assignment_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(ASSIGNMENT,"assignment")).add(e_AST).add(k_AST));
			}
			skipExpression = false;
			matchAssign = false;
			
			currentAST.root = assignment_AST;
			currentAST.child = assignment_AST!=null &&assignment_AST.getFirstChild()!=null ?
				assignment_AST.getFirstChild() : assignment_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = assignment_AST;
	}
	
/**
 * This rule creates an artificial tree node for any non-block language
 * statement (these are language statements that do not start or end
 * blocks).  The real work is delegated to {@link #stmt_list}.  
 * <p>
 * The only real work this rule does is create the tree node in a standard
 * manner.  The resulting language statement's subtree is a child of the
 * standard, artificial <code>STATEMENT</code> token type node except in
 * the case of embedded SQL where the node type of <code>EMBEDDED_SQL</code>
 * will be at the root.
 * <p>
 * Any statement that generates a <code>null</code> return AST (the only
 * one is {@link #empty_stmt} at this time), will bypass the creation of
 * the artificial <code>STATEMENT</code> root node.
 * <p>
 * Called by {@link #single_block}.
 */
	public final void statement() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast statement_AST = null;
		Aast s_AST = null;
		
		try {      // for error handling
			{
			stmt_list();
			s_AST = (Aast)returnAST;
			}
			statement_AST = (Aast)currentAST.root;
			
			if (s_AST == null)
			{
			// the empty statement can generate a null return AST
			statement_AST = null;
			}
			else if (s_AST.getType() == EMBEDDED_SQL)
			{
			// don't root this at a STATEMENT node
			statement_AST = s_AST;
			}
			else
			{
			// otherwise root everything at an artificial node
			statement_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(STATEMENT,"statement")).add(s_AST));
			}
			
			currentAST.root = statement_AST;
			currentAST.child = statement_AST!=null &&statement_AST.getFirstChild()!=null ?
				statement_AST.getFirstChild() : statement_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = statement_AST;
	}
	
/**
 * Undocumented syntax found in working code that appears to be ignored in Progress.  Match the
 * text and anything else until a final DOT is reached.
 * <p>
 * All legacy annotations are emitted as ANNOTATION ASTs - the conversion rules will decide to 
 * keep them (if they are associated with a service, for example) or to discard them.
 */
	public final void oea_annotations() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast oea_annotations_AST = null;
		
		try {      // for error handling
			oea_annotation();
			astFactory.addASTChild(currentAST, returnAST);
			match(DOT);
			oea_annotations_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = oea_annotations_AST;
	}
	
/**
 * Matches the syntax of a legacy annotation.  An enhancement is supported, where an attribute can
 * have an array initializer (via the 4GL-style brackets), with other annotations as values.
 */
	public final void oea_annotation() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast oea_annotation_AST = null;
		Token  a = null;
		Aast a_AST = null;
		Aast s_AST = null;
		
		try {      // for error handling
			a = LT(1);
			a_AST = (Aast)astFactory.create(a);
			astFactory.makeASTRoot(currentAST, a_AST);
			match(AT);
			any_symbol_at_all();
			astFactory.addASTChild(currentAST, returnAST);
			
			saveAndReplaceType(a_AST, ANNOTATION);
			
			{
			if ((_tokenSet_1.member(LA(1)))) {
				any_symbol_at_all();
				s_AST = (Aast)returnAST;
				hide(s_AST);
			}
			else if ((_tokenSet_25.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case LPARENS:
			{
				lparens();
				astFactory.addASTChild(currentAST, returnAST);
				{
				if ((_tokenSet_1.member(LA(1)))) {
					oea_annotation_arg();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==COMMA||LA(1)==RPARENS)) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				{
				_loop28:
				do {
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						oea_annotation_arg();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop28;
					}
					
				} while (true);
				}
				rparens();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case RBRACKET:
			case COMMA:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			oea_annotation_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_26);
		}
		returnAST = oea_annotation_AST;
	}
	
/**
 * Matches a {@link #reserved_or_symbol}, a <code>DB_SYMBOL</code>,
 * <code>BOOL_TRUE</code>, <code>BOOL_FALSE</code> or a<code>FILENAME</code>
 * and always returns a <code>SYMBOL</code> node.
 */
	public final void any_symbol_at_all() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast any_symbol_at_all_AST = null;
		Token  y = null;
		Aast y_AST = null;
		Token  n = null;
		Aast n_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  f = null;
		Aast f_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case BOOL_TRUE:
			{
				y = LT(1);
				y_AST = (Aast)astFactory.create(y);
				astFactory.addASTChild(currentAST, y_AST);
				match(BOOL_TRUE);
				y_AST.setType(SYMBOL);
				break;
			}
			case BOOL_FALSE:
			{
				n = LT(1);
				n_AST = (Aast)astFactory.create(n);
				astFactory.addASTChild(currentAST, n_AST);
				match(BOOL_FALSE);
				n_AST.setType(SYMBOL);
				break;
			}
			case DB_SYMBOL:
			{
				d = LT(1);
				d_AST = (Aast)astFactory.create(d);
				astFactory.addASTChild(currentAST, d_AST);
				match(DB_SYMBOL);
				d_AST.setType(SYMBOL);
				break;
			}
			case FILENAME:
			{
				f = LT(1);
				f_AST = (Aast)astFactory.create(f);
				astFactory.addASTChild(currentAST, f_AST);
				match(FILENAME);
				f_AST.setType(SYMBOL);
				break;
			}
			default:
				if ((_tokenSet_27.member(LA(1)))) {
					reserved_or_symbol();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			any_symbol_at_all_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = any_symbol_at_all_AST;
	}
	
/**
 * Matches the <code>LPARENS</code> token. This drops the node from the tree while
 * patching the token into the hidden token stream.
 */
	public final void lparens() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast lparens_AST = null;
		Token  l = null;
		Aast l_AST = null;
		
		try {      // for error handling
			l = LT(1);
			l_AST = (Aast)astFactory.create(l);
			match(LPARENS);
			hide(l);
			lparens_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_28);
		}
		returnAST = lparens_AST;
	}
	
/**
 * Matches an annotation argument, via a 'attribute=val' pair or 'attribute=[@Anno1, @Anno2, ..]'.
 */
	public final void oea_annotation_arg() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast oea_annotation_arg_AST = null;
		Token  eq = null;
		Aast eq_AST = null;
		
		try {      // for error handling
			any_symbol_at_all();
			astFactory.addASTChild(currentAST, returnAST);
			eq = LT(1);
			eq_AST = (Aast)astFactory.create(eq);
			astFactory.makeASTRoot(currentAST, eq_AST);
			match(EQUALS);
			{
			switch ( LA(1)) {
			case BOOL_TRUE:
			case BOOL_FALSE:
			case DEC_LITERAL:
			case DATE_LITERAL:
			case DATETIME_LITERAL:
			case DATETIME_TZ_LITERAL:
			case HEX_LITERAL:
			case UNQUOTED_TEXT:
			case KW_B_ENDIAN:
			case KW_DLL_C_T:
			case KW_EXC_LOCK:
			case KW_FIND_CS:
			case KW_FIND_GLO:
			case KW_FIND_NO:
			case KW_FIND_PO:
			case KW_FIND_SEL:
			case KW_FIND_WA:
			case KW_FUNC_C_T:
			case KW_GET_A_CT:
			case KW_HOST_B_O:
			case KW_L_ENDIAN:
			case KW_NO_LOCK:
			case KW_NO_WAIT:
			case KW_PROC_C_T:
			case KW_READ_AVL:
			case KW_READ_E_N:
			case KW_ROW_CRTD:
			case KW_ROW_DELD:
			case KW_ROW_MODD:
			case KW_ROW_UMOD:
			case KW_SAX_COMP:
			case KW_SAX_PARE:
			case KW_SAX_RUNN:
			case KW_SAX_UNIN:
			case KW_SAX_WBEG:
			case KW_SAX_WCOM:
			case KW_SAX_WCON:
			case KW_SAX_WELM:
			case KW_SAX_WERR:
			case KW_SAX_WIDL:
			case KW_SAX_WTAG:
			case KW_SEAR_SLF:
			case KW_SEAR_TRG:
			case KW_SET_A_CT:
			case KW_SH_LOCK:
			case KW_WIN_DMIN:
			case KW_WIN_MAX:
			case KW_WIN_MIN:
			case KW_WIN_NORM:
			case STRING:
			case UNKNOWN_VAL:
			case NUM_LITERAL:
			{
				literal();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case LBRACKET:
			{
				oea_annotation_array();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			
			saveAndReplaceType(eq_AST, ASSIGN);
			
			oea_annotation_arg_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_29);
		}
		returnAST = oea_annotation_arg_AST;
	}
	
/**
 * Matches <code>COMMA</code> token. This drops the node from the tree while
 * patching the token into the hidden token stream.
 */
	public final void comma() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast comma_AST = null;
		Token  c = null;
		Aast c_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			match(COMMA);
			hide(c);
			comma_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_28);
		}
		returnAST = comma_AST;
	}
	
/**
 * Matches the <code>RPARENS</code> token. This drops the node from the tree while
 * patching the token into the hidden token stream.
 */
	public final void rparens() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast rparens_AST = null;
		Token  r = null;
		Aast r_AST = null;
		
		try {      // for error handling
			r = LT(1);
			r_AST = (Aast)astFactory.create(r);
			match(RPARENS);
			hide(r);
			rparens_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = rparens_AST;
	}
	
/**  
 * Matches all variations of Progress literals (constants).  This includes:
 * <pre>
 *    NUM_LITERAL
 *    HEX_LITERAL
 *    DEC_LITERAL
 *    STRING
 *    BOOL_TRUE
 *    BOOL_FALSE 
 *    DATE_LITERAL
 *    DATETIME_LITERAL
 *    DATETIME_TZ_LITERAL
 *    UNKNOWN_VAL
 *    KW_FIND_NO  (compiler constant == 1)
 *    KW_FIND_PO  (compiler constant == 2)
 *    KW_FIND_CS  (compiler constant == 4)
 *    KW_FIND_GLO (compiler constant == 8)
 *    KW_FIND_WA  (compiler constant == 16)
 *    KW_FIND_SEL (compiler constant == 32)
 *    KW_READ_AVL (compiler constant == 1)
 *    KW_READ_E_N (compiler constant == 2)
 *    KW_ROW_UMOD (ROW-STATE value, compiler constant == 0)
 *    KW_ROW_DELD (ROW-STATE value, compiler constant == 1)
 *    KW_ROW_MODD (ROW-STATE value, compiler constant == 2)
 *    KW_ROW_CRTD (ROW-STATE value, compiler constant == 3)
 *    KW_SAX_COMP (compiler constant == 3)
 *    KW_SAX_PARE (compiler constant == 4)
 *    KW_SAX_RUNN (compiler constant == 2)
 *    KW_SAX_UNIN (compiler constant == 1)
 *    KW_SAX_WBEG (compiler constant == 2)
 *    KW_SAX_WCOM (compiler constant == 6)
 *    KW_SAX_WCON (compiler constant == 5)
 *    KW_SAX_WELM (compiler constant == 4)
 *    KW_SAX_WERR (compiler constant == 7)
 *    KW_SAX_WIDL (compiler constant == 1)
 *    KW_SAX_WTAG (compiler constant == 3)
 *    KW_WIN_DMIN (undocumented keyword which is a compiler constant == 4)
 *    KW_WIN_MAX (compiler constant == 1)
 *    KW_WIN_MIN (compiler constant == 2)
 *    KW_WIN_NORM (compiler constant == 3)
 *    KW_SEAR_SLF (SEARCH-SELF mode for the add-super-procedure() parameter, compiler constant == 1)
 *    KW_SEAR_TRG (SEARCH-TARGET mode for the add-super-procedure() parameter, compiler constant == 2)
 *    KW_HOST_B_O (compiler constant == 1)
 *    KW_B_ENDIAN (compiler constant == 2)
 *    KW_L_ENDIAN (compiler constant == 3)
 * </pre>
 * <p>
 * Note that the documentation states that there is no such thing as a date
 * constant in Progress 4GL, however experience shows that this is not true.
 * <p>
 * There are no literal representations for RECID, ROWID or HANDLE data
 * types since these are internal data structures of the Progress language.
 * One can only obtain an instance of such a value from Progress itself so
 * there is no way to hard-code such a reference as a constant.
 * <p>
 * There is no literal representation for RAW data type.
 * <p>
 * Certain upstream usage of expressions (see {@link #form_item}) enable a
 * special mode of parsing where 2 or more unquoted '-' or '+' characters
 * are matched as a string literal. Note that the characters cannot be
 * intermixed without intervening whitespace and no other non-alphanumeric
 * characters on the U.S. keyboard have this same behavior. 
 */
	public final void literal() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast literal_AST = null;
		Token  n = null;
		Aast n_AST = null;
		Token  h = null;
		Aast h_AST = null;
		Token  nl = null;
		Aast nl_AST = null;
		Token  sl = null;
		Aast sl_AST = null;
		Token  el = null;
		Aast el_AST = null;
		Token  nw = null;
		Aast nw_AST = null;
		Token  ra = null;
		Aast ra_AST = null;
		Token  re = null;
		Aast re_AST = null;
		Token  t1 = null;
		Aast t1_AST = null;
		Token  t2 = null;
		Aast t2_AST = null;
		Token  t3 = null;
		Aast t3_AST = null;
		Token  t4 = null;
		Aast t4_AST = null;
		Token  t5 = null;
		Aast t5_AST = null;
		Token  ss = null;
		Aast ss_AST = null;
		Token  st = null;
		Aast st_AST = null;
		Token  ut = null;
		Aast ut_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case NUM_LITERAL:
			{
				n = LT(1);
				n_AST = (Aast)astFactory.create(n);
				astFactory.addASTChild(currentAST, n_AST);
				match(NUM_LITERAL);
				sym.annotateNumericLiteral(n_AST);
				break;
			}
			case DEC_LITERAL:
			{
				Aast tmp40_AST = null;
				tmp40_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp40_AST);
				match(DEC_LITERAL);
				break;
			}
			case HEX_LITERAL:
			{
				h = LT(1);
				h_AST = (Aast)astFactory.create(h);
				astFactory.addASTChild(currentAST, h_AST);
				match(HEX_LITERAL);
				sym.annotateNumericLiteral(h_AST);
				break;
			}
			case STRING:
			{
				Aast tmp41_AST = null;
				tmp41_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp41_AST);
				match(STRING);
				break;
			}
			case BOOL_TRUE:
			{
				Aast tmp42_AST = null;
				tmp42_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp42_AST);
				match(BOOL_TRUE);
				break;
			}
			case BOOL_FALSE:
			{
				Aast tmp43_AST = null;
				tmp43_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp43_AST);
				match(BOOL_FALSE);
				break;
			}
			case DATE_LITERAL:
			{
				Aast tmp44_AST = null;
				tmp44_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp44_AST);
				match(DATE_LITERAL);
				break;
			}
			case DATETIME_LITERAL:
			{
				Aast tmp45_AST = null;
				tmp45_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp45_AST);
				match(DATETIME_LITERAL);
				break;
			}
			case DATETIME_TZ_LITERAL:
			{
				Aast tmp46_AST = null;
				tmp46_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp46_AST);
				match(DATETIME_TZ_LITERAL);
				break;
			}
			case UNKNOWN_VAL:
			{
				Aast tmp47_AST = null;
				tmp47_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp47_AST);
				match(UNKNOWN_VAL);
				break;
			}
			case KW_NO_LOCK:
			{
				nl = LT(1);
				nl_AST = (Aast)astFactory.create(nl);
				astFactory.addASTChild(currentAST, nl_AST);
				match(KW_NO_LOCK);
				nl_AST.setType(NO_LOCK_LITERAL);
				break;
			}
			case KW_SH_LOCK:
			{
				sl = LT(1);
				sl_AST = (Aast)astFactory.create(sl);
				astFactory.addASTChild(currentAST, sl_AST);
				match(KW_SH_LOCK);
				sl_AST.setType(SHARE_LOCK_LITERAL);
				break;
			}
			case KW_EXC_LOCK:
			{
				el = LT(1);
				el_AST = (Aast)astFactory.create(el);
				astFactory.addASTChild(currentAST, el_AST);
				match(KW_EXC_LOCK);
				el_AST.setType(EXCLUSIVE_LOCK_LITERAL);
				break;
			}
			case KW_NO_WAIT:
			{
				nw = LT(1);
				nw_AST = (Aast)astFactory.create(nw);
				astFactory.addASTChild(currentAST, nw_AST);
				match(KW_NO_WAIT);
				nw_AST.setType(NO_WAIT_LITERAL);
				break;
			}
			case KW_READ_AVL:
			{
				ra = LT(1);
				ra_AST = (Aast)astFactory.create(ra);
				astFactory.addASTChild(currentAST, ra_AST);
				match(KW_READ_AVL);
				ra_AST.setType(READ_AVAILABLE_LITERAL);
				break;
			}
			case KW_READ_E_N:
			{
				re = LT(1);
				re_AST = (Aast)astFactory.create(re);
				astFactory.addASTChild(currentAST, re_AST);
				match(KW_READ_E_N);
				re_AST.setType(READ_EXACT_NUM_LITERAL);
				break;
			}
			case KW_PROC_C_T:
			{
				t1 = LT(1);
				t1_AST = (Aast)astFactory.create(t1);
				astFactory.addASTChild(currentAST, t1_AST);
				match(KW_PROC_C_T);
				t1_AST.setType(PROC_CALL_TYPE_LITERAL);
				break;
			}
			case KW_FUNC_C_T:
			{
				t2 = LT(1);
				t2_AST = (Aast)astFactory.create(t2);
				astFactory.addASTChild(currentAST, t2_AST);
				match(KW_FUNC_C_T);
				t2_AST.setType(FUNC_CALL_TYPE_LITERAL);
				break;
			}
			case KW_GET_A_CT:
			{
				t3 = LT(1);
				t3_AST = (Aast)astFactory.create(t3);
				astFactory.addASTChild(currentAST, t3_AST);
				match(KW_GET_A_CT);
				t3_AST.setType(GET_ATTR_CTYPE_LITERAL);
				break;
			}
			case KW_SET_A_CT:
			{
				t4 = LT(1);
				t4_AST = (Aast)astFactory.create(t4);
				astFactory.addASTChild(currentAST, t4_AST);
				match(KW_SET_A_CT);
				t4_AST.setType(SET_ATTR_CTYPE_LITERAL);
				break;
			}
			case KW_DLL_C_T:
			{
				t5 = LT(1);
				t5_AST = (Aast)astFactory.create(t5);
				astFactory.addASTChild(currentAST, t5_AST);
				match(KW_DLL_C_T);
				t5_AST.setType(DLL_CALL_TYPE_LITERAL);
				break;
			}
			case KW_FIND_NO:
			{
				Aast tmp48_AST = null;
				tmp48_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp48_AST);
				match(KW_FIND_NO);
				break;
			}
			case KW_FIND_SEL:
			{
				Aast tmp49_AST = null;
				tmp49_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp49_AST);
				match(KW_FIND_SEL);
				break;
			}
			case KW_FIND_PO:
			{
				Aast tmp50_AST = null;
				tmp50_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp50_AST);
				match(KW_FIND_PO);
				break;
			}
			case KW_FIND_CS:
			{
				Aast tmp51_AST = null;
				tmp51_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp51_AST);
				match(KW_FIND_CS);
				break;
			}
			case KW_FIND_GLO:
			{
				Aast tmp52_AST = null;
				tmp52_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp52_AST);
				match(KW_FIND_GLO);
				break;
			}
			case KW_FIND_WA:
			{
				Aast tmp53_AST = null;
				tmp53_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp53_AST);
				match(KW_FIND_WA);
				break;
			}
			case KW_ROW_UMOD:
			{
				Aast tmp54_AST = null;
				tmp54_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp54_AST);
				match(KW_ROW_UMOD);
				break;
			}
			case KW_ROW_DELD:
			{
				Aast tmp55_AST = null;
				tmp55_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp55_AST);
				match(KW_ROW_DELD);
				break;
			}
			case KW_ROW_MODD:
			{
				Aast tmp56_AST = null;
				tmp56_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp56_AST);
				match(KW_ROW_MODD);
				break;
			}
			case KW_ROW_CRTD:
			{
				Aast tmp57_AST = null;
				tmp57_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp57_AST);
				match(KW_ROW_CRTD);
				break;
			}
			case KW_SAX_COMP:
			{
				Aast tmp58_AST = null;
				tmp58_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp58_AST);
				match(KW_SAX_COMP);
				break;
			}
			case KW_SAX_PARE:
			{
				Aast tmp59_AST = null;
				tmp59_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp59_AST);
				match(KW_SAX_PARE);
				break;
			}
			case KW_SAX_RUNN:
			{
				Aast tmp60_AST = null;
				tmp60_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp60_AST);
				match(KW_SAX_RUNN);
				break;
			}
			case KW_SAX_UNIN:
			{
				Aast tmp61_AST = null;
				tmp61_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp61_AST);
				match(KW_SAX_UNIN);
				break;
			}
			case KW_SAX_WBEG:
			{
				Aast tmp62_AST = null;
				tmp62_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp62_AST);
				match(KW_SAX_WBEG);
				break;
			}
			case KW_SAX_WCOM:
			{
				Aast tmp63_AST = null;
				tmp63_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp63_AST);
				match(KW_SAX_WCOM);
				break;
			}
			case KW_SAX_WCON:
			{
				Aast tmp64_AST = null;
				tmp64_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp64_AST);
				match(KW_SAX_WCON);
				break;
			}
			case KW_SAX_WELM:
			{
				Aast tmp65_AST = null;
				tmp65_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp65_AST);
				match(KW_SAX_WELM);
				break;
			}
			case KW_SAX_WERR:
			{
				Aast tmp66_AST = null;
				tmp66_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp66_AST);
				match(KW_SAX_WERR);
				break;
			}
			case KW_SAX_WIDL:
			{
				Aast tmp67_AST = null;
				tmp67_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp67_AST);
				match(KW_SAX_WIDL);
				break;
			}
			case KW_SAX_WTAG:
			{
				Aast tmp68_AST = null;
				tmp68_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp68_AST);
				match(KW_SAX_WTAG);
				break;
			}
			case KW_WIN_DMIN:
			{
				Aast tmp69_AST = null;
				tmp69_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp69_AST);
				match(KW_WIN_DMIN);
				break;
			}
			case KW_WIN_MAX:
			{
				Aast tmp70_AST = null;
				tmp70_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp70_AST);
				match(KW_WIN_MAX);
				break;
			}
			case KW_WIN_MIN:
			{
				Aast tmp71_AST = null;
				tmp71_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp71_AST);
				match(KW_WIN_MIN);
				break;
			}
			case KW_WIN_NORM:
			{
				Aast tmp72_AST = null;
				tmp72_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp72_AST);
				match(KW_WIN_NORM);
				break;
			}
			case KW_SEAR_SLF:
			{
				ss = LT(1);
				ss_AST = (Aast)astFactory.create(ss);
				astFactory.addASTChild(currentAST, ss_AST);
				match(KW_SEAR_SLF);
				ss_AST.setType(SEARCH_SELF_LITERAL);
				break;
			}
			case KW_SEAR_TRG:
			{
				st = LT(1);
				st_AST = (Aast)astFactory.create(st);
				astFactory.addASTChild(currentAST, st_AST);
				match(KW_SEAR_TRG);
				st_AST.setType(SEARCH_TARGET_LITERAL);
				break;
			}
			case KW_HOST_B_O:
			{
				Aast tmp73_AST = null;
				tmp73_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp73_AST);
				match(KW_HOST_B_O);
				break;
			}
			case KW_B_ENDIAN:
			{
				Aast tmp74_AST = null;
				tmp74_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp74_AST);
				match(KW_B_ENDIAN);
				break;
			}
			case KW_L_ENDIAN:
			{
				Aast tmp75_AST = null;
				tmp75_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp75_AST);
				match(KW_L_ENDIAN);
				break;
			}
			default:
				if (((LA(1)==UNQUOTED_TEXT))&&( allowStringMatch )) {
					ut = LT(1);
					ut_AST = (Aast)astFactory.create(ut);
					astFactory.addASTChild(currentAST, ut_AST);
					match(UNQUOTED_TEXT);
					
					saveAndReplaceTypeAndText(ut_AST, STRING, "'" + ut_AST.getText() + "'");
					
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			literal_AST = (Aast)currentAST.root;
			
			literal_AST.putAnnotation("is-literal", Boolean.valueOf(true));
			
			literal_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = literal_AST;
	}
	
/**
 * Matches a 4GL-style array initializer with other legacy annotations definitions.
 */
	public final void oea_annotation_array() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast oea_annotation_array_AST = null;
		Token  r = null;
		Aast r_AST = null;
		
		try {      // for error handling
			Aast tmp76_AST = null;
			tmp76_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp76_AST);
			match(LBRACKET);
			{
			switch ( LA(1)) {
			case AT:
			{
				oea_annotation();
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop34:
				do {
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						oea_annotation();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop34;
					}
					
				} while (true);
				}
				break;
			}
			case RBRACKET:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			r = LT(1);
			r_AST = (Aast)astFactory.create(r);
			match(RBRACKET);
			hide(r);
			oea_annotation_array_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_29);
		}
		returnAST = oea_annotation_array_AST;
	}
	
/**
 * Matches the <code>DOT</code> statement terminator. This drops the node from the tree while
 * patching the token into the hidden token stream.
 */
	public final void stmt_term() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast stmt_term_AST = null;
		Token  d = null;
		Aast d_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			match(DOT);
			hide(d);
			stmt_term_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = stmt_term_AST;
	}
	
/**
 * Matches the <code>DOT</code> or <code>COLON</code> block terminator. This drops the node from
 * the tree while patching the token into the hidden token stream.
 */
	public final void block_term() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast block_term_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  c = null;
		Aast c_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case DOT:
			{
				d = LT(1);
				d_AST = (Aast)astFactory.create(d);
				match(DOT);
				break;
			}
			case COLON:
			{
				c = LT(1);
				c_AST = (Aast)astFactory.create(c);
				match(COLON);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			hide(d != null ? d : c);
			block_term_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = block_term_AST;
	}
	
/**
 * Matches the <code>COLON</code> token. This drops the node from the tree while
 * patching the token into the hidden token stream.
 */
	public final void colon() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast colon_AST = null;
		Token  c = null;
		Aast c_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			match(COLON);
			hide(c);
			colon_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = colon_AST;
	}
	
/**
 * Implements the structure of a <code>PROCEDURE</code> block definition
 * which is the manner in which Progress implements a form of subroutine. 
 * <p>
 * The most important feature of this rule is the direct usage of the
 * {@link #malformed_symbol} rule to force the second token to a 
 * <code>SYMBOL</code> token type. This allows reserved keywords and names that
 * start with numbers or other characters that usually cannot be used as the
 * first character of a symbol.  Additionally, a <code>DB_SYMBOL</code>
 * or a <code>FILENAME</code> can be matched there. This token is then used
 * in the exit action to add the defined procedure's name to the procedure 
 * namespace. 
 * <p>
 * Note that it is undocumented but possible to use reserved keywords as
 * internal procedure names in Progress 4GL. Otherwise only the rule
 * {@link #symbol} would have been needed.
 * <p>
 * Procedures do not have a return value.  There is a special result code to
 * optionally indicate success or failure but there is no way to call a
 * procedure and assign the result to an lvalue.  For this reason, there is
 * no need to associate the procedure name with a special token type that
 * is data type specific (i.e. this is different from functions and
 * variables).  A standard token type of <code>PROCEDURE</code> is associated
 * with all procedures in the namespace, but it is not really used for
 * anything.
 */
	public final void proc_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast proc_stmt_AST = null;
		Aast s_AST = null;
		Aast external_AST = null;
		
		try {      // for error handling
			
			boolean privateAccess = false;
			
			CommonToken next = (CommonToken) LT(2);
			
			String oldtxt = null;
			int    newlen = -1;
			
			// TODO: this is the same logic as implemented in run_stmt, but proc_stmt is supposed to
			//        be more restrictive (see procedure_names_with_embedded_strings.p)
			
			// the proc stmt can match a simple string but it can also match a string that prefixes
			// other non-whitespace characters and it is the unquoted contents concatenated to the
			// following text that is matched; to duplicate this we must get rid of the quotes here
			// and duplicate any keyword processing that would otherwise have occurred; then we let
			// the normal matching occur below; malformed_symbol() uses mergeUntilWS() to handle
			// the token merging
			if (next.getType() == STRING)
			{
			oldtxt = next.getText();
			
			// convert the Progress string to a Java string (includes escape processing and
			// removal of quotes)
			String txt = character.progressToJavaString(oldtxt, !unixEscapes,  true);
			
			newlen = txt.length();
			
			// no-transform approach to simply remove quotes; it is not clear if the above
			// transformations should or should not be applied
			// txt = txt.substring(1, txt.length() - 1);
			
			// save cleaned up string
			next.setText(txt);
			
			// this next part is done in run_stmt but I don't think we need it here
			// simulate the keyword processing that would have happened if this wasn't a string
			// Keyword found = sym.lookupKeyword(txt);
			// next.setType((found != null) ? found.getTokenType() : SYMBOL);
			
			next.setType(SYMBOL);
			}
			
			{
			Aast tmp77_AST = null;
			tmp77_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp77_AST);
			match(KW_PROC);
			malformed_symbol();
			s_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_EXTERN:
			{
				external_api_definition();
				external_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_PRIVATE:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_PRIVATE:
			{
				Aast tmp78_AST = null;
				tmp78_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp78_AST);
				match(KW_PRIVATE);
				privateAccess = true;
				break;
			}
			case DOT:
			case KW_IN:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_super_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			if (!( nestLevel < 2 || (insideClass && nestLevel == 2 && external_AST != null)))
			  throw new SemanticException(" nestLevel < 2 || (insideClass && nestLevel == 2 && external_AST != null)");
			}
			proc_stmt_AST = (Aast)currentAST.root;
			
			String stxt = s_AST.getText();
			
			// original token (or the first token of a merged set) was STRING but was rewritten
			// above; we need to calculate the actual full original text and save it for
			// possible anti-parsing later
			if (oldtxt != null)
			{
			String backend = stxt.substring(newlen);
			s_AST.putAnnotation("original-text", oldtxt + backend);
			}
			
			sym.addProcedure(stxt, INT_PROC); 
			
			// remember if the method should be private
			if (privateAccess)
			{
			proc_stmt_AST.putAnnotation("access", "private");
			}
			
			proc_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = proc_stmt_AST;
	}
	
/**   
 * Matches an <code>END</code> Progress 4GL language statement.  This is the
 * rule that ends all Progress block definitions.
 * <p>
 * Note that Progress 4GL allows an optional keyword to be placed between the
 * <code>KW_END</code> and the <code>DOT</code> for some blocks.  This works
 * for <code>CASE</code>, <code>PROCEDURE</code>, <code>FUNCTION</code> and
 * <code>TRIGGERS</code> keywords.  It does not work for <code>DO</code>,
 * <code>REPEAT</code> or <code>FOR</code> keywords.  This feature is 
 * completely implemented except in Progress 4GL, abbreviations cannot be
 * used in this optional keyword, but in this implementation abbreviations
 * are tolerated.  Since they should not be encountered in practice, this is
 * an acceptable decision.
 * <p>
 * <b>DO NOT EVER include this directly in the {@link #stmt_list} rule
 * otherwise all block processing will break!</b>
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 *
 * @param    eat
 *           Match (and drop) a following <code>DOT</code> if one exists.
 */
	public final void end_stmt(
		boolean eat
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast end_stmt_AST = null;
		Token  en = null;
		Aast en_AST = null;
		Token  ca = null;
		Aast ca_AST = null;
		Token  ct = null;
		Aast ct_AST = null;
		Token  cl = null;
		Aast cl_AST = null;
		Token  co = null;
		Aast co_AST = null;
		Token  de = null;
		Aast de_AST = null;
		Token  em = null;
		Aast em_AST = null;
		Token  fi = null;
		Aast fi_AST = null;
		Token  fu = null;
		Aast fu_AST = null;
		Token  ge = null;
		Aast ge_AST = null;
		Token  in = null;
		Aast in_AST = null;
		Token  me = null;
		Aast me_AST = null;
		Token  pr = null;
		Aast pr_AST = null;
		Token  se = null;
		Aast se_AST = null;
		Token  tr = null;
		Aast tr_AST = null;
		
		try {      // for error handling
			en = LT(1);
			en_AST = (Aast)astFactory.create(en);
			match(KW_END);
			hide(en);
			{
			if ((LA(1)==KW_CASE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				ca = LT(1);
				ca_AST = (Aast)astFactory.create(ca);
				match(KW_CASE);
				hide(ca);
			}
			else if ((LA(1)==KW_CATCH) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				ct = LT(1);
				ct_AST = (Aast)astFactory.create(ct);
				match(KW_CATCH);
				hide(ct);
			}
			else if ((LA(1)==KW_CLASS) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				cl = LT(1);
				cl_AST = (Aast)astFactory.create(cl);
				match(KW_CLASS);
				hide(cl);
			}
			else if ((LA(1)==KW_CONSTRUC) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				co = LT(1);
				co_AST = (Aast)astFactory.create(co);
				match(KW_CONSTRUC);
				hide(co);
			}
			else if ((LA(1)==KW_DESTRUCT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				de = LT(1);
				de_AST = (Aast)astFactory.create(de);
				match(KW_DESTRUCT);
				hide(de);
			}
			else if ((LA(1)==KW_ENUM) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				em = LT(1);
				em_AST = (Aast)astFactory.create(em);
				match(KW_ENUM);
				hide(em);
			}
			else if ((LA(1)==KW_FINALLY) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				fi = LT(1);
				fi_AST = (Aast)astFactory.create(fi);
				match(KW_FINALLY);
				hide(fi);
			}
			else if ((LA(1)==KW_FUNCT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				fu = LT(1);
				fu_AST = (Aast)astFactory.create(fu);
				match(KW_FUNCT);
				hide(fu);
			}
			else if ((LA(1)==KW_GET) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				ge = LT(1);
				ge_AST = (Aast)astFactory.create(ge);
				match(KW_GET);
				hide(ge);
			}
			else if ((LA(1)==KW_INTERFAC) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				in = LT(1);
				in_AST = (Aast)astFactory.create(in);
				match(KW_INTERFAC);
				hide(in);
			}
			else if ((LA(1)==KW_METHOD) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				me = LT(1);
				me_AST = (Aast)astFactory.create(me);
				match(KW_METHOD);
				hide(me);
			}
			else if ((LA(1)==KW_PROC) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				pr = LT(1);
				pr_AST = (Aast)astFactory.create(pr);
				match(KW_PROC);
				hide(pr);
			}
			else if ((LA(1)==KW_SET) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				se = LT(1);
				se_AST = (Aast)astFactory.create(se);
				match(KW_SET);
				hide(se);
			}
			else if ((LA(1)==KW_TRIGGERS) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				tr = LT(1);
				tr_AST = (Aast)astFactory.create(tr);
				match(KW_TRIGGERS);
				hide(tr);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((LA(1)==DOT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( eat )) {
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			end_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = end_stmt_AST;
	}
	
/**
 * Matches a name which can be a simple symbol or optionally can be any number of tokens until
 * it finds whitespace, COLON, DOT, EQUALS, RPARENS, LPARENS, NOT_EQ, LT, LTE, GT or GTE.
 * <p>
 * Certain resource names are unusual symbols in that they can begin with a numeric digit,
 * minus sign and other unexpected characters that normally can only occur as the 2nd or
 * later character in a symbol.  In addition, other non-symbol tokens can appear inside
 * such symbols (e.g. the @ sign).  All of this is based on real cases found in customer
 * source code.
 * <p>
 * This special case is converted into a single <code>SYMBOL</code> token with the concatenated
 * text of all merged tokens.
 * <p>
 * Resource types that have this undocumented behavior:
 * <p>
 * <ol>
 *    <li> frame names
 *    <li> labels
 *    <li> query names
 *    <li> stream names
 *    <li> procedure names
 *    <li> function names
 *    <li> radio-button names
 *    <li> db_ref-non_static names
 * </ol>
 */
	public final void malformed_symbol() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast malformed_symbol_AST = null;
		Token  s = null;
		Aast s_AST = null;
		
		try {      // for error handling
			
			// DOT and EOF are hard coded in the worker routine
			// TODO: UNKNOWN_TOKEN should have broken out RBRACE and PIPE
			// so they can be matched individually
			int[] exclude = new int[]
			{
			COLON,
			DB_REF_NON_STATIC,
			LPARENS,
			RPARENS,
			LBRACKET,
			RBRACKET,
			COMMA,
			EQUALS,
			NOT_EQ,
			LT,
			GT,
			LTE,
			GTE
			};
			
			boolean bad = mergeUntilWS(exclude);
			
			LT(1).setType(SYMBOL);
			
			{
			if ((LA(1)==SYMBOL)) {
				s = LT(1);
				s_AST = (Aast)astFactory.create(s);
				astFactory.makeASTRoot(currentAST, s_AST);
				match(SYMBOL);
			}
			else if ((_tokenSet_30.member(LA(1)))) {
				Aast tmp79_AST = null;
				tmp79_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp79_AST);
				matchNot(DOT);
				Aast tmp80_AST = null;
				tmp80_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp80_AST);
				matchNot(DOT);
				Aast tmp81_AST = null;
				tmp81_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp81_AST);
				matchNot(DOT);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			malformed_symbol_AST = (Aast)currentAST.root;
			
			if (bad)
			{
			malformed_symbol_AST.putAnnotation("malformed", Boolean.valueOf(true));
			}
			
			malformed_symbol_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = malformed_symbol_AST;
	}
	
/**
 * Match the <code>EXTERNAL</code> keyword with a required following
 * <code>STRING</code> (shared library name). Uses {@link #ordinal_clause}.
 * Used by {@link #proc_stmt}.
 */
	public final void external_api_definition() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast external_api_definition_AST = null;
		
		try {      // for error handling
			Aast tmp82_AST = null;
			tmp82_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp82_AST);
			match(KW_EXTERN);
			Aast tmp83_AST = null;
			tmp83_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp83_AST);
			match(STRING);
			{
			_loop55:
			do {
				switch ( LA(1)) {
				case KW_CDECL:
				{
					Aast tmp84_AST = null;
					tmp84_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp84_AST);
					match(KW_CDECL);
					break;
				}
				case KW_PASCAL:
				{
					Aast tmp85_AST = null;
					tmp85_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp85_AST);
					match(KW_PASCAL);
					break;
				}
				case KW_STDCALL:
				{
					Aast tmp86_AST = null;
					tmp86_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp86_AST);
					match(KW_STDCALL);
					break;
				}
				case KW_ORDINAL:
				{
					ordinal_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_PERSIST:
				{
					Aast tmp87_AST = null;
					tmp87_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp87_AST);
					match(KW_PERSIST);
					break;
				}
				default:
				{
					break _loop55;
				}
				}
			} while (true);
			}
			external_api_definition_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_31);
		}
		returnAST = external_api_definition_AST;
	}
	
/**      
 * Matches <code>IN SUPER</code> keywords in a {@link #func_stmt} and is
 * separated to improve the tree.
 */
	public final void in_super_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast in_super_clause_AST = null;
		
		try {      // for error handling
			Aast tmp88_AST = null;
			tmp88_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp88_AST);
			match(KW_IN);
			Aast tmp89_AST = null;
			tmp89_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp89_AST);
			match(KW_SUPER);
			in_super_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_32);
		}
		returnAST = in_super_clause_AST;
	}
	
/**
 * Match the <code>ORDINAL</code> keyword with a required following
 * <code>whole_number_literal</code>. Used by {@link #external_api_definition}.
 */
	public final void ordinal_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast ordinal_clause_AST = null;
		
		try {      // for error handling
			Aast tmp90_AST = null;
			tmp90_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp90_AST);
			match(KW_ORDINAL);
			whole_number_literal();
			astFactory.addASTChild(currentAST, returnAST);
			ordinal_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_33);
		}
		returnAST = ordinal_clause_AST;
	}
	
/**
 * Matches any whole number literal (<code>NUM_LITERAL</code> or a <code>HEX_LITERAL</code>).
 */
	public final void whole_number_literal() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast whole_number_literal_AST = null;
		Token  n = null;
		Aast n_AST = null;
		Token  h = null;
		Aast h_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case NUM_LITERAL:
			{
				n = LT(1);
				n_AST = (Aast)astFactory.create(n);
				astFactory.addASTChild(currentAST, n_AST);
				match(NUM_LITERAL);
				sym.annotateNumericLiteral(n_AST);
				break;
			}
			case HEX_LITERAL:
			{
				h = LT(1);
				h_AST = (Aast)astFactory.create(h);
				astFactory.addASTChild(currentAST, h_AST);
				match(HEX_LITERAL);
				sym.annotateNumericLiteral(h_AST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			whole_number_literal_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = whole_number_literal_AST;
	}
	
/**
 * Matches the <code>KW_INHERITS</code> with a following
 * {@link #user_defined_type_name}. This defines the superclass for a
 * {@link #class_stmt}.
 */
	public final void inherits_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast inherits_clause_AST = null;
		
		try {      // for error handling
			Aast tmp91_AST = null;
			tmp91_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp91_AST);
			match(KW_INHERITS);
			user_defined_type_name();
			astFactory.addASTChild(currentAST, returnAST);
			inherits_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_34);
		}
		returnAST = inherits_clause_AST;
	}
	
/**
 * Matches <code>KW_IMPLMTS</code> with one or more comma-separated following
 * {@link #user_defined_type_name}. Used by {@link #class_stmt}.
 */
	public final void implements_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast implements_clause_AST = null;
		
		try {      // for error handling
			Aast tmp92_AST = null;
			tmp92_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp92_AST);
			match(KW_IMPLEMTS);
			user_defined_type_name();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop73:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					user_defined_type_name();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop73;
				}
				
			} while (true);
			}
			implements_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_34);
		}
		returnAST = implements_clause_AST;
	}
	
/**
 * Matches an {@link #any_symbol_at_all} or a <code>STRING</code> and if it
 * represents an unqualified class name, it will be resolved into the fully
 * qualified class name that is referenced. The resulting qualified name will
 * be stored in an annotation named "qualified". The resulting node type will
 * always be <code>CLASS_NAME</code>.
 * <p>
 * The 10.2x syntax which allows a main.class.Name+InnerClassName format is
 * supported here.
 */
	public final void user_defined_type_name() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast user_defined_type_name_AST = null;
		Aast sym_AST = null;
		Token  pl = null;
		Aast pl_AST = null;
		Aast innerCls_AST = null;
		Token  str = null;
		Aast str_AST = null;
		
		try {      // for error handling
			{
			if ((_tokenSet_1.member(LA(1)))) {
				any_symbol_at_all();
				sym_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				{
				if ((LA(1)==PLUS) && (_tokenSet_1.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					pl = LT(1);
					pl_AST = (Aast)astFactory.create(pl);
					match(PLUS);
					hide(pl);
					any_symbol_at_all();
					innerCls_AST = (Aast)returnAST;
					hide(innerCls_AST);
				}
				else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else if ((LA(1)==STRING)) {
				str = LT(1);
				str_AST = (Aast)astFactory.create(str);
				astFactory.addASTChild(currentAST, str_AST);
				match(STRING);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			user_defined_type_name_AST = (Aast)currentAST.root;
			
			String name = null;
			
			if (sym_AST != null)
			{
			name = sym_AST.getText();
			
			if (innerCls_AST != null)
			{
			name = name + "+" + innerCls_AST.getText();
			
			// we don't have to use #sym.setText(name) here because the nodes above were
			// hidden and so they can be anti-parsed naturally
			}
			}
			else
			{
			name = character.progressToJavaString(str_AST.getText(), !unixEscapes, false);
			
			// if this is a reference to a .NET class, the 4GL allows the string literal form to contain
			// a generics syntax in the form "dotnot_class_or_iface<other_dotnet_class_or_iface>"; the
			// non-string form (above) can't have this syntax; 4GL class names can't use this either;
			// we must strip the generics portion before we try to lookup the main class
			int idx = name.indexOf('<');
			
			if (idx != -1)
			{
			String  typeParm     = name.substring(idx + 1, name.length() - 1);
			Keyword found        = sym.lookupKeyword(typeParm);
			String  qualTypeParm = typeParm;
			
			if (found != null && isPrimitiveType(found.getTokenType()))
			{
			str_AST.putAnnotation("generic-type-is-primitive", true);
			}
			else
			{
			qualTypeParm = sym.loadClass(typeParm);
			
			if (qualTypeParm == null)
			{
			String err = String.format("Unresolvable generic type parameter '%s'.", typeParm);
			throw genExc(err, user_defined_type_name_AST);
			}
			}
			
			str_AST.putAnnotation("generic-type-parameter", qualTypeParm);
			
			name = name.substring(0, idx);
			}
			
			saveAndReplaceText(str_AST, name);
			}
			
			String full = sym.loadClass(name);
			
			if (full == null)
			{
			String err = String.format("Unresolvable user defined type '%s'.", name);
			throw genExc(err, user_defined_type_name_AST);
			}
			
			sym.annotateClassRef(full, user_defined_type_name_AST);
			saveAndReplaceType(user_defined_type_name_AST, CLASS_NAME);
			
			user_defined_type_name_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = user_defined_type_name_AST;
	}
	
/**
 * Matches the <code>KW_INHERITS</code> with a following comma-separated list of
 * {@link #user_defined_type_name}. This defines the list of super-interfaces for an
 * {@link #interface_stmt}.
 */
	public final void multiple_inherits_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast multiple_inherits_clause_AST = null;
		
		try {      // for error handling
			Aast tmp93_AST = null;
			tmp93_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp93_AST);
			match(KW_INHERITS);
			user_defined_type_name();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop70:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					user_defined_type_name();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop70;
				}
				
			} while (true);
			}
			multiple_inherits_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_32);
		}
		returnAST = multiple_inherits_clause_AST;
	}
	
/**
 * Matches one or more {@link #def_enum_stmt} references.
 */
	public final void enum_stmt_body() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast enum_stmt_body_AST = null;
		
		try {      // for error handling
			{
			int _cnt92=0;
			_loop92:
			do {
				if ((LA(1)==KW_DEFINE) && (LA(2)==KW_ENUM) && (_tokenSet_1.member(LA(3)))) {
					def_enum_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					if ( _cnt92>=1 ) { break _loop92; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt92++;
			} while (true);
			}
			enum_stmt_body_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = enum_stmt_body_AST;
	}
	
/**
 * Matches an enum member name (as {@link #any_symbol_at_all}) and optionally an {@code EQUALS}
 * and one member name, a comma-separated list of member names or a {@link #whole_number_literal}
 * reference.  If the {@code EQUALS} is present, it will be the root node.  The actual enum's
 * symbol will be of type {@code ENUM_VALUE}.
 */
	public final void enum_member() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast enum_member_AST = null;
		Aast e_AST = null;
		
		try {      // for error handling
			any_symbol_at_all();
			e_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			saveAndReplaceType(e_AST, ENUM_VALUE);
			sym.addEnumMember(e_AST);
			
			{
			if ((LA(1)==EQUALS)) {
				Aast tmp94_AST = null;
				tmp94_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp94_AST);
				match(EQUALS);
				{
				if ((_tokenSet_1.member(LA(1)))) {
					{
					any_symbol_at_all();
					astFactory.addASTChild(currentAST, returnAST);
					{
					_loop101:
					do {
						if ((LA(1)==COMMA)) {
							comma();
							astFactory.addASTChild(currentAST, returnAST);
							any_symbol_at_all();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else {
							break _loop101;
						}
						
					} while (true);
					}
					}
				}
				else if ((LA(1)==HEX_LITERAL||LA(1)==NUM_LITERAL)) {
					whole_number_literal();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else if ((_tokenSet_35.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			enum_member_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_35);
		}
		returnAST = enum_member_AST;
	}
	
/**
 * Matches an {@link #any_non_reserved_symbol} as a class name reference. This
 * is the same idea as {@link #user_defined_type_name} except that here we do
 * not match reserved keywords. This is required to provide the behavior of
 * how class names are matched in {@link #primary_expr}. If the name is
 * an unqualified class name, it will be resolved into the fully
 * qualified class name that is referenced. The resulting qualified name will
 * be stored in an annotation named "qualified". The resulting node type will
 * always be <code>CLASS_NAME</code>.
 */
	public final void non_reserved_user_defined_type_name() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast non_reserved_user_defined_type_name_AST = null;
		Aast nam_AST = null;
		Token  pl = null;
		Aast pl_AST = null;
		Aast innerCls_AST = null;
		
		try {      // for error handling
			any_non_reserved_symbol();
			nam_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case PLUS:
			{
				pl = LT(1);
				pl_AST = (Aast)astFactory.create(pl);
				match(PLUS);
				hide(pl);
				any_symbol_at_all();
				innerCls_AST = (Aast)returnAST;
				hide(innerCls_AST);
				break;
			}
			case EOF:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			non_reserved_user_defined_type_name_AST = (Aast)currentAST.root;
			
			String name = nam_AST.getText();
			
			if (innerCls_AST != null)
			{
			name = name + "+" + innerCls_AST.getText();
			
			// we don't have to use #nam.setText(name) here because the nodes above were
			// hidden and so they can be anti-parsed naturally
			}
			
			String full = sym.loadClass(name);
			
			if (full == null)
			{
			String err = String.format("Unresolvable user defined type '%s'.", name);
			throw genExc(err, nam_AST);
			}
			
			sym.annotateClassRef(full, non_reserved_user_defined_type_name_AST);
			non_reserved_user_defined_type_name_AST.setType(CLASS_NAME);
			
			non_reserved_user_defined_type_name_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = non_reserved_user_defined_type_name_AST;
	}
	
/**
 * Matches a {@link #symbol}, a <code>DB_SYMBOL</code> or a 
 * <code>FILENAME</code> and always returns a <code>SYMBOL</code> node.
 */
	public final void any_non_reserved_symbol() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast any_non_reserved_symbol_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  f = null;
		Aast f_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case DB_SYMBOL:
			{
				d = LT(1);
				d_AST = (Aast)astFactory.create(d);
				astFactory.addASTChild(currentAST, d_AST);
				match(DB_SYMBOL);
				d_AST.setType(SYMBOL);
				break;
			}
			case FILENAME:
			{
				f = LT(1);
				f_AST = (Aast)astFactory.create(f);
				astFactory.addASTChild(currentAST, f_AST);
				match(FILENAME);
				f_AST.setType(SYMBOL);
				break;
			}
			default:
				if ((_tokenSet_15.member(LA(1)))) {
					symbol();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			any_non_reserved_symbol_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = any_non_reserved_symbol_AST;
	}
	
/**
 * Matches the {@code KW_FROM} in a {@link #using_stmt}. There is a required following
 * {@code KW_ASSEMBLY}, {@code KW_PROPATH} or {@code KW_JAVA} (this one is a FWD extension and
 * is not a real 4GL feature).
 * <p>
 * Separated in order to build the tree properly.
 */
	public final void from_assembly() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast from_assembly_AST = null;
		
		try {      // for error handling
			Aast tmp95_AST = null;
			tmp95_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp95_AST);
			match(KW_FROM);
			{
			switch ( LA(1)) {
			case KW_ASSEMBLY:
			{
				Aast tmp96_AST = null;
				tmp96_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp96_AST);
				match(KW_ASSEMBLY);
				break;
			}
			case KW_PROPATH:
			{
				Aast tmp97_AST = null;
				tmp97_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp97_AST);
				match(KW_PROPATH);
				break;
			}
			case KW_JAVA:
			{
				Aast tmp98_AST = null;
				tmp98_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp98_AST);
				match(KW_JAVA);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			from_assembly_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = from_assembly_AST;
	}
	
/**
 * Matches <code>KW_PUBLIC</code>, <code>KW_PROTECTD</code>,
 * <code>KW_PRIVATE</code>, <code>KW_PK_PROT</code> or  <code>KW_PK_PRIV</code>.
 */
	public final void access_mode() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast access_mode_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case KW_PUBLIC:
			{
				Aast tmp99_AST = null;
				tmp99_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp99_AST);
				match(KW_PUBLIC);
				access_mode_AST = (Aast)currentAST.root;
				break;
			}
			case KW_PROTECTD:
			{
				Aast tmp100_AST = null;
				tmp100_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp100_AST);
				match(KW_PROTECTD);
				access_mode_AST = (Aast)currentAST.root;
				break;
			}
			case KW_PRIVATE:
			{
				Aast tmp101_AST = null;
				tmp101_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp101_AST);
				match(KW_PRIVATE);
				access_mode_AST = (Aast)currentAST.root;
				break;
			}
			case KW_PK_PROT:
			{
				Aast tmp102_AST = null;
				tmp102_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp102_AST);
				match(KW_PK_PROT);
				access_mode_AST = (Aast)currentAST.root;
				break;
			}
			case KW_PK_PRIV:
			{
				Aast tmp103_AST = null;
				tmp103_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp103_AST);
				match(KW_PK_PRIV);
				access_mode_AST = (Aast)currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_0);
		}
		returnAST = access_mode_AST;
	}
	
/**   
 * Matches a parenthesized list of comma-separated parameter definitions and uses a rule
 * reference to {@link #parameter_spec} to properly build the AST.  Note that the parameters
 * are optional as some customer code has been found (in function definitions) that has an
 * empty set of parenthesis.
 * <p>
 * Called from {@link #constructor_stmt}, {@link #method_stmt}, {@link #func_stmt},
 * {@link #getter_setter} and {@link #event_signature}.
 *
 * @param    defineBuffer
 *           <code>true</code> if the caller supports inline buffer
 *           definitions (versus just passing a buffer parameter which
 *           doesn't create a new buffer).
 * @param    funcDef
 *           <code>true</code> if the caller is a FUNCTION definition.
 * @param    oo
 *           {@code true} if being called from OO features.  In OO usage, reserved keywords can
 *           be used as parameter names. 
 */
	public final void param_list_definition(
		boolean defineBuffer, boolean funcDef, boolean oo
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast param_list_definition_AST = null;
		
		try {      // for error handling
			Aast tmp104_AST = null;
			tmp104_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp104_AST);
			match(LPARENS);
			{
			if ((_tokenSet_0.member(LA(1)))) {
				parameter_spec(defineBuffer, funcDef, oo);
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop1605:
				do {
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						parameter_spec(defineBuffer, funcDef, oo);
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop1605;
					}
					
				} while (true);
				}
			}
			else if ((LA(1)==RPARENS)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			param_list_definition_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = param_list_definition_AST;
	}
	
/**
 * Matches the return datatype of a user-defined method. This is used by 
 * {@link #method_stmt} and is only separated to make the AST build
 * correctly.  
 *
 * @return    The token type of the method's return value.
 */
	public final int  method_return() throws RecognitionException, TokenStreamException {
		int mtype = -1;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast method_return_AST = null;
		Token  k = null;
		Aast k_AST = null;
		Token  cl = null;
		Aast cl_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==KW_VOID) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp105_AST = null;
				tmp105_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp105_AST);
				match(KW_VOID);
				mtype = OO_METH_VOID;
			}
			else if ((LA(1)==KW_CHAR) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp106_AST = null;
				tmp106_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp106_AST);
				match(KW_CHAR);
				mtype = OO_METH_CHAR;
			}
			else if ((LA(1)==KW_COM_HNDL) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp107_AST = null;
				tmp107_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp107_AST);
				match(KW_COM_HNDL);
				mtype = OO_METH_COM_HANDLE;
			}
			else if ((LA(1)==KW_DATE) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp108_AST = null;
				tmp108_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp108_AST);
				match(KW_DATE);
				mtype = OO_METH_DATE;
			}
			else if ((LA(1)==KW_DATETIME) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp109_AST = null;
				tmp109_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp109_AST);
				match(KW_DATETIME);
				mtype = OO_METH_DATETIME;
			}
			else if ((LA(1)==KW_DATE_TZ) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp110_AST = null;
				tmp110_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp110_AST);
				match(KW_DATE_TZ);
				mtype = OO_METH_DATETIME_TZ;
			}
			else if ((LA(1)==KW_DEC) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp111_AST = null;
				tmp111_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp111_AST);
				match(KW_DEC);
				mtype = OO_METH_DEC;
			}
			else if ((LA(1)==KW_HANDLE) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp112_AST = null;
				tmp112_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp112_AST);
				match(KW_HANDLE);
				mtype = OO_METH_HANDLE;
			}
			else if ((LA(1)==KW_WID_HAND) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp113_AST = null;
				tmp113_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp113_AST);
				match(KW_WID_HAND);
				mtype = OO_METH_HANDLE;
			}
			else if ((LA(1)==KW_INT) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp114_AST = null;
				tmp114_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp114_AST);
				match(KW_INT);
				mtype = OO_METH_INT;
			}
			else if ((LA(1)==KW_INT64) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp115_AST = null;
				tmp115_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp115_AST);
				match(KW_INT64);
				mtype = OO_METH_INT64;
			}
			else if ((LA(1)==KW_LOG||LA(1)==KW_LOGICAL) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				{
				switch ( LA(1)) {
				case KW_LOGICAL:
				{
					Aast tmp116_AST = null;
					tmp116_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp116_AST);
					match(KW_LOGICAL);
					break;
				}
				case KW_LOG:
				{
					k = LT(1);
					k_AST = (Aast)astFactory.create(k);
					astFactory.addASTChild(currentAST, k_AST);
					match(KW_LOG);
					k_AST.setType(KW_LOGICAL);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				mtype = OO_METH_LOGICAL;
			}
			else if ((LA(1)==KW_LONGCHAR) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp117_AST = null;
				tmp117_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp117_AST);
				match(KW_LONGCHAR);
				mtype = OO_METH_LONGCHAR;
			}
			else if ((LA(1)==KW_MEMPTR) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp118_AST = null;
				tmp118_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp118_AST);
				match(KW_MEMPTR);
				mtype = OO_METH_MEMPTR;
			}
			else if ((LA(1)==KW_POLY) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp119_AST = null;
				tmp119_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp119_AST);
				match(KW_POLY);
				mtype = OO_METH_POLY;
			}
			else if ((LA(1)==KW_RAW) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp120_AST = null;
				tmp120_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp120_AST);
				match(KW_RAW);
				mtype = OO_METH_RAW;
			}
			else if ((LA(1)==KW_RECID) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp121_AST = null;
				tmp121_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp121_AST);
				match(KW_RECID);
				mtype = OO_METH_RECID;
			}
			else if ((LA(1)==KW_ROWID) && (_tokenSet_1.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				Aast tmp122_AST = null;
				tmp122_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp122_AST);
				match(KW_ROWID);
				mtype = OO_METH_ROWID;
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_4.member(LA(2))) && (_tokenSet_38.member(LA(3)))) {
				{
				if ((LA(1)==KW_CLASS) && (_tokenSet_0.member(LA(2))) && (_tokenSet_39.member(LA(3)))) {
					cl = LT(1);
					cl_AST = (Aast)astFactory.create(cl);
					match(KW_CLASS);
					hide(cl_AST);
				}
				else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_39.member(LA(2))) && (_tokenSet_37.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				user_defined_type_name();
				astFactory.addASTChild(currentAST, returnAST);
				mtype = OO_METH_CLASS;
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			method_return_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_1);
		}
		returnAST = method_return_AST;
		return mtype;
	}
	
/**
 * Matches the <code>EXTENT</code> keyword and the optional integer constant
 * that follows it.  Used by {@link #def_var_stmt} and the subtree is rooted
 * by the <code>EXTENT</code> keyword.
 */
	public final int  extent() throws RecognitionException, TokenStreamException {
		int size = -1;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast extent_AST = null;
		Aast c_AST = null;
		
		try {      // for error handling
			Aast tmp123_AST = null;
			tmp123_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp123_AST);
			match(KW_EXTENT);
			size = -1;
			{
			if ((LA(1)==HEX_LITERAL||LA(1)==NUM_LITERAL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				whole_number_literal();
				c_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				size = Integer.parseInt(c_AST.getText());
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			extent_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = extent_AST;
		return size;
	}
	
	public final void destructor_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast destructor_stmt_AST = null;
		Token  p = null;
		Aast p_AST = null;
		Aast cl_AST = null;
		
		try {      // for error handling
			Aast tmp124_AST = null;
			tmp124_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp124_AST);
			match(KW_DESTRUCT);
			{
			if ((LA(1)==KW_PUBLIC) && (_tokenSet_1.member(LA(2)))) {
				p = LT(1);
				p_AST = (Aast)astFactory.create(p);
				match(KW_PUBLIC);
				hide(p);
			}
			else if ((_tokenSet_1.member(LA(1))) && (LA(2)==LPARENS)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			any_symbol_at_all();
			cl_AST = (Aast)returnAST;
			hide(cl_AST);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			destructor_stmt_AST = (Aast)currentAST.root;
			
			String mname = cl_AST.getText();
			destructor_stmt_AST.putAnnotation("name", mname);
			
			destructor_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = destructor_stmt_AST;
	}
	
/**
 * Implements the structure of a <code>FUNCTION</code> block definition
 * which is the manner in which Progress implements a subroutine which can 
 * be called as part of an expression and which returns a value of a
 * prespecified data type.
 * <p>
 * The most important feature of this rule is the direct usage of the
 * {@link #symbol} rule to force the second token to a <code>SYMBOL</code> 
 * token type.  This token is then used in the exit action to add the
 * defined function's name to the function namespace. 
 * <p>
 * Since each function has a prespecified return type, this type is
 * stored in the function namespace as the token type associated with the
 * specific function name that is added.  This is then used as the token
 * type for the root node of the subtree that represents a function call.
 * In this manner, the expression evaluation can properly determine the
 * data type of the return value for any defined or declared function.
 * <p>
 * All supported data types can be used as return types. Since the return
 * type is provided back and stored an annotation, the tree associated with
 * the return type is not needed and thus it is dropped.
 * <p>
 * This rule calls {@link #param_list_definition} to process the function parameters
 * and add them to the variable dictionary.
 * <p>
 * Forward declarations are supported by returning <code>false</code> unless
 * a forward declaration is detected by the presence of the 
 * <code>FORWARD</code> keyword.  In such cases, the return value will change.
 * <p>
 * Note that in either case (normal definition or forward declaration), the 
 * function is added to the function namespace.  This is exactly as Progress
 * implements it, since this allows the function name to be referenced
 * even if the definition has not occurred (a forward declaration). Note that
 * it is perfectly legal to have the same function be forward declared AND
 * then defined later in the source file.  This causes the same function to
 * be added twice to the function namespace, however there is only ever a
 * single definition.  The second addition, just overwrites the original
 * forward declaration with the same information.  This does not cause any
 * problems but it may be implementation dependent.  If the namespace
 * implementation changes, this could be a problem in the future.
 *
 * @return    Specifies whether or not this statement was a forward
 *            declaration. A forward declaration is one that has an option
 *            such as <code>FORWARD</code>, <code>IN SUPER</code> or
 *            <code>IN proc_handle</code> specified.  Such declarations do
 *            not have associated blocks.
 */
	public final boolean  func_stmt() throws RecognitionException, TokenStreamException {
		boolean fwd = false;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast func_stmt_AST = null;
		Token  fct = null;
		Aast fct_AST = null;
		Aast s_AST = null;
		Aast fr_AST = null;
		Aast pl_AST = null;
		
		try {      // for error handling
			
			int     ftype = -1;
			int     size  = -1;
			boolean privateAccess = false;
			boolean save          = false;
			boolean in_super_or_h = false;
			sym.setInMethod(true);
			
			{
			fct = LT(1);
			fct_AST = (Aast)astFactory.create(fct);
			astFactory.makeASTRoot(currentAST, fct_AST);
			match(KW_FUNCT);
			malformed_symbol();
			s_AST = (Aast)returnAST;
			hide(s_AST);
			ftype=func_return();
			fr_AST = (Aast)returnAST;
			hide(fr_AST);
			{
			switch ( LA(1)) {
			case KW_EXTENT:
			{
				size=extent();
				astFactory.addASTChild(currentAST, returnAST);
				func_stmt_AST = (Aast)currentAST.root;
				
				if (size == -1 || size > 0) func_stmt_AST.putAnnotation("extent",  Long.valueOf(size));
				
				break;
			}
			case DOT:
			case KW_IN:
			case KW_MAP:
			case KW_FORWARD:
			case KW_PRIVATE:
			case COLON:
			case LPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_PRIVATE:
			{
				Aast tmp125_AST = null;
				tmp125_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp125_AST);
				match(KW_PRIVATE);
				privateAccess = true;
				break;
			}
			case DOT:
			case KW_IN:
			case KW_MAP:
			case KW_FORWARD:
			case COLON:
			case LPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case LPARENS:
			{
				param_list_definition(true, true, false);
				pl_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_MAP:
			case KW_FORWARD:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_FORWARD:
			{
				Aast tmp126_AST = null;
				tmp126_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp126_AST);
				match(KW_FORWARD);
				fwd = true; save = true;
				break;
			}
			case KW_IN:
			case KW_MAP:
			{
				{
				switch ( LA(1)) {
				case KW_MAP:
				{
					map_to_actual_name();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_IN:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				in_super_or_in_handle();
				astFactory.addASTChild(currentAST, returnAST);
				fwd = true; in_super_or_h = true;
				break;
			}
			case DOT:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			if (!( (ftype == FUNC_VOID ? (insideClass && in_super_or_h) : true) &&
         (nestLevel < 2 || (insideClass && nestLevel == 2 && in_super_or_h)) ))
			  throw new SemanticException(" (ftype == FUNC_VOID ? (insideClass && in_super_or_h) : true) &&\n         (nestLevel < 2 || (insideClass && nestLevel == 2 && in_super_or_h)) ");
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			}
			func_stmt_AST = (Aast)currentAST.root;
			
			String qname = null;
			String fname = s_AST.getText();
			
			if (ftype == FUNC_CLASS)
			{
			qname = (String) fr_AST.getChildAt(0).getAnnotation("qualified");
			}
			
			sym.addFunction(fname, ftype, qname); 
			sym.annotateFunction(fname, func_stmt_AST, true); 
			
			// remember if the method should be private
			if (privateAccess)
			{
			func_stmt_AST.putAnnotation("access", "private");
			}
			
			if (save)
			{
			// this is a forward function def, cache the local variable defs that
			// correspond to the function parameter defs
			sym.saveLocalVariables(fname);
			}
			else
			{
			if (!fwd && (pl_AST == null || pl_AST.getNumImmediateChildren() == 0))
			{
			// this is a non-forward function definition that has no parameters
			// but it is possible that a previous matching forward definition
			// did have parameters and those are implicitly implemented and allowed
			// in the "concrete" definition; restore any cached vars here
			if (sym.restoreLocalVariables(fname))
			{
			// remember that there was something to copy
			func_stmt_AST.putAnnotation("implicit_parms", Boolean.valueOf(true));
			}
			}
			else
			{
			// we don't need any cached values by this name, cleanup
			sym.removeLocalVariables(fname);
			}
			}
			sym.setInMethod(false);
			
			func_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = func_stmt_AST;
		return fwd;
	}
	
/**
 * Matches the optional <code>RETURNS</code> keyword and the required
 * function return datatype (which is specified whether the 
 * <code>RETURNS</code> keyword is there or not.  This is used by 
 * {@link #func_stmt} and is only separated to make the AST build
 * correctly.  
 * <p>
 * Undocumented is the fact that one can interchangeably use the 
 * <code>RETURN</code> here instead of the documented <code>RETURNS</code>. 
 * Both are matched but the token type is forced to <code>RETURNS</code>
 * to simplify tree processing.
 *
 * @return    The token type of the function's return value.
 */
	public final int  func_return() throws RecognitionException, TokenStreamException {
		int ftype = -1;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast func_return_AST = null;
		Token  rs = null;
		Aast rs_AST = null;
		Token  k = null;
		Aast k_AST = null;
		Token  cl = null;
		Aast cl_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==KW_RETURNS) && (_tokenSet_0.member(LA(2))) && (_tokenSet_40.member(LA(3)))) {
				Aast tmp127_AST = null;
				tmp127_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp127_AST);
				match(KW_RETURNS);
			}
			else if ((LA(1)==KW_RETURN) && (_tokenSet_0.member(LA(2))) && (_tokenSet_40.member(LA(3)))) {
				rs = LT(1);
				rs_AST = (Aast)astFactory.create(rs);
				astFactory.makeASTRoot(currentAST, rs_AST);
				match(KW_RETURN);
				rs_AST.setType(KW_RETURNS);
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_40.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_CHAR) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp128_AST = null;
				tmp128_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp128_AST);
				match(KW_CHAR);
				ftype = FUNC_CHAR;
			}
			else if ((LA(1)==KW_COM_HNDL) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp129_AST = null;
				tmp129_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp129_AST);
				match(KW_COM_HNDL);
				ftype = FUNC_COM_HANDLE;
			}
			else if ((LA(1)==KW_DATE) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp130_AST = null;
				tmp130_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp130_AST);
				match(KW_DATE);
				ftype = FUNC_DATE;
			}
			else if ((LA(1)==KW_DATETIME) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp131_AST = null;
				tmp131_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp131_AST);
				match(KW_DATETIME);
				ftype = FUNC_DATETIME;
			}
			else if ((LA(1)==KW_DATE_TZ) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp132_AST = null;
				tmp132_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp132_AST);
				match(KW_DATE_TZ);
				ftype = FUNC_DATETIME_TZ;
			}
			else if ((LA(1)==KW_DEC) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp133_AST = null;
				tmp133_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp133_AST);
				match(KW_DEC);
				ftype = FUNC_DEC;
			}
			else if ((LA(1)==KW_INT) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp134_AST = null;
				tmp134_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp134_AST);
				match(KW_INT);
				ftype = FUNC_INT;
			}
			else if ((LA(1)==KW_INT64) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp135_AST = null;
				tmp135_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp135_AST);
				match(KW_INT64);
				ftype = FUNC_INT64;
			}
			else if ((LA(1)==KW_LOG||LA(1)==KW_LOGICAL) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				{
				switch ( LA(1)) {
				case KW_LOGICAL:
				{
					Aast tmp136_AST = null;
					tmp136_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp136_AST);
					match(KW_LOGICAL);
					break;
				}
				case KW_LOG:
				{
					k = LT(1);
					k_AST = (Aast)astFactory.create(k);
					astFactory.addASTChild(currentAST, k_AST);
					match(KW_LOG);
					k_AST.setType(KW_LOGICAL);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				ftype = FUNC_LOGICAL;
			}
			else if ((LA(1)==KW_LONGCHAR) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp137_AST = null;
				tmp137_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp137_AST);
				match(KW_LONGCHAR);
				ftype = FUNC_LONGCHAR;
			}
			else if ((LA(1)==KW_RECID) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp138_AST = null;
				tmp138_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp138_AST);
				match(KW_RECID);
				ftype = FUNC_RECID;
			}
			else if ((LA(1)==KW_ROWID) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp139_AST = null;
				tmp139_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp139_AST);
				match(KW_ROWID);
				ftype = FUNC_ROWID;
			}
			else if ((LA(1)==KW_HANDLE) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp140_AST = null;
				tmp140_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp140_AST);
				match(KW_HANDLE);
				ftype = FUNC_HANDLE;
			}
			else if ((LA(1)==KW_WID_HAND) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp141_AST = null;
				tmp141_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp141_AST);
				match(KW_WID_HAND);
				ftype = FUNC_HANDLE;
			}
			else if ((LA(1)==KW_RAW) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp142_AST = null;
				tmp142_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp142_AST);
				match(KW_RAW);
				ftype = FUNC_RAW;
			}
			else if ((LA(1)==KW_MEMPTR) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp143_AST = null;
				tmp143_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp143_AST);
				match(KW_MEMPTR);
				ftype = FUNC_MEMPTR;
			}
			else if ((LA(1)==KW_POLY) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp144_AST = null;
				tmp144_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp144_AST);
				match(KW_POLY);
				ftype = FUNC_POLY;
			}
			else if ((LA(1)==KW_VOID) && (_tokenSet_42.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				Aast tmp145_AST = null;
				tmp145_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp145_AST);
				match(KW_VOID);
				ftype = FUNC_VOID;
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_40.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				{
				if ((LA(1)==KW_CLASS) && (_tokenSet_0.member(LA(2))) && (_tokenSet_43.member(LA(3)))) {
					cl = LT(1);
					cl_AST = (Aast)astFactory.create(cl);
					match(KW_CLASS);
					hide(cl);
				}
				else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_43.member(LA(2))) && (_tokenSet_41.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				user_defined_type_name();
				astFactory.addASTChild(currentAST, returnAST);
				ftype = FUNC_CLASS;
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			func_return_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_42);
		}
		returnAST = func_return_AST;
		return ftype;
	}
	
/**      
 * Matches the <code>MAP TO symbol</code> construct (the <code>TO</code>
 * keyword is optional) in a {@link #func_stmt}.  It is separated to improve 
 * the tree.
 */
	public final void map_to_actual_name() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast map_to_actual_name_AST = null;
		Token  t = null;
		Aast t_AST = null;
		Aast actual_AST = null;
		
		try {      // for error handling
			Aast tmp146_AST = null;
			tmp146_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp146_AST);
			match(KW_MAP);
			{
			if ((LA(1)==KW_TO)) {
				t = LT(1);
				t_AST = (Aast)astFactory.create(t);
				match(KW_TO);
				hide(t);
			}
			else if ((_tokenSet_15.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			symbol();
			actual_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			map_to_actual_name_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_44);
		}
		returnAST = map_to_actual_name_AST;
	}
	
/**
 * Matches <code>IN SUPER</code> and <code>IN handle</code> 
 * clauses in a {@link #func_stmt}.
 */
	public final void in_super_or_in_handle() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast in_super_or_in_handle_AST = null;
		
		try {      // for error handling
			Aast tmp147_AST = null;
			tmp147_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp147_AST);
			match(KW_IN);
			{
			if ((LA(1)==KW_SUPER) && (LA(2)==DOT||LA(2)==COLON) && (_tokenSet_11.member(LA(3)))) {
				Aast tmp148_AST = null;
				tmp148_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp148_AST);
				match(KW_SUPER);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			in_super_or_in_handle_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_32);
		}
		returnAST = in_super_or_in_handle_AST;
	}
	
/**
 * Parses any valid Progress 4GL expression and creates an AST that is
 * suitable for evaluation.  This is the main "entry point" for all Progress
 * 4GL expression parsing.  Progress expressions can contain sub-expressions
 * and this entry point is properly recursive without causing any ambiguity.
 * <p>
 * The AST is structured with operator nodes as the root nodes and each
 * operator (unary or binary) has the matching number of child nodes (1 or
 * 2 respectively).  Each child node is an operand and the semantics of
 * left and right operands (for binary operators) is maintained.
 * <p>
 * The objective of all expression evaluation is to generate a single result
 * of one of the possible Progress data types: integer, decimal, logical,
 * date or character.  The key point is that unless a Progress construct 
 * defines that it requires a literal (e.g. the <code>AS</code> clause for
 * <code>DEFINE VARIABLE</code>), it is usually the case that an expression
 * is allowed.  It is always the case that there is some limit to the 
 * resulting data types that are allowed for the expression.  Another way to
 * say this is that many Progress constructs will require an expression of
 * a specific type (e.g. the <code>MESSAGE</code> statement requires a
 * character expression as its main data to be displayed).  Since all valid
 * expressions can be evaluated or resolved down to a specific data type,
 * this is <b>the key</b> to building a consistent syntax for the Progress
 * language.  Since Progress expressions can contain lvalues, function calls,
 * literals by themselves as well as part of a larger expression, none of
 * the Progress constructs that reference expressions of a specific type
 * need to worry about what is included or how it is parsed.  As long as
 * expressions are used, all of the variety of possible combinations are
 * obtained &quot;for free&quot; because a common expression implementation
 * is used.  For this reason, this top level entry point is probably the
 * most heavily referenced rule in this entire grammar.  <b>Changes must be
 * made very carefully!</b>
 * <p>
 * All of the Progress operators are supported and the precedence order is as follows:
 * <pre>
 * lowest  OR (logical)
 *    |    AND (logical)
 *    |    OR (bitwise)
 *    |    XOR (bitwise)
 *    |    AND (bitwise)
 *    |    NOT (logical)
 *    |    NOT (bitwise)
 *    |    =, EQ, &lt;&gt;, NE, &lt;, LT, &gt;, GT, &le;, LE, &ge;, GE, MATCHES, BEGINS, CONTAINS
 *    |    binary +, binary - 
 *    |    *, /, MODULO
 *    |    unary +, unary -
 *    |    DB_REF_NON_STATIC
 *    |    COLON (used as an invocation mechanism)
 * highest ( )
 * </pre>
 * <p>
 * Note that CONTAINS is only documented for use within a <code>WHERE</code>
 * clause, see {@link #record_phrase} and {@link #where_clause}.
 * <p>
 * The key problems that had to be solved for this implementation included: 
 * <ul>
 *    <li> Structuring the rules to implement the proper precedence AND to
 *         properly build a tree that could be correctly evaluated.
 *    <li> Ensuring that expressions properly nest (through recursion).
 *    <li> Eliminating ambiguity that would defeat the parser's lookahead 
 *         mechanisms.
 * </ul>
 * <p>
 * To handle the precedence issue, each precedence level (see the table
 * above) is handled in a separate rule.  Starting at in this top level
 * entry point, the lowest precedence rule is referenced. This reference is
 * made with an optional <code>KW_OR</code> operator.  If thus operator is
 * present, it is the root of the resulting tree.  This means it is the
 * last operator to be evaluated since its operands will be evaluated
 * first.  This is the proper definition of lowest precedence.  If this
 * operator is present, then a second operand is expected.
 * <p>
 * The only exceptions to this structure are the bitwise OR, AND and NOT
 * which don't actually conflict with the existing logical versions.  For
 * simplicity purposes, we simply match on the logical operator here. In
 * other words the tree would look the same so we are taking a shortcut.
 * The negative implication here is that the token type of the bitwise
 * versions is the same as the logical versions, but this is also the case
 * for the binary + and - operators which are actually 3 different operations
 * for numbers, dates and datetime values.
 * <p>
 * Each precedence level is similarly constructed, the left operand being
 * required, all operators being optional and each operator choice an equal 
 * alternative. If any of the operators exists, then it is the root of the
 * subtree and a right operand is expected.  This hold true for all rules
 * that process binary operators.    Please note that this left-mandatory
 * and optional right side (operator + right operand) is critical for
 * allowing an expression to be as simple as a single lvalue (variable or
 * field name), function call or literal. Alternatively, it can expand into
 * a highly nested set of recursively parsed expressions that all evaluate
 * to a single scalar result of one of the known Progress data types.
 * <p>
 * At the bottom of the hierarchy of rules are unary operators, these
 * are implemented as an optional prefix operator and a mandatory right
 * operand.
 * <p>
 * The final level is the primary expression.  This is where the precedence
 * operator parenthesis is handled.  It also is where we allow a single
 * lvalue, literal or function reference.  While the literals are fairly
 * easily defined, lvalues and functions are complicated by the fact that
 * they are used defined symbols and there is inherent ambiguity in the
 * definitions for each of these.  See {@link #lvalue} and {@link #func_call}
 * for more details on how this is resolved.
 * <p>
 * This rule is designed to allow recursion (the highest precedence levels
 * {@link #func_call} and {@link #primary_expr} reference this rule again,
 * allowing infinite nesting of sub-expressions, with proper parsing,
 * evaluation and tree building.
 * <p>
 * Ambiguity is primary caused by the potential overlap in the rules
 * referenced from {@link #primary_expr}.  This is caused by the fact that
 * multiple rule references made there must all allow for a user-defined
 * symbol to appear in the token stream.  Multiple rules all requiring
 * the same definition to appear is the definition of <b>ambiguity</b>!
 * See that rule for more details on the solution.
 * <p>
 * To the extent that is feasible, syntax checking is implemented in the
 * expression processing, however there is one important area of checking
 * that cannot be properly specified using the structure of the parser:
 * operand data type checking.  For this reason, such checking (when it is
 * implemented) will be built using validating semantic predicates.  The need
 * for this checking is limited based on the assumption that all input is
 * a valid Progress 4GL source file.
 * <p>
 * <code>ExpressionEvaluator</code> is dependent upon this entry
 * point.
 * <p>
 * Note that there is an ambiguity caused between the <code>OR</code> keyword
 * implemented in <code>expr</code> and by the use of the <code>OR</code>
 * keyword in a <code>WHEN</code> clause (additional WHEN conditions can
 * be added to the same statement using an <code>OR WHEN condition</code>
 * syntax). Since the following condition is an expression, one must detect
 * the use of the following <code>WHEN</code> as the next token after the
 * <code>OR</code> to disambiguate. The <code>expr</code> rule which 
 * implements the logical <code>OR</code> processing thus uses a semantic
 * predicate to terminate expression processing (and not match on the
 * <code>OR</code> in the case where lookahead 2 is the reserved keyword
 * <code>WHEN</code>.  Ambiguity warnings are disabled since this trick  
 * resolves the issue.
 * <p>
 * When this is called from a parser that is invoked with the top level
 * entry point {@link #external_proc}, this rule will root the resulting
 * subtree in an artificial token <code>EXPRESSION</code>.  Otherwise, this
 * method is used directly and no artificial root is created.
 * <p>
 * The {link #log_and_expr} is called as the only rule reference.  This rule
 * matches both logical and bitwise OR.
 */
	public final void expr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast expr_AST = null;
		Aast lae_AST = null;
		Token  kwo = null;
		Aast kwo_AST = null;
		
		try {      // for error handling
			
			// tracks the re-entrancy of this rule, if this is 0 on entry, then
			// this has been no recursion yet...
			exprLvl++;         
			
			log_and_expr();
			lae_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1643:
			do {
				if (((LA(1)==KW_OR) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(2) != KW_WHEN )) {
					kwo = LT(1);
					kwo_AST = (Aast)astFactory.create(kwo);
					astFactory.makeASTRoot(currentAST, kwo_AST);
					match(KW_OR);
					
					if (isEnum(lae_AST))
					{
					saveAndReplaceType(kwo_AST, BITWISE_OR);
					}
					
					checkExtraSpace(kwo_AST, false);
					matchAssign = false;
					
					log_and_expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1643;
				}
				
			} while (true);
			}
			expr_AST = (Aast)currentAST.root;
			
			// only make an artificial root at the first entry into this rule
			// (as opposed to subsequent recursive entries) and if the parser
			// is operating from the top level entry point
			if (topLevelEntry && exprLvl == 1 && !skipExpression)
			{
			expr_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(EXPRESSION,"expression")).add(expr_AST));
			}
			
			if (!skipExpression)
			{
			exprLvl--;
			}
			
			currentAST.root = expr_AST;
			currentAST.child = expr_AST!=null &&expr_AST.getFirstChild()!=null ?
				expr_AST.getFirstChild() : expr_AST;
			currentAST.advanceChildToEnd();
			expr_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = expr_AST;
	}
	
/**
 * Matches all possible user-defined symbol names. A very important element
 * of this approach is that the set <b>must include unreserved keywords</b>.
 * This is important since this rule is referenced in many different parser
 * rules in order to add this set to the lookahead list for various
 * alternatives.  Since the lexer defaults all symbols to the more specific
 * token type (if they match an unreserved keyword), one will only encounter
 * a <code>SYMBOL</code> token type if there is no overlap with the
 * unreserved keyword namespace.  In other words, since the text
 * &quot;char&quot; matches both an unreserved keyword and a possible valid
 * user-defined symbol, the lexer will default the token type to 
 * <code>KW_CHAR</code>.  This is critical since the number of places in the
 * parser that expect a real <code>SYMBOL</code> type are few and the token
 * type can be overridden based on context.  If the reverse bias was made in
 * the lexer, then it would be virtually impossible to implement the parser
 * because Progress is both very keyword driven and highly context sensitive.
 * This means that the number of places in the parser that depend upon a
 * keyword match is significantly higher than those that expect a symbol
 * match.  Thus we bias the token types toward keywords and then override
 * the type in the few places where we <b>know</b> (based on context) that
 * the next token is a <code>SYMBOL</code> rather than a keyword.
 * <p>
 * This rule enables those explicit overrides and it is only used in the
 * following cases:
 * <ul>
 *    <li> The calling rule expects the next token to be a <code>SYMBOL</code>
 *         token type rather than a keyword.  An example is a 
 *         <code>DEFINE VARIABLE</code> statement, where must be a symbol
 *         type and cannot be a keyword, even though in any keyword conflict
 *         the lexer defaults to the keyword type.  This is handled by the
 *         init code of this method which rewrites the token type to be a
 *         <code>SYMBOL</code> if all of the following are true (in all other
 *         cases an exception is thrown):
 *       <ul>
 *          <li> The token type is not already <code>SYMBOL</code>.
 *          <li> There is a keyword conflict.
 *          <li> The keyword is unreserved.
 *       </ul>
 *    <li> The calling rule requires that its lookahead prediction include
 *         the set of all possible user-defined symbols, in order to ensure
 *         that the top level parser rules will properly select and invoke
 *         the calling rule <b>but the calling rule itself rewrites the
 *         token type and is designed to never actually invoke the
 *         <code>symbol</code> rule itself</b>.  In this case, we refer to
 *         this as using <code>symbol</code> for &quot;pull&quot; purposes
 *         only.  This trick is critical for making the {@link #lvalue} and       
 *         {@link #func_call} rules work!
 * </ul>
 * <p>
 * One more trick is used here to ensure that the set of all possible input
 * token types is matched. Since all of the unreserved keywords are
 * assigned artificial token types from a list maintained in the parser,
 * it is designed such that all of these token types are created in a
 * contiguous set that is bounded by <code>BEGIN_UNRESERVED</code> and
 * <code>END_UNRESERVED</code> token types.  This trick allows this rule to 
 * add the set of all unreserved keywords to the rule by specifying a
 * range starting and ending with these token types.  Note that ANTLR does
 * generate a <code>matchRange</code> call from this grammar but it does not
 * actually generate or provide the backing method!  Such a method was added
 * manually to satisfy this requirement.
 * <p>
 * It is very important to note that any actual invocation of this rule
 * (in cases where this isn't only used in pull mode) will cause the token
 * type to be rewritten as <code>SYMBOL</code> or an exception to be
 * thrown.  No other alternative will result, no matter what the actual
 * token type is on input.  Only call this rule if this is the expected
 * behavior or if pull mode is being used.  In the case of pull mode, it
 * is critical that the calling rule rewrite the token type in an init action
 * to ensure that the token type never causes an actual invocation of this
 * rule.
 */
	public final void symbol() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast symbol_AST = null;
		
		try {      // for error handling
			
			if (LA(1) != SYMBOL)
			{
			Keyword found = sym.lookupKeyword(LT(1).getText());
			if (found != null && !found.isReserved())
			{
			LT(1).setType(SYMBOL);
			}
			else
			{
			throw new NoViableAltException(LT(1), getFilename());
			}
			}
			
			{
			if ((LA(1)==SYMBOL)) {
				Aast tmp149_AST = null;
				tmp149_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp149_AST);
				match(SYMBOL);
			}
			else if (((LA(1) >= BEGIN_UNRESERVED && LA(1) <= END_UNRESERVED))) {
				Aast tmp150_AST = null;
				tmp150_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp150_AST);
				matchRange(BEGIN_UNRESERVED,END_UNRESERVED);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			symbol_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = symbol_AST;
	}
	
/**
 * Implements the reserved_or_symbol rule which matches symbols and reserved
 * or nonreserved keywords that have to be handled as symbols. It converts
 * matched tokens into SYMBOL type ones for consistency of the UAST. 
 */
	public final void reserved_or_symbol() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast reserved_or_symbol_AST = null;
		
		try {      // for error handling
			
			int oldtype = -1;
			
			if (LA(1) != SYMBOL)
			{
			oldtype = LA(1);
			LT(1).setType(SYMBOL);
			}
			
			{
			if (((LA(1) >= BEGIN_RESERVED && LA(1) <= END_RESERVED))) {
				Aast tmp151_AST = null;
				tmp151_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp151_AST);
				matchRange(BEGIN_RESERVED,END_RESERVED);
			}
			else if ((_tokenSet_15.member(LA(1)))) {
				symbol();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			reserved_or_symbol_AST = (Aast)currentAST.root;
			
			// save off original type from before token rewriting
			if (oldtype != -1)
			reserved_or_symbol_AST.putAnnotation("oldtype", Long.valueOf(oldtype));
			
			reserved_or_symbol_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = reserved_or_symbol_AST;
	}
	
/**
 * Matches the <code>DEFINE</code> Progress 4GL language statement and
 * switches into the correct alternative based on the lookahead tokens.
 * <p>
 * This rule is called by {@link #stmt_list} and it handles the matching
 * for the <code>DEFINE</code> keyword, the optional shared scope keywords
 * <code>NEW, GLOBAL, SHARED</code> and the optional keywords for parameter
 * types <code>INPUT, OUTPUT, INPUT-OUTPUT and RETURN</code>.  It then
 * calls the appropriate alternative to allow the specific processing to
 * occur.  The alternatives:  
 * <ul>
 *    <li> BROWSE {@link #def_browse_stmt}
 *    <li> BUTTON {@link #def_button_stmt}
 *    <li> BUFFER {@link #def_buf_stmt}
 *    <li> DATASET {@link #def_dataset_stmt}
 *    <li> DATA-SOURCE {@link #def_datasrc_stmt}
 *    <li> EVENT {@link #def_event_stmt}
 *    <li> FRAME {@link #def_frame_stmt}
 *    <li> IMAGE {@link #def_image_stmt}
 *    <li> MENU and SUB-MENU {@link #def_menu_stmt}
 *    <li> PARAMETER {@link #def_parm_stmt}
 *    <li> PROPERTY {@link #def_prop_stmt}
 *    <li> RECTANGLE {@link #def_rect_stmt}
 *    <li> STREAM {@link #def_stream_stmt}
 *    <li> QUERY {@link #def_query_stmt}
 *    <li> TEMP-TABLE (and WORK-TABLE/WORKFILE) {@link #def_temp_table_stmt}
 *    <li> VARIABLE {@link #def_var_stmt}
 * </ul>
 * <p>
 * This design allows all <code>DEFINE</code> statements to be supported
 * without ambiguity because it left-factors the common keyword.
 */
	public final void define_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast define_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Aast am_AST = null;
		Token  st = null;
		Aast st_AST = null;
		Token  ab = null;
		Aast ab_AST = null;
		Token  ov = null;
		Aast ov_AST = null;
		Aast t_AST = null;
		Token  k1 = null;
		Aast k1_AST = null;
		Token  k2 = null;
		Aast k2_AST = null;
		Token  k3 = null;
		Aast k3_AST = null;
		Token  k4 = null;
		Aast k4_AST = null;
		
		try {      // for error handling
			
			int     mtype      = -1;
			String  varname    = null;
			String  dsName    = null;
			String  tablename  = null;
			boolean force      = false;
			boolean fakeBuffer = false;
			Aast    likeast    = null;
			String  likename   = null;
			boolean tt_new     = false;
			boolean tt_global  = false;
			boolean tt_shared  = false;
			
			boolean saveInStatic = inStaticCtxt;
			boolean[] allowColon = new boolean[] { false };
			
			Object[] df = null;
			
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DEFINE);
			{
			_loop164:
			do {
				switch ( LA(1)) {
				case KW_PK_PRIV:
				case KW_PK_PROT:
				case KW_PRIVATE:
				case KW_PROTECTD:
				case KW_PUBLIC:
				{
					access_mode();
					am_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_SERIALAB:
				{
					Aast tmp152_AST = null;
					tmp152_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp152_AST);
					match(KW_SERIALAB);
					break;
				}
				case KW_NON_SER:
				{
					Aast tmp153_AST = null;
					tmp153_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp153_AST);
					match(KW_NON_SER);
					break;
				}
				case KW_STATIC:
				{
					st = LT(1);
					st_AST = (Aast)astFactory.create(st);
					astFactory.addASTChild(currentAST, st_AST);
					match(KW_STATIC);
					inStaticCtxt = true;
					break;
				}
				case KW_ABSTRACT:
				{
					ab = LT(1);
					ab_AST = (Aast)astFactory.create(ab);
					astFactory.addASTChild(currentAST, ab_AST);
					match(KW_ABSTRACT);
					break;
				}
				case KW_OVERRIDE:
				{
					ov = LT(1);
					ov_AST = (Aast)astFactory.create(ov);
					astFactory.addASTChild(currentAST, ov_AST);
					match(KW_OVERRIDE);
					break;
				}
				case KW_FINAL:
				{
					Aast tmp154_AST = null;
					tmp154_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp154_AST);
					match(KW_FINAL);
					break;
				}
				default:
				{
					break _loop164;
				}
				}
			} while (true);
			}
			{
			switch ( LA(1)) {
			case KW_DATA_SRC:
			case KW_DATASET:
			case KW_FRAME:
			case KW_NEW:
			case KW_QUERY:
			case KW_SHARED:
			case KW_STREAM:
			case KW_WORK_TAB:
			case KW_BROWSE:
			case KW_BUFFER:
			case KW_MENU:
			case KW_SUB_MENU:
			case KW_TEMP_TAB:
			case KW_VAR:
			{
				{
				if (((LA(1)==KW_NEW||LA(1)==KW_SHARED))&&( am_AST == null )) {
					{
					switch ( LA(1)) {
					case KW_NEW:
					{
						Aast tmp155_AST = null;
						tmp155_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp155_AST);
						match(KW_NEW);
						{
						switch ( LA(1)) {
						case KW_GLOBAL:
						{
							Aast tmp156_AST = null;
							tmp156_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp156_AST);
							match(KW_GLOBAL);
							tt_global = true;
							break;
						}
						case KW_SHARED:
						{
							break;
						}
						default:
						{
							throw new NoViableAltException(LT(1), getFilename());
						}
						}
						}
						tt_new = true;
						break;
					}
					case KW_SHARED:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					Aast tmp157_AST = null;
					tmp157_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp157_AST);
					match(KW_SHARED);
					tt_shared = true;
				}
				else if ((_tokenSet_7.member(LA(1)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				{
				switch ( LA(1)) {
				case KW_BROWSE:
				{
					varname=def_browse_stmt();
					astFactory.addASTChild(currentAST, returnAST);
					d_AST.setType(DEFINE_BROWSE);
					break;
				}
				case KW_BUFFER:
				{
					def_buf_stmt(true, false, (tt_shared && ! tt_new), am_AST, st_AST);
					astFactory.addASTChild(currentAST, returnAST);
					d_AST.setType(DEFINE_BUFFER);
					break;
				}
				case KW_DATASET:
				{
					dsName=def_dataset_stmt(am_AST, st_AST);
					astFactory.addASTChild(currentAST, returnAST);
					
					d_AST.setType(DEFINE_DATASET);
					// add the dataset to the namespace
					sym.addDataSet(dsName, DATA_SET, d_AST, am_AST, st_AST);
					
					break;
				}
				case KW_DATA_SRC:
				{
					dsName=def_datasrc_stmt(am_AST, st_AST);
					astFactory.addASTChild(currentAST, returnAST);
					
					d_AST.setType(DEFINE_DATA_SOURCE);
					// add the data source to the namespace
					sym.addDataSource(dsName, DATA_SOURCE, d_AST, am_AST, st_AST);
					
					break;
				}
				case KW_FRAME:
				{
					df=def_frame_stmt();
					astFactory.addASTChild(currentAST, returnAST);
					
					d_AST.setType(DEFINE_FRAME);
					
					String frame = (String) df[0];
					Aast fp = (Aast) df[1];
					setUseDictExps(frame, fp, d_AST);
					
					break;
				}
				case KW_MENU:
				case KW_SUB_MENU:
				{
					mtype=def_menu_stmt();
					astFactory.addASTChild(currentAST, returnAST);
					define_stmt_AST = (Aast)currentAST.root;
					
					if (mtype == WID_MENU)
					{
					d_AST.setType(DEFINE_MENU);
					}
					else
					{
					d_AST.setType(DEFINE_SUB_MENU);
					}
					varname = define_stmt_AST.getImmediateChild(SYMBOL, null).getText();
					
					likeast = define_stmt_AST.getImmediateChild(KW_LIKE, null);
					if (likeast != null)
					{
					likename = likeast.getImmediateChild(SYMBOL, null).getText();
					sym.addMenuLike(varname, likename, define_stmt_AST);
					}
					
					break;
				}
				case KW_QUERY:
				{
					def_query_stmt(am_AST, st_AST);
					astFactory.addASTChild(currentAST, returnAST);
					d_AST.setType(DEFINE_QUERY);
					break;
				}
				case KW_STREAM:
				{
					def_stream_stmt();
					astFactory.addASTChild(currentAST, returnAST);
					d_AST.setType(DEFINE_STREAM);
					break;
				}
				case KW_WORK_TAB:
				case KW_TEMP_TAB:
				{
					tablename=def_temp_table_stmt(tt_new, tt_global, tt_shared, am_AST, st_AST);
					t_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					fakeBuffer = true;
					if (t_AST.getType() == KW_TEMP_TAB)
					{
					d_AST.setType(DEFINE_TEMP_TABLE);
					}
					else
					{
					d_AST.setType(DEFINE_WORK_TABLE);
					}
					
					break;
				}
				case KW_VAR:
				{
					varname=def_var_stmt(allowColon, d_AST, am_AST, st_AST);
					astFactory.addASTChild(currentAST, returnAST);
					d_AST.setType(DEFINE_VARIABLE);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			case KW_INPUT:
			case KW_IN_OUT:
			case KW_OUTPUT:
			case KW_PARM:
			case KW_RETURN:
			{
				{
				switch ( LA(1)) {
				case KW_INPUT:
				{
					k1 = LT(1);
					k1_AST = (Aast)astFactory.create(k1);
					astFactory.addASTChild(currentAST, k1_AST);
					match(KW_INPUT);
					break;
				}
				case KW_OUTPUT:
				{
					k2 = LT(1);
					k2_AST = (Aast)astFactory.create(k2);
					astFactory.addASTChild(currentAST, k2_AST);
					match(KW_OUTPUT);
					break;
				}
				case KW_IN_OUT:
				{
					k3 = LT(1);
					k3_AST = (Aast)astFactory.create(k3);
					astFactory.addASTChild(currentAST, k3_AST);
					match(KW_IN_OUT);
					break;
				}
				case KW_RETURN:
				{
					k4 = LT(1);
					k4_AST = (Aast)astFactory.create(k4);
					astFactory.addASTChild(currentAST, k4_AST);
					match(KW_RETURN);
					break;
				}
				case KW_PARM:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				varname=def_parm_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				
				d_AST.setType(DEFINE_PARAMETER);
				if (k1_AST == null && k2_AST == null && k3_AST == null && k4_AST == null)
				{
				force = true;
				}
				
				break;
			}
			case KW_PROPERTY:
			{
				varname=def_prop_stmt(d_AST, am_AST, st_AST, ov_AST, ab_AST);
				astFactory.addASTChild(currentAST, returnAST);
				d_AST.setType(DEFINE_PROPERTY);
				break;
			}
			case KW_EVENTS:
			{
				varname=def_event_stmt(d_AST, am_AST, st_AST, ov_AST, ab_AST);
				astFactory.addASTChild(currentAST, returnAST);
				d_AST.setType(DEFINE_EVENT);
				break;
			}
			case KW_BUTTON:
			{
				varname=def_button_stmt(allowColon);
				astFactory.addASTChild(currentAST, returnAST);
				d_AST.setType(DEFINE_BUTTON);
				break;
			}
			case KW_RECT:
			{
				varname=def_rect_stmt(allowColon);
				astFactory.addASTChild(currentAST, returnAST);
				d_AST.setType(DEFINE_RECTANGLE);
				break;
			}
			case KW_IMAGE:
			{
				varname=def_image_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				d_AST.setType(DEFINE_IMAGE);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if (((LA(1)==COLON))&&( allowColon[0] )) {
				colon();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT)) {
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			define_stmt_AST = (Aast)currentAST.root;
			
			inStaticCtxt = saveInStatic;
			
			if (varname != null)
			{
			postDefineVar(varname, define_stmt_AST, am_AST, st_AST, force);
			}
			
			if (dsName != null)
			{
			sym.setDatasetOptions(null, false, dsName, define_stmt_AST, d_AST.getType(), true);
			}
			
			if (fakeBuffer)
			{
			postDefineBuf(tablename, define_stmt_AST);
			}
			
			define_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = define_stmt_AST;
	}
	
/**
 * Matches a <code>DEFINE BROWSE</code> Progress 4GL language statement.
 * This is the statement that defines or imports a new user-named browse
 * widget.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional shared scope for
 * browses.  This rule supports shared or local buffers and the syntax for
 * both declaring or defining (<code>NEW</code> keyword) shared buffers. 
 * HOWEVER, all the matching for these optional keywords is done in the
 * <code>define_stmt</code> rule. This refactoring allows all 
 * <code>DEFINE</code> statements to be supported without ambiguity.
 * <p>
 * This rule matches the <code>BROWSE</code> keyword and all subsequent
 * processing.  Calls {@link #symbol}, {@link #query_reference} and
 * {@link #column_spec} rules.
 * <p>
 * This rule adds the browse's name to the widget namespace.
 * <p>
 * Supports the Progress undocumented feature that the query_reference and
 * the column_spec can be optional (missing).  But even if they are missing,
 * the {@link #browse_options_phrase} can still be included.  For this reason,
 * the browse_options_phrase is directly referenced instead of being included
 * at the end of the column_spec.
 * <p>
 * @return   The variable name of the browse that was defined.
 */
	public final String  def_browse_stmt() throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_browse_stmt_AST = null;
		Token  br = null;
		Aast br_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			{
			br = LT(1);
			br_AST = (Aast)astFactory.create(br);
			match(KW_BROWSE);
			hide(br);
			symbol();
			b_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			// this must be done here (as soon as the symbol is processed
			// since the browse name can be referenced later in the same
			// language stmt and so the namespace must include this widget
			// (e.g. a validate() option in the column_spec is one example
			// of how it could be referenced)
			varname = b_AST.getText();         
			sym.addWidget(varname, WID_BROWSE);
			
			{
			if ((((LA(1) >= FILEROOT && LA(1) <= JUNK)) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_DISP && LA(1) != KW_WITH )) {
				query_reference();
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop188:
				do {
					if ((LA(1)==KW_EXC_LOCK||LA(1)==KW_NO_LOCK||LA(1)==KW_SH_LOCK) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						{
						switch ( LA(1)) {
						case KW_SH_LOCK:
						{
							Aast tmp158_AST = null;
							tmp158_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp158_AST);
							match(KW_SH_LOCK);
							break;
						}
						case KW_EXC_LOCK:
						{
							Aast tmp159_AST = null;
							tmp159_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp159_AST);
							match(KW_EXC_LOCK);
							break;
						}
						case KW_NO_LOCK:
						{
							Aast tmp160_AST = null;
							tmp160_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp160_AST);
							match(KW_NO_LOCK);
							break;
						}
						default:
						{
							throw new NoViableAltException(LT(1), getFilename());
						}
						}
						}
					}
					else if ((LA(1)==KW_NO_WAIT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						Aast tmp161_AST = null;
						tmp161_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp161_AST);
						match(KW_NO_WAIT);
					}
					else {
						break _loop188;
					}
					
				} while (true);
				}
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((LA(1)==KW_DISP) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_DISP )) {
				{
				column_spec();
				astFactory.addASTChild(currentAST, returnAST);
				}
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				_loop192:
				do {
					if ((LA(1)==KW_WITH) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						browse_options_phrase();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop192;
					}
					
				} while (true);
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			def_browse_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_browse_stmt_AST;
		return varname;
	}
	
/**
 * Matches the <code>DEFINE DATASET</code> language statement.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional access modes or sharing
 * options.
 * <p>
 * This rule matches the <code>DATASET</code> keyword and a following
 * {@link #symbol}. The {@link #namespace_clause} can be matched optionally.
 * Then there is always a match to {@link #for_record_spec}. At the end is
 * the use of {@link #data_relation}.
 * <p>
 * The dataset name will be added to a unique namespace such that the
 * dataset can be referenced as a handle and provided as a parameter.
 * <p>
 * Customer source code shows the DATA-RELATION is optional even though the
 * Progress docs state otherwise. This must be an undocumented feature.
 *
 * @param    am
 *           Access modifiers if not null. Only will be non-null if this is a resource defined
 *           as a member of a class definition.
 * @param    st
 *           Static specifier if not null. Only will be non-null if this is a resource defined
 *           as a member of a class definition.
 *
 * @return  The legacy name of the dataset defined. 
 */
	public final String  def_dataset_stmt(
		Aast am, Aast st
	) throws RecognitionException, TokenStreamException {
		String dsname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_dataset_stmt_AST = null;
		Token  ds = null;
		Aast ds_AST = null;
		Aast d_AST = null;
		Aast f_AST = null;
		
		try {      // for error handling
			
			int idx = 1;
			int pidx = 1;
			
			ds = LT(1);
			ds_AST = (Aast)astFactory.create(ds);
			match(KW_DATASET);
			hide(ds);
			symbol();
			d_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			dsname = d_AST.getText();
			{
			_loop213:
			do {
				switch ( LA(1)) {
				case KW_NAMESP_P:
				case KW_NAMESP_U:
				{
					namespace_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_XML_NNAM:
				{
					xml_node_name();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_XML_NTYP:
				{
					xml_node_type();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_SERIALZN:
				{
					serialize_name();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_SERIALZH:
				{
					Aast tmp162_AST = null;
					tmp162_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp162_AST);
					match(KW_SERIALZH);
					break;
				}
				case KW_REF_ONLY:
				{
					Aast tmp163_AST = null;
					tmp163_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp163_AST);
					match(KW_REF_ONLY);
					break;
				}
				default:
				{
					break _loop213;
				}
				}
			} while (true);
			}
			for_record_spec(false, false, false);
			f_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop215:
			do {
				if ((LA(1)==KW_DATA_REL) && (_tokenSet_45.member(LA(2))) && (_tokenSet_46.member(LA(3)))) {
					data_relation(idx);
					astFactory.addASTChild(currentAST, returnAST);
					idx++;
				}
				else if ((LA(1)==KW_PAR_IREL) && (_tokenSet_45.member(LA(2))) && (_tokenSet_46.member(LA(3)))) {
					parent_id_relation(pidx);
					astFactory.addASTChild(currentAST, returnAST);
					pidx++;
				}
				else {
					break _loop215;
				}
				
			} while (true);
			}
			
			Aast   child     = (Aast) f_AST.getFirstChild();
			String signature = "";
			
			while (child != null)
			{
			int type = child.getType();
			
			if (type == BUFFER || type == TEMP_TABLE)
			{
			String s = (String) child.getAnnotation("db_signature");
			
			if (s == null)
			{
			String err = String.format("Missing 'db_signature' for record: %s", child.dumpTree());
			throw new RuntimeException(err);
			}
			
			signature += "<" + s + ">";
			}
			
			child = (Aast) child.getNextSibling();
			}
			
			if (signature.length() == 0)
			{
			String err2 = String.format("Empty 'db_signature' for dataset: %s", ds_AST.dumpTree());
			throw new RuntimeException(err2);
			}
			
			// annotate the SYMBOL node in the definition (will be the first child of DEFINE_DATASET) 
			d_AST.putAnnotation("db_signature", signature);
			
			def_dataset_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_dataset_stmt_AST;
		return dsname;
	}
	
/**
 * Matches the <code>DEFINE DATA-SOURCE</code> language statement.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional access modes or sharing
 * options.
 * <p>
 * This rule matches the <code>DATA-SOURCE</code> keyword and a following
 * {@link #symbol}. Then there can be a match to {@link #query_reference}
 * or multiple {@link #source_buffer_phrase} references.
 * <p>
 * The data source name will be added to a unique namespace such that the
 * data source can be referenced as a handle and provided as a parameter.
 *
 * @param    am
 *           Access modifiers if not null. Only will be non-null if this is a resource defined
 *           as a member of a class definition.
 * @param    st
 *           Static specifier if not null. Only will be non-null if this is a resource defined
 *           as a member of a class definition.
 *
 * @return  The legacy name of the data source defined.
 */
	public final String  def_datasrc_stmt(
		Aast am, Aast st
	) throws RecognitionException, TokenStreamException {
		String daname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_datasrc_stmt_AST = null;
		Token  ds = null;
		Aast ds_AST = null;
		Aast d_AST = null;
		
		try {      // for error handling
			ds = LT(1);
			ds_AST = (Aast)astFactory.create(ds);
			match(KW_DATA_SRC);
			hide(ds);
			symbol();
			d_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			daname = d_AST.getText();
			Aast tmp164_AST = null;
			tmp164_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp164_AST);
			match(KW_FOR);
			{
			{
			if ((((LA(1) >= FILEROOT && LA(1) <= JUNK)) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_QUERY )) {
				query_reference();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((_tokenSet_13.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				source_buffer_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop221:
				do {
					if ((LA(1)==COMMA) && (_tokenSet_13.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						source_buffer_phrase();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop221;
					}
					
				} while (true);
				}
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			def_datasrc_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_datasrc_stmt_AST;
		return daname;
	}
	
/**
 * Matches a <code>DEFINE FRAME</code> Progress 4GL language statement
 * which is nearly identical to the {@link #form_stmt}.
 * <p>
 * The tricky part of this statement is handling the options in any order and
 * resolving the ambiguity between the record and field specifications.  
 * Records are disambiguated from fields (records take precedence when there
 * is a name conflict) by trying to do a lookup, if it fails the record is
 * no matched (see {@link #record_spec}) and instead the {@link #form_item} 
 * is checked.  By carefully ordering of these options and using a semantic
 * predicate, the ambiguity is resolved.  For this reason, ambiguity warnings
 * have been disabled.
 * <p>
 * Called by {@link #define_stmt}. Uses {@link #record_spec}, 
 * {@link #form_item} and {@link #frame_phrase} to properly build the AST.
 *
 * @return    An array with index 0 the frame name and on index 1 the frame_phrase AST.
 */
	public final Object[]  def_frame_stmt() throws RecognitionException, TokenStreamException {
		Object[] d = new Object[2];
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_frame_stmt_AST = null;
		Token  fr = null;
		Aast fr_AST = null;
		Aast f_AST = null;
		Aast fp_AST = null;
		
		try {      // for error handling
			
			Set<Aast> fields      = new HashSet<>();
			boolean   hadFormItem = false;
			boolean   hadRecord   = false;
			boolean   hadHeader   = false;
			
			fr = LT(1);
			fr_AST = (Aast)astFactory.create(fr);
			match(KW_FRAME);
			hide(fr);
			malformed_symbol();
			f_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop284:
			do {
				if ((LA(1)==KW_DROP_TAR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp165_AST = null;
					tmp165_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp165_AST);
					match(KW_DROP_TAR);
				}
				else if ((LA(1)==KW_BACKGRND||LA(1)==KW_HEADER) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_HEADER:
					{
						Aast tmp166_AST = null;
						tmp166_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp166_AST);
						match(KW_HEADER);
						break;
					}
					case KW_BACKGRND:
					{
						Aast tmp167_AST = null;
						tmp167_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp167_AST);
						match(KW_BACKGRND);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					hadHeader = true;
				}
				else if (((_tokenSet_13.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( (LA(2) == DOT || LA(2) == KW_WITH || LA(2) == KW_HEADER || LA(2) == KW_BACKGRND) &&
             !hadFormItem                                                                     &&
             !hadHeader                                                                       &&
             isRecord(LT(1).getText()) )) {
					record_spec(fields);
					astFactory.addASTChild(currentAST, returnAST);
					hadRecord = true;
				}
				else if (((_tokenSet_24.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
              !(LA(1) == DOT || LA(1) == KW_WITH || LA(1) == KW_HEADER || LA(1) == KW_BACKGRND) &&
              (!hadRecord || hadHeader)
           )) {
					form_item(fields);
					astFactory.addASTChild(currentAST, returnAST);
					hadFormItem = true;
				}
				else if ((LA(1)==KW_WITH) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					frame_phrase(false, false);
					fp_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop284;
				}
				
			} while (true);
			}
			
			String frame = f_AST.getText();
			sym.addFrame(frame, WID_FRAME);
			if (!fields.isEmpty())
			{
			sym.addFrameFields(frame, fields);
			}
			
			d[0] = frame;
			d[1] = fp_AST;
			
			def_frame_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_frame_stmt_AST;
		return d;
	}
	
/**
 * Matches a <code>DEFINE MENU or DEFINE SUB-MENU</code> Progress 4GL
 * language statement. This is the statement that defines user-named 
 * menus and sub-menus.  Menus are stored in their own namespace which is
 * separate from the other widgets.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword.
 * <p>
 * This rule matches the <code>MENU or SUB-MENU</code> keywords and all
 * subsequent processing.  Calls the following rules:
 * <p>
 * {@link #symbol}
 * {@link #ui_stuff}
 * {@link #simple_title_string}
 * {@link #like_menu_clause}
 * {@link #menu_element_descriptor}
 * <p>
 * All options can be processed in any order.
 * <p>
 * An undocumented "feature" (found in customer code) is that Progress will
 * ignore a <code>DOT</code> in between <code>MENU-ITEM</code> clauses. In
 * other words, it will silently drop that extra character if the period
 * is followed by the <code>MENU-ITEM</code> or <code>RULE</code> keywords.
 * Presumably, the <code>SUB-MENU</code> and <code>SKIP</code> keywords also
 * have this effect but it hasn't been confirmed yet.
 */
	public final int  def_menu_stmt() throws RecognitionException, TokenStreamException {
		int mtype = -1;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_menu_stmt_AST = null;
		Token  me = null;
		Aast me_AST = null;
		Token  sub = null;
		Aast sub_AST = null;
		Aast m_AST = null;
		
		try {      // for error handling
			
			mtype = WID_MENU;
			
			{
			switch ( LA(1)) {
			case KW_MENU:
			{
				me = LT(1);
				me_AST = (Aast)astFactory.create(me);
				match(KW_MENU);
				hide(me);
				break;
			}
			case KW_SUB_MENU:
			{
				sub = LT(1);
				sub_AST = (Aast)astFactory.create(sub);
				match(KW_SUB_MENU);
				hide(sub);
				mtype = WID_SUB_MENU;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			symbol();
			m_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop258:
			do {
				if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TITLE||LA(1)==KW_MENU_BAR||LA(1)==KW_SUB_M_H) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_MENU_BAR:
					{
						Aast tmp168_AST = null;
						tmp168_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp168_AST);
						match(KW_MENU_BAR);
						break;
					}
					case KW_SUB_M_H:
					{
						Aast tmp169_AST = null;
						tmp169_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp169_AST);
						match(KW_SUB_M_H);
						break;
					}
					case KW_TITLE:
					{
						simple_title_string();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((_tokenSet_48.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_LIKE:
					{
						like_menu_clause();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_SKIP:
					case KW_MENU_ITM:
					case KW_RULE:
					case KW_SUB_MENU:
					{
						menu_element_descriptor();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if (((LA(1)==DOT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( (LA(2) == KW_MENU_ITM && LA(4) != COLON) || 
             (LA(2) == KW_SUB_MENU && LA(4) != COLON) ||
             LA(2) == KW_RULE     || LA(2) == KW_SKIP )) {
					stmt_term();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop258;
				}
				
			} while (true);
			}
			
			sym.addMenu(m_AST.getText(), mtype);
			
			def_menu_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_menu_stmt_AST;
		return mtype;
	}
	
/**
 * Matches a <code>DEFINE QUERY</code> Progress 4GL language statement.
 * This is the statement that defines or imports a new user-named query.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional shared scope for
 * browses.  This rule supports shared or local buffers and the syntax for
 * both declaring or defining (<code>NEW</code> keyword) shared buffers. 
 * HOWEVER, all the matching for these optional keywords is done in the
 * <code>define_stmt</code> rule. This refactoring allows all 
 * <code>DEFINE</code> statements to be supported without ambiguity.
 * <p>
 * This rule matches the <code>QUERY</code> keyword and all subsequent
 * processing.  Calls {@link #malformed_symbol}, {@link #for_record_spec} and
 * {@link #cache_records} rules.
 *
 * @param    am
 *           Access modifiers if not null. Only will be non-null if this is a resource defined
 *           as a member of a class definition.
 * @param    st
 *           Static specifier if not null. Only will be non-null if this is a resource defined
 *           as a member of a class definition.
 */
	public final void def_query_stmt(
		Aast am, Aast st
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_query_stmt_AST = null;
		Aast q_AST = null;
		
		try {      // for error handling
			Aast tmp170_AST = null;
			tmp170_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp170_AST);
			match(KW_QUERY);
			malformed_symbol();
			q_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			for_record_spec(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop195:
			do {
				if ((LA(1)==KW_CACHE) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					cache_records();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SCROLLIN) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp171_AST = null;
					tmp171_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp171_AST);
					match(KW_SCROLLIN);
				}
				else if ((LA(1)==KW_RCOD_INF) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp172_AST = null;
					tmp172_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp172_AST);
					match(KW_RCOD_INF);
				}
				else {
					break _loop195;
				}
				
			} while (true);
			}
			
			sym.addQuery(q_AST.getText(), q_AST, QUERY, am, st);
			
			def_query_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_query_stmt_AST;
	}
	
/**
 * Matches a <code>DEFINE STREAM</code> Progress 4GL language statement.
 * This is the statement that defines or imports new user-named stream.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional shared scope for
 * buffers.  This rule supports shared or local buffers and the syntax for
 * both declaring or defining (<code>NEW</code> keyword) shared buffers. 
 * HOWEVER, all the matching for these optional keywords is done in the
 * <code>define_stmt</code> rule. This refactoring allows all 
 * <code>DEFINE</code> statements to be supported without ambiguity.
 * <p>
 * This rule matches the <code>STREAM</code> keyword and the required
 * stream name. This rule is similar to the {@link #lvalue}
 * but it is separated such that namespace additions can be done without
 * impacting that rule.
 */
	public final void def_stream_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_stream_stmt_AST = null;
		Aast stream_AST = null;
		
		try {      // for error handling
			Aast tmp173_AST = null;
			tmp173_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp173_AST);
			match(KW_STREAM);
			malformed_symbol();
			stream_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			sym.addStream(stream_AST.getText(), STREAM);
			def_stream_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_stream_stmt_AST;
	}
	
/**
 * Matches a <code>DEFINE TEMP-TABLE or DEFINE WORK-TABLE</code> Progress 4GL
 * language statement (note that <code>WORKFILE</code> is a synonym for
 * <code>WORK-TABLE</code> and is handled as such. This is the statement that
 * defines or imports new user-named temp-tables and work-tables for a
 * procedure (internal or external).  
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional shared scope for
 * variables, temp-tables and streams.  This rule supports shared, global
 * shared or local variables and the syntax for both declaring or defining
 * (<code>NEW</code> keyword) shared variables.  HOWEVER, all the matching
 * for these optional keywords is done in the <code>define_stmt</code> rule. 
 * This refactoring allows all <code>DEFINE</code> statements to be supported
 * without ambiguity.
 * <p> 
 * This rule matches the <code>TEMP-TABLE, WORK-TABLE or WORKFILE</code>
 * keywords and then calls other rules to implement the different
 * alternatives.
 * <p>
 * Since field name references within this statement can be unambiguous
 * even when they are ambiguous outside of this statement, a schema scope
 * is added and removed at the beginning and end of this rule.  Then anytime
 * fields are added to the table, the definition in this scope is refreshed
 * which makes the latest definition available to subsequent matching in
 * this rule.
 * <p>
 * Calls the following:
 * <p>
 * <ul>
 *    <li> {@link #symbol}
 *    <li> {@link #like_clause}
 *    <li> {@link #add_temp_table_field}
 *    <li> {@link #index_clause}
 * </ul>
 *
 * @param    tt_new
 *           <code>true</code> if this is a new shared or new global shared temp-table.
 * @param    tt_global
 *           <code>true</code> if this is a global shared temp-table.
 * @param    tt_shared
 *           <code>true</code> if this is a shared temp-table.
 * @param    am
 *           Access modifiers if not null. Only will be non-null if this is a resource defined
 *           as a member of a class definition.
 * @param    st
 *           Static specifier if not null. Only will be non-null if this is a resource defined
 *           as a member of a class definition.
 */
	public final String  def_temp_table_stmt(
		boolean tt_new, boolean tt_global, boolean tt_shared, Aast am, Aast st
	) throws RecognitionException, TokenStreamException {
		String tablename = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_temp_table_stmt_AST = null;
		Token  tt = null;
		Aast tt_AST = null;
		Token  wt = null;
		Aast wt_AST = null;
		Aast t_AST = null;
		Token  ku = null;
		Aast ku_AST = null;
		Token  kr = null;
		Aast kr_AST = null;
		Aast bt_AST = null;
		
		try {      // for error handling
			
			NameNode table   = null;
			int      tabType = TEMP_TABLE;
			String   b4table = null;
			
			sym.addSchemaScope(false);
			
			{
			{
			switch ( LA(1)) {
			case KW_TEMP_TAB:
			{
				tt = LT(1);
				tt_AST = (Aast)astFactory.create(tt);
				astFactory.makeASTRoot(currentAST, tt_AST);
				match(KW_TEMP_TAB);
				break;
			}
			case KW_WORK_TAB:
			{
				wt = LT(1);
				wt_AST = (Aast)astFactory.create(wt);
				astFactory.makeASTRoot(currentAST, wt_AST);
				match(KW_WORK_TAB);
				tabType = WORK_TABLE;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			symbol();
			t_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			Aast node = (tt_AST == null) ? wt_AST : tt_AST;
			if (tt_shared)
			{
			node.putAnnotation("tt_shared", true);
			if (tt_global)
			{
			node.putAnnotation("tt_global", true);
			}
			if (tt_new)
			{
			node.putAnnotation("tt_new", true);
			}
			}
			// always add temp-tables/work-tables into the global scope
			table = sym.addTable(t_AST.getText(), tabType, true, node, am, st);
			
			{
			_loop1420:
			do {
				if ((LA(1)==KW_NO_UNDO) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ku = LT(1);
					ku_AST = (Aast)astFactory.create(ku);
					astFactory.addASTChild(currentAST, ku_AST);
					match(KW_NO_UNDO);
					sym.setTableOption(table, KW_NO_UNDO, ku_AST);
				}
				else if ((LA(1)==KW_UNDO) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp174_AST = null;
					tmp174_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp174_AST);
					match(KW_UNDO);
				}
				else if ((LA(1)==KW_LABEL) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					label(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_RCOD_INF) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					kr = LT(1);
					kr_AST = (Aast)astFactory.create(kr);
					astFactory.addASTChild(currentAST, kr_AST);
					match(KW_RCOD_INF);
					sym.setTableOption(table, KW_RCOD_INF, kr_AST);
				}
				else if ((LA(1)==KW_REF_ONLY) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp175_AST = null;
					tmp175_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp175_AST);
					match(KW_REF_ONLY);
				}
				else if ((LA(1)==KW_XML_NNAM) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					xml_node_name();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SERIALZN) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					serialize_name();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NAMESP_P||LA(1)==KW_NAMESP_U) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					namespace_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_B4_TABLE) && (_tokenSet_15.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					b4table=before_table_clause();
					bt_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_LIKE||LA(1)==KW_LIKE_SEQ) && (_tokenSet_49.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					like_clause(t_AST.getText(), table, true);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_50.member(LA(1))) && (_tokenSet_51.member(LA(2))) && (_tokenSet_52.member(LA(3)))) {
					add_temp_table_field(table);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1)==KW_INDEX) && (_tokenSet_53.member(LA(2))) && (_tokenSet_54.member(LA(3))))&&( tabType == TEMP_TABLE )) {
					index_clause(table);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1420;
				}
				
			} while (true);
			}
			}
			def_temp_table_stmt_AST = (Aast)currentAST.root;
			
			sym.finalizeTableDefine(table, def_temp_table_stmt_AST);
			sym.deleteSchemaScope(false);
			
			tablename = t_AST.getText();
			
			// handle the before-table definition which was deferred because it must only be done
			// after the main table is fully defined (otherwise the fields, indexes and so forth
			// may not be present)
			if (b4table != null)
			{
			NameNode before = sym.addTable(b4table, TEMP_TABLE, true, bt_AST, null, null);
			before.getAst().putAnnotation("after-table", table.getName());
			table.getAst().putAnnotation("before-table", b4table);
			Aast[] fields = sym.addFieldsFrom(before, tablename);
			
			for (int i = 0; i < fields.length; i++)
			{
			Aast mandAst = fields[i].getImmediateChild(KW_MAND, null);
			if (mandAst != null)
			{
			mandAst.remove();
			}
			sym.processLikeField(fields[i], false, tablename + "." + fields[i].getText());
			}
			
			// add the 'rowState' index on the '__row-state__' field
			Aast idxAst = (Aast)astFactory.make( (new ASTArray(1)).add((Aast)astFactory.create(INDEX,"rowState")));
			Aast idxFieldAst = (Aast)astFactory.make( (new ASTArray(1)).add((Aast)astFactory.create(INDEX_FIELD,"__row-state__")));
			idxAst.graft(idxFieldAst);
			before.getAst().graft(idxAst);
			
			if (ku_AST != null)
			{
			sym.setTableOption(before, KW_NO_UNDO, ku_AST);
			}
			
			sym.finalizeTableDefine(before, null);
			}
			
			def_temp_table_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_temp_table_stmt_AST;
		return tablename;
	}
	
/**
 * Matches a <code>DEFINE VARIABLE</code> Progress 4GL language statement.
 * This is the statement that defines or imports new user-named variables.  
 * The {@link #symbol} rule is used to force the token type for the variable
 * name to be a <code>SYMBOL</code>.  Then this name is passed as a parameter
 * to the {@link #as_clause} or {@link #like_clause} rules, which add this
 * variable to the variable dictionary associating it with the correct data 
 * type.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional shared scope for
 * variables, temp-tables and streams.  This rule supports shared, global
 * shared or local variables and the syntax for both declaring or defining
 * (<code>NEW</code> keyword) shared variables.  HOWEVER, all the matching
 * for these optional keywords is done in the <code>define_stmt</code> rule. 
 * This refactoring allows all <code>DEFINE</code> statements to be supported
 * without ambiguity.
 * <p>
 * Multiple options are supported in any order (which is how Progress handles
 * these), however this code does not check for a repeated definition of
 * the options.
 * <p>
 * This rule implements all logic needed to define and initialize array
 * variables (using the <code>EXTENT</code>, <code>INITIAL [ ,,, ]</code>
 * and <code>LABEL string, string...</code> syntax.  These option rules are
 * all implemented as separate rules to force a clean tree structure for 
 * each option rather than accepting a flat structure where all options and
 * any associated data are all created as siblings.  Instead, each option
 * subtree is created under its associated keyword's token and this is a
 * child of the <code>DEFINE</code> keyword.
 *
 * @param    allowColon
 *           Set to <code>true</code> on return to tell the calling code to match either
 *           a DOT or a COLON to end the statement (this will be set only if a triggers
 *           phrase is matched).
 * @param    ds
 *           The definition node for this member.
 * @param    am
 *           Access mode node if specified.
 * @param    st
 *           Static node if specified.
 *
 * @return   The variable name that is being defined.
 */
	public final String  def_var_stmt(
		boolean[] allowColon, Aast ds, Aast am, Aast st
	) throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_var_stmt_AST = null;
		Token  va = null;
		Aast va_AST = null;
		Aast s_AST = null;
		Aast res_AST = null;
		Aast non_res_AST = null;
		Aast a_AST = null;
		Aast l_AST = null;
		
		try {      // for error handling
			
			boolean view_as_triggered = false;
			boolean handle            = false;
			boolean object            = false;
			int     ftype             = -1;
			int     size              = 0; // no-extent
			boolean had_as_clause     = false;
			boolean inClass           = (sym.getCurrentClassDef() != null);
			int     initcount         = -1;
			boolean containsExtent    = false;
			
			va = LT(1);
			va_AST = (Aast)astFactory.create(va);
			match(KW_VAR);
			hide(va);
			{
			if (((_tokenSet_15.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( !inClass )) {
				symbol();
				s_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				varname = s_AST.getText();
			}
			else if (((_tokenSet_1.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( inClass && !inMethodDef )) {
				any_symbol_at_all();
				res_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				varname = res_AST.getText();
			}
			else if (((_tokenSet_53.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( inClass && inMethodDef )) {
				any_non_reserved_symbol();
				non_res_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				varname = non_res_AST.getText();
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop1073:
			do {
				if ((LA(1)==KW_AS) && (_tokenSet_0.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					as_clause(varname, false);
					a_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					ftype = a_AST.getFirstChild().getType();
					
					if (ftype == KW_HANDLE   ||
					ftype == KW_WID_HAND ||
					ftype == KW_COM_HNDL)
					{
					handle = true;
					}
					
					if (ftype == CLASS_NAME)
					{
					object = true;
					}
					
					if (had_as_clause)
					{
					System.out.println(
					String.format("Multiple AS clauses for the [%s] var definition at " + 
					"line %d column %d", 
					varname, a_AST.getLine(), a_AST.getColumn()));
					}
					else
					{
					had_as_clause = true;
					}
					
				}
				else if ((LA(1)==KW_LIKE||LA(1)==KW_LIKE_SEQ) && (_tokenSet_49.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					like_clause(varname, null, false);
					l_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					ftype = l_AST.getFirstChild().getType();
					
					if (ftype == VAR_HANDLE     ||
					ftype == VAR_COM_HANDLE ||
					ftype == FIELD_HANDLE   ||
					ftype == FIELD_COM_HANDLE)
					{
					handle = true;
					}
					
					if (ftype == VAR_CLASS    ||
					ftype == FIELD_CLASS)
					{
					object = true;
					}
					
				}
				else if ((LA(1)==KW_EXTENT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					size=extent();
					astFactory.addASTChild(currentAST, returnAST);
					containsExtent = true;
				}
				else if ((LA(1)==KW_INIT) && (_tokenSet_55.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					initcount=initializer(ftype);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SERIALZN) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					serialize_name();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_LABEL) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					label(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_FORMAT) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					format_string(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_COL_LAB) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					column_label();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DECIMALS) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					decimals_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DROP_TAR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp176_AST = null;
					tmp176_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp176_AST);
					match(KW_DROP_TAR);
				}
				else if ((LA(1)==KW_CASE_SEN||LA(1)==KW_NOT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					case_sensitive();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NO_UNDO) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp177_AST = null;
					tmp177_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp177_AST);
					match(KW_NO_UNDO);
				}
				else if ((LA(1)==KW_VIEW_AS) && (_tokenSet_56.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					view_as_phrase(varname);
					astFactory.addASTChild(currentAST, returnAST);
					view_as_triggered = true;
				}
				else if ((LA(1)==KW_TRIGGERS) && (LA(2)==DOT||LA(2)==COLON) && (LA(3)==KW_END||LA(3)==KW_ON)) {
					trigger_phrase();
					astFactory.addASTChild(currentAST, returnAST);
					allowColon[0] = true;
				}
				else {
					break _loop1073;
				}
				
			} while (true);
			}
			
			// Handle the situation where there may have been an initializer but no explicit extent
			// initcount != -1 and size == -1 would be indicative of this.
			if (containsExtent)
			{
			size = (size == -1 && initcount != -1) ? initcount : size;
			}
			
			// if no explicit override occurred AND if the type is not a handle AND not an object
			// add a fill-in widget to the widget namespace, with the same name (handle,
			// com-handle and object lvalues cannot be frame fields)
			// TODO: do we need to do this with RAW, MEMPTR types too?
			if (view_as_triggered == false && !handle && !object)
			{
			sym.addWidget(varname, WID_FILL_IN);
			}
			
			processMember(varname, DEFINE_VARIABLE, ds, (a_AST != null) ? a_AST : l_AST, am, st, null, null, size);
			
			def_var_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_var_stmt_AST;
		return varname;
	}
	
/**
 * Matches a <code>DEFINE PARAMETER</code> Progress 4GL language statement.
 * This is the statement that defines or imports new user-named parameters
 * for a procedure (internal or external).  
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional shared scope for
 * variables, temp-tables and streams.  This rule supports shared, global
 * shared or local variables and the syntax for both declaring or defining
 * (<code>NEW</code> keyword) shared variables.  HOWEVER, all the matching
 * for these optional keywords is done in the <code>define_stmt</code> rule. 
 * This refactoring allows all <code>DEFINE</code> statements to be supported
 * without ambiguity.
 * <p> 
 * This rule matches the <code>PARAMETER</code> keyword and then calls
 * other rules to implement the different alternatives.
 * <p>
 * Calls {@link #regular_parm}, {@link #table_parm} and {@link #def_buf_stmt}.
 *
 * @return   The variable name of the variable that was defined or
 *           <code>null</code> if this is a record or buffer reference
 *           instead.
 */
	public final String  def_parm_stmt() throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_parm_stmt_AST = null;
		Token  p = null;
		Aast p_AST = null;
		
		try {      // for error handling
			p = LT(1);
			p_AST = (Aast)astFactory.create(p);
			match(KW_PARM);
			hide(p);
			{
			if ((_tokenSet_57.member(LA(1))) && (_tokenSet_58.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				varname=table_parm();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_BUFFER) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				def_buf_stmt(false, false, false, null, null);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_15.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				varname=regular_parm(p_AST, null);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			def_parm_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_parm_stmt_AST;
		return varname;
	}
	
/**
 * Matches a <code>DEFINE PROPERTY</code> Progress 4GL language statement. This is the statement that
 * defines new user-named properties for the currently active class definition.
 * <p> 
 * The {@link #any_symbol_at_all} rule is used to force the token type for the property name to be a
 * <code>SYMBOL</code>. That means property names can be reserved keywords. Then this name is passed as a
 * parameter to the {@link #as_clause} rule, which adds this property to the dictionary for the class
 * definition, associating it with the correct data type.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching on the <code>DEFINE</code>
 * keyword and the optional shared scope for variables, temp-tables and streams.  This rule supports an
 * optional {@link #access_mode}.  HOWEVER, all the matching for these optional keywords is done in the
 * <code>define_stmt</code> rule. This refactoring allows all <code>DEFINE</code> statements to be supported
 * without ambiguity.
 * <p>
 * Multiple options are supported in any order (which is how Progress handles these), however this code
 * does not check for a repeated definition of the options.
 * <p>
 * The option sub-rules are all implemented as separate rules to force a clean tree structure for each
 * option rather than accepting a flat structure where all options and any associated data are all created
 * as siblings.  Instead, each option subtree is created under its associated keyword's token and this is
 * a child of the <code>DEFINE</code> keyword.
 * <p>
 * An undocumented quirk in the 4GL is that there can be more than one getter or more than one setter.
 *
 * @param    ds
 *           The definition node for this member.
 * @param    am
 *           Access mode node if specified.
 * @param    st
 *           Static node if specified.
 * @param    ov
 *           Override node if specified.
 * @param    ab
 *           Abstract node if specified.
 *
 * @return   The property name being defined.
 */
	public final String  def_prop_stmt(
		Aast ds, Aast am, Aast st, Aast ov, Aast ab
	) throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_prop_stmt_AST = null;
		Token  pr = null;
		Aast pr_AST = null;
		Aast s_AST = null;
		Aast a_AST = null;
		Aast gs1_AST = null;
		Aast gs2_AST = null;
		
		try {      // for error handling
			
			int ftype = -1;
			int size  = 0; // no-extent
			int initcount = -1;
			boolean containsExtent = false;
			
			pr = LT(1);
			pr_AST = (Aast)astFactory.create(pr);
			match(KW_PROPERTY);
			hide(pr);
			any_symbol_at_all();
			s_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			varname = s_AST.getText();
			{
			_loop1076:
			do {
				switch ( LA(1)) {
				case KW_AS:
				{
					as_clause(varname, false);
					a_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					ftype = a_AST.getFirstChild().getType();
					
					break;
				}
				case KW_EXTENT:
				{
					size=extent();
					astFactory.addASTChild(currentAST, returnAST);
					containsExtent = true;
					break;
				}
				case KW_INIT:
				{
					initcount=initializer(ftype);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_SERIALZN:
				{
					serialize_name();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_NO_UNDO:
				{
					Aast tmp178_AST = null;
					tmp178_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp178_AST);
					match(KW_NO_UNDO);
					break;
				}
				default:
				{
					break _loop1076;
				}
				}
			} while (true);
			}
			
			// Handle the situation where there may have been an initializer but no explicit extent
			// initcount != -1 and size == -1 would be indicative of this.
			if (containsExtent)
			{
			size = (size == -1 && initcount != -1) ? initcount : size;
			}
			
			// this MUST be done before the getter_setter because references to the property
			// inside those blocks will otherwise be missing some property-specific annotations
			processMember(varname, DEFINE_PROPERTY, ds, a_AST, am, st, ov, ab, size);
			
			
			boolean getter = false;
			boolean setter = false;
			
			getter_setter();
			gs1_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			getter = getter || gs1_AST.getType() == KW_GET;
			setter = setter || gs1_AST.getType() == KW_SET;
			
			{
			_loop1078:
			do {
				if ((LA(1)==DOT) && (_tokenSet_59.member(LA(2))) && (_tokenSet_60.member(LA(3)))) {
					stmt_term();
					astFactory.addASTChild(currentAST, returnAST);
					getter_setter();
					gs2_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					getter = getter || gs2_AST.getType() == KW_GET;
					setter = setter || gs2_AST.getType() == KW_SET;
					
				}
				else {
					break _loop1078;
				}
				
			} while (true);
			}
			
			sym.postProcessProperty(varname, getter, setter);
			
			def_prop_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_32);
		}
		returnAST = def_prop_stmt_AST;
		return varname;
	}
	
/**
 * Matches a <code>DEFINE EVENT</code> Progress 4GL language statement.
 * This is the statement that defines new user-named events for the
 * currently active class definition.
 * <p> 
 * The {@link #any_symbol_at_all} rule is used to force the token type for the
 * event name to be a <code>SYMBOL</code>.  Then this name is passed added
 * to the dictionary for the class definition, associating it with the correct
 * data type.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional shared scope for
 * variables, temp-tables and streams.  This rule supports an optional
 * {@link #access_mode}.  HOWEVER, all the matching for these optional
 * keywords is done in the <code>define_stmt</code> rule. This refactoring 
 * allows all <code>DEFINE</code> statements to be supported without
 * ambiguity.
 * <p>
 * Multiple options are supported in any order (which is how Progress handles
 * these), however this code does not check for a repeated definition of
 * the options.
 * <p>
 * The option sub-rules are all implemented as separate rules to force a
 * clean tree structure for each option rather than accepting a flat
 * structure where all options and any associated data are all created as
 * siblings.  Instead, each option subtree is created under its associated
 * keyword's token and this is a child of the <code>DEFINE</code> keyword.
 *
 * @param    ds
 *           The definition node for this member.
 * @param    am
 *           Access mode node if specified.
 * @param    st
 *           Static node if specified.
 * @param    ov
 *           Override node if specified.
 * @param    ab
 *           Abstract node if specified.
 *
 * @return   The event name being defined.
 */
	public final String  def_event_stmt(
		Aast ds, Aast am, Aast st, Aast ov, Aast ab
	) throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_event_stmt_AST = null;
		Token  ev = null;
		Aast ev_AST = null;
		Aast s_AST = null;
		Aast es_AST = null;
		
		try {      // for error handling
			ev = LT(1);
			ev_AST = (Aast)astFactory.create(ev);
			match(KW_EVENTS);
			hide(ev);
			any_symbol_at_all();
			s_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			varname = s_AST.getText();
			
			// here is where we enable the variable lookup for all subsequent
			// code in this scope, note that Progress only seems to ever have
			// 2 levels of scope: the external proc and any internal proc/
			// trigger defs, since you can only define shared or global shared
			// vars in the external proc scope, we should *not* need to
			// explicitly add vars to the global scope since adding to the
			// current scope should be equivalent
			sym.addLocalVariable(varname, CLASS_EVENT, null);
			
			sym.addScope();
			
			{
			if ((LA(1)==KW_SIGNATUR||LA(1)==KW_VOID) && (LA(2)==KW_VOID||LA(2)==LPARENS) && (_tokenSet_61.member(LA(3)))) {
				event_signature();
				es_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				dotnet_delegate();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			sym.deleteScope();
			processMember(varname, DEFINE_EVENT, ds, es_AST, am, st, ov, ab, 0);
			
			def_event_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_event_stmt_AST;
		return varname;
	}
	
/**
 * Matches a <code>DEFINE BUTTON</code> Progress 4GL language statement.
 * This is the statement that defines user-named button widgets.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword.
 * <p>
 * This rule matches the <code>BUTTON</code> keyword and all subsequent
 * processing.  Calls the following rules:
 * <p>
 * {@link #symbol}
 * {@link #ui_stuff}
 * {@link #image_stuff}
 * {@link #label}
 * {@link #like_widget_clause}
 * {@link #size_phrase}
 * {@link #no_focus_clause}
 * {@link #tooltip_clause}
 * {@link #trigger_phrase}
 * <p>
 * All options can be processed in any order.
 * <p>
 * This supports the undocumented <code>MARGIN-EXTRA</code> option.
 * <p>
 * This rule updates the widget namespace with the new button widget however
 * there is no backing variable for this widget.
 *
 * @param    allowColon
 *           Set to <code>true</code> on return to tell the calling code to match either
 *           a DOT or a COLON to end the statement (this will be set only if a triggers
 *           phrase is matched).
 *
 * @return   The variable name of the button that was defined.
 */
	public final String  def_button_stmt(
		boolean[] allowColon
	) throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_button_stmt_AST = null;
		Token  but = null;
		Aast but_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			{
			but = LT(1);
			but_AST = (Aast)astFactory.create(but);
			match(KW_BUTTON);
			hide(but);
			symbol();
			b_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop272:
			do {
				if ((LA(1)==KW_AUTO_END||LA(1)==KW_AUTO_GO) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_AUTO_GO:
					{
						Aast tmp179_AST = null;
						tmp179_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp179_AST);
						match(KW_AUTO_GO);
						break;
					}
					case KW_AUTO_END:
					{
						Aast tmp180_AST = null;
						tmp180_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp180_AST);
						match(KW_AUTO_END);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_DEFAULT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp181_AST = null;
					tmp181_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp181_AST);
					match(KW_DEFAULT);
				}
				else if ((LA(1)==KW_DROP_TAR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp182_AST = null;
					tmp182_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp182_AST);
					match(KW_DROP_TAR);
				}
				else if ((LA(1)==KW_MARG_EX) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp183_AST = null;
					tmp183_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp183_AST);
					match(KW_MARG_EX);
				}
				else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_62.member(LA(1))) && (_tokenSet_63.member(LA(2))) && (_tokenSet_24.member(LA(3)))) {
					image_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_LABEL) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					label(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_LIKE) && (_tokenSet_64.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					like_widget_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1) >= KW_SIZE && LA(1) <= KW_SIZE_P)) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==KW_BY)) {
					size_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NO_FOCUS) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					no_focus_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NO_CV_3D) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp184_AST = null;
					tmp184_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp184_AST);
					match(KW_NO_CV_3D);
				}
				else if ((LA(1)==KW_TOOLTIP) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tooltip_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TRIGGERS) && (LA(2)==DOT||LA(2)==COLON) && (LA(3)==KW_END||LA(3)==KW_ON)) {
					trigger_phrase();
					astFactory.addASTChild(currentAST, returnAST);
					allowColon[0] = true;
				}
				else {
					break _loop272;
				}
				
			} while (true);
			}
			}
			
			varname = b_AST.getText();
			sym.addWidget(varname, WID_BUTTON);
			
			def_button_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_button_stmt_AST;
		return varname;
	}
	
/**
 * Matches a <code>DEFINE RECTANGLE</code> Progress 4GL language statement.
 * This is the statement that defines user-named rectangle widgets.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword.
 * <p>
 * This rule matches the <code>RECTANGLE</code> keyword and all subsequent
 * processing.  Calls the following rules:
 * <p>
 * {@link #symbol}
 * {@link #edge_clause}
 * {@link #ui_stuff}
 * {@link #like_widget_clause}
 * {@link #size_phrase}
 * {@link #tooltip_clause}
 * {@link #trigger_phrase}
 * <p>
 * All options can be processed in any order.
 * <p>
 * This rule updates the widget namespace with the new rectangle widget
 * however there is no backing variable for this widget.
 *
 * @param    allowColon
 *           Set to <code>true</code> on return to tell the calling code to match either
 *           a DOT or a COLON to end the statement (this will be set only if a triggers
 *           phrase is matched).
 *
 * @return   The rectangle name that is being defined.
 */
	public final String  def_rect_stmt(
		boolean[] allowColon
	) throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_rect_stmt_AST = null;
		Token  re = null;
		Aast re_AST = null;
		Aast r_AST = null;
		
		try {      // for error handling
			re = LT(1);
			re_AST = (Aast)astFactory.create(re);
			match(KW_RECT);
			hide(re);
			symbol();
			r_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop275:
			do {
				if ((LA(1)==KW_NO_FILL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp185_AST = null;
					tmp185_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp185_AST);
					match(KW_NO_FILL);
				}
				else if ((LA(1)==KW_GRAPHIC) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp186_AST = null;
					tmp186_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp186_AST);
					match(KW_GRAPHIC);
				}
				else if ((LA(1)==KW_ROUNDED) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp187_AST = null;
					tmp187_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp187_AST);
					match(KW_ROUNDED);
				}
				else if ((LA(1)==KW_GROUP_BX) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp188_AST = null;
					tmp188_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp188_AST);
					match(KW_GROUP_BX);
				}
				else if ((LA(1)==KW_EDGE_C||LA(1)==KW_EDGE_P) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					edge_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_LIKE) && (_tokenSet_64.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					like_widget_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1) >= KW_SIZE && LA(1) <= KW_SIZE_P)) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==KW_BY)) {
					size_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TOOLTIP) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tooltip_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TRIGGERS) && (LA(2)==DOT||LA(2)==COLON) && (LA(3)==KW_END||LA(3)==KW_ON)) {
					trigger_phrase();
					astFactory.addASTChild(currentAST, returnAST);
					allowColon[0] = true;
				}
				else {
					break _loop275;
				}
				
			} while (true);
			}
			
			varname = r_AST.getText();
			sym.addWidget(r_AST.getText(), WID_RECT);
			
			def_rect_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_rect_stmt_AST;
		return varname;
	}
	
/**
 * Matches a <code>DEFINE IMAGE</code> Progress 4GL language statement.
 * This is the statement that defines user-named image widgets.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword.
 * <p>
 * This rule matches the <code>IMAGE</code> keyword and all subsequent
 * processing.  Calls the following rules:
 * <p>
 * {@link #symbol}
 * {@link #ui_stuff}
 * {@link #stretch_to_fit_clause}
 * {@link #image_phrase}
 * {@link #like_widget_clause}
 * {@link #size_phrase}
 * {@link #tooltip_clause}
 * <p>
 * All options can be processed in any order. In addition to these rules,
 * the <code>CONVERT-3D-COLORS</code> and <code>TRANSPARENT</code> options
 * can be specified.
 * <p>
 * This rule updates the widget namespace with the new image widget however
 * there is no backing variable for this widget.
 *
 * @return   The variable name of the browse that was defined.
 */
	public final String  def_image_stmt() throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_image_stmt_AST = null;
		Token  im = null;
		Aast im_AST = null;
		Aast i_AST = null;
		
		try {      // for error handling
			im = LT(1);
			im_AST = (Aast)astFactory.create(im);
			match(KW_IMAGE);
			hide(im);
			symbol();
			i_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop278:
			do {
				if ((LA(1)==KW_CVT_3D_C) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp189_AST = null;
					tmp189_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp189_AST);
					match(KW_CVT_3D_C);
				}
				else if ((LA(1)==KW_TRANSPAR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp190_AST = null;
					tmp190_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp190_AST);
					match(KW_TRANSPAR);
				}
				else if ((LA(1)==KW_ST_2_FIT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					stretch_to_fit_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_63.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					image_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_LIKE) && (_tokenSet_64.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					like_widget_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1) >= KW_SIZE && LA(1) <= KW_SIZE_P)) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==KW_BY)) {
					size_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TOOLTIP) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tooltip_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop278;
				}
				
			} while (true);
			}
			
			varname = i_AST.getText();
			sym.addWidget(varname, WID_IMAGE);
			
			def_image_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_image_stmt_AST;
		return varname;
	}
	
/**
 * Matches a <code>DEFINE PROPERTY</code> Progress 4GL language statement.
 * This is the statement that defines new user-named properties for the
 * currently active class definition.
 * <p> 
 * The {@link #any_symbol_at_all} rule is used to force the token type for the
 * property name to be a <code>SYMBOL</code>. That means property names can
 * be reserved keywords. Then this name is passed as a parameter
 * to the {@link #as_clause} rule, which adds this property to the dictionary
 * for the class definition, associating it with the correct data type.
 * <p>
 * This rule is called by {@link #define_stmt} which is where the matching
 * on the <code>DEFINE</code> keyword and the optional shared scope for
 * variables, temp-tables and streams.  This rule supports an optional
 * {@link #access_mode}.  HOWEVER, all the matching for these optional
 * keywords is done in the <code>define_stmt</code> rule. This refactoring 
 * allows all <code>DEFINE</code> statements to be supported without
 * ambiguity.
 * <p>
 * Multiple options are supported in any order (which is how Progress handles
 * these), however this code does not check for a repeated definition of
 * the options.
 * <p>
 * The option sub-rules are all implemented as separate rules to force a
 * clean tree structure for each option rather than accepting a flat
 * structure where all options and any associated data are all created as
 * siblings.  Instead, each option subtree is created under its associated
 * keyword's token and this is a child of the <code>DEFINE</code> keyword.
 * <p>
 * This is the same as <code>def_prop_stmt</code> except there is no support for getters and
 * setters.
 *
 * @param    ds
 *           The definition node for this member.
 * @param    am
 *           Access mode node if specified.
 * @param    st
 *           Static node if specified.
 * @param    ov
 *           Override node if specified.
 * @param    ab
 *           Abstract node if specified.
 *
 * @return   The property name being defined.
 */
	public final String  def_prop_stmt_pre_scan(
		Aast ds, Aast am, Aast st, Aast ov, Aast ab
	) throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast def_prop_stmt_pre_scan_AST = null;
		Token  pr = null;
		Aast pr_AST = null;
		Aast s_AST = null;
		Aast a_AST = null;
		
		try {      // for error handling
			
			int ftype = -1;
			int size  = 0; // no-extent
			int initcount = -1;
			boolean containsExtent = false;
			
			pr = LT(1);
			pr_AST = (Aast)astFactory.create(pr);
			match(KW_PROPERTY);
			hide(pr);
			any_symbol_at_all();
			s_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			varname = s_AST.getText();
			{
			_loop1081:
			do {
				if ((LA(1)==KW_AS) && (_tokenSet_0.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					as_clause(varname, false);
					a_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					ftype = a_AST.getFirstChild().getType();
					
				}
				else if ((LA(1)==KW_EXTENT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					size=extent();
					astFactory.addASTChild(currentAST, returnAST);
					containsExtent = true;
				}
				else if ((LA(1)==KW_INIT) && (_tokenSet_55.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					initcount=initializer(ftype);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SERIALZN) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					serialize_name();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NO_UNDO) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp191_AST = null;
					tmp191_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp191_AST);
					match(KW_NO_UNDO);
				}
				else {
					break _loop1081;
				}
				
			} while (true);
			}
			
			// Handle the situation where there may have been an initializer but no explicit extent
			// initcount != -1 and size == -1 would be indicative of this.
			if (containsExtent)
			{
			size = (size == -1 && initcount != -1) ? initcount : size;
			}
			
			processMember(varname, DEFINE_PROPERTY, ds, a_AST, am, st, ov, ab, size);
			
			def_prop_stmt_pre_scan_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = def_prop_stmt_pre_scan_AST;
		return varname;
	}
	
/**
 * Implements the <code>TABLE</code>, <code>DATASET</code>, <code>TABLE-HANDLE</code> and
 * <code>DATASET-HANDLE</code> logic for parameter definitions (see {@link #def_parm_stmt}).
 * <p>
 * One would expect that this method has a major namespace update role, since normal parameter
 * processing requires this.  In fact, only the form which references a table handle or dataset
 * handle updates the namespace (the variable namespace in this case).  In this case the
 * {@link #symbol} rule is called and the resulting name is added as a variable of type
 * <code>VAR_HANDLE</code>.
 * <p>
 * All forms (no matter the caller) that reference a temp-table or dataset name are in fact
 * referencing a resource that must have been statically defined previously in the procedure.
 * This means that the associated namespace updates have already occurred and this rule simply
 * accesses  this data via a lookup in the called {@link #record} rule (in the case of a table)
 * or directly (in the case of a dataset).
 *
 * @return   The variable name of the handle variable that was defined or
 *           <code>null</code> if this is a record or dataset name reference.
 */
	public final String  table_parm() throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast table_parm_AST = null;
		Token  f = null;
		Aast f_AST = null;
		Aast t_AST = null;
		Aast d_AST = null;
		
		try {      // for error handling
			
			boolean handle = false;
			boolean dset   = false;
			
			NameNode nothing = null;
			
			{
			{
			switch ( LA(1)) {
			case KW_TABLE:
			{
				Aast tmp192_AST = null;
				tmp192_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp192_AST);
				match(KW_TABLE);
				break;
			}
			case KW_TAB_HAND:
			{
				Aast tmp193_AST = null;
				tmp193_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp193_AST);
				match(KW_TAB_HAND);
				handle = true;
				break;
			}
			case KW_DATASET:
			{
				Aast tmp194_AST = null;
				tmp194_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp194_AST);
				match(KW_DATASET);
				dset = true;
				break;
			}
			case KW_DSET_HND:
			{
				Aast tmp195_AST = null;
				tmp195_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp195_AST);
				match(KW_DSET_HND);
				handle = true;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==KW_FOR) && (_tokenSet_58.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				f = LT(1);
				f_AST = (Aast)astFactory.create(f);
				astFactory.addASTChild(currentAST, f_AST);
				match(KW_FOR);
			}
			else if ((_tokenSet_58.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((_tokenSet_15.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( handle && f_AST == null )) {
				symbol();
				t_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				varname = t_AST.getText();
				sym.addLocalVariable(varname, VAR_HANDLE, null);
				
			}
			else if (((_tokenSet_24.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( handle && f_AST != null )) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_15.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( dset )) {
				symbol();
				d_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				// this will be a problem later if it is not found
				// TODO: need to check if explicit static/instance qualifiers can be used here
				// TODO: need to check implicit static/instance (based on the surrounding code)
				d_AST.setType(sym.lookupDataSet(d_AST.getText()));
				
				// CA: for both tables and data-sets, I think this needs to add a new definition,
				// hiding the 'FOR src' one; this can be visible if you use the BY-REFERENCE 
				// option: the handle IDs will be different than as it appears at the 'FOR src';
				// until BY-REFERENCE is used, the handle IDs (buffer and temp-table, or dataset)
				// for the local parameter and the src are the same; FWD emits the references
				// local to the procedure as 'src' references, instead of local references - which
				// doesn't look to be correct, when taking BY-REFERENCE into account. 
				sym.setDatasetOptions(currentClassName,
				currentStaticFlag,
				d_AST.getText(),
				(Aast) d_AST,
				d_AST.getType(),
				false);
				
			}
			else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				nothing=record(false, false, false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop449:
			do {
				if ((LA(1)==KW_APPEND) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp196_AST = null;
					tmp196_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp196_AST);
					match(KW_APPEND);
				}
				else if ((LA(1)==KW_BY_VALUE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp197_AST = null;
					tmp197_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp197_AST);
					match(KW_BY_VALUE);
				}
				else if ((LA(1)==KW_BIND) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp198_AST = null;
					tmp198_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp198_AST);
					match(KW_BIND);
				}
				else {
					break _loop449;
				}
				
			} while (true);
			}
			}
			table_parm_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = table_parm_AST;
		return varname;
	}
	
/**
 * Implements the core logic for the <code>DEFINE PARAMETER</code> Progress
 * 4GL language statement. This is the statement that defines named parameters
 * in procedures (external or internal).  The {@link #symbol} rule is used to
 * force the token type for the variable name to be a <code>SYMBOL</code>.
 *  Then this name is passed as a parameter to the {@link #as_clause} or
 * {@link #like_clause} rules, which add this variable to the variable
 * dictionary associating it with the correct data type.
 * <p>
 * This rule is called by {@link #def_parm_stmt} which is where the matching
 * on the <code>PARAMETER</code> keyword is done.
 * <p>
 * Multiple options are supported in any order (which is how Progress handles
 * these), however this code does not check for a repeated definition of
 * the options. Note that as an undocumented feature, Progress also allows
 * that the AS and LIKE clauses can be provided after other options. This is
 * supported.  In fact, these clauses can be optional in certain circumstances.
 * <p>
 * These option rules are all implemented as separate rules to force a clean 
 * tree structure for each option rather than accepting a flat structure
 * where all options and any associated data are all created as siblings.
 * Instead, each option subtree is created under its associated keyword's 
 * token and this is a child of the <code>PARAMETER</code> keyword in the
 * calling rule.
 *
 * @param    param
 *           The parameter AST where to save the extent annotation, if set. May be null.
 * @param    likeRef
 *           An <code>Aast</code> of a field/variable to be copyed in a LIKE -like in the event
 *           that the param does not contain any AS or LIKE clauses.
 *
 * @return   The new variable's name.
 */
	public final String  regular_parm(
		Aast param, Aast likeRef
	) throws RecognitionException, TokenStreamException {
		String varname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast regular_parm_AST = null;
		Aast s_AST = null;
		Aast a_AST = null;
		Aast l_AST = null;
		
		try {      // for error handling
			
			int vtype = -1;
			int size  = -1;
			int initcount = -1;
			boolean containsExtent = false;
			
			symbol();
			s_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			varname = s_AST.getText();
			{
			_loop452:
			do {
				if ((LA(1)==KW_AS) && (_tokenSet_0.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					as_clause(varname, true);
					a_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					vtype = a_AST.getFirstChild().getType();
					
				}
				else if ((LA(1)==KW_LIKE||LA(1)==KW_LIKE_SEQ) && (_tokenSet_49.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					like_clause(varname, null, false);
					l_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					vtype = l_AST.getFirstChild().getType();
					
				}
				else if ((LA(1)==KW_INIT) && (_tokenSet_55.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					initcount=initializer(vtype);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_EXTENT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					size=extent();
					astFactory.addASTChild(currentAST, returnAST);
					containsExtent = true;
				}
				else if ((LA(1)==KW_LABEL) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					label(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_FORMAT) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					format_string(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_COL_LAB) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					column_label();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DECIMALS) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					decimals_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CASE_SEN||LA(1)==KW_NOT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					case_sensitive();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NO_UNDO) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp199_AST = null;
					tmp199_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp199_AST);
					match(KW_NO_UNDO);
				}
				else {
					break _loop452;
				}
				
			} while (true);
			}
			
			// Handle the situation where there may have been an initializer but no explicit extent
			// initcount != -1 and size == -1 would be indicative of this.
			if (containsExtent)
			{
			size = (size == -1 && initcount != -1) ? initcount : size;
			
			// Move this from the matching of extent, so we could handle the initcount scenario
			if ((size == -1 || size > 0) && param != null) 
			{
			param.putAnnotation("extent", Long.valueOf(size));
			}
			}
			
			if (vtype == -1) // neither as_clause nor like_clause were processed
			{
			if (likeRef != null)
			{
			sym.addLocalVariableLike(varname, likeRef);
			}
			else
			{
			// throw incomplete parameter definition in regular_parm
			}
			}
			
			regular_parm_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = regular_parm_AST;
		return varname;
	}
	
/**   
 * Matches the <code>QUERY</code> keyword and the required query name that
 * is coded as a {@link #malformed_symbol}. 
 * <p>
 * Used by {@link #def_browse_stmt}, {@link #reposition_stmt} and
 * {@link #get_stmt} rules.
 * <p>
 * This rule naturally duplicates a small subset of what can be matched
 * via {@link #lvalue}.  This is done to keep usage that is known to be
 * hard coded to this subset, unambiguous.
 * <p>
 * This is a separate rule to centralize logic and build the AST properly.
 */
	public final void query_reference() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast query_reference_AST = null;
		Aast q_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==KW_QUERY) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp200_AST = null;
				tmp200_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp200_AST);
				match(KW_QUERY);
			}
			else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			malformed_symbol();
			q_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			q_AST.setType(QUERY);
			
			// TODO: need to check if explicit static/instance qualifiers can be used here
			// TODO: need to check implicit static/instance (based on the surrounding code)
			if (sym.lookupQuery(q_AST.getText()) != QUERY)
			{
			System.out.println(
			String.format("Warning: lookup of query '%s' failed at line %d column %d", 
			q_AST.getText(),
			q_AST.getLine(),
			q_AST.getColumn()));
			}
			
			query_reference_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = query_reference_AST;
	}
	
/**
 * Matches the column specification for a <code>DEFINE BROWSE</code>   
 * language statement which is started by a <code>DISPLAY</code> keyword.
 * This is followed by either a record (and optional exclude list of fields)
 * or an expression and optional {@link #column_format_phrase} and
 * {@link #at_base_field_clause}. This record or expression is documented as
 * required but customer source has shown this to actually be optional.
 * <p>
 * Calls {@link #record_spec} and {@link #browse_enable_phrase} rules.
 * <p>
 * Note that Progress supports an undocumented use of {@link #space_or_skip}
 * as a column specification.
 * <p>
 * Called by {@link #def_browse_stmt}.
 * <p>
 * DISPLAY statement doens't pull schema VALEXP or HELP, so this will not use
 * {@link #attachAssignSchemaValidation}.
 */
	public final void column_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast column_spec_AST = null;
		Token  bd = null;
		Aast bd_AST = null;
		Aast r_AST = null;
		Aast e_AST = null;
		Aast cfp_AST = null;
		Aast be_AST = null;
		
		try {      // for error handling
			
			Set<String> exceptFields = new HashSet<>();
			Set<String> enabledFields = new HashSet<>();
			Map<String, Aast> fields2format = new HashMap<>();
			boolean hadColumnSpec = false;
			
			bd = LT(1);
			bd_AST = (Aast)astFactory.create(bd);
			astFactory.makeASTRoot(currentAST, bd_AST);
			match(KW_DISP);
			{
			if (((_tokenSet_13.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( 
              !hadColumnSpec                                                                 &&
              (LA(2) == KW_EXCEPT || LA(2) == KW_WITH || LA(2) == KW_ENABLE || LA(2) == DOT) &&
              isRecord(LT(1).getText()) &&
              !isQualifiedFieldNameQuirk(LT(1), LT(2), LT(3))
           )) {
				record_spec(null);
				r_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_ENABLE && LA(1) != KW_WITH )) {
				{
				_loop412:
				do {
					if ((LA(1)==KW_SKIP||LA(1)==KW_SPACE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						space_or_skip();
						astFactory.addASTChild(currentAST, returnAST);
						hadColumnSpec = true;
					}
					else if (((_tokenSet_24.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_ENABLE && LA(1) != KW_WITH )) {
						expr();
						e_AST = (Aast)returnAST;
						astFactory.addASTChild(currentAST, returnAST);
						{
						if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
							column_format_phrase();
							cfp_AST = (Aast)returnAST;
							astFactory.addASTChild(currentAST, returnAST);
							
							Aast fieldRef = e_AST;
							while (fieldRef.getType() == EXPRESSION)
							{
							fieldRef = (Aast) fieldRef.getFirstChild();
							}
							
							if (fieldRef.getType() > BEGIN_FIELDTYPES && 
							fieldRef.getType() < END_FIELDTYPES)
							{
							fields2format.put((String) fieldRef.getAnnotation("schemaname"), cfp_AST);
							}
							
						}
						else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						
						}
						hadColumnSpec = true;
					}
					else {
						break _loop412;
					}
					
				} while (true);
				}
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_ENABLE) && (_tokenSet_66.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				browse_enable_phrase(enabledFields, exceptFields);
				be_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop415:
			do {
				if ((LA(1)==KW_WITH) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					browse_options_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop415;
				}
				
			} while (true);
			}
			column_spec_AST = (Aast)currentAST.root;
			
			// if there is ENABLE phrase, pull the schema valexp; otherwise, omit it, as it will not
			// be used.
			
			if (be_AST != null)
			{
			if (r_AST != null)
			{
			// if there is ENABLE ALL, nothing else to do; otherwise, add to EXCEPT all fields
			// which are not part of ENABLE
			if (!be_AST.downPath(KW_ALL))
			{
			String tableSchemaName = (String) r_AST.getAnnotation("schemaname");
			Iterator<Aast> fieldIter = sym.fields(tableSchemaName);
			while (fieldIter.hasNext())
			{
			Aast schemaRef = fieldIter.next();
			String fieldSchemaName = tableSchemaName + "." + 
			schemaRef.getText().toLowerCase();
			
			if (!enabledFields.contains(fieldSchemaName))
			{
			exceptFields.add(fieldSchemaName);
			}
			}
			}
			
			Aast fp = (Aast)astFactory.create(FRAME_PHRASE,"");
			
			attachAllAssignSchemaValidation(fp, r_AST, sym, exceptFields);
			
			if (fp.getNumImmediateChildren() > 0)
			{
			column_spec_AST.addChild(fp);
			}
			}
			else
			{
			Aast child = null;
			if (be_AST.downPath(KW_ALL))
			{
			// walk the DISPLAY fields
			child = (Aast) bd_AST.getFirstChild();
			}
			else
			{
			// walk the ENABLE fields
			child = (Aast) be_AST.getFirstChild();
			}
			
			// we have an explicit list of fields, maybe from different tables; we need to
			// walk the ENABLE field references explicitly
			while (child != null)
			{
			Aast fieldRef = child;
			while (fieldRef.getType() == EXPRESSION)
			{
			fieldRef = (Aast) fieldRef.getFirstChild();
			}
			
			if (fieldRef.getType() > BEGIN_FIELDTYPES && 
			fieldRef.getType() < END_FIELDTYPES)
			{
			String fieldSchemaName = (String) fieldRef.getAnnotation("schemaname");
			if (!exceptFields.contains(fieldSchemaName))
			{
			Aast fp = fields2format.get(fieldSchemaName);
			boolean attach = (fp == null);
			if (attach)
			{
			fp = (Aast)astFactory.create(FORMAT_PHRASE);
			}
			attachAssignSchemaValidation(fp, fieldRef, sym);
			
			if (attach && fp.getNumImmediateChildren() > 0)
			{
			child.getParent().graftAt(fp, child.getIndexPos() + 1);
			}
			}
			}
			
			child = (Aast) child.getNextSibling();
			}
			}
			
			}
			
			column_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = column_spec_AST;
	}
	
/**
 * Matches the browse options phrase that is almost the same as the frame
 * phrase construct (except it is only used in the defining browses). It
 * always begins with the <code>WITH</code> keyword. All of its options
 * can be specified in any order.  Called from {@link #column_spec}.
 * <p>
 * The following list of rules are called to properly implement the tree
 * building:
 * <p>
 * <ul>
 *    <li> {@link #ui_stuff}
 *    <li> {@link #row_height_clause}
 *    <li> {@link #size_phrase}
 *    <li> {@link #title_phrase}
 *    <li> {@link #tooltip_clause}
 *    <li> {@link #misc_frame_opts}
 *    <li> {@link #down_clause}
 * </ul>
 * <p>
 * Undocumented options <code>KEEP-TAB-ORDER</code>, <code>CENTERED</code>,
 * <code>KW_NO_COLS</code>, <code>KW_SCROLLBL</code>, <code>KW_NO_TAB_S</code> and
 * <code>KW_NO_UNDL</code> are supported here since Progress allows them.
 * <p>
 * The order of the above list is important in the case of the last
 * rule reference to {@link #down_clause}. This prefixes an expression
 * to a keyword which is inherently ambiguous. The ambiguity is resolved by
 * the careful ordering of these alternatives. Based on the complicated
 * loop closure rule needed to process these options in any order, the
 * k=2 lookahead is often being checked to confirm that a following
 * token is seen before a match is made.  This logic has been reviewed and
 * many cases have been tested, however all possible cases cannot be tested.  
 * For this reason, one must watch this rule carefully.  We have disabled
 * ambiguity warnings and it is thought that this is safe, but great care
 * must be taken to confirm this over time.
 */
	public final void browse_options_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast browse_options_phrase_AST = null;
		Token  wi = null;
		Aast wi_AST = null;
		
		try {      // for error handling
			Aast tmp201_AST = null;
			tmp201_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp201_AST);
			match(KW_WITH);
			{
			_loop435:
			do {
				if ((LA(1)==KW_WITH) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					wi = LT(1);
					wi_AST = (Aast)astFactory.create(wi);
					match(KW_WITH);
					hide(wi);
				}
				else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_MULTIPLE||LA(1)==KW_SINGLE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_MULTIPLE:
					{
						Aast tmp202_AST = null;
						tmp202_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp202_AST);
						match(KW_MULTIPLE);
						break;
					}
					case KW_SINGLE:
					{
						Aast tmp203_AST = null;
						tmp203_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp203_AST);
						match(KW_SINGLE);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_NO_SEPS||LA(1)==KW_SEPS) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_SEPS:
					{
						Aast tmp204_AST = null;
						tmp204_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp204_AST);
						match(KW_SEPS);
						break;
					}
					case KW_NO_SEPS:
					{
						Aast tmp205_AST = null;
						tmp205_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp205_AST);
						match(KW_NO_SEPS);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_NO_ASSGN) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp206_AST = null;
					tmp206_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp206_AST);
					match(KW_NO_ASSGN);
				}
				else if ((LA(1)==KW_NO_ROW_M) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp207_AST = null;
					tmp207_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp207_AST);
					match(KW_NO_ROW_M);
				}
				else if ((LA(1)==KW_NO_BOX) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp208_AST = null;
					tmp208_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp208_AST);
					match(KW_NO_BOX);
				}
				else if ((LA(1)==KW_NO_LABEL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp209_AST = null;
					tmp209_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp209_AST);
					match(KW_NO_LABEL);
				}
				else if ((LA(1)==KW_NO_VALID) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp210_AST = null;
					tmp210_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp210_AST);
					match(KW_NO_VALID);
				}
				else if ((LA(1)==KW_NO_AUTOV) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp211_AST = null;
					tmp211_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp211_AST);
					match(KW_NO_AUTOV);
				}
				else if ((LA(1)==KW_NO_SCR_V||LA(1)==KW_SCROLL_V) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_NO_SCR_V:
					{
						Aast tmp212_AST = null;
						tmp212_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp212_AST);
						match(KW_NO_SCR_V);
						break;
					}
					case KW_SCROLL_V:
					{
						Aast tmp213_AST = null;
						tmp213_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp213_AST);
						match(KW_SCROLL_V);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_DROP_TAR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp214_AST = null;
					tmp214_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp214_AST);
					match(KW_DROP_TAR);
				}
				else if ((LA(1)==KW_OVERLAY) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp215_AST = null;
					tmp215_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp215_AST);
					match(KW_OVERLAY);
				}
				else if ((LA(1)==KW_EXPANDBL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp216_AST = null;
					tmp216_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp216_AST);
					match(KW_EXPANDBL);
				}
				else if ((LA(1)==KW_FIT_LCOL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp217_AST = null;
					tmp217_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp217_AST);
					match(KW_FIT_LCOL);
				}
				else if ((LA(1)==KW_NO_EM_SP) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp218_AST = null;
					tmp218_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp218_AST);
					match(KW_NO_EM_SP);
				}
				else if ((LA(1)==KW_NO_COLS) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp219_AST = null;
					tmp219_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp219_AST);
					match(KW_NO_COLS);
				}
				else if ((LA(1)==KW_CENTER) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp220_AST = null;
					tmp220_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp220_AST);
					match(KW_CENTER);
				}
				else if ((LA(1)==KW_KEEP_TAB) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp221_AST = null;
					tmp221_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp221_AST);
					match(KW_KEEP_TAB);
				}
				else if ((LA(1)==KW_SCROLLBL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp222_AST = null;
					tmp222_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp222_AST);
					match(KW_SCROLLBL);
				}
				else if ((LA(1)==KW_NO_TAB_S) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp223_AST = null;
					tmp223_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp223_AST);
					match(KW_NO_TAB_S);
				}
				else if ((LA(1)==KW_NO_UNDL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp224_AST = null;
					tmp224_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp224_AST);
					match(KW_NO_UNDL);
				}
				else if ((LA(1)==KW_TOP_ONLY) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp225_AST = null;
					tmp225_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp225_AST);
					match(KW_TOP_ONLY);
				}
				else if ((LA(1)==KW_3D) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp226_AST = null;
					tmp226_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp226_AST);
					match(KW_3D);
				}
				else if ((LA(1)==KW_NO_EH_FL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp227_AST = null;
					tmp227_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp227_AST);
					match(KW_NO_EH_FL);
				}
				else if ((LA(1)==KW_NO_EH_SR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp228_AST = null;
					tmp228_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp228_AST);
					match(KW_NO_EH_SR);
				}
				else if ((LA(1)==KW_DIS_STRP) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp229_AST = null;
					tmp229_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp229_AST);
					match(KW_DIS_STRP);
				}
				else if ((LA(1)==KW_DIS_CEDT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp230_AST = null;
					tmp230_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp230_AST);
					match(KW_DIS_CEDT);
				}
				else if ((LA(1)==KW_COLOR) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					color_spec();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_ROW_H_C||LA(1)==KW_ROW_H_P) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					row_height_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1) >= KW_SIZE && LA(1) <= KW_SIZE_P)) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==KW_BY)) {
					size_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TITLE) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					title_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TOOLTIP) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tooltip_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_67.member(LA(1))) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					misc_frame_opts();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_24.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					down_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop435;
				}
				
			} while (true);
			}
			browse_options_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = browse_options_phrase_AST;
	}
	
/**      
 * Matches the manner of specifying a list of records (and optional include or 
 * exclude list of fields) for certain database related language statements.
 * Calls {@link #record} and {@link #field_list} rules. 
 * <p>
 * Called by {@link #def_query_stmt}, {@link #def_dataset_stmt},
 * {@link #def_datasrc_stmt} and {@link #do_repeat_stmt} rules.
 *
 * @param    flds
 *           <code>true</code> if the field list option should be allowed to
 *           be matched.
 * @param    force
 *           <code>true</code> to force promotion even if the record was
 *           already previously promoted.
 * @param    strong
 *           <code>true</code> to identify all records as being associated with a strong buffer
 *           scope.
 */
	public final void for_record_spec(
		boolean flds, boolean force, boolean strong
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast for_record_spec_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			if (strong)
			{
			sym.markStrongScope(true);
			}
			
			Aast tmp231_AST = null;
			tmp231_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp231_AST);
			match(KW_FOR);
			nothing=record(true, force, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			if (((LA(1)==KW_EXCEPT||LA(1)==KW_FIELD) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( flds )) {
				field_list();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop201:
			do {
				if ((LA(1)==COMMA) && (_tokenSet_13.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					nothing=record(true, force, false);
					astFactory.addASTChild(currentAST, returnAST);
					{
					if (((LA(1)==KW_EXCEPT||LA(1)==KW_FIELD) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( flds )) {
						field_list();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
				}
				else {
					break _loop201;
				}
				
			} while (true);
			}
			
			if (strong)
			{
			sym.markStrongScope(false);
			}
			
			for_record_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = for_record_spec_AST;
	}
	
/**      
 * Matches the <code>CACHE</code> option for the <code>DEFINE QUERY</code>
 * language statement.
 * <p>
 * Called by {@link #def_query_stmt}.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void cache_records() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast cache_records_AST = null;
		
		try {      // for error handling
			Aast tmp232_AST = null;
			tmp232_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp232_AST);
			match(KW_CACHE);
			whole_number_literal();
			astFactory.addASTChild(currentAST, returnAST);
			cache_records_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = cache_records_AST;
	}
	
/**
 * Matches a Progress 4GL record reference that refers to a table in the
 * database schema, or to a buffer/temp-table/work-table that was previously
 * defined or created in the source file.  Any of these references can often
 * be substituted for each other in 4GL source.
 * <p>
 * The matching portion of this rule is defined as a single token that
 * matches the union of the set of all possible record types and the set of
 * all possible alternatives for symbol names (a reference to the 
 * {@link #symbol} rule).
 * <p>
 * Note that if this rule is used as an alternative to a rule that includes a
 * leftmost token defined by the <code>symbol</code> rule, there will be an
 * ambiguity that is only resolved by lookahead <b>and</b> the proper
 * ordering of the rules.
 * <p>
 * It is required that where this rule is referenced as one alternative that
 * conflicts with the definitions of other alternatives, <b>the order of the 
 * alternatives must be more specific (in terms of matching criteria) to less
 * specific</b>.
 * <p>
 * The inclusion of the <code>symbol</code> rule ensures that all valid
 * symbols are considered a record and will be matched by this rule.
 * <p>
 * It is important to note that in the end, it is not really valid to have
 * a token type of <code>SYMBOL</code> since this could be anything.  What we
 * really require is a token that is one of the following:
 * <pre>
 *    TABLE
 *    BUFFER
 *    TEMP_TABLE
 *    WORK_TABLE
 * </pre>
 * <p>
 * The difference between a <code>SYMBOL</code> and a <code>TABLE</code> can
 * only be determined by context (the fact that the lookahead code has
 * identified a match with a <code>SYMBOL</code> token which is a construct
 * that can occur in a <code>record</code> call.  Thus <b>if</b> a match is
 * found using lookahead (in the rule that calls this one), then it
 * <b>must</b> be correct and necessary to convert the <code>SYMBOL</code> 
 * token type into the correct type. This is done in an init action that is 
 * processed at the beginning of this rule. In this way, the rest of the rule 
 * only sees the first token as a valid <code>TABLE</code> and never tries to
 * call the <code>symbol</code> rule since calling that rule would actually 
 * try to match (and consume from the token stream) a <code>SYMBOL</code>
 * token type.  <b>Specifying a rule reference to obtain its value from a 
 * lookahead perspective but then changing the token's type such that the
 * rule reference never gets called, is the critical trick that enables
 * context sensitive symbol names!</b>
 * <p>
 * The exit action saves the fully qualified schema name that was matched
 * in the schema dictionary. This allows downstream processing to access this
 * as an annotation named 'schemaname'.  In addition, the exit action stores
 * the backing construct for this record (this will be the token type TABLE,
 * TEMP_TABLE or WORK_TABLE).  By definition, this will be the same as the
 * token type for every record type except buffers.  This annotation is
 * called 'recordtype'.
 * <p>
 * This rule can only be used in cases where it is non-optional OR there is
 * no ambiguity (between the set of unreserved keywords referenced herein and 
 * any following keywords that would be improperly matched by this rule).
 * In this case a semantic predicate could be used to isolate the conflicting
 * token types and bypass this rule reference in those cases.
 * <p>
 * All record references in the parser call this rule.  This makes it the
 * ideal location to implement the promotion of a table into the current
 * scope, since when this rule is called the record has been referenced.
 * This is done at the end of the init action, when we know that no exception
 * is going to be thrown.  <b>At this time we ALWAYS promote each table 
 * no matter the manner in which we are called and without regard to the
 * type of reference (strong, weak or free reference). This seems to resolve
 * the implicit lookup requirements for nearly all Progress cases. What makes
 * this 'trick' work is that the Progress compiler itself refuses to allow
 * ambiguous names to be referenced (code with ambiguous name references
 * will fail to compile). This means that the 4GL programmer is required
 * to resolve ambiguity.  Those places that look ambiguous are made
 * unambiguous because the table name has been given preference in the name
 * lookups (in the P2J terminology, it was 'promoted'). By always promoting
 * this code resolves these issues, but it can create one problem that a
 * more descriminating promotion policy (which is probably how Progress is
 * internally written) would not have: it is possible that there is a very
 * obscure case where the existence of additional (unexpected from a Progress
 * perspective) promoted tables can make some names ambiguous that otherwise
 * would be unambiguous.</b>  Full details of this obscure case are in the 
 * <a href="package-summary.html#too_much_promotion">Design Document</a>.
 *
 * @param    promote
 *           If <code>true</code>, promote the record's table for future
 *           name resolution.  If <code>false</code>, do not promote the
 *           table.
 * @param    force
 *           If <code>true</code>, forces re-promotion of records that have
 *           already been promoted. <code>false</code> will promote but only
 *           if it hasn't ever been promoted. This flag is only honored if
 *           the <code>promote</code> parameter is <code>true</code>.
 * @param    noProp                   
 *           <code>true</code> to force any promoted nodes to have their
 *           no propagate flag set. This disables propagation of these
 *           nodes across the current scope boundary.
 *
 * @return   The record name node that was found.
 */
	public final NameNode  record(
		boolean promote, boolean force, boolean noProp
	) throws RecognitionException, TokenStreamException {
		NameNode found;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast record_AST = null;
		
		found = null;
		
		
		try {      // for error handling
			
			String tablename = LT(1).getText();
			
			if (LA(1) < BEGIN_RECORDTYPES || LA(1) > END_RECORDTYPES)
			{
			found = sym.lookupTableNode(tablename, forceTemp, forcePersistent);
			
			int newtype = (found == null) ? -1 : found.getType();
			
			// the preference for temp-table or persistent table failed, now look everywhere.
			if (newtype == -1 && (forceTemp || forcePersistent))
			{
			forceTemp = false;
			forcePersistent = false;
			found = sym.lookupTableNode(tablename, false, false);
			
			newtype = (found == null) ? -1 : found.getType();
			}
			
			// there should always be a match in valid Progress 4GL source
			// so we throw an exception if this is not the case
			if ( newtype != -1 )
			{
			LT(1).setType( newtype );
			}
			else
			{
			// sym.dumpSchema();
			throw new NoViableAltException(LT(1), getFilename());
			}
			}
			
			// if we have gotten this far, then the tablename is valid so we
			// can add this table to the current schema scope using this string
			if (promote)
			sym.promoteTableName(tablename, force, noProp);
			
			{
			switch ( LA(1)) {
			case BEGIN_RECORDTYPES:
			case TABLE:
			case BUFFER:
			case TEMP_TABLE:
			case WORK_TABLE:
			case END_RECORDTYPES:
			{
				Aast tmp233_AST = null;
				tmp233_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp233_AST);
				matchRange(BEGIN_RECORDTYPES,END_RECORDTYPES);
				break;
			}
			case DB_SYMBOL:
			{
				Aast tmp234_AST = null;
				tmp234_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp234_AST);
				match(DB_SYMBOL);
				break;
			}
			default:
				if ((_tokenSet_15.member(LA(1)))) {
					symbol();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			record_AST = (Aast)currentAST.root;
			
			// now store an annotation with the fully qualified name and the
			// shorted unabbreviated unique buffer name
			TableInfo info = sym.lookupTableInfo(tablename, forceTemp, forcePersistent);
			
			if (info != null)
			{
			String sig      = info.getSignature();
			String fullname = info.getQualified();
			String bufname  = info.getBuffer();
			String dbname   = info.getDatabase();
			int    backing  = info.getRecordType();
			
			if (sig != null)
			record_AST.putAnnotation("db_signature", sig);
			
			if (fullname != null)
			record_AST.putAnnotation("schemaname", fullname);
			
			if (bufname != null)
			record_AST.putAnnotation("bufname", bufname);
			
			if (dbname != null)
			record_AST.putAnnotation("dbname", dbname);
			
			// store the backing construct (this will be the same as the token
			// type for every record type except buffers, in which case it will
			// be TABLE, TEMP_TABLE or WORK_TABLE)
			if (backing != -1)
			record_AST.putAnnotation("recordtype", Long.valueOf(backing));
			}
			
			record_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = record_AST;
		return found;
	}
	
/**   
 * Matches the <code>FIELDS</code> or <code>EXCEPT</code> keywords and the
 * optional following field list which is used to specify the list of fields
 * to include or exclude from a particular table.  Note that due to the
 * natural ambiguity of <code>FIELDS</code> being optionally abbreviated as
 * <code>FIELD</code> and the fact that there is a separate <code>FIELD</code>
 * keyword used for different purposes, the <code>FIELDS</code> keyword has
 * been dropped and only a <code>FIELD</code> keyword will be found.
 * <p>
 * An undocumented feature is that a {@link #record} can be matched instead of
 * the list of {@link #lvalue} instances.  This is effectively saying all fields
 * of the record which makes this clause useless.  But it was found in customer
 * code.
 * <p>
 * Used by {@link #record_phrase} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 */
	public final void field_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast field_list_AST = null;
		
		try {      // for error handling
			allowSymbolMatch = true;
			{
			switch ( LA(1)) {
			case KW_FIELD:
			{
				Aast tmp235_AST = null;
				tmp235_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp235_AST);
				match(KW_FIELD);
				break;
			}
			case KW_EXCEPT:
			{
				Aast tmp236_AST = null;
				tmp236_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp236_AST);
				match(KW_EXCEPT);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==LPARENS) && (_tokenSet_68.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				lparens();
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop1466:
				do {
					if ((_tokenSet_64.member(LA(1)))) {
						lvalue();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop1466;
					}
					
				} while (true);
				}
				rparens();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			allowSymbolMatch = false;
			field_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = field_list_AST;
	}
	
/**
 * Matches a simple <code>FOR</code> and a record name for the
 * {@link #def_buf_stmt}. 
 * <p>
 * Calls {@link #record}.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 *
 * @return   The name of the first record referenced.
 */
	public final String  simple_for_record_spec() throws RecognitionException, TokenStreamException {
		String rtext = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast simple_for_record_spec_AST = null;
		Aast r_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			boolean old1 = forceTemp;
			boolean old2 = forcePersistent;
			forcePersistent = true;
			
			Aast tmp237_AST = null;
			tmp237_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp237_AST);
			match(KW_FOR);
			{
			if ((LA(1)==KW_TEMP_TAB) && (_tokenSet_13.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp238_AST = null;
				tmp238_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp238_AST);
				match(KW_TEMP_TAB);
				forceTemp = true; forcePersistent = false;
			}
			else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			nothing=record(false, false, true);
			r_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			forceTemp = old1;
			forcePersistent = old2;
			rtext = r_AST.getText();
			
			simple_for_record_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = simple_for_record_spec_AST;
		return rtext;
	}
	
/**
 * Matches the <code>LABEL</code> keyword and the required string literal
 * or comma separated list of string literals. The subtree is rooted by the
 * <code>KW_LABEL</code> keyword.  Note that the commas are dropped from the
 * resulting AST to simplify processing.
 * <p>
 * Used by {@link #def_var_stmt}, {@link #def_parm_stmt} and
 * {@link #def_buf_stmt}.  Once added in all these locations, there was
 * a warning that there was ambiguity in the subrule, but this is a
 * bogus warning.  This warning has been disabled.
 * <p>
 * The list syntax is used to create different labels for each element in
 * an array.
 */
	public final void label(
		boolean showLabel
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast label_AST = null;
		
		try {      // for error handling
			Aast tmp239_AST = null;
			tmp239_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp239_AST);
			match(KW_LABEL);
			label_AST = (Aast)currentAST.root;
			
			if(showLabel == true)
			{
			label_AST.putAnnotation("show-label", true);
			}
			
			Aast tmp240_AST = null;
			tmp240_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp240_AST);
			match(STRING);
			{
			_loop1105:
			do {
				if ((LA(1)==COMMA) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					Aast tmp241_AST = null;
					tmp241_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp241_AST);
					match(STRING);
				}
				else {
					break _loop1105;
				}
				
			} while (true);
			}
			label_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = label_AST;
	}
	
/**
 * Matches <code>XML-NODE-NAME</code> and a following <code>STRING</code>. Used by
 * {@link #def_temp_table_stmt}.
 */
	public final void xml_node_name() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast xml_node_name_AST = null;
		
		try {      // for error handling
			Aast tmp242_AST = null;
			tmp242_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp242_AST);
			match(KW_XML_NNAM);
			Aast tmp243_AST = null;
			tmp243_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp243_AST);
			match(STRING);
			xml_node_name_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = xml_node_name_AST;
	}
	
/**
 * Matches the <code>SERIALIZE-NAME</code> clause with the following string.
 * Used from {@link #def_temp_table_stmt}.
 */
	public final void serialize_name() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast serialize_name_AST = null;
		
		try {      // for error handling
			Aast tmp244_AST = null;
			tmp244_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp244_AST);
			match(KW_SERIALZN);
			Aast tmp245_AST = null;
			tmp245_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp245_AST);
			match(STRING);
			serialize_name_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = serialize_name_AST;
	}
	
/**
 * Matches the <code>NAMESPACE-URI</code> or <code>NAMESPACE-PREFIX</code>
 * with a following <code>STRING</code>. Used by {@link #def_dataset_stmt}
 * {@link #def_temp_table_stmt} and {@link #def_buf_stmt}.
 */
	public final void namespace_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast namespace_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_NAMESP_U:
			{
				Aast tmp246_AST = null;
				tmp246_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp246_AST);
				match(KW_NAMESP_U);
				break;
			}
			case KW_NAMESP_P:
			{
				Aast tmp247_AST = null;
				tmp247_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp247_AST);
				match(KW_NAMESP_P);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			Aast tmp248_AST = null;
			tmp248_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp248_AST);
			match(STRING);
			namespace_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = namespace_clause_AST;
	}
	
/**
 * Matches <code>XML-NODE-TYPE</code> with a following <code>STRING</code>. Used by 
 * {@link #temp_table_field_options} and {@link #def_dataset_stmt}.
 */
	public final void xml_node_type() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast xml_node_type_AST = null;
		
		try {      // for error handling
			Aast tmp249_AST = null;
			tmp249_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp249_AST);
			match(KW_XML_NTYP);
			Aast tmp250_AST = null;
			tmp250_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp250_AST);
			match(STRING);
			xml_node_type_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = xml_node_type_AST;
	}
	
/**
 * Matches a <code>DATA-RELATION</code> clause in a {@link #def_dataset_stmt}.
 * There is an optional {@link #symbol} which will be manufactured based on
 * the given index number if the relation name is not there. The naming
 * scheme is to use <code>Relation</code> and append the index number to the
 * end. This name (manufactured or provided) is added to a namespace for
 * data relations which can then be de-referenced in use as a handle.
 *
 * @param    idx
 *           1-based index number of the data relation in a given dataset
 *           definition.
 */
	public final void data_relation(
		int idx
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast data_relation_AST = null;
		Token  dr = null;
		Aast dr_AST = null;
		Aast d_AST = null;
		Aast f_AST = null;
		
		try {      // for error handling
			dr = LT(1);
			dr_AST = (Aast)astFactory.create(dr);
			match(KW_DATA_REL);
			{
			if ((_tokenSet_15.member(LA(1)))) {
				symbol();
				d_AST = (Aast)returnAST;
			}
			else if ((LA(1)==KW_FOR)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			for_data_relation_spec();
			f_AST = (Aast)returnAST;
			data_relation_AST = (Aast)currentAST.root;
			
			if (d_AST == null)
			{
			// create an artificial node
			d_AST = (Aast)astFactory.create(SYMBOL,String.format("Relation%d",idx));
			}
			
			String name = d_AST.getText();
			
			// add to the relation namespace
			sym.addDataRelation(name, DATA_RELATION);
			
			// build the tree
			data_relation_AST = (Aast)astFactory.make( (new ASTArray(3)).add(dr_AST).add(d_AST).add(f_AST));
			
			currentAST.root = data_relation_AST;
			currentAST.child = data_relation_AST!=null &&data_relation_AST.getFirstChild()!=null ?
				data_relation_AST.getFirstChild() : data_relation_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = data_relation_AST;
	}
	
/**
 * Matches a <code>PARENT-ID-RELATION</code> clause in a {@link #def_dataset_stmt}.
 * There is an optional {@link #symbol} which will be manufactured based on
 * the given index number if the relation name is not there. The naming
 * scheme is to use <code>ParentRelation</code> and append the index number to the
 * end. This name (manufactured or provided) is added to a namespace for
 * data relations which can then be de-referenced in use as a handle.
 *
 * @param    idx
 *           1-based index number of the data relation in a given dataset
 *           definition.
 */
	public final void parent_id_relation(
		int idx
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast parent_id_relation_AST = null;
		Token  dr = null;
		Aast dr_AST = null;
		Aast d_AST = null;
		Aast f_AST = null;
		
		try {      // for error handling
			dr = LT(1);
			dr_AST = (Aast)astFactory.create(dr);
			match(KW_PAR_IREL);
			{
			if ((_tokenSet_15.member(LA(1)))) {
				symbol();
				d_AST = (Aast)returnAST;
			}
			else if ((LA(1)==KW_FOR)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			for_parent_relation_spec();
			f_AST = (Aast)returnAST;
			parent_id_relation_AST = (Aast)currentAST.root;
			
			if (d_AST == null)
			{
			// create an artificial node
			d_AST = (Aast)astFactory.create(SYMBOL,String.format("ParentRelation%d",idx));
			}
			
			// TODO: add namespace processing for parent id relations, add whatever lookup is needed
			//       in lvalue presumeably
			// String name = #d.getText();
			
			// add to the relation namespace
			/// sym.addParentIdRelation(name, PARENT_ID_RELATION);
			
			// build the tree
			parent_id_relation_AST = (Aast)astFactory.make( (new ASTArray(3)).add(dr_AST).add(d_AST).add(f_AST));
			
			currentAST.root = parent_id_relation_AST;
			currentAST.child = parent_id_relation_AST!=null &&parent_id_relation_AST.getFirstChild()!=null ?
				parent_id_relation_AST.getFirstChild() : parent_id_relation_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = parent_id_relation_AST;
	}
	
/**
 * Matches a temp-table buffer for the data-source statement. The name of the buffer
 * can optionally be followed by KEYS keyword that defines a unique key for finding a
 * record in the temp-table that uses it a data source.
 */
	public final void source_buffer_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast source_buffer_phrase_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			if (((LA(1)==KW_KEYS) && (LA(2)==LPARENS) && (_tokenSet_64.member(LA(3))))&&( LA(1) == KW_KEYS )) {
				datasrc_keys_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			source_buffer_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = source_buffer_phrase_AST;
	}
	
/**
 * Matches the <code>KEYS</code> clause in a source buffer specification of
 * the <code>DEFINE DATA-SOURCE</code> statement.  Called directly by
 * {@link #source_buffer_phrase}. 
 */
	public final void datasrc_keys_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast datasrc_keys_clause_AST = null;
		
		try {      // for error handling
			Aast tmp251_AST = null;
			tmp251_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp251_AST);
			match(KW_KEYS);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_ROWID) && (LA(2)==RPARENS) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp252_AST = null;
				tmp252_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp252_AST);
				match(KW_ROWID);
			}
			else if ((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				{
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop228:
				do {
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						lvalue();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop228;
					}
					
				} while (true);
				}
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			datasrc_keys_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = datasrc_keys_clause_AST;
	}
	
/**      
 * Matches all Progress 4GL variable, field, stream, buffer or widget names
 * that exist in the respective namespaces, including all forms of built-in
 * variables such as system handles or 'functions' that take no parameters 
 * and essentially behave as variables.
 * <p>
 * The actual lvalue portion of this rule is defined as a single token that
 * matches the union of the set of all token types for variables, fields,
 * widgets, buffers or <code>SYS_HANDLE or STREAM</code> (this means that 
 * there is one token type for each possible data type such as 
 * <code>VAR_INT</code> or <code>FIELD_LOGICAL</code> or
 * <code>WID_FILL_IN</code>) and the set of all possible alternatives for 
 * symbol names (a reference to the {@link #symbol} rule) or the special
 * <code>DB_SYMBOL</code>.  <code>DB_SYMBOL</code> is the type assigned to
 * all partially or fully qualified database schema names.  It is created by
 * the {@link ProgressLexer#mSYMBOL} method and it may refer to either a
 * table (in dbname.tablename format) or a field (in dbname.tablename.field
 * format or in tablename.field format).  In this rule, we only expect to
 * ever be processing a field name (table names are right out).
 * <p>
 * Due to widget, buffer and query references (especially when attributes 
 * and methods are used) it is possible to see certain prefixing keywords 
 * (some reserved and some not) in front of the lvalue itself.  In these
 * cases, the lvalue will not be found in one of the standard lookup
 * processing, but instead the keyword will force the token type to be set
 * accordingly (e.g. <code>BUFFER record</code>).  The list of such keywords:
 * <p>
 * <pre>
 *    BROWSE
 *    BUFFER
 *    DATASET
 *    DATA-SOURCE
 *    DATA-RELATION
 *    FRAME
 *    MENU
 *    SUB-MENU
 *    MENU-ITEM
 *    QUERY
 *    TEMP-TABLE
 *    STREAM
 *    STREAM-HANDLE
 *    TABLE-HANDLE
 *    DATASET-HANDLE
 *    TABLE
 * </pre>
 * <p>
 * It is important to note that a {@link #record} can be matched as a
 * BUFFER or TEMP-TABLE.
 * <p>
 * The operation of this processing is VERY similar if not identical to
 * some other rules (see {@link #frame_reference} and
 * {@link #query_reference}).  Keeping these other rules allows more
 * specific usage to be implemented without calling this rule.  This can 
 * reduce ambiguity.
 * <p>
 * Note that both <code>lvalue</code> and <code>func_call</code> refer to a
 * leftmost token that includes the <code>symbol</code> rule.  This creates
 * an ambiguity that is only resolved by lookahead <b>and</b> the proper
 * ordering of the rules (since both are equal alternatives in the
 * <code>primary_expr</code> rule).
 * <p>
 * It is required that where this rule is referenced as one alternative that
 * conflicts with the definitions of other alternatives (see
 * {@link #primary_expr} and {@link #func_call}), <b>the order of the 
 * alternatives must be more specific (in terms of matching criteria) to less
 * specific</b>.  Since the <code>func_call</code> rule contains the very
 * specific <code>symbol</code> followed by <code>LPARENS</code> pattern,
 * it is more specific than a simple <code>symbol</code> by itself (which is
 * one definition of an <code>lvalue</code>.  For this reason, 
 * <code>func_call</code> must always be placed ahead of <code>lvalue</code>
 * in alternative lists.
 * <p>
 * The inclusion of the <code>symbol</code> rule ensures that all valid
 * symbols are considered an lvalue and will be matched by this rule.  This
 * means that the top level expression processing will include a symbol as
 * one of the options for its leftmost token, thus &quot;pulling&quot; the
 * recursive descent processing down the <code>expr</code> rule.
 * <p>
 * It is important to note that in the end, it is not really valid to have
 * a token type of <code>SYMBOL</code> or <code>DB_SYMBOL</code> since this 
 * could be anything.  What we really require is a token that is one of the
 * valid variable, field, stream, widget or system handle tokens:
 * <pre>
 *   VAR_CHAR
 *   VAR_CLASS
 *   VAR_COM_HANDLE
 *   VAR_DATE
 *   VAR_DATETIME
 *   VAR_DATETIME_TZ
 *   VAR_DEC
 *   VAR_HANDLE
 *   VAR_INT
 *   VAR_INT64
 *   VAR_LOGICAL
 *   VAR_LONGCHAR
 *   VAR_MEMPTR
 *   VAR_RAW
 *   VAR_RECID
 *   VAR_ROWID
 *   SYS_HANDLE
 *   VAR_POLY
 *   CLASS_NAME (static OO 4GL class reference)
 *   VAR_BYTE
 *   VAR_DOUBLE
 *   VAR_FLOAT
 *   VAR_LONG
 *   VAR_SHORT
 *   VAR_USHORT
 *   STREAM
 *   FIELD_BLOB
 *   FIELD_CHAR
 *   FIELD_CLASS
 *   FIELD_CLOB
 *   FIELD_COM_HANDLE
 *   FIELD_DATE
 *   FIELD_DATETIME
 *   FIELD_DATETIME_TZ
 *   FIELD_DEC
 *   FIELD_INT
 *   FIELD_INT64
 *   FIELD_HANDLE
 *   FIELD_LOGICAL
 *   FIELD_RAW
 *   FIELD_RECID
 *   FIELD_ROWID
 *   WID_BROWSE
 *   WID_BUTTON
 *   WID_COMBO
 *   WID_DIALOG
 *   WID_EDITOR
 *   WID_FILL_IN
 *   WID_FRAME
 *   WID_LITERAL
 *   WID_MENU
 *   WID_MENU_ITM
 *   WID_RADIO
 *   WID_RECT
 *   WID_SEL_LST
 *   WID_SLIDER
 *   WID_SUB_MENU
 *   WID_TEXT
 *   WID_TOGGLE
 *   WID_WINDOW
 *   BUFFER
 *   TABLE
 *   TEMP_TABLE
 *   WORK_TABLE
 * </pre>
 * <p>
 * The difference between a <code>SYMBOL</code> (or <code>DB_SYMBOL</code>)
 * and a <code>VAR_INT</code> can only be determined by context (the fact
 * that the lookahead code has identified a match with a <code>SYMBOL</code> 
 * or <code>DB_SYMBOL</code> token which is a construct that can occur in an
 * lvalue call.  Thus <b>if</b> a match is found using lookahead (in the rule
 * that calls this one), then it <b>must</b> be correct and necessary to 
 * convert the <code>SYMBOL</code> or <code>DB_SYMBOL</code> token type into 
 * the correct variable or field type, using a lookup into the variable and
 * field namespaces. This is done in an init action that is processed at 
 * the beginning of this rule. In this way, the rest of the rule only sees
 * the first token as a valid variable or field token type and never tries to
 * call the <code>symbol</code> rule since calling that rule would actually 
 * try to match (and consume from the token stream) a <code>SYMBOL</code>
 * token type.  <b>Specifying a rule reference to obtain its value from a 
 * lookahead perspective but then changing the token's type such that the
 * rule reference never gets called, is the critical trick that enables
 * context sensitive symbol names!</b>
 * <p>
 * The exit action saves the fully qualified schema name that was matched
 * in the schema dictionary. This allows downstream processing to access this
 * as an annotation named 'schemaname'.  In addition, the exit action stores
 * the backing construct for this field (this will be the token type TABLE,
 * TEMP_TABLE or WORK_TABLE). This annotation is called 'recordtype'.
 * <p>
 * The exit action will save any original token type that rewriting may have
 * erased.  This will allow future processing to access this as an annotation
 * named 'oldtype'.
 * <p>
 * This rule supports an undocumented qualified schema naming quirk in which
 * there is whitespace between the record and the .field portion of a schema
 * name.  In that case Progress matches "record    .field" as the single
 * qualified field name "record.field".  This quirk is matched when a record
 * is followed by whitespace, a <code>DOT</code> and a token for which the
 * combined text resolves as a field.  In that case, the 1st two tokens are
 * discarded and their text is concatenated into the 3rd token as if it had
 * been tokenized properly originally. The lexer can't solve this problem as
 * the syntax is inherently ambiguous with many other constructs. So instead
 * we use the knowledge and context of the parser to reassemble the tokens 
 * when needed.  WARNING: this code requires that the parser's lookahead
 * depth be at least 3 (k=3).  It is interesting to note that no whitespace
 * can ever fall between the dot and the field name.  It can only occur
 * before the dot.
 * <p>
 * This class has a flag to prefer widgets which allows callers of this rule
 * to bias it towards matching widgets in preference to its default policy
 * of matching a variable.  The vast majority of locations where this rule
 * is called do not want a match with a widget and so the default is to match
 * variables first.
 * <p>
 * Built-in variables have a language keyword as the variable name. This 
 * means that built-ins can support abbreviations.  It also means that some
 * built-in variables cannot be hidden by a user-defined variable, if the
 * associated keyword is reserved. If the keyword is not reserved, then a
 * built-in variable is hidden in the namespace by a user-defined variable
 * of the same name.  This method's token type rewriting is dependent upon
 * this logic being implemented in the <code>SymbolResolver</code> class.
 * See {@link SymbolResolver#lookupVariable}.
 * <p>
 * To ensure this method sees tokens matching the list of variables with
 * reserved names, the {@link #reserved_variables} method is included as
 * an alternative.  This is the same 'pull' trick that is being used for
 * generic symbols above.  The reason that the generic symbol technique is
 * not enough to pull reserved variables is that only unreserved keywords
 * are pulled by the <code>symbol</code> method.  This can't be changed
 * without negative impacts on other code, since <code>symbol</code> is 
 * used in many locations in the parser.  Instead a custom method was
 * created to generate pull.
 * <p>
 * Note that Progress 4GL built-in functions that take no parameters are
 * actually implemented in this parser as built-in variables.  This
 * accurately matches the syntax and semantics of how Progress is implemented
 * even if the name itself differs.
 * <p>
 * This rule also handles all language statements that act like assignable
 * variables and/or look like functions that can be assigned.  The first
 * type are simple enough that they are simply handled as global variables.
 * The second kind are handled by the {@link #assign_type_syntax_stmt_list}
 * which is called from the main body of this rule.
 * <p>
 * Since Progress 4GL variable names take precedence (i.e. hide) unqualified
 * field names that conflict, the token rewriting code in the method does
 * the variable namespace lookup first and if a result is found, this is
 * used.  This effectively hides the matching field name since the schema
 * dictionary is never consulted.  If no match is found to a variable name,
 * the schema dictionary is used to result the name.
 * <p>
 * Variables and fields in Progress can be defined as arrays using the
 * <code>EXTENT</code> keyword (see {@link #def_var_stmt}). The 
 * <code>lvalue</code> rule includes an optional postfix reference to the 
 * rule that implements the subscripting operator [ ].  Only one level of
 * subscripting is possible because there is no support for multi-dimensional
 * arrays in Progress 4GL.  See {@link #subscript} for details.
 * <p>
 * The use of the <code>subscript</code> rule is detected as ambiguous by
 * ANTLR, but this is bogus.  Warnings have been disabled for this
 * sub-rule.
 * <p>
 * An immediate following <code>COLON</code> which is not itself followed
 * by whitespace, will trigger the matching of Progress methods and
 * attributes (see {@link #attribute_or_method} or if the referent (to the
 * left of the <code>COLON</code> is a <code>VAR_COM_HANDLE</code>, a
 * <code>FIELD_COM_HANDLE</code> or a <code>SYS_HANDLE</code> with an
 * <code>oldtype</code> annotation of <code>KW_COM_SELF</code>, then the
 * following processing will match COM (Active-X) methods and properties
 * via the {@link #com_property_or_method} rule. Progress methods and
 * attributes will be rooted at the <code>COLON</code> node and COM methods
 * and properties are rooted at that same node except the type will be
 * rewritted to be <code>COM_INVOCATION</code>.
 * <p>
 * An immediate following <code>DB_REF_NON_STATIC</code> token (the
 * <code>::</code> "operator" is supported here.  This is the syntax added in
 * 10.2x which allows a database reference in the form handle::table_name or
 * handle::table_name::field_name.  These are non-static database names directly
 * referenced off a handle using the :: operator. 
 * <br><strong>Note</strong>At this moment only same-type of chaining can be parsed
 * correctly (ie: only <code>:</code> (COLON) or only <code>::</code> DB_REF_NON_STATIC).
 * The mixing of both punctuation elements (which is valid in the 4GL) is not supported yet.
 
 * <p>
 * Widget references can have an optional qualifier that is matched by the
 * {@link #widget_qualifier} rule.
 */
	public final void lvalue() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast lvalue_AST = null;
		Aast w_AST = null;
		Aast ds_AST = null;
		Aast strm_AST = null;
		Aast fr_AST = null;
		
		try {      // for error handling
			
			int    oldtype = -1;
			String clsName = null;
			String origTxt = null;
			
			NameNode nothing = null;
			
			// it is possible to have an optional prefix for widgets, queries and other resources
			// this "qualifier" changes the downstream processing
			boolean qualifier = false;
			boolean builtin   = false;
			boolean promote   = false;
			String  tablename = null;
			int     qualType  = -1;
			
			switch (LA(1))
			{
			case KW_FRAME:
			// this is a reserved keyword, so we cheat here because we
			// know it MUST be followed by a FRAME (we could look this
			// up in the frame namespace, but why?)
			qualType  = WID_FRAME;
			break;
			case KW_QUERY:
			// this is a reserved keyword, so we cheat here because we
			// know it MUST be followed by a QUERY
			qualType  = QUERY;
			
			// TODO: need to check if explicit static/instance qualifiers can be used here
			// TODO: need to check implicit static/instance (based on the surrounding code)
			if (sym.lookupQuery(LT(2).getText()) != QUERY)
			{
			CommonToken tok = (CommonToken) LT(2);
			System.out.println(
			String.format("Warning: lookup of query '%s' failed at line %d column %d", 
			tok.getText(),
			tok.getLine(),
			tok.getColumn()));
			}
			break;
			case KW_STREAM:
			// this is a reserved keyword, so we cheat here because we
			// know it MUST be followed by a STREAM 
			qualType = STREAM;
			break;
			case KW_BROWSE:
			// not reserved, we have to look it up (it shares a namespace
			// with variable but we have split the namespace to allow
			// the same symbol to refer to both a WID_ and VAR_ value)
			// with browse, we only need to check the widget namespace
			qualType = sym.lookupWidget(LT(2).getText()); 
			break;
			case KW_MENU: 
			case KW_SUB_MENU:
			// not reserved, we have to look it up (it shares a namespace
			// with frame)
			qualType = sym.lookupMenu(LT(2).getText());
			break;
			case KW_MENU_ITM:
			// not reserved, we have to look it up
			qualType = sym.lookupMenuItem(LT(2).getText());
			break;
			case KW_TAB_HAND:
			case KW_DSET_HND:
			case KW_STRM_HND:
			// table-handle is not reserved, dataset-handle and stream-handle are reserved
			// but we will recursively call ourselves below to match the required following
			// handle (field, var...) so just force qualType to be a valid token type and
			// that will properly bypass the other init action logic below; this can't just
			// lookup vars because it can reference a field
			qualType = LA(1);
			break;
			case KW_BUFFER:
			case KW_TABLE:
			case KW_TEMP_TAB:
			// buffer and temp-table are not reserved, we have to look it
			// up in those cases, we'll just do it for table too; this is
			// only used as a check to prove that there is a following 
			// record reference, the actual value is only used to bypass
			// the following init action logic below
			qualType = sym.lookupTable(LT(2).getText());
			
			// BUFFER b: and TEMP-TABLE tt: promote the name same way as a FIND does.
			promote = LA(1) != KW_TABLE;  // not for parameters
			tablename = LT(2).getText();
			break;
			case KW_DATASET:
			// TODO: need to check if explicit static/instance qualifiers can be used here
			// TODO: need to check implicit static/instance (based on the surrounding code)
			// it is reserved but we look it up anyway
			qualType = sym.lookupDataSet(LT(2).getText());
			break;
			case KW_DATA_SRC:
			// TODO: need to check if explicit static/instance qualifiers can be used here
			// TODO: need to check implicit static/instance (based on the surrounding code)
			// it is reserved but we look it up anyway
			qualType = sym.lookupDataSource(LT(2).getText());
			break;
			case KW_DATA_REL:
			// not reserved, we have to look it up
			qualType = sym.lookupDataRelation(LT(2).getText());
			break;
			}
			
			// if we match one of the optional prefixes AND the next token is
			// found in the associated namespace, then we know that we have
			// one of the special widget/query qualifier forms --> change all
			// downstream processing to handle this!
			if (qualType != -1)
			{
			qualifier = true;         
			}
			else if ((isLstmt(LA(1)) && LA(2) == LPARENS) || LA(1) == KW_DYN_NEW)
			{
			// nothing to do here, just avoid the else portion of this block
			// which would try to rewrite our leftmost token
			
			// these are the assignment-style language statements
			}
			else if (LA(1) == KW_THIS_OBJ || LA(1) == KW_SUPER)
			{
			builtin = true;
			oldtype = LA(1);        
			LT(1).setType(VAR_CLASS);
			
			if (oldtype == KW_THIS_OBJ)
			{
			// special this-object reference
			clsName = sym.getCurrentClassName();
			}
			else
			{
			// special super object reference
			clsName = sym.getCurrentParentName();
			}
			}
			else
			{
			// this is a normal lvalue! 
			
			// this works because the VARTYPES, FIELDTYPES and WIDGETS
			// sections are kept in a contiguous "super" block called LVALUE
			if (LA(1) < BEGIN_LVALUE || LA(1) > END_LVALUE)
			{
			String text = LT(1).getText();
			
			// check variables, widgets, class members and fields
			int newtype = resolveLvalueCoreType(1, true);
			
			// unqualified field references in a validation may have gotten qualified 
			if (!text.equals(LT(1).getText()))
			{
			origTxt = text;
			}
			
			// the field name quirk was found and the tokens were merged
			if (fieldNameQuirkOriginalText != null)
			{
			origTxt = fieldNameQuirkOriginalText;
			fieldNameQuirkOriginalText = null;
			}
			
			// lookup a frame if the field reference wasn't found
			// Don't allow frame to be matched if we come from a FORM_ITEM.
			if (newtype == -1 && !excludeFrame)
			{
			// WARNING: this matches with a frame name that does NOT
			// have the preceding KW_FRAME qualifying keyword, since
			// there is a quirk with frame names (they can start with
			// any combination of NUM_LITERAL, MINUS and UNKNOWN_TOKEN
			// characters in front of the real symbol and for all other
			// frame references we use the malformed_symbol rule to 
			// re-assemble the parts; this code will not work if
			// such a frame name is used here
			
			// this may be a frame name
			newtype = sym.lookupFrame(text);
			}
			
			// last chance! it may be a stream
			if (newtype == -1)
			{
			// this may be a stream name
			newtype = sym.lookupStream(text);
			}
			
			// last last chance: it may be a menu/sub-menu reference.
			if (newtype == -1)
			{
			// this may be a menu name
			newtype = sym.lookupMenu(text);
			}
			
			// at this point, there should always be a match in valid
			// Progress 4GL source so we throw an exception if this is
			// not the case
			if (newtype != -1)
			{
			oldtype = LA(1);  
			LT(1).setType(newtype);
			}
			else
			{
			// trigger this exception unless we are being processed
			// for expression evaluation or are allowed to match a
			// symbol, in which case this search is expected to fail
			// gracefully
			if (!evaluatingExpression && !allowSymbolMatch)
			{
			throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			}
			
			{
			if (((_tokenSet_69.member(LA(1))) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( qualifier )) {
				{
				switch ( LA(1)) {
				case KW_DATA_SRC:
				case KW_QUERY:
				case KW_BROWSE:
				case KW_DATA_REL:
				case KW_MENU:
				case KW_MENU_ITM:
				case KW_SUB_MENU:
				{
					{
					switch ( LA(1)) {
					case KW_QUERY:
					{
						Aast tmp253_AST = null;
						tmp253_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp253_AST);
						match(KW_QUERY);
						break;
					}
					case KW_BROWSE:
					{
						Aast tmp254_AST = null;
						tmp254_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp254_AST);
						match(KW_BROWSE);
						break;
					}
					case KW_MENU:
					{
						Aast tmp255_AST = null;
						tmp255_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp255_AST);
						match(KW_MENU);
						break;
					}
					case KW_SUB_MENU:
					{
						Aast tmp256_AST = null;
						tmp256_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp256_AST);
						match(KW_SUB_MENU);
						break;
					}
					case KW_MENU_ITM:
					{
						Aast tmp257_AST = null;
						tmp257_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp257_AST);
						match(KW_MENU_ITM);
						break;
					}
					case KW_DATA_SRC:
					{
						Aast tmp258_AST = null;
						tmp258_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp258_AST);
						match(KW_DATA_SRC);
						break;
					}
					case KW_DATA_REL:
					{
						Aast tmp259_AST = null;
						tmp259_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp259_AST);
						match(KW_DATA_REL);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					symbol();
					w_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					w_AST.setType(qualType);
					break;
				}
				case KW_DATASET:
				{
					Aast tmp260_AST = null;
					tmp260_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp260_AST);
					match(KW_DATASET);
					symbol();
					ds_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					ds_AST.setType(qualType);
					break;
				}
				case KW_STREAM:
				{
					Aast tmp261_AST = null;
					tmp261_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp261_AST);
					match(KW_STREAM);
					malformed_symbol();
					strm_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					strm_AST.setType(qualType);
					break;
				}
				case KW_FRAME:
				{
					Aast tmp262_AST = null;
					tmp262_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp262_AST);
					match(KW_FRAME);
					malformed_symbol();
					fr_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					fr_AST.setType(qualType);
					break;
				}
				case KW_TABLE:
				case KW_BUFFER:
				case KW_TEMP_TAB:
				{
					{
					switch ( LA(1)) {
					case KW_BUFFER:
					{
						Aast tmp263_AST = null;
						tmp263_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp263_AST);
						match(KW_BUFFER);
						break;
					}
					case KW_TABLE:
					{
						Aast tmp264_AST = null;
						tmp264_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp264_AST);
						match(KW_TABLE);
						break;
					}
					case KW_TEMP_TAB:
					{
						Aast tmp265_AST = null;
						tmp265_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp265_AST);
						match(KW_TEMP_TAB);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					nothing=record(true, false, false);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_DSET_HND:
				case KW_STRM_HND:
				case KW_TAB_HAND:
				{
					{
					switch ( LA(1)) {
					case KW_TAB_HAND:
					{
						Aast tmp266_AST = null;
						tmp266_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp266_AST);
						match(KW_TAB_HAND);
						break;
					}
					case KW_DSET_HND:
					{
						Aast tmp267_AST = null;
						tmp267_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp267_AST);
						match(KW_DSET_HND);
						break;
					}
					case KW_STRM_HND:
					{
						Aast tmp268_AST = null;
						tmp268_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp268_AST);
						match(KW_STRM_HND);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((_tokenSet_70.member(LA(1))) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				assign_type_syntax_stmt_list();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_71.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				switch ( LA(1)) {
				case VAR_CHAR:
				{
					Aast tmp269_AST = null;
					tmp269_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp269_AST);
					match(VAR_CHAR);
					break;
				}
				case VAR_CLASS:
				{
					Aast tmp270_AST = null;
					tmp270_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp270_AST);
					match(VAR_CLASS);
					break;
				}
				case VAR_COM_HANDLE:
				{
					Aast tmp271_AST = null;
					tmp271_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp271_AST);
					match(VAR_COM_HANDLE);
					break;
				}
				case VAR_DATE:
				{
					Aast tmp272_AST = null;
					tmp272_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp272_AST);
					match(VAR_DATE);
					break;
				}
				case VAR_DATETIME:
				{
					Aast tmp273_AST = null;
					tmp273_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp273_AST);
					match(VAR_DATETIME);
					break;
				}
				case VAR_DATETIME_TZ:
				{
					Aast tmp274_AST = null;
					tmp274_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp274_AST);
					match(VAR_DATETIME_TZ);
					break;
				}
				case VAR_DEC:
				{
					Aast tmp275_AST = null;
					tmp275_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp275_AST);
					match(VAR_DEC);
					break;
				}
				case VAR_HANDLE:
				{
					Aast tmp276_AST = null;
					tmp276_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp276_AST);
					match(VAR_HANDLE);
					break;
				}
				case VAR_INT:
				{
					Aast tmp277_AST = null;
					tmp277_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp277_AST);
					match(VAR_INT);
					break;
				}
				case VAR_INT64:
				{
					Aast tmp278_AST = null;
					tmp278_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp278_AST);
					match(VAR_INT64);
					break;
				}
				case VAR_LOGICAL:
				{
					Aast tmp279_AST = null;
					tmp279_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp279_AST);
					match(VAR_LOGICAL);
					break;
				}
				case VAR_LONGCHAR:
				{
					Aast tmp280_AST = null;
					tmp280_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp280_AST);
					match(VAR_LONGCHAR);
					break;
				}
				case VAR_MEMPTR:
				{
					Aast tmp281_AST = null;
					tmp281_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp281_AST);
					match(VAR_MEMPTR);
					break;
				}
				case VAR_RAW:
				{
					Aast tmp282_AST = null;
					tmp282_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp282_AST);
					match(VAR_RAW);
					break;
				}
				case VAR_RECID:
				{
					Aast tmp283_AST = null;
					tmp283_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp283_AST);
					match(VAR_RECID);
					break;
				}
				case VAR_ROWID:
				{
					Aast tmp284_AST = null;
					tmp284_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp284_AST);
					match(VAR_ROWID);
					break;
				}
				case VAR_POLY:
				{
					Aast tmp285_AST = null;
					tmp285_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp285_AST);
					match(VAR_POLY);
					break;
				}
				case VAR_BYTE:
				{
					Aast tmp286_AST = null;
					tmp286_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp286_AST);
					match(VAR_BYTE);
					break;
				}
				case VAR_DOUBLE:
				{
					Aast tmp287_AST = null;
					tmp287_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp287_AST);
					match(VAR_DOUBLE);
					break;
				}
				case VAR_FLOAT:
				{
					Aast tmp288_AST = null;
					tmp288_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp288_AST);
					match(VAR_FLOAT);
					break;
				}
				case VAR_LONG:
				{
					Aast tmp289_AST = null;
					tmp289_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp289_AST);
					match(VAR_LONG);
					break;
				}
				case VAR_SHORT:
				{
					Aast tmp290_AST = null;
					tmp290_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp290_AST);
					match(VAR_SHORT);
					break;
				}
				case VAR_USHORT:
				{
					Aast tmp291_AST = null;
					tmp291_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp291_AST);
					match(VAR_USHORT);
					break;
				}
				case SYS_HANDLE:
				{
					Aast tmp292_AST = null;
					tmp292_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp292_AST);
					match(SYS_HANDLE);
					break;
				}
				case STREAM:
				{
					Aast tmp293_AST = null;
					tmp293_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp293_AST);
					match(STREAM);
					break;
				}
				case FIELD_BLOB:
				{
					Aast tmp294_AST = null;
					tmp294_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp294_AST);
					match(FIELD_BLOB);
					break;
				}
				case FIELD_CHAR:
				{
					Aast tmp295_AST = null;
					tmp295_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp295_AST);
					match(FIELD_CHAR);
					break;
				}
				case FIELD_CLASS:
				{
					Aast tmp296_AST = null;
					tmp296_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp296_AST);
					match(FIELD_CLASS);
					break;
				}
				case FIELD_CLOB:
				{
					Aast tmp297_AST = null;
					tmp297_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp297_AST);
					match(FIELD_CLOB);
					break;
				}
				case FIELD_COM_HANDLE:
				{
					Aast tmp298_AST = null;
					tmp298_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp298_AST);
					match(FIELD_COM_HANDLE);
					break;
				}
				case FIELD_DATE:
				{
					Aast tmp299_AST = null;
					tmp299_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp299_AST);
					match(FIELD_DATE);
					break;
				}
				case FIELD_DATETIME:
				{
					Aast tmp300_AST = null;
					tmp300_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp300_AST);
					match(FIELD_DATETIME);
					break;
				}
				case FIELD_DATETIME_TZ:
				{
					Aast tmp301_AST = null;
					tmp301_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp301_AST);
					match(FIELD_DATETIME_TZ);
					break;
				}
				case FIELD_DEC:
				{
					Aast tmp302_AST = null;
					tmp302_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp302_AST);
					match(FIELD_DEC);
					break;
				}
				case FIELD_HANDLE:
				{
					Aast tmp303_AST = null;
					tmp303_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp303_AST);
					match(FIELD_HANDLE);
					break;
				}
				case FIELD_INT:
				{
					Aast tmp304_AST = null;
					tmp304_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp304_AST);
					match(FIELD_INT);
					break;
				}
				case FIELD_INT64:
				{
					Aast tmp305_AST = null;
					tmp305_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp305_AST);
					match(FIELD_INT64);
					break;
				}
				case FIELD_LOGICAL:
				{
					Aast tmp306_AST = null;
					tmp306_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp306_AST);
					match(FIELD_LOGICAL);
					break;
				}
				case FIELD_RAW:
				{
					Aast tmp307_AST = null;
					tmp307_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp307_AST);
					match(FIELD_RAW);
					break;
				}
				case FIELD_RECID:
				{
					Aast tmp308_AST = null;
					tmp308_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp308_AST);
					match(FIELD_RECID);
					break;
				}
				case FIELD_ROWID:
				{
					Aast tmp309_AST = null;
					tmp309_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp309_AST);
					match(FIELD_ROWID);
					break;
				}
				case WID_BROWSE:
				{
					Aast tmp310_AST = null;
					tmp310_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp310_AST);
					match(WID_BROWSE);
					break;
				}
				case WID_BUTTON:
				{
					Aast tmp311_AST = null;
					tmp311_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp311_AST);
					match(WID_BUTTON);
					break;
				}
				case WID_COMBO:
				{
					Aast tmp312_AST = null;
					tmp312_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp312_AST);
					match(WID_COMBO);
					break;
				}
				case WID_DIALOG:
				{
					Aast tmp313_AST = null;
					tmp313_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp313_AST);
					match(WID_DIALOG);
					break;
				}
				case WID_EDITOR:
				{
					Aast tmp314_AST = null;
					tmp314_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp314_AST);
					match(WID_EDITOR);
					break;
				}
				case WID_FILL_IN:
				{
					Aast tmp315_AST = null;
					tmp315_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp315_AST);
					match(WID_FILL_IN);
					break;
				}
				case WID_FRAME:
				{
					Aast tmp316_AST = null;
					tmp316_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp316_AST);
					match(WID_FRAME);
					break;
				}
				case WID_IMAGE:
				{
					Aast tmp317_AST = null;
					tmp317_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp317_AST);
					match(WID_IMAGE);
					break;
				}
				case WID_LITERAL:
				{
					Aast tmp318_AST = null;
					tmp318_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp318_AST);
					match(WID_LITERAL);
					break;
				}
				case WID_MENU:
				{
					Aast tmp319_AST = null;
					tmp319_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp319_AST);
					match(WID_MENU);
					break;
				}
				case WID_MENU_ITM:
				{
					Aast tmp320_AST = null;
					tmp320_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp320_AST);
					match(WID_MENU_ITM);
					break;
				}
				case WID_RADIO:
				{
					Aast tmp321_AST = null;
					tmp321_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp321_AST);
					match(WID_RADIO);
					break;
				}
				case WID_RECT:
				{
					Aast tmp322_AST = null;
					tmp322_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp322_AST);
					match(WID_RECT);
					break;
				}
				case WID_SEL_LST:
				{
					Aast tmp323_AST = null;
					tmp323_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp323_AST);
					match(WID_SEL_LST);
					break;
				}
				case WID_SLIDER:
				{
					Aast tmp324_AST = null;
					tmp324_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp324_AST);
					match(WID_SLIDER);
					break;
				}
				case WID_SUB_MENU:
				{
					Aast tmp325_AST = null;
					tmp325_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp325_AST);
					match(WID_SUB_MENU);
					break;
				}
				case WID_TEXT:
				{
					Aast tmp326_AST = null;
					tmp326_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp326_AST);
					match(WID_TEXT);
					break;
				}
				case WID_TOGGLE:
				{
					Aast tmp327_AST = null;
					tmp327_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp327_AST);
					match(WID_TOGGLE);
					break;
				}
				case WID_WINDOW:
				{
					Aast tmp328_AST = null;
					tmp328_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp328_AST);
					match(WID_WINDOW);
					break;
				}
				case FUNC_CHAR:
				{
					Aast tmp329_AST = null;
					tmp329_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp329_AST);
					match(FUNC_CHAR);
					break;
				}
				case FUNC_CLASS:
				{
					Aast tmp330_AST = null;
					tmp330_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp330_AST);
					match(FUNC_CLASS);
					break;
				}
				case FUNC_COM_HANDLE:
				{
					Aast tmp331_AST = null;
					tmp331_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp331_AST);
					match(FUNC_COM_HANDLE);
					break;
				}
				case FUNC_DATE:
				{
					Aast tmp332_AST = null;
					tmp332_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp332_AST);
					match(FUNC_DATE);
					break;
				}
				case FUNC_DATETIME:
				{
					Aast tmp333_AST = null;
					tmp333_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp333_AST);
					match(FUNC_DATETIME);
					break;
				}
				case FUNC_DATETIME_TZ:
				{
					Aast tmp334_AST = null;
					tmp334_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp334_AST);
					match(FUNC_DATETIME_TZ);
					break;
				}
				case FUNC_DEC:
				{
					Aast tmp335_AST = null;
					tmp335_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp335_AST);
					match(FUNC_DEC);
					break;
				}
				case FUNC_HANDLE:
				{
					Aast tmp336_AST = null;
					tmp336_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp336_AST);
					match(FUNC_HANDLE);
					break;
				}
				case FUNC_INT:
				{
					Aast tmp337_AST = null;
					tmp337_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp337_AST);
					match(FUNC_INT);
					break;
				}
				case FUNC_INT64:
				{
					Aast tmp338_AST = null;
					tmp338_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp338_AST);
					match(FUNC_INT64);
					break;
				}
				case FUNC_LOGICAL:
				{
					Aast tmp339_AST = null;
					tmp339_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp339_AST);
					match(FUNC_LOGICAL);
					break;
				}
				case FUNC_LONGCHAR:
				{
					Aast tmp340_AST = null;
					tmp340_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp340_AST);
					match(FUNC_LONGCHAR);
					break;
				}
				case FUNC_MEMPTR:
				{
					Aast tmp341_AST = null;
					tmp341_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp341_AST);
					match(FUNC_MEMPTR);
					break;
				}
				case FUNC_RAW:
				{
					Aast tmp342_AST = null;
					tmp342_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp342_AST);
					match(FUNC_RAW);
					break;
				}
				case FUNC_RECID:
				{
					Aast tmp343_AST = null;
					tmp343_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp343_AST);
					match(FUNC_RECID);
					break;
				}
				case FUNC_ROWID:
				{
					Aast tmp344_AST = null;
					tmp344_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp344_AST);
					match(FUNC_ROWID);
					break;
				}
				case FUNC_POLY:
				{
					Aast tmp345_AST = null;
					tmp345_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp345_AST);
					match(FUNC_POLY);
					break;
				}
				case DB_SYMBOL:
				{
					Aast tmp346_AST = null;
					tmp346_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp346_AST);
					match(DB_SYMBOL);
					break;
				}
				case KW_U_CTRL:
				case KW_U_MSG:
				case KW_U_PCTRL:
				case KW_U_SERIAL:
				case KW_ACT_FORM:
				case KW_ACT_WIN:
				case KW_AUD_CTRL:
				case KW_AUD_POL:
				case KW_CLIP:
				case KW_CODEBASE:
				case KW_COMPILER:
				case KW_CUR_LANG:
				case KW_CUR_WIN:
				case KW_DATASRV:
				case KW_DBNAME:
				case KW_DEBUGGER:
				case KW_DEF_WIN:
				case KW_DSL_MGR:
				case KW_ERR_STAT:
				case KW_ETIME:
				case KW_FIL_INFO:
				case KW_FOCUS:
				case KW_FR_COL:
				case KW_FR_DB:
				case KW_FR_DOWN:
				case KW_FR_FIELD:
				case KW_FR_FILE:
				case KW_FR_INDEX:
				case KW_FR_LINE:
				case KW_FR_NAME:
				case KW_FR_ROW:
				case KW_FR_VAL:
				case KW_FWD_DRIV:
				case KW_GW:
				case KW_GET_CODP:
				case KW_GO_PEND:
				case KW_IS_ATTR:
				case KW_LASTKEY:
				case KW_LAST_EVT:
				case KW_LINE_CNT:
				case KW_LOG_MGR:
				case KW_MSG_LINE:
				case KW_NOW:
				case KW_NUM_ALIA:
				case KW_NUM_DBS:
				case KW_OPSYS:
				case KW_PAGE_NUM:
				case KW_PROC_HND:
				case KW_PROC_ST:
				case KW_PROFILER:
				case KW_PROGRESS:
				case KW_PROMSGS:
				case KW_PROPATH:
				case KW_PROVER:
				case KW_RCOD_INF:
				case KW_RETRY:
				case KW_RTOPSYS:
				case KW_SCRN_LNS:
				case KW_SECUR_P:
				case KW_SELF:
				case KW_SESSION:
				case KW_SUPER:
				case KW_TERM:
				case KW_THIS_OBJ:
				case KW_THIS_PRC:
				case KW_TIME:
				case KW_TRANS:
				case KW_USERID:
				{
					reserved_variables();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
					if (((LA(1)==FILENAME))&&( evaluatingExpression || allowSymbolMatch )) {
						Aast tmp347_AST = null;
						tmp347_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp347_AST);
						match(FILENAME);
					}
					else if ((_tokenSet_15.member(LA(1)))) {
						symbol();
						astFactory.addASTChild(currentAST, returnAST);
						if (!( evaluatingExpression || allowSymbolMatch ))
						  throw new SemanticException(" evaluatingExpression || allowSymbolMatch ");
						{
						if ((LA(1)==DOT) && (_tokenSet_15.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
							Aast tmp348_AST = null;
							tmp348_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp348_AST);
							match(DOT);
							symbol();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						
						}
					}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				if ((LA(1)==LBRACKET) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					subscript();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((LA(1)==KW_IN) && (_tokenSet_64.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(2) == KW_FRAME || LA(2) == KW_MENU || LA(2) == KW_SUB_MENU || LA(2) == KW_BROWSE )) {
				widget_qualifier();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			lvalue_AST = (Aast)currentAST.root;
			
			// assume the AST node to annotate is the root node (we need this
			// to be the variable reference itself)
			Aast core  = lvalue_AST;
			int  ctype = core.getType();
			
			// browse references will be rooted at a different node
			if (ctype == KW_BROWSE)
			{
			// walk down to get the variable reference as the AST node
			core = (Aast) core.getFirstChild();
			}
			
			int    ftype = core.getType();
			String ftext = core.getText();
			
			// after the lvalue has been fully parsed (including subscripts and so forth), it is easy to see the
			// next token (before now it was an arbitrary number of tokens away); if the next token is a COLON
			// w/o following whitespace AND this is NOT a class lookup, then we would have wanted to parse the
			// lvalue with preferWidgets set to true; simulate this now
			if (ftype >= BEGIN_VARTYPES      &&
			ftype <= END_VARTYPES        &&
			LA(1) == COLON               &&
			!followedByWhitespace(LT(1)) &&
			!sym.isClassLookup())
			{
			int override = sym.lookupWidget(ftext);
			
			if (override != -1)
			{
			ftype = override;
			core.setType(override);
			}
			}
			
			// save any original token type that rewriting may have erased
			if (oldtype != -1)
			{
			core.putAnnotation("oldtype", Long.valueOf(oldtype));
			}
			if (origTxt != null)
			{
			core.putAnnotation("original-text", origTxt);
			}
			
			// fixup deferred qualified class name
			// TODO: this doesn't account for all cases (the use of lookupDataMember() above
			//       does not set this var; this means that these variable references have
			//       no refid, nor class name and cannot be properly used downstream
			if (clsName != null)
			sym.annotateClassRef(clsName, core);
			
			// field post-processing
			if (ftype > BEGIN_FIELDTYPES && ftype < END_FIELDTYPES)
			{
			boolean promoted = !inFormStatement && !inLikeClause;
			sym.annotateField(core, currentRecord, false, promoted, preferDefaultBuffer);
			}
			
			// function post-processing
			if (ftype > BEGIN_FUNCTYPES && ftype < END_FUNCTYPES)
			{
			// write our function-specific annotations
			sym.annotateFunction(ftext, core, false);
			}
			
			// variable and widget post-processing
			if ((ftype > BEGIN_VARTYPES && ftype < END_VARTYPES) ||
			(ftype > BEGIN_WIDGETS  && ftype < END_WIDGETS))
			{
			annotateVariable(ftext, ftype, core);
			}
			
			// dataset & datasource post-processing
			if (ftype == KW_DATASET || ftype == KW_DATA_SRC)
			{
			sym.setDatasetOptions(currentClassName,
			currentStaticFlag,
			core.getFirstChild().getText(),
			(Aast) core.getFirstChild(),
			core.getFirstChild().getType(),
			false);
			}
			
			if (promote)
			{
			sym.promoteTableName(tablename, true, false);
			}
			
			lvalue_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = lvalue_AST;
	}
	
/**
 * Matches a <code>FOR</code> followed by two {@link #record} references
 * and options including {@link #field_mapping_clause}. Used by
 * {@link #data_relation}.
 */
	public final void for_data_relation_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast for_data_relation_spec_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			Aast tmp349_AST = null;
			tmp349_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp349_AST);
			match(KW_FOR);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop235:
			do {
				if ((LA(1)==KW_REPOS) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp350_AST = null;
					tmp350_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp350_AST);
					match(KW_REPOS);
				}
				else if ((LA(1)==KW_RECURSE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp351_AST = null;
					tmp351_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp351_AST);
					match(KW_RECURSE);
				}
				else if ((LA(1)==KW_NOT_ACTV) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp352_AST = null;
					tmp352_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp352_AST);
					match(KW_NOT_ACTV);
				}
				else if ((LA(1)==KW_NESTED) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					nested_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_REL_FLDS) && (LA(2)==LPARENS) && (_tokenSet_64.member(LA(3)))) {
					field_mapping_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop235;
				}
				
			} while (true);
			}
			for_data_relation_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = for_data_relation_spec_AST;
	}
	
/**
 * Matches a <code>NESTED</code> keyword followed by an optional <code>FOREIGN-KEY-HIDDEN</code>
 * keyword. Called by {@link #for_data_relation_spec}. 
 */
	public final void nested_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast nested_clause_AST = null;
		
		try {      // for error handling
			Aast tmp353_AST = null;
			tmp353_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp353_AST);
			match(KW_NESTED);
			{
			if ((LA(1)==KW_F_KEY_H) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp354_AST = null;
				tmp354_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp354_AST);
				match(KW_F_KEY_H);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			nested_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = nested_clause_AST;
	}
	
/**
 * Matches a <code>RELATION-FIELDS</code> keyword followed by a list of
 * one or more {@link #parent_child_field_relation} references. Called by
 * {@link #for_data_relation_spec}. 
 */
	public final void field_mapping_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast field_mapping_clause_AST = null;
		
		try {      // for error handling
			preferFields = true;
			Aast tmp355_AST = null;
			tmp355_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp355_AST);
			match(KW_REL_FLDS);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			int _cnt251=0;
			_loop251:
			do {
				if ((_tokenSet_64.member(LA(1)))) {
					parent_child_field_relation();
					astFactory.addASTChild(currentAST, returnAST);
					{
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_68.member(LA(1)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
				}
				else {
					if ( _cnt251>=1 ) { break _loop251; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt251++;
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			preferFields = false;
			field_mapping_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = field_mapping_clause_AST;
	}
	
/**
 * Matches a <code>FOR</code> followed by two {@link #record} references
 * and options including {@link #field_mapping_clause}. Used by
 * {@link #parent_id_relation}.
 */
	public final void for_parent_relation_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast for_parent_relation_spec_AST = null;
		Token  f = null;
		Aast f_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			f = LT(1);
			f_AST = (Aast)astFactory.create(f);
			match(KW_FOR);
			hide(f);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			parent_id_field_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop240:
			do {
				if ((LA(1)==KW_PAR_FLDA||LA(1)==KW_PAR_FLDB) && (LA(2)==LPARENS) && (_tokenSet_64.member(LA(3)))) {
					parent_fields_ordering_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop240;
				}
				
			} while (true);
			}
			for_parent_relation_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = for_parent_relation_spec_AST;
	}
	
/**
 * Matches a <code>PARENT-ID-FIELD</code> followed by an {@link #lvalue} reference.
 * <p>
 * Used by {@link #for_parent_relation_spec}.
 */
	public final void parent_id_field_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast parent_id_field_clause_AST = null;
		
		try {      // for error handling
			Aast tmp356_AST = null;
			tmp356_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp356_AST);
			match(KW_PAR_IFLD);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			parent_id_field_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = parent_id_field_clause_AST;
	}
	
/**
 * Matches a <code>PARENT-FIELDS-[BEFORE|AFTER]</code> followed by parenthesized list of
 * one or more comma separated {@link #lvalue} references.
 * <p>
 * Used by {@link #for_parent_relation_spec}.
 */
	public final void parent_fields_ordering_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast parent_fields_ordering_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_PAR_FLDB:
			{
				Aast tmp357_AST = null;
				tmp357_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp357_AST);
				match(KW_PAR_FLDB);
				break;
			}
			case KW_PAR_FLDA:
			{
				Aast tmp358_AST = null;
				tmp358_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp358_AST);
				match(KW_PAR_FLDA);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop245:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop245;
				}
				
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			parent_fields_ordering_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = parent_fields_ordering_clause_AST;
	}
	
/**
 * Matches a pair of {@link #lvalue} references and roots the pair at a
 * <code>PARENT_CHILD_RELATION</code> node. Called by 
 * {@link #field_mapping_clause}.
 */
	public final void parent_child_field_relation() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast parent_child_field_relation_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(PARENT_CHILD_RELATION,""));
			
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			parent_child_field_relation_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_72);
		}
		returnAST = parent_child_field_relation_AST;
	}
	
/**
 * Matches a set of UI oriented keywords and keywords and the required
 * following expression.  This is the list of keywords matched:
 * <pre>
 *    BGCOLOR
 *    DCOLOR
 *    FGCOLOR
 *    PFCOLOR
 *    FONT
 *    CONTEXT_HELP_ID
 *    COLUMN (allows COLUMNS as a synonym)
 *    ROW
 *    MOUSE-POINTER
 *    COLUMN-BGCOLOR
 *    COLUMN-DCOLOR
 *    COLUMN-FGCOLOR
 *    COLUMN-PFCOLOR
 *    COLUMN-FONT
 *    LABEL-BGCOLOR
 *    LABEL-DCOLOR
 *    LABEL-FGCOLOR
 *    LABEL-PFCOLOR
 *    LABEL-FONT
 *    ACCELERATOR
 *    WIDGET-ID
 * </pre>
 * <p>
 * This method has an override for the normal <code>KW_COL expr</code> that can be matched. 
 * There is a hard coded option in this method to match either <code>KW_COLUMNS</code> or 
 * <code>KW_COL</code> interchangeably (with a following expression) since the 4GL allows
 * this too.  This is an undocumented "feature" of the 4GL.
 * <p>
 * Used by {@link #def_var_stmt} and MANY other locations in the parser.
 * The subtree is rooted by the keyword (which is the reason for using a
 * separate rule for something so simple), but this also centralizes the
 * logic.
 */
	public final void ui_stuff() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast ui_stuff_AST = null;
		Token  c = null;
		Aast c_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_BGCOLOR:
			{
				Aast tmp359_AST = null;
				tmp359_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp359_AST);
				match(KW_BGCOLOR);
				break;
			}
			case KW_DCOLOR:
			{
				Aast tmp360_AST = null;
				tmp360_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp360_AST);
				match(KW_DCOLOR);
				break;
			}
			case KW_FGCOLOR:
			{
				Aast tmp361_AST = null;
				tmp361_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp361_AST);
				match(KW_FGCOLOR);
				break;
			}
			case KW_PFCOLOR:
			{
				Aast tmp362_AST = null;
				tmp362_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp362_AST);
				match(KW_PFCOLOR);
				break;
			}
			case KW_FONT:
			{
				Aast tmp363_AST = null;
				tmp363_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp363_AST);
				match(KW_FONT);
				break;
			}
			case KW_CTX_H_ID:
			{
				Aast tmp364_AST = null;
				tmp364_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp364_AST);
				match(KW_CTX_H_ID);
				break;
			}
			case KW_COL:
			{
				Aast tmp365_AST = null;
				tmp365_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp365_AST);
				match(KW_COL);
				break;
			}
			case KW_COLUMNS:
			{
				c = LT(1);
				c_AST = (Aast)astFactory.create(c);
				astFactory.makeASTRoot(currentAST, c_AST);
				match(KW_COLUMNS);
				c_AST.setType(KW_COL);
				break;
			}
			case KW_ROW:
			{
				Aast tmp366_AST = null;
				tmp366_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp366_AST);
				match(KW_ROW);
				break;
			}
			case KW_MOU_PTR:
			{
				Aast tmp367_AST = null;
				tmp367_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp367_AST);
				match(KW_MOU_PTR);
				break;
			}
			case KW_COL_BGC:
			{
				Aast tmp368_AST = null;
				tmp368_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp368_AST);
				match(KW_COL_BGC);
				break;
			}
			case KW_COL_DC:
			{
				Aast tmp369_AST = null;
				tmp369_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp369_AST);
				match(KW_COL_DC);
				break;
			}
			case KW_COL_FGC:
			{
				Aast tmp370_AST = null;
				tmp370_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp370_AST);
				match(KW_COL_FGC);
				break;
			}
			case KW_COL_FONT:
			{
				Aast tmp371_AST = null;
				tmp371_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp371_AST);
				match(KW_COL_FONT);
				break;
			}
			case KW_COL_PFC:
			{
				Aast tmp372_AST = null;
				tmp372_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp372_AST);
				match(KW_COL_PFC);
				break;
			}
			case KW_LAB_BGC:
			{
				Aast tmp373_AST = null;
				tmp373_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp373_AST);
				match(KW_LAB_BGC);
				break;
			}
			case KW_LAB_DC:
			{
				Aast tmp374_AST = null;
				tmp374_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp374_AST);
				match(KW_LAB_DC);
				break;
			}
			case KW_LAB_FGC:
			{
				Aast tmp375_AST = null;
				tmp375_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp375_AST);
				match(KW_LAB_FGC);
				break;
			}
			case KW_LAB_FONT:
			{
				Aast tmp376_AST = null;
				tmp376_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp376_AST);
				match(KW_LAB_FONT);
				break;
			}
			case KW_LAB_PFC:
			{
				Aast tmp377_AST = null;
				tmp377_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp377_AST);
				match(KW_LAB_PFC);
				break;
			}
			case KW_ACCEL:
			{
				Aast tmp378_AST = null;
				tmp378_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp378_AST);
				match(KW_ACCEL);
				break;
			}
			case KW_WID_ID:
			{
				Aast tmp379_AST = null;
				tmp379_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp379_AST);
				match(KW_WID_ID);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			ui_stuff_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = ui_stuff_AST;
	}
	
/**   
 * Matches the <code>TITLE</code> keyword and the required following string. 
 * This is the simplified version of {@link #title_phrase}.
 * <p>
 * Used by {@link #view_as_alert_box_clause}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void simple_title_string() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast simple_title_string_AST = null;
		
		try {      // for error handling
			Aast tmp380_AST = null;
			tmp380_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp380_AST);
			match(KW_TITLE);
			Aast tmp381_AST = null;
			tmp381_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp381_AST);
			match(STRING);
			simple_title_string_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = simple_title_string_AST;
	}
	
/**
 * Matches the <code>LIKE</code> language keyword that defines the name of
 * a menu to pattern another menu upon.  In this case the type of the
 * menu is already known so this has no namespace implications.
 * This is called from {@link #def_menu_stmt}.  This rule is only separate 
 * to properly build the AST.
 */
	public final void like_menu_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast like_menu_clause_AST = null;
		
		try {      // for error handling
			Aast tmp382_AST = null;
			tmp382_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp382_AST);
			match(KW_LIKE);
			symbol();
			astFactory.addASTChild(currentAST, returnAST);
			like_menu_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = like_menu_clause_AST;
	}
	
/**   
 * Matches the <code>RULE or SKIP</code> keywords or the other possible
 * constructs {@link #menu_item_phrase} and {@link #submenu_descriptor} that
 * can be used as a menu element.  Called from {@link #def_menu_stmt}.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * <code>SUB-MENU</code> keyword.
 */
	public final void menu_element_descriptor() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast menu_element_descriptor_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_RULE:
			{
				Aast tmp383_AST = null;
				tmp383_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp383_AST);
				match(KW_RULE);
				break;
			}
			case KW_SKIP:
			{
				Aast tmp384_AST = null;
				tmp384_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp384_AST);
				match(KW_SKIP);
				break;
			}
			case KW_SUB_MENU:
			{
				submenu_descriptor();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_MENU_ITM:
			{
				menu_item_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			menu_element_descriptor_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = menu_element_descriptor_AST;
	}
	
/**   
 * Matches the <code>SUB-MENU</code> keyword with following sub-menu name
 * and options.  This is used in a {@link #menu_element_descriptor}.
 * <p>
 * At this time, the <code>symbol</code> is a placeholder for proper
 * menu namespace processing.
 * <p>
 * This is very similar to the {@link #menu_reference} rule but it includes
 * a more specific keyword and has options.  The two rules can't be used as
 * alternatives because they are ambiguous.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * <code>SUB-MENU</code> keyword.
 */
	public final void submenu_descriptor() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast submenu_descriptor_AST = null;
		
		try {      // for error handling
			Aast tmp385_AST = null;
			tmp385_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp385_AST);
			match(KW_SUB_MENU);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop263:
			do {
				if ((LA(1)==KW_LABEL) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					label(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DISABLED) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp386_AST = null;
					tmp386_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp386_AST);
					match(KW_DISABLED);
				}
				else {
					break _loop263;
				}
				
			} while (true);
			}
			submenu_descriptor_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = submenu_descriptor_AST;
	}
	
/**
 * Matches a <code>MENU-ITEM</code> definition in the Progress 4GL
 * <code>DEFINE MENU or DEFINE SUB-MENU</code> language statements. 
 * Menus, sub-menus and menu-items are stored in their own namespace which is
 * separate from the other widgets, though at this time there is no actual
 * menu namespace processing in this parser.
 * <p>
 * This rule is called by {@link #menu_element_descriptor}.
 * <p>
 * This rule matches the <code>MENU-ITEM</code> keyword and all
 * subsequent processing.  Calls the following rules:
 * <p>
 * {@link #symbol}
 * {@link #label}
 * {@link #ui_stuff}
 * <p>
 * All options can be processed in any order.
 * <p>
 * The <code>ui_stuff</code> rule generates bogus ambiguity warnings with
 * the exit branch of the loop. Ambiguity warnings have been disabled.
 */
	public final void menu_item_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast menu_item_phrase_AST = null;
		Aast itm_AST = null;
		
		try {      // for error handling
			Aast tmp387_AST = null;
			tmp387_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp387_AST);
			match(KW_MENU_ITM);
			symbol();
			itm_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop266:
			do {
				if ((LA(1)==KW_READ_ONL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp388_AST = null;
					tmp388_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp388_AST);
					match(KW_READ_ONL);
				}
				else if ((LA(1)==KW_TOGGL_BX) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp389_AST = null;
					tmp389_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp389_AST);
					match(KW_TOGGL_BX);
				}
				else if ((LA(1)==KW_DISABLED) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp390_AST = null;
					tmp390_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp390_AST);
					match(KW_DISABLED);
				}
				else if ((LA(1)==KW_LABEL) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					label(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TRIGGERS) && (LA(2)==DOT||LA(2)==COLON) && (LA(3)==KW_END||LA(3)==KW_ON)) {
					trigger_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop266;
				}
				
			} while (true);
			}
			menu_item_phrase_AST = (Aast)currentAST.root;
			
			String txt = itm_AST.getText();
			sym.addMenuItem(txt, WID_MENU_ITM);
			
			// pass the AST with all options to the symbol resolver to set
			// those variable options accordingly
			sym.setVariableOptions(txt, menu_item_phrase_AST);
			
			// write any non-standard options into annotations
			sym.annotateVariableOptions(txt, menu_item_phrase_AST, true);
			
			menu_item_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = menu_item_phrase_AST;
	}
	
/**   
 * Matches the <code>TRIGGERS</code> keyword and the following trigger phrase
 * construct.  This is used in the {@link #def_var_stmt},
 * {@link #def_button_stmt} and {@link #menu_item_phrase} rules.
 * <p>
 * Calls the {@link #simple_on_stmt} rule to implement the actual event
 * matching and trigger block.  Uses {@link #end_stmt} to delimit the 
 * block.  This rule does NOT eat the trailing <code>DOT</code> since it is
 * called inline from other language statements.
 * <p>
 * Though it is not documented, it is possible to use either a 
 * <code>DOT or COLON</code> after the <code>TRIGGERS</code> keyword. This
 * is supported.  Note that although in many locations in Progress, 2
 * nearly identical keywords are both matched as the documented keyword
 * (e.g. {@link #buttons_clause} or {@link #field_list}),
 * the <code>TRIGGER</code> keyword does NOT work in Progress, thus we
 * provide no support for it here.
 * <p>
 * Although the 4GL documentation shows that at least one {@link #simple_on_stmt} is required
 * to be present, customer code has shown that it is optional. This undocumented feature is
 * supported.
 * <p>
 * Bogus ANTLR ambiguity warnings have been suppressed.
 */
	public final void trigger_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast trigger_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp391_AST = null;
			tmp391_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp391_AST);
			match(KW_TRIGGERS);
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop850:
			do {
				if ((LA(1)==KW_ON)) {
					simple_on_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop850;
				}
				
			} while (true);
			}
			end_stmt(false);
			astFactory.addASTChild(currentAST, returnAST);
			trigger_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = trigger_phrase_AST;
	}
	
/**   
 * Matches a set of image oriented keywords and keywords and the required
 * following {@link #image_phrase}.  This is the list of keywords matched:
 * <pre>
 * IMAGE
 * IMAGE-DOWN
 * IMAGE-INSENSITIVE
 * IMAGE-UP
 * </pre>
 * <p>
 * Used by {@link #def_button_stmt} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 */
	public final void image_stuff() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast image_stuff_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_IMAGE:
			{
				Aast tmp392_AST = null;
				tmp392_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp392_AST);
				match(KW_IMAGE);
				break;
			}
			case KW_IMG_DOWN:
			{
				Aast tmp393_AST = null;
				tmp393_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp393_AST);
				match(KW_IMG_DOWN);
				break;
			}
			case KW_IMG_INS:
			{
				Aast tmp394_AST = null;
				tmp394_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp394_AST);
				match(KW_IMG_INS);
				break;
			}
			case KW_IMG_UP:
			{
				Aast tmp395_AST = null;
				tmp395_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp395_AST);
				match(KW_IMG_UP);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			image_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			image_stuff_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = image_stuff_AST;
	}
	
/**
 * Matches the <code>LIKE</code> language keyword that defines the name of
 * a widget to pattern another widget upon.  In this case the type of the
 * widget is already known so this has no namespace implications.
 * This is called from {@link #def_button_stmt} and other locations which all
 * handle the same syntax.  This allows the logic to be centralized and
 * reused from multiple callers. This rule is only separate to properly
 * build the AST.
 */
	public final void like_widget_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast like_widget_clause_AST = null;
		
		try {      // for error handling
			Aast tmp396_AST = null;
			tmp396_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp396_AST);
			match(KW_LIKE);
			widget();
			astFactory.addASTChild(currentAST, returnAST);
			like_widget_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = like_widget_clause_AST;
	}
	
/**
 * Matches the size phrase construct of the Progress 4GL language.
 * This rule is called from {@link #frame_phrase} rule et al.
 */
	public final void size_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast size_phrase_AST = null;
		Token  by = null;
		Aast by_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_SIZE:
			{
				Aast tmp397_AST = null;
				tmp397_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp397_AST);
				match(KW_SIZE);
				break;
			}
			case KW_SIZE_C:
			{
				Aast tmp398_AST = null;
				tmp398_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp398_AST);
				match(KW_SIZE_C);
				break;
			}
			case KW_SIZE_P:
			{
				Aast tmp399_AST = null;
				tmp399_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp399_AST);
				match(KW_SIZE_P);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			numeric_literal();
			astFactory.addASTChild(currentAST, returnAST);
			by = LT(1);
			by_AST = (Aast)astFactory.create(by);
			match(KW_BY);
			hide(by);
			numeric_literal();
			astFactory.addASTChild(currentAST, returnAST);
			size_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = size_phrase_AST;
	}
	
/**   
 * Matches the <code>NO-FOCUS</code> keyword and the optional following
 * <code>FLAT-BUTTON</code>. Used by {@link #def_button_stmt} and the subtree
 * is rooted by the keyword (which is the reason for using a separate rule
 * for something so simple).
 */
	public final void no_focus_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast no_focus_clause_AST = null;
		
		try {      // for error handling
			Aast tmp400_AST = null;
			tmp400_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp400_AST);
			match(KW_NO_FOCUS);
			{
			if ((LA(1)==KW_FLAT_BUT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp401_AST = null;
				tmp401_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp401_AST);
				match(KW_FLAT_BUT);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			no_focus_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = no_focus_clause_AST;
	}
	
/**   
 * Matches the <code>TOOLTIP</code> clause as used in a phrase from a
 * <code>VIEW-AS</code> construct.  See {@link #view_as_phrase}.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * keyword.
 */
	public final void tooltip_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast tooltip_clause_AST = null;
		
		try {      // for error handling
			Aast tmp402_AST = null;
			tmp402_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp402_AST);
			match(KW_TOOLTIP);
			literal();
			astFactory.addASTChild(currentAST, returnAST);
			tooltip_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = tooltip_clause_AST;
	}
	
/**
 * Matches the <code>EDGE-CHARS or EDGE-PIXELS</code> construct of the 
 * Progress 4GL language. This rule is called from the {@link #def_rect_stmt}
 * rule.
 */
	public final void edge_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast edge_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_EDGE_C:
			{
				Aast tmp403_AST = null;
				tmp403_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp403_AST);
				match(KW_EDGE_C);
				break;
			}
			case KW_EDGE_P:
			{
				Aast tmp404_AST = null;
				tmp404_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp404_AST);
				match(KW_EDGE_P);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			numeric_literal();
			astFactory.addASTChild(currentAST, returnAST);
			edge_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = edge_clause_AST;
	}
	
/**
 * Support the <code>STRETCH-TO-FIT</code> with an optional 
 * <code>RETAIN-SHAPE</code>. This is separated to properly build the tree
 * rooted at the <code>KW_ST_2_FIT</code> node.  Called from
 * {@link #def_image_stmt}
 */
	public final void stretch_to_fit_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast stretch_to_fit_clause_AST = null;
		
		try {      // for error handling
			Aast tmp405_AST = null;
			tmp405_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp405_AST);
			match(KW_ST_2_FIT);
			{
			if ((LA(1)==KW_RET_SHAP) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp406_AST = null;
				tmp406_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp406_AST);
				match(KW_RET_SHAP);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			stretch_to_fit_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = stretch_to_fit_clause_AST;
	}
	
/**   
 * Matches the image phrase which is called from a {@link #def_button_stmt}
 * or a {@link #def_image_stmt}. The first token must be the 
 * <code>KW_FILE</code> followed by a {@link #filename}. Also uses the
 * following:
 * <p>
 * <ul>
 *    <li> {@link #image_size_clause}
 *    <li> {@link #from_clause}
 * </ul>
 * <p>
 * Also allows a match to the <code>KW_FIL_NAME</code> token instead of the
 * <code>KW_FILE</code>.  This is an undocumented feature found in real 4GL
 * code. We normalize the parent to KW_FILE in this case to simplify downstream
 * use.
 */
	public final void image_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast image_phrase_AST = null;
		Token  f = null;
		Aast f_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_FILE:
			case KW_FIL_NAME:
			{
				{
				switch ( LA(1)) {
				case KW_FILE:
				{
					Aast tmp407_AST = null;
					tmp407_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp407_AST);
					match(KW_FILE);
					break;
				}
				case KW_FIL_NAME:
				{
					f = LT(1);
					f_AST = (Aast)astFactory.create(f);
					astFactory.makeASTRoot(currentAST, f_AST);
					match(KW_FIL_NAME);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				if (f_AST != null) f_AST.setType(KW_FILE);
				{
				if (((LA(1) >= KW_IMG_SZ && LA(1) <= KW_IMG_SZ_P)) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==KW_BY)) {
					image_size_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				break;
			}
			case KW_IMG_SZ:
			case KW_IMG_SZ_C:
			case KW_IMG_SZ_P:
			{
				image_size_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==KW_FROM) && (_tokenSet_73.member(LA(2))) && (_tokenSet_74.member(LA(3)))) {
				from_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			image_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = image_phrase_AST;
	}
	
/**
 * Matches the shorthand of specifying a record (and optional exclude list
 * of fields) instead of an explicit field list, in the 
 * {@link #def_frame_stmt}, {@link #display_stmt} and {@link #column_spec}
 * rules.  Uses {@link #except_list}.
 * <p>
 * This rule is naturally greedy (in matching a list of field names to
 * exclude, and doing so in a loop. ANTLR warns that this causes ambiguity. 
 * The greedy option is used to tell ANTLR to disable the warning, though it
 * has no impact on the actual code generation.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 * <p>
 * If a non-null <code>fields</code> argument is provided, a bogus AST will be
 * manufactured to represent a business logic reference to each field in the
 * database table represented by the record spec. These are used downstream for
 * schema-level field assign validation processing.
 * <p>
 * TBD:  we always promote the associated table here, though it is unclear
 * whether this is necessary in the {@link #form_stmt} case.
 *
 * @param   fields
 *          Set into which manufactured field references should be stored. May be
 *          <code>null</code>.
 */
	public final void record_spec(
		Set<Aast> fields
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast record_spec_AST = null;
		Aast r_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			nothing=record(true, false, false);
			r_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_EXCEPT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				except_list(null);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			if (fields != null)
			{
			String sname = (String) r_AST.getAnnotation("schemaname");
			String bufname = (String) r_AST.getAnnotation("bufname");
			Iterator<Aast> iter = sym.fields(sname);
			while (iter.hasNext())
			{
			Aast fld = iter.next();
			String fname = fld.getText();
			
			// manufacture bogus field reference AST with bufname and schemaname annotations
			Aast fldRef = new ProgressAst();
			fldRef.setType(fld.getType());
			fldRef.setText(bufname + "." + fname);
			fldRef.putAnnotation("schemaname", sname + "." + fname);
			fldRef.putAnnotation("bufname", bufname);
			
			fields.add(fldRef);
			}
			}
			
			record_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = record_spec_AST;
	}
	
/**
 * Matches the form item construct of the Progress 4GL language.  Calls
 * {@link #space_or_skip}, {@link #widget} and {@link #expr}. Called by 
 * {@link #def_frame_stmt} and {@link #form_stmt}.  The resulting tree will be
 * rooted at a <code>FORM_ITEM</code> token.
 * <p>
 * This is ambiguity between the {@link #widget} rule and the expression/
 * variable definition mode where the rule uses a {@link #symbol}
 * for matching.  Since both rules can can reference a symbol in the
 * leftmost position, lookups are done in the widget namespace to
 * disambiguate (in a semantic predicate) the widget option and the
 * expression path (with modified matching) is used for both the variable
 * definition and general expressions.
 * <p>
 * New variables can be defined using the the format phrase with an embedded
 * <code>AS or LIKE</code> clause!  The <code>AS or LIKE</code> clause can
 * be arbitrarily deep in the format phrase so we enable a special mode of
 * the {@link #expr} processing that allows {@link #lvalue} to match with
 * a <code>SYMBOL</code>.  This overcomes the limitations of fixed lookahead
 * cause (where the <code>AS or LIKE</code> keywords cannot be found in the
 * 2nd token).
 * <p>
 * Another unsupported feature of Progress is the implicit scoping of a
 * qualified variable name (when a field is referenced - this will be
 * matched by the expression alternative) to the unqualified version. Thus
 * a name like tablename.fieldname can be referenced in the following
 * format phrase as fieldname, even though it would normally be ambiguous.
 * To work around this, hints can be used to define a variable of the
 * appropriate name with the proper <code>FIELD_</code> token type.
 * <p>
 * The use of the {@link #format_phrase} following an expression is ambiguous
 * since it includes rule references that include options that include
 * expressions.  Thus, the lookahead set for the format phrase is quite
 * large and this naturally can conflict with following constructs in the
 * form item's calling rule(s).  A review of the code does not show any
 * problems and no false positives have been encountered yet. Ambiguity
 * warnings for this case have been disabled but this location bears
 * watching.   Similar ambiguities exist for the aggregate phrase, the use of
 * which is an undocumented feature in the form statement.  This rules does
 * allow this usage.
 *
 * @param   fields
 *          Set into which a field reference should be stored, if the form item
 *          represents a database field.
 */
	public final void form_item(
		Set<Aast> fields
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast form_item_AST = null;
		Aast w_AST = null;
		Aast e_AST = null;
		
		try {      // for error handling
			
			String symbolName = null;
			Aast   fld        = null;
			Aast   child      = null;
			int    numFP      = 0;
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(FORM_ITEM,"form item"));
			
			{
			if ((LA(1)==KW_SKIP||LA(1)==KW_SPACE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				space_or_skip();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_24.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				if (((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
                   sym.lookupWidget(LT(1).getText())   != -1 &&
                   sym.lookupVariable(LT(1).getText()) == -1 &&
                   !sym.isFieldExactName(LT(1).getText())
                )) {
					widget();
					w_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_24.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					
					allowSymbolMatch = true; 
					allowStringMatch = true; 
					excludeFrame = true; 
					// TODO: Determine what downstream affects  there might be before enabling
					// preferDefaultBuffer = true;
					
					expr();
					e_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					allowSymbolMatch = false;
					allowStringMatch = false;
					excludeFrame = false;
					// preferDefaultBuffer = false;
					
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				
				// setup for the format phrase processing which may involve
				// a variable definition or 
				if (e_AST != null)
				{
				child = e_AST.getChildAt(0);
				
				if (child != null && child.getType() == SYMBOL)
				{
				symbolName = child.getText();
				}
				else
				{
				fld = findFieldNode(e_AST);
				if (fld != null && LA(1) == KW_LIKE)
				{
				symbolName = fld.getText();
				fld.setType(SYMBOL);
				fld = null;
				}
				}
				}
				else if (w_AST != null)
				{
				fld = findFieldNode(w_AST);
				}
				
				{
				_loop298:
				do {
					if ((LA(1)==LPARENS) && (_tokenSet_75.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						lparens();
						astFactory.addASTChild(currentAST, returnAST);
						aggregate_phrase();
						astFactory.addASTChild(currentAST, returnAST);
						rparens();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if (((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( numFP < 2 )) {
						format_phrase(symbolName, fld, true, false);
						astFactory.addASTChild(currentAST, returnAST);
						numFP++;
					}
					else {
						break _loop298;
					}
					
				} while (true);
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			form_item_AST = (Aast)currentAST.root;
			
			// fixup the tree to remove the expression node if this was a
			// variable definition
			if (symbolName != null)
			{
			// the Aast helper methods can't be used here because they are
			// dependent upon parent nodes or try to fixup IDs that don't
			// exist yet
			child.setNextSibling(e_AST.getNextSibling());
			form_item_AST.setFirstChild(child);
			}
			
			if (fld != null)
			{
			fields.add(fld);
			}
			
			form_item_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = form_item_AST;
	}
	
/**
 * Matches the frame phrase construct of the Progress 4GL language which
 * always begins with the <code>WITH</code> keyword. All of its options
 * can be specified in any order. In fact, this can be an empty phrase
 * with nothing following the keyword (undocumented feature). As another
 * undocumented and useless feature, one can insert any number of whitespace
 * delimited <code>WITH</code> keywords in between any option and it will
 * parse and work as if these extra keywords did not exist. This is probably
 * just in fact allowing multiple sequential frame phrases (with any of them
 * being empty), but in this rule we just drop the extra <code>WITH</code>
 * keyword and parse everything into a single frame phrase. This should be
 * logically equivalent. 
 * <p>
 * The following list of rules are called to properly implement the tree
 * building (which will be rooted at a <code>FRAME_PHRASE</code> token):
 * <p>
 * <ul>
 *    <li> {@link #accum_clause}
 *    <li> {@link #at_phrase}
 *    <li> {@link #button_reference}
 *    <li> {@link #color_spec}
 *    <li> {@link #context_help_file}
 *    <li> {@link #frame_reference}
 *    <li> {@link #size_phrase}
 *    <li> {@link #lvalue} (only for stream and browse references, protected with a semantic predicate)
 *    <li> {@link #title_phrase}
 *    <li> {@link #version_6_frame_clause}
 *    <li> {@link #view_as_dialog_clause}
 *    <li> {@link #in_window_clause}
 *    <li> {@link #misc_frame_opts}
 *    <li> {@link #columns_clause}
 *    <li> {@link #down_clause}
 * </ul>
 * <p>
 * The order of the above list is important in the case of the last two
 * rule references {@link #columns_clause} and {@link #down_clause}. These
 * prefix a <code>whole_number_literal</code> and an expression respectively to
 * a keyword which is inherently ambiguous. The ambiguity is resolved by
 * the careful ordering of these alternatives. Based on the complicated
 * loop closure rule needed to process these options in any order, the
 * k=2 lookahead is often being checked to confirm that a following
 * token is seen before a match is made.  This logic has been reviewed and
 * many cases have been tested, however all possible cases cannot be tested.  
 * For this reason, one must watch this rule carefully.  We have disabled
 * ambiguity warnings and it is thought that this is safe, but great care
 * must be taken to confirm this over time.
 * <p>
 * Called from {@link #do_repeat_stmt}, {@link #for_stmt} and
 * {@link #def_frame_stmt} among other locations.
 *
 * @param    blockHdr
 *           <code>true</code> if this frame phrase is being called from
 *           within a block header (which will change its matching logic
 *           to allow it to avoid matching with possible following keywords
 *           in the calling rule).
 * @param    editing
 *           <code>true</code> if this frame phrase can be followed by an
 *           editing block.
 */
	public final void frame_phrase(
		boolean blockHdr, boolean editing
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast frame_phrase_AST = null;
		Token  w = null;
		Aast w_AST = null;
		Token  wi = null;
		Aast wi_AST = null;
		
		try {      // for error handling
			w = LT(1);
			w_AST = (Aast)astFactory.create(w);
			astFactory.makeASTRoot(currentAST, w_AST);
			match(KW_WITH);
			w_AST.setType(FRAME_PHRASE);
			{
			_loop367:
			do {
				if ((LA(1)==KW_WITH) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					wi = LT(1);
					wi_AST = (Aast)astFactory.create(wi);
					match(KW_WITH);
					hide(wi);
				}
				else if ((LA(1)==KW_ACCUM) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					accum_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_AT) && (_tokenSet_76.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					at_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_ATTR||LA(1)==KW_NO_ATTR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_ATTR:
					{
						Aast tmp408_AST = null;
						tmp408_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp408_AST);
						match(KW_ATTR);
						break;
					}
					case KW_NO_ATTR:
					{
						Aast tmp409_AST = null;
						tmp409_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp409_AST);
						match(KW_NO_ATTR);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_CANCEL_B||LA(1)==KW_DEFLT_BN) && (_tokenSet_64.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					button_reference();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CENTER) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp410_AST = null;
					tmp410_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp410_AST);
					match(KW_CENTER);
				}
				else if ((LA(1)==KW_COLOR) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					color_spec();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CTX_H) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp411_AST = null;
					tmp411_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp411_AST);
					match(KW_CTX_H);
				}
				else if ((LA(1)==KW_CTX_H_F) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					context_help_file();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DROP_TAR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp412_AST = null;
					tmp412_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp412_AST);
					match(KW_DROP_TAR);
				}
				else if ((LA(1)==KW_EXPORT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp413_AST = null;
					tmp413_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp413_AST);
					match(KW_EXPORT);
				}
				else if ((LA(1)==KW_FRAME) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					frame_reference(true);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_INH_BGC||LA(1)==KW_NO_INHBG) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_INH_BGC:
					{
						Aast tmp414_AST = null;
						tmp414_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp414_AST);
						match(KW_INH_BGC);
						break;
					}
					case KW_NO_INHBG:
					{
						Aast tmp415_AST = null;
						tmp415_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp415_AST);
						match(KW_NO_INHBG);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_INH_FGC||LA(1)==KW_NO_INHFG) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_INH_FGC:
					{
						Aast tmp416_AST = null;
						tmp416_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp416_AST);
						match(KW_INH_FGC);
						break;
					}
					case KW_NO_INHFG:
					{
						Aast tmp417_AST = null;
						tmp417_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp417_AST);
						match(KW_NO_INHFG);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_KEEP_TAB) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp418_AST = null;
					tmp418_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp418_AST);
					match(KW_KEEP_TAB);
				}
				else if ((LA(1)==KW_NO_BOX) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp419_AST = null;
					tmp419_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp419_AST);
					match(KW_NO_BOX);
				}
				else if ((LA(1)==KW_NO_HIDE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp420_AST = null;
					tmp420_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp420_AST);
					match(KW_NO_HIDE);
				}
				else if ((LA(1)==KW_NO_LABEL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp421_AST = null;
					tmp421_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp421_AST);
					match(KW_NO_LABEL);
				}
				else if ((LA(1)==KW_USE_DCT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp422_AST = null;
					tmp422_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp422_AST);
					match(KW_USE_DCT);
				}
				else if ((LA(1)==KW_NO_VALID) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp423_AST = null;
					tmp423_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp423_AST);
					match(KW_NO_VALID);
				}
				else if ((LA(1)==KW_NO_AUTOV) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp424_AST = null;
					tmp424_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp424_AST);
					match(KW_NO_AUTOV);
				}
				else if ((LA(1)==KW_NO_HELP) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp425_AST = null;
					tmp425_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp425_AST);
					match(KW_NO_HELP);
				}
				else if ((LA(1)==KW_NO_UNDL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp426_AST = null;
					tmp426_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp426_AST);
					match(KW_NO_UNDL);
				}
				else if ((LA(1)==KW_OVERLAY) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp427_AST = null;
					tmp427_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp427_AST);
					match(KW_OVERLAY);
				}
				else if ((LA(1)==KW_PAGE_B||LA(1)==KW_PAGE_T) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_PAGE_B:
					{
						Aast tmp428_AST = null;
						tmp428_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp428_AST);
						match(KW_PAGE_B);
						break;
					}
					case KW_PAGE_T:
					{
						Aast tmp429_AST = null;
						tmp429_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp429_AST);
						match(KW_PAGE_T);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_SCRN_IO||LA(1)==KW_STRM_IO) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_SCRN_IO:
					{
						Aast tmp430_AST = null;
						tmp430_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp430_AST);
						match(KW_SCRN_IO);
						break;
					}
					case KW_STRM_IO:
					{
						Aast tmp431_AST = null;
						tmp431_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp431_AST);
						match(KW_STRM_IO);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_SCROLLBL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp432_AST = null;
					tmp432_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp432_AST);
					match(KW_SCROLLBL);
				}
				else if ((LA(1)==KW_SCROLL_V) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp433_AST = null;
					tmp433_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp433_AST);
					match(KW_SCROLL_V);
				}
				else if ((LA(1)==KW_SIDE_L) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp434_AST = null;
					tmp434_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp434_AST);
					match(KW_SIDE_L);
				}
				else if (((LA(1) >= KW_SIZE && LA(1) <= KW_SIZE_P)) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==KW_BY)) {
					size_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_3D) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp435_AST = null;
					tmp435_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp435_AST);
					match(KW_3D);
				}
				else if ((LA(1)==KW_TITLE) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					title_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TOP_ONLY) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp436_AST = null;
					tmp436_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp436_AST);
					match(KW_TOP_ONLY);
				}
				else if ((LA(1)==KW_USE_TXT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp437_AST = null;
					tmp437_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp437_AST);
					match(KW_USE_TXT);
				}
				else if ((LA(1)==KW_V6FRAME) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp438_AST = null;
					tmp438_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp438_AST);
					match(KW_V6FRAME);
				}
				else if ((LA(1)==KW_USE_REV) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp439_AST = null;
					tmp439_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp439_AST);
					match(KW_USE_REV);
				}
				else if ((LA(1)==KW_USE_UND) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp440_AST = null;
					tmp440_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp440_AST);
					match(KW_USE_UND);
				}
				else if ((LA(1)==KW_VIEW_AS) && (LA(2)==KW_DIALOG) && (_tokenSet_3.member(LA(3)))) {
					view_as_dialog_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_IN) && (LA(2)==KW_WINDOW) && (_tokenSet_24.member(LA(3)))) {
					in_window_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_67.member(LA(1))) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					misc_frame_opts();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND || LA(1) == KW_BROWSE )) {
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==HEX_LITERAL||LA(1)==NUM_LITERAL) && (LA(2)==KW_COLUMNS||LA(2)==KW_COL) && (_tokenSet_3.member(LA(3)))) {
					columns_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((_tokenSet_24.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
              blockHdr                                                       && 
              LA(1) != KW_TRANS                                              &&
              (LA(1) == KW_DOWN || isValidLeftmostReserved(LT(1), LT(2)))
           )) {
					down_clause_or_loop_incr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((_tokenSet_24.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( 
             !blockHdr && 
             (LA(1) == KW_DOWN || !editing || (LA(2) != DOT && LA(2) != COLON)) && 
             LA(1) != KW_NO_ERROR
           )) {
					down_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop367;
				}
				
			} while (true);
			}
			frame_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = frame_phrase_AST;
	}
	
/**
 * Matches a <code>FORM</code> Progress 4GL language statement which is
 * nearly identical to the {@link #def_frame_stmt}.
 * <p>
 * The tricky part of this statement is handling the options in any order and
 * resolving the ambiguity between the record and field specifications.  
 * Records are disambiguated from fields (records take precedence when there
 * is a name conflict) by trying to do a lookup, if it fails the record is
 * not matched (see {@link #record_spec}) and instead the {@link #form_item} 
 * is checked.  By carefully ordering these options and using a semantic
 * predicate, the ambiguity is resolved.  For this reason, ambiguity warnings
 * have been disabled.
 * <p>
 * Called by {@link #stmt_list}. Uses {@link #record_spec}, 
 * {@link #form_item} and {@link #frame_phrase} to properly build the AST.
 * <p>
 * Progress is so ridiculously ambiguous about keywords that there is a
 * reserved <code>FORMAT</code> keyword that can be abbreviated down to
 * 4 characters.  Yes, the reserved <code>FORM</code> keyword could actually
 * be the <code>FORMAT</code> keyword and must be disambiguated by context.
 * Our keyword processing will always generate a match to <code>FORMAT</code>
 * and we override it to be a <code>FORM</code>, once we match here.
 */
	public final void form_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast form_stmt_AST = null;
		Token  f = null;
		Aast f_AST = null;
		Aast fp_AST = null;
		
		try {      // for error handling
			
			Set<Aast> fields      = new HashSet<>();
			String    frame       = "";
			boolean   hadFormItem = false;
			boolean   hadRecord   = false;
			boolean   hadHeader   = false;
			inFormStatement = true;
			
			f = LT(1);
			f_AST = (Aast)astFactory.create(f);
			astFactory.makeASTRoot(currentAST, f_AST);
			match(KW_FORMAT);
			f_AST.setType(KW_FORM);
			{
			_loop288:
			do {
				if ((LA(1)==KW_BACKGRND||LA(1)==KW_HEADER) && (_tokenSet_77.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_HEADER:
					{
						Aast tmp441_AST = null;
						tmp441_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp441_AST);
						match(KW_HEADER);
						break;
					}
					case KW_BACKGRND:
					{
						Aast tmp442_AST = null;
						tmp442_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp442_AST);
						match(KW_BACKGRND);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					hadHeader = true;
				}
				else if (((_tokenSet_13.member(LA(1))) && (_tokenSet_77.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
              !hadFormItem               &&
              !hadHeader                 &&
              isRecord(LT(1).getText())  &&
              (LA(2) == KW_EXCEPT || LA(2) == KW_WITH || LA(2) == DOT)
           )) {
					record_spec(fields);
					astFactory.addASTChild(currentAST, returnAST);
					hadRecord = true;
				}
				else if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&(
              !(LA(1) == DOT || LA(1) == KW_WITH || LA(1) == KW_HEADER || LA(1) == KW_BACKGRND) &&
              (!hadRecord || hadHeader)
           )) {
					form_item(fields);
					astFactory.addASTChild(currentAST, returnAST);
					hadFormItem = true;
				}
				else if ((LA(1)==KW_WITH) && (_tokenSet_77.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					frame_phrase(false, false);
					fp_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					if (frame.length() == 0)
					{
					String name = getFrameName(fp_AST);
					if (name.length() > 0)
					{
					frame = name;
					}
					}
					
				}
				else {
					break _loop288;
				}
				
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			form_stmt_AST = (Aast)currentAST.root;
			
			if (!fields.isEmpty())
			{
			sym.addFrameFields(frame, fields);
			}
			
			setUseDictExps(frame, fp_AST, form_stmt_AST);
			inFormStatement = false;
			
			form_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = form_stmt_AST;
	}
	
/**
 * Specifies an list of fields that are not excluded from the previous record
 * or query definition.
 * <p>
 * Used by {@link #record_spec} and {@link #browse_all_list}.
 * <p>
 * This rule is naturally greedy (in matching a list of field names to
 * exclude, and doing so in a loop. ANTLR warns that this causes ambiguity. 
 * The greedy option is used to tell ANTLR to disable the warning, though it
 * has no impact on the actual code generation.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 *
 * @param    exceptFields
 *           A set to collect the fully qualified field names or <code>null</code> if not required.
 */
	public final void except_list(
		Set<String> exceptFields
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast except_list_AST = null;
		Aast l_AST = null;
		
		try {      // for error handling
			Aast tmp443_AST = null;
			tmp443_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp443_AST);
			match(KW_EXCEPT);
			{
			_loop293:
			do {
				if ((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					lvalue();
					l_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					if (exceptFields != null && l_AST.isAnnotation("schemaname"))
					{
					exceptFields.add((String) l_AST.getAnnotation("schemaname"));
					}
					
				}
				else {
					break _loop293;
				}
				
			} while (true);
			}
			except_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = except_list_AST;
	}
	
/**
 * Matches the <code>SPACE() or SKIP()</code> constructs and the optional
 * following numeric constant.  Note that although ANTLR reports ambiguity
 * in the optional clause, there is no actual ambiguity so warnings have
 * been disabled.
 * <p>
 * Used by {@link #form_item}, {@link #set_or_update_or_prompt_for_stmt },
 * {@link #display_stmt}, {@link #enable_stmt}, {@link #export_stmt},
 * {@link #column_spec} and {@link #content_array} (used in a
 * <code>MESSAGE</code> statement).
 * <p>
 * The subtree is rooted by the keyword.
 */
	public final void space_or_skip() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast space_or_skip_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_SPACE:
			{
				Aast tmp444_AST = null;
				tmp444_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp444_AST);
				match(KW_SPACE);
				break;
			}
			case KW_SKIP:
			{
				Aast tmp445_AST = null;
				tmp445_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp445_AST);
				match(KW_SKIP);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==LPARENS) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==RPARENS)) {
				lparens();
				astFactory.addASTChild(currentAST, returnAST);
				numeric_literal();
				astFactory.addASTChild(currentAST, returnAST);
				rparens();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			space_or_skip_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = space_or_skip_AST;
	}
	
/**
 * Matches all Progress 4GL widget names that exist in the variable 
 * namespace (which is the namespace in which Progress stores them).
 * <p>
 * This rule is simply a convenience method to use the prefer widgets
 * flag to bias the rule reference to {@link #lvalue} to first
 * pick a widget over a variable. When done, the prefer widgets flag
 * state is set back to the default of <code>false</code>.
 */
	public final void widget() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast widget_AST = null;
		
		try {      // for error handling
			
			preferWidgets = true;
			
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			
			preferWidgets = false;
			
			widget_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = widget_AST;
	}
	
/**
 * Matches an aggregate phrase, most often used in the <code>DISPLAY</code> language statement. There is
 * an undocumented feature in the 4GL where the SQL keyword SUM can be used as a synonym for TOTAL. This
 * rule rewrites KW_SUM as KW_TOTAL.
 * <p>
 * Called by {@link #display_stmt}.  Uses {@link #label} and {@link #by_clause}.
 * <p>
 * <b>This rule uses a trick to create an artificial node as a root while still allowing ANTLR to do normal
 * tree building (no suppression of the AST build).</b>  This is only useful in cases where there is no valid
 * token which can be used as a tree root AND where a loop is being used such that the contents of the loop
 * cannot be referenced in a manually built #([,],,,) ANTLR construct. ANTLR doesn't support (as of 2.7.4)
 * the ability to label a loop such that the entire contents can be referenced. If one labels the individual
 * elements inside the loop, only the last one is available when the loop concludes.  However, by leaving the
 * normal tree creation unchanged but manually creating an artificial node and manually setting this node as
 * the root of the returned tree BEFORE the children are added, this problem can be solved.
 * <p>
 * When the {@link #accum_function} was added, ANTLR started showing bogus ambiguity warnings.  These have
 * been disabled.
 */
	public final void aggregate_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast aggregate_phrase_AST = null;
		Token  t = null;
		Aast t_AST = null;
		Token  s = null;
		Aast s_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(AGGREGATE,"aggregate"));
			{
			_loop352:
			do {
				if ((_tokenSet_78.member(LA(1))) && (_tokenSet_79.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_AVERAGE:
					{
						Aast tmp446_AST = null;
						tmp446_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp446_AST);
						match(KW_AVERAGE);
						break;
					}
					case KW_AVG:
					{
						t = LT(1);
						t_AST = (Aast)astFactory.create(t);
						astFactory.addASTChild(currentAST, t_AST);
						match(KW_AVG);
						
						// 'AVG' is an alias for AVERAGE at accumulators
						t_AST.setType(KW_AVERAGE);
						
						break;
					}
					case KW_COUNT:
					{
						Aast tmp447_AST = null;
						tmp447_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp447_AST);
						match(KW_COUNT);
						break;
					}
					case KW_MAX:
					{
						Aast tmp448_AST = null;
						tmp448_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp448_AST);
						match(KW_MAX);
						break;
					}
					case KW_MIN:
					{
						Aast tmp449_AST = null;
						tmp449_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp449_AST);
						match(KW_MIN);
						break;
					}
					case KW_TOTAL:
					{
						Aast tmp450_AST = null;
						tmp450_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp450_AST);
						match(KW_TOTAL);
						break;
					}
					case KW_SUM:
					{
						s = LT(1);
						s_AST = (Aast)astFactory.create(s);
						astFactory.addASTChild(currentAST, s_AST);
						match(KW_SUM);
						s_AST.setType(KW_TOTAL);
						break;
					}
					case KW_SUB_AVG:
					{
						Aast tmp451_AST = null;
						tmp451_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp451_AST);
						match(KW_SUB_AVG);
						break;
					}
					case KW_SUB_CNT:
					{
						Aast tmp452_AST = null;
						tmp452_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp452_AST);
						match(KW_SUB_CNT);
						break;
					}
					case KW_SUB_MAX:
					{
						Aast tmp453_AST = null;
						tmp453_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp453_AST);
						match(KW_SUB_MAX);
						break;
					}
					case KW_SUB_MIN:
					{
						Aast tmp454_AST = null;
						tmp454_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp454_AST);
						match(KW_SUB_MIN);
						break;
					}
					case KW_SUB_TOT:
					{
						Aast tmp455_AST = null;
						tmp455_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp455_AST);
						match(KW_SUB_TOT);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					{
					if ((LA(1)==KW_LABEL) && (LA(2)==STRING) && (_tokenSet_80.member(LA(3)))) {
						label(false);
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_79.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					{
					_loop351:
					do {
						if ((LA(1)==KW_BY) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
							by_clause();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else {
							break _loop351;
						}
						
					} while (true);
					}
				}
				else {
					break _loop352;
				}
				
			} while (true);
			}
			aggregate_phrase_AST = (Aast)currentAST.root;
			
			if (aggregate_phrase_AST.getNumberOfChildren() == 0)
			{
			aggregate_phrase_AST = null;
			}
			
			currentAST.root = aggregate_phrase_AST;
			currentAST.child = aggregate_phrase_AST!=null &&aggregate_phrase_AST.getFirstChild()!=null ?
				aggregate_phrase_AST.getFirstChild() : aggregate_phrase_AST;
			currentAST.advanceChildToEnd();
			aggregate_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_79);
		}
		returnAST = aggregate_phrase_AST;
	}
	
/**
 * Matches the format phrase construct of the Progress 4GL language which
 * optionally appears in a referencing rule but does not begin with a specific
 * keyword. All of its options can be specified in any order.
 * <p>
 * The following list of rules are called to properly implement the tree
 * building (which will be rooted at a <code>FORMAT_PHRASE</code> token):
 * <p>
 * <ul>
 *    <li> {@link #at_phrase}
 *    <li> {@link #as_clause}
 *    <li> {@link #like_clause}
 *    <li> {@link #colon_constant}
 *    <li> {@link #to_constant} 
 *    <li> {@link #column_label}
 *    <li> {@link #format_string}
 *    <li> {@link #help_string}
 *    <li> {@link #label}
 *    <li> {@link #validate}
 *    <li> {@link #ui_stuff}
 *    <li> {@link #view_as_phrase}
 *    <li> {@link #simple_when_clause}
 *    <li> {@link #at_base_field_clause}
 * </ul>
 * <p>
 * Ambiguity is caused by the use of unreserved keywords in the leftmost 
 * position combined with a loop that has a mixture of single and multiple
 * token alternatives and a rule reference that includes an expression 
 * starting in the second token position.  Based on the complicated
 * loop closure rule needed to process these options in any order, the
 * k=2 lookahead is sometimes being checked to confirm that a following
 * token is seen before a match is made.  This logic has been reviewed and
 * many cases have been tested, however all possible cases cannot be tested.  
 * For this reason, one must watch this rule carefully.  We have disabled
 * ambiguity warnings and it is thought that this is safe, but great care
 * must be taken to confirm this over time.
 * <p>
 * Called from {@link #form_item}.
 * <p>
 * The <code>WHEN</code> clause (accessed via <code>simple_when_clause</code>)
 * is not documented as part of the format phrase, BUT customer examples
 * show that this can be embedded inside one.  Rather than try to handle
 * all the individual locations where such a highly variable construct
 * (format phrase -&gt; when phrase -&gt; format phrase), it is more natural to
 * simply include it in the format phrase as we have done (probably just as
 * Progress does this internally).
 * <p>
 * The '@' base_field clause (accessed via <code>at_base_field_clause</code>)
 * is not documented as part of this phrase but customer examples show that
 * this can be embedded inside one.  See the paragraph above on the when
 * clause.
 * <p>
 * The undocumented option <code>PASSWORD-FIELD</code> is matched here. It was
 * found in customer source code.
 * <p>
 * When called from frame definition statements, this will match the undocumented option
 * <code>AS BUTTON</code> which is the equivalent of an inline <code>DEFINE BUTTON</code>
 * statement. This is a quirk of the 4GL. The 4GL doesn't provide this same functionality
 * for any other widget types. The other configuration of the format phrase will modify the
 * new button widget, as you would expect.
 *
 * @param    symName
 *           If not <code>null</code> then a variable definition will be
 *           processed and the format phrase is expected to contain an
 *           <code>AS</code> or <code>LIKE</code> clause.
 * @param    fld
 *           If not <code>null</code> then the given field reference will
 *           define a temporary scope promotion for the field's table such
 *           that validation expressions will resolve unambiguously.
 * @param    frameDef
 *           <code>true</code> if the caller is a statement that would create or add to a
 *           frame definition.
 * @param    enableWidget
 *           <code>true</code> if this format phrase is associated with a field clause which
 *           represents a widget being enabled in a frame; else <code>false</code>.
 */
	public final void format_phrase(
		 String symName, Aast fld, boolean frameDef, boolean enableWidget 
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast format_phrase_AST = null;
		Aast h_AST = null;
		Aast v_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(FORMAT_PHRASE,"format phrase"));
			
			String baseSymName = null;
			
			boolean matchSym = false;
			boolean schem    = false;
			
			// validate processing needs a special promotion of the table because the expression can
			// have otherwise ambiguous field references
			if (fld           != null             && 
			fld.getType()  > BEGIN_FIELDTYPES &&
			fld.getType()  < END_FIELDTYPES)
			{
			// add a schema scope
			schem = true;
			sym.addSchemaScope(false);
			
			// promote the field's associated buffer
			sym.promoteTableName((String) fld.getAnnotation("bufname"), false, false);
			}
			
			{
			_loop344:
			do {
				if ((LA(1)==KW_AT) && (_tokenSet_76.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					at_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1)==KW_AS) && (LA(2)==KW_BUTTON) && (_tokenSet_3.member(LA(3))))&&( frameDef && symName != null )) {
					as_button_quirk(symName);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_AS||LA(1)==KW_LIKE||LA(1)==KW_LIKE_SEQ) && (_tokenSet_81.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_AS:
					{
						as_clause(symName, false);
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_LIKE:
					case KW_LIKE_SEQ:
					{
						like_clause(symName, null, false);
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_ATTR||LA(1)==KW_NO_ATTR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_ATTR:
					{
						Aast tmp456_AST = null;
						tmp456_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp456_AST);
						match(KW_ATTR);
						break;
					}
					case KW_NO_ATTR:
					{
						Aast tmp457_AST = null;
						tmp457_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp457_AST);
						match(KW_NO_ATTR);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_AUTO_RET) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp458_AST = null;
					tmp458_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp458_AST);
					match(KW_AUTO_RET);
				}
				else if ((LA(1)==KW_BLANK) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp459_AST = null;
					tmp459_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp459_AST);
					match(KW_BLANK);
				}
				else if ((LA(1)==KW_COLON||LA(1)==KW_TO) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_COLON:
					{
						colon_constant();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_TO:
					{
						to_constant();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_COL_LAB) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					column_label();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DEBLANK) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp460_AST = null;
					tmp460_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp460_AST);
					match(KW_DEBLANK);
				}
				else if ((LA(1)==KW_DIS_A_ZA) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp461_AST = null;
					tmp461_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp461_AST);
					match(KW_DIS_A_ZA);
				}
				else if ((LA(1)==KW_FORMAT) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					format_string(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_HELP) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					help_string();
					h_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_LABEL||LA(1)==KW_NO_LABEL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_LABEL:
					{
						label(true);
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_NO_LABEL:
					{
						Aast tmp462_AST = null;
						tmp462_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp462_AST);
						match(KW_NO_LABEL);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_NO_TAB_S) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp463_AST = null;
					tmp463_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp463_AST);
					match(KW_NO_TAB_S);
				}
				else if ((LA(1)==KW_PASSWD_F) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp464_AST = null;
					tmp464_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp464_AST);
					match(KW_PASSWD_F);
				}
				else if ((LA(1)==KW_VALIDATE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
					validate(schem ? (String) fld.getAnnotation("schemaname") : null);
					v_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_VIEW_AS) && (_tokenSet_56.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					view_as_phrase(symName);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_WHEN) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					simple_when_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==AT) && (_tokenSet_64.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					
					matchSym = (symName == null);
					
					baseSymName=at_base_field_clause(matchSym);
					astFactory.addASTChild(currentAST, returnAST);
					
					if (matchSym && baseSymName != null)
					{
					symName = baseSymName;
					}
					
				}
				else {
					break _loop344;
				}
				
			} while (true);
			}
			format_phrase_AST = (Aast)currentAST.root;
			
			// process schema-level validation for an any widget in a frame definition statement, if
			// no overriding validation expression was provided.  depending on USE-DICT-EXPS usage,
			// all validation exps which appear before this setting (in a statement which doesn't
			// enable the widget) will be removed.  this is required because at this time we don't
			// know the frame name - this is computed later, at the frame phrase parsing, so the 
			// approach is to add everything and remove as needed, depending on the USE-DICT-EXPS,
			// when the frame phrase is parsed
			if ((v_AST == null || h_AST == null) && 
			fld != null                && 
			frameDef                   && 
			!fld.isAnnotation("schema-processed"))
			{
			attachAssignSchemaValidation(format_phrase_AST, fld, sym);
			}
			
			if (fld != null)
			{
			// do not allow the field to be processed on the second pass for format_phrase (used
			// by def_frame, display_stmt, form_stmt)
			fld.putAnnotation("schema-processed", true);
			}
			
			// if we previously added a scope, clear it now
			if (schem)
			{
			sym.deleteSchemaScope(false);
			}
			
			// safety first since this rule can have everything be optional
			if (format_phrase_AST.getNumberOfChildren() == 0)
			{
			// get rid of the artificial root we previously created
			format_phrase_AST = null;
			}
			else
			{
			// we only can be defining a new variable if the symbol name is
			// not null
			if (symName != null)
			{
			// pass the AST with all options to the symbol resolver to set
			// those variable options accordingly
			sym.setVariableOptions(symName, format_phrase_AST);
			
			// write any non-standard options into annotations
			sym.annotateVariableOptions(symName, format_phrase_AST, true);
			}
			}
			
			currentAST.root = format_phrase_AST;
			currentAST.child = format_phrase_AST!=null &&format_phrase_AST.getFirstChild()!=null ?
				format_phrase_AST.getFirstChild() : format_phrase_AST;
			currentAST.advanceChildToEnd();
			format_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = format_phrase_AST;
	}
	
/**
 * Matches any number literal (<code>NUM_LITERAL</code>, <code>HEX_LITERAL</code> or a
 * <code>DEC_LITERAL</code>).
 */
	public final void numeric_literal() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast numeric_literal_AST = null;
		Token  n = null;
		Aast n_AST = null;
		Token  h = null;
		Aast h_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case NUM_LITERAL:
			{
				n = LT(1);
				n_AST = (Aast)astFactory.create(n);
				astFactory.addASTChild(currentAST, n_AST);
				match(NUM_LITERAL);
				sym.annotateNumericLiteral(n_AST);
				break;
			}
			case HEX_LITERAL:
			{
				h = LT(1);
				h_AST = (Aast)astFactory.create(h);
				astFactory.addASTChild(currentAST, h_AST);
				match(HEX_LITERAL);
				sym.annotateNumericLiteral(h_AST);
				break;
			}
			case DEC_LITERAL:
			{
				Aast tmp465_AST = null;
				tmp465_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp465_AST);
				match(DEC_LITERAL);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			numeric_literal_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = numeric_literal_AST;
	}
	
/**
 * Matches the <code>SPACE() or SKIP()</code> constructs and the optional
 * following {@link #expr}.  Note that although ANTLR reports ambiguity
 * in the optional clause, there is no actual ambiguity so warnings have
 * been disabled.
 * <p>
 * This is an undocumented feature of Progress which cannot be used in all
 * language statements.  The idea is that this construct requires runtime
 * resolution of the value in the places where it is allowed.
 * <p>
 * Used by {@link #put_stmt}.
 * <p>
 * The subtree is rooted by the keyword.
 */
	public final void runtime_space_or_skip() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast runtime_space_or_skip_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_SPACE:
			{
				Aast tmp466_AST = null;
				tmp466_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp466_AST);
				match(KW_SPACE);
				break;
			}
			case KW_SKIP:
			{
				Aast tmp467_AST = null;
				tmp467_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp467_AST);
				match(KW_SKIP);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==LPARENS) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				lparens();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				rparens();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			runtime_space_or_skip_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_21);
		}
		returnAST = runtime_space_or_skip_AST;
	}
	
/**
 * Matches the <code>NULL()</code> construct and the optional following 
 * integer constant.  Note that although ANTLR reports ambiguity
 * in the optional clause, there is no actual ambiguity so warnings have
 * been disabled.
 * <p>
 * Used by {@link #put_stmt}.
 * <p>
 * The subtree is rooted by the keyword.
 */
	public final void null_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast null_clause_AST = null;
		
		try {      // for error handling
			Aast tmp468_AST = null;
			tmp468_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp468_AST);
			match(KW_NULL);
			{
			if ((LA(1)==LPARENS) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==RPARENS)) {
				lparens();
				astFactory.addASTChild(currentAST, returnAST);
				whole_number_literal();
				astFactory.addASTChild(currentAST, returnAST);
				rparens();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			null_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_21);
		}
		returnAST = null_clause_AST;
	}
	
/**
 * Matches the <code>SET, UPDATE and PROMPT-FOR</code> language statements
 * and implements the (nearly identical) logic for all 3.
 * <p>
 * This rule is called by {@link #stmt_list}.
 * <p>
 * Calls the following rules:
 * <p>
 * {@link #lvalue} (this handles the field processing AND stream references)
 * {@link #space_or_skip}
 * {@link #text_clause}
 * {@link #at_phrase}
 * {@link #to_constant}
 * {@link #colon_constant} (undocumented but found in customer source)
 * {@link #constant_form_item}
 * {@link #record_spec}
 * {@link #go_on_clause}
 * {@link #frame_phrase}
 * {@link #inner_block}
 * <p>
 * All options can be processed in any order.
 * <p>
 * The list of fields, records or other values to set or update is
 * particularly tricky because it has very real ambiguity in allowing an
 * <code>lvalue</code> in the leftmost token of 2 peer alternatives. While
 * normally, a semantic predicate could be used to resolve this ambiguity,
 * the <code>lvalue</code> rule itself defeats this since it supports
 * array subscripting.  This form of <code>lvalue</code> means that the
 * <code>EQUALS</code> token (that disambiguates the assignment form from the
 * <code>field_clause</code>) can appear at an arbitrary point in the token
 * stream (not just in the k == 2 position).  For example, myVar[ i + 7 ] =
 * puts the <code>EQUALS</code> in the k == 7 position.  By splitting off
 * the subsequent processing and left factoring the <code>lvalue</code>,
 * this problem is resolved.
 * <p>
 * The order of the field list/record spec alternatives is also designed to
 * match more specific choices first.  This combined with a semantic
 * predicate to pick between a record and field, makes this work. 
 * <p>
 * The use of <code>inner_block</code> is to implement the editing clause,
 * which is a form that <code>inner_block</code> supports.  This also
 * matches <code>DO, REPEAT and FOR</code> keywords in addition to
 * <code>EDITING</code> but this should not be a problem in practice.
 * This can't be easily solved with a semantic validating rule since the
 * optional label that can prefix an editing phrase makes the editing
 * keyword appear in either the k == 1 or k == 3 positions.  The call to
 * <code>inner_block</code> uses {@link #end_stmt} to delimit the 
 * block.  Based on how we call <code>inner_block</code>, the subsequent
 * invocation of <code>end_stmt</code> does NOT eat the trailing
 * <code>DOT</code> since it is called inline in this language statement.
 * <p>
 * Use of some other unreserved keywords naturally conflicts with possible 
 * following keywords, but this is a bogus ambiguity warning as Progress  
 * is designed to match as a keyword first. Ambiguity warnings have been
 * disabled in some subrules as a result.
 * <p>
 * The use of the <code>constant_form_item</code> is required for the
 * <code>PROMPT-FOR</code> statement and it may not be valid for the
 * <code>SET or UPDATE</code> statements based on the Progress documentation.
 * Valid Progress code will not have a problem with this.
 * <p>
 * An undocumented feature exists where in-line variable definitions are possible using an
 * AS or LIKE clause in a format phrase (in all 3 forms of this rule).  The AS or LIKE can
 * appear later in the phrase. This was found in working customer code.
 */
	public final void set_or_update_or_prompt_for_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast set_or_update_or_prompt_for_stmt_AST = null;
		Token  p = null;
		Aast p_AST = null;
		Aast fp_AST = null;
		Aast r_AST = null;
		Aast l_AST = null;
		
		try {      // for error handling
			
			Aast      fld        = null;
			Set<Aast> fields     = new HashSet<>();
			String    symbolName = null;
			int       idx        = 0;
			boolean   validation = false;
			
			{
			{
			switch ( LA(1)) {
			case KW_SET:
			{
				Aast tmp469_AST = null;
				tmp469_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp469_AST);
				match(KW_SET);
				break;
			}
			case KW_UPDATE:
			{
				Aast tmp470_AST = null;
				tmp470_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp470_AST);
				match(KW_UPDATE);
				break;
			}
			case KW_PRMT_FOR:
			{
				Aast tmp471_AST = null;
				tmp471_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp471_AST);
				match(KW_PRMT_FOR);
				break;
			}
			case KW_PROMPT:
			{
				p = LT(1);
				p_AST = (Aast)astFactory.create(p);
				astFactory.makeASTRoot(currentAST, p_AST);
				match(KW_PROMPT);
				p_AST.setType(KW_PRMT_FOR);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop313:
			do {
				if (((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_UNL_HID) && (_tokenSet_82.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp472_AST = null;
					tmp472_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp472_AST);
					match(KW_UNL_HID);
				}
				else if ((LA(1)==CARET)) {
					Aast tmp473_AST = null;
					tmp473_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp473_AST);
					match(CARET);
					idx++;
				}
				else if ((LA(1)==KW_SKIP||LA(1)==KW_SPACE) && (_tokenSet_82.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					space_or_skip();
					astFactory.addASTChild(currentAST, returnAST);
					idx++;
				}
				else if ((LA(1)==KW_TEXT) && (LA(2)==LPARENS) && (_tokenSet_64.member(LA(3)))) {
					text_clause();
					astFactory.addASTChild(currentAST, returnAST);
					idx++;
				}
				else if ((_tokenSet_65.member(LA(1))) && (_tokenSet_82.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					literal();
					astFactory.addASTChild(currentAST, returnAST);
					{
					if ((LA(1)==KW_AT||LA(1)==KW_COLON||LA(1)==KW_TO) && (_tokenSet_76.member(LA(2))) && (_tokenSet_82.member(LA(3)))) {
						literal_format_phrase();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_82.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					idx++;
				}
				else if ((LA(1)==KW_NO_ERROR) && (_tokenSet_82.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp474_AST = null;
					tmp474_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp474_AST);
					match(KW_NO_ERROR);
					idx++;
				}
				else if ((LA(1)==KW_GO_ON) && (LA(2)==LPARENS) && (_tokenSet_83.member(LA(3)))) {
					go_on_clause();
					astFactory.addASTChild(currentAST, returnAST);
					idx++;
				}
				else if ((LA(1)==KW_WITH) && (_tokenSet_84.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					frame_phrase(false, true);
					fp_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					idx++;
				}
				else if (((_tokenSet_19.member(LA(1))) && (_tokenSet_20.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&(
                 LA(1) == KW_EDITING                              ||
                 (LA(2) == COLON && followedByWhitespace(LT(2)))  ||
                 isMalformedLabel(true, 1, null)
              )) {
					
					Aast malformedLabel = null;
					
					// not a proper label, check for a malformed label
					boolean mal = isMalformedLabel(true, 1, null); 
					
					// HARD CODED call that can't be placed directly in our rule
					// below (inner_block) without very bad results on prediction
					// logic generation
					if (mal)
					{
					malformed_symbol();
					malformedLabel = (Aast)returnAST;
					colon();
					}
					
					inner_block(false, malformedLabel);
					astFactory.addASTChild(currentAST, returnAST);
					idx++;
				}
				else if (((_tokenSet_13.member(LA(1))) && (_tokenSet_82.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
                 idx == 0                    &&
                 isRecord(LT(1).getText())   &&
                 (LA(2) == KW_EXCEPT || LA(2) == KW_WITH || LA(2) == KW_NO_ERROR || LA(2) == DOT) 
              )) {
					record_spec(fields);
					r_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					validation = true;
					
				}
				else if ((_tokenSet_85.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					allowSymbolMatch = true;
					chained_object_members();
					l_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					idx++;
					
					// reset each loop iteration
					symbolName = null;
					fld        = null;
					
					if (l_AST.getType() == SYMBOL)
					{
					symbolName = l_AST.getText();
					}
					else
					{
					fld = findFieldNode(l_AST);
					if (fld != null)
					{
					fields.add(fld);
					}
					}
					
					allowSymbolMatch = false;
					
					{
					if ((LA(1)==EQUALS)) {
						embedded_assign();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_86.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						format_phrase(symbolName, fld, true, true);
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_82.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
				}
				else {
					break _loop313;
				}
				
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			}
			set_or_update_or_prompt_for_stmt_AST = (Aast)currentAST.root;
			
			String frame = getFrameName(fp_AST);
			
			if (!fields.isEmpty())
			{
			sym.addFrameFields(frame, fields);
			}
			
			if (validation)
			{
			boolean addfp = false;
			
			if (fp_AST == null)
			{
			fp_AST = (Aast)astFactory.create(FRAME_PHRASE,"");
			addfp = true;
			}
			
			attachAllAssignSchemaValidation(fp_AST, r_AST, sym, null);
			
			if (addfp && fp_AST.getNumImmediateChildren() > 0)
			{
			set_or_update_or_prompt_for_stmt_AST.addChild(fp_AST);
			}
			}
			
			setUseDictExps(frame, fp_AST, set_or_update_or_prompt_for_stmt_AST);
			
			set_or_update_or_prompt_for_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = set_or_update_or_prompt_for_stmt_AST;
	}
	
/**
 * Matches the <code>TEXT</code> keyword and an following field specification.
 * Calls the {@link #field_clause} rule.
 * <p>
 * Used by {@link #enable_stmt}.
 * <p>
 * This is a separate rule to centralize logic and build the AST properly.
 */
	public final void text_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast text_clause_AST = null;
		
		try {      // for error handling
			Aast tmp475_AST = null;
			tmp475_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp475_AST);
			match(KW_TEXT);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			int _cnt945=0;
			_loop945:
			do {
				if ((_tokenSet_64.member(LA(1)))) {
					field_clause(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					if ( _cnt945>=1 ) { break _loop945; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt945++;
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			text_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_82);
		}
		returnAST = text_clause_AST;
	}
	
/**
 * Matches the format phrase construct of the Progress 4GL language which
 * optionally appears following a literal in a referencing rule but does not
 * begin with a specific keyword. Only a small subset of the standard 
 * options can be specified (see {@link #format_phrase}).
 * <p>
 * The following list of rules are called to properly implement the tree
 * building (which will be rooted at a <code>FORMAT_PHRASE</code> token):
 * <p>
 * <ul>
 *    <li> {@link #at_phrase}
 *    <li> {@link #colon_constant}
 *    <li> {@link #to_constant} 
 * </ul>
 * <p>
 * Called from {@link #set_or_update_or_prompt_for_stmt}.
 */
	public final void literal_format_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast literal_format_phrase_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(FORMAT_PHRASE,"format phrase"));
			
			{
			switch ( LA(1)) {
			case KW_AT:
			{
				at_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_COLON:
			{
				colon_constant();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_TO:
			{
				to_constant();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			literal_format_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_82);
		}
		returnAST = literal_format_phrase_AST;
	}
	
/**
 * Matches the <code>GO-ON()</code> construct and the list of key labels that follow in enclosing
 * parenthesis.  Each key label is any token at all with the loop ending on an
 * <code>RPARENS</code>. Please note that the Progress documentation states that these must be
 * whitespace separated and NOT comma separated. This is INCORRECT. As an undocumented feature,
 * one can mix or match whitespace and/or commas to separate event entries. This rule supports
 * this fully.
 * <p>
 * For certain event definitions such a CTRL-@, the lexer code will initially match on 2 or more
 * tokens (in this case a SYMBOL (CTRL-) and an AT (@)).  These are then merged using
 * <code>mergeUntilWS()</code> so that the result is correct.  The AST node is set to EVENT.
 * <p>
 * Used by {@link #set_or_update_or_prompt_for_stmt} and {@link #choose_stmt}.
 * <p>
 * The subtree is rooted by the keyword.
 */
	public final void go_on_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast go_on_clause_AST = null;
		Token  e = null;
		Aast e_AST = null;
		
		try {      // for error handling
			Aast tmp476_AST = null;
			tmp476_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp476_AST);
			match(KW_GO_ON);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			int _cnt335=0;
			_loop335:
			do {
				if ((_tokenSet_83.member(LA(1)))) {
					
					// DOT and EOF are hard coded in the worker routine
					int[] exclude = new int[]
					{
					COMMA,
					RPARENS
					};
					
					mergeUntilWS(exclude);
					
					e = LT(1);
					e_AST = (Aast)astFactory.create(e);
					astFactory.addASTChild(currentAST, e_AST);
					matchNot(RPARENS);
					
					// convert the Progress string to a Java string if needed
					if (e_AST.getType() == STRING)
					{
					saveAndReplaceText(e_AST, character.progressToJavaString(e_AST.getText(), !unixEscapes, false));
					}
					
					// set the event type
					saveAndReplaceType(e_AST, EVENT);            
					
					{
					if ((LA(1)==COMMA) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if (((LA(1) >= DOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
				}
				else {
					if ( _cnt335>=1 ) { break _loop335; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt335++;
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			go_on_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_82);
		}
		returnAST = go_on_clause_AST;
	}
	
/**
 * Implements the 9th precedence level of Progress 4GL expressions, the chaining of object
 * and handle references. A {@link #primary_expr} is always matched as the first component. If
 * the node(s) from the primary expression are an object reference (a reference to a Progress
 * user defined type/OO 4GL class) OR if the node(s) are a HANDLE or COM-HANDLE type, then the
 * code checks for a following <code>COLON</code> operator without any following white space.
 * Under these conditions, one of the {@link #downstream_chained_reference} (for OO 4GL refs),
 * {@link #com_property_or_method} (COM-HANDLE refs) or  {@link #attribute_or_method} (anything
 * else) will be called.
 * <p>
 * This rule enables chaining of these constructs on a completely mix and match basis which can
 * continue indefinitely so long as the most recently returned node is an object, com-handle or
 *  handle reference and there is a following <code>COLON</code> without any following white
 * space.
 * <p>
 * If the preceding node is an object type, the exact fully qualified class name being referenced
 * is read from the "qualified" annotation in the node.  That class name is used to resolve the
 * method or data member being referenced via chaining. The rule
 * {@link #downstream_chained_reference} provides the matching logic for both of those cases,
 * but the chaining itself is done here. The operator used for chaining is a <code>COLON</code>
 * but this will be converted to an <code>OBJECT_INVOCATION</code> before return.
 * <p>
 * If the given node is a COM-HANDLE type, if it is then the rule {@link #com_property_or_method}
 * provides the matching logic but the downstream chaining itself is done here. The operator used
 * for chaining is a <code>COLON</code> but this will be converted to a
 * <code>COM_INVOCATION</code> before return.
 * <p>
 * Supports the <code>DB_REF_NON_STATIC</code> operator. This is the syntax added in 10.2x which
 * allows a database table name or table + field name to be directly referenced off a handle using
 * the <code>::</code> operator.  This includes chaining support and mix/match chaining.
 * <p>
 * This is only called by the 7th level {@link #un_type} rule.
 * <p>
 * See the top level expression parsing rule {@link #expr} for more details.
 */
	public final void chained_object_members() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast chained_object_members_AST = null;
		Aast pe_AST = null;
		Token  col = null;
		Aast col_AST = null;
		Aast dr_AST = null;
		Aast am_AST = null;
		
		try {      // for error handling
			
			boolean active_x = false;
			boolean object   = false;
			boolean isStatic = false;
			String  cls      = null;
			Aast    refnode  = null;
			boolean saveMatchAssign = matchAssign;
			matchAssign = false;
			
			primary_expr();
			pe_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			refnode = pe_AST;
			
			boolean classLookup = sym.isClassLookup();
			sym.setClassLookup(false);
			
			{
			_loop1682:
			do {
				if (((LA(1)==COLON) && (_tokenSet_87.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( !followedByWhitespace(LT(1)) )) {
					col = LT(1);
					col_AST = (Aast)astFactory.create(col);
					astFactory.makeASTRoot(currentAST, col_AST);
					match(COLON);
					
					if (refnode == null)
					{
					throw genExc("Missing refnode for COLON operator!", LT(1));
					}
					
					// COM-HANDLE reference (or possible reference)
					active_x = isComHandleType(refnode);
					
					// determine if the primary expression is an object or class reference
					object = isObjectSubtree(refnode);
					
					if (object)
					{
					sym.setClassLookup(true);
					isStatic = isStaticObject(refnode);
					
					// determine to what specific class that reference refers
					cls = getObjectClassName(refnode);
					}                              
					
					{
					if (((_tokenSet_88.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( object )) {
						
						boolean isSuper = refnode.getType() == VAR_CLASS && 
						refnode.isAnnotation("oldtype") && 
						(Long)  refnode.getAnnotation("oldtype") == KW_SUPER;
						
						downstream_chained_reference(cls, isStatic, isSuper);
						dr_AST = (Aast)returnAST;
						astFactory.addASTChild(currentAST, returnAST);
						
						col_AST.setType(OBJECT_INVOCATION);
						testAndSaveGenericType(refnode, dr_AST);
						
						if (dr_AST.isAnnotation("dotnet-enum-implicit-value") &&
						(boolean) dr_AST.getAnnotation("dotnet-enum-implicit-value"))
						{
						if (refnode.isAnnotation("tempidx"))
						{
						long idx = (long) refnode.getAnnotation("tempidx");
						
						// override the previous tempidx (which does not point to any definition since
						// this variable is implicit; we must point to the specific enum being referenced
						dr_AST.putAnnotation("tempidx", idx);
						}
						else
						{
						System.out.printf("MISSING TEMPIDX for implicit value__ reference.  %s\n",
						col_AST.dumpTree());
						}
						}
						
						refnode = dr_AST;
						
					}
					else if (((_tokenSet_89.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( active_x )) {
						com_property_or_method();
						astFactory.addASTChild(currentAST, returnAST);
						col_AST.setType(COM_INVOCATION);
					}
					else if ((_tokenSet_90.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						attribute_or_method();
						am_AST = (Aast)returnAST;
						astFactory.addASTChild(currentAST, returnAST);
						refnode = am_AST;
						{
						if (((LA(1)==KW_IN) && (_tokenSet_64.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
                       !inDynFunc && 
                       (LA(2) == KW_FRAME || LA(2) == KW_MENU || LA(2) == KW_SUB_MENU || LA(2) == KW_BROWSE)
                    )) {
							widget_qualifier();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						
						}
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
				}
				else if ((LA(1)==DB_REF_NON_STATIC) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					{
					Aast tmp477_AST = null;
					tmp477_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp477_AST);
					match(DB_REF_NON_STATIC);
					malformed_symbol();
					astFactory.addASTChild(currentAST, returnAST);
					{
					if ((LA(1)==LPARENS) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
						lparens_subscript();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					}
					{
					if ((LA(1)==DB_REF_NON_STATIC) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
						{
						Aast tmp478_AST = null;
						tmp478_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp478_AST);
						match(DB_REF_NON_STATIC);
						malformed_symbol();
						astFactory.addASTChild(currentAST, returnAST);
						{
						if ((LA(1)==LPARENS) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
							lparens_subscript();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						
						}
						}
					}
					else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
				}
				else {
					break _loop1682;
				}
				
			} while (true);
			}
			
			sym.setClassLookup(classLookup);
			matchAssign = saveMatchAssign;
			
			chained_object_members_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = chained_object_members_AST;
	}
	
/**   
 * Matches an <code>EQUALS</code> token (the equals sign) and a following
 * {@link #expr}. The token type of the <code>EQUALS</code> is changed to
 * <code>ASSIGN</code> and the construct is rooted on that token.
 * <p>
 * Used by {@link #entry_stmt} and {@link #compile_stmt}.
 */
	public final void embedded_assign() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast embedded_assign_AST = null;
		Token  eq = null;
		Aast eq_AST = null;
		
		try {      // for error handling
			eq = LT(1);
			eq_AST = (Aast)astFactory.create(eq);
			astFactory.makeASTRoot(currentAST, eq_AST);
			match(EQUALS);
			eq_AST.setType(ASSIGN);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			embedded_assign_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_82);
		}
		returnAST = embedded_assign_AST;
	}
	
/**
 * Matches the <code>INSERT</code> language statement.  Uses the
 * {@link #record_spec}, {@link #using_id_clause} and
 * {@link #frame_phrase} rules.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void insert_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast insert_stmt_AST = null;
		Aast r_AST = null;
		Aast fp_AST = null;
		
		try {      // for error handling
			
			Set<Aast> fields = new HashSet<>();
			
			Aast tmp479_AST = null;
			tmp479_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp479_AST);
			match(KW_INSERT);
			record_spec(fields);
			r_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_USING:
			{
				using_id_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			case KW_WITH:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_WITH:
			{
				frame_phrase(false, false);
				fp_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp480_AST = null;
				tmp480_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp480_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			insert_stmt_AST = (Aast)currentAST.root;
			
			String frame = getFrameName(fp_AST);
			
			if (!fields.isEmpty())
			{
			sym.addFrameFields(frame, fields);
			}
			
			boolean addfp = false;
			
			if (fp_AST == null)
			{
			fp_AST = (Aast)astFactory.create(FRAME_PHRASE,"");
			addfp = true;
			}
			
			attachAllAssignSchemaValidation(fp_AST, r_AST, sym, null);
			
			if (addfp && fp_AST.getNumImmediateChildren() > 0)
			{
			insert_stmt_AST.addChild(fp_AST);
			}
			
			setUseDictExps(frame, fp_AST, insert_stmt_AST);
			
			insert_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = insert_stmt_AST;
	}
	
/**
 * Matches the <code>USING</code> keyword and the following
 * <code>RECID or ROWID</code> construct as encoded by
 * {@link #recid_or_rowid}.  Called by {@link #create_stmt}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void using_id_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast using_id_clause_AST = null;
		
		try {      // for error handling
			Aast tmp481_AST = null;
			tmp481_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp481_AST);
			match(KW_USING);
			recid_or_rowid();
			astFactory.addASTChild(currentAST, returnAST);
			using_id_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_91);
		}
		returnAST = using_id_clause_AST;
	}
	
/**
 * Matches the <code>RAW</code> language statement with the following
 * {@link #lvalue} and 1 or 2 optional integer {@link #expr} for position
 * and length.
 * <p>
 * Called by {@link #assign_type_syntax_stmt_list}.
 * The call is commented because the this statement is processed via the func_call, and after that fixed in
 * restoreAssignStyleStmt.
*/
	public final void raw_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast raw_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp482_AST = null;
			tmp482_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp482_AST);
			match(KW_RAW);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case COMMA:
				{
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					expr();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case RPARENS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			raw_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = raw_stmt_AST;
	}
	
/**
 * Matches the <code>SET-SIZE</code> language statement with the following
 * {@link #lvalue}.
 * <p>
 * Called by {@link #assign_type_syntax_stmt_list}.
 */
	public final void set_size_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast set_size_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp483_AST = null;
			tmp483_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp483_AST);
			match(KW_SET_SZ);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			chained_object_members();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			set_size_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = set_size_stmt_AST;
	}
	
/**
 * Matches the <code>SET-BYTE-ORDER</code> language statement with the
 * following {@link #lvalue}.
 * <p>
 * Called by {@link #assign_type_syntax_stmt_list}.
 */
	public final void set_byte_order_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast set_byte_order_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp484_AST = null;
			tmp484_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp484_AST);
			match(KW_SET_B_OR);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			chained_object_members();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			set_byte_order_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = set_byte_order_stmt_AST;
	}
	
/**
 * Matches the <code>SET-POINTER-VALUE</code> language statement with the
 * following {@link #lvalue}.
 * <p>
 * Called by {@link #assign_type_syntax_stmt_list}.
 */
	public final void set_pointer_value_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast set_pointer_value_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp485_AST = null;
			tmp485_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp485_AST);
			match(KW_SET_PTR);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			chained_object_members();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			set_pointer_value_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = set_pointer_value_stmt_AST;
	}
	
/**
 * Matches the <code>PUT-BITS, PUT-BYTE, PUT-BYTES, PUT-DOUBLE,</code>
 * <code>PUT-FLOAT, PUT-INT64, PUT-LONG, PUT-SHORT, PUT-STRING,</code>
 * <code>PUT-UNSIGNED-LONG, PUT-UNSIGNED-SHORT</code> language statement
 * with the following {@link #expr} expressions.
 * <p>
 * Most of these statements are specific to the <code>MEMPTR</code> data type
 * but not all (contrary to what the name of this rule might suggest. The
 * format is essentially identical, so they were all collapsed into this
 * single rule.
 * <p>
 * Called by {@link #assign_type_syntax_stmt_list}.
 */
	public final void put_memptr_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast put_memptr_stmt_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_PUT_BITS:
			{
				Aast tmp486_AST = null;
				tmp486_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp486_AST);
				match(KW_PUT_BITS);
				break;
			}
			case KW_PUT_BYTE:
			{
				Aast tmp487_AST = null;
				tmp487_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp487_AST);
				match(KW_PUT_BYTE);
				break;
			}
			case KW_PUT_BYTS:
			{
				Aast tmp488_AST = null;
				tmp488_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp488_AST);
				match(KW_PUT_BYTS);
				break;
			}
			case KW_PUT_DBL:
			{
				Aast tmp489_AST = null;
				tmp489_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp489_AST);
				match(KW_PUT_DBL);
				break;
			}
			case KW_PUT_FLT:
			{
				Aast tmp490_AST = null;
				tmp490_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp490_AST);
				match(KW_PUT_FLT);
				break;
			}
			case KW_PUT_I64:
			{
				Aast tmp491_AST = null;
				tmp491_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp491_AST);
				match(KW_PUT_I64);
				break;
			}
			case KW_PUT_LONG:
			{
				Aast tmp492_AST = null;
				tmp492_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp492_AST);
				match(KW_PUT_LONG);
				break;
			}
			case KW_PUT_SHT:
			{
				Aast tmp493_AST = null;
				tmp493_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp493_AST);
				match(KW_PUT_SHT);
				break;
			}
			case KW_PUT_STR:
			{
				Aast tmp494_AST = null;
				tmp494_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp494_AST);
				match(KW_PUT_STR);
				break;
			}
			case KW_PUT_UL:
			{
				Aast tmp495_AST = null;
				tmp495_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp495_AST);
				match(KW_PUT_UL);
				break;
			}
			case KW_PUT_USHT:
			{
				Aast tmp496_AST = null;
				tmp496_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp496_AST);
				match(KW_PUT_USHT);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			put_memptr_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = put_memptr_stmt_AST;
	}
	
/**
 * Matches the <code>NEXT-PROMPT</code> language statement.  Uses the {@link #lvalue} and
 * {@link #frame_phrase} rules. Undocumented support has been added for optional 
 * <code>INPUT</code> and <code>FRAME framename</code> qualifiers before the lvalue. This
 * was working syntax that was found in customer source code.
 * <p>
 * The 4GL has an undocumented feature that allows a {@link #format_phrase} to be specified
 * after the lvalue.  This is implemented here.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void next_prompt_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast next_prompt_stmt_AST = null;
		Token  in = null;
		Aast in_AST = null;
		Aast l_AST = null;
		Aast fp_AST = null;
		
		try {      // for error handling
			Aast tmp497_AST = null;
			tmp497_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp497_AST);
			match(KW_NEXT_PMT);
			{
			if ((LA(1)==KW_INPUT)) {
				in = LT(1);
				in_AST = (Aast)astFactory.create(in);
				match(KW_INPUT);
				hide(in);
			}
			else if ((_tokenSet_64.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_FRAME) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
				frame_reference(false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			lvalue();
			l_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((_tokenSet_92.member(LA(1))) && (_tokenSet_93.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				format_phrase(null, null, false, false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT||LA(1)==KW_WITH) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_WITH:
			{
				frame_phrase(false, false);
				fp_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			
			int type = l_AST.getType();
			if (type > BEGIN_FIELDTYPES && type < END_FIELDTYPES)
			{
			String frameName = getFrameName(fp_AST);
			sym.addFrameField(frameName, l_AST);
			}
			
			next_prompt_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = next_prompt_stmt_AST;
	}
	
/**
 * Matches the <code>FRAME frame</code> reference seen in many Progress
 * language statements such as {@link #clear_stmt} and the common
 * {@link #frame_phrase}.
 * <p>
 * If the single parameter is true, the frame is added to the frame namespace.
 * In any case, the following {@link #symbol} is rewritten to a
 * <code>WID_FRAME</code> token.
 * <p>
 * This rule is a simplified version of what can also be accessed directly
 * from {@link #lvalue} but this keeps certain references much less
 * ambiguous.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * <code>FRAME</code> keyword.
 */
	public final void frame_reference(
		boolean define
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast frame_reference_AST = null;
		Aast frame_AST = null;
		
		try {      // for error handling
			Aast tmp498_AST = null;
			tmp498_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp498_AST);
			match(KW_FRAME);
			malformed_symbol();
			frame_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			frame_AST.setType(WID_FRAME);
			
			if (define)
			{
			sym.addFrame(frame_AST.getText(), WID_FRAME);
			}
			
			frame_reference_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = frame_reference_AST;
	}
	
/**
 * This rule implements the at-phrase construct. It is called from
 * {@link #frame_phrase} and {@link #form_item} rules.
 * <p>
 * This rule defines the AT phrase of Progress 4GL. The definition here is
 * less strict than in 4GL, but for the sake of parsing a valid 4GL source it
 * is adequate.
 * <p> 
 * Ambiguity warnings were generated in the {@link #def_frame_stmt} and in
 * this rule because the optional alignment nonreserved keywords conflicted
 * with the symbols in the frame definition.
 * As far as can be found, there is no real ambiguity in practice and
 * those rules have hade ambiguity warning suppressed as a result.
 */
	public final void at_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast at_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp499_AST = null;
			tmp499_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp499_AST);
			match(KW_AT);
			{
			switch ( LA(1)) {
			case KW_COLUMNS:
			case KW_COL:
			case KW_COL_OF:
			case KW_ROW:
			case KW_ROW_OF:
			case KW_X:
			case KW_X_OF:
			case KW_Y:
			case KW_Y_OF:
			{
				location_spec();
				astFactory.addASTChild(currentAST, returnAST);
				location_spec();
				astFactory.addASTChild(currentAST, returnAST);
				{
				if ((LA(1)==KW_COLON_AL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp500_AST = null;
					tmp500_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp500_AST);
					match(KW_COLON_AL);
				}
				else if ((LA(1)==KW_LEFT_AL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp501_AST = null;
					tmp501_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp501_AST);
					match(KW_LEFT_AL);
				}
				else if ((LA(1)==KW_RIGHT_AL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp502_AST = null;
					tmp502_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp502_AST);
					match(KW_RIGHT_AL);
				}
				else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				break;
			}
			case DEC_LITERAL:
			case HEX_LITERAL:
			case NUM_LITERAL:
			{
				numeric_literal();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			at_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = at_phrase_AST;
	}
	
/**
 * Matches a specific <code>COLON literal</code> clause used in the
 * {@link #format_phrase}.
 * <p>
 * Separated from the main rule to properly build the AST with less effort.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void colon_constant() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast colon_constant_AST = null;
		
		try {      // for error handling
			Aast tmp503_AST = null;
			tmp503_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp503_AST);
			match(KW_COLON);
			numeric_literal();
			astFactory.addASTChild(currentAST, returnAST);
			colon_constant_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = colon_constant_AST;
	}
	
/**
 * Matches a specific <code>TO literal</code> clause used in the
 * {@link #constant_form_item} and {@link #format_phrase}.
 * <p>
 * Separated from the main rule to properly build the AST with less effort.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void to_constant() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast to_constant_AST = null;
		
		try {      // for error handling
			Aast tmp504_AST = null;
			tmp504_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp504_AST);
			match(KW_TO);
			numeric_literal();
			astFactory.addASTChild(currentAST, returnAST);
			to_constant_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = to_constant_AST;
	}
	
/**
 * Matches an <code>AS BUTTON</code> clause and adds a button widget as if an inline
 * <code>DEFINE BUTTON</code> had been implemented. This is an undocumented quirk of the
 * {@link #format_phrase}. The root node will be of type <code>AS_BUTTON</code>.
 *
 * @param    symName
 *           The name of the new button. Must not be <code>null</code>.
 */
	public final void as_button_quirk(
		String symName
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast as_button_quirk_AST = null;
		Token  a = null;
		Aast a_AST = null;
		Token  but = null;
		Aast but_AST = null;
		
		try {      // for error handling
			a = LT(1);
			a_AST = (Aast)astFactory.create(a);
			astFactory.makeASTRoot(currentAST, a_AST);
			match(KW_AS);
			but = LT(1);
			but_AST = (Aast)astFactory.create(but);
			match(KW_BUTTON);
			hide(but);
			a_AST.setType(AS_BUTTON);
			
			sym.addWidget(symName, WID_BUTTON);
			
			as_button_quirk_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = as_button_quirk_AST;
	}
	
/**
 * Matches the <code>AS</code> language keyword that defines the data type
 * of a variable to be added to the variable dictionary. This rule 
 * encapsulates the logic of matching the correct variable data type and
 * inserting it into the variable dictionary in the correct scope. This is
 * called from {@link #def_var_stmt} and {@link #parameter}, both of which
 * support the same syntax.  It is also called from {@link #def_parm_stmt}  
 * which does allow for an optional <code>HANDLE TO</code> construct when being 
 * called for a <code>DEFINE PARAMETER</code>. 
 * <p>
 * The data type matching is implemented in {@link #var_type}.
 *
 * @param    varName
 *           Text which is the variable name that should be added to the
 *           current scope of the variable dictionary.  If <code>null</code>,
 *           no name will be added and this clause is essentially ignored.
 * @param    nativeTypes
 *           <code>true</code> to support extra type keywords for native
 *           shared library interfaces.
 */
	public final void as_clause(
		 String varName, boolean nativeTypes 
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast as_clause_AST = null;
		Token  ht = null;
		Aast ht_AST = null;
		Token  to = null;
		Aast to_AST = null;
		
		try {      // for error handling
			Aast tmp505_AST = null;
			tmp505_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp505_AST);
			match(KW_AS);
			{
			if (((LA(1)==KW_HANDLE) && (LA(2)==KW_TO) && (_tokenSet_0.member(LA(3))))&&( (nativeTypes && (LA(3) != NUM_LITERAL || LA(3) != HEX_LITERAL)) )) {
				ht = LT(1);
				ht_AST = (Aast)astFactory.create(ht);
				astFactory.addASTChild(currentAST, ht_AST);
				match(KW_HANDLE);
				ht_AST.setType(HANDLE_TO);
				to = LT(1);
				to_AST = (Aast)astFactory.create(to);
				match(KW_TO);
				hide(to);
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			var_type( varName, nativeTypes );
			astFactory.addASTChild(currentAST, returnAST);
			
			// move the HANDLE_TO node to be the last child, since otherwise the downstream
			// tree processing will have to have many extra checks and conditional logic to
			// deal with this rare case (the common case is to just have a single child that
			// specifies the type)
			if (ht_AST != null)
			{
			ht_AST.move(null, -1);
			}
			
			as_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = as_clause_AST;
	}
	
/**
 * Matches the <code>LIKE</code> language keyword that defines the data type
 * of a variable to be added to the variable dictionary based on the type of
 * another variable, database field, temp-table/work-table field. This rule 
 * encapsulates the logic of matching the correct data type and inserting it
 * into the proper dictionary. This is called from many locations (see below)
 * which all handle the same syntax but for different purposes.  This allows
 * the matching logic to be centralized and reused from multiple callers.
 * <p>
 * If this is processing for a temp-table, then instead of <code>LIKE</code> the
 * <code>LIKE-SEQUENTIAL</code> keyword can be matched instead. 
 * <p>
 * To know what to do with each different type of dictionary add, this rule
 * requires 3 parameters.  The 1st is the is the variable, field or table
 * name to be added to the dictionary. This is necessary since there is no
 * way to implement a standard match for the symbol name from all language
 * statements that call this rule.
 * <p>
 * A 2nd parameter is <code>null</code> if this is a variable dictionary
 * add or it is an Object that represents a table in the schema dictionary
 * in which to add fields. 
 * <p>
 * A 3rd parameter provides the context of the type of symbol to be looked
 * up.  This is a simple boolean value that indicates if the name is a table
 * or a variable/field.  This context is known by the referencing rule and it 
 * eliminates any ambiguity regarding the type of lookup.
 * <p>
 * Locations from which this rule is referenced:
 * <ul>
 *    <li> as a variable or field (lvalue)
 *       <ul>
 *          <li> {@link #def_var_stmt}
 *          <li> {@link #def_parm_stmt}
 *          <li> {@link #format_phrase}
 *       </ul>
 *    <li> as a table name
 *       <ul>
 *          <li> {@link #def_temp_table_stmt} (for temp-tables and
 *               work-tables)
 *       </ul>
 *    <li> as a field name to be added to a temp-table or work-table
 *       <ul>
 *          <li> {@link #add_temp_table_field}
 *       </ul>
 * </ul>
 * <p>
 * The 2nd token found must be a valid name from the schema or as defined by
 * previous statements.  The corresponding token type is then used to set the
 * proper variable data type or to obtain the temp-table/work-table name.
 * For variables and fields, the type is returned by the {@link #lvalue} rule
 * which handles field level lookups.  For table names the {@link #record}
 * rule is used.
 * <p>
 * In temp-table and work-table adds, there is optional matching that is
 * additionally enabled by semantic predicate.  This matching is done in
 * the {@link #temp_table_use_index} rule.
 * <p>
 * Note that this rule DOES support the addition of scoped shared and global
 * shared variables.  No special steps are necessary to enable this due to
 * a quirk in how Progress handles such variables, they can only be defined
 * in the top-level context (not inside a procedure or function which is the
 * only block in which there is a different scoping level).  For this reason,
 * whenever shared variables are added to the dictionary, they can be added
 * to the current scope, since this is the same as the global scope in any
 * valid Progress code.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 *
 * @param    symName
 *           Text which is the variable, temp-table or work-table name that
 *           should be added to the current scope of the respective
 *           dictionary. If <code>null</code>, no name will be added and this
 *           clause is essentially ignored.
 * @param    table
 *           A reference to a table previously added to the dictionary. Must
 *           be <code>null</code> if this is a modification of the variable
 *           namespace.
 * @param    tablename
 *           If true, the name is to be interpreted as a tablename, otherwise
 *           the name is an lvalue (variable or field name).
 */
	public final void like_clause(
		String symName, Object table, boolean tablename
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast like_clause_AST = null;
		Aast l_AST = null;
		Aast r_AST = null;
		Token  kv = null;
		Aast kv_AST = null;
		
		try {      // for error handling
			
			boolean hasValidate = false;
			boolean sequential  = false;
			Aast field = null;
			Aast[] tableFields = null;
			
			NameNode nothing = null;
			
			{
			if (((LA(1)==KW_LIKE_SEQ))&&( tablename )) {
				Aast tmp506_AST = null;
				tmp506_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp506_AST);
				match(KW_LIKE_SEQ);
				sequential = true;
			}
			else if ((LA(1)==KW_LIKE)) {
				Aast tmp507_AST = null;
				tmp507_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp507_AST);
				match(KW_LIKE);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			inLikeClause = true;
			
			{
			if (((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( !tablename )) {
				lvalue();
				l_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				nothing=record(false, false, false);
				r_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			// this block is not an exit action, but does need to be executed
			// before the matching on temp_table_use_index 
			
			// this is only needed in lvalue annotations and subscript
			// processing (called from lvalue) so it can be "turned off" here
			inLikeClause = false;
			
			if (symName != null)
			{
			if (table != null)
			{
			if (tablename)
			{
			// this is a "like table" form, so add all the fields
			// from the referenced table into the target table
			if (r_AST != null)
			{
			tableFields = sym.addFieldsFrom(table,
			r_AST.getText(),
			false,
			sequential,
			true);
			}
			else
			{
			LOG.log(Level.SEVERE, "Missing required record for adding "
			+ "'all fields from' table.");
			}
			}
			else
			{
			// this is a field to be added to a specific table def
			// (temp-table or work-table)
			if (l_AST != null)
			{
			field = sym.addFieldLike(table, symName, l_AST); 
			}
			else
			{
			String errtxt = "Missing required lvalue for adding " +
			symName +
			" field to table.";
			LOG.log(Level.SEVERE, errtxt);
			}
			}
			
			// this works as long as this code is only called by things
			// like def_temp_table_stmt which is true at this time
			sym.promoteTable(table, true, false, false);
			}
			else
			{
			// here is where we enable the variable lookup for all
			// subsquent code in this scope, note that Progress only seems
			// to ever have 2 levels of scope: the external proc and any
			// internal proc/trigger defs, since you can only define shared
			// or global shared vars in the external proc scope, we should
			// *not* need to explicitly add vars to the global scope since
			// adding to the current scope should be equivalent
			if (l_AST != null)
			{
			sym.addLocalVariableLike(symName, l_AST);
			}
			else
			{
			LOG.log(Level.SEVERE, "Missing required lvalue for adding " +
			symName +
			" to local variable dictionary.");
			}
			}
			}
			
			{
			_loop1117:
			do {
				if (((LA(1)==KW_VALIDATE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( table != null )) {
					kv = LT(1);
					kv_AST = (Aast)astFactory.create(kv);
					astFactory.addASTChild(currentAST, kv_AST);
					match(KW_VALIDATE);
					
					// TODO: do we need to record anything special in the field case?
					if (tablename)
					sym.setTableOption(table, KW_VALIDATE, kv_AST);
					
					hasValidate = true;
					
				}
				else if (((LA(1)==KW_USE_IDX) && (_tokenSet_53.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( tablename )) {
					temp_table_use_index(table);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1117;
				}
				
			} while (true);
			}
			
			if (field != null)
			{
			String sourceSchemaName = (String) l_AST.getAnnotation("schemaname");
			sym.processLikeField(field, hasValidate, sourceSchemaName);
			}
			
			if (tableFields != null)
			{
			String sourceSchemaName = (String) r_AST.getAnnotation("schemaname");
			for (int i = 0; i < tableFields.length; i++)
			{
			Aast child = tableFields[i];
			String schemaName = sourceSchemaName + "." + child.getText();
			sym.processLikeField(child, hasValidate, schemaName);
			}
			
			if (sequential)
			{
			sym.setTableOption(table, KW_LIKE_SEQ, r_AST);
			}
			}
			
			like_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = like_clause_AST;
	}
	
/**   
 * Matches the <code>COLUMN-LABEL</code> keyword and the required following
 * string. Used by {@link #def_var_stmt} and the subtree is rooted by the
 * keyword (which is the reason for using a separate rule for something so
 * simple).
 */
	public final void column_label() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast column_label_AST = null;
		
		try {      // for error handling
			Aast tmp508_AST = null;
			tmp508_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp508_AST);
			match(KW_COL_LAB);
			Aast tmp509_AST = null;
			tmp509_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp509_AST);
			match(STRING);
			column_label_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = column_label_AST;
	}
	
/**   
 * Matches the <code>FORMAT</code> keyword and the required following
 * string. Used by {@link #def_var_stmt} and {@link #format_phrase} rules.
 * The subtree is rooted by the keyword (which is the reason for using a
 * separate rule for something so simple).
 * <p>
 * Customer code has shown that Progress allows unquoted format 'strings'
 * to be used here.  For example 99/99/9999 instead of '99/99/9999'! This
 * means that we must use {@link #expr} instead of <code>STRING</code>
 * AND that this trick of using an expression may fail if their tolerance
 * for such ambiguous and arbitrary constructs is great.  For example,
 * if one were to code x(25) instead of 'x(25)', this would start to be
 * quite a problem since this would parse as a function call to a function
 * 'x' which probably doesn't exist and even if it did, it would be the
 * wrong tokens since we really should have a single required string token
 * following the <code>FORMAT</code> keyword.
 * <p>
 * To make this better, the exit action converts any non-quoted format to
 * a <code>STRING</code> node with the proper quoting.
 * <p>
 * It might be useful to merge this with {@link #ui_stuff} since both rules
 * have identical structure and they are <b><code>almost always</code> referenced
 * as peer alternatives.  However, there are a few places where this rule
 * is referenced without the other so this would add ambiguity where none
 * exists today.  More importantly, the risk associated with changes 
 * to this rule (because of the ridiculous ambiguity described above) means
 * it is safer to leave this separate so that changes can be made here as
 * needed.</b>
 *
 * @param    dynExpr
 *           flag indicating the format string can be any dynamic expression.
 */
	public final void format_string(
		 boolean dynExpr 
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast format_string_AST = null;
		Aast e_AST = null;
		
		try {      // for error handling
			Aast tmp510_AST = null;
			tmp510_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp510_AST);
			match(KW_FORMAT);
			expr();
			e_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			Aast child = e_AST.getChildAt(0);
			
			if (child == null)
			{
			LOG.log(Level.SEVERE, e_AST.dumpTree());
			}
			
			// convert any non-quoted format to a valid string
			if (!dynExpr && child.getType() != STRING)
			{
			saveAndReplaceTypeAndText(child, STRING, '"' + child.getText() + '"');
			}
			
			format_string_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = format_string_AST;
	}
	
/**   
 * Matches the <code>HELP</code> keyword and the required following
 * string. Used by {@link #format_phrase} and the subtree is rooted by the
 * keyword (which is the reason for using a separate rule for something so
 * simple).
 */
	public final void help_string() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast help_string_AST = null;
		
		try {      // for error handling
			Aast tmp511_AST = null;
			tmp511_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp511_AST);
			match(KW_HELP);
			Aast tmp512_AST = null;
			tmp512_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp512_AST);
			match(STRING);
			help_string_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = help_string_AST;
	}
	
/**
 * Matches the <code>VALIDATE( expression )</code> construct which specifies
 * a boolean condition expression and a message string expression to display
 * when the condition expression evaluates to false.
 * <p>
 * Used by {@link #format_phrase}.
 * <p>
 * Separating this allows the AST to be built cleanly and also centralizes
 * the logic for reuse.
 *
 * @param   schemaName
 *          The schema name of the field being validated (may be null).
 */
	public final void validate(
		String schemaName
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast validate_AST = null;
		
		try {      // for error handling
			
			validation = true;
			validateFieldName = schemaName;
			
			Aast tmp513_AST = null;
			tmp513_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp513_AST);
			match(KW_VALIDATE);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			
			validation = false;
			validateFieldName = null;
			
			validate_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = validate_AST;
	}
	
/**   
 * Matches the <code>VIEW-AS</code> phrase which is called from many locations
 * such as {@link #def_var_stmt}.  Uses the following:
 * <ul>
 *    <li> {@link #combo_box_phrase}
 *    <li> {@link #simple_widget_phrase}
 *    <li> {@link #editor_phrase}
 *    <li> {@link #radio_set_phrase}
 *    <li> {@link #selection_list_phrase}
 *    <li> {@link #slider_phrase}
 * </ul>
 * <p>
 * All options can be specified in any order.
 * <p>
 * This rule updates the widget namespace with a name and type of the
 * referenced symbol.  For variables (when called from 
 * <code>def_var_stmt</code>), this means that the variable has been added to
 * both namespaces.  This allows the same name to be used for both a
 * variable and a widget and the parser must recognize the usage by context.
 */
	public final void view_as_phrase(
		String symName
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast view_as_phrase_AST = null;
		
		try {      // for error handling
			
			int ntype = -1;
			
			Aast tmp514_AST = null;
			tmp514_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp514_AST);
			match(KW_VIEW_AS);
			{
			switch ( LA(1)) {
			case KW_COMBO_BX:
			{
				combo_box_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				ntype = WID_COMBO;
				break;
			}
			case KW_TEXT:
			case KW_FILL_IN:
			case KW_TOGGL_BX:
			{
				ntype=simple_widget_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_EDITOR:
			{
				editor_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				ntype = WID_EDITOR;
				break;
			}
			case KW_RADIO_S:
			{
				radio_set_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				ntype = WID_RADIO;
				break;
			}
			case KW_SEL_LST:
			{
				selection_list_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				ntype = WID_SEL_LST;
				break;
			}
			case KW_SLIDER:
			{
				slider_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				ntype = WID_SLIDER;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			
			if (symName != null)
			sym.addWidget(symName, ntype);
			
			view_as_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = view_as_phrase_AST;
	}
	
/**   
 * Matches the <code>WHEN</code> keyword and the required following
 * expression. This is a simpler form of the {@link #when_clause} which
 * requires a <code>THEN</code> following construct.
 * <p>
 * Used by {@link #display_stmt}, {@link #assign_stmt} and
 * {@link #field_clause}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void simple_when_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast simple_when_clause_AST = null;
		
		try {      // for error handling
			Aast tmp515_AST = null;
			tmp515_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp515_AST);
			match(KW_WHEN);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			simple_when_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = simple_when_clause_AST;
	}
	
/**   
 * Matches the <code>@</code> sign and the required following variable or
 * field name (see {@link #lvalue}).
 * <p>
 * Used by {@link #display_stmt}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 *
 * @param    matchSym
 *           <code>true</code> if this clause should allow matches to
 *           a <code>SYMBOL</code> node in place of the lvalue.
 *
 * @return   The symbol name if a <code>SYMBOL</code> was matched, otherwise
 *           <code>null</code>.
 */
	public final String  at_base_field_clause(
		boolean matchSym
	) throws RecognitionException, TokenStreamException {
		String name;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast at_base_field_clause_AST = null;
		Aast base_AST = null;
		
		name = null;
		
		if (matchSym)
		{
		allowSymbolMatch = true;
		}
		
		
		try {      // for error handling
			Aast tmp516_AST = null;
			tmp516_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp516_AST);
			match(AT);
			lvalue();
			base_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			if (matchSym)
			{
			allowSymbolMatch = false;
			
			if (base_AST.getType() == SYMBOL)
			{
			name = base_AST.getText(); 
			}
			}
			
			at_base_field_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = at_base_field_clause_AST;
		return name;
	}
	
/**   
 * Matches the <code>BY</code> keyword and the required following expression.
 * <p>
 * Used by {@link #aggregate_phrase} and {@link #loop_incr} rules.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void by_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast by_clause_AST = null;
		
		try {      // for error handling
			Aast tmp517_AST = null;
			tmp517_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp517_AST);
			match(KW_BY);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			by_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = by_clause_AST;
	}
	
/**
 * Matches the constant prefixed subclause of the {@link #form_item}.
 * Calls {@link #view_as_text_clause}, {@link #ui_stuff}, {@link #at_phrase} 
 * and {@link #to_constant}.
 * <p>
 * ANTLR detects ambiguity in the loop of this rule due to conflict between
 * the unreserved keywords and the expression that follows in the 2nd token
 * position for <code>ui_stuff</code>.  This code should match on the
 * keywords first, so these ambiguity warnings have been disabled. 
 * <p>
 * Though undocumented, one can specify a {@link #format_string} as an
 * option.
 * <p>
 * Separated from the main rule to properly build the AST with less effort.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void constant_form_item() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast constant_form_item_AST = null;
		
		try {      // for error handling
			literal();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_AT:
			{
				at_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_TO:
			{
				to_constant();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
				if ((_tokenSet_94.member(LA(1)))) {
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop356:
			do {
				switch ( LA(1)) {
				case KW_FORMAT:
				{
					format_string(false);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_VIEW_AS:
				{
					view_as_text_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
					if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
						ui_stuff();
						astFactory.addASTChild(currentAST, returnAST);
					}
				else {
					break _loop356;
				}
				}
			} while (true);
			}
			constant_form_item_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_95);
		}
		returnAST = constant_form_item_AST;
	}
	
/**
 * Matches a specific <code>VIEW-AS TEXT</code> clause used in the
 * {@link #constant_form_item}.
 * <p>
 * Separated from the main rule to properly build the AST with less effort.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void view_as_text_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast view_as_text_clause_AST = null;
		
		try {      // for error handling
			Aast tmp518_AST = null;
			tmp518_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp518_AST);
			match(KW_VIEW_AS);
			Aast tmp519_AST = null;
			tmp519_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp519_AST);
			match(KW_TEXT);
			view_as_text_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_94);
		}
		returnAST = view_as_text_clause_AST;
	}
	
/**
 * Matches the <code>ACCUM</code> keyword and the optional following maximum
 * length.  This rule conflicts with the use of a <code>whole_number_literal</code>
 * construct when k=1 in the calling rule {@link #frame_phrase}.  To eliminate 
 * the ambiguity warning, ANTLR's greedy option had to be explicitly enabled.   
 * Since greedy is the default, this doesn't change the code generation, it
 * only suppresses the warning.  <b>Note that this rule checks the k=2 
 * lookahead before matching the <code>whole_number_literal</code>.  This may be OK
 * but it may also bypass the match in a case where something unexpected
 * follows the <code>whole_number_literal</code>.  Since this cannot be proven for all
 * cases, watch this code!</b>
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void accum_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast accum_clause_AST = null;
		
		try {      // for error handling
			Aast tmp520_AST = null;
			tmp520_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp520_AST);
			match(KW_ACCUM);
			{
			if ((LA(1)==HEX_LITERAL||LA(1)==NUM_LITERAL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				whole_number_literal();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			accum_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = accum_clause_AST;
	}
	
/**
 * Matches the <code>CANCEL-BUTTON or DEFAULT-BUTTON</code> keywords and the
 * required following button name.  No button namespace processing is done
 * to confirm that the following symbol is indeed a button.
 * <p>
 * Used by {@link #frame_phrase}.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void button_reference() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast button_reference_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_CANCEL_B:
			{
				Aast tmp521_AST = null;
				tmp521_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp521_AST);
				match(KW_CANCEL_B);
				break;
			}
			case KW_DEFLT_BN:
			{
				Aast tmp522_AST = null;
				tmp522_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp522_AST);
				match(KW_DEFLT_BN);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			button_reference_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = button_reference_AST;
	}
	
/**
 * Matches the color_spec construct of the Progress 4GL language. Uses the {@link #color_phrase}
 * rule downstream for the bulk of this rule's implementation. 
 * <p>
 * This rule is called from {@link #title_phrase} and {@link #frame_phrase}.
 * <p>
 * ANTLR detects ambiguity in each loop of this rule due to conflict between
 * unreserved keywords and the symbol that can be generated by the rule
 * reference to <code>color_phrase</code> or the expression that follows in
 * the 2nd token position for <code>ui_stuff</code>.  This code should match
 * on the keywords first, so these ambiguity warnings have been disabled.
 */
	public final void color_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast color_spec_AST = null;
		
		try {      // for error handling
			Aast tmp523_AST = null;
			tmp523_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp523_AST);
			match(KW_COLOR);
			display_color_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_PROMPT||LA(1)==KW_PRMT_FOR) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				prompt_color_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			color_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = color_spec_AST;
	}
	
/**
 * Matches the <code>CONTEXT-HELP-FILE</code> keyword and the required
 * following {@link #filename}.
 * <p>
 * Used by {@link #frame_phrase}.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void context_help_file() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast context_help_file_AST = null;
		
		try {      // for error handling
			Aast tmp524_AST = null;
			tmp524_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp524_AST);
			match(KW_CTX_H_F);
			filename(null);
			astFactory.addASTChild(currentAST, returnAST);
			context_help_file_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = context_help_file_AST;
	}
	
/**
 * Matches the title-phrase construct of the Progress 4GL language. This implementation uses
 * {@link #simple_color_clause} (for the {@code COLOR color_phrase} and {@link #ui_stuff} for
 * {@code FONT expr}, {@code BGCOLOR expr}, {@code DCOLOR expr} and {@code FGCOLOR expr}
 * constructs that can occur just before the title string expression.
 * <p>
 * This rule is called from {@link #frame_phrase} and {@link #browse_options_phrase} rules.
 * <p>
 * ANTLR detects ambiguity in the use of <code>ui_stuff</code> and <code>color_spec</code>.
 * The code has been protected with semantic predicates and ambiguity warnings have been
 * disabled.
 */
	public final void title_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast title_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp525_AST = null;
			tmp525_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp525_AST);
			match(KW_TITLE);
			{
			_loop388:
			do {
				if (((LA(1)==KW_COLOR) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= FILEROOT && LA(3) <= JUNK)))&&( LA(1) == KW_COLOR )) {
					simple_color_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( 
             LA(1) == KW_BGCOLOR || LA(1) == KW_FGCOLOR || LA(1) == KW_DCOLOR || LA(1) == KW_FONT
           )) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop388;
				}
				
			} while (true);
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			title_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = title_phrase_AST;
	}
	
/**      
 * Matches the <code>VIEW-AS DIALOG-BOX</code> clause.
 * <p>
 * Used by {@link #frame_phrase}.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void view_as_dialog_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast view_as_dialog_clause_AST = null;
		
		try {      // for error handling
			Aast tmp526_AST = null;
			tmp526_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp526_AST);
			match(KW_VIEW_AS);
			Aast tmp527_AST = null;
			tmp527_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp527_AST);
			match(KW_DIALOG);
			view_as_dialog_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = view_as_dialog_clause_AST;
	}
	
/**
 * Matches the <code>IN WINDOW</code> clause seen in many Progress language
 * statements such as {@link #status_stmt} and {@link #pause_stmt}.
 * <p>
 * Following the keywords is a window reference which is coded here as a
 * reference to the {@link #expr} rule.  It is possible that there is some
 * window namespace processing that is needed such that named windows can
 * be referenced here. Any such processing is not handled at this time.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * <code>IN</code> keyword.
 */
	public final void in_window_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast in_window_clause_AST = null;
		
		try {      // for error handling
			Aast tmp528_AST = null;
			tmp528_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp528_AST);
			match(KW_IN);
			Aast tmp529_AST = null;
			tmp529_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp529_AST);
			match(KW_WINDOW);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			in_window_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = in_window_clause_AST;
	}
	
/**
 * Matches the <code>RETAIN, SCROLL and WIDTH</code> keywords and the required
 * following numeric or decimal literal. Note that it is undocumented that
 * Progress allows <code>WIDTH-CHARS</code> to be used as a synonym for
 * <code>WIDTH</code> in this case.  Also undocumented is the fact that the
 * <code>WIDTH-PIXELS</code> keyword can be used here.
 * <p>
 * Used by {@link #frame_phrase}.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void misc_frame_opts() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast misc_frame_opts_AST = null;
		Token  w = null;
		Aast w_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_RETAIN:
			{
				Aast tmp530_AST = null;
				tmp530_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp530_AST);
				match(KW_RETAIN);
				break;
			}
			case KW_SCROLL:
			{
				Aast tmp531_AST = null;
				tmp531_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp531_AST);
				match(KW_SCROLL);
				break;
			}
			case KW_WIDTH:
			{
				Aast tmp532_AST = null;
				tmp532_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp532_AST);
				match(KW_WIDTH);
				break;
			}
			case KW_WIDTH_C:
			{
				w = LT(1);
				w_AST = (Aast)astFactory.create(w);
				astFactory.makeASTRoot(currentAST, w_AST);
				match(KW_WIDTH_C);
				w_AST.setType(KW_WIDTH);
				break;
			}
			case KW_WIDTH_P:
			{
				Aast tmp533_AST = null;
				tmp533_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp533_AST);
				match(KW_WIDTH_P);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			numeric_literal();
			astFactory.addASTChild(currentAST, returnAST);
			misc_frame_opts_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = misc_frame_opts_AST;
	}
	
/**
 * Matches the <code>COLUMNS</code> keyword and the required <b>preceding</b>
 * numeric literal.  In order to eliminate ambiguity, this option must be used
 * after more specific alternatives and before any alternatives that are
 * less specific (only one is).  This is currently used last in the calling
 * rule {@link #frame_phrase} for this reason.
 * <p>
 * It turns out that in Progress will accept the <code>COLUMN</code> keyword 
 * in place of the <code>COLUMNS</code> keyword, even though they are
 * supposed to be different keywords (and <code>COLUMN</code> has no
 * abbreviations).
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void columns_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast columns_clause_AST = null;
		Token  c = null;
		Aast c_AST = null;
		
		try {      // for error handling
			whole_number_literal();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_COLUMNS:
			{
				Aast tmp534_AST = null;
				tmp534_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp534_AST);
				match(KW_COLUMNS);
				break;
			}
			case KW_COL:
			{
				c = LT(1);
				c_AST = (Aast)astFactory.create(c);
				astFactory.makeASTRoot(currentAST, c_AST);
				match(KW_COL);
				c_AST.setType(KW_COLUMNS);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			columns_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = columns_clause_AST;
	}
	
/**
 * Disambiguate between a {@link #loop_incr} (which always starts with an
 * {@link #lvalue}) and a {@link #down_clause} (which optionally starts with
 * an {@link #expr}). The matching in this rule is in-lined from the original
 * rules in order to left-factor the common leftmost expression construct.
 */
	public final void down_clause_or_loop_incr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast down_clause_or_loop_incr_AST = null;
		Token  d0 = null;
		Aast d0_AST = null;
		Aast e0_AST = null;
		Token  d1 = null;
		Aast d1_AST = null;
		Token  t = null;
		Aast t_AST = null;
		Aast e1_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==KW_DOWN) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				d0 = LT(1);
				d0_AST = (Aast)astFactory.create(d0);
				match(KW_DOWN);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				expr();
				e0_AST = (Aast)returnAST;
				{
				switch ( LA(1)) {
				case KW_DOWN:
				{
					d1 = LT(1);
					d1_AST = (Aast)astFactory.create(d1);
					match(KW_DOWN);
					break;
				}
				case KW_TO:
				{
					t = LT(1);
					t_AST = (Aast)astFactory.create(t);
					match(KW_TO);
					expr();
					e1_AST = (Aast)returnAST;
					{
					if ((LA(1)==KW_BY) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						by_clause();
						b_AST = (Aast)returnAST;
					}
					else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			down_clause_or_loop_incr_AST = (Aast)currentAST.root;
			
			if (d0_AST != null)
			{
			down_clause_or_loop_incr_AST = d0_AST;
			}
			else if (d1_AST != null)
			{
			down_clause_or_loop_incr_AST = (Aast)astFactory.make( (new ASTArray(2)).add(d1_AST).add(e0_AST));
			}
			else
			{
			// normally we must explicitly match an "EQUALS expression"
			// after an lvalue, in this case this is matched by the
			// expr rule and we need to transform it into the sub-tree
			// that it should have been
			
			Aast assn = e0_AST.getChildAt(0);
			assn.setType(ASSIGN);
			
			down_clause_or_loop_incr_AST = (Aast)astFactory.make( (new ASTArray(4)).add(t_AST).add(assn).add(e1_AST).add(b_AST));
			}
			
			currentAST.root = down_clause_or_loop_incr_AST;
			currentAST.child = down_clause_or_loop_incr_AST!=null &&down_clause_or_loop_incr_AST.getFirstChild()!=null ?
				down_clause_or_loop_incr_AST.getFirstChild() : down_clause_or_loop_incr_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = down_clause_or_loop_incr_AST;
	}
	
/**
 * Matches the <code>DOWN</code> keyword and the optional preceding
 * expression.  In order to eliminate ambiguity, this option must be used
 * after more specific alternatives and before any alternatives that are
 * less specific (none are).  This is currently used last in the calling
 * rule {@link #frame_phrase} for this reason.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void down_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast down_clause_AST = null;
		
		try {      // for error handling
			{
			if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_DOWN )) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_DOWN) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			Aast tmp535_AST = null;
			tmp535_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp535_AST);
			match(KW_DOWN);
			down_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = down_clause_AST;
	}
	
/**
 * Matches the <code>V6FRAME</code> keyword and the optional following
 * keywords.  ANTLR detects ambiguity due to the use of non-reserved keywords 
 * and the potential to use symbols and expressions in the k=1 construct in
 * the calling rule {@link #frame_phrase}.  To eliminate the ambiguity
 * warning, ANTLR's greedy option had to be explicitly enabled.   
 * Since greedy is the default, this doesn't change the code generation, it
 * only suppresses the warning.  <b>Note that this rule checks the k=2 
 * lookahead before matching the <code>USE-REVERSE or USE-UNDERLINE</code>
 * keywords.  This may be OK but it may also bypass the match in a case where
 * something unexpected follows the optional keyword.  Since this cannot be
 * proven for all cases, watch this code!</b>
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void version_6_frame_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast version_6_frame_clause_AST = null;
		
		try {      // for error handling
			Aast tmp536_AST = null;
			tmp536_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp536_AST);
			match(KW_V6FRAME);
			{
			switch ( LA(1)) {
			case KW_USE_REV:
			{
				Aast tmp537_AST = null;
				tmp537_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp537_AST);
				match(KW_USE_REV);
				break;
			}
			case KW_USE_UND:
			{
				Aast tmp538_AST = null;
				tmp538_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp538_AST);
				match(KW_USE_UND);
				break;
			}
			case EOF:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			version_6_frame_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = version_6_frame_clause_AST;
	}
	
/**      
 * Matches all valid filenames (relative and absolute). This rule can match
 * any lexer token in the first position and that matching will continue until
 * whitespace is encountered or if one of a specific list of excluded token
 * types is matched. Since this matching is so broad, it is highly ambiguous
 * and this rule must be placed as the last alternative in callers such that 
 * it doesn't overmatch. This means that it can conflict with literals,
 * reserved keywords, operators and any other unexpected text in a 4GL
 * program.
 * <p>
 * Token types that end the merging process:
 * <p>
 * <pre>
 *   DOT
 *   EOF
 *   LPARENS
 *   RPARENS
 * </pre>
 * <p>
 * The lexer has a <code>FILENAME</code> token but it does not have enough
 * context to differentiate the full range of filenames that are possible.
 * In Progress, when a filename is matched, the lexing changes to an approach
 * that seems to be based on whitespace. Any text at all can be matched until
 * a separate excluded token type or whitespace is encountered. This has been
 * duplicated in the init action of this rule. The <code>mergeUntilWS</code>
 * method is used to merge all the different tokens using this same approach.
 * It is called from the init action and the resulting single merged token
 * will have its type set to <code>FILENAME</code>.
 * <p>
 * The matching portion of this rule is defined as a single token that
 * matches the union of the <code>FILENAME</code> token type and the set of
 * all tokens that are not a <code>DOT</code>.
 *
 * @param    exclude
 *           Provides a list of token types to disallow from merge into a single filename
 *           node. It is OK to pass <code>null</code> (don't exclude anything additional).
 *           By default DOT and EOF are already excluded.
 */
	public final void filename(
		int[] exclude
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast filename_AST = null;
		
		try {      // for error handling
			
			mergeUntilWS(exclude);
			LT(1).setType(FILENAME);
			
			{
			if ((LA(1)==FILENAME)) {
				Aast tmp539_AST = null;
				tmp539_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp539_AST);
				match(FILENAME);
			}
			else if ((_tokenSet_96.member(LA(1)))) {
				Aast tmp540_AST = null;
				tmp540_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp540_AST);
				matchNot(DOT);
				Aast tmp541_AST = null;
				tmp541_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp541_AST);
				matchNot(DOT);
				Aast tmp542_AST = null;
				tmp542_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp542_AST);
				matchNot(DOT);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			filename_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = filename_AST;
	}
	
/**   
 * Matches the <code>COLOR</code> keyword and the required following color 
 * phrase.  Uses {@link #color_phrase}.  This is the simplified version of
 * {@link #color_spec}.
 * <p>
 * Used by {@link #put_screen_stmt} and {@link #choose_stmt}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void simple_color_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast simple_color_clause_AST = null;
		
		try {      // for error handling
			Aast tmp543_AST = null;
			tmp543_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp543_AST);
			match(KW_COLOR);
			color_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			simple_color_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_21);
		}
		returnAST = simple_color_clause_AST;
	}
	
/**   
 * Matches the <code>COLOR</code> language statement and the required
 * following color specification. This rule uses an inlined version of the
 * {@link #color_spec} with modifications to allow an empty color phrase.
 * The {@link #display_color_clause} and {@link #prompt_color_clause} rules
 * provide the bulk of the implementation.
 * <p>
 * Actual customer code shows that a {@link #format_phrase} can be placed
 * after the {@link #lvalue} used to describe each field.  In addition, at
 * the end of the statement an optional {@link #frame_phrase} is matched.
 * Although it is documented that at least 1 field (lvalue) is required,
 * customer code has shown this to be optional.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 */
	public final void color_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast color_stmt_AST = null;
		Aast fp_AST = null;
		
		try {      // for error handling
			
			Set<Aast> fields = new HashSet<>();
			
			{
			Aast tmp544_AST = null;
			tmp544_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp544_AST);
			match(KW_COLOR);
			{
			if ((LA(1)==KW_PROMPT||LA(1)==KW_PRMT_FOR) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				prompt_color_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1)==KW_DISP) && (_tokenSet_97.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
               (sym.lookupVariable(LT(2).getText()) != -1 || sym.isField(LT(2).getText())) &&
               LA(2) != KW_MESSAGES
             )) {
				Aast tmp545_AST = null;
				tmp545_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp545_AST);
				match(KW_DISP);
			}
			else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				display_color_clause();
				astFactory.addASTChild(currentAST, returnAST);
				{
				if ((LA(1)==KW_PROMPT||LA(1)==KW_PRMT_FOR)) {
					prompt_color_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_97.member(LA(1)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			color_field_list(fields);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_WITH:
			{
				frame_phrase(false, false);
				fp_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			color_stmt_AST = (Aast)currentAST.root;
			
			String frame = getFrameName(fp_AST);
			
			if (!fields.isEmpty())
			{
			sym.addFrameFields(frame, fields);
			}
			
			setUseDictExps(frame, fp_AST, color_stmt_AST);
			
			}
			color_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = color_stmt_AST;
	}
	
/**
 * Matches the <code>PROMPT color_phrase</code> construct used in a color
 * specification. This supports an undocumented Progress feature, where
 * <code>PROMPT-FOR</code> is accepted as a synonym to <code>PROMPT</code>.
 * <p>
 * Used by {@link #color_spec}.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void prompt_color_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast prompt_color_clause_AST = null;
		Token  p = null;
		Aast p_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_PROMPT:
			{
				Aast tmp546_AST = null;
				tmp546_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp546_AST);
				match(KW_PROMPT);
				break;
			}
			case KW_PRMT_FOR:
			{
				p = LT(1);
				p_AST = (Aast)astFactory.create(p);
				astFactory.makeASTRoot(currentAST, p_AST);
				match(KW_PRMT_FOR);
				p_AST.setType(KW_PROMPT);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			color_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			prompt_color_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = prompt_color_clause_AST;
	}
	
/**
 * Matches the <code>DISPLAY color_phrase</code> construct used in a color
 * specification (actually the <code>DISPLAY</code> keyword is optional).
 * <p>
 * Used by {@link #color_spec}.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 */
	public final void display_color_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast display_color_clause_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==KW_DISP) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp547_AST = null;
				tmp547_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp547_AST);
				match(KW_DISP);
			}
			else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			color_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			display_color_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = display_color_clause_AST;
	}
	
/**
 * Aggregates (in a tree building sense) the list of all fields having 
 * color(s) set by a {@link #color_stmt}.  Calls {@link #lvalue} and
 * {@link #format_phrase} and roots everything at a node of type
 * <code>CONTENT_ARRAY</code>.
 *
 * @param   fields
 *          Set into which all database field references should be stored.
 */
	public final void color_field_list(
		Set<Aast> fields
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast color_field_list_AST = null;
		Aast l_AST = null;
		
		try {      // for error handling
			
			Aast   fld        = null;
			String symbolName = null;
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(CONTENT_ARRAY,""));
			
			{
			_loop397:
			do {
				if ((_tokenSet_64.member(LA(1)))) {
					allowSymbolMatch = true;
					lvalue();
					l_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					// reset each loop iteration
					symbolName = null;
					fld        = null;
					
					if (l_AST.getType() == SYMBOL)
					{
					symbolName = l_AST.getText();
					}
					else
					{
					fld = findFieldNode(l_AST);
					if (fld != null)
					{
					fields.add(fld);
					}
					}
					
					allowSymbolMatch = false;
					
					{
					if ((_tokenSet_98.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						format_phrase(symbolName, fld, true, false);
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_97.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
				}
				else {
					break _loop397;
				}
				
			} while (true);
			}
			color_field_list_AST = (Aast)currentAST.root;
			
			if (color_field_list_AST.getNumberOfChildren() == 0)
			{
			color_field_list_AST = null;
			}
			
			currentAST.root = color_field_list_AST;
			currentAST.child = color_field_list_AST!=null &&color_field_list_AST.getFirstChild()!=null ?
				color_field_list_AST.getFirstChild() : color_field_list_AST;
			currentAST.advanceChildToEnd();
			color_field_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_99);
		}
		returnAST = color_field_list_AST;
	}
	
/**
 * Matches the color_phrase construct of the Progress 4GL language.
 * This implementation is relaxed compared to the 4GL and has the following
 * limitations:
 * <p>
 * <ul>
 *     <li>dos-hex-attributes are not supported
 *     <li>Windows color attributes are not supported
 * </ul>
 * <p>
 * Valid color specification options are these keywords: NORMAL, INPUT and
 * MESSAGES. They have a unique capacity: they can be abbreviated down to 1
 * character even though there are conflicting keywords in 4GL! This is how it
 * works.
 * <p>
 * The NORMAL keyword can be coded as anything between N and NORMAL, excluding
 * NO, which is a reserved 4GL keyword and can't be used in color-phrase.
 * <p>
 * The INPUT keyword can be coded as anything between I and INPUT, although
 * normally this keyword can't be abbreviated. There is a conflicting 4GL
 * keyword IN, but in the color-phrase it assumes the role of INPUT.
 * <p>
 * The MESSAGES keyword can be coded as anything between M and MESSAGES. There
 * is a conflicting 4GL keyword MESSAGE, which can't be abbreviated, but it
 * assumes the role of MESSAGES when used in a color-phrase.
 * <p>
 * This explains why one sees KW_IN and KW_MSG as alternatives in this rule.
 * In both cases, the token type is converted to the originally required type.
 * The KW_INPUT, KW_NORMAL and KW_MESSAGES are defined as having no 
 * abbreviations, otherwise they would conflict with many other keywords.
 * Instead, this rule checks to see if SYMBOL type tokens (which abbreviations
 * are) represent a valid abbreviation and sets the token type explicitly.
 * <p>
 * Customer source has shown that reserved keywords such as 
 * <code>UNDERLINE</code> can be found in a color phrase (this is
 * undocumented by Progress and is currently supported on a case by case
 * basis.
 * <p>
 * Note that ANTLR reports ambiguity for this rule. This is due to the call to
 * protermcap, which ultimately calls the symbol rule. This conflicts with
 * the color_spec rule where KW_PROMPT designates the optional part. This
 * ambiguity is in ANTLR logic only. There is no ambiguity in the generated
 * code. For this reason, ambiguity warnings are suppressed for this rule.
 * <p>
 * This rule is called from {@link #color_spec} rule.
 */
	public final void color_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast color_phrase_AST = null;
		Token  i = null;
		Aast i_AST = null;
		Token  m = null;
		Aast m_AST = null;
		Aast s_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(COLOR_PHRASE,""));
			
			// DOT and EOF are hard coded in the worker routine
			int[] exclude = new int[]
			{
			LPARENS,
			RPARENS
			};
			
			{
			if ((LA(1)==KW_VALUE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				value();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_NORMAL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp548_AST = null;
				tmp548_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp548_AST);
				match(KW_NORMAL);
			}
			else if ((LA(1)==KW_IN||LA(1)==KW_INPUT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				switch ( LA(1)) {
				case KW_INPUT:
				{
					Aast tmp549_AST = null;
					tmp549_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp549_AST);
					match(KW_INPUT);
					break;
				}
				case KW_IN:
				{
					i = LT(1);
					i_AST = (Aast)astFactory.create(i);
					astFactory.addASTChild(currentAST, i_AST);
					match(KW_IN);
					i_AST.setType(KW_INPUT);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((LA(1)==KW_MSG||LA(1)==KW_MESSAGES) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				switch ( LA(1)) {
				case KW_MESSAGES:
				{
					Aast tmp550_AST = null;
					tmp550_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp550_AST);
					match(KW_MESSAGES);
					break;
				}
				case KW_MSG:
				{
					m = LT(1);
					m_AST = (Aast)astFactory.create(m);
					astFactory.addASTChild(currentAST, m_AST);
					match(KW_MSG);
					m_AST.setType(KW_MESSAGES);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				filename(exclude);
				s_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				String t = s_AST.getText().toLowerCase();
				
				if ("normal".startsWith(t))
				{
				s_AST.setType(KW_NORMAL); 
				}
				else if ("input".startsWith(t))
				{
				s_AST.setType(KW_INPUT); 
				}
				else if ("messages".startsWith(t))
				{
				s_AST.setType(KW_MESSAGES);
				}
				else
				{
				s_AST.setType(SYMBOL);
				}
				
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			color_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = color_phrase_AST;
	}
	
/**
 * Matches the <code>VALUE( expression )</code> construct which converts
 * an expression into a symbol-like result (example: a type of name).  This is
 * used in many locations such as {@link #color_phrase} and {@link #run_stmt}.
 * <p>
 * Working 4GL code has shown that unquoted text can be present here instead
 * of a valid expression. Progress seems to treat that as if the text was
 * a quoted string literal.  This undocumented feature is supported here by
 * setting a flag to allow a symbol match in the expression processing.
 * <p>
 * Separating this allows the AST to be built cleanly and also centralizes
 * the logic for reuse.
 */
	public final void value() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast value_AST = null;
		
		try {      // for error handling
			allowSymbolMatch = true;
			Aast tmp551_AST = null;
			tmp551_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp551_AST);
			match(KW_VALUE);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			allowSymbolMatch = false;
			value_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = value_AST;
	}
	
/**
 * Matches the column format phrase construct of the Progress 4GL language
 * which is used in a <code>DEFINE BROWSE</code>. All of its options can be
 * specified in any order.  This is generally a subset of the normal
 * {@link #format_phrase}, however there is one case that can be matched
 * here (<code>KW_WIDTH</code>) that cannot be matched in a format phrase.
 * <p>
 * This rule is separate since there is only a small subset of the possible
 * choices that can be matched, this reduces ambiguity.  Note that the result
 * is still rooted at a <code>FORMAT_PHRASE</code> node.
 * <p>
 * The following list of rules are called to properly implement the tree
 * building:
 * <p>
 * <ul>
 *    <li> {@link #label}
 *    <li> {@link #misc_frame_opts} (for the WIDTH, WIDTH-CHARS and WIDTH-PIXELS constructs only,
 *         the WIDTH-CHARS and WIDTH-PIXELS options are undocumented but were found in customer
 *         source)
 *    <li> {@link #ui_stuff}
 *    <li> {@link #column_label}
 *    <li> {@link #at_base_field_clause}
 *    <li> {@link #view_as_phrase}
 * </ul>
 * <p>
 * We have disabled ambiguity warnings because there is no real issue with
 * the <code>ui_stuff</code>.
 * <p>
 * The '@' base_field clause (accessed via <code>at_base_field_clause</code>)
 * is not documented as part of this phrase but customer examples show that
 * this can be embedded inside one.  To simplify logic, this has been merged.
 * <p> 
 * Called from {@link #column_spec}.
 */
	public final void column_format_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast column_format_phrase_AST = null;
		
		try {      // for error handling
			
			String bogus = null;
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(FORMAT_PHRASE,""));
			
			{
			_loop429:
			do {
				if ((LA(1)==KW_LABEL||LA(1)==KW_NO_LABEL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_LABEL:
					{
						label(false);
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_NO_LABEL:
					{
						Aast tmp552_AST = null;
						tmp552_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp552_AST);
						match(KW_NO_LABEL);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if (((_tokenSet_67.member(LA(1))) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_WIDTH || LA(1) == KW_WIDTH_C || LA(1) == KW_WIDTH_P )) {
					misc_frame_opts();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
             LA(1) == KW_COL_BGC  || LA(1) == KW_COL_DC  || LA(1) == KW_COL_FGC || LA(1) == KW_COL_FONT || 
             LA(1) == KW_COL_PFC  || LA(1) == KW_LAB_BGC || LA(1) == KW_LAB_DC  || LA(1) == KW_LAB_FGC  ||  
             LA(1) == KW_LAB_FONT || LA(1) == KW_LAB_PFC
            )) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_FORMAT) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					format_string(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_COL_LAB) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					column_label();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_HYPERLNK) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					hyperlink_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NO_EH_SR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp553_AST = null;
					tmp553_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp553_AST);
					match(KW_NO_EH_SR);
				}
				else if ((LA(1)==KW_NO_EH_FL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp554_AST = null;
					tmp554_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp554_AST);
					match(KW_NO_EH_FL);
				}
				else if ((LA(1)==AT) && (_tokenSet_64.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					bogus=at_base_field_clause(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_VIEW_AS) && (_tokenSet_56.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					view_as_phrase(null);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop429;
				}
				
			} while (true);
			}
			column_format_phrase_AST = (Aast)currentAST.root;
			
			// safety first since this rule can have everything be optional
			if (column_format_phrase_AST.getNumberOfChildren() == 0)
			{
			// get rid of the artificial root we previously created
			column_format_phrase_AST = null;
			}
			
			currentAST.root = column_format_phrase_AST;
			currentAST.child = column_format_phrase_AST!=null &&column_format_phrase_AST.getFirstChild()!=null ?
				column_format_phrase_AST.getFirstChild() : column_format_phrase_AST;
			currentAST.advanceChildToEnd();
			column_format_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = column_format_phrase_AST;
	}
	
/**
 * Matches the phrase which specifies which columns in the 
 * {@link #column_spec} are enabled for input (always is preceded by the
 * <code>ENABLE</code> keyword).
 * <p>
 * Calls {@link #browse_all_list}, {@link #lvalue}, {@link #help_string}
 * and {@link #validate}.
 *
 * @param    enabledFields
 *           A set to collect the fully qualified field names which are enabled.
 * @param    exceptFields
 *           A set to collect the fully qualified field names which are excepted from enable.
 */
	public final void browse_enable_phrase(
		Set<String> enabledFields, Set<String> exceptFields
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast browse_enable_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp555_AST = null;
			tmp555_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp555_AST);
			match(KW_ENABLE);
			{
			if ((LA(1)==KW_ALL)) {
				browse_all_list(exceptFields);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_64.member(LA(1)))) {
				{
				int _cnt419=0;
				_loop419:
				do {
					if ((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						column_ref(enabledFields);
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						if ( _cnt419>=1 ) { break _loop419; } else {throw new NoViableAltException(LT(1), getFilename());}
					}
					
					_cnt419++;
				} while (true);
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			browse_enable_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = browse_enable_phrase_AST;
	}
	
/**      
 * Matches the shorthand of specifying all fields (and optional exclude list
 * of fields) instead of an explicit field list, in the 
 * {@link #browse_enable_phrase} rule.  Uses {@link #except_list}.
 * <p>
 * This rule is naturally greedy (in matching a list of field names to
 * exclude, and doing so in a loop. ANTLR warns that this causes ambiguity. 
 * The greedy option is used to tell ANTLR to disable the warning, though it
 * has no impact on the actual code generation.
 * <p>
 * Separated from the main rule to properly build the AST without complexity.
 * This is the only reason such a simple rule is implemented separately.
 *
 * @param    exceptFields
 *           A set to collect the fully qualified field names.
 */
	public final void browse_all_list(
		Set<String> exceptFields
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast browse_all_list_AST = null;
		
		try {      // for error handling
			Aast tmp556_AST = null;
			tmp556_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp556_AST);
			match(KW_ALL);
			{
			if ((LA(1)==KW_EXCEPT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				except_list(exceptFields);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			browse_all_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = browse_all_list_AST;
	}
	
/**
 * Defines one column element in a list of columns to enable in the 
 * {@link #browse_enable_phrase}.  Returns a node of type 
 * <code>COLUMN_REF</code> and uses {@link #lvalue}, {@link #help_string}
 * and {@link #validate} rule references.
 
 * @param    enabledFields
 *           A set to collect the fully qualified field names which are enabled.
 */
	public final void column_ref(
		Set<String> enabledFields
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast column_ref_AST = null;
		Aast l_AST = null;
		Aast v_AST = null;
		
		try {      // for error handling
			boolean schem = false;
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(COLUMN_REF,"column ref"));
			{
			lvalue();
			l_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			schem = l_AST.getType() > BEGIN_FIELDTYPES && l_AST.getType() < END_FIELDTYPES;
			
			if (schem)
			{
			enabledFields.add((String) l_AST.getAnnotation("schemaname"));
			}
			
			{
			_loop423:
			do {
				if ((LA(1)==KW_HELP) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					help_string();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_VALIDATE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
					validate(schem ? (String) l_AST.getAnnotation("schemaname") : null);
					v_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_AUTO_RET) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp557_AST = null;
					tmp557_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp557_AST);
					match(KW_AUTO_RET);
				}
				else if ((LA(1)==KW_DIS_A_ZA) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp558_AST = null;
					tmp558_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp558_AST);
					match(KW_DIS_A_ZA);
				}
				else {
					break _loop423;
				}
				
			} while (true);
			}
			}
			column_ref_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = column_ref_AST;
	}
	
/**
 * Matches the <code>HYPERLINK event-name</code> clause (FWD extension). Used in the
 * {@link #column_format_phrase}.
 */
	public final void hyperlink_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast hyperlink_clause_AST = null;
		
		try {      // for error handling
			Aast tmp559_AST = null;
			tmp559_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp559_AST);
			match(KW_HYPERLNK);
			Aast tmp560_AST = null;
			tmp560_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp560_AST);
			match(STRING);
			hyperlink_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = hyperlink_clause_AST;
	}
	
/**
 * Matches the <code>ROW-HEIGHT-CHARS and ROW-HEIGHT-PIXELS</code> construct
 * with its required following integer constant.  Used in the
 * {@link #browse_options_phrase}.
 * <p>
 * Separating this allows the AST to be built cleanly and also centralizes
 * the logic for reuse.
 */
	public final void row_height_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast row_height_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_ROW_H_C:
			{
				Aast tmp561_AST = null;
				tmp561_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp561_AST);
				match(KW_ROW_H_C);
				break;
			}
			case KW_ROW_H_P:
			{
				Aast tmp562_AST = null;
				tmp562_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp562_AST);
				match(KW_ROW_H_P);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			numeric_literal();
			astFactory.addASTChild(currentAST, returnAST);
			row_height_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = row_height_clause_AST;
	}
	
/**
 * Matches the <code>INITIAL</code> keyword and the required single literal
 * or a left/right bracket bounded (and comma separated) list of literals.
 * Used by {@link #def_var_stmt} and the subtree is rooted by the 
 * <code>INITIAL</code> keyword.  Note that the commas are dropped from the
 * resulting AST to simplify processing.
 * <p>
 * A special case exists for the <code>TODAY</code> keyword. Normally,
 * an initializer would only accept a {@link #literal} but for variables
 * of type <code>DATE</code>, the <code>TODAY</code> 'function' can also
 * be used.  To accomodate this requirement, the {@link #initializer_constant} 
 * rule is called.
 * <p>
 * No testing is done to check the type(s) of the literal(s) against the 
 * expected type as set by the AS or LIKE clause.
 * <p>
 * A count is returned, so that the case where an extent does not have a constant
 * still allows for the extent to become fixed.
 *
 * @param    vtype
 *           A token type that describes type of the variable being initialized. This is
 *           the type of the child of the <code>KW_AS</code> or <code>KW_LIKE</code> node.
 *
 * @return   The count of the number of initializers.
 */
	public final int  initializer(
		int vtype
	) throws RecognitionException, TokenStreamException {
		int count = 1;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast initializer_AST = null;
		Token  lb = null;
		Aast lb_AST = null;
		Token  rb = null;
		Aast rb_AST = null;
		
		try {      // for error handling
			Aast tmp563_AST = null;
			tmp563_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp563_AST);
			match(KW_INIT);
			{
			if ((_tokenSet_100.member(LA(1)))) {
				initializer_constant(vtype);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==LBRACKET)) {
				lb = LT(1);
				lb_AST = (Aast)astFactory.create(lb);
				match(LBRACKET);
				hide(lb);
				initializer_constant(vtype);
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop1100:
				do {
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						initializer_constant(vtype);
						astFactory.addASTChild(currentAST, returnAST);
						count++;
					}
					else {
						break _loop1100;
					}
					
				} while (true);
				}
				rb = LT(1);
				rb_AST = (Aast)astFactory.create(rb);
				match(RBRACKET);
				hide(rb);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			initializer_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = initializer_AST;
		return count;
	}
	
/**   
 * Matches the <code>DECIMALS</code> keyword and the required following
 * integer literal. Used by {@link #def_var_stmt} and the subtree is rooted by
 * the keyword (which is the reason for using a separate rule for something so
 * simple).
 */
	public final void decimals_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast decimals_clause_AST = null;
		
		try {      // for error handling
			Aast tmp564_AST = null;
			tmp564_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp564_AST);
			match(KW_DECIMALS);
			whole_number_literal();
			astFactory.addASTChild(currentAST, returnAST);
			decimals_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = decimals_clause_AST;
	}
	
/**
 * Matches the <code>CASE-SENSITIVE</code> keyword with the optional
 * preceeding <code>NOT</code> keyword. Separated to enhance the tree build. 
 * <p>
 * Called by {@link #regular_parm}, {@link #temp_table_field_options} and
 * {@link #def_var_stmt}. 
 */
	public final void case_sensitive() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast case_sensitive_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_NOT:
			{
				Aast tmp565_AST = null;
				tmp565_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp565_AST);
				match(KW_NOT);
				break;
			}
			case KW_CASE_SEN:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			Aast tmp566_AST = null;
			tmp566_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp566_AST);
			match(KW_CASE_SEN);
			case_sensitive_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = case_sensitive_AST;
	}
	
/**
 * Matches all forms of inner blocks (nestable blocks - not procedures and
 * not functions) including <code>DO</code>, <code>REPEAT</code> and
 * <code>FOR</code>.
 * <p>
 * As all 3 of these language statements can end with a <code>COLON</code>
 * or a <code>DOT</code>, this rule implements this match in common code.
 * <p>
 * The core of this rule specifies multiple alternatives that match the
 * Progress language statements <code>DO, REPEAT</code>
 * ({@link #do_repeat_stmt}) and <code>FOR</code> ({@link #for_stmt}).
 * <p>
 * This rule also matches the <code>EDITING</code> keyword and allows this
 * rule to be used as the editing phrase.  This works because the calling
 * rule (<code>inner_block</code>) is identical in syntax to the editing
 * block. Note that a minor drawback to this approach is that no error
 * is thrown if someone tries to use an editing phrase in the top level of 
 * a Progress program, although this would not be valid Progress source.
 * <p>
 * These required keywords should provide the differentiation needed to
 * eliminate the ambiguity that is generated by having the optional 
 * <code>symbol</code> reference as the first token, <b>however it turns out
 * that the generated ANTLR code is not smart enough to handle this.</b>
 * Instead the {@link #block} top-level rule has a semantic predicate that
 * reimplements the dependencies implemented by this rule's logic.
 * <p>
 * Called by {@link #inner_block}.
 */
	public final void block_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast block_list_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_DO:
			case KW_REPEAT:
			{
				do_repeat_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_FOR:
			{
				for_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_EDITING:
			{
				Aast tmp567_AST = null;
				tmp567_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp567_AST);
				match(KW_EDITING);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			block_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = block_list_AST;
	}
	
/**   
 * Matches both <code>DO</code> and <code>REPEAT</code> Progress 4GL language
 * statements.  This is possible because other than the primary (leftmost)
 * keyword being different (<code>DO</code> versus <code>REPEAT</code>), the  
 * structure of the 2 statements is syntactically identical. The meaning of
 * the 2 statements is different but this does not affect parsing at all.
 * <p>
 * All possible common clauses between this rule and {@link #for_stmt}
 * have been factored into {@link #common_block_options}.
 * <p>
 * In fact, if it were not for some small but meaningful differences, there
 * could have been a common rule for all 3 inner block statements.
 * <p>
 * Called by {@link #block_list}.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * Uses the following rules:
 * {@link #for_record_spec}
 * {@link #preselect_phrase}
 * {@link #common_block_options}
 */
	public final void do_repeat_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast do_repeat_stmt_AST = null;
		
		try {      // for error handling
			
			Aast node = null;
			Aast loop = null;
			
			{
			switch ( LA(1)) {
			case KW_DO:
			{
				Aast tmp568_AST = null;
				tmp568_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp568_AST);
				match(KW_DO);
				break;
			}
			case KW_REPEAT:
			{
				Aast tmp569_AST = null;
				tmp569_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp569_AST);
				match(KW_REPEAT);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop473:
			do {
				if ((LA(1)==KW_FOR) && (_tokenSet_13.member(LA(2))) && (_tokenSet_101.member(LA(3)))) {
					for_record_spec(false, true, true);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_PRESEL) && (_tokenSet_102.member(LA(2))) && (_tokenSet_103.member(LA(3)))) {
					preselect_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_85.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					node=common_block_options();
					astFactory.addASTChild(currentAST, returnAST);
					
					// node is replaced every time through the loop so we must
					// cache off the first non-null result for post-processing
					if (loop == null && node != null)
					{
					loop = node;
					}
					
				}
				else {
					break _loop473;
				}
				
			} while (true);
			}
			do_repeat_stmt_AST = (Aast)currentAST.root;
			
			// implement any deferred tree processing for a mis-matched loop
			// increment sub-tree
			if (loop != null)
			{
			do_repeat_stmt_AST.addChild(loop);
			}
			
			sym.endIndexFieldSearch();
			
			do_repeat_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_32);
		}
		returnAST = do_repeat_stmt_AST;
	}
	
/**   
 * Matches <code>FOR</code> Progress 4GL language statement.
 * <p>
 * All possible common clauses between this rule and {@link #do_repeat_stmt}
 * have been factored into {@link #common_block_options}.
 * <p>
 * In fact, if it were not for some small but meaningful differences,
 * there could have been a common rule for all 3 inner block statements.
 * In particular, a variant of the {@link #preselect_phrase} rule that is
 * used by the <code>do_repeat_stmt</code> is inlined in here.  The
 * inline grammar differs in that there is no <code>preselect</code> keyword.
 * <p>
 * Called by {@link #block_list}.
 * <p>
 * Uses {@link #each_first_last_spec} to implement a common record phrase
 * list.
 */
	public final void for_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast for_stmt_AST = null;
		
		try {      // for error handling
			
			Aast node = null;
			Aast loop = null;
			
			Aast tmp570_AST = null;
			tmp570_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp570_AST);
			match(KW_FOR);
			each_first_last_spec(true, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop476:
			do {
				if ((_tokenSet_85.member(LA(1)))) {
					node=common_block_options();
					astFactory.addASTChild(currentAST, returnAST);
					
					// node is replaced every time through the loop so we must
					// cache off the first non-null result for post-processing
					if (loop == null && node != null)
					{
					loop = node;
					}
					
				}
				else {
					break _loop476;
				}
				
			} while (true);
			}
			for_stmt_AST = (Aast)currentAST.root;
			
			// implement any deferred tree processing for a mis-matched loop
			// increment sub-tree
			if (loop != null)
			{
			for_stmt_AST.addChild(loop);
			}
			
			sym.endIndexFieldSearch();
			
			for_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_32);
		}
		returnAST = for_stmt_AST;
	}
	
/**
 * This is a simple (flat) list of alternatives for all language statements
 * that do not have anything to do with a starting or ending a Progress 4GL
 * block.  It is critical that each alternative in this list be properly
 * defined such that there is no unresolved ambiguity OR such that the
 * alternatives can be ordered so that ANTLR can eliminate ambiguity by
 * using standard lookahead (see options starting with create or delete). 
 * Any single word language statement should appear after any language
 * statement that starts with the same keyword but then has a 2nd required
 * keyword by which the two can be differentiated.
 * <p>
 * Although ANTLR properly handles the ambiguity of statements that start 
 * with common keywords like <code>CREATE</code> (assuming they are ordered
 * more specific to less specific), it still can detect ambiguity.  For this
 * reason, ambiguity warnings have been disabled.  <b>As statements are
 * added to this rule it is critical that the actual logic be reviewed to
 * ensure that no real ambiguity has been added.</b> 
 * <p>
 * Simple (single keyword, no options, no data or expressions) language
 * statements are implemented 'in-line' in this rule.  All statements
 * simple or rule references) are listed alphabetically unless there is a
 * need to avoid ambiguity.  
 * <p>
 * This rule seems to be where the statement-ending <code>DOT</code> should
 * be matched.  However, there are locations such as {@link #if_stmt} and
 * {@link #case_stmt} that don't easily fit into this plan.  So the end of
 * statement delimiter is coded in each statement separately.
 * <p>
 * Do NOT put an <code>END</code> statement into this list.  The nested
 * nature of the grammar's block structure is only possible because the
 * <code>END</code> statement is only found at the end of a block.  This
 * allows the ends of blocks to be identified since any loop that is
 * matching statements, assignments... will naturally stop when it hits
 * an end statement.  See {@link #single_block}.
 * <p>
 * Called by {@link #statement}.
 */
	public final void stmt_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast stmt_list_AST = null;
		Token  p = null;
		Aast p_AST = null;
		Token  ev = null;
		Aast ev_AST = null;
		
		try {      // for error handling
			
			if (isUserDefFunctionCall(LT(1), LT(2)))
			{
			return;
			}
			
			CommonToken next  = (CommonToken) LT(1);
			CommonToken after = (CommonToken) LT(2);
			
			// RUN stmt filenames that start with a DOT need some processing here to allow
			// matching run_stmt below
			if (next  != null && next.getType()  == KW_RUN &&
			after != null && after.getType() == DOT    &&
			!followedByWhitespace(after))
			{
			// rewrite the type of the token to enable matching/merging in run_stmt
			after.setType(SYMBOL);
			}
			
			{
			switch ( LA(1)) {
			case KW_ACCUM:
			{
				accumulate_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_APPLY:
			{
				apply_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_ASSIGN:
			{
				assign_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_BELL:
			{
				Aast tmp571_AST = null;
				tmp571_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp571_AST);
				match(KW_BELL);
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_BLK_LVL:
			{
				block_level_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_BUF_COMP:
			case KW_BUF_COPY:
			{
				buffer_compare_or_copy_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_CALL:
			{
				call_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_CASE:
			{
				case_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_CATCH:
			{
				catch_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_CHOOSE:
			{
				choose_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_CLEAR:
			{
				clear_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_COMPILE:
			{
				compile_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_CONN:
			{
				connect_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_CPY_LOB:
			{
				copy_lob_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DEFINE:
			{
				define_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DICT:
			{
				Aast tmp572_AST = null;
				tmp572_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp572_AST);
				match(KW_DICT);
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DISCONN:
			{
				disconnect_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DISP:
			{
				display_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_EMPTY:
			{
				empty_temp_table_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_ENABLE:
			{
				enable_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_EXPORT:
			{
				export_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_FINALLY:
			{
				finally_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_FIND:
			{
				find_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_FORMAT:
			{
				form_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_GET:
			{
				get_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_GET_K_V:
			{
				get_key_value_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_HIDE:
			{
				hide_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_IF:
			{
				if_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_IMPORT:
			{
				import_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_INPUT:
			case KW_IN_OUT:
			case KW_OUTPUT:
			{
				io_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_LOAD:
			{
				load_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_MSG:
			{
				msg_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_LEAVE:
			case KW_NEXT:
			{
				next_or_leave_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_NEXT_PMT:
			{
				next_prompt_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_ON:
			{
				on_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_OS_APPND:
			case KW_OS_COPY:
			case KW_OS_REN:
			{
				os_misc_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_OS_MKDIR:
			{
				os_create_dir_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_OS_DEL:
			{
				os_delete_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_PAGE:
			{
				page_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_PAUSE:
			{
				pause_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_PROCESS:
			{
				p = LT(1);
				p_AST = (Aast)astFactory.create(p);
				astFactory.makeASTRoot(currentAST, p_AST);
				match(KW_PROCESS);
				p_AST.setType(PROCESS_EVENTS);
				ev = LT(1);
				ev_AST = (Aast)astFactory.create(ev);
				match(KW_EVENTS);
				hide(ev);
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_PUBLISH:
			{
				publish_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_PUT_K_V:
			{
				put_key_value_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_QUIT:
			{
				Aast tmp573_AST = null;
				tmp573_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp573_AST);
				match(KW_QUIT);
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_RAW_TRAN:
			{
				raw_transfer_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_READKEY:
			{
				readkey_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_REPOS:
			{
				reposition_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_RETURN:
			{
				return_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_ROUTINEL:
			{
				routine_level_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SAVE:
			{
				save_cache_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SCROLL:
			{
				scroll_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SEEK:
			{
				seek_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_BTOS:
			case KW_CTOS:
			case KW_DOS:
			case KW_OS2:
			case KW_OS_CMD:
			case KW_UNIX:
			case KW_VMS:
			{
				shell_command_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SHOW_ST:
			{
				Aast tmp574_AST = null;
				tmp574_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp574_AST);
				match(KW_SHOW_ST);
				{
				switch ( LA(1)) {
				case KW_CLEAR:
				{
					Aast tmp575_AST = null;
					tmp575_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp575_AST);
					match(KW_CLEAR);
					break;
				}
				case DOT:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_STOP:
			{
				Aast tmp576_AST = null;
				tmp576_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp576_AST);
				match(KW_STOP);
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_STATUS:
			{
				status_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SUBSCRIB:
			{
				subscribe_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SYS_HELP:
			{
				system_help_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_TRIGGER:
			{
				trigger_procedure_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_TRAN_MOD:
			{
				transaction_mode_auto_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_UNDERLIN:
			{
				underline_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_UNDO:
			{
				undo_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_UNLOAD:
			{
				unload_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_UNSUBSCR:
			{
				unsubscribe_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DOWN:
			case KW_UP:
			{
				up_or_down_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_USE:
			{
				use_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_USING:
			{
				using_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_VALIDATE:
			{
				validate_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_VIEW:
			{
				view_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_EXC_LOCK:
			case KW_NO_LOCK:
			case KW_SH_LOCK:
			{
				empty_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_OPEN_URL:
			{
				p2j_open_url_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_OPENMIME:
			{
				open_mime_resource_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_WEB_FUP:
			{
				web_file_upload_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
				if ((LA(1)==KW_CLOSE) && (LA(2)==KW_QUERY) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
					close_query_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CLOSE) && (LA(2)==KW_STORPROC) && (_tokenSet_27.member(LA(3)))) {
					close_stored_proc_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1)==KW_COLOR))&&( LA(1) == KW_COLOR )) {
					color_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_ALIAS) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
					create_alias_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_BROWSE) && (_tokenSet_85.member(LA(3)))) {
					create_browse_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_BUFFER) && (_tokenSet_85.member(LA(3)))) {
					create_buffer_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_CALL) && (_tokenSet_85.member(LA(3)))) {
					create_call_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_CLNT_PRL) && (_tokenSet_85.member(LA(3)))) {
					create_client_principal_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_DATABASE) && (_tokenSet_24.member(LA(3)))) {
					create_database_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_DATASET) && (_tokenSet_85.member(LA(3)))) {
					create_dataset_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_DATA_SRC) && (_tokenSet_85.member(LA(3)))) {
					create_datasource_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_QUERY) && (_tokenSet_85.member(LA(3)))) {
					create_query_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_SAX_ATTR||LA(2)==KW_SAX_READ||LA(2)==KW_SAX_WRIT) && (_tokenSet_85.member(LA(3)))) {
					create_sax_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_SERVER) && (_tokenSet_85.member(LA(3)))) {
					create_server_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_SOAP_HDR) && (_tokenSet_85.member(LA(3)))) {
					create_soap_header_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_SOAP_HER) && (_tokenSet_85.member(LA(3)))) {
					create_soap_header_entryref_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_SRV_SOCK||LA(2)==KW_SOCKET) && (_tokenSet_85.member(LA(3)))) {
					create_socket_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_TEMP_TAB) && (_tokenSet_85.member(LA(3)))) {
					create_temp_table_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_WID_POOL) && (_tokenSet_21.member(LA(3)))) {
					create_widget_pool_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_X_DOC||LA(2)==KW_X_NODE) && (_tokenSet_85.member(LA(3)))) {
					create_xml_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1)==KW_CREATE) && (_tokenSet_13.member(LA(2))) && (LA(3)==DOT||LA(3)==KW_NO_ERROR||LA(3)==KW_USING))&&( sym.isTable(LT(2).getText()) )) {
					create_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					create_widget_or_object_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DDE) && (LA(2)==KW_ADVISE)) {
					dde_advise_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DDE) && (LA(2)==KW_EXECUTE)) {
					dde_execute_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DDE) && (LA(2)==KW_GET)) {
					dde_get_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DDE) && (LA(2)==KW_INITIATE)) {
					dde_initiate_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DDE) && (LA(2)==KW_REQUEST)) {
					dde_request_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DDE) && (LA(2)==KW_SEND)) {
					dde_send_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DDE) && (LA(2)==KW_TERMINAT)) {
					dde_terminate_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DELETE) && (LA(2)==KW_ALIAS) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
					delete_alias_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DELETE) && (LA(2)==KW_OBJECT) && (_tokenSet_24.member(LA(3)))) {
					delete_object_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DELETE) && (LA(2)==KW_PROC) && (_tokenSet_24.member(LA(3)))) {
					delete_procedure_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DELETE) && (LA(2)==KW_WIDGET) && (_tokenSet_85.member(LA(3)))) {
					delete_widget_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DELETE) && (LA(2)==KW_WID_POOL) && (_tokenSet_21.member(LA(3)))) {
					delete_widget_pool_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DELETE) && (_tokenSet_13.member(LA(2))) && (LA(3)==DOT||LA(3)==KW_NO_ERROR||LA(3)==KW_VALIDATE)) {
					delete_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DISABLE) && (LA(2)==KW_TRIGGERS)) {
					disable_triggers_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DISABLE) && (_tokenSet_104.member(LA(2)))) {
					disable_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_INSERT) && (_tokenSet_13.member(LA(2))) && (_tokenSet_105.member(LA(3)))) {
					insert_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_OPEN) && (LA(2)==KW_QUERY) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
					open_query_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_PUT) && (LA(2)==KW_SCREEN) && (_tokenSet_21.member(LA(3)))) {
					put_screen_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_PUT) && (LA(2)==KW_CURSOR) && (_tokenSet_106.member(LA(3)))) {
					put_cursor_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_PUT) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					put_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_RELEASE) && (LA(2)==KW_EXTERN) && (_tokenSet_24.member(LA(3)))) {
					release_external_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_RELEASE) && (LA(2)==KW_OBJECT) && (_tokenSet_24.member(LA(3)))) {
					release_object_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_RELEASE) && (_tokenSet_13.member(LA(2))) && (LA(3)==DOT||LA(3)==KW_NO_ERROR)) {
					release_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_RUN) && (LA(2)==KW_STORPROC) && (_tokenSet_27.member(LA(3)))) {
					run_stored_proc_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_RUN) && (LA(2)==KW_SUPER) && (LA(3)==DOT||LA(3)==KW_NO_ERROR||LA(3)==LPARENS)) {
					run_super_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_RUN) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					run_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_107.member(LA(1))) && (_tokenSet_82.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					set_or_update_or_prompt_for_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1)==KW_SUPER))&&( constStmts > 0 )) {
					super_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SYS_DLG) && (LA(2)==KW_COLOR)) {
					system_dialog_color_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SYS_DLG) && (LA(2)==KW_FONT)) {
					system_dialog_font_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SYS_DLG) && (LA(2)==KW_GET_DIR)) {
					system_dialog_get_dir_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SYS_DLG) && (LA(2)==KW_GET_FILE)) {
					system_dialog_get_file_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SYS_DLG) && (LA(2)==KW_PRT_SET)) {
					system_dialog_printer_setup_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1)==KW_THIS_OBJ))&&( constStmts > 0 )) {
					this_object_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1)==KW_WAIT_FOR||LA(1)==KW_WAIT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&(
              (sym.canLoadClass(LT(2).getText())             ||
               isObjectType(resolveLvalueCoreType(2, false)) ||
               LA(2) == KW_THIS_OBJ                          ||
               LA(2) == KW_SUPER)                                          &&
               LA(3) == COLON                                              &&
               !followedByWhitespace(LT(3))
           )) {
					wait_for_dotnet_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_WAIT_FOR||LA(1)==KW_WAIT) && (_tokenSet_108.member(LA(2))) && (_tokenSet_109.member(LA(3)))) {
					wait_for_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_110.member(LA(1))) && (_tokenSet_111.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					embedded_sql();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = stmt_list_AST;
	}
	
/**   
 * Matches the <code>ACCUMULATE</code> language statement.  Calls the {@link #expr} and an
 * {@link #aggregate_phrase}.  It is an undocmented feature of the the 4GL that the aggregate phrase is
 * optional.  Another undocumented feature of the 4GL is that there can be an optional {@link #format_string}
 * rule to follow the aggregate phrase.
 * <p>
 * Depending on the accumulator type there is an undocumented feature of the 4GL where the data can be
 * read and even assigned directly as an lvalue!  The parser creates variables to match this feature.
 * <p>
 * <pre>
 * Accumulator Type      Variable Name    Variable Type
 * ------------------    -------------    -------------
 * KW_COUNT              count             VAR_INT
 * KW_SUB_CNT            count             VAR_INT
 * KW_TOTAL              total             VAR_DEC
 * KW_SUB_TOT            total             VAR_DEC
 * KW_MIN                min               VAR_DEC
 * KW_SUB_MIN            min               VAR_DEC
 * KW_MAX                max               VAR_DEC
 * KW_SUB_MAX            max               VAR_DEC
 * KW_AVERAGE            avg               VAR_DEC
 * KW_SUB_AVG            avg               VAR_DEC
 * </pre>
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void accumulate_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast accumulate_stmt_AST = null;
		Aast a_AST = null;
		
		try {      // for error handling
			Aast tmp577_AST = null;
			tmp577_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp577_AST);
			match(KW_ACCUM);
			{
			int _cnt712=0;
			_loop712:
			do {
				if ((_tokenSet_24.member(LA(1)))) {
					{
					if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&(
               preScanPass == 0 || !sym.isField(LT(1).getText())
            )) {
						expr();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
						lvalue();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					{
					if ((LA(1)==LPARENS) && (_tokenSet_75.member(LA(2))) && (_tokenSet_112.member(LA(3)))) {
						lparens();
						astFactory.addASTChild(currentAST, returnAST);
						aggregate_phrase();
						a_AST = (Aast)returnAST;
						astFactory.addASTChild(currentAST, returnAST);
						rparens();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					{
					if ((LA(1)==KW_FORMAT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
						format_string(false);
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
				}
				else {
					if ( _cnt712>=1 ) { break _loop712; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt712++;
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			
			if (a_AST != null)
			{
			Aast child = a_AST.getChildAt(0);
			int  ttype = child.getType();
			
			if (ttype == KW_COUNT || ttype == KW_SUB_CNT)
			{
			sym.addAccumVariable("count", VAR_INT);
			}
			else if (ttype == KW_TOTAL || ttype == KW_SUB_TOT)
			{
			sym.addAccumVariable("total", VAR_DEC);
			}
			else if (ttype == KW_MIN || ttype == KW_SUB_MIN)
			{
			sym.addAccumVariable("min", VAR_DEC);
			}
			else if (ttype == KW_MAX || ttype == KW_SUB_MAX)
			{
			sym.addAccumVariable("max", VAR_DEC);
			}
			else if (ttype == KW_AVERAGE || ttype == KW_SUB_AVG)
			{
			sym.addAccumVariable("avg", VAR_DEC);
			}
			}
			
			accumulate_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = accumulate_stmt_AST;
	}
	
/**   
 * Matches the <code>APPLY</code> language statement.  Calls the
 * {@link #expr} and {@link #to_event_target} rules.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void apply_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast apply_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp578_AST = null;
			tmp578_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp578_AST);
			match(KW_APPLY);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_TO:
			{
				to_event_target();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			apply_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = apply_stmt_AST;
	}
	
/**
 * Matches an <code>ASSIGN</code> Progress 4GL language statement.
 * This is the statement that either moves data from screen buffers to an
 * lvalue OR it handles multiple regular assignments as a single block,  
 * eliminating any overhead associated with each assignment until the entire
 * set is complete (e.g. rebuilding an index).
 * <p>
 * It is undocumented, but the assign statement can be empty (just the
 * assign keyword followed by a dot).
 * <p>
 * The syntax is differentiated from a top level {@link #assignment} statement
 * by:
 * <ul>
 *    <li> the <code>ASSIGN</code> keyword as the first token
 *    <li> the requirement that there be an lvalue and assignment operator
 *         before any expression rather than being optional as in the 
 *         top level assignment rule
 *    <li> only one terminating <code>DOT</code>
 * </ul>
 * <p>
 * A rule reference called {@link #assign} is used to implement the
 * assignment logic.  Note that this is <b>nearly identical</b> to the
 * <code>assignment</code> rule except for the non-mandatory lvalue and
 * assignment operator and the lack of the terminating <code>DOT</code>.
 * Due to these differences, the <code>assignment</code> rule could not be
 * reused here.
 * <p>
 * Uses a separate rule for core logic allows ANTLR's natural tree building to 
 * generate a proper result (the entire subtree created by <code>assign</code>
 * is added as a child of the <code>ASSIGN</code> keyword).
 * <p>
 * Uses {@link #record_spec}, {@link #assign} and {@link #simple_when_clause}.
 * <p>
 * This rule has inherent ambiguity between the record form and the field
 * form.  This is resolved by precedence.  A test for whether the 1st token
 * is a table reference is made, if it matches a table reference, then the
 * record form is matched.
 * <p>
 * ANTLR reports bogus ambiguity in the use of the browse reference but
 * warnings have been disabled since this is not ambiguous.
 */
	public final void assign_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast assign_stmt_AST = null;
		
		try {      // for error handling
			{
			Aast tmp579_AST = null;
			tmp579_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp579_AST);
			match(KW_ASSIGN);
			{
			if (((_tokenSet_13.member(LA(1))) && (LA(2)==DOT||LA(2)==KW_EXCEPT||LA(2)==KW_NO_ERROR) && (_tokenSet_11.member(LA(3))))&&(
                 isRecord(LT(1).getText()) &&
                 !isQualifiedFieldNameQuirk(LT(1), LT(2), LT(3))
              )) {
				record_spec(null);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_85.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_NO_ERROR )) {
				{
				int _cnt669=0;
				_loop669:
				do {
					if (((_tokenSet_85.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_NO_ERROR )) {
						assign();
						astFactory.addASTChild(currentAST, returnAST);
						{
						if ((LA(1)==KW_WHEN) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
							simple_when_clause();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if ((_tokenSet_113.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						
						}
					}
					else {
						if ( _cnt669>=1 ) { break _loop669; } else {throw new NoViableAltException(LT(1), getFilename());}
					}
					
					_cnt669++;
				} while (true);
				}
			}
			else if ((LA(1)==DOT||LA(1)==KW_NO_ERROR) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp580_AST = null;
				tmp580_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp580_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			}
			assign_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = assign_stmt_AST;
	}
	
/**
 * Matches the <code>KW_BLK_LVL</code> keyword with a following {@link #on_event_phrase}.
 */
	public final void block_level_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast block_level_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp581_AST = null;
			tmp581_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp581_AST);
			match(KW_BLK_LVL);
			on_event_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			block_level_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = block_level_stmt_AST;
	}
	
/**
 * Matches the <code>BUFFER-COMPARE and BUFFER-COPY</code> language statements
 * and all following constructs.
 * <p>
 * <ul>
 *    <li> {@link #record}
 *    <li> {@link #buffer_modification_list}
 *    <li> {@link #to_target}
 *    <li> {@link #save_result_in} (compare only)
 *    <li> {@link #explicit_compares} (compare only)
 *    <li> {@link #sub_assign_clause} (copy only)
 * </ul>
 * <p>
 * Used by {@link #stmt_list}.
 * <p>
 * Bogus ANTLR ambiguity warnings are disabled.
 */
	public final void buffer_compare_or_copy_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast buffer_compare_or_copy_stmt_AST = null;
		
		try {      // for error handling
			
			boolean compare = true;
			NameNode nothing = null;
			
			{
			{
			switch ( LA(1)) {
			case KW_BUF_COMP:
			{
				Aast tmp582_AST = null;
				tmp582_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp582_AST);
				match(KW_BUF_COMP);
				break;
			}
			case KW_BUF_COPY:
			{
				Aast tmp583_AST = null;
				tmp583_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp583_AST);
				match(KW_BUF_COPY);
				compare = false;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			nothing=record(true, true, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_EXCEPT:
			case KW_USING:
			{
				buffer_modification_list();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_TO:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			to_target();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1255:
			do {
				switch ( LA(1)) {
				case KW_CASE_SEN:
				{
					Aast tmp584_AST = null;
					tmp584_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp584_AST);
					match(KW_CASE_SEN);
					break;
				}
				case KW_BINARY:
				{
					Aast tmp585_AST = null;
					tmp585_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp585_AST);
					match(KW_BINARY);
					break;
				}
				case KW_NO_LOBS:
				{
					Aast tmp586_AST = null;
					tmp586_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp586_AST);
					match(KW_NO_LOBS);
					break;
				}
				default:
					if (((_tokenSet_114.member(LA(1))) && (_tokenSet_115.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( compare )) {
						{
						switch ( LA(1)) {
						case KW_SAVE:
						{
							save_result_in();
							astFactory.addASTChild(currentAST, returnAST);
							break;
						}
						case KW_NO_ERROR:
						case KW_COMPARES:
						case KW_EXPLICIT:
						case COLON:
						{
							explicit_compares();
							astFactory.addASTChild(currentAST, returnAST);
							break;
						}
						default:
						{
							throw new NoViableAltException(LT(1), getFilename());
						}
						}
						}
					}
					else if (((LA(1)==KW_ASSIGN))&&( !compare )) {
						sub_assign_clause();
						astFactory.addASTChild(currentAST, returnAST);
					}
				else {
					break _loop1255;
				}
				}
			} while (true);
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp587_AST = null;
				tmp587_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp587_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			}
			buffer_compare_or_copy_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = buffer_compare_or_copy_stmt_AST;
	}
	
/**
 * Matches the <code>CALL</code> language statement, the required
 * {@link #filename} of the invoked HLC (host language call) function and
 * and optional list of {@link #expr} (arguments). Used by {@link #stmt_list}.
 */
	public final void call_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast call_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp588_AST = null;
			tmp588_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp588_AST);
			match(KW_CALL);
			filename(null);
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1618:
			do {
				if ((_tokenSet_24.member(LA(1)))) {
					expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1618;
				}
				
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			call_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = call_stmt_AST;
	}
	
/**   
 * Matches the <code>CASE</code> language statement.  This rule uses rule references {@link #when_clause},
 * {@link #otherwise} and {@link #end_stmt} to properly build the AST.  The END is optional if the CASE
 * is the last statement in the file.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void case_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast case_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp589_AST = null;
			tmp589_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp589_AST);
			match(KW_CASE);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop495:
			do {
				if ((LA(1)==KW_WHEN) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					when_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop495;
				}
				
			} while (true);
			}
			{
			if ((LA(1)==KW_OTHER) && (_tokenSet_10.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				otherwise();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) != EOF )) {
				end_stmt(true);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			case_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = case_stmt_AST;
	}
	
/**
 * Implements a <code>KW_CATCH</code> block which is part of the structured
 * error handling added in 10.2x. This uses the {@link #symbol}, 
 * {@link #as_clause}, {@link #block} and {@link #end_stmt} sub-rules to
 * match and build the tree.  The tree will be rooted at the
 * <code>KW_CATCH</code> node.  Variable and schema scopes are pushed and
 * popped in this statement.
 */
	public final void catch_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast catch_stmt_AST = null;
		Token  cat = null;
		Aast cat_AST = null;
		Aast e_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			{
			cat = LT(1);
			cat_AST = (Aast)astFactory.create(cat);
			astFactory.makeASTRoot(currentAST, cat_AST);
			match(KW_CATCH);
			symbol();
			e_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			as_clause(e_AST.getText(), false);
			astFactory.addASTChild(currentAST, returnAST);
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			
			// this normally sets parsed options into the Variable instance
			// in the symbol resolver; but in this case it just ensures some
			// metadata is set properly
			sym.setVariableOptions(e_AST.getText(), cat_AST);
			
			// this will save some of the metadata state into the catch node
			// as annotations, but the normal options processing is not needed
			sym.annotateVariableOptions(e_AST.getText(), cat_AST, true);
			
			block();
			b_AST = (Aast)returnAST;
			
			if (b_AST == null)
			{
			b_AST = (Aast)astFactory.make( (new ASTArray(1)).add((Aast)astFactory.create(BLOCK,"block")));
			}
			else
			{
			b_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST));
			}
			cat_AST.addChild(b_AST);
			
			end_stmt(true);
			astFactory.addASTChild(currentAST, returnAST);
			}
			catch_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = catch_stmt_AST;
	}
	
/**   
 * Matches the <code>CHOOSE</code> language statement, the required following
 * {@link #choose_row_or_field_list} and all possible options (which can be
 * specified in any order).
 * <p>
 * Calls:
 * <p>
 * <ul>
 *    <li> {@link #choose_keys_clause}
 *    <li> {@link #go_on_clause}
 *    <li> {@link #pause_clause}
 *    <li> {@link #simple_color_clause}
 *    <li> {@link #frame_phrase}
 * </ul>
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * Used by {@link #choose_stmt}.
 */
	public final void choose_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast choose_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp590_AST = null;
			tmp590_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp590_AST);
			match(KW_CHOOSE);
			choose_row_or_field_list();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1498:
			do {
				switch ( LA(1)) {
				case KW_AUTO_RET:
				{
					Aast tmp591_AST = null;
					tmp591_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp591_AST);
					match(KW_AUTO_RET);
					break;
				}
				case KW_NO_ERROR:
				{
					Aast tmp592_AST = null;
					tmp592_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp592_AST);
					match(KW_NO_ERROR);
					break;
				}
				case KW_KEYS:
				{
					choose_keys_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_GO_ON:
				{
					go_on_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_PAUSE:
				{
					pause_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_COLOR:
				{
					simple_color_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_WITH:
				{
					frame_phrase(false, false);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop1498;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			choose_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = choose_stmt_AST;
	}
	
/**   
 * Matches the <code>CLEAR</code> language statement.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void clear_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast clear_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp593_AST = null;
			tmp593_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp593_AST);
			match(KW_CLEAR);
			{
			switch ( LA(1)) {
			case KW_FRAME:
			{
				frame_reference(false);
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_ALL:
			case KW_NO_PAUSE:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_ALL:
			{
				Aast tmp594_AST = null;
				tmp594_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp594_AST);
				match(KW_ALL);
				break;
			}
			case DOT:
			case KW_NO_PAUSE:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_PAUSE:
			{
				Aast tmp595_AST = null;
				tmp595_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp595_AST);
				match(KW_NO_PAUSE);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			clear_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = clear_stmt_AST;
	}
	
/**
 * Matches a <code>CLOSE QUERY</code> language statement and the required
 * following query name (see {@link #malformed_symbol}).
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void close_query_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast close_query_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  qk = null;
		Aast qk_AST = null;
		Aast q_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CLOSE);
			c_AST.setType(CLOSE_QUERY);
			qk = LT(1);
			qk_AST = (Aast)astFactory.create(qk);
			match(KW_QUERY);
			hide(qk);
			malformed_symbol();
			q_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			q_AST.setType(QUERY);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			close_query_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = close_query_stmt_AST;
	}
	
/**
 * Matches the <code>CLOSE STORED-PROCEDURE</code> language statement, the
 * following {@link #reserved_or_symbol}, the optional {@link #assign}
 * and optional {@link #where_clause}. The result will be rooted at a
 * <code>CLOSE_STORED_PROCEDURE</code> node.  Called from {@link #stmt_list}.
 * <p>
 * Warning: this is an early implementation which does not yet support the
 * notion that a stored procedure is like a special kind of table type. The
 * stored procedure is a schema object created in the database supported
 * by a 4GL data server.  That schema object is known to the 4GL and it
 * is called with optional parameters (and must be closed when done). But
 * to get the data out of the results, Progress creates a buffer of the same
 * name as the procedure, which can be used in record phrases to read the
 * data. Likewise, there are properties defined for the results which are
 * treated like fields.  The schema dictionary, symbol resolver and parser
 * all need updates to fully support this new resource. It is likely that
 * real 4GL code using these constructs will not parse properly at this time.
 */
	public final void close_stored_proc_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast close_stored_proc_stmt_AST = null;
		Token  r = null;
		Aast r_AST = null;
		Token  sp = null;
		Aast sp_AST = null;
		
		try {      // for error handling
			r = LT(1);
			r_AST = (Aast)astFactory.create(r);
			astFactory.makeASTRoot(currentAST, r_AST);
			match(KW_CLOSE);
			r_AST.setType(CLOSE_STORED_PROCEDURE);
			sp = LT(1);
			sp_AST = (Aast)astFactory.create(sp);
			match(KW_STORPROC);
			hide(sp);
			reserved_or_symbol();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((_tokenSet_64.member(LA(1)))) {
				assign_proc_handle();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT||LA(1)==KW_WHERE)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_WHERE:
			{
				where_clause(true);
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			close_stored_proc_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = close_stored_proc_stmt_AST;
	}
	
/**   
 * Matches the <code>COMPILE</code> language statement.
 * <p>
 * Calls {@link #external_name_spec} and {@link #compile_options_clause}
 * rules.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void compile_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast compile_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp596_AST = null;
			tmp596_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp596_AST);
			match(KW_COMPILE);
			external_name_spec();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop681:
			do {
				if ((_tokenSet_116.member(LA(1)))) {
					compile_options_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop681;
				}
				
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			compile_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = compile_stmt_AST;
	}
	
/**
 * Matches a <code>CONNECT</code> language statement, the following
 * {@link #database_name} and arbitrary connect options.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void connect_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast connect_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp597_AST = null;
			tmp597_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp597_AST);
			match(KW_CONN);
			{
			if ((((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LT(1).getText().startsWith("-") == false )) {
				database_name(true);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1) >= DOT && LA(1) <= JUNK)) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			connect_options();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp598_AST = null;
				tmp598_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp598_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			connect_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = connect_stmt_AST;
	}
	
/**
 * Matches the <code>COPY-LOB</code> language statement.
 * <p>
 * Calls {@link #from_lob_source}, {@link #to_lob_target} and {@link #codepage_convert_phrase}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void copy_lob_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast copy_lob_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp599_AST = null;
			tmp599_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp599_AST);
			match(KW_CPY_LOB);
			from_lob_source();
			astFactory.addASTChild(currentAST, returnAST);
			to_lob_target();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_CONVERT:
			case KW_NO_CVT:
			{
				codepage_convert_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp600_AST = null;
				tmp600_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp600_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			copy_lob_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = copy_lob_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE ALIAS</code> language statement, and the following
 * database names (see {@link #database_name}). 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_alias_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_alias_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  al = null;
		Aast al_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_ALIAS);
			al = LT(1);
			al_AST = (Aast)astFactory.create(al);
			match(KW_ALIAS);
			hide(al);
			database_name(false);
			astFactory.addASTChild(currentAST, returnAST);
			Aast tmp601_AST = null;
			tmp601_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp601_AST);
			match(KW_FOR);
			Aast tmp602_AST = null;
			tmp602_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp602_AST);
			match(KW_DATABASE);
			database_name(false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp603_AST = null;
				tmp603_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp603_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_alias_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_alias_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE BROWSE</code> language statement, and the
 * following options. 
 * <p>
 * Uses:
 * <p>
 * <ul>
 *    <li> {@link #handle}
 *    <li> {@link #in_widget_pool_clause}
 *    <li> {@link #attribute_assign_clause}
 *    <li> {@link #trigger_phrase}
 * </ul>
 * <p>
 * Used by {@link #stmt_list}.
 * <p>
 * Allows the undocumented usage of <code>KW_NO_ERROR</code> after the
 * <code>in_widget_pool_clause</code> and before the <code>attribute_assign_clause</code>,
 * which was found in working 4GL code.
 */
	public final void create_browse_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_browse_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  br = null;
		Aast br_AST = null;
		
		boolean allowColon = false;
		
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_BROWSE);
			br = LT(1);
			br_AST = (Aast)astFactory.create(br);
			match(KW_BROWSE);
			hide(br);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_ASSIGN:
			case KW_NO_ERROR:
			case KW_TRIGGERS:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp604_AST = null;
				tmp604_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp604_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			case KW_ASSIGN:
			case KW_TRIGGERS:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_ASSIGN:
			{
				attribute_assign_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_TRIGGERS:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_TRIGGERS:
			{
				trigger_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				allowColon = true;
				break;
			}
			case DOT:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if (((LA(1)==COLON))&&( allowColon )) {
				colon();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT)) {
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			create_browse_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_browse_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE BUFFER</code> language statement, the required
 * following {@link #handle}, the required <code>FOR TABLE</code>
 * construct (see {@link #for_table_clause}) and the optional 
 * {@link #in_widget_pool_clause} and {@link #buffer_name_clause} rules.
 * <p>
 * An undocumented feature was found where the <code>NO-ERROR</code> keyword
 * can be added at the end of this statement.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_buffer_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_buffer_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  bu = null;
		Aast bu_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_BUFFER);
			bu = LT(1);
			bu_AST = (Aast)astFactory.create(bu);
			match(KW_BUFFER);
			hide(bu);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			for_table_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1245:
			do {
				switch ( LA(1)) {
				case KW_BUF_NAME:
				{
					buffer_name_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_IN:
				{
					in_widget_pool_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop1245;
				}
				}
			} while (true);
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp605_AST = null;
				tmp605_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp605_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_buffer_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_buffer_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE CALL</code> language statement, the required
 * following {@link #handle} and the optional {@link #in_widget_pool_clause}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_call_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_call_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  ca = null;
		Aast ca_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_CALL);
			ca = LT(1);
			ca_AST = (Aast)astFactory.create(ca);
			match(KW_CALL);
			hide(ca);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp606_AST = null;
				tmp606_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp606_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_call_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_call_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE CLIENT-PRINCIPAL</code> language statement and the
 * required following {@link #handle}. 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_client_principal_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_client_principal_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  cp = null;
		Aast cp_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			cp = LT(1);
			cp_AST = (Aast)astFactory.create(cp);
			match(KW_CLNT_PRL);
			hide(cp); c_AST.setType(CREATE_CLIENT_PRINCIPAL);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp607_AST = null;
				tmp607_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp607_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_client_principal_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_client_principal_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE DATABASE</code> language statement, the required
 * following expressions and the optional <code>REPLACE or NO-ERROR</code>
 * keywords.
 * <p>
 * Uses {@link #expr} and {@link #from_database_clause} rules. 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_database_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_database_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  db = null;
		Aast db_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_DATABASE);
			db = LT(1);
			db_AST = (Aast)astFactory.create(db);
			match(KW_DATABASE);
			hide(db);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_FROM:
			{
				from_database_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			case KW_REPLACE:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop1232:
			do {
				switch ( LA(1)) {
				case KW_REPLACE:
				{
					Aast tmp608_AST = null;
					tmp608_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp608_AST);
					match(KW_REPLACE);
					break;
				}
				case KW_NO_ERROR:
				{
					Aast tmp609_AST = null;
					tmp609_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp609_AST);
					match(KW_NO_ERROR);
					break;
				}
				default:
				{
					break _loop1232;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_database_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_database_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE DATASET</code> language statement, the required
 * following {@link #handle} and the optional {@link #in_widget_pool_clause}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_dataset_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_dataset_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  ds = null;
		Aast ds_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_DATASET);
			ds = LT(1);
			ds_AST = (Aast)astFactory.create(ds);
			match(KW_DATASET);
			hide(ds);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_dataset_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_dataset_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE DATA-SOURCE</code> language statement, the required
 * following {@link #handle} and the optional {@link #in_widget_pool_clause}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_datasource_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_datasource_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  ds = null;
		Aast ds_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_DATA_SOURCE);
			ds = LT(1);
			ds_AST = (Aast)astFactory.create(ds);
			match(KW_DATA_SRC);
			hide(ds);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_datasource_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_datasource_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE QUERY</code> language statement, the required
 * following {@link #handle} and the optional {@link #in_widget_pool_clause}.
 * <p>
 * An undocumented feature was found where the <code>NO-ERROR</code> keyword
 * can be added at the end of this statement.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_query_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_query_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  qr = null;
		Aast qr_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_QUERY);
			qr = LT(1);
			qr_AST = (Aast)astFactory.create(qr);
			match(KW_QUERY);
			hide(qr);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp610_AST = null;
				tmp610_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp610_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_query_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_query_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE SAX-READER</code>, <code>CREATE SAX-WRITER</code>
 * and <code>CREATE SAX-ATTRIBUTES</code> language statements and the required
 * following {@link #handle}. Also uses {@link #in_widget_pool_clause}. 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_sax_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_sax_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  sa = null;
		Aast sa_AST = null;
		Token  sr = null;
		Aast sr_AST = null;
		Token  sw = null;
		Aast sw_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			{
			switch ( LA(1)) {
			case KW_SAX_ATTR:
			{
				sa = LT(1);
				sa_AST = (Aast)astFactory.create(sa);
				match(KW_SAX_ATTR);
				hide(sa); c_AST.setType(CREATE_SAX_ATTRIBUTES);
				break;
			}
			case KW_SAX_READ:
			{
				sr = LT(1);
				sr_AST = (Aast)astFactory.create(sr);
				match(KW_SAX_READ);
				hide(sr); c_AST.setType(CREATE_SAX_READER);
				break;
			}
			case KW_SAX_WRIT:
			{
				sw = LT(1);
				sw_AST = (Aast)astFactory.create(sw);
				match(KW_SAX_WRIT);
				hide(sw); c_AST.setType(CREATE_SAX_WRITER);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp611_AST = null;
				tmp611_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp611_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_sax_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_sax_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE SERVER</code> language statement, the following
 * {@link #handle} and the optional {@link #attribute_assign_clause}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_server_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_server_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  se = null;
		Aast se_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_SERVER);
			se = LT(1);
			se_AST = (Aast)astFactory.create(se);
			match(KW_SERVER);
			hide(se);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_ASSIGN:
			{
				attribute_assign_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_server_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_server_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE SOAP-HEADER</code> language statement, and the
 * following options. 
 * <p>
 * Uses:
 * <p>
 * <ul>
 *    <li> {@link #handle}
 *    <li> {@link #in_widget_pool_clause}
 * </ul>
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_soap_header_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_soap_header_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  so = null;
		Aast so_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_SOAP_HEADER);
			so = LT(1);
			so_AST = (Aast)astFactory.create(so);
			match(KW_SOAP_HDR);
			hide(so);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_soap_header_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_soap_header_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE SOAP-HEADER</code> language statement, and the
 * following options. 
 * <p>
 * Uses:
 * <p>
 * <ul>
 *    <li> {@link #handle}
 *    <li> {@link #in_widget_pool_clause}
 * </ul>
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_soap_header_entryref_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_soap_header_entryref_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  so = null;
		Aast so_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_SOAP_HEADER_ENTRYREF);
			so = LT(1);
			so_AST = (Aast)astFactory.create(so);
			match(KW_SOAP_HER);
			hide(so);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_soap_header_entryref_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_soap_header_entryref_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE SERVER-SOCKET or CREATE SOCKET</code> language
 * statements and the required following {@link #handle}. 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_socket_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_socket_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  ss = null;
		Aast ss_AST = null;
		Token  so = null;
		Aast so_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			{
			switch ( LA(1)) {
			case KW_SRV_SOCK:
			{
				ss = LT(1);
				ss_AST = (Aast)astFactory.create(ss);
				match(KW_SRV_SOCK);
				hide(ss); c_AST.setType(CREATE_SRV_SOCKET);
				break;
			}
			case KW_SOCKET:
			{
				so = LT(1);
				so_AST = (Aast)astFactory.create(so);
				match(KW_SOCKET);
				hide(so); c_AST.setType(CREATE_SOCKET);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp612_AST = null;
				tmp612_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp612_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_socket_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_socket_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE TEMP-TABLE</code> language statement, the required
 * following handle variable/field and the optional
 * {@link #in_widget_pool_clause}. The {@link #lvalue} rule and a validating 
 * semantic predicate are used to match the handle.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_temp_table_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_temp_table_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  tt = null;
		Aast tt_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_TEMP_TABLE);
			tt = LT(1);
			tt_AST = (Aast)astFactory.create(tt);
			match(KW_TEMP_TAB);
			hide(tt);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp613_AST = null;
				tmp613_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp613_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_temp_table_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_temp_table_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE WIDGET-POOL</code> language statement, and the
 * following optional {@link #expr} and/or <code>KW_PERSIST</code>. It is
 * undocumented, but working 4GL code shows that it is possible to match the
 * <code>KW_PERSIST</code> for an unnamed pool (where there is no preceding 
 * <code>expr</code>).
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_widget_pool_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_widget_pool_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  wp = null;
		Aast wp_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_WIDGET_POOL);
			wp = LT(1);
			wp_AST = (Aast)astFactory.create(wp);
			match(KW_WID_POOL);
			hide(wp);
			{
			if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_PERSIST && LA(1) != KW_NO_ERROR )) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT||LA(1)==KW_NO_ERROR||LA(1)==KW_PERSIST) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_PERSIST:
			{
				Aast tmp614_AST = null;
				tmp614_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp614_AST);
				match(KW_PERSIST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp615_AST = null;
				tmp615_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp615_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_widget_pool_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_widget_pool_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE X-DOCUMENT or CREATE X-NODEREF</code> language
 * statements and the required following {@link #handle}.  Working code has
 * been found that allows a <code>KW_NO_ERROR</code> to optionally be present
 * (in both statements) and this undocumented feature is supported here.
 * Also uses {@link #in_widget_pool_clause}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void create_xml_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_xml_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  xd = null;
		Aast xd_AST = null;
		Token  xn = null;
		Aast xn_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			{
			switch ( LA(1)) {
			case KW_X_DOC:
			{
				xd = LT(1);
				xd_AST = (Aast)astFactory.create(xd);
				match(KW_X_DOC);
				hide(xd); c_AST.setType(CREATE_X_DOCUMENT);
				break;
			}
			case KW_X_NODE:
			{
				xn = LT(1);
				xn_AST = (Aast)astFactory.create(xn);
				match(KW_X_NODE);
				hide(xn); c_AST.setType(CREATE_X_NODEREF);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp616_AST = null;
				tmp616_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp616_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_xml_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_xml_stmt_AST;
	}
	
/**
 * Matches the <code>CREATE</code> language statement and implements all
 * following options.  Calls the {@link #record} and {@link #using_id_clause}
 * rules. Called by the {@link #stmt_list} rule.
 */
	public final void create_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_stmt_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			Aast tmp617_AST = null;
			tmp617_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp617_AST);
			match(KW_CREATE);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_USING:
			{
				using_id_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp618_AST = null;
				tmp618_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp618_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			create_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_stmt_AST;
	}
	
/**
 * Matches a <code>CREATE widget_type</code> or <code>CREATE automation-object</code>language
 * statement, and the following options.  The types of widgets supported are: 
 * <p>
 * <ul>
 *    <li> BUTTON
 *    <li> COMBO-BOX
 *    <li> CONTROL-FRAME
 *    <li> DIALOG-BOX
 *    <li> EDITOR
 *    <li> FILL-IN
 *    <li> FRAME
 *    <li> IMAGE
 *    <li> MENU
 *    <li> MENU-ITEM
 *    <li> RADIO-SET
 *    <li> RECTANGLE
 *    <li> SELECTION-LIST
 *    <li> SLIDER
 *    <li> SMTP-EMAIL (FWD extension)
 *    <li> SUB-MENU
 *    <li> TEXT
 *    <li> TIMER (FWD extension)
 *    <li> TOGGLE-BOX
 *    <li> WINDOW
 * </ul>
 * <p>
 * Uses:
 * <p>
 * <ul>
 *    <li> {@link #lvalue}
 *    <li> {@link #in_widget_pool_clause}
 *    <li> {@link #sub_assign_clause}
 *    <li> {@link #trigger_phrase}
 * </ul>
 * <p>
 * Used by {@link #stmt_list}.
 * <p>
 * Allows the undocumented usage of <code>KW_NO_ERROR</code> after the
 * <code>in_widget_pool_clause</code> and before the <code>attribute_assign_clause</code>,
 * which was found in working 4GL code.
 */
	public final void create_widget_or_object_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_widget_or_object_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Aast h_AST = null;
		
		boolean is_com_handle = false;
		boolean is_widget = false;
		boolean allowColon = false;
		boolean is_timer_extension = false;
		boolean is_smtp_email = false;
		boolean is_report = false;
		
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_WIDGET);
			{
			if ((LA(1)==KW_BUTTON) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp619_AST = null;
				tmp619_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp619_AST);
				match(KW_BUTTON);
				is_widget = true;
			}
			else if ((LA(1)==KW_CHART) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp620_AST = null;
				tmp620_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp620_AST);
				match(KW_CHART);
				is_widget = true;
			}
			else if ((LA(1)==KW_COMBO_BX) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp621_AST = null;
				tmp621_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp621_AST);
				match(KW_COMBO_BX);
				is_widget = true;
			}
			else if ((LA(1)==KW_CNTRL_FR) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp622_AST = null;
				tmp622_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp622_AST);
				match(KW_CNTRL_FR);
				is_widget = true;
			}
			else if ((LA(1)==KW_DIALOG) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp623_AST = null;
				tmp623_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp623_AST);
				match(KW_DIALOG);
				is_widget = true;
			}
			else if ((LA(1)==KW_CALENDAR) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp624_AST = null;
				tmp624_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp624_AST);
				match(KW_CALENDAR);
				is_widget = true;
			}
			else if ((LA(1)==KW_EDITOR) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp625_AST = null;
				tmp625_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp625_AST);
				match(KW_EDITOR);
				is_widget = true;
			}
			else if ((LA(1)==KW_FILL_IN) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp626_AST = null;
				tmp626_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp626_AST);
				match(KW_FILL_IN);
				is_widget = true;
			}
			else if ((LA(1)==KW_FRAME) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp627_AST = null;
				tmp627_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp627_AST);
				match(KW_FRAME);
				is_widget = true;
			}
			else if ((LA(1)==KW_HTML_BWS) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp628_AST = null;
				tmp628_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp628_AST);
				match(KW_HTML_BWS);
				is_widget = true;
			}
			else if ((LA(1)==KW_IMAGE) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp629_AST = null;
				tmp629_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp629_AST);
				match(KW_IMAGE);
				is_widget = true;
			}
			else if ((LA(1)==KW_IL_IMG) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp630_AST = null;
				tmp630_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp630_AST);
				match(KW_IL_IMG);
				is_widget = true;
			}
			else if ((LA(1)==KW_MENU) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp631_AST = null;
				tmp631_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp631_AST);
				match(KW_MENU);
				is_widget = true;
			}
			else if ((LA(1)==KW_MENU_ITM) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp632_AST = null;
				tmp632_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp632_AST);
				match(KW_MENU_ITM);
				is_widget = true;
			}
			else if ((LA(1)==KW_PROG_BAR) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp633_AST = null;
				tmp633_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp633_AST);
				match(KW_PROG_BAR);
				is_widget = true;
			}
			else if ((LA(1)==KW_RADIO_S) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp634_AST = null;
				tmp634_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp634_AST);
				match(KW_RADIO_S);
				is_widget = true;
			}
			else if ((LA(1)==KW_RECT) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp635_AST = null;
				tmp635_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp635_AST);
				match(KW_RECT);
				is_widget = true;
			}
			else if ((LA(1)==KW_SEL_LST) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp636_AST = null;
				tmp636_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp636_AST);
				match(KW_SEL_LST);
				is_widget = true;
			}
			else if ((LA(1)==KW_SIGNATUR) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp637_AST = null;
				tmp637_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp637_AST);
				match(KW_SIGNATUR);
				is_widget = true;
			}
			else if ((LA(1)==KW_SLIDER) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp638_AST = null;
				tmp638_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp638_AST);
				match(KW_SLIDER);
				is_widget = true;
			}
			else if ((LA(1)==KW_SPRSHEET) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp639_AST = null;
				tmp639_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp639_AST);
				match(KW_SPRSHEET);
				is_widget = true;
			}
			else if ((LA(1)==KW_SUB_MENU) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp640_AST = null;
				tmp640_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp640_AST);
				match(KW_SUB_MENU);
				is_widget = true;
			}
			else if ((LA(1)==KW_TABSET) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp641_AST = null;
				tmp641_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp641_AST);
				match(KW_TABSET);
				is_widget = true;
			}
			else if ((LA(1)==KW_TEXT) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp642_AST = null;
				tmp642_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp642_AST);
				match(KW_TEXT);
				is_widget = true;
			}
			else if ((LA(1)==KW_TOGGL_BX) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp643_AST = null;
				tmp643_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp643_AST);
				match(KW_TOGGL_BX);
				is_widget = true;
			}
			else if ((LA(1)==KW_TREELIST) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp644_AST = null;
				tmp644_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp644_AST);
				match(KW_TREELIST);
				is_widget = true;
			}
			else if ((LA(1)==KW_TREEVIEW) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp645_AST = null;
				tmp645_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp645_AST);
				match(KW_TREEVIEW);
				is_widget = true;
			}
			else if ((LA(1)==KW_WINDOW) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp646_AST = null;
				tmp646_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp646_AST);
				match(KW_WINDOW);
				is_widget = true;
			}
			else if ((LA(1)==KW_BTN_LIST) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp647_AST = null;
				tmp647_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp647_AST);
				match(KW_BTN_LIST);
				is_widget = true;
			}
			else if ((LA(1)==KW_TIMER) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp648_AST = null;
				tmp648_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp648_AST);
				match(KW_TIMER);
				is_timer_extension = true;
			}
			else if ((LA(1)==KW_SMTP_EML) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp649_AST = null;
				tmp649_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp649_AST);
				match(KW_SMTP_EML);
				is_smtp_email = true;
			}
			else if ((LA(1)==KW_REPORT) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp650_AST = null;
				tmp650_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp650_AST);
				match(KW_REPORT);
				is_report = true;
			}
			else if ((LA(1)==KW_VALUE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				value();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			handle();
			h_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			if (h_AST.getType() == VAR_COM_HANDLE   ||
			h_AST.getType() == FIELD_COM_HANDLE ||
			(h_AST.getType() == SYS_HANDLE          &&
			h_AST.getAnnotation("oldtype") != null &&
			((Long) h_AST.getAnnotation("oldtype")).intValue() == KW_COM_SELF))
			{
			if (is_widget)
			{
			// do not allow com-handle vars for create widget cases
			throw new NoViableAltException(LT(0), getFilename());
			}
			c_AST.setType(CREATE_OBJECT);
			is_com_handle = true;
			}
			
			if (is_timer_extension)
			{
			c_AST.setType(CREATE_TIMER);
			}
			
			if (is_smtp_email)
			{
			c_AST.setType(CREATE_SMTP_EMAIL);
			}
			
			if (is_report)
			{
			c_AST.setType(CREATE_REPORT);
			}
			
			}
			{
			if (((LA(1)==KW_CONN))&&( is_com_handle )) {
				com_connect_option();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_117.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((LA(1)==KW_IN))&&( !is_com_handle && !is_timer_extension && !is_smtp_email && !is_report )) {
				in_widget_pool_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_118.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp651_AST = null;
				tmp651_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp651_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			case KW_ASSIGN:
			case KW_TRIGGERS:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if (((LA(1)==KW_ASSIGN))&&( !is_com_handle || is_timer_extension || is_smtp_email )) {
				attribute_assign_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT||LA(1)==KW_TRIGGERS||LA(1)==COLON)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((LA(1)==KW_TRIGGERS))&&( (!is_com_handle && !is_smtp_email && !is_report) || is_timer_extension )) {
				trigger_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				allowColon = true;
			}
			else if ((LA(1)==DOT||LA(1)==COLON)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((LA(1)==COLON))&&( allowColon )) {
				colon();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT)) {
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			create_widget_or_object_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = create_widget_or_object_stmt_AST;
	}
	
/**
 * Matches the <code>DDE ADVISE</code> language statement. There is always
 * a following {@link #expr} and {@link #item_clause}.  There is an optional
 * use of {@link #time_clause}. Used by {@link #stmt_list}.
 */
	public final void dde_advise_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dde_advise_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  ad = null;
		Aast ad_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DDE);
			d_AST.setType(DDE_ADVISE);
			ad = LT(1);
			ad_AST = (Aast)astFactory.create(ad);
			match(KW_ADVISE);
			hide(ad);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_START:
			{
				Aast tmp652_AST = null;
				tmp652_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp652_AST);
				match(KW_START);
				break;
			}
			case KW_STOP:
			{
				Aast tmp653_AST = null;
				tmp653_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp653_AST);
				match(KW_STOP);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			item_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_TIME:
			{
				time_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp654_AST = null;
				tmp654_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp654_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			dde_advise_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = dde_advise_stmt_AST;
	}
	
/**
 * Matches the <code>DDE EXECUTE</code> language statement. There is always
 * a following {@link #expr} and {@link #command_clause}.  There is an
 * optional use of {@link #time_clause}. Used by {@link #stmt_list}.
 */
	public final void dde_execute_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dde_execute_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  exe = null;
		Aast exe_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DDE);
			d_AST.setType(DDE_EXECUTE);
			exe = LT(1);
			exe_AST = (Aast)astFactory.create(exe);
			match(KW_EXECUTE);
			hide(exe);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			command_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_TIME:
			{
				time_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp655_AST = null;
				tmp655_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp655_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			dde_execute_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = dde_execute_stmt_AST;
	}
	
/**
 * Matches the <code>DDE GET</code> language statement. There is always
 * a following {@link #expr}, {@link #source_or_target_clause} and
 * {@link #item_clause}. There is an optional use of {@link #time_clause}.
 * Used by {@link #stmt_list}.
 */
	public final void dde_get_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dde_get_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  ge = null;
		Aast ge_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DDE);
			d_AST.setType(DDE_GET);
			ge = LT(1);
			ge_AST = (Aast)astFactory.create(ge);
			match(KW_GET);
			hide(ge);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			source_or_target_clause(false);
			astFactory.addASTChild(currentAST, returnAST);
			item_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_TIME:
			{
				time_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp656_AST = null;
				tmp656_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp656_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			dde_get_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = dde_get_stmt_AST;
	}
	
/**
 * Matches the <code>DDE INITIATE</code> language statement. There is always
 * a following {@link #expr}, {@link #frame_handle_clause},
 * {@link #application_clause} and {@link #topic_clause}. Used by
 * {@link #stmt_list}.
 */
	public final void dde_initiate_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dde_initiate_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  in = null;
		Aast in_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DDE);
			d_AST.setType(DDE_INITIATE);
			in = LT(1);
			in_AST = (Aast)astFactory.create(in);
			match(KW_INITIATE);
			hide(in);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			frame_handle_clause();
			astFactory.addASTChild(currentAST, returnAST);
			application_clause();
			astFactory.addASTChild(currentAST, returnAST);
			topic_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp657_AST = null;
				tmp657_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp657_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			dde_initiate_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = dde_initiate_stmt_AST;
	}
	
/**
 * Matches the <code>DDE REQUEST</code> language statement. There is always
 * a following {@link #expr}, {@link #source_or_target_clause} and
 * {@link #item_clause}. There is an optional use of {@link #time_clause}.
 * Used by {@link #stmt_list}.
 */
	public final void dde_request_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dde_request_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  re = null;
		Aast re_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DDE);
			d_AST.setType(DDE_REQUEST);
			re = LT(1);
			re_AST = (Aast)astFactory.create(re);
			match(KW_REQUEST);
			hide(re);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			source_or_target_clause(false);
			astFactory.addASTChild(currentAST, returnAST);
			item_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_TIME:
			{
				time_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp658_AST = null;
				tmp658_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp658_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			dde_request_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = dde_request_stmt_AST;
	}
	
/**
 * Matches the <code>DDE SEND</code> language statement. There is always
 * a following {@link #expr}, {@link #source_or_target_clause} and
 * {@link #item_clause}. There is an optional use of {@link #time_clause}.
 * Used by {@link #stmt_list}.
 */
	public final void dde_send_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dde_send_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  se = null;
		Aast se_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DDE);
			d_AST.setType(DDE_SEND);
			se = LT(1);
			se_AST = (Aast)astFactory.create(se);
			match(KW_SEND);
			hide(se);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			source_or_target_clause(false);
			astFactory.addASTChild(currentAST, returnAST);
			item_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_TIME:
			{
				time_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp659_AST = null;
				tmp659_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp659_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			dde_send_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = dde_send_stmt_AST;
	}
	
/**
 * Matches the <code>DDE TERMINATE</code> language statement. There is always
 * a following {@link #expr}. Used by {@link #stmt_list}.
 */
	public final void dde_terminate_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dde_terminate_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  te = null;
		Aast te_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DDE);
			d_AST.setType(DDE_TERMINATE);
			te = LT(1);
			te_AST = (Aast)astFactory.create(te);
			match(KW_TERMINAT);
			hide(te);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp660_AST = null;
				tmp660_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp660_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			dde_terminate_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = dde_terminate_stmt_AST;
	}
	
/**
 * Matches a <code>DELETE ALIAS</code> language statement, and the following
 * {@link #database_name}. 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void delete_alias_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast delete_alias_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  al = null;
		Aast al_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DELETE);
			d_AST.setType(DELETE_ALIAS);
			al = LT(1);
			al_AST = (Aast)astFactory.create(al);
			match(KW_ALIAS);
			hide(al);
			database_name(false);
			astFactory.addASTChild(currentAST, returnAST);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			delete_alias_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = delete_alias_stmt_AST;
	}
	
/**
 * Matches a <code>DELETE OBJECT</code> language statement, and the
 * following required {@link #expr} which must resolve to a handle or an object
 * reference. The fact that this is an expression is undocumented, the docs
 * only state that this is a handle or an object, but customer code has shown
 * it can be any expression.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void delete_object_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast delete_object_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  ob = null;
		Aast ob_AST = null;
		
		boolean parens = false;
		
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DELETE);
			d_AST.setType(DELETE_OBJECT);
			ob = LT(1);
			ob_AST = (Aast)astFactory.create(ob);
			match(KW_OBJECT);
			hide(ob);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp661_AST = null;
				tmp661_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp661_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			delete_object_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = delete_object_stmt_AST;
	}
	
/**
 * Matches a <code>DELETE PROCEDURE</code> language statement, and the
 * following required {@link #expr}. 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void delete_procedure_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast delete_procedure_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  pr = null;
		Aast pr_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DELETE);
			d_AST.setType(DELETE_PROCEDURE);
			pr = LT(1);
			pr_AST = (Aast)astFactory.create(pr);
			match(KW_PROC);
			hide(pr);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp662_AST = null;
				tmp662_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp662_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			delete_procedure_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = delete_procedure_stmt_AST;
	}
	
/**
 * Matches a <code>DELETE WIDGET</code> language statement, and the
 * following required {@link #handle} (or list thereof). 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void delete_widget_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast delete_widget_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  wi = null;
		Aast wi_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DELETE);
			d_AST.setType(DELETE_WIDGET);
			wi = LT(1);
			wi_AST = (Aast)astFactory.create(wi);
			match(KW_WIDGET);
			hide(wi);
			{
			int _cnt1302=0;
			_loop1302:
			do {
				if ((_tokenSet_85.member(LA(1)))) {
					handle();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					if ( _cnt1302>=1 ) { break _loop1302; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt1302++;
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			delete_widget_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = delete_widget_stmt_AST;
	}
	
/**
 * Matches a <code>DELETE WIDGET-POOL</code> language statement, and the
 * following optional {@link #expr}. 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void delete_widget_pool_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast delete_widget_pool_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  wp = null;
		Aast wp_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DELETE);
			d_AST.setType(DELETE_WIDGET_POOL);
			wp = LT(1);
			wp_AST = (Aast)astFactory.create(wp);
			match(KW_WID_POOL);
			hide(wp);
			{
			if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_NO_ERROR )) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT||LA(1)==KW_NO_ERROR) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp663_AST = null;
				tmp663_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp663_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			delete_widget_pool_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = delete_widget_pool_stmt_AST;
	}
	
/**
 * Matches the <code>DELETE</code> language statement and implements all
 * following options.  Calls the {@link #record} and {@link #validate} rules.
 * Called by the {@link #stmt_list} rule.
 */
	public final void delete_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast delete_stmt_AST = null;
		Aast r_AST = null;
		Aast v_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			Aast tmp664_AST = null;
			tmp664_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp664_AST);
			match(KW_DELETE);
			nothing=record(true, false, false);
			r_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_VALIDATE:
			{
				validate(null);
				v_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp665_AST = null;
				tmp665_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp665_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			delete_stmt_AST = (Aast)currentAST.root;
			
			// if there is no explicit validation statement, create one using the schema-level
			// validation defined for this table, if any
			if (v_AST == null)
			{
			attachDeleteSchemaValidation(delete_stmt_AST, r_AST, sym);
			}
			
			delete_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = delete_stmt_AST;
	}
	
/**
 * Matches the <code>DISABLE TRIGGERS</code> statement, the qualifier for
 * <code>DUMP or LOAD</code> and the associated {@link #record}. Used by
 * {@link #stmt_list}.
 */
	public final void disable_triggers_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast disable_triggers_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  tr = null;
		Aast tr_AST = null;
		Token  f = null;
		Aast f_AST = null;
		Token  of = null;
		Aast of_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DISABLE);
			d_AST.setType(DISABLE_TRIGGERS);
			tr = LT(1);
			tr_AST = (Aast)astFactory.create(tr);
			match(KW_TRIGGERS);
			hide(tr);
			f = LT(1);
			f_AST = (Aast)astFactory.create(f);
			match(KW_FOR);
			hide(f);
			{
			switch ( LA(1)) {
			case KW_DUMP:
			{
				Aast tmp666_AST = null;
				tmp666_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp666_AST);
				match(KW_DUMP);
				break;
			}
			case KW_LOAD:
			{
				Aast tmp667_AST = null;
				tmp667_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp667_AST);
				match(KW_LOAD);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			of = LT(1);
			of_AST = (Aast)astFactory.create(of);
			match(KW_OF);
			hide(of);
			nothing=record(false, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_ALLW_REP:
			{
				Aast tmp668_AST = null;
				tmp668_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp668_AST);
				match(KW_ALLW_REP);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			disable_triggers_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = disable_triggers_stmt_AST;
	}
	
/**   
 * Matches the <code>DISABLE</code> language statement.  Calls the
 * {@link #all_clause}, {@link #field_clause} and {@link #frame_phrase}.
 * <p>
 * The <code>UNLESS-HIDDEN</code> unreserved keyword naturally conflicts with
 * the possible following lvalue.  This is not really ambiguous so warnings
 * have been disabled.
 * <p>
 * This supports an undocumented feature where there is no ALL keyword or field
 * list.  In such a case, this is thought to be a no-operation (at runtime).
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void disable_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast disable_stmt_AST = null;
		Aast fld_AST = null;
		Aast fp_AST = null;
		
		try {      // for error handling
			
			Set<Aast> fields = new HashSet<>();
			
			Aast tmp669_AST = null;
			tmp669_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp669_AST);
			match(KW_DISABLE);
			{
			if ((LA(1)==KW_UNL_HID) && (_tokenSet_104.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp670_AST = null;
				tmp670_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp670_AST);
				match(KW_UNL_HID);
			}
			else if ((_tokenSet_104.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_ALL:
			{
				all_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_WITH:
			{
				break;
			}
			default:
				if ((_tokenSet_64.member(LA(1)))) {
					{
					int _cnt735=0;
					_loop735:
					do {
						if ((_tokenSet_64.member(LA(1)))) {
							field_clause(false);
							fld_AST = (Aast)returnAST;
							astFactory.addASTChild(currentAST, returnAST);
							
							int type = fld_AST.getType();
							if (type > BEGIN_FIELDTYPES && type < END_FIELDTYPES)
							{
							fields.add(fld_AST);
							}
							
						}
						else {
							if ( _cnt735>=1 ) { break _loop735; } else {throw new NoViableAltException(LT(1), getFilename());}
						}
						
						_cnt735++;
					} while (true);
					}
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_WITH:
			{
				frame_phrase(false, false);
				fp_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			disable_stmt_AST = (Aast)currentAST.root;
			
			String frameName = getFrameName(fp_AST);
			
			if (!fields.isEmpty())
			{
			sym.addFrameFields(frameName, fields);
			}
			
			setUseDictExps(frameName, fp_AST, disable_stmt_AST);
			
			disable_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = disable_stmt_AST;
	}
	
/**
 * Matches a <code>DISCONNECT</code> language statement, and the following
 * {@link #database_name}. 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void disconnect_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast disconnect_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp671_AST = null;
			tmp671_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp671_AST);
			match(KW_DISCONN);
			database_name(false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp672_AST = null;
				tmp672_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp672_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			disconnect_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = disconnect_stmt_AST;
	}
	
/**
 * Matches the <code>DISPLAY</code> language statement and builds the associated AST.
 * <p>
 * The following list of rules are called to properly implement the tree building:
 * <p>
 * <ul>
 *    <li> {@link #lvalue} (for stream references)
 *    <li> {@link #space_or_skip} 
 *    <li> {@link #expr}
 *    <li> {@link #format_phrase}
 *    <li> {@link #aggregate_phrase}
 *    <li> {@link #simple_when_clause} 
 *    <li> {@link #at_base_field_clause}
 *    <li> {@link #frame_phrase}
 * </ul>
 * <p> 
 * The use of the format phrase following an expression is ambiguous since it includes rule
 * references that include options that include expressions.  Thus, the lookahead set for the
 * format phrase is quite large and this naturally can conflict with following constructs in the
 * form item's calling rule(s).  A review of the code does not show any problems and no false
 * positives have been encountered yet. Ambiguity warnings for this case have been disabled but
 * this location bears watching.  Similar ambiguities exist for the <code>UNLESS-HIDDEN</code> 
 * and aggregate phrase.  These have been reviewed and the ambiguity warnings suppressed.
 * <p>
 * Another tricky part of this statement is resolving the ambiguity between the record and field
 * specifications.  The 4GL behavior is that records take precedence when there is a name
 * conflict EXCEPT in the case where there are other form items specified.  This means that
 * records are disambiguated from fields by trying to do a table lookup, if it fails the record
 * is not matched (see {@link #record_spec}) OR even when it is matched, we use lookahead to
 * determine if there are any following form items (in which case it the table form is not
 * matched).  If the table is not matched, the {@link #expr} is checked.  The careful ordering
 * of these options and using a semantic predicate is needed to resolve the ambiguity.  For this
 * reason, ambiguity warnings have been disabled.
 * <p>
 * There is a bad hack in this rule to allow a various options that are supposed to follow the
 * expression, be parsed in any order.  Normally this is done by looping and making these peer
 * alternatives BUT in this case, the format_phrase rule uses a loop internally and this
 * generates hangs in the resulting parser.  So, in this case, we only allow the format phrase 
 * to be executed once each time through the loop.  This bypasses the hang.  Nasty but it works.
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void display_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast display_stmt_AST = null;
		Aast s_AST = null;
		Aast e_AST = null;
		Aast fp_AST = null;
		
		try {      // for error handling
			
			String    symbolName  = null;
			Aast      fld         = null;
			Set<Aast> fields      = new HashSet<>();
			String    frame       = "";
			boolean   isTableName = false;
			boolean   isFieldName = false;
			boolean   moreFollows = false;
			boolean   first       = true;
			
			Aast tmp673_AST = null;
			tmp673_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp673_AST);
			match(KW_DISP);
			{
			if (((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_77.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_UNL_HID) && (_tokenSet_77.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp674_AST = null;
				tmp674_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp674_AST);
				match(KW_UNL_HID);
			}
			else if ((_tokenSet_77.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			String nxt = LT(1).getText();
			int    flw = LA(2);
			
			// disambiguate the special case of a table name that conflicts with a field name
			// anything (even a literal) other than a very short list of reserved keywords that
			// follows the next token means that it cannot be a table
			
			// this works because the record will be a single token and the other possible
			// following non-form-items are reserved keywords which can be easily checked
			// and can't be used as an lvalue or field name
			moreFollows = (flw != KW_EXCEPT   &&
			flw != KW_IN       &&
			flw != KW_WITH     &&
			flw != KW_NO_ERROR &&
			flw != DOT);
			isTableName = isRecord(nxt);
			isFieldName = sym.isField(nxt);
			
			// is possible for the LA(1) to be a field name in some other table in this scope; for
			// this reason, we care only if LA(1) can be a table name AND LA(2) is a DOT - in this 
			// case, LA(1) LA(2) LA(3) may be a qualified field name, i.e. "tt .field". 
			if (isTableName && flw == DOT)
			{
			// it is possible to have a construct like DISPLAY tt .field.  this allows the next
			// token to be disambiguated from a record to a field reference.
			int    newType = resolveLvalueCoreType(1, true);
			
			// the field name quirk was found and the tokens were merged
			if (fieldNameQuirkOriginalText != null)
			{
			nxt = fieldNameQuirkOriginalText;
			fieldNameQuirkOriginalText = null;
			}
			
			if (newType >= BEGIN_FIELDTYPES && newType <= END_FIELDTYPES)
			{
			isTableName = false;
			isFieldName = true;
			moreFollows = true;
			}
			}
			
			{
			_loop1487:
			do {
				if ((LA(1)==KW_SKIP||LA(1)==KW_SPACE) && (_tokenSet_77.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					space_or_skip();
					astFactory.addASTChild(currentAST, returnAST);
					first = false;
				}
				else if (((_tokenSet_13.member(LA(1))) && (_tokenSet_77.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( first && isTableName && (!isFieldName || !moreFollows) && LA(2) != LPARENS )) {
					record_spec(fields);
					astFactory.addASTChild(currentAST, returnAST);
					first = false;
				}
				else if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_IN && LA(1) != KW_NO_ERROR && LA(1) != KW_WITH )) {
					{
					if (((_tokenSet_15.member(LA(1))) && (_tokenSet_119.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(2) == KW_AS || LA(2) == KW_LIKE )) {
						symbol();
						s_AST = (Aast)returnAST;
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
						expr();
						e_AST = (Aast)returnAST;
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					
					first = false;
					
					int numFP = 0;
					
					// make sure these are reset every time through the loop
					symbolName = null;
					fld        = null;
					
					if (s_AST != null)
					{
					symbolName = s_AST.getText();
					int type = s_AST.getType();
					if (type > BEGIN_FIELDTYPES && type < END_FIELDTYPES)
					{
					fields.add(s_AST);
					}
					}
					if (e_AST != null)
					{
					fld = findFieldNode(e_AST);
					if (fld != null)
					{
					// if either the qualified field name quirk or the validation unqualified fixup
					// were present, the original text must be saved off
					if (nxt != null && !nxt.equals(fld.getText()))
					{
					fld.putAnnotation("original-text", nxt);
					}
					
					fields.add(fld);
					}
					}
					
					s_AST = null;
					e_AST = null;
					
					{
					_loop1486:
					do {
						if ((LA(1)==LPARENS) && (_tokenSet_75.member(LA(2))) && (_tokenSet_120.member(LA(3)))) {
							lparens();
							astFactory.addASTChild(currentAST, returnAST);
							aggregate_phrase();
							astFactory.addASTChild(currentAST, returnAST);
							rparens();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if (((_tokenSet_119.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( numFP < 2 )) {
							format_phrase(symbolName, fld, true, false);
							astFactory.addASTChild(currentAST, returnAST);
							numFP++;
						}
						else {
							break _loop1486;
						}
						
					} while (true);
					}
				}
				else {
					break _loop1487;
				}
				
			} while (true);
			}
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_window_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			case KW_WITH:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop1490:
			do {
				if ((LA(1)==KW_WITH)) {
					frame_phrase(false, false);
					fp_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					if (frame.length() == 0)
					{
					String name = getFrameName(fp_AST);
					if (name.length() > 0)
					{
					frame = name;
					}
					}
					
				}
				else {
					break _loop1490;
				}
				
			} while (true);
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp675_AST = null;
				tmp675_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp675_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			display_stmt_AST = (Aast)currentAST.root;
			
			if (!fields.isEmpty())
			{
			sym.addFrameFields(frame, fields);
			}
			
			setUseDictExps(frame, fp_AST, display_stmt_AST);
			
			display_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = display_stmt_AST;
	}
	
/**
 * Matches an <code>EMPTY TEMP-TABLE</code> language statement and the
 * required following temp-table name as a {@link #record}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void empty_temp_table_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast empty_temp_table_stmt_AST = null;
		Token  e = null;
		Aast e_AST = null;
		Token  tt = null;
		Aast tt_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			e = LT(1);
			e_AST = (Aast)astFactory.create(e);
			astFactory.makeASTRoot(currentAST, e_AST);
			match(KW_EMPTY);
			e_AST.setType(EMPTY_TEMP_TABLE);
			tt = LT(1);
			tt_AST = (Aast)astFactory.create(tt);
			match(KW_TEMP_TAB);
			hide(tt);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp676_AST = null;
				tmp676_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp676_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			empty_temp_table_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = empty_temp_table_stmt_AST;
	}
	
/**
 * Matches the <code>ENABLE</code> language statement.  Calls the
 * {@link #all_clause}, {@link #field_clause} and {@link #frame_phrase}.
 * <p>
 * The <code>UNLESS-HIDDEN</code> unreserved keyword naturally conflicts with
 * the possible following lvalue.  This is not really ambiguous so warnings
 * have been disabled.
 * <p>
 * This supports an undocumented feature where there is no ALL keyword or field
 * list.  In such a case, this is thought to be a no-operation (at runtime).
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void enable_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast enable_stmt_AST = null;
		Aast a_AST = null;
		Aast fld_AST = null;
		Aast fp_AST = null;
		
		try {      // for error handling
			
			Set<Aast> fields = new HashSet<>();
			
			Aast tmp677_AST = null;
			tmp677_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp677_AST);
			match(KW_ENABLE);
			{
			if ((LA(1)==KW_UNL_HID) && (_tokenSet_121.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp678_AST = null;
				tmp678_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp678_AST);
				match(KW_UNL_HID);
			}
			else if ((_tokenSet_121.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_ALL:
			{
				all_clause();
				a_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_WITH:
			{
				break;
			}
			default:
				if ((_tokenSet_122.member(LA(1)))) {
					{
					int _cnt741=0;
					_loop741:
					do {
						switch ( LA(1)) {
						case KW_SKIP:
						case KW_SPACE:
						{
							space_or_skip();
							astFactory.addASTChild(currentAST, returnAST);
							break;
						}
						case KW_TEXT:
						{
							text_clause();
							astFactory.addASTChild(currentAST, returnAST);
							break;
						}
						case BOOL_TRUE:
						case BOOL_FALSE:
						case DEC_LITERAL:
						case DATE_LITERAL:
						case DATETIME_LITERAL:
						case DATETIME_TZ_LITERAL:
						case HEX_LITERAL:
						case UNQUOTED_TEXT:
						case KW_B_ENDIAN:
						case KW_DLL_C_T:
						case KW_EXC_LOCK:
						case KW_FIND_CS:
						case KW_FIND_GLO:
						case KW_FIND_NO:
						case KW_FIND_PO:
						case KW_FIND_SEL:
						case KW_FIND_WA:
						case KW_FUNC_C_T:
						case KW_GET_A_CT:
						case KW_HOST_B_O:
						case KW_L_ENDIAN:
						case KW_NO_LOCK:
						case KW_NO_WAIT:
						case KW_PROC_C_T:
						case KW_READ_AVL:
						case KW_READ_E_N:
						case KW_ROW_CRTD:
						case KW_ROW_DELD:
						case KW_ROW_MODD:
						case KW_ROW_UMOD:
						case KW_SAX_COMP:
						case KW_SAX_PARE:
						case KW_SAX_RUNN:
						case KW_SAX_UNIN:
						case KW_SAX_WBEG:
						case KW_SAX_WCOM:
						case KW_SAX_WCON:
						case KW_SAX_WELM:
						case KW_SAX_WERR:
						case KW_SAX_WIDL:
						case KW_SAX_WTAG:
						case KW_SEAR_SLF:
						case KW_SEAR_TRG:
						case KW_SET_A_CT:
						case KW_SH_LOCK:
						case KW_WIN_DMIN:
						case KW_WIN_MAX:
						case KW_WIN_MIN:
						case KW_WIN_NORM:
						case STRING:
						case UNKNOWN_VAL:
						case NUM_LITERAL:
						{
							constant_form_item();
							astFactory.addASTChild(currentAST, returnAST);
							break;
						}
						default:
							if ((_tokenSet_64.member(LA(1)))) {
								field_clause(true);
								fld_AST = (Aast)returnAST;
								astFactory.addASTChild(currentAST, returnAST);
								
								int type = fld_AST.getType();
								if (type > BEGIN_FIELDTYPES && type < END_FIELDTYPES)
								{
								fields.add(fld_AST);
								}
								
							}
						else {
							if ( _cnt741>=1 ) { break _loop741; } else {throw new NoViableAltException(LT(1), getFilename());}
						}
						}
						_cnt741++;
					} while (true);
					}
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_window_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_WITH:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_WITH:
			{
				frame_phrase(false, false);
				fp_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			enable_stmt_AST = (Aast)currentAST.root;
			
			String frameName = getFrameName(fp_AST);
			
			if (!fields.isEmpty())
			{
			sym.addFrameFields(frameName, fields);
			}
			
			if (a_AST != null)
			{
			String frame = getFrameName(fp_AST);
			fields = sym.getFrameFields(frame);
			if (fields != null)
			{
			Set<String> exceptFields = new HashSet<>();
			
			if (a_AST.downPath(KW_EXCEPT))
			{
			Aast ref = a_AST.getImmediateChild(CONTENT_ARRAY, null);
			Iterator<Aast> iter = ref.iterator();
			while (iter.hasNext())
			{
			ref = iter.next();
			int type = ref.getType();
			if (type > BEGIN_FIELDTYPES && type < END_FIELDTYPES)
			{
			// EXCEPT fields must not influence HELP
			ref.removeAnnotation("help");
			
			String sname = (String) ref.getAnnotation("schemaname");
			String bname = (String) ref.getAnnotation("bufname");
			
			exceptFields.add(sname + "$" + bname);
			}
			}
			}
			
			ASTPair allPair = new ASTPair();
			astFactory.makeASTRoot(allPair, a_AST);
			for (Aast fld : fields)
			{
			String sname = (String) fld.getAnnotation("schemaname");
			String bname = (String) fld.getAnnotation("bufname");
			
			if (exceptFields.contains(sname + "$" + bname))
			{
			// do not pull fields which are referenced by EXCEPT
			continue;
			}
			
			Aast wid = sym.createField(sname);
			wid.putAnnotation("enable_all", true);
			wid.setHidden(true);
			
			// some annotations are specific to this field definition...
			wid.putAnnotation("bufname", bname);
			wid.putAnnotation("name", (String) fld.getAnnotation("name"));
			
			Aast fmt = new ProgressAst();
			List<Aast> asts = attachAssignSchemaValidation(fmt, wid, sym);
			if (asts != null && !asts.isEmpty())
			{
			a_AST.addChild(wid);
			a_AST.addChild(fmt);
			wid.putAnnotation("enable_all", true);
			fmt.putAnnotation("enable_all", true);
			fmt.setHidden(true);
			fmt.setType(FORMAT_PHRASE);
			fmt.setText("format phrase");
			}
			}
			}
			}
			
			// do this last, as we need the fields for ENABLE ALL processed
			setUseDictExps(frameName, fp_AST, enable_stmt_AST);
			
			enable_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = enable_stmt_AST;
	}
	
/**
 * Matches the <code>EXPORT</code> language statement.
 * <p>
 * Calls:
 * <p>
 * <ul>
 *    <li> {@link #lvalue} (for stream references)
 *    <li> {@link #delimiter_clause}
 *    <li> {@link #record_spec}
 *    <li> {@link #space_or_skip} (undocumented but silently ignored in
 *         Progress)
 *    <li> {@link #export_field}
 * </ul>
 * <p>
 * Used by {@link #stmt_list}.
 * <p>
 * In an undocumented twist, it is perfectly valid to omit any record or
 * field definition in this statement, though it seems to be a NOP in such
 * a case.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 */
	public final void export_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast export_stmt_AST = null;
		Aast ss_AST = null;
		
		try {      // for error handling
			Aast tmp679_AST = null;
			tmp679_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp679_AST);
			match(KW_EXPORT);
			{
			if (((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_77.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_DELIMIT) && (LA(2)==STRING) && (_tokenSet_77.member(LA(3)))) {
				delimiter_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_77.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((_tokenSet_13.member(LA(1))) && (LA(2)==DOT||LA(2)==KW_EXCEPT||LA(2)==KW_NO_LOBS) && (_tokenSet_11.member(LA(3))))&&( isRecord(LT(1).getText()) )) {
				record_spec(null);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				_loop758:
				do {
					if ((LA(1)==KW_SKIP||LA(1)==KW_SPACE) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						space_or_skip();
						ss_AST = (Aast)returnAST;
						hide(ss_AST);
					}
					else if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_NO_LOBS )) {
						export_field();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop758;
					}
					
				} while (true);
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_NO_LOBS:
			{
				Aast tmp680_AST = null;
				tmp680_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp680_AST);
				match(KW_NO_LOBS);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			export_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = export_stmt_AST;
	}
	
/**
 * Implements a <code>KW_FINALLY</code> block which is part of the structured
 * error handling added in 10.2x. This uses the {@link #block} and 
 * {@link #end_stmt} sub-rules to match and build the tree.  The tree will be
 * rooted at the <code>KW_FINALLY</code> node.  Variable and schema scopes are
 * pushed and popped in this statement.
 */
	public final void finally_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast finally_stmt_AST = null;
		
		try {      // for error handling
			{
			Aast tmp681_AST = null;
			tmp681_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp681_AST);
			match(KW_FINALLY);
			block_term();
			astFactory.addASTChild(currentAST, returnAST);
			block();
			astFactory.addASTChild(currentAST, returnAST);
			end_stmt(true);
			astFactory.addASTChild(currentAST, returnAST);
			}
			finally_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = finally_stmt_AST;
	}
	
/**
 * Matches a <code>GET</code> language statement, the required keywords and
 * query name (see {@link #query_reference}).  It supports all possible
 * options, in any order.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void get_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast get_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp682_AST = null;
			tmp682_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp682_AST);
			match(KW_GET);
			{
			switch ( LA(1)) {
			case KW_FIRST:
			{
				Aast tmp683_AST = null;
				tmp683_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp683_AST);
				match(KW_FIRST);
				break;
			}
			case KW_LAST:
			{
				Aast tmp684_AST = null;
				tmp684_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp684_AST);
				match(KW_LAST);
				break;
			}
			case KW_PREV:
			{
				Aast tmp685_AST = null;
				tmp685_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp685_AST);
				match(KW_PREV);
				break;
			}
			case KW_NEXT:
			{
				Aast tmp686_AST = null;
				tmp686_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp686_AST);
				match(KW_NEXT);
				break;
			}
			case KW_CURRENT:
			{
				Aast tmp687_AST = null;
				tmp687_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp687_AST);
				match(KW_CURRENT);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			query_reference();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1219:
			do {
				switch ( LA(1)) {
				case KW_EXC_LOCK:
				case KW_NO_LOCK:
				case KW_SH_LOCK:
				{
					{
					switch ( LA(1)) {
					case KW_SH_LOCK:
					{
						Aast tmp688_AST = null;
						tmp688_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp688_AST);
						match(KW_SH_LOCK);
						break;
					}
					case KW_EXC_LOCK:
					{
						Aast tmp689_AST = null;
						tmp689_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp689_AST);
						match(KW_EXC_LOCK);
						break;
					}
					case KW_NO_LOCK:
					{
						Aast tmp690_AST = null;
						tmp690_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp690_AST);
						match(KW_NO_LOCK);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_NO_WAIT:
				{
					Aast tmp691_AST = null;
					tmp691_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp691_AST);
					match(KW_NO_WAIT);
					break;
				}
				default:
				{
					break _loop1219;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			get_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = get_stmt_AST;
	}
	
/**
 * Matches the <code>GET-KEY-VALUE</code> statement.  Calls the following:
 * <p>
 * <ul>
 *    <li> {@link #section_clause}
 *    <li> {@link #key_clause} 
 *    <li> {@link #value_clause}
 * </ul>
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void get_key_value_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast get_key_value_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp692_AST = null;
			tmp692_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp692_AST);
			match(KW_GET_K_V);
			section_clause();
			astFactory.addASTChild(currentAST, returnAST);
			key_clause();
			astFactory.addASTChild(currentAST, returnAST);
			value_clause();
			astFactory.addASTChild(currentAST, returnAST);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			get_key_value_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = get_key_value_stmt_AST;
	}
	
/**   
 * Matches the <code>HIDE</code> language statement.  Calls the
 * {@link #lvalue} for stream references, {@link #widget_phrase} and 
 * {@link #in_window_clause} rules.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void hide_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast hide_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp693_AST = null;
			tmp693_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp693_AST);
			match(KW_HIDE);
			{
			if (((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_123.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_MSG:
			{
				Aast tmp694_AST = null;
				tmp694_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp694_AST);
				match(KW_MSG);
				break;
			}
			case KW_ALL:
			{
				Aast tmp695_AST = null;
				tmp695_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp695_AST);
				match(KW_ALL);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_NO_PAUSE:
			{
				break;
			}
			default:
				if ((_tokenSet_124.member(LA(1)))) {
					{
					int _cnt722=0;
					_loop722:
					do {
						if ((_tokenSet_124.member(LA(1)))) {
							widget_phrase();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else {
							if ( _cnt722>=1 ) { break _loop722; } else {throw new NoViableAltException(LT(1), getFilename());}
						}
						
						_cnt722++;
					} while (true);
					}
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_PAUSE:
			{
				Aast tmp696_AST = null;
				tmp696_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp696_AST);
				match(KW_NO_PAUSE);
				break;
			}
			case DOT:
			case KW_IN:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_window_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			hide_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = hide_stmt_AST;
	}
	
/**   
 * Matches the <code>IF THEN ELSE</code> language statement.  This rule uses   
 * rule references {@link #then_clause} and {@link #else_clause} to properly
 * build the AST.
 * <p>
 * This language statement has inherent ambiguity with the built-in function
 * that uses the same <code>IF THEN ELSE</code> keywords (and has a nearly
 * identical meaning but is only for use in expressions).  Progress gives
 * precedence to matching the language statement first and then the function
 * form.  This parser implements this rule in the {@link #statement} portion
 * of the top-level {@link #single_block} rule.  Since this is matched before
 * expressions (which are in the {@link #assignment} rule which has lower
 * precedence than <code>statement</code>) the logic works properly and all
 * ambiguity is resolved.
 * <p>
 * Note that there is another inherent ambiguity in this construction.  It is
 * the classic problem with the optional <code>ELSE</code> portion of the
 * rule. The standard matching of ANTLR in this case already resolves the
 * detected ambiguity so there is nothing to do except disable the warnings.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void if_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast if_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp697_AST = null;
			tmp697_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp697_AST);
			match(KW_IF);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			then_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_ELSE) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				else_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			if_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = if_stmt_AST;
	}
	
/**
 * Matches the <code>IMPORT</code> language statement.
 * <p>
 * Calls:
 * <p>
 * <ul>
 *    <li> {@link #lvalue} (for stream references)
 *    <li> {@link #unformatted_clause}
 *    <li> {@link #delimiter_clause}
 *    <li> {@link #record_spec}
 *    <li> {@link #import_field} (undocumented feature: this can be zero or more instead of
 *         one or more as the 4GL docs indicate)
 * </ul>
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void import_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast import_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp698_AST = null;
			tmp698_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp698_AST);
			match(KW_IMPORT);
			{
			if (((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_125.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_UNFORMAT)) {
				unformatted_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_126.member(LA(1)))) {
				{
				if ((LA(1)==KW_DELIMIT)) {
					delimiter_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_127.member(LA(1)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				{
				if (((_tokenSet_13.member(LA(1))) && (_tokenSet_128.member(LA(2))) && (_tokenSet_11.member(LA(3))))&&( isRecord(LT(1).getText()) )) {
					record_spec(null);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_129.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					_loop770:
					do {
						if ((LA(1)==CARET)) {
							Aast tmp699_AST = null;
							tmp699_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp699_AST);
							match(CARET);
						}
						else if ((_tokenSet_64.member(LA(1)))) {
							import_field();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else {
							break _loop770;
						}
						
					} while (true);
					}
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_NO_LOBS:
			{
				Aast tmp700_AST = null;
				tmp700_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp700_AST);
				match(KW_NO_LOBS);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp701_AST = null;
				tmp701_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp701_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			import_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = import_stmt_AST;
	}
	
/**
 * Matches the various permutations of language statements that start with
 * the <code>INPUT, INPUT-OUTPUT or OUTPUT</code> keywords.  It matches
 * these keywords and then switches into the correct alternative based on the
 * lookahead tokens.
 * <p>
 * This rule is called by {@link #stmt_list} and it handles the matching
 * unambiguously by left factoring the common keywords for multiple language
 * statements. The alternatives:  
 * <ul>
 *    <li> CLEAR (so simple that it is inlined)
 *    <li> CLOSE (so simple that it is inlined)
 *    <li> FROM {@link #io_from_to_stmt}
 *    <li> THROUGH/THRU {@link #io_through_stmt}
 *    <li> TO {@link #io_from_to_stmt}
 * </ul>
 * <p>
 * Certain alternatives can be followed by a reference to
 * {@link #io_common_options}.
 */
	public final void io_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast io_stmt_AST = null;
		Token  inp = null;
		Aast inp_AST = null;
		Token  ino = null;
		Aast ino_AST = null;
		Token  otp = null;
		Aast otp_AST = null;
		Token  cl = null;
		Aast cl_AST = null;
		Token  clo = null;
		Aast clo_AST = null;
		
		try {      // for error handling
			
			boolean input  = true;
			boolean output = false;
			boolean thru   = false;
			Token t = LT(1);
			AST io_root = (Aast)astFactory.make( (new ASTArray(1)).add((Aast)astFactory.create(KW_INPUT,"i/o stmt")));  // placeholder
			((Aast) io_root).setLine(t.getLine());
			((Aast) io_root).setColumn(t.getColumn());
			
			astFactory.makeASTRoot(currentAST, io_root);         
			
			{
			{
			switch ( LA(1)) {
			case KW_INPUT:
			{
				inp = LT(1);
				inp_AST = (Aast)astFactory.create(inp);
				match(KW_INPUT);
				hide(inp);
				break;
			}
			case KW_IN_OUT:
			{
				ino = LT(1);
				ino_AST = (Aast)astFactory.create(ino);
				match(KW_IN_OUT);
				hide(ino); input = false;
				break;
			}
			case KW_OUTPUT:
			{
				otp = LT(1);
				otp_AST = (Aast)astFactory.create(otp);
				match(KW_OUTPUT);
				hide(otp); input = false; output = true;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if (((LA(1)==KW_CLEAR))&&( input )) {
				cl = LT(1);
				cl_AST = (Aast)astFactory.create(cl);
				match(KW_CLEAR);
				hide(cl); io_root.setType(INPUT_CLEAR);
			}
			else if ((_tokenSet_130.member(LA(1)))) {
				{
				if (((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_131.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				{
				switch ( LA(1)) {
				case KW_CLOSE:
				{
					clo = LT(1);
					clo_AST = (Aast)astFactory.create(clo);
					match(KW_CLOSE);
					hide(clo);
					
					if (input)
					{
					io_root.setType(INPUT_CLOSE);
					}
					else if (output)
					{
					io_root.setType(OUTPUT_CLOSE);
					}
					else
					{
					io_root.setType(INPUT_OUTPUT_CLOSE);
					}
					
					break;
				}
				case KW_FROM:
				case KW_TO:
				case KW_THROUGH:
				{
					{
					if (((LA(1)==KW_FROM||LA(1)==KW_TO))&&( input || output )) {
						io_from_to_stmt();
						astFactory.addASTChild(currentAST, returnAST);
						
						if (input)
						{
						io_root.setType(INPUT_FROM);
						}
						else
						{
						io_root.setType(OUTPUT_TO);
						}
						
					}
					else if ((LA(1)==KW_THROUGH)) {
						io_through_stmt();
						astFactory.addASTChild(currentAST, returnAST);
						
						thru = true;
						
						if (input)
						{
						io_root.setType(INPUT_THRU);
						}
						else if (output)
						{
						io_root.setType(OUTPUT_THRU);
						}
						else
						{
						io_root.setType(INPUT_OUTPUT_THRU);
						}
						
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					io_common_options(output, thru);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			}
			io_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = io_stmt_AST;
	}
	
/**   
 * Matches the <code>LOAD</code> language statement with a required following
 * {@link #expr}.  All options are supported and the following rules can
 * be called:
 * <p>
 * <ul>
 *    <li> {@link #dir_clause}
 *    <li> {@link #base_key_clause}          
 * </ul>
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void load_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast load_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp702_AST = null;
			tmp702_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp702_AST);
			match(KW_LOAD);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop955:
			do {
				switch ( LA(1)) {
				case KW_DIR:
				{
					dir_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_APPL:
				{
					Aast tmp703_AST = null;
					tmp703_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp703_AST);
					match(KW_APPL);
					break;
				}
				case KW_NEW:
				{
					Aast tmp704_AST = null;
					tmp704_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp704_AST);
					match(KW_NEW);
					break;
				}
				case KW_BASE_KEY:
				{
					base_key_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_NO_ERROR:
				{
					Aast tmp705_AST = null;
					tmp705_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp705_AST);
					match(KW_NO_ERROR);
					break;
				}
				default:
				{
					break _loop955;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			load_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = load_stmt_AST;
	}
	
/**
 * Matches the Progress <code>MESSAGE</code> language statement and builds
 * the resulting AST nodes.  The string parameter is expressed as a call
 * to the {@link #expr} rule.
 * <p>
 * The following list of rules are called to properly implement the tree
 * building:
 * <p>
 * <ul>
 *    <li> {@link #simple_color_clause}
 *    <li> {@link #content_array}
 *    <li> {@link #view_as_alert_box_clause}
 *    <li> {@link #set_or_update_clause}
 *    <li> {@link #in_window_clause} 
 * </ul>
 * <p> 
 * These options can be in any order.  Contrary to the Progress documentation,
 * it is also possible to have no expression as a message (this has been
 * found in customer code and it works fine).
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void msg_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast msg_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp706_AST = null;
			tmp706_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp706_AST);
			match(KW_MSG);
			{
			if ((LA(1)==KW_COLOR) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				simple_color_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			content_array();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1544:
			do {
				switch ( LA(1)) {
				case KW_VIEW_AS:
				{
					view_as_alert_box_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_SET:
				case KW_UPDATE:
				{
					set_or_update_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop1544;
				}
				}
			} while (true);
			}
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_window_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			msg_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = msg_stmt_AST;
	}
	
/**   
 * Matches the <code>NEXT and LEAVE</code> language statements.  Calls the
 * {@link #label_reference} to resolve the optional label.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void next_or_leave_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast next_or_leave_stmt_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_NEXT:
			{
				Aast tmp707_AST = null;
				tmp707_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp707_AST);
				match(KW_NEXT);
				break;
			}
			case KW_LEAVE:
			{
				Aast tmp708_AST = null;
				tmp708_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp708_AST);
				match(KW_LEAVE);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			label_reference();
			astFactory.addASTChild(currentAST, returnAST);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			next_or_leave_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = next_or_leave_stmt_AST;
	}
	
/**   
 * Matches the <code>ON</code> language statement (which defines a trigger
 * block) and implements all possible variants.
 * <p>
 * Used by {@link #stmt_list} and {@link #trigger_phrase}.
 * <p>
 * The use of the <code>event</code> rule in the leftmost token position
 * is naturally ambiguous with the use of the <code>comma_event_list</code>  
 * since this also has an <code>event</code> in the leftmost position.
 * In this case, ANTLR does not detect any ambiguity since the first
 * alternative (<code>event</code>) must be followed by a match with the
 * very specific <code>key_function</code> rule, so the k = 2 is enough to
 * disambiguate this situation.
 * <p>
 * Uses:
 * <p>
 * <ul>
 *    <li> {@link #db_event}
 *    <li> {@link #record}
 *    <li> {@link #lvalue}
 *    <li> {@link #write_referencing_phrase}
 *    <li> {@link #assign_trigger_old_var_def}
 *    <li> {@link #event}
 *    <li> {@link #comma_event_list}
 *    <li> {@link #key_function}
 *    <li> {@link #comma_widget_list}
 *    <li> {@link #comma_events_of_widgets_clause}
 *    <li> {@link #persistent_trigger_procedure}
 *    <li> {@link #single_block}  (this is the actual implementation for
 *         the Progress trigger block)
 * </ul>
 * <p>
 * This is the location in which we add and remove scopes to the symbol
 * dictionary for trigger blocks.
 * <p>
 * Bogus ambiguity warnings by ANTLR have been disabled.  One of the warnings
 * started when the {@link #record_funcs} rule was added to 
 * {@link #primary_expr}, as it creates apparent ambiguity with the
 * <code>referencing_phrase</code>.  The ambiguity is not real.
 */
	public final void on_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast on_stmt_AST = null;
		Aast evtRef_AST = null;
		Token  of = null;
		Aast of_AST = null;
		Aast recRef_AST = null;
		Aast fldRef_AST = null;
		
		try {      // for error handling
			
			boolean bypass = false;
			boolean buf    = false;
			Aast    ref    = null;
			Aast    dbEvRef = null;
			Aast    recRef = null;
			Aast    fldRef = null;
			Aast    evtRef = null;
			int     eventType;
			
			NameNode nothing = null;
			
			boolean oldBufScope = setupTriggerScope();
			
			Aast tmp709_AST = null;
			tmp709_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp709_AST);
			match(KW_ON);
			
			fixupKeyboardModifiers();
			
			{
			if (((_tokenSet_132.member(LA(1))) && (LA(2)==KW_OF) && (_tokenSet_49.member(LA(3))))&&( 
              (sym.isTable(LT(3).getText()) && LA(1) != KW_ASSIGN) ||
              (sym.isField(LT(3).getText()) && LA(1) == KW_ASSIGN)
           )) {
				{
				db_event();
				evtRef_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				of = LT(1);
				of_AST = (Aast)astFactory.create(of);
				match(KW_OF);
				hide(of);
				{
				eventType = evtRef_AST.getChildAt(0).getType();
				{
				if (((_tokenSet_13.member(LA(1))) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( eventType == KW_CREATE || eventType == KW_DELETE || eventType == KW_FIND )) {
					{
					nothing=record(true, false, false);
					astFactory.addASTChild(currentAST, returnAST);
					}
				}
				else if (((_tokenSet_13.member(LA(1))) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( eventType == KW_WRITE )) {
					{
					nothing=record(true, false, false);
					recRef_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					{
					_loop880:
					do {
						if ((LA(1)==KW_NEW||LA(1)==KW_OLD) && (_tokenSet_15.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
							write_referencing_phrase(recRef_AST);
							astFactory.addASTChild(currentAST, returnAST);
						}
						else {
							break _loop880;
						}
						
					} while (true);
					}
					{
					_loop882:
					do {
						if ((LA(1)==KW_NEW||LA(1)==KW_OLD) && (_tokenSet_15.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
							write_referencing_phrase(recRef_AST);
							astFactory.addASTChild(currentAST, returnAST);
						}
						else {
							break _loop882;
						}
						
					} while (true);
					}
					}
				}
				else if (((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( eventType == KW_ASSIGN )) {
					{
					lvalue();
					fldRef_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					assign_trigger_old_var_def(fldRef_AST);
					astFactory.addASTChild(currentAST, returnAST);
					}
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				}
				{
				if ((LA(1)==KW_OVERRIDE) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp710_AST = null;
					tmp710_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp710_AST);
					match(KW_OVERRIDE);
				}
				else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				}
			}
			else if ((_tokenSet_108.member(LA(1))) && (_tokenSet_133.member(LA(2)))) {
				event();
				astFactory.addASTChild(currentAST, returnAST);
				key_function();
				astFactory.addASTChild(currentAST, returnAST);
				stmt_term();
				astFactory.addASTChild(currentAST, returnAST);
				bypass = true;
			}
			else if ((_tokenSet_108.member(LA(1))) && (LA(2)==KW_OF||LA(2)==KW_ANYWHERE||LA(2)==COMMA) && (_tokenSet_134.member(LA(3)))) {
				comma_event_list();
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case KW_ANYWHERE:
				{
					Aast tmp711_AST = null;
					tmp711_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp711_AST);
					match(KW_ANYWHERE);
					break;
				}
				case KW_OF:
				{
					Aast tmp712_AST = null;
					tmp712_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp712_AST);
					match(KW_OF);
					comma_widget_list();
					astFactory.addASTChild(currentAST, returnAST);
					{
					_loop887:
					do {
						if ((LA(1)==KW_ANYWHERE) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
							Aast tmp713_AST = null;
							tmp713_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp713_AST);
							match(KW_ANYWHERE);
						}
						else if ((LA(1)==KW_OR) && (_tokenSet_108.member(LA(2))) && (LA(3)==KW_OF||LA(3)==COMMA)) {
							comma_events_of_widgets_clause();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else {
							break _loop887;
						}
						
					} while (true);
					}
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((_tokenSet_10.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( bypass == false )) {
				{
				if ((LA(1)==KW_REVERT) && (LA(2)==DOT) && (_tokenSet_11.member(LA(3)))) {
					Aast tmp714_AST = null;
					tmp714_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp714_AST);
					match(KW_REVERT);
					stmt_term();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_PERSIST) && (LA(2)==KW_RUN) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
					persistent_trigger_procedure();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_10.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					single_block(true, true);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_END) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					end_stmt_with_no_beginning();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			clearTriggerScope(oldBufScope);
			
			on_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = on_stmt_AST;
	}
	
/**
 * Matches the <code>OS-APPEND, OS-COPY and OS-RENAME</code> language
 * statements. Calls {@link #external_name_spec}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void os_misc_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast os_misc_stmt_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_OS_APPND:
			{
				Aast tmp715_AST = null;
				tmp715_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp715_AST);
				match(KW_OS_APPND);
				break;
			}
			case KW_OS_COPY:
			{
				Aast tmp716_AST = null;
				tmp716_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp716_AST);
				match(KW_OS_COPY);
				break;
			}
			case KW_OS_REN:
			{
				Aast tmp717_AST = null;
				tmp717_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp717_AST);
				match(KW_OS_REN);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			external_name_spec();
			astFactory.addASTChild(currentAST, returnAST);
			external_name_spec();
			astFactory.addASTChild(currentAST, returnAST);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			os_misc_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = os_misc_stmt_AST;
	}
	
/**
 * Matches the <code>OS-CREATE-DIR</code> language statement. Calls 
 * {@link #external_name_spec}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void os_create_dir_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast os_create_dir_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp718_AST = null;
			tmp718_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp718_AST);
			match(KW_OS_MKDIR);
			{
			int _cnt1816=0;
			_loop1816:
			do {
				// nongreedy exit test
				if ( _cnt1816>=1 && (LA(1)==DOT||LA(1)==KW_NO_ERROR) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) break _loop1816;
				if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					external_name_spec();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					if ( _cnt1816>=1 ) { break _loop1816; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt1816++;
			} while (true);
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp719_AST = null;
				tmp719_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp719_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			os_create_dir_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = os_create_dir_stmt_AST;
	}
	
/**
 * Matches the <code>OS-DELETE</code> language statement. Calls {@link #value}
 * and {@link #filename} rules.
 * <p>
 * The use of the <code>filename</code> rule in a loop is in conflict with
 * the non-reserved <code>RECURSIVE</code> keyword.  For this reason, the
 * loop has be made non-greedy and the bogus ambiguity warnings have been
 * disabled.
 * <p>
 * Supports an undocumented <code>NO-ERROR</code> keyword at the end.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void os_delete_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast os_delete_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp720_AST = null;
			tmp720_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp720_AST);
			match(KW_OS_DEL);
			{
			int _cnt1810=0;
			_loop1810:
			do {
				// nongreedy exit test
				if ( _cnt1810>=1 && (LA(1)==DOT||LA(1)==KW_NO_ERROR||LA(1)==KW_RECURSE) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) break _loop1810;
				if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					external_name_spec();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					if ( _cnt1810>=1 ) { break _loop1810; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt1810++;
			} while (true);
			}
			{
			if ((LA(1)==KW_RECURSE) && (LA(2)==DOT)) {
				Aast tmp721_AST = null;
				tmp721_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp721_AST);
				match(KW_RECURSE);
			}
			else if ((LA(1)==KW_NO_ERROR) && (LA(2)==DOT)) {
				Aast tmp722_AST = null;
				tmp722_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp722_AST);
				match(KW_NO_ERROR);
			}
			else if ((LA(1)==KW_RECURSE) && (LA(2)==KW_NO_ERROR)) {
				{
				Aast tmp723_AST = null;
				tmp723_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp723_AST);
				match(KW_RECURSE);
				Aast tmp724_AST = null;
				tmp724_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp724_AST);
				match(KW_NO_ERROR);
				}
			}
			else if ((LA(1)==KW_NO_ERROR) && (LA(2)==KW_RECURSE)) {
				{
				Aast tmp725_AST = null;
				tmp725_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp725_AST);
				match(KW_NO_ERROR);
				Aast tmp726_AST = null;
				tmp726_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp726_AST);
				match(KW_RECURSE);
				}
			}
			else if ((LA(1)==DOT)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			os_delete_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = os_delete_stmt_AST;
	}
	
/**   
 * Matches the <code>PAGE</code> language statement.  Optionally calls the
 * {@link #lvalue} rule for stream references.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void page_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast page_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp727_AST = null;
			tmp727_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp727_AST);
			match(KW_PAGE);
			{
			if (((_tokenSet_64.member(LA(1))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			page_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = page_stmt_AST;
	}
	
/**   
 * Matches the <code>PAUSE</code> language statement.  Calls the
 * {@link #in_window_clause} and {@link #simple_message_clause} rules.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void pause_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast pause_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp728_AST = null;
			tmp728_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp728_AST);
			match(KW_PAUSE);
			{
			if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_B4_HIDE && LA(1) != KW_MSG && LA(1) != KW_IN && LA(1) != KW_NO_MSG )) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_135.member(LA(1))) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop728:
			do {
				switch ( LA(1)) {
				case KW_B4_HIDE:
				{
					Aast tmp729_AST = null;
					tmp729_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp729_AST);
					match(KW_B4_HIDE);
					break;
				}
				case KW_MSG:
				case KW_NO_MSG:
				{
					simple_message_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_IN:
				{
					in_window_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop728;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			pause_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = pause_stmt_AST;
	}
	
/**      
 * Matches the <code>PUBLISH</code> language statement, the required
 * following character {@link #expr} and all options.  Uses the
 * {@link #from_handle_clause} and {@link #param_passing_list} rules.
 * <p>
 * Called from {@link #stmt_list}.
 */
	public final void publish_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast publish_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp730_AST = null;
			tmp730_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp730_AST);
			match(KW_PUBLISH);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_FROM:
			{
				from_handle_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_GLOBAL:
			case LPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_GLOBAL:
			{
				Aast tmp731_AST = null;
				tmp731_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp731_AST);
				match(KW_GLOBAL);
				break;
			}
			case DOT:
			case LPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case LPARENS:
			{
				param_passing_list(false);
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			publish_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = publish_stmt_AST;
	}
	
/**
 * Matches the <code>PUT SCREEN</code> language statement.  Calls the
 * {@link #simple_color_clause}, {@link #ui_stuff} and {@link #expr}.
 * <p>
 * The <code>ui_stuff</code> rule uses unreserved keywords that naturally
 * conflict with the possible following expression.  This is not really 
 * ambiguous so warnings have been disabled.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void put_screen_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast put_screen_stmt_AST = null;
		Token  p = null;
		Aast p_AST = null;
		Token  sc = null;
		Aast sc_AST = null;
		
		try {      // for error handling
			p = LT(1);
			p_AST = (Aast)astFactory.create(p);
			astFactory.makeASTRoot(currentAST, p_AST);
			match(KW_PUT);
			p_AST.setType(PUT_SCREEN);
			sc = LT(1);
			sc_AST = (Aast)astFactory.create(sc);
			match(KW_SCREEN);
			hide(sc);
			{
			_loop747:
			do {
				if ((LA(1)==KW_ATTR||LA(1)==KW_NO_ATTR) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_ATTR:
					{
						Aast tmp732_AST = null;
						tmp732_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp732_AST);
						match(KW_ATTR);
						break;
					}
					case KW_NO_ATTR:
					{
						Aast tmp733_AST = null;
						tmp733_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp733_AST);
						match(KW_NO_ATTR);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_COLOR) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					simple_color_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( LA(1) == KW_ROW || LA(1) == KW_COL || LA(1) == KW_COLUMNS )) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop747;
				}
				
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			put_screen_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = put_screen_stmt_AST;
	}
	
/**
 * Matches the <code>PUT CURSOR</code> language statement and builds the
 * associated AST.  Calls {@link #ui_stuff} for the ROW and COL options.
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void put_cursor_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast put_cursor_stmt_AST = null;
		Token  p = null;
		Aast p_AST = null;
		Token  cur = null;
		Aast cur_AST = null;
		
		try {      // for error handling
			p = LT(1);
			p_AST = (Aast)astFactory.create(p);
			astFactory.makeASTRoot(currentAST, p_AST);
			match(KW_PUT);
			p_AST.setType(PUT_CURSOR);
			cur = LT(1);
			cur_AST = (Aast)astFactory.create(cur);
			match(KW_CURSOR);
			hide(cur);
			{
			if ((LA(1)==KW_OFF)) {
				Aast tmp734_AST = null;
				tmp734_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp734_AST);
				match(KW_OFF);
			}
			else if (((_tokenSet_47.member(LA(1))))&&( LA(1) == KW_ROW || LA(1) == KW_COL || LA(1) == KW_COLUMNS )) {
				ui_stuff();
				astFactory.addASTChild(currentAST, returnAST);
				{
				if (((_tokenSet_47.member(LA(1))))&&( LA(1) == KW_ROW || LA(1) == KW_COL || LA(1) == KW_COLUMNS )) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==DOT)) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			put_cursor_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = put_cursor_stmt_AST;
	}
	
	public final void put_key_value_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast put_key_value_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp735_AST = null;
			tmp735_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp735_AST);
			match(KW_PUT_K_V);
			{
			switch ( LA(1)) {
			case KW_SECTION:
			{
				{
				section_clause();
				astFactory.addASTChild(currentAST, returnAST);
				key_clause();
				astFactory.addASTChild(currentAST, returnAST);
				value_clause();
				astFactory.addASTChild(currentAST, returnAST);
				}
				break;
			}
			case KW_COLOR:
			case KW_FONT:
			{
				color_or_font_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp736_AST = null;
				tmp736_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp736_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			put_key_value_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = put_key_value_stmt_AST;
	}
	
/**
 * Matches the <code>PUT</code> language statement and builds the
 * associated AST.
 * <p>
 * The following list of rules are called to properly implement the tree
 * building:
 * <p>
 * <ul>
 *    <li> {@link #lvalue} (for stream references)
 *    <li> {@link #space_or_skip} 
 *    <li> {@link #null_clause}
 *    <li> {@link #put_field}
 * </ul>
 * <p> 
 * Called by {@link #stmt_list}.
 */
	public final void put_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast put_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp737_AST = null;
			tmp737_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp737_AST);
			match(KW_PUT);
			{
			if (((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_UNFORMAT) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp738_AST = null;
				tmp738_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp738_AST);
				match(KW_UNFORMAT);
			}
			else if ((LA(1)==KW_CONTROL) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp739_AST = null;
				tmp739_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp739_AST);
				match(KW_CONTROL);
			}
			else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop1511:
			do {
				if ((LA(1)==KW_SKIP||LA(1)==KW_SPACE) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					runtime_space_or_skip();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NULL) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					null_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					put_field();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1511;
				}
				
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			put_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = put_stmt_AST;
	}
	
/**
 * Matches the <code>RAW-TRANSFER</code> language statement.
 * <p>
 * Calls {@link #buffer_or_field_spec}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void raw_transfer_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast raw_transfer_stmt_AST = null;
		Token  to = null;
		Aast to_AST = null;
		
		try {      // for error handling
			Aast tmp740_AST = null;
			tmp740_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp740_AST);
			match(KW_RAW_TRAN);
			buffer_or_field_spec();
			astFactory.addASTChild(currentAST, returnAST);
			to = LT(1);
			to_AST = (Aast)astFactory.create(to);
			match(KW_TO);
			hide(to);
			buffer_or_field_spec();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp741_AST = null;
				tmp741_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp741_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			raw_transfer_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = raw_transfer_stmt_AST;
	}
	
/**
 * Matches the <code>READKEY</code> language statement.  Optionally calls the
 * {@link #lvalue} (for stream references) and {@link #pause_clause} rules.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void readkey_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast readkey_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp742_AST = null;
			tmp742_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp742_AST);
			match(KW_READKEY);
			{
			if (((_tokenSet_64.member(LA(1))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT||LA(1)==KW_PAUSE)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_PAUSE:
			{
				pause_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			readkey_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = readkey_stmt_AST;
	}
	
/**
 * Matches a <code>RELEASE EXTERNAL</code> language statement, and the following required
 * {@link #expr}.  This also supports the use of NO-ERROR (undocumented 4GL feature).
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void release_external_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast release_external_stmt_AST = null;
		Token  r = null;
		Aast r_AST = null;
		Token  exe = null;
		Aast exe_AST = null;
		Token  pr = null;
		Aast pr_AST = null;
		
		try {      // for error handling
			r = LT(1);
			r_AST = (Aast)astFactory.create(r);
			astFactory.makeASTRoot(currentAST, r_AST);
			match(KW_RELEASE);
			r_AST.setType(RELEASE_EXTERNAL);
			exe = LT(1);
			exe_AST = (Aast)astFactory.create(exe);
			match(KW_EXTERN);
			hide(exe);
			{
			if ((LA(1)==KW_PROC) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				pr = LT(1);
				pr_AST = (Aast)astFactory.create(pr);
				match(KW_PROC);
				hide(pr);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp743_AST = null;
				tmp743_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp743_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			release_external_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = release_external_stmt_AST;
	}
	
/**
 * Matches a <code>RELEASE OBJECT</code> language statement, and the
 * following required {@link #expr}.  The Progress documentation states that
 * it should be a <code>COM-HANDLE</code>, but does not state whether this is
 * allowed to be any expression that evaluates to a <code>COM-HANDLE</code>.
 * Customer source code shows that any expression will work. 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void release_object_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast release_object_stmt_AST = null;
		Token  r = null;
		Aast r_AST = null;
		Token  ob = null;
		Aast ob_AST = null;
		
		try {      // for error handling
			r = LT(1);
			r_AST = (Aast)astFactory.create(r);
			astFactory.makeASTRoot(currentAST, r_AST);
			match(KW_RELEASE);
			r_AST.setType(RELEASE_OBJECT);
			ob = LT(1);
			ob_AST = (Aast)astFactory.create(ob);
			match(KW_OBJECT);
			hide(ob);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp744_AST = null;
				tmp744_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp744_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			release_object_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = release_object_stmt_AST;
	}
	
/**
 * Matches the <code>RELEASE</code> language statement.  Calls the 
 * {@link #record}.
 * <p>
 * <b>At this time, the record scope in the schema is not removed when this
 * rule is called.  This may be something that is needed in some obscure
 * case. To implement this, one would have to call 
 * {@link SymbolResolver#deleteSchemaScope} as well as notify the 
 * {@link #inner_block} rule so that it doesn't try to delete the same scope 
 * (this is non-trivial due to nesting). Watch for problems that might arise
 * from this choice to ignore the scope deletion.</b>
 * <p>
 * Called by the {@link #stmt_list} rule.
 */
	public final void release_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast release_stmt_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			Aast tmp745_AST = null;
			tmp745_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp745_AST);
			match(KW_RELEASE);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp746_AST = null;
				tmp746_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp746_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			release_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = release_stmt_AST;
	}
	
/**
 * Matches a <code>REPOSITION</code> language statement, the required
 * following query name (see {@link #query_reference}) and repositioning
 * information.  Uses {@link #to_recid_or_rowid_clause} and 
 * {@link #reposition_spec} rules.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void reposition_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast reposition_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp747_AST = null;
			tmp747_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp747_AST);
			match(KW_REPOS);
			query_reference();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_TO:
			{
				to_recid_or_rowid_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_BACKWARD:
			case KW_FORWARD:
			{
				reposition_spec();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp748_AST = null;
				tmp748_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp748_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			reposition_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = reposition_stmt_AST;
	}
	
/**
 * Matches the Progress <code>RETURN</code> statement using a rule reference
 * to {@link #return_core} and builds the resulting AST.  The core logic is in
 * the rule reference rather than here.  The separation was made to allow
 * the following <code>DOT</code> to be visible as a standalone language
 * statement when called from this rule.  The <code>return_core</code> rule
 * can also be called as a component of another language statement rather than 
 * a statement that requires such a separator.
 */
	public final void return_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast return_stmt_AST = null;
		
		try {      // for error handling
			return_core();
			astFactory.addASTChild(currentAST, returnAST);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			return_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = return_stmt_AST;
	}
	
/**
 * Matches the <code>KW_ROUTINEL</code> keyword with a following {@link #on_event_phrase}.
 */
	public final void routine_level_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast routine_level_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp749_AST = null;
			tmp749_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp749_AST);
			match(KW_ROUTINEL);
			on_event_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			routine_level_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = routine_level_stmt_AST;
	}
	
/**
 * Matches the <code>RUN STORED-PROCEDURE</code> language statement, the
 * following {@link #reserved_or_symbol}, the optional {@link #assign}
 * and optional {@link #param_passing_list}. The result will be rooted at a
 * <code>RUN_STORED_PROCEDURE</code> node.  Called from {@link #stmt_list}.
 * <p>
 * Warning: this is an early implementation which does not yet support the
 * notion that a stored procedure is like a special kind of table type. The
 * stored procedure is a schema object created in the database supported
 * by a 4GL data server.  That schema object is known to the 4GL and it
 * is called with optional parameters (and must be closed when done). But
 * to get the data out of the results, Progress creates a buffer of the same
 * name as the procedure, which can be used in record phrases to read the
 * data. Likewise, there are properties defined for the results which are
 * treated like fields.  The schema dictionary, symbol resolver and parser
 * all need updates to fully support this new resource. It is likely that
 * real 4GL code using these constructs will not parse properly at this time.
 * Also note that there are special purpose names <code>proc-text</code> and
 * <code>proc-text-buffer</code> which can be used as a field (actually it
 * is a text string of the entire current record's contents) and as a buffer
 * respectively. That means that definitions of these need to be created
 * during this method. Following code may rely upon this to parse. Finally,
 * there may be a special <code>closeallprocs</code> procedure that is
 * the equivalent to calling {@link #close_stored_proc_stmt} on all currently
 * open stored procedures.
 */
	public final void run_stored_proc_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast run_stored_proc_stmt_AST = null;
		Token  r = null;
		Aast r_AST = null;
		Token  sp = null;
		Aast sp_AST = null;
		
		try {      // for error handling
			r = LT(1);
			r_AST = (Aast)astFactory.create(r);
			astFactory.makeASTRoot(currentAST, r_AST);
			match(KW_RUN);
			r_AST.setType(RUN_STORED_PROCEDURE);
			sp = LT(1);
			sp_AST = (Aast)astFactory.create(sp);
			match(KW_STORPROC);
			hide(sp);
			reserved_or_symbol();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((_tokenSet_64.member(LA(1)))) {
				assign_proc_handle();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT||LA(1)==KW_NO_ERROR||LA(1)==LPARENS)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp750_AST = null;
				tmp750_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp750_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			case LPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case LPARENS:
			{
				param_passing_list(false);
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			run_stored_proc_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = run_stored_proc_stmt_AST;
	}
	
/**
 * Matches the <code>RUN SUPER</code> statement with an optional following
 * parameter list (see {@link #param_passing_list}). The resulting tree will be
 * rooted at a <code>RUN_SUPER</code> node. Called from {@link #stmt_list}.
 */
	public final void run_super_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast run_super_stmt_AST = null;
		Token  r = null;
		Aast r_AST = null;
		Token  su = null;
		Aast su_AST = null;
		
		try {      // for error handling
			r = LT(1);
			r_AST = (Aast)astFactory.create(r);
			astFactory.makeASTRoot(currentAST, r_AST);
			match(KW_RUN);
			r_AST.setType(RUN_SUPER);
			su = LT(1);
			su_AST = (Aast)astFactory.create(su);
			match(KW_SUPER);
			hide(su);
			{
			switch ( LA(1)) {
			case LPARENS:
			{
				param_passing_list(false);
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp751_AST = null;
				tmp751_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp751_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			run_super_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = run_super_stmt_AST;
	}
	
/**
 * Matches the Progress <code>RUN</code> language statement with all of its
 * options and builds the resulting AST.  This rule relies heavily upon
 * lexer support in the {@link ProgressLexer#mSYMBOL} rule and upon the
 * {@link #filename} rule for handling the required 2nd token (the external
 * procedure name, internal procedure name or library reference).  The
 * {@link #value} rule is also called in the case of the user providing
 * an expression to specify the name.
 * <p>
 * Although the Progress documentation does not say so, it is possible to
 * specify the target to run as a string without using the <code>VALUE</code>
 * construct.  This is supported.
 * <p>
 * It is possible for the parser to identify something as a 
 * <code>FILENAME</code> when it really is a <code>INT_PROC</code> in the 
 * case where the internal procedure is defined after the run statement is 
 * encountered.  This is perfectly valid in a Progress source file.  This
 * problem can be fixed in a subsequent processing of the parser-generated
 * tree.
 * <p>
 * Most of the optional constructs are matched in the following rule
 * references: {@link #persist_or_single_clause}, {@link #on_server_clause},
 * {@link #in_procedure_clause}, {@link #trans_distinct_clause},
 * {@link #set_handle} or {@link #asynch_clause}.  Doing this allows the AST
 * to be built cleanly.
 * <p>
 * Note that the manner in which the <code>PERSISTENT, ON SERVER and IN</code>
 * clauses are processed allows them to appear in any order (which is how
 * Progress handles it) however there is no checking to ensure that multiple
 * instances of the same clause do not occur.  Due to defects in ANTLR's
 * code generation, the <code>ASYNCHRONOUS</code> clause, 
 * <code>TRANSACTION DISTINCT</code> and parameters have been moved into
 * this options processing to get the code to generate properly.  The result
 * is the same with valid Progress code and in fact, this may even have been
 * ultimately necessary.  Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * As an undocumented feature, Progress allows any number of 
 * <code>NO-ERROR</code> keywords to be placed at the end of the statement,
 * with more than 1 being equivalent to having just 1 keyword.
 * <p>
 * In a <code>VALUE()</code> construct there is no checking of the type 
 * of the result (whether it is in the procedure dictionary because it is
 * an internal procedure or whether it is a filename).  In addition, no 
 * checking of the filesystem (using <code>PROPATH</code>) is done to 
 * ensure that the filename is valid.  Internal procedures specified via
 * a name (i.e. not using <code>VALUE()</code>) are detected and the
 * subsequent token type is set to <code>INT_PROC</code>. 
 * <p>
 * Another undocumented feature is that procedure names can be reserved
 * keywords, even if it is an internal procedure name. So the procedure name
 * can also match a {@link #reserved_or_symbol}.
 */
	public final void run_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast run_stmt_AST = null;
		Aast v_AST = null;
		Aast f_AST = null;
		Token  er = null;
		Aast er_AST = null;
		
		try {      // for error handling
			
			// DOT and EOF are hard coded in the worker routine
			// TODO: UNKNOWN_TOKEN should have broken out RBRACE and PIPE
			// so they can be matched individually
			int[] exclude = new int[]
			{
			LPARENS,
			RPARENS,
			LBRACKET,
			RBRACKET,
			COMMA,
			EQUALS,
			NOT_EQ,
			LT,
			GT,
			LTE,
			GTE
			};
			
			CommonToken next = (CommonToken) LT(2);
			
			String oldtxt = null;
			int    newlen = -1;
			
			boolean allowAs = false;
			
			// the run stmt can match a simple string but it can also match a string that prefixes
			// other non-whitespace characters and it is the unquoted contents concatenated to the
			// following text that is matched; to duplicate this we must get rid of the quotes here
			// and duplicate any keyword processing that would otherwise have occurred; then we let
			// the normal matching occur below; this doesn't work with VALUE(), only with the
			// filename case; the reason this works is that filename uses mergeUntilWS() to handle
			// the token merging
			if (next.getType() == STRING)
			{
			oldtxt = next.getText();
			
			// convert the Progress string to a Java string (includes escape processing and
			// removal of quotes)
			String txt = character.progressToJavaString(oldtxt, !unixEscapes,  true);
			
			newlen = txt.length();
			
			// no-transform approach to simply remove quotes; it is not clear if the above
			// transformations should or should not be applied
			// txt = txt.substring(1, txt.length() - 1);
			
			// save cleaned up string
			next.setText(txt);
			
			// simulate the keyword processing that would have happened if this wasn't a string
			Keyword found = sym.lookupKeyword(txt);
			
			next.setType((found != null) ? found.getTokenType() : SYMBOL);
			}
			
			Aast tmp752_AST = null;
			tmp752_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp752_AST);
			match(KW_RUN);
			{
			if ((LA(1)==LIBRARY_REF) && (_tokenSet_136.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp753_AST = null;
				tmp753_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp753_AST);
				match(LIBRARY_REF);
			}
			else if ((LA(1)==KW_VALUE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				value();
				v_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				filename(exclude);
				f_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				String ftxt = f_AST.getText();
				
				int ptype = sym.lookupProcedure(ftxt); 
				
				if (ptype != -1)
				{
				// generally this is only triggered if the name exists
				// as an internal procedure
				saveAndReplaceType(f_AST, ptype);
				}
				else
				{
				// by default we assume it is an external procedure (it
				// won't be in the dictionary so it can't be looked up)
				f_AST.setType(FILENAME);
				}
				
				// original token (or the first token of a merged set) was STRING but was rewritten
				// above; we need to calculate the actual full original text and save it for
				// possible anti-parsing later
				if (oldtxt != null)
				{
				String backend = ftxt.substring(newlen);
				f_AST.putAnnotation("original-text", oldtxt + backend);
				}
				
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop1568:
			do {
				if ((_tokenSet_137.member(LA(1))) && (_tokenSet_136.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					persist_or_single_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SET) && (_tokenSet_64.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					set_handle();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_ON) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					on_server_clause();
					astFactory.addASTChild(currentAST, returnAST);
					allowAs = true;
				}
				else if ((LA(1)==KW_IN) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					in_procedure_clause();
					astFactory.addASTChild(currentAST, returnAST);
					
					if (f_AST != null && f_AST.getType() == FILENAME)
					f_AST.setType(INT_PROC);
					
				}
				else if ((LA(1)==KW_ASYNC) && (_tokenSet_136.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					asynch_clause();
					astFactory.addASTChild(currentAST, returnAST);
					allowAs = true;
				}
				else if ((LA(1)==LPARENS) && (_tokenSet_79.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					param_passing_list(allowAs);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1568;
				}
				
			} while (true);
			}
			fixupBrokenPreprocArg();
			{
			if (((_tokenSet_136.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_NO_ERROR )) {
				preproc_arguments();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT||LA(1)==KW_NO_ERROR) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp754_AST = null;
				tmp754_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp754_AST);
				match(KW_NO_ERROR);
				{
				_loop1572:
				do {
					if ((LA(1)==KW_NO_ERROR)) {
						er = LT(1);
						er_AST = (Aast)astFactory.create(er);
						match(KW_NO_ERROR);
						hide(er);
					}
					else {
						break _loop1572;
					}
					
				} while (true);
				}
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			run_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = run_stmt_AST;
	}
	
/**
 * Matches a <code>SAVE CACHE</code> language statement, and the following
 * {@link #current_or_complete_clause}, {@link #value} or {@link #filename}. 
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void save_cache_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast save_cache_stmt_AST = null;
		Token  s = null;
		Aast s_AST = null;
		Token  ca = null;
		Aast ca_AST = null;
		Token  to = null;
		Aast to_AST = null;
		
		try {      // for error handling
			s = LT(1);
			s_AST = (Aast)astFactory.create(s);
			astFactory.makeASTRoot(currentAST, s_AST);
			match(KW_SAVE);
			s_AST.setType(SAVE_CACHE);
			ca = LT(1);
			ca_AST = (Aast)astFactory.create(ca);
			match(KW_CACHE);
			hide(ca);
			current_or_complete_clause();
			astFactory.addASTChild(currentAST, returnAST);
			to = LT(1);
			to_AST = (Aast)astFactory.create(to);
			match(KW_TO);
			hide(to);
			external_name_spec();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp755_AST = null;
				tmp755_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp755_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			save_cache_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = save_cache_stmt_AST;
	}
	
/**
 * Matches the <code>SCROLL</code> language statement.  Calls the
 * {@link #frame_phrase}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void scroll_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast scroll_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp756_AST = null;
			tmp756_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp756_AST);
			match(KW_SCROLL);
			{
			switch ( LA(1)) {
			case KW_FROM_CUR:
			{
				Aast tmp757_AST = null;
				tmp757_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp757_AST);
				match(KW_FROM_CUR);
				break;
			}
			case DOT:
			case KW_DOWN:
			case KW_UP:
			case KW_WITH:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_UP:
			{
				Aast tmp758_AST = null;
				tmp758_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp758_AST);
				match(KW_UP);
				break;
			}
			case KW_DOWN:
			{
				Aast tmp759_AST = null;
				tmp759_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp759_AST);
				match(KW_DOWN);
				break;
			}
			case DOT:
			case KW_WITH:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_WITH:
			{
				frame_phrase(false, false);
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			scroll_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = scroll_stmt_AST;
	}
	
/**
 * Matches the <code>SEEK</code> language statement.
 * <p>
 * Calls {@link #lvalue} (for stream references) and {@link #expr} rules.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void seek_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast seek_stmt_AST = null;
		Token  to = null;
		Aast to_AST = null;
		
		try {      // for error handling
			Aast tmp760_AST = null;
			tmp760_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp760_AST);
			match(KW_SEEK);
			{
			switch ( LA(1)) {
			case KW_INPUT:
			{
				Aast tmp761_AST = null;
				tmp761_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp761_AST);
				match(KW_INPUT);
				break;
			}
			case KW_OUTPUT:
			{
				Aast tmp762_AST = null;
				tmp762_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp762_AST);
				match(KW_OUTPUT);
				break;
			}
			default:
				if (((_tokenSet_64.member(LA(1))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			to = LT(1);
			to_AST = (Aast)astFactory.create(to);
			match(KW_TO);
			hide(to);
			{
			if ((LA(1)==KW_END) && (LA(2)==DOT) && (_tokenSet_11.member(LA(3)))) {
				Aast tmp763_AST = null;
				tmp763_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp763_AST);
				match(KW_END);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			seek_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = seek_stmt_AST;
	}
	
/**
 * Matches any operating system specific shell command (
 * <code>UNIX, DOS, OS2, BTOS, CTOS and VMS</code>) and the generic shell
 * command <code>OS-COMMAND</code> constructs including matching all possible
 * command tokens up to a following <code>DOT</code>.
 * <p>
 * This rule is unusual because it accepts an arbitrary list of any possible
 * or arbitrary token except the <code>DOT</code>.  Any of these constructs 
 * can be a {@link #value} rule which allows Progress expressions to be
 * evaluated and the results used as part of the command token list.
 * <p>
 * This approach is inherently ambiguous because the optional keywords (that
 * can precede the command token list) can appear in the subsequent list.
 * This ambiguity is resolved by greedily matching these keywords first.
 * Ambiguity warnings have been disabled since this is not a real issue.
 * <p>
 * Limitations of this rule include:
 * <p>
 * <ul>
 *    <li> Unmatched double or single quotes cannot be used. Insert these 
 *         inside a valid Progress string instead.
 *    <li> Whitespace that must be retained must be placed inside a valid 
 *         Progress string.
 *    <li> <code>DOT</code> is used as the termination character for the
 *         command token list so one can only pass a '.' inside a valid 
 *         Progress string.
 * </ul>
 * <p>
 * Progress shared these same limitations except it can accept an unmatched
 * double quotes character (which is probably just automatically ended at
 * the end of the file).  Progress has an additional limitation against 
 * using a colon followed by whitespace, which is an error.  This limitation
 * is not checked for by this rule.
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void shell_command_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast shell_command_stmt_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_UNIX:
			{
				Aast tmp764_AST = null;
				tmp764_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp764_AST);
				match(KW_UNIX);
				break;
			}
			case KW_DOS:
			{
				Aast tmp765_AST = null;
				tmp765_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp765_AST);
				match(KW_DOS);
				break;
			}
			case KW_OS_CMD:
			{
				Aast tmp766_AST = null;
				tmp766_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp766_AST);
				match(KW_OS_CMD);
				break;
			}
			case KW_OS2:
			{
				Aast tmp767_AST = null;
				tmp767_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp767_AST);
				match(KW_OS2);
				break;
			}
			case KW_BTOS:
			{
				Aast tmp768_AST = null;
				tmp768_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp768_AST);
				match(KW_BTOS);
				break;
			}
			case KW_CTOS:
			{
				Aast tmp769_AST = null;
				tmp769_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp769_AST);
				match(KW_CTOS);
				break;
			}
			case KW_VMS:
			{
				Aast tmp770_AST = null;
				tmp770_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp770_AST);
				match(KW_VMS);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==KW_SILENT) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp771_AST = null;
				tmp771_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp771_AST);
				match(KW_SILENT);
			}
			else if ((LA(1)==KW_NO_WAIT) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp772_AST = null;
				tmp772_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp772_AST);
				match(KW_NO_WAIT);
			}
			else if (((LA(1) >= DOT && LA(1) <= JUNK)) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_NO_CONS) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp773_AST = null;
				tmp773_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp773_AST);
				match(KW_NO_CONS);
			}
			else if (((LA(1) >= DOT && LA(1) <= JUNK)) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			command_token_list(false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp774_AST = null;
				tmp774_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp774_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			shell_command_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = shell_command_stmt_AST;
	}
	
/**   
 * Matches the <code>STATUS</code> language statement.  Calls the
 * {@link #in_window_clause}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void status_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast status_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp775_AST = null;
			tmp775_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp775_AST);
			match(KW_STATUS);
			{
			switch ( LA(1)) {
			case KW_DEFAULT:
			{
				Aast tmp776_AST = null;
				tmp776_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp776_AST);
				match(KW_DEFAULT);
				{
				if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_IN )) {
					expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==DOT||LA(1)==KW_IN) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else if ((LA(1)==DOT||LA(1)==KW_IN) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				break;
			}
			case KW_INPUT:
			{
				Aast tmp777_AST = null;
				tmp777_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp777_AST);
				match(KW_INPUT);
				{
				if ((LA(1)==KW_OFF) && (LA(2)==DOT||LA(2)==KW_IN) && (_tokenSet_11.member(LA(3)))) {
					Aast tmp778_AST = null;
					tmp778_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp778_AST);
					match(KW_OFF);
				}
				else if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&(LA(1) != KW_IN )) {
					expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==DOT||LA(1)==KW_IN) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_window_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			status_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = status_stmt_AST;
	}
	
/**      
 * Matches the <code>SUBSCRIBE</code> language statement, the required
 * following character {@link #expr} and all options.  Uses the
 * {@link #proc_handle_clause}, {@link #in_procedure_clause} and
 * {@link #run_proc_clause} rules.
 * <p>
 * Called from {@link #stmt_list}.
 */
	public final void subscribe_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast subscribe_stmt_AST = null;
		Token  to = null;
		Aast to_AST = null;
		
		try {      // for error handling
			Aast tmp779_AST = null;
			tmp779_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp779_AST);
			match(KW_SUBSCRIB);
			{
			if ((LA(1)==KW_PROC) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				proc_handle_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_TO) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				to = LT(1);
				to_AST = (Aast)astFactory.create(to);
				match(KW_TO);
				hide(to);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_procedure_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_ANYWHERE:
			{
				Aast tmp780_AST = null;
				tmp780_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp780_AST);
				match(KW_ANYWHERE);
				break;
			}
			case KW_GLOBAL:
			{
				Aast tmp781_AST = null;
				tmp781_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp781_AST);
				match(KW_GLOBAL);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_RUN_PROC:
			{
				run_proc_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp782_AST = null;
				tmp782_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp782_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			subscribe_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = subscribe_stmt_AST;
	}
	
/**
 * Matches the <code>SUPER</code> statement with an optional following
 * parameter list (see {@link #param_passing_list}). The resulting tree will be
 * rooted at a <code>KW_SUPER</code> node. Called from {@link #stmt_list}.
 * <p>
 * This must be the first statement used in a {@link #constructor}.
 */
	public final void super_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast super_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp783_AST = null;
			tmp783_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp783_AST);
			match(KW_SUPER);
			param_passing_list(false);
			astFactory.addASTChild(currentAST, returnAST);
			super_stmt_AST = (Aast)currentAST.root;
			
			String qname = sym.getCurrentParentName();
			
			// this leaves notes behind regarding the called ctor
			sym.annotateObjectMethod(qname, null, false, super_stmt_AST);
			
			super_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = super_stmt_AST;
	}
	
/**
 * Matches the <code>SYSTEM-DIALOG COLOR</code> statement and all following
 * options. Uses {@link #expr}, {@link #update_logical_clause} and
 * {@link #in_window_handle_clause}.  Called by {@link #stmt_list}.
 */
	public final void system_dialog_color_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast system_dialog_color_stmt_AST = null;
		Token  sd = null;
		Aast sd_AST = null;
		Token  co = null;
		Aast co_AST = null;
		
		try {      // for error handling
			sd = LT(1);
			sd_AST = (Aast)astFactory.create(sd);
			astFactory.makeASTRoot(currentAST, sd_AST);
			match(KW_SYS_DLG);
			sd_AST.setType(SYSTEM_DIALOG_COLOR);
			co = LT(1);
			co_AST = (Aast)astFactory.create(co);
			match(KW_COLOR);
			hide(co);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1331:
			do {
				switch ( LA(1)) {
				case KW_UPDATE:
				{
					update_logical_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_IN:
				{
					in_window_handle_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop1331;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			system_dialog_color_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = system_dialog_color_stmt_AST;
	}
	
/**
 * Matches the <code>SYSTEM-DIALOG FONT</code> statement and all following
 * options. Uses {@link #expr}, {@link #update_logical_clause},
 * {@link #min_max_size_clause} and {@link #in_window_handle_clause}.
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void system_dialog_font_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast system_dialog_font_stmt_AST = null;
		Token  sd = null;
		Aast sd_AST = null;
		Token  fo = null;
		Aast fo_AST = null;
		
		try {      // for error handling
			sd = LT(1);
			sd_AST = (Aast)astFactory.create(sd);
			astFactory.makeASTRoot(currentAST, sd_AST);
			match(KW_SYS_DLG);
			sd_AST.setType(SYSTEM_DIALOG_FONT);
			fo = LT(1);
			fo_AST = (Aast)astFactory.create(fo);
			match(KW_FONT);
			hide(fo);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1334:
			do {
				switch ( LA(1)) {
				case KW_ANSI_ONL:
				{
					Aast tmp784_AST = null;
					tmp784_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp784_AST);
					match(KW_ANSI_ONL);
					break;
				}
				case KW_FIXD_ONL:
				{
					Aast tmp785_AST = null;
					tmp785_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp785_AST);
					match(KW_FIXD_ONL);
					break;
				}
				case KW_MAX_SZ:
				case KW_MIN_SZ:
				{
					min_max_size_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_UPDATE:
				{
					update_logical_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_IN:
				{
					in_window_handle_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop1334;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			system_dialog_font_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = system_dialog_font_stmt_AST;
	}
	
/**
 * Matches the <code>SYSTEM-DIALOG GET-DIR</code> statement and all following options. Uses
 * {@link #lvalue}, {@link #initial_dir_clause} and {@link #title_clause}.
 * <p>
 * This can also match an {@link #update_logical_clause} and/or {@link #in_window_handle_clause}
 * which are both undocumented features which were found in customer applications. 
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void system_dialog_get_dir_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast system_dialog_get_dir_stmt_AST = null;
		Token  sd = null;
		Aast sd_AST = null;
		Token  ge = null;
		Aast ge_AST = null;
		
		try {      // for error handling
			sd = LT(1);
			sd_AST = (Aast)astFactory.create(sd);
			astFactory.makeASTRoot(currentAST, sd_AST);
			match(KW_SYS_DLG);
			sd_AST.setType(SYSTEM_DIALOG_GET_DIR);
			ge = LT(1);
			ge_AST = (Aast)astFactory.create(ge);
			match(KW_GET_DIR);
			hide(ge);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1337:
			do {
				switch ( LA(1)) {
				case KW_RET_2SD:
				{
					Aast tmp786_AST = null;
					tmp786_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp786_AST);
					match(KW_RET_2SD);
					break;
				}
				case KW_INIT_DIR:
				{
					initial_dir_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_TITLE:
				{
					title_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_UPDATE:
				{
					update_logical_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_IN:
				{
					in_window_handle_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop1337;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			system_dialog_get_dir_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = system_dialog_get_dir_stmt_AST;
	}
	
/**
 * Matches the <code>SYSTEM-DIALOG GET-FILE</code> statement and all
 * following options. Uses:
 * <p>
 * <ul>
 *   <li> {@link #lvalue}
 *   <li> {@link #update_logical_clause},
 *   <li> {@link #filters_clause}
 *   <li> {@link #title_clause}
 *   <li> {@link #default_extension_clause}
 *   <li> {@link #initial_dir_clause}
 *   <li> {@link #in_window_handle_clause}
 *   <li> {@link #at_web_browser_option}
 * </ul>
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void system_dialog_get_file_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast system_dialog_get_file_stmt_AST = null;
		Token  sd = null;
		Aast sd_AST = null;
		Token  ge = null;
		Aast ge_AST = null;
		
		try {      // for error handling
			sd = LT(1);
			sd_AST = (Aast)astFactory.create(sd);
			astFactory.makeASTRoot(currentAST, sd_AST);
			match(KW_SYS_DLG);
			sd_AST.setType(SYSTEM_DIALOG_GET_FILE);
			ge = LT(1);
			ge_AST = (Aast)astFactory.create(ge);
			match(KW_GET_FILE);
			hide(ge);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1340:
			do {
				switch ( LA(1)) {
				case KW_ASK_OVER:
				{
					Aast tmp787_AST = null;
					tmp787_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp787_AST);
					match(KW_ASK_OVER);
					break;
				}
				case KW_CREAT_TF:
				{
					Aast tmp788_AST = null;
					tmp788_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp788_AST);
					match(KW_CREAT_TF);
					break;
				}
				case KW_MUST_EXI:
				{
					Aast tmp789_AST = null;
					tmp789_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp789_AST);
					match(KW_MUST_EXI);
					break;
				}
				case KW_RET_2SD:
				{
					Aast tmp790_AST = null;
					tmp790_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp790_AST);
					match(KW_RET_2SD);
					break;
				}
				case KW_SAVE_AS:
				{
					Aast tmp791_AST = null;
					tmp791_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp791_AST);
					match(KW_SAVE_AS);
					break;
				}
				case KW_USE_FIL:
				{
					Aast tmp792_AST = null;
					tmp792_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp792_AST);
					match(KW_USE_FIL);
					break;
				}
				case KW_MULTIPLE:
				{
					Aast tmp793_AST = null;
					tmp793_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp793_AST);
					match(KW_MULTIPLE);
					break;
				}
				case KW_DEF_EXTN:
				{
					default_extension_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_INIT_DIR:
				{
					initial_dir_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_FILTERS:
				{
					filters_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_TITLE:
				{
					title_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_UPDATE:
				{
					update_logical_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_IN:
				{
					in_window_handle_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_AT_W_BRW:
				{
					at_web_browser_option();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop1340;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			system_dialog_get_file_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = system_dialog_get_file_stmt_AST;
	}
	
/**
 * Matches the <code>SYSTEM-DIALOG PRINTER-SETUP</code> statement and all
 * following options. Uses {@link #expr}, {@link #update_logical_clause},
 * {@link #num_copies_clause} and {@link #in_window_handle_clause}.
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void system_dialog_printer_setup_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast system_dialog_printer_setup_stmt_AST = null;
		Token  sd = null;
		Aast sd_AST = null;
		Token  ps = null;
		Aast ps_AST = null;
		
		try {      // for error handling
			sd = LT(1);
			sd_AST = (Aast)astFactory.create(sd);
			astFactory.makeASTRoot(currentAST, sd_AST);
			match(KW_SYS_DLG);
			sd_AST.setType(SYSTEM_DIALOG_PRINTER_SETUP);
			ps = LT(1);
			ps_AST = (Aast)astFactory.create(ps);
			match(KW_PRT_SET);
			hide(ps);
			{
			_loop1353:
			do {
				switch ( LA(1)) {
				case KW_LANDSCAP:
				{
					Aast tmp794_AST = null;
					tmp794_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp794_AST);
					match(KW_LANDSCAP);
					break;
				}
				case KW_PORTRAIT:
				{
					Aast tmp795_AST = null;
					tmp795_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp795_AST);
					match(KW_PORTRAIT);
					break;
				}
				case KW_NUM_COPY:
				{
					num_copies_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_UPDATE:
				{
					update_logical_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_IN:
				{
					in_window_handle_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop1353;
				}
				}
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			system_dialog_printer_setup_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = system_dialog_printer_setup_stmt_AST;
	}
	
/**
 * Matches the <code>SYSTEM-HELP</code> statement and all following options.
 */
	public final void system_help_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast system_help_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp796_AST = null;
			tmp796_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp796_AST);
			match(KW_SYS_HELP);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_WIN_NAME:
			{
				window_name_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_HELP:
			case KW_QUIT:
			case KW_ALT_KEY:
			case KW_COMMAND:
			case KW_CTX:
			case KW_CTX_POP:
			case KW_CONTENTS:
			case KW_FINDER:
			case KW_FORCE_F:
			case KW_HELP_TOP:
			case KW_KEY:
			case KW_MULT_KEY:
			case KW_PART_KEY:
			case KW_POS:
			case KW_SET_CONT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			help_command_clause();
			astFactory.addASTChild(currentAST, returnAST);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			system_help_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = system_help_stmt_AST;
	}
	
/**
 * Matches the <code>THIS-OBJECT</code> statement with an optional following
 * parameter list (see {@link #param_passing_list}). The resulting tree will be
 * rooted at a <code>KW_THIS_OBJ</code> node. Called from {@link #stmt_list}.
 * <p>
 * This must be the first statement used in a {@link #constructor}.
 */
	public final void this_object_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast this_object_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp797_AST = null;
			tmp797_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp797_AST);
			match(KW_THIS_OBJ);
			param_passing_list(false);
			astFactory.addASTChild(currentAST, returnAST);
			this_object_stmt_AST = (Aast)currentAST.root;
			
			String qname = sym.getCurrentClassName();
			
			// this leaves notes behind regarding the called ctor
			sym.annotateObjectMethod(qname, null, false, this_object_stmt_AST);
			
			this_object_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = this_object_stmt_AST;
	}
	
/**
 * Support the <code>TRIGGER PROCEDURE</code> language statement. All forms
 * (<code>CREATE</code>, <code>DELETE</code>, <code>FIND</code>, <code>WRITE</code> and 
 * <code>ASSIGN</code>, and the replication as well) are supported. Uses the
 * following rules to parse:
 * <p>
 * <ul>
 *    <li> {@link #record}
 *    <li> {@link #write_referencing_phrase}
 *    <li> {@link #lvalue}
 *    <li> {@link #assign_trigger_old_var_def}
 * </ul>
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void trigger_procedure_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast trigger_procedure_stmt_AST = null;
		Token  t = null;
		Aast t_AST = null;
		Token  p = null;
		Aast p_AST = null;
		Token  f = null;
		Aast f_AST = null;
		Token  of1 = null;
		Aast of1_AST = null;
		Token  of2 = null;
		Aast of2_AST = null;
		Aast r_AST = null;
		Token  of3 = null;
		Aast of3_AST = null;
		Aast lv_AST = null;
		Aast vd_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			Aast likeRef = null;
			
			t = LT(1);
			t_AST = (Aast)astFactory.create(t);
			astFactory.makeASTRoot(currentAST, t_AST);
			match(KW_TRIGGER);
			t_AST.setType(TRIGGER_PROCEDURE);
			p = LT(1);
			p_AST = (Aast)astFactory.create(p);
			match(KW_PROC);
			hide(p);
			f = LT(1);
			f_AST = (Aast)astFactory.create(f);
			match(KW_FOR);
			hide(f);
			{
			switch ( LA(1)) {
			case KW_CREATE:
			case KW_DELETE:
			case KW_FIND:
			case KW_REPL_CRE:
			case KW_REPL_DEL:
			{
				{
				switch ( LA(1)) {
				case KW_CREATE:
				{
					Aast tmp798_AST = null;
					tmp798_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp798_AST);
					match(KW_CREATE);
					break;
				}
				case KW_DELETE:
				{
					Aast tmp799_AST = null;
					tmp799_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp799_AST);
					match(KW_DELETE);
					break;
				}
				case KW_FIND:
				{
					Aast tmp800_AST = null;
					tmp800_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp800_AST);
					match(KW_FIND);
					break;
				}
				case KW_REPL_CRE:
				{
					Aast tmp801_AST = null;
					tmp801_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp801_AST);
					match(KW_REPL_CRE);
					break;
				}
				case KW_REPL_DEL:
				{
					Aast tmp802_AST = null;
					tmp802_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp802_AST);
					match(KW_REPL_DEL);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				of1 = LT(1);
				of1_AST = (Aast)astFactory.create(of1);
				match(KW_OF);
				hide(of1);
				nothing=record(true, false, false);
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_REPL_WRI:
			case KW_WRITE:
			{
				{
				switch ( LA(1)) {
				case KW_WRITE:
				{
					Aast tmp803_AST = null;
					tmp803_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp803_AST);
					match(KW_WRITE);
					break;
				}
				case KW_REPL_WRI:
				{
					Aast tmp804_AST = null;
					tmp804_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp804_AST);
					match(KW_REPL_WRI);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				of2 = LT(1);
				of2_AST = (Aast)astFactory.create(of2);
				match(KW_OF);
				hide(of2);
				nothing=record(true, false, false);
				r_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				{
				if ((LA(1)==KW_NEW||LA(1)==KW_OLD) && (_tokenSet_15.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
					write_referencing_phrase(r_AST);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				{
				if ((LA(1)==KW_NEW||LA(1)==KW_OLD) && (_tokenSet_15.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
					write_referencing_phrase(r_AST);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				break;
			}
			case KW_ASSIGN:
			{
				Aast tmp805_AST = null;
				tmp805_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp805_AST);
				match(KW_ASSIGN);
				{
				switch ( LA(1)) {
				case KW_OF:
				{
					of3 = LT(1);
					of3_AST = (Aast)astFactory.create(of3);
					match(KW_OF);
					hide(of3);
					lvalue();
					lv_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_NEW:
				{
					assign_trigger_new_var_def();
					vd_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				
				// the vd case is not exactly the "variable definition node", but it will
				// suffice for our downstream needs
				likeRef = (lv_AST != null) ? lv_AST : vd_AST.getImmediateChild(SYMBOL, null);
				
				{
				if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					assign_trigger_old_var_def(likeRef);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			trigger_procedure_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = trigger_procedure_stmt_AST;
	}
	
/**
 * Match the <code>TRANSACTION-MODE AUTOMATIC</code> statement. Used by
 * {@link #stmt_list}.
 */
	public final void transaction_mode_auto_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast transaction_mode_auto_stmt_AST = null;
		Token  t = null;
		Aast t_AST = null;
		Token  au = null;
		Aast au_AST = null;
		
		try {      // for error handling
			t = LT(1);
			t_AST = (Aast)astFactory.create(t);
			astFactory.makeASTRoot(currentAST, t_AST);
			match(KW_TRAN_MOD);
			t_AST.setType(TRANSACTION_MODE_AUTO);
			au = LT(1);
			au_AST = (Aast)astFactory.create(au);
			match(KW_AUTOMATC);
			hide(au);
			{
			switch ( LA(1)) {
			case KW_CHAINED:
			{
				Aast tmp806_AST = null;
				tmp806_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp806_AST);
				match(KW_CHAINED);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			transaction_mode_auto_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = transaction_mode_auto_stmt_AST;
	}
	
/**   
 * Matches the <code>UNDERLINE</code> language statement.  Calls the 
 * {@link #lvalue} (for an optional stream reference), {@link #lvalue_list}
 * for the list of widgets and {@link #frame_phrase} rules.
 * <p>
 * As an undocumented feature of Progress, the list of widgets can be
 * missing! In this case, the language statement is essentially a NOP.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void underline_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast underline_stmt_AST = null;
		Aast fp_AST = null;
		
		try {      // for error handling
			
			Set<Aast> fields = new HashSet<>();
			
			Aast tmp807_AST = null;
			tmp807_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp807_AST);
			match(KW_UNDERLIN);
			{
			if (((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_97.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((_tokenSet_64.member(LA(1)))) {
				lvalue_list(fields);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT||LA(1)==KW_WITH)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_WITH:
			{
				frame_phrase(false, false);
				fp_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			underline_stmt_AST = (Aast)currentAST.root;
			
			String frame = getFrameName(fp_AST);
			
			if (!fields.isEmpty())
			{
			sym.addFrameFields(frame, fields);
			}
			
			setUseDictExps(frame, fp_AST, underline_stmt_AST);
			
			underline_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = underline_stmt_AST;
	}
	
/**
 * Matches the top level <code>UNDO</code> statement, but some logic is
 * delegated to a shared rule {@link #undo_core} which is also used by
 * {@link #on_event_phrase}.  Since the {@link #throw_clause} is not
 * common with the <code>on_event_phrase</code>, that sub-rule is separately
 * referenced. 
 */
	public final void undo_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast undo_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp808_AST = null;
			tmp808_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp808_AST);
			match(KW_UNDO);
			label_reference();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==COMMA) && (_tokenSet_138.member(LA(2)))) {
				undo_core();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==COMMA) && (LA(2)==KW_THROW)) {
				throw_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			undo_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = undo_stmt_AST;
	}
	
/**   
 * Matches the <code>UNLOAD</code> language statement with a required
 * following {@link #expr}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void unload_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast unload_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp809_AST = null;
			tmp809_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp809_AST);
			match(KW_UNLOAD);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp810_AST = null;
				tmp810_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp810_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			unload_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = unload_stmt_AST;
	}
	
/**      
 * Matches the <code>UNSUBSCRIBE</code> language statement, the required
 * following character {@link #expr} and all options.  Uses the
 * {@link #proc_handle_clause} and {@link #in_procedure_clause}
 * rules.
 * <p>
 * Called from {@link #stmt_list}.
 */
	public final void unsubscribe_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast unsubscribe_stmt_AST = null;
		Token  to = null;
		Aast to_AST = null;
		
		try {      // for error handling
			Aast tmp811_AST = null;
			tmp811_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp811_AST);
			match(KW_UNSUBSCR);
			{
			if ((LA(1)==KW_PROC) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				proc_handle_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_TO) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				to = LT(1);
				to_AST = (Aast)astFactory.create(to);
				match(KW_TO);
				hide(to);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_ALL) && (LA(2)==DOT||LA(2)==KW_GLOBAL||LA(2)==KW_IN) && (_tokenSet_11.member(LA(3)))) {
				Aast tmp812_AST = null;
				tmp812_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp812_AST);
				match(KW_ALL);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_procedure_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_GLOBAL:
			{
				Aast tmp813_AST = null;
				tmp813_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp813_AST);
				match(KW_GLOBAL);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			unsubscribe_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = unsubscribe_stmt_AST;
	}
	
/**
 * Matches the <code>UP</code> or <code>DOWN</code> language statements.  
 * Optionally calls the {@link #lvalue} (for stream references) and may
 * have {@link #expr} and {@link #frame_phrase} "options".
 * <p>
 * Options can be specified in any order.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void up_or_down_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast up_or_down_stmt_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_UP:
			{
				Aast tmp814_AST = null;
				tmp814_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp814_AST);
				match(KW_UP);
				break;
			}
			case KW_DOWN:
			{
				Aast tmp815_AST = null;
				tmp815_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp815_AST);
				match(KW_DOWN);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop845:
			do {
				if (((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_WITH )) {
					expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_WITH) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					frame_phrase(false, false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop845;
				}
				
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			up_or_down_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = up_or_down_stmt_AST;
	}
	
/**   
 * Matches the <code>USE</code> language statement with a required following
 * {@link #expr}.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void use_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast use_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp816_AST = null;
			tmp816_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp816_AST);
			match(KW_USE);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp817_AST = null;
				tmp817_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp817_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			use_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = use_stmt_AST;
	}
	
/**   
 * Matches the <code>VALIDATE</code> language statement.  Calls the
 * {@link #record} rule.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void validate_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast validate_stmt_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			Aast tmp818_AST = null;
			tmp818_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp818_AST);
			match(KW_VALIDATE);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp819_AST = null;
				tmp819_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp819_AST);
				match(KW_NO_ERROR);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			validate_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = validate_stmt_AST;
	}
	
/**   
 * Matches the <code>VIEW</code> language statement.  Optionally calls the
 * {@link #lvalue} (for stream references), {@link #widget_phrase} and
 * {@link #in_window_clause} rules.
 * <p>
 * Progress has an undocumented feature where more than 1 widget phrase can
 * be matched instead of the documented single widget phrase. This rule
 * supports that undocumented mode.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void view_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast view_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp820_AST = null;
			tmp820_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp820_AST);
			match(KW_VIEW);
			{
			if (((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_STREAM || LA(1) == KW_STRM_HND )) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_139.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop832:
			do {
				if ((_tokenSet_124.member(LA(1)))) {
					widget_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop832;
				}
				
			} while (true);
			}
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_window_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			view_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = view_stmt_AST;
	}
	
/**   
 * Matches the .NET version of the <code>WAIT-FOR</code> language statement.
 * It calls {@link #expr} and {@link #set_lvalue}. This is ambiguous with
 * the {@link #wait_for_stmt} but that ambiguity must be resolved in the
 * caller using semantic predicates.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void wait_for_dotnet_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast wait_for_dotnet_stmt_AST = null;
		Token  w = null;
		Aast w_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_WAIT_FOR:
			{
				Aast tmp821_AST = null;
				tmp821_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp821_AST);
				match(KW_WAIT_FOR);
				break;
			}
			case KW_WAIT:
			{
				w = LT(1);
				w_AST = (Aast)astFactory.create(w);
				astFactory.makeASTRoot(currentAST, w_AST);
				match(KW_WAIT);
				w_AST.setType(KW_WAIT_FOR);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_SET:
			{
				set_lvalue();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			wait_for_dotnet_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = wait_for_dotnet_stmt_AST;
	}
	
/**   
 * Matches the <code>WAIT-FOR</code> language statement.  Calls the
 * {@link #events_of_widgets_clause}, {@link #pause_clause} and
 * {@link #focus_clause} rules.
 * <p>
 * Options can be specified in any order.
 * <p>
 * ANTLR reports bogus ambiguity, the code doesn't really have a problem so
 * warnings have been disabled.
 * <p>
 * Note that there is a real ambiguous situation since the <code>FOCUS</code>
 * keyword that is an option is also a valid system handle which can be
 * matched as part of a widget phrase and thus it can appear in a widget
 * list after the <code>OF</code> keyword.  In the case where the
 * <code>FOCUS</code> option immediately follows a widget list, the
 * <code>FOCUS</code> keyword will be matched as a widget rather than as
 * a keyword.  This is because the widget lists are greedy loops and this is
 * quite standard behavior.  If this occurs, the tree will be different than
 * one might expect.  Watch for this situation.
 * <p>
 * Another real ambiguous situation (resolved by ordering of alternatives)
 * is that the <code>PAUSE, FOCUS or EXCLUSIVE-WEB-USER</code> will be
 * matched before the event list.  Otherwise, such constructs can not be
 * matched at all.  This means that a <code>PAUSE</code> event (if there is
 * such a thing) can't be matched.
 * <p>
 * Used by {@link #stmt_list}.
 */
	public final void wait_for_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast wait_for_stmt_AST = null;
		Token  w = null;
		Aast w_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_WAIT_FOR:
			{
				Aast tmp822_AST = null;
				tmp822_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp822_AST);
				match(KW_WAIT_FOR);
				break;
			}
			case KW_WAIT:
			{
				w = LT(1);
				w_AST = (Aast)astFactory.create(w);
				astFactory.makeASTRoot(currentAST, w_AST);
				match(KW_WAIT);
				w_AST.setType(KW_WAIT_FOR);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			int _cnt903=0;
			_loop903:
			do {
				if ((LA(1)==KW_PAUSE) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					pause_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_FOCUS) && (_tokenSet_124.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					focus_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_EXCL_WEB) && (_tokenSet_140.member(LA(2))) && (_tokenSet_141.member(LA(3)))) {
					Aast tmp823_AST = null;
					tmp823_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp823_AST);
					match(KW_EXCL_WEB);
				}
				else if ((_tokenSet_108.member(LA(1))) && (_tokenSet_142.member(LA(2))) && (_tokenSet_143.member(LA(3)))) {
					events_of_widgets_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					if ( _cnt903>=1 ) { break _loop903; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt903++;
			} while (true);
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			wait_for_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = wait_for_stmt_AST;
	}
	
/**
 * This is a simple placeholder to match the use of a SQL <code>SELECT</code>
 * statement used directly in 4GL code in order to obtain a count of records
 * from a given table.
 */
	public final void embedded_sql() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast embedded_sql_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(EMBEDDED_SQL,""));
			embeddedSql = true;
			inUnion = false;
			
			{
			switch ( LA(1)) {
			case KW_ALTER:
			{
				alter_table_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_CLOSE:
			{
				close_cursor_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DECLARE:
			{
				declare_cursor_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DELETE:
			{
				delete_from_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_FETCH:
			{
				fetch_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_GRANT:
			{
				grant_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_INSERT:
			{
				insert_into_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_OPEN:
			{
				open_cursor_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_REVOKE:
			{
				revoke_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SELECT:
			{
				union_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_UPDATE:
			{
				sql_update_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
				if ((LA(1)==KW_CREATE) && (LA(2)==KW_INDEX||LA(2)==KW_UNIQUE)) {
					create_index_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_TABLE)) {
					create_table_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CREATE) && (LA(2)==KW_VIEW)) {
					create_view_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DROP) && (LA(2)==KW_INDEX)) {
					drop_index_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DROP) && (LA(2)==KW_TABLE)) {
					drop_table_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DROP) && (LA(2)==KW_VIEW)) {
					drop_view_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			
			embeddedSql = false;
			
			embedded_sql_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = embedded_sql_AST;
	}
	
/**
 * An empty statement (a perfectly legal Progress 4GL construct). Note that
 * one can consider this a <code>NOP</code>. Strangely, an optional 
 * <code>NO-LOCK</code>, <code>SHARE-LOCK</code> or 
 * <code>EXCLUSIVE-LOCK</code> keyword can be present. If a locking keyword
 * is present, then <code>NO-ERROR</code> can also be optionally specified
 * (after the locking keyword).
 */
	public final void empty_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast empty_stmt_AST = null;
		Token  nl = null;
		Aast nl_AST = null;
		Token  sl = null;
		Aast sl_AST = null;
		Token  el = null;
		Aast el_AST = null;
		Token  ne = null;
		Aast ne_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_EXC_LOCK:
			case KW_NO_LOCK:
			case KW_SH_LOCK:
			{
				{
				switch ( LA(1)) {
				case KW_NO_LOCK:
				{
					nl = LT(1);
					nl_AST = (Aast)astFactory.create(nl);
					match(KW_NO_LOCK);
					hide(nl);
					break;
				}
				case KW_SH_LOCK:
				{
					sl = LT(1);
					sl_AST = (Aast)astFactory.create(sl);
					match(KW_SH_LOCK);
					hide(sl);
					break;
				}
				case KW_EXC_LOCK:
				{
					el = LT(1);
					el_AST = (Aast)astFactory.create(el);
					match(KW_EXC_LOCK);
					hide(el);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				switch ( LA(1)) {
				case KW_NO_ERROR:
				{
					ne = LT(1);
					ne_AST = (Aast)astFactory.create(ne);
					match(KW_NO_ERROR);
					hide(ne);
					break;
				}
				case DOT:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			empty_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = empty_stmt_AST;
	}
	
/**
 * Matches the FWD-extension language statement <code>OPEN-URL</code> and a mandatory
 * following character expression.
 */
	public final void p2j_open_url_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast p2j_open_url_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp824_AST = null;
			tmp824_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp824_AST);
			match(KW_OPEN_URL);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			p2j_open_url_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = p2j_open_url_stmt_AST;
	}
	
/**
 * Matches the FWD-extension language statement <code>OPEN-MIME-RESOURCE</code> and a mandatory
 * pair of resource mime type character and its url character expression. If an optional
 * <code>DELETE-SOURCE</code> is present, then it forces to delete the original input file
 * when the transfer is complete.
 */
	public final void open_mime_resource_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast open_mime_resource_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp825_AST = null;
			tmp825_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp825_AST);
			match(KW_OPENMIME);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_EMBED:
			{
				Aast tmp826_AST = null;
				tmp826_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp826_AST);
				match(KW_NO_EMBED);
				break;
			}
			case DOT:
			case KW_DEL_S_C:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_DEL_S_C:
			{
				Aast tmp827_AST = null;
				tmp827_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp827_AST);
				match(KW_DEL_S_C);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			open_mime_resource_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = open_mime_resource_stmt_AST;
	}
	
/**
 * Matches the <code>WEB-FILE-UPLOAD</code> statement and all
 * following options. Uses:
 * <p>
 * <ul>
 *   <li> {@link #single_widget_list},
 *   <li> {@link #comma_event_list}
 *   <li> {@link #at_web_browser_upload}
 *   <li> {@link #title_clause}
 *   <li> {@link #filters_clause}
 * </ul>
 * <p>
 * Called by {@link #stmt_list}.
 */
	public final void web_file_upload_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast web_file_upload_stmt_AST = null;
		Token  wu = null;
		Aast wu_AST = null;
		
		try {      // for error handling
			wu = LT(1);
			wu_AST = (Aast)astFactory.create(wu);
			astFactory.makeASTRoot(currentAST, wu_AST);
			match(KW_WEB_FUP);
			{
			switch ( LA(1)) {
			case KW_REGISTER:
			{
				{
				match(KW_REGISTER);
				wu_AST.putAnnotation("register", true);
				single_widget_list();
				astFactory.addASTChild(currentAST, returnAST);
				comma_event_list();
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop1349:
				do {
					switch ( LA(1)) {
					case KW_MULTIPLE:
					{
						Aast tmp829_AST = null;
						tmp829_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp829_AST);
						match(KW_MULTIPLE);
						break;
					}
					case KW_UPLOAD:
					{
						at_web_browser_upload();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_TITLE:
					{
						title_clause();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_FILTERS:
					{
						filters_clause();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					default:
					{
						break _loop1349;
					}
					}
				} while (true);
				}
				}
				break;
			}
			case KW_DE_REGIS:
			{
				{
				match(KW_DE_REGIS);
				single_widget_list();
				astFactory.addASTChild(currentAST, returnAST);
				}
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			stmt_term();
			astFactory.addASTChild(currentAST, returnAST);
			web_file_upload_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = web_file_upload_stmt_AST;
	}
	
/**   
 * Implements the preselect phrase which is used to modify certain block
 * types to specify how to prequery the database to create a result set
 * that would not otherwise be available.  The tree is rooted at the
 * <code>PRESELECT</code> keyword and use rule references to implement
 * a more natural tree structure. See {@link #each_first_last_spec}, 
 * {@link #by_clause} and {@link #collate_clause} for more details.
 * <p>
 * Used by {@link #do_repeat_stmt} and similar code is inlined in the
 * {@link #for_stmt}.
 */
	public final void preselect_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast preselect_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp831_AST = null;
			tmp831_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp831_AST);
			match(KW_PRESEL);
			each_first_last_spec(true, true);
			astFactory.addASTChild(currentAST, returnAST);
			preselect_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = preselect_phrase_AST;
	}
	
/**   
 * Matches common options that a <code>FOR, DO or REPEAT</code> Progress 4GL
 * language statement can implement.
 * <p>
 * Note that the block control options are defined such that they can be
 * accepted in any order.  In addition, there is no check to ensure that
 * only one of each option is used, although this will not cause a problem
 * for correct Progress 4GL source.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * Called by {@link #for_stmt} and {@link #do_repeat_stmt}.
 * <p>
 * Uses:
 * {@link #query_tuning_phrase}
 * {@link #while_clause}
 * {@link #on_event_phrase}
 * {@link #loop_incr}
 * {@link #collate_clause}
 * {@link #sort_order_clause}
 * {@link #frame_phrase}
 * {@link #down_clause_or_loop_incr}
 *
 * @return   A loop increment sub-tree that was matched in a frame phrase
 *           due to ambiguity and which needs to be moved to the caller's
 *           tree. If <code>null</code> there is nothing to do.
 */
	public final Aast  common_block_options() throws RecognitionException, TokenStreamException {
		Aast loop;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast common_block_options_AST = null;
		Token  g = null;
		Aast g_AST = null;
		Aast f_AST = null;
		
		loop = null;
		
		
		try {      // for error handling
			{
			if ((LA(1)==KW_WHILE) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				while_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_TRANS) && (_tokenSet_144.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp832_AST = null;
				tmp832_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp832_AST);
				match(KW_TRANS);
			}
			else if ((LA(1)==KW_STOP_AFT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp833_AST = null;
				tmp833_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp833_AST);
				match(KW_STOP_AFT);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_ON) && (_tokenSet_145.member(LA(2))) && (_tokenSet_101.member(LA(3)))) {
				on_event_phrase();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_QRY_TUNE) && (LA(2)==LPARENS) && (_tokenSet_146.member(LA(3)))) {
				query_tuning_phrase();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_BREAK) && (_tokenSet_144.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp834_AST = null;
				tmp834_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp834_AST);
				match(KW_BREAK);
				sym.endIndexFieldSearch();
			}
			else if ((LA(1)==KW_GROUP) && (_tokenSet_144.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				g = LT(1);
				g_AST = (Aast)astFactory.create(g);
				astFactory.addASTChild(currentAST, g_AST);
				match(KW_GROUP);
				saveAndReplaceType(g_AST, KW_BREAK);
			}
			else if ((LA(1)==KW_BY||LA(1)==KW_COLLATE) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				{
				switch ( LA(1)) {
				case KW_COLLATE:
				{
					collate_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_BY:
				{
					sort_order_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if (((_tokenSet_85.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( isValidLeftmostReserved(LT(1), LT(2)) )) {
				loop_incr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_WITH) && (_tokenSet_147.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				frame_phrase(true, false);
				f_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				loop = f_AST.getImmediateChild(KW_TO, null);
				
				if (loop != null)
				{
				// fixups haven't been done yet so we force the parent which
				// is a prerequiisite for remove()
				loop.setParent(f_AST);
				loop.remove();
				}
				
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			common_block_options_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = common_block_options_AST;
		return loop;
	}
	
/**   
 * Matches the construction used in the {@link #preselect_phrase},
 * {@link #for_or_preselect_clause} and in the {@link #for_stmt} for
 * specifying one or more {@link #record_phrase} specifications and
 * optionally prefixing the phrase with the <code>EACH, FIRST or LAST</code>
 * keywords.
 *
 * @param    force
 *           <code>true</code> to force promotion even if the record was
 *           already previously promoted.
 * @param    noProp                   
 *           <code>true</code> to force any promoted nodes to have their
 *           no propagate flag set. This disables propagation of these
 *           nodes across the current scope boundary.
 */
	public final void each_first_last_spec(
		boolean force, boolean noProp
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast each_first_last_spec_AST = null;
		Aast r_AST = null;
		
		try {      // for error handling
			
			sym.startIndexFieldSearch();
			
			{
			{
			switch ( LA(1)) {
			case KW_EACH:
			{
				Aast tmp835_AST = null;
				tmp835_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp835_AST);
				match(KW_EACH);
				break;
			}
			case KW_FIRST:
			{
				Aast tmp836_AST = null;
				tmp836_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp836_AST);
				match(KW_FIRST);
				break;
			}
			case KW_LAST:
			{
				Aast tmp837_AST = null;
				tmp837_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp837_AST);
				match(KW_LAST);
				break;
			}
			default:
				if ((_tokenSet_13.member(LA(1)))) {
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			record_phrase(force, noProp);
			r_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			sym.setIndexFieldSearchTable(r_AST);
			
			{
			_loop1165:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					{
					switch ( LA(1)) {
					case KW_EACH:
					{
						Aast tmp838_AST = null;
						tmp838_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp838_AST);
						match(KW_EACH);
						break;
					}
					case KW_FIRST:
					{
						Aast tmp839_AST = null;
						tmp839_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp839_AST);
						match(KW_FIRST);
						break;
					}
					case KW_LAST:
					{
						Aast tmp840_AST = null;
						tmp840_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp840_AST);
						match(KW_LAST);
						break;
					}
					default:
						if ((_tokenSet_13.member(LA(1)))) {
						}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					record_phrase(force, noProp);
					astFactory.addASTChild(currentAST, returnAST);
					
					// if more than one record phrase, can't use
					sym.endIndexFieldSearch();
					
				}
				else {
					break _loop1165;
				}
				
			} while (true);
			}
			}
			each_first_last_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = each_first_last_spec_AST;
	}
	
/**   
 * Matches the loop termination expression defined by the <code>WHILE</code>
 * keyword.  The keyword is always followed by an expression. 
 * <p>
 * Used by {@link #do_repeat_stmt} and {@link #for_stmt}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void while_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast while_clause_AST = null;
		
		try {      // for error handling
			Aast tmp841_AST = null;
			tmp841_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp841_AST);
			match(KW_WHILE);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			while_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = while_clause_AST;
	}
	
/**
 * Matches the <code>ON { ENDKEY | ERROR | QUIT | STOP } UNDO</code> 
 * construction used to modify block processing. This is a more efficient
 * coding than normally found in Progress 4GL documentation.  More
 * specifically, normally these 4 possible constructions are defined
 * separately, but in fact their structure is identical.
 * <p>
 * The core logic is shared with the <code>UNDO</code> statement and
 * implemented in a shared rule {@link #undo_core}. The exception to this
 * is the <code>KW_THROW</code> option which is different (and thus is matched
 * separately. 
 * <p>
 * Used from {@link #do_repeat_stmt} and {@link #for_stmt}.
 */
	public final void on_event_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast on_event_phrase_AST = null;
		
		try {      // for error handling
			
			boolean isQuit = false;
			boolean isErr  = false;
			
			Aast tmp842_AST = null;
			tmp842_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp842_AST);
			match(KW_ON);
			{
			switch ( LA(1)) {
			case KW_ENDKEY:
			{
				Aast tmp843_AST = null;
				tmp843_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp843_AST);
				match(KW_ENDKEY);
				break;
			}
			case KW_ERROR:
			{
				Aast tmp844_AST = null;
				tmp844_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp844_AST);
				match(KW_ERROR);
				isErr = true;
				break;
			}
			case KW_QUIT:
			{
				Aast tmp845_AST = null;
				tmp845_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp845_AST);
				match(KW_QUIT);
				isQuit = true;
				break;
			}
			case KW_STOP:
			{
				Aast tmp846_AST = null;
				tmp846_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp846_AST);
				match(KW_STOP);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if (((LA(1)==KW_UNDO) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( !isQuit || LA(1) == KW_UNDO )) {
				undo_basic();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_101.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==COMMA) && (_tokenSet_138.member(LA(2)))) {
				undo_core();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==COMMA) && (LA(2)==KW_THROW)) {
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				Aast tmp847_AST = null;
				tmp847_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp847_AST);
				match(KW_THROW);
			}
			else if ((_tokenSet_144.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			on_event_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = on_event_phrase_AST;
	}
	
/**   
 * Implements the query tuning phrase including all possible options. In
 * some cases rule references are used to ensure that the tree is built
 * in the most useful manner.
 * <p>
 * Used by {@link #do_repeat_stmt} and {@link #for_stmt}.
 */
	public final void query_tuning_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast query_tuning_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp848_AST = null;
			tmp848_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp848_AST);
			match(KW_QRY_TUNE);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1181:
			do {
				switch ( LA(1)) {
				case KW_ARR_MSG:
				case KW_NO_ARMSG:
				{
					{
					switch ( LA(1)) {
					case KW_ARR_MSG:
					{
						Aast tmp849_AST = null;
						tmp849_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp849_AST);
						match(KW_ARR_MSG);
						break;
					}
					case KW_NO_ARMSG:
					{
						Aast tmp850_AST = null;
						tmp850_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp850_AST);
						match(KW_NO_ARMSG);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_BIND_WH:
				case KW_NO_BIND:
				{
					{
					switch ( LA(1)) {
					case KW_BIND_WH:
					{
						Aast tmp851_AST = null;
						tmp851_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp851_AST);
						match(KW_BIND_WH);
						break;
					}
					case KW_NO_BIND:
					{
						Aast tmp852_AST = null;
						tmp852_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp852_AST);
						match(KW_NO_BIND);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_CACHE_SZ:
				{
					query_tuning_cache_size();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_DEBUG:
				case KW_NO_DEBUG:
				{
					{
					switch ( LA(1)) {
					case KW_DEBUG:
					{
						query_tuning_debug();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_NO_DEBUG:
					{
						Aast tmp853_AST = null;
						tmp853_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp853_AST);
						match(KW_NO_DEBUG);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_HINT:
				{
					query_tuning_hint();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_IDX_HINT:
				case KW_NO_IDX_H:
				{
					{
					switch ( LA(1)) {
					case KW_IDX_HINT:
					{
						Aast tmp854_AST = null;
						tmp854_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp854_AST);
						match(KW_IDX_HINT);
						break;
					}
					case KW_NO_IDX_H:
					{
						Aast tmp855_AST = null;
						tmp855_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp855_AST);
						match(KW_NO_IDX_H);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_JOIN_BY:
				case KW_NO_JOIN:
				{
					{
					switch ( LA(1)) {
					case KW_JOIN_BY:
					{
						Aast tmp856_AST = null;
						tmp856_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp856_AST);
						match(KW_JOIN_BY);
						break;
					}
					case KW_NO_JOIN:
					{
						Aast tmp857_AST = null;
						tmp857_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp857_AST);
						match(KW_NO_JOIN);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_LOOKAHD:
				case KW_NO_LOOKA:
				{
					{
					switch ( LA(1)) {
					case KW_LOOKAHD:
					{
						Aast tmp858_AST = null;
						tmp858_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp858_AST);
						match(KW_LOOKAHD);
						break;
					}
					case KW_NO_LOOKA:
					{
						Aast tmp859_AST = null;
						tmp859_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp859_AST);
						match(KW_NO_LOOKA);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_ORD_JOIN:
				{
					Aast tmp860_AST = null;
					tmp860_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp860_AST);
					match(KW_ORD_JOIN);
					break;
				}
				case KW_REV_FROM:
				{
					Aast tmp861_AST = null;
					tmp861_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp861_AST);
					match(KW_REV_FROM);
					break;
				}
				case KW_NO_SEP_C:
				case KW_SEP_CONN:
				{
					{
					switch ( LA(1)) {
					case KW_SEP_CONN:
					{
						Aast tmp862_AST = null;
						tmp862_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp862_AST);
						match(KW_SEP_CONN);
						break;
					}
					case KW_NO_SEP_C:
					{
						Aast tmp863_AST = null;
						tmp863_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp863_AST);
						match(KW_NO_SEP_C);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				default:
				{
					break _loop1181;
				}
				}
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			query_tuning_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = query_tuning_phrase_AST;
	}
	
/**   
 * Matches the <code>COLLATE</code> keyword and the required following
 * 2 or 3 character expressions.  The tree is rooted on the 
 * <code>COLLATE</code> keyword and all parenthesis and commas are
 * dropped from the tree.  The resulting tree will have 2 or 3 children,
 * each an expression.
 * <p>
 * Used by {@link #preselect_phrase} and the subtree is rooted by the
 * keyword (which is the reason for using a separate rule for something so
 * simple).
 */
	public final void collate_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast collate_clause_AST = null;
		
		try {      // for error handling
			Aast tmp864_AST = null;
			tmp864_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp864_AST);
			match(KW_COLLATE);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_DESCEND) && (_tokenSet_144.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp865_AST = null;
				tmp865_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp865_AST);
				match(KW_DESCEND);
			}
			else if ((_tokenSet_144.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			collate_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = collate_clause_AST;
	}
	
/**   
 * Matches the <code>BY</code> keyword, the required following expression
 * and the optional <code>DESCENDING</code> keyword.
 * <p>
 * Used by {@link #open_query_stmt} and {@link #common_block_options} rules.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void sort_order_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sort_order_clause_AST = null;
		Token  b = null;
		Aast b_AST = null;
		Aast e_AST = null;
		
		try {      // for error handling
			
			preferFields = true;
			
			boolean drop = sym.isFoundUniqueIndex();
			if (drop)
			{
			// if we found an unique index, then every following BY clause needs to be dropped;
			// to do this, we allow any symbol matching (including uninterpretable/garbage 4GL
			// code) which will be dropped later on by unreachable code phase
			allowSymbolMatch = true;
			}
			
			sym.useIndexFieldSearch(true);
			
			b = LT(1);
			b_AST = (Aast)astFactory.create(b);
			astFactory.makeASTRoot(currentAST, b_AST);
			match(KW_BY);
			expr();
			e_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_DESCEND) && (_tokenSet_144.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp866_AST = null;
				tmp866_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp866_AST);
				match(KW_DESCEND);
			}
			else if ((_tokenSet_144.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			preferFields = false;
			
			sym.collectSortField(e_AST);
			
			sym.useIndexFieldSearch(false);
			
			if (drop)
			{
			allowSymbolMatch = false;
			b_AST.putAnnotation("drop", true);
			}
			
			sort_order_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = sort_order_clause_AST;
	}
	
/**   
 * Matches the loop increment definition defined by the <code>TO</code>
 * keyword and optionally the <code>BY</code> keyword.  Common rule references
 * were used to reuse working, tested code, however the resulting tree may
 * not be intuitive since the leftmost child of the root <code>TO</code>
 * keyword will be an {@link #assign} (which is rooted by an 
 * <code>ASSIGN</code> token that has an lvalue and expression as children.
 * The next child of the <code>TO</code> is the loop terminating expression
 * followed by the optional {@link #by_clause}.
 * <p>
 * Used by {@link #do_repeat_stmt} and {@link #for_stmt}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.      
 */
	public final void loop_incr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast loop_incr_AST = null;
		
		try {      // for error handling
			assign();
			astFactory.addASTChild(currentAST, returnAST);
			Aast tmp867_AST = null;
			tmp867_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp867_AST);
			match(KW_TO);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_BY) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				by_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_144.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			loop_incr_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = loop_incr_AST;
	}
	
/**
 * Implements the semantics of the assignment sub-expression in a Progress
 * <code>ASSIGN</code> language statement.
 * <p>
 * The syntax is differentiated from a top level {@link #assignment}
 * statement by:
 * <ul>
 *    <li> the requirement that there be an lvalue in the leftmost position
 *    <li> an expression cannot stand alone (without a prefixed lvalue and
 *         assignment operator)
 *    <li> no terminating <code>DOT</code>
 * </ul>
 * <p>
 * This is referenced from {@link #assign_stmt}, {@link #loop_incr} and
 * {@link #sub_assign_clause} rules.  It is used to implement the core
 * assignment logic.
 * <p>
 * A special mode exists that allows for an <code>lvalue</code> prefixed
 * with a frame or browse reference.
 * <p>
 * Creates both operands as children of the artificially created 
 * <code>ASSIGN</code> token type (which the <code>EQUALS</code> token is
 * replaced by).
 */
	public final void assign() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast assign_AST = null;
		Aast l_AST = null;
		Token  eqEquals = null;
		Aast eqEquals_AST = null;
		Token  eqMult = null;
		Aast eqMult_AST = null;
		Token  eqPlus = null;
		Aast eqPlus_AST = null;
		Token  eqMinus = null;
		Aast eqMinus_AST = null;
		Token  eqDiv = null;
		Aast eqDiv_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==KW_INPUT) && (_tokenSet_85.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp868_AST = null;
				tmp868_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp868_AST);
				match(KW_INPUT);
			}
			else if ((_tokenSet_85.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			chained_object_members();
			l_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case EQUALS:
			{
				eqEquals = LT(1);
				eqEquals_AST = (Aast)astFactory.create(eqEquals);
				astFactory.makeASTRoot(currentAST, eqEquals_AST);
				match(EQUALS);
				eqEquals_AST.setType(ASSIGN);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case MULT_ASSIGN:
			{
				eqMult = LT(1);
				eqMult_AST = (Aast)astFactory.create(eqMult);
				astFactory.makeASTRoot(currentAST, eqMult_AST);
				match(MULT_ASSIGN);
				eqMult_AST.setType(ASSIGN);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case PLUS_ASSIGN:
			{
				eqPlus = LT(1);
				eqPlus_AST = (Aast)astFactory.create(eqPlus);
				astFactory.makeASTRoot(currentAST, eqPlus_AST);
				match(PLUS_ASSIGN);
				eqPlus_AST.setType(ASSIGN);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case MINUS_ASSIGN:
			{
				eqMinus = LT(1);
				eqMinus_AST = (Aast)astFactory.create(eqMinus);
				astFactory.makeASTRoot(currentAST, eqMinus_AST);
				match(MINUS_ASSIGN);
				eqMinus_AST.setType(ASSIGN);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DIV_ASSIGN:
			{
				eqDiv = LT(1);
				eqDiv_AST = (Aast)astFactory.create(eqDiv);
				astFactory.makeASTRoot(currentAST, eqDiv_AST);
				match(DIV_ASSIGN);
				eqDiv_AST.setType(ASSIGN);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
				if ((_tokenSet_144.member(LA(1)))) {
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			
			restoreAssignStyleStmt(l_AST);
			if (eqEquals_AST != null) 
			{
			restoreEqualsOperator(l_AST, eqEquals_AST);
			} 
			else if (eqMult_AST != null) 
			{
			restoreEqualsOperator(l_AST, eqMult_AST);
			} 
			else if (eqPlus_AST != null) 
			{
			restoreEqualsOperator(l_AST, eqPlus_AST);
			} 
			else if (eqMinus_AST != null) 
			{
			restoreEqualsOperator(l_AST, eqMinus_AST);
			} 
			else if (eqDiv_AST != null) 
			{
			restoreEqualsOperator(l_AST, eqDiv_AST);
			}
			
			assign_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = assign_AST;
	}
	
/**   
 * Matches the <code>THEN</code> block of an <code>IF THEN ELSE</code>
 * language statement.  This rule makes a single, recursive call to the
 * core rule {@link #single_block}.  This allows a single statement, inner
 * block (<code>DO, REPEAT or FOR</code>) or assignment to be included
 * after the <code>THEN</code>.  Note that no checking is done on whether
 * a function, trigger or procedure definition is used instead of the above
 * constructions.  While this seems wrong, it is exactly how Progress handles
 * this situation (without complaining)!
 * <p>
 * It is possible to have an empty then block if the next statement is 
 * <code>END</code> or if the end of file is reached. Progress tolerates
 * this syntax silently.
 * <p>
 * Used by {@link #if_stmt} and {@link #when_clause}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void then_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast then_clause_AST = null;
		
		try {      // for error handling
			
			checkAndFixLabelWithReservedKeywordPrefix(2);
			
			Aast tmp869_AST = null;
			tmp869_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp869_AST);
			match(KW_THEN);
			{
			if (((_tokenSet_10.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) != EOF && LA(1) != KW_END )) {
				single_block(true, false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			then_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = then_clause_AST;
	}
	
/**   
 * Matches the <code>ELSE</code> block of an <code>IF THEN ELSE</code>
 * language statement.  This rule makes a single, recursive call to the
 * core rule {@link #single_block}.  This allows a single statement, inner
 * block (<code>DO, REPEAT or FOR</code>) or assignment to be included
 * after the <code>ELSE</code>.  Note that no checking is done on whether
 * a function, trigger or procedure definition is used instead of the above
 * constructions.  While this seems wrong, it is exactly how Progress handles
 * this situation (without complaining)!
 * <p>
 * It is legal for this block (which follows the <code>ELSE</code> keyword)
 * to be missing.  For this reason, the call to <code>single_block</code>
 * was made optional.  As usual, bogus ANTLR ambiguity warnings are disabled.
 * <p>
 * Used by {@link #if_stmt}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void else_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast else_clause_AST = null;
		
		try {      // for error handling
			
			checkAndFixLabelWithReservedKeywordPrefix(2);
			
			Aast tmp870_AST = null;
			tmp870_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp870_AST);
			match(KW_ELSE);
			{
			if (((_tokenSet_10.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_END && LA(1) != EOF )) {
				single_block(true, false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			else_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = else_clause_AST;
	}
	
/**   
 * Matches the <code>WHEN</code> block of a <code>CASE</code>
 * language statement.  After matching the list of possible expressions using
 * the {@link #simple_when_clause} rule reference, this rule makes a single
 * call to the {@link #then_clause}.
 * <p>
 * Used by {@link #case_stmt}.
 * <p>
 * Note that there is an ambiguity caused between the <code>OR</code> keyword
 * implemented in {@link #expr} and by the use of the <code>OR</code>
 * keyword in a <code>WHEN</code> clause (additional WHEN conditions can
 * be added to the same statement using an <code>OR WHEN condition</code>
 * syntax). Since the following condition is an expression, one must detect
 * the use of the following <code>WHEN</code> as the next token after the
 * <code>OR</code> to disambiguate. The <code>expr</code> rule which 
 * implements the logical <code>OR</code> processing thus uses a semantic
 * predicate to terminate expression processing (and not match on the
 * <code>OR</code> in the case where lookahead 2 is the reserved keyword
 * <code>WHEN</code>.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void when_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast when_clause_AST = null;
		Token  or = null;
		Aast or_AST = null;
		
		try {      // for error handling
			simple_when_clause();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop500:
			do {
				if ((LA(1)==KW_OR)) {
					or = LT(1);
					or_AST = (Aast)astFactory.create(or);
					match(KW_OR);
					hide(or);
					simple_when_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop500;
				}
				
			} while (true);
			}
			then_clause();
			astFactory.addASTChild(currentAST, returnAST);
			when_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = when_clause_AST;
	}
	
/**   
 * Matches the <code>OTHERWISE</code> block of a <code>CASE</code>
 * language statement.  This rule makes a single, recursive call to the
 * core rule {@link #single_block}.  This allows a single statement, inner
 * block (<code>DO, REPEAT or FOR</code>) or assignment to be included
 * after the <code>THEN</code>.  Note that no checking is done on whether
 * a function, trigger or procedure definition is used instead of the above
 * constructions.  While this seems wrong, it is exactly how Progress handles
 * this situation (without complaining)!
 * <p>
 * Used by {@link #case_stmt}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void otherwise() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast otherwise_AST = null;
		
		try {      // for error handling
			
			checkAndFixLabelWithReservedKeywordPrefix(2);
			
			Aast tmp871_AST = null;
			tmp871_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp871_AST);
			match(KW_OTHER);
			single_block(true, false);
			astFactory.addASTChild(currentAST, returnAST);
			otherwise_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = otherwise_AST;
	}
	
/**   
 * Implements the record phrase used in various block definitions. In its
 * most basic form, a table ({@link #record}) and optional include or exclude
 * list of fields is provided ({@link #field_list}).  Uses the 
 * {@link #literal} rule to match the optional constant that follows the
 * field list.  The {@link #join_clause}, {@link #of_clause}, 
 * {@link #where_clause}, {@link #using_clause} and {@link #use_index_clause}
 * rules are all implemented separately to generate the proper tree 
 * structure. Note that these last options can be specified in any order and
 * multiple times.
 * <p>
 * The join clause is only here for use by {@link #each_first_last_spec} and
 * not by {@link #find_stmt}.  Likewise the <code>NO-WAIT and NO-ERROR</code>
 * keywords are only here for <code>FIND</code>.  Otherwise this single
 * rule properly handles both cases.
 * <p>
 * Note that the use of unreserved keywords for <code>OUTER-JOIN</code> and
 * <code>LEFT</code> can cause ambiguity when k == 2 between the join_clause
 * and the of_clause (which includes the {@link #symbol} rule). In practice,
 * this is not really a problem because join_clause is a more specific rule.
 * For this reason, ambiguity warnings have been disabled.
 *
 * @param    force
 *           <code>true</code> to force promotion even if the record was
 *           already previously promoted.
 * @param    noProp                   
 *           <code>true</code> to force any promoted nodes to have their
 *           no propagate flag set. This disables propagation of these
 *           nodes across the current scope boundary.
 */
	public final void record_phrase(
		boolean force, boolean noProp
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast record_phrase_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(RECORD_PHRASE,"record phrase"));
			boolean old = sym.markPreferred(true);
			
			NameNode oldRecord = currentRecord;
			
			int whereClauses = 0;
			
			currentRecord=record(true, force, noProp);
			astFactory.addASTChild(currentAST, returnAST);
			
			sym.markPreferred(old);
			
			{
			if ((LA(1)==KW_EXCEPT||LA(1)==KW_FIELD) && (_tokenSet_148.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				field_list();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_148.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((_tokenSet_65.member(LA(1))) && (_tokenSet_148.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
           LA(1) != KW_SH_LOCK && LA(1) != KW_EXC_LOCK &&
           LA(1) != KW_NO_LOCK && LA(1) != KW_NO_WAIT
         )) {
				literal();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_148.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop1194:
			do {
				if ((LA(1)==KW_LEFT||LA(1)==KW_OUT_JOIN) && (_tokenSet_148.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					join_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_OF) && (_tokenSet_13.member(LA(2))) && (_tokenSet_148.member(LA(3)))) {
					of_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1)==KW_WHERE) && (_tokenSet_149.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( whereClauses == 0 )) {
					where_clause(false);
					astFactory.addASTChild(currentAST, returnAST);
					whereClauses++;
				}
				else if ((LA(1)==KW_USE_IDX) && (_tokenSet_53.member(LA(2))) && (_tokenSet_148.member(LA(3)))) {
					use_index_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_USING) && (_tokenSet_150.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					using_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_EXC_LOCK||LA(1)==KW_NO_LOCK||LA(1)==KW_SH_LOCK) && (_tokenSet_148.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_SH_LOCK:
					{
						Aast tmp872_AST = null;
						tmp872_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp872_AST);
						match(KW_SH_LOCK);
						break;
					}
					case KW_EXC_LOCK:
					{
						Aast tmp873_AST = null;
						tmp873_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp873_AST);
						match(KW_EXC_LOCK);
						break;
					}
					case KW_NO_LOCK:
					{
						Aast tmp874_AST = null;
						tmp874_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp874_AST);
						match(KW_NO_LOCK);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_NO_WAIT) && (_tokenSet_148.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp875_AST = null;
					tmp875_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp875_AST);
					match(KW_NO_WAIT);
				}
				else if ((LA(1)==KW_NO_PRE) && (_tokenSet_148.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp876_AST = null;
					tmp876_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp876_AST);
					match(KW_NO_PRE);
				}
				else if ((LA(1)==KW_NO_ERROR) && (_tokenSet_148.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp877_AST = null;
					tmp877_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp877_AST);
					match(KW_NO_ERROR);
				}
				else if ((LA(1)==KW_TAB_SCAN) && (_tokenSet_148.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp878_AST = null;
					tmp878_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp878_AST);
					match(KW_TAB_SCAN);
				}
				else {
					break _loop1194;
				}
				
			} while (true);
			}
			
			currentRecord = oldRecord;
			
			record_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_148);
		}
		returnAST = record_phrase_AST;
	}
	
/**
 * Support SQL <code>ALTER TABLE</code> directly in 4GL code. Called from
 * {@link #embedded_sql} and uses the following rules:
 * <p>
 * <ul>
 *    <li> {@link #record}
 *    <li> {@link #sql_column_def}
 * </ul>
 */
	public final void alter_table_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast alter_table_stmt_AST = null;
		Token  a = null;
		Aast a_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			a = LT(1);
			a_AST = (Aast)astFactory.create(a);
			astFactory.makeASTRoot(currentAST, a_AST);
			match(KW_ALTER);
			a_AST.setType(ALTER_TABLE);
			match(KW_TABLE);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			sql_column_def();
			astFactory.addASTChild(currentAST, returnAST);
			alter_table_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = alter_table_stmt_AST;
	}
	
/**
 * Matches the <code>CLOSE</code> keyword with a following {@link #symbol}.
 * Called from {@link #embedded_sql}.
 */
	public final void close_cursor_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast close_cursor_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CLOSE);
			c_AST.setType(CLOSE_CURSOR);
			symbol();
			astFactory.addASTChild(currentAST, returnAST);
			close_cursor_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = close_cursor_stmt_AST;
	}
	
/**
 * Matches the <code>CREATE INDEX</code> statement with a following
 * {@link #symbol}, {@link #record} and one or more {@link #lvalue}.
 * Called from {@link #embedded_sql}.
 */
	public final void create_index_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_index_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  in = null;
		Aast in_AST = null;
		Token  on = null;
		Aast on_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_INDEX);
			{
			switch ( LA(1)) {
			case KW_UNIQUE:
			{
				Aast tmp880_AST = null;
				tmp880_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp880_AST);
				match(KW_UNIQUE);
				break;
			}
			case KW_INDEX:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			in = LT(1);
			in_AST = (Aast)astFactory.create(in);
			match(KW_INDEX);
			hide(in);
			any_non_reserved_symbol();
			astFactory.addASTChild(currentAST, returnAST);
			on = LT(1);
			on_AST = (Aast)astFactory.create(on);
			match(KW_ON);
			hide(on);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop514:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop514;
				}
				
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			create_index_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = create_index_stmt_AST;
	}
	
/**
 * Support SQL <code>CREATE TABLE</code> directly in 4GL code. Called from
 * {@link #embedded_sql} and uses the following rules:
 * <p>
 * <ul>
 *    <li> {@link #symbol}
 *    <li> {@link #sql_column_spec}
 *    <li> {@link #sql_unique_index}
 * </ul>
 */
	public final void create_table_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_table_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  ta = null;
		Aast ta_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_TABLE);
			ta = LT(1);
			ta_AST = (Aast)astFactory.create(ta);
			match(KW_TABLE);
			hide(ta);
			symbol();
			astFactory.addASTChild(currentAST, returnAST);
			{
			int _cnt517=0;
			_loop517:
			do {
				if ((_tokenSet_151.member(LA(1)))) {
					sql_column_spec(true);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_UNIQUE)) {
					sql_unique_index();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					if ( _cnt517>=1 ) { break _loop517; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt517++;
			} while (true);
			}
			create_table_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = create_table_stmt_AST;
	}
	
/**
 * Support SQL <code>CREATE VIEW</code> directly in 4GL code. Called from
 * {@link #embedded_sql} and uses the following rules:
 * <p>
 * <ul>
 *    <li> {@link #symbol}
 *    <li> {@link #sql_column_spec}
 *    <li> {@link #sql_unique_index}
 * </ul>
 */
	public final void create_view_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast create_view_stmt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  vi = null;
		Aast vi_AST = null;
		Token  as = null;
		Aast as_AST = null;
		Token  w = null;
		Aast w_AST = null;
		Token  ch = null;
		Aast ch_AST = null;
		Token  op = null;
		Aast op_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CREATE);
			c_AST.setType(CREATE_VIEW);
			vi = LT(1);
			vi_AST = (Aast)astFactory.create(vi);
			match(KW_VIEW);
			hide(vi);
			symbol();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case LPARENS:
			{
				sql_name_list(true);
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_AS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			as = LT(1);
			as_AST = (Aast)astFactory.create(as);
			match(KW_AS);
			hide(as);
			select_stmt();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_WITH:
			{
				w = LT(1);
				w_AST = (Aast)astFactory.create(w);
				astFactory.addASTChild(currentAST, w_AST);
				match(KW_WITH);
				w_AST.setType(WITH_CHECK_OPTION);
				ch = LT(1);
				ch_AST = (Aast)astFactory.create(ch);
				match(KW_CHECK);
				hide(ch);
				op = LT(1);
				op_AST = (Aast)astFactory.create(op);
				match(KW_OPTION);
				hide(op);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			create_view_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = create_view_stmt_AST;
	}
	
/**
 * Support SQL <code>DECLARE CURSOR</code> directly in 4GL code. Called from
 * {@link #embedded_sql} and uses the following rules:
 * <p>
 * <ul>
 *    <li> {@link #symbol}
 *    <li> {@link #union_stmt}
 * </ul>
 */
	public final void declare_cursor_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast declare_cursor_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  cur = null;
		Aast cur_AST = null;
		Token  f1 = null;
		Aast f1_AST = null;
		Token  f2 = null;
		Aast f2_AST = null;
		Token  r = null;
		Aast r_AST = null;
		Token  on = null;
		Aast on_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DECLARE);
			d_AST.setType(DECLARE_CURSOR);
			symbol();
			astFactory.addASTChild(currentAST, returnAST);
			cur = LT(1);
			cur_AST = (Aast)astFactory.create(cur);
			match(KW_CURSOR);
			hide(cur);
			f1 = LT(1);
			f1_AST = (Aast)astFactory.create(f1);
			match(KW_FOR);
			hide(f1);
			union_stmt();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_FOR:
			{
				f2 = LT(1);
				f2_AST = (Aast)astFactory.create(f2);
				match(KW_FOR);
				hide(f2);
				{
				switch ( LA(1)) {
				case KW_READ_ONL:
				{
					Aast tmp881_AST = null;
					tmp881_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp881_AST);
					match(KW_READ_ONL);
					break;
				}
				case KW_READ:
				{
					{
					r = LT(1);
					r_AST = (Aast)astFactory.create(r);
					astFactory.addASTChild(currentAST, r_AST);
					match(KW_READ);
					{
					switch ( LA(1)) {
					case KW_ONLY:
					{
						on = LT(1);
						on_AST = (Aast)astFactory.create(on);
						match(KW_ONLY);
						hide(on);
						break;
					}
					case DOT:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					r_AST.setType(KW_READ_ONL);
					}
					break;
				}
				case KW_UPDATE:
				{
					Aast tmp882_AST = null;
					tmp882_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp882_AST);
					match(KW_UPDATE);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			declare_cursor_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = declare_cursor_stmt_AST;
	}
	
/**
 * Support SQL <code>DELETE FROM</code> directly in 4GL code. Called from
 * {@link #embedded_sql} and uses the following rules:
 * <p>
 * <ul>
 *    <li> {@link #record}
 *    <li> {@link #where_clause}
 *    <li> {@link #where_current_of}
 * </ul>
 */
	public final void delete_from_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast delete_from_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  fr = null;
		Aast fr_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DELETE);
			d_AST.setType(DELETE_FROM);
			fr = LT(1);
			fr_AST = (Aast)astFactory.create(fr);
			match(KW_FROM);
			hide(fr);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_WHERE) && (LA(2)==KW_CURRENT) && (LA(3)==KW_OF)) {
				where_current_of();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_WHERE) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				where_clause(true);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			delete_from_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = delete_from_stmt_AST;
	}
	
/**
 * Support SQL <code>DROP INDEX</code> directly in 4GL code. Called from
 * {@link #embedded_sql} and uses {@link #symbol}.
 */
	public final void drop_index_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast drop_index_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  in = null;
		Aast in_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DROP);
			d_AST.setType(DROP_INDEX);
			in = LT(1);
			in_AST = (Aast)astFactory.create(in);
			match(KW_INDEX);
			hide(in);
			any_non_reserved_symbol();
			astFactory.addASTChild(currentAST, returnAST);
			drop_index_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = drop_index_stmt_AST;
	}
	
/**
 * Support SQL <code>DROP TABLE</code> directly in 4GL code. Called from
 * {@link #embedded_sql} and uses {@link #record}.
 */
	public final void drop_table_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast drop_table_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  ta = null;
		Aast ta_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DROP);
			d_AST.setType(DROP_TABLE);
			ta = LT(1);
			ta_AST = (Aast)astFactory.create(ta);
			match(KW_TABLE);
			hide(ta);
			nothing=record(false, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			drop_table_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = drop_table_stmt_AST;
	}
	
/**
 * Support SQL <code>DROP VIEW</code> directly in 4GL code. Called from
 * {@link #embedded_sql} and uses {@link #symbol}.
 */
	public final void drop_view_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast drop_view_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  vi = null;
		Aast vi_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DROP);
			d_AST.setType(DROP_VIEW);
			vi = LT(1);
			vi_AST = (Aast)astFactory.create(vi);
			match(KW_VIEW);
			hide(vi);
			symbol();
			astFactory.addASTChild(currentAST, returnAST);
			drop_view_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = drop_view_stmt_AST;
	}
	
/**
 * Support SQL <code>FETCH</code> directly in 4GL code. Called from
 * {@link #embedded_sql}. Uses {@link #symbol} and {@link #sql_into}.
 */
	public final void fetch_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast fetch_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp883_AST = null;
			tmp883_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp883_AST);
			match(KW_FETCH);
			symbol();
			astFactory.addASTChild(currentAST, returnAST);
			sql_into();
			astFactory.addASTChild(currentAST, returnAST);
			fetch_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = fetch_stmt_AST;
	}
	
/**
 * Support SQL <code>GRANT</code> directly in 4GL code. Called from
 * {@link #embedded_sql}. Uses {@link #sql_update_rights}, 
 * {@link #sql_on_table} and {@link #sql_to_from_users}.
 */
	public final void grant_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast grant_stmt_AST = null;
		Token  pr = null;
		Aast pr_AST = null;
		Token  w = null;
		Aast w_AST = null;
		Token  gr = null;
		Aast gr_AST = null;
		Token  op = null;
		Aast op_AST = null;
		
		try {      // for error handling
			Aast tmp884_AST = null;
			tmp884_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp884_AST);
			match(KW_GRANT);
			{
			int _cnt535=0;
			_loop535:
			do {
				switch ( LA(1)) {
				case KW_ALL:
				{
					Aast tmp885_AST = null;
					tmp885_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp885_AST);
					match(KW_ALL);
					{
					switch ( LA(1)) {
					case KW_PRIVILEG:
					{
						pr = LT(1);
						pr_AST = (Aast)astFactory.create(pr);
						match(KW_PRIVILEG);
						hide(pr);
						break;
					}
					case KW_ALL:
					case KW_DELETE:
					case KW_INSERT:
					case KW_ON:
					case KW_SELECT:
					case KW_UPDATE:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_SELECT:
				{
					Aast tmp886_AST = null;
					tmp886_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp886_AST);
					match(KW_SELECT);
					break;
				}
				case KW_INSERT:
				{
					Aast tmp887_AST = null;
					tmp887_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp887_AST);
					match(KW_INSERT);
					break;
				}
				case KW_DELETE:
				{
					Aast tmp888_AST = null;
					tmp888_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp888_AST);
					match(KW_DELETE);
					break;
				}
				case KW_UPDATE:
				{
					sql_update_rights();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					if ( _cnt535>=1 ) { break _loop535; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				}
				_cnt535++;
			} while (true);
			}
			sql_on_table();
			astFactory.addASTChild(currentAST, returnAST);
			sql_to_from_users();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_WITH:
			{
				w = LT(1);
				w_AST = (Aast)astFactory.create(w);
				astFactory.addASTChild(currentAST, w_AST);
				match(KW_WITH);
				w_AST.setType(WITH_GRANT_OPTION);
				gr = LT(1);
				gr_AST = (Aast)astFactory.create(gr);
				match(KW_GRANT);
				hide(gr);
				op = LT(1);
				op_AST = (Aast)astFactory.create(op);
				match(KW_OPTION);
				hide(op);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			grant_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = grant_stmt_AST;
	}
	
/**
 * Support SQL <code>INSERT INTO</code> directly in 4GL code. Called from
 * {@link #embedded_sql}. Uses {@link #record}, {@link #select_stmt}, 
 * {@link #sql_simple_column_list} and {@link #sql_value_list}.
 */
	public final void insert_into_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast insert_into_stmt_AST = null;
		Token  i = null;
		Aast i_AST = null;
		Token  in = null;
		Aast in_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			i = LT(1);
			i_AST = (Aast)astFactory.create(i);
			astFactory.addASTChild(currentAST, i_AST);
			match(KW_INSERT);
			i_AST.setType(INSERT_INTO);
			in = LT(1);
			in_AST = (Aast)astFactory.create(in);
			match(KW_INTO);
			hide(in);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case LPARENS:
			{
				sql_simple_column_list();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SELECT:
			case KW_VALUES:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_VALUES:
			{
				sql_value_list();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SELECT:
			{
				select_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			insert_into_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = insert_into_stmt_AST;
	}
	
/**
 * Matches the <code>OPEN</code> keyword with a following {@link #symbol}.
 * Called from {@link #embedded_sql}.
 */
	public final void open_cursor_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast open_cursor_stmt_AST = null;
		Token  o = null;
		Aast o_AST = null;
		
		try {      // for error handling
			o = LT(1);
			o_AST = (Aast)astFactory.create(o);
			astFactory.makeASTRoot(currentAST, o_AST);
			match(KW_OPEN);
			o_AST.setType(OPEN_CURSOR);
			symbol();
			astFactory.addASTChild(currentAST, returnAST);
			open_cursor_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = open_cursor_stmt_AST;
	}
	
/**
 * Support SQL <code>REVOKE</code> directly in 4GL code. Called from
 * {@link #embedded_sql}. Uses {@link #sql_update_rights}, 
 * {@link #sql_on_table} and {@link #sql_to_from_users}.
 */
	public final void revoke_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast revoke_stmt_AST = null;
		Token  pr = null;
		Aast pr_AST = null;
		
		try {      // for error handling
			Aast tmp889_AST = null;
			tmp889_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp889_AST);
			match(KW_REVOKE);
			{
			int _cnt544=0;
			_loop544:
			do {
				switch ( LA(1)) {
				case KW_ALL:
				{
					Aast tmp890_AST = null;
					tmp890_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp890_AST);
					match(KW_ALL);
					{
					switch ( LA(1)) {
					case KW_PRIVILEG:
					{
						pr = LT(1);
						pr_AST = (Aast)astFactory.create(pr);
						match(KW_PRIVILEG);
						hide(pr);
						break;
					}
					case KW_ALL:
					case KW_DELETE:
					case KW_INSERT:
					case KW_ON:
					case KW_SELECT:
					case KW_UPDATE:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					break;
				}
				case KW_SELECT:
				{
					Aast tmp891_AST = null;
					tmp891_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp891_AST);
					match(KW_SELECT);
					break;
				}
				case KW_INSERT:
				{
					Aast tmp892_AST = null;
					tmp892_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp892_AST);
					match(KW_INSERT);
					break;
				}
				case KW_DELETE:
				{
					Aast tmp893_AST = null;
					tmp893_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp893_AST);
					match(KW_DELETE);
					break;
				}
				case KW_UPDATE:
				{
					sql_update_rights();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					if ( _cnt544>=1 ) { break _loop544; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				}
				_cnt544++;
			} while (true);
			}
			sql_on_table();
			astFactory.addASTChild(currentAST, returnAST);
			sql_to_from_users();
			astFactory.addASTChild(currentAST, returnAST);
			revoke_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = revoke_stmt_AST;
	}
	
/**
 * Matches the SQL <code>UNION</code> statement which can be the same as a
 * simple {@link #select_stmt}, or it can contain a nested set of select
 * statements joined by the <code>UNION</code> keyword. There is no limit
 * to the number of select statements joined in a union. Note that if a
 * union is active, then any {@link #sql_order_by} clause will attach to
 * the top-level union statement node rather than to any of the select
 * statements. Called by {@link #embedded_sql}.
 */
	public final void union_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast union_stmt_AST = null;
		
		try {      // for error handling
			
			sqlNestLevel++;
			
			select_stmt();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop554:
			do {
				if ((LA(1)==KW_UNION) && (LA(2)==KW_ALL||LA(2)==KW_SELECT) && (_tokenSet_152.member(LA(3)))) {
					Aast tmp894_AST = null;
					tmp894_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp894_AST);
					match(KW_UNION);
					inUnion = true;
					{
					switch ( LA(1)) {
					case KW_ALL:
					{
						Aast tmp895_AST = null;
						tmp895_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp895_AST);
						match(KW_ALL);
						break;
					}
					case KW_SELECT:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					union_stmt();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop554;
				}
				
			} while (true);
			}
			{
			if (((LA(1)==KW_ORDER) && (LA(2)==KW_BY) && (_tokenSet_24.member(LA(3))))&&( inUnion && sqlNestLevel == 1 )) {
				sql_order_by();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_153.member(LA(1))) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			sqlNestLevel--;
			
			union_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_153);
		}
		returnAST = union_stmt_AST;
	}
	
/**
 * Matches the SQL <code>UPDATE</code> statement. Uses {@link #record},
 * {@link #sql_assign_list}, {@link #where_clause} and
 * {@link #where_current_of}. Called by {@link #embedded_sql}.
 */
	public final void sql_update_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_update_stmt_AST = null;
		Token  u = null;
		Aast u_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			u = LT(1);
			u_AST = (Aast)astFactory.create(u);
			astFactory.makeASTRoot(currentAST, u_AST);
			match(KW_UPDATE);
			u_AST.setType(UPDATE_SQL);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			sql_assign_list();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_WHERE) && (LA(2)==KW_CURRENT) && (LA(3)==KW_OF)) {
				where_current_of();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_WHERE) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				where_clause(true);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			sql_update_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = sql_update_stmt_AST;
	}
	
/**
 * Matches the <code>ADD</code>, <code>DROP</code> or <code>ALTER</code>
 * specification for an {@link #alter_table_stmt}. Uses the following:
 * <p>
 * <ul>
 *    <li> {@link #sql_data_type}
 *    <li> {@link #record}
 *    <li> {@link #sql_default_value}
 *    <li> {@link #label}
 *    <li> {@link #format_string}
 *    <li> {@link #column_label}
 *    <li> {@link #case_sensitive}
 * </ul>
 */
	public final void sql_column_def() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_column_def_AST = null;
		Token  co = null;
		Aast co_AST = null;
		
		try {      // for error handling
			
			boolean add  = false;
			boolean drop = false;
			
			NameNode nothing = null;
			
			{
			switch ( LA(1)) {
			case KW_ADD:
			{
				Aast tmp896_AST = null;
				tmp896_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp896_AST);
				match(KW_ADD);
				add = true;
				break;
			}
			case KW_DROP:
			{
				Aast tmp897_AST = null;
				tmp897_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp897_AST);
				match(KW_DROP);
				drop = true;
				break;
			}
			case KW_ALTER:
			{
				Aast tmp898_AST = null;
				tmp898_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp898_AST);
				match(KW_ALTER);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			co = LT(1);
			co_AST = (Aast)astFactory.create(co);
			match(KW_COL);
			hide(co);
			{
			if (((_tokenSet_151.member(LA(1))) && (_tokenSet_154.member(LA(2))))&&( add )) {
				sql_column_spec(false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_155.member(LA(2)))) {
				nothing=record(true, false, false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((_tokenSet_156.member(LA(1))))&&( !drop )) {
				sql_column_options();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DOT)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			sql_column_def_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = sql_column_def_AST;
	}
	
/**
 * Matches a column name as a {@link #symbol} and the following data type
 * as {@link #sql_data_type}. Called by {@link #sql_column_def} and
 * {@link #create_table_stmt}.
 */
	public final void sql_column_spec(
		boolean root
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_column_spec_AST = null;
		Token  d = null;
		Aast d_AST = null;
		
		try {      // for error handling
			
			if (root)
			{
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(KW_COL,""));
			}
			
			{
			if ((_tokenSet_15.member(LA(1)))) {
				symbol();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==DB_SYMBOL)) {
				d = LT(1);
				d_AST = (Aast)astFactory.create(d);
				astFactory.addASTChild(currentAST, d_AST);
				match(DB_SYMBOL);
				d_AST.setType(SYMBOL);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			sql_data_type();
			astFactory.addASTChild(currentAST, returnAST);
			sql_column_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_157);
		}
		returnAST = sql_column_spec_AST;
	}
	
/**
 * Matches <code>UNIQUE</code> followed by a parenthesized list of column
 * names using {@link #sql_column_list}. This is a unique index definition.
 * Called by {@link #create_table_stmt}.
 */
	public final void sql_unique_index() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_unique_index_AST = null;
		
		try {      // for error handling
			Aast tmp899_AST = null;
			tmp899_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp899_AST);
			match(KW_UNIQUE);
			sql_name_list(false);
			astFactory.addASTChild(currentAST, returnAST);
			sql_unique_index_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_158);
		}
		returnAST = sql_unique_index_AST;
	}
	
/**
 * Matches a parenthesized list of column names as {@link #symbol}. Called
 * by {@link #sql_unique_index} and {@link #create_view_stmt}.
 */
	public final void sql_name_list(
		boolean root
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_name_list_AST = null;
		
		try {      // for error handling
			
			if (root)
			{
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(KW_COLUMNS,""));
			}
			
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			symbol();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop597:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					symbol();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop597;
				}
				
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			sql_name_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_159);
		}
		returnAST = sql_name_list_AST;
	}
	
/**
 * Support SQL <code>SELECT</code> directly in 4GL code. Called from
 * {@link #embedded_sql} and uses the following rules:
 * <p>
 * <ul>
 *    <li> {@link #sql_column_list}
 *    <li> {@link #sql_into}
 *    <li> {@link #sql_from}
 *    <li> {@link #where_clause}
 *    <li> {@link #sql_group_by}
 *    <li> {@link #sql_having}
 *    <li> {@link #sql_order_by}
 *    <li> {@link #frame_phrase}
 * </ul>
 */
	public final void select_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast select_stmt_AST = null;
		Aast cl_AST = null;
		
		try {      // for error handling
			
			selectNestLevel++;
			
			Aast tmp900_AST = null;
			tmp900_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp900_AST);
			match(KW_SELECT);
			{
			if ((LA(1)==KW_ALL) && (_tokenSet_152.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp901_AST = null;
				tmp901_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp901_AST);
				match(KW_ALL);
			}
			else if ((LA(1)==KW_DISTINCT) && (_tokenSet_152.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp902_AST = null;
				tmp902_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp902_AST);
				match(KW_DISTINCT);
			}
			else if ((_tokenSet_152.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==MULTIPLY)) {
				Aast tmp903_AST = null;
				tmp903_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp903_AST);
				match(MULTIPLY);
			}
			else if ((_tokenSet_24.member(LA(1)))) {
				sql_column_list();
				cl_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_INTO:
			{
				sql_into();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_FROM:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			sql_from();
			astFactory.addASTChild(currentAST, returnAST);
			
			// the field list may have symbols that couldn't be resolved because
			// they were qualified with SQL correlation names that are only
			// defined during the FROM clause processing; fix these up as proper
			// fields now that the FROM clause buffer processing is complete
			if (cl_AST != null)
			{
			Iterator iter = cl_AST.iterator();
			
			while (iter.hasNext())
			{
			Aast next = (Aast) iter.next();
			
			if (next.getType() == SYMBOL && sym.isField(next.getText()))
			{
			sym.annotateField(next, null, true, true);
			}
			}
			}
			
			{
			_loop550:
			do {
				switch ( LA(1)) {
				case KW_WHERE:
				{
					where_clause(true);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_GROUP:
				{
					sql_group_by();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_HAVING:
				{
					sql_having();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
					if (((LA(1)==KW_ORDER) && (LA(2)==KW_BY) && (_tokenSet_24.member(LA(3))))&&( !inUnion )) {
						sql_order_by();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if (((LA(1)==KW_WITH) && (_tokenSet_112.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(2) != KW_CHECK && LA(3) != KW_OPTION )) {
						frame_phrase(false, false);
						astFactory.addASTChild(currentAST, returnAST);
					}
				else {
					break _loop550;
				}
				}
			} while (true);
			}
			
			selectNestLevel--;
			
			select_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_160);
		}
		returnAST = select_stmt_AST;
	}
	
/**
 * Matches the <code>WHERE CURRENT OF</code> keyword sequence and a following
 * {@link #symbol}. Used by {@link #delete_from_stmt}.
 */
	public final void where_current_of() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast where_current_of_AST = null;
		Token  w = null;
		Aast w_AST = null;
		Token  cur = null;
		Aast cur_AST = null;
		Token  of = null;
		Aast of_AST = null;
		
		try {      // for error handling
			w = LT(1);
			w_AST = (Aast)astFactory.create(w);
			astFactory.makeASTRoot(currentAST, w_AST);
			match(KW_WHERE);
			w_AST.setType(WHERE_CURRENT_OF);
			cur = LT(1);
			cur_AST = (Aast)astFactory.create(cur);
			match(KW_CURRENT);
			hide(cur);
			of = LT(1);
			of_AST = (Aast)astFactory.create(of);
			match(KW_OF);
			hide(of);
			symbol();
			astFactory.addASTChild(currentAST, returnAST);
			where_current_of_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = where_current_of_AST;
	}
	
/**   
 * Matches the <code>WHERE</code> keyword and the required following
 * expression.  Note that the expression processing that is exposed via the
 * {@link #expr} rule has been modified to support the <code>CONTAINS</code>
 * operator. This operator is specific in usage to the where clause and
 * follows a form of:
 * <pre>
 *    field CONTAINS expression
 * </pre>
 * <p>
 * This support is implemented in {@link #compare_expr} which means that
 * the <code>CONTAINS</code> operator has the same precedence as operators
 * <code>BEGINS, MATCHES</code> and other comparisons. For more details on
 * how <code>CONTAINS</code> works, please see page 960 in the Progress 4GL
 * language reference.  <b>Note that placing the operator support inside the
 * general purpose expression processing was required to resolve 
 * ambiguity!</b> This makes sense since <code>CONTAINS</code> <b>is</b> an 
 * operator and thus its operands are naturally conflicting with other
 * operators.  The ambiguity would be a problem in certain cases (invoving
 * the <code>LBRACKET</code> array syntax in {@link #lvalue} if we attempted
 * to separate the <code>CONTAINS</code> processing into this location.
 * <p>
 * Though undocumented, customer code was found in which the following
 * expression was optional!  This compiled without problem though it is 
 * nonsense (in this case, the <code>WHERE</code> must be ignored). This
 * feature causes ambiguity warnings which have been disabled.
 * <p>
 * Used by {@link #record_phrase} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 *
 * @param    sql
 *           Flag indicating if this is matching from a SQL statement.
 */
	public final void where_clause(
		boolean sql
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast where_clause_AST = null;
		
		try {      // for error handling
			Aast tmp904_AST = null;
			tmp904_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp904_AST);
			match(KW_WHERE);
			{
			if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( !isValidBlockHeaderOrQueryKeyword(sql) )) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_148.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			where_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_148);
		}
		returnAST = where_clause_AST;
	}
	
/**
 * Matches an embedded SQL <code>INTO</code> clause and the following list
 * of variables (uses {@link #lvalue} and {@link #sql_indicator_var}).
 */
	public final void sql_into() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_into_AST = null;
		
		try {      // for error handling
			Aast tmp905_AST = null;
			tmp905_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp905_AST);
			match(KW_INTO);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_INDICAT:
			{
				sql_indicator_var();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_FROM:
			case COMMA:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop638:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
					{
					switch ( LA(1)) {
					case KW_INDICAT:
					{
						sql_indicator_var();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case DOT:
					case KW_FROM:
					case COMMA:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else {
					break _loop638;
				}
				
			} while (true);
			}
			sql_into_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_161);
		}
		returnAST = sql_into_AST;
	}
	
/**
 * Matches SQL <code>UPDATE</code> rights option with a list of columns
 * using {@link #lvalue}. Used by {@link #grant_stmt}.
 */
	public final void sql_update_rights() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_update_rights_AST = null;
		
		try {      // for error handling
			Aast tmp906_AST = null;
			tmp906_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp906_AST);
			match(KW_UPDATE);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop580:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop580;
				}
				
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			sql_update_rights_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_162);
		}
		returnAST = sql_update_rights_AST;
	}
	
/**
 * Matches SQL <code>ON</code> followed by a {@link #record}. Used by
 * {@link #grant_stmt}.
 */
	public final void sql_on_table() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_on_table_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			Aast tmp907_AST = null;
			tmp907_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp907_AST);
			match(KW_ON);
			nothing=record(false, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			sql_on_table_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_163);
		}
		returnAST = sql_on_table_AST;
	}
	
/**
 * Matches SQL <code>TO</code> or <code>FROM</code> rights option with a list
 * of users as {@link #symbol} or the keyword <code>PUBLIC</code>. Used by
 * {@link #grant_stmt} and {@link #revoke_stmt}.
 */
	public final void sql_to_from_users() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_to_from_users_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_TO:
			{
				Aast tmp908_AST = null;
				tmp908_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp908_AST);
				match(KW_TO);
				break;
			}
			case KW_FROM:
			{
				Aast tmp909_AST = null;
				tmp909_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp909_AST);
				match(KW_FROM);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==KW_PUBLIC) && (LA(2)==DOT||LA(2)==KW_WITH) && (_tokenSet_11.member(LA(3)))) {
				Aast tmp910_AST = null;
				tmp910_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp910_AST);
				match(KW_PUBLIC);
			}
			else if ((_tokenSet_15.member(LA(1))) && (LA(2)==DOT||LA(2)==KW_WITH||LA(2)==COMMA) && (_tokenSet_11.member(LA(3)))) {
				symbol();
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop586:
				do {
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						symbol();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop586;
					}
					
				} while (true);
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			sql_to_from_users_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_99);
		}
		returnAST = sql_to_from_users_AST;
	}
	
/**
 * Matches the list of fields in a {@link #insert_into_stmt}. Uses
 * {@link #lvalue}.
 */
	public final void sql_simple_column_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_simple_column_list_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(COLUMN_LIST,""));
			
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop572:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop572;
				}
				
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			sql_simple_column_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_164);
		}
		returnAST = sql_simple_column_list_AST;
	}
	
/**
 * Matches the list of values in a {@link #insert_into_stmt}. Uses
 * {@link #expr}.
 */
	public final void sql_value_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_value_list_AST = null;
		
		try {      // for error handling
			Aast tmp911_AST = null;
			tmp911_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp911_AST);
			match(KW_VALUES);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			sql_value();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop575:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					sql_value();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop575;
				}
				
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			sql_value_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = sql_value_list_AST;
	}
	
/**
 * Matches the list of fields or SQL aggregate functions in a
 * {@link #select_stmt}.  Uses {@link #sql_individual_column}. 
 */
	public final void sql_column_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_column_list_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(COLUMN_LIST,""));
			
			sql_individual_column();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop610:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					sql_individual_column();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop610;
				}
				
			} while (true);
			}
			sql_column_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_165);
		}
		returnAST = sql_column_list_AST;
	}
	
/**
 * Matches an embedded SQL <code>FROM</code> clause and the following
 * {@link #sql_table_spec}.
 */
	public final void sql_from() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_from_AST = null;
		
		try {      // for error handling
			Aast tmp912_AST = null;
			tmp912_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp912_AST);
			match(KW_FROM);
			sql_table_spec();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((_tokenSet_166.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				_loop622:
				do {
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						sql_table_spec();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop622;
					}
					
				} while (true);
				}
			}
			else if ((_tokenSet_167.member(LA(1)))) {
				sql_explicit_join();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_168.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			sql_from_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_168);
		}
		returnAST = sql_from_AST;
	}
	
/**
 * Matches the SQL <code>GROUP BY</code> specification and its following
 * list of comma separated {@link #expr}. Called by {@link #select_stmt}.
 */
	public final void sql_group_by() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_group_by_AST = null;
		Token  g = null;
		Aast g_AST = null;
		Token  by = null;
		Aast by_AST = null;
		
		try {      // for error handling
			g = LT(1);
			g_AST = (Aast)astFactory.create(g);
			astFactory.makeASTRoot(currentAST, g_AST);
			match(KW_GROUP);
			g_AST.setType(GROUP_BY);
			by = LT(1);
			by_AST = (Aast)astFactory.create(by);
			match(KW_BY);
			hide(by);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop642:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop642;
				}
				
			} while (true);
			}
			sql_group_by_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_168);
		}
		returnAST = sql_group_by_AST;
	}
	
/**
 * Matches the SQL <code>HAVING</code> keyword and its following
 * {@link #expr}. Called by {@link #select_stmt}.
 */
	public final void sql_having() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_having_AST = null;
		
		try {      // for error handling
			Aast tmp913_AST = null;
			tmp913_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp913_AST);
			match(KW_HAVING);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			sql_having_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_168);
		}
		returnAST = sql_having_AST;
	}
	
/**
 * Matches the SQL <code>ORDER BY</code> specification and its following
 * list of comma separated {@link #expr} and optional 
 * {@link #sql_direction_spec}. Called by {@link #select_stmt}.
 */
	public final void sql_order_by() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_order_by_AST = null;
		Token  o = null;
		Aast o_AST = null;
		Token  by = null;
		Aast by_AST = null;
		
		try {      // for error handling
			o = LT(1);
			o_AST = (Aast)astFactory.create(o);
			astFactory.makeASTRoot(currentAST, o_AST);
			match(KW_ORDER);
			o_AST.setType(ORDER_BY);
			by = LT(1);
			by_AST = (Aast)astFactory.create(by);
			match(KW_BY);
			hide(by);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_ASC:
			case KW_DESCEND:
			{
				sql_direction_spec();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_FOR:
			case KW_GROUP:
			case KW_HAVING:
			case KW_UNION:
			case KW_WHERE:
			case KW_WITH:
			case KW_ORDER:
			case COMMA:
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop648:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					expr();
					astFactory.addASTChild(currentAST, returnAST);
					{
					switch ( LA(1)) {
					case KW_ASC:
					case KW_DESCEND:
					{
						sql_direction_spec();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case DOT:
					case KW_FOR:
					case KW_GROUP:
					case KW_HAVING:
					case KW_UNION:
					case KW_WHERE:
					case KW_WITH:
					case KW_ORDER:
					case COMMA:
					case RPARENS:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else {
					break _loop648;
				}
				
			} while (true);
			}
			sql_order_by_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_168);
		}
		returnAST = sql_order_by_AST;
	}
	
/**
 * Matches the list of column assignments in an {@link #sql_update_stmt}
 * which are rooted at a <code>SET</code> keyword.
 */
	public final void sql_assign_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_assign_list_AST = null;
		
		try {      // for error handling
			Aast tmp914_AST = null;
			tmp914_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp914_AST);
			match(KW_SET);
			sql_assign();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop568:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					sql_assign();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop568;
				}
				
			} while (true);
			}
			sql_assign_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_169);
		}
		returnAST = sql_assign_list_AST;
	}
	
/**
 * Matches a sub-select in a <code>WHERE</code> clause.
 */
	public final void sub_select_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sub_select_stmt_AST = null;
		Token  n = null;
		Aast n_AST = null;
		Token  exi = null;
		Aast exi_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_ANY:
			{
				Aast tmp915_AST = null;
				tmp915_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp915_AST);
				match(KW_ANY);
				break;
			}
			case KW_ALL:
			{
				Aast tmp916_AST = null;
				tmp916_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp916_AST);
				match(KW_ALL);
				break;
			}
			case KW_SOME:
			{
				Aast tmp917_AST = null;
				tmp917_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp917_AST);
				match(KW_SOME);
				break;
			}
			case KW_EXISTS:
			{
				Aast tmp918_AST = null;
				tmp918_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp918_AST);
				match(KW_EXISTS);
				break;
			}
			case KW_NOT:
			{
				n = LT(1);
				n_AST = (Aast)astFactory.create(n);
				astFactory.makeASTRoot(currentAST, n_AST);
				match(KW_NOT);
				exi = LT(1);
				exi_AST = (Aast)astFactory.create(exi);
				match(KW_EXISTS);
				hide(exi); n_AST.setType(NOT_EXISTS);
				break;
			}
			case LPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			select_stmt();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			sub_select_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = sub_select_stmt_AST;
	}
	
/**
 * Matches a sub-select in a <code>WHERE</code> clause that is based on the
 * <code>IN</code> operator.
 */
	public final void in_operator_sub_select_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast in_operator_sub_select_stmt_AST = null;
		Token  n = null;
		Aast n_AST = null;
		Token  in = null;
		Aast in_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_NOT:
			{
				n = LT(1);
				n_AST = (Aast)astFactory.create(n);
				astFactory.makeASTRoot(currentAST, n_AST);
				match(KW_NOT);
				in = LT(1);
				in_AST = (Aast)astFactory.create(in);
				match(KW_IN);
				hide(in); n_AST.setType(NOT_IN);
				break;
			}
			case KW_IN:
			{
				Aast tmp919_AST = null;
				tmp919_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp919_AST);
				match(KW_IN);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			in_operator_parms();
			astFactory.addASTChild(currentAST, returnAST);
			in_operator_sub_select_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = in_operator_sub_select_stmt_AST;
	}
	
/**
 * Matches the value list or sub-select portion of an <code>IN</code>
 * operator.
 */
	public final void in_operator_parms() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast in_operator_parms_AST = null;
		
		try {      // for error handling
			Aast tmp920_AST = null;
			tmp920_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp920_AST);
			match(LPARENS);
			{
			if ((LA(1)==KW_SELECT) && (_tokenSet_152.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				select_stmt();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				sum_expr();
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop565:
				do {
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						sum_expr();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop565;
					}
					
				} while (true);
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			in_operator_parms_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = in_operator_parms_AST;
	}
	
/**
 * Implements the 6th precedence level of Progress 4GL expressions, the
 * <code>PLUS</code> and <code>MINUS</code> operators (for all data types,
 * even the non-numeric uses for dates or string concatenation).
 * <p>
 * This is only called by the 4th level {@link #compare_expr} rule. This  
 * method subsequently calls the {@link #prod_expr} rule. 
 * <p> 
 * There is a bogus ambiguity warning generated by this rule (which occurs
 * because of the addition of the special <code>IF THEN ELSE</code> function
 * (see {@link #if_func}) in the {@link #primary_expr} rule. No real ambiguity
 * seems to exist and no errors can be found, so warnings have been disabled.
 * <p>
 * See the top level expression parsing rule {@link #expr} for more details.
 */
	public final void sum_expr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sum_expr_AST = null;
		
		try {      // for error handling
			prod_expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1665:
			do {
				if ((LA(1)==MINUS||LA(1)==PLUS) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case PLUS:
					{
						Aast tmp921_AST = null;
						tmp921_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp921_AST);
						match(PLUS);
						break;
					}
					case MINUS:
					{
						Aast tmp922_AST = null;
						tmp922_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp922_AST);
						match(MINUS);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					
					matchAssign = false; 
					
					prod_expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1665;
				}
				
			} while (true);
			}
			sum_expr_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = sum_expr_AST;
	}
	
/**
 * Matches the SQL assignment of an {@link #sql_value} to an {@link #lvalue}.
 * Called by {@link #sql_assign_list}.
 */
	public final void sql_assign() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_assign_AST = null;
		Token  eq = null;
		Aast eq_AST = null;
		
		try {      // for error handling
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			eq = LT(1);
			eq_AST = (Aast)astFactory.create(eq);
			astFactory.makeASTRoot(currentAST, eq_AST);
			match(EQUALS);
			eq_AST.setType(ASSIGN);
			sql_value();
			astFactory.addASTChild(currentAST, returnAST);
			sql_assign_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_170);
		}
		returnAST = sql_assign_AST;
	}
	
/**                          
 * Matches a single {@link #expr} or <code>KW_NULL</code>. Used in
 * {@link #sql_value_list} and {@link #sql_update_stmt}.
 */
	public final void sql_value() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_value_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==KW_NULL) && (_tokenSet_171.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
				Aast tmp923_AST = null;
				tmp923_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp923_AST);
				match(KW_NULL);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			sql_value_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_171);
		}
		returnAST = sql_value_AST;
	}
	
/**
 * Matches the possible clauses to define column attributes or options.
 * Uses the following:
 * <p>
 * <ul>
 *    <li> {@link #sql_default_value}
 *    <li> {@link #label}
 *    <li> {@link #format_string}
 *    <li> {@link #column_label}
 *    <li> {@link #case_sensitive}
 *    <li> {@link #sql_not_null}
 * </ul>
 */
	public final void sql_column_options() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_column_options_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_DEFAULT:
			{
				sql_default_value();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_LABEL:
			{
				label(false);
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_FORMAT:
			{
				format_string(false);
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_COL_LAB:
			{
				column_label();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
				if ((LA(1)==KW_CASE_SEN||LA(1)==KW_NOT) && (LA(2)==DOT||LA(2)==KW_CASE_SEN)) {
					case_sensitive();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NOT) && (LA(2)==KW_NULL)) {
					sql_not_null();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			sql_column_options_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = sql_column_options_AST;
	}
	
/**
 * Matches all possible SQL data types.
 * <p>
 * <pre>
 * CHARACTER
 * DECIMAL
 * DATE
 * DOUBLE
 * FLOAT
 * INTEGER
 * LOGICAL
 * NUMERIC
 * REAL
 * SMALLINT
 * </pre>
 */
	public final void sql_data_type() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_data_type_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_CHAR:
			{
				Aast tmp924_AST = null;
				tmp924_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp924_AST);
				match(KW_CHAR);
				break;
			}
			case KW_DEC:
			{
				Aast tmp925_AST = null;
				tmp925_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp925_AST);
				match(KW_DEC);
				break;
			}
			case KW_DATE:
			{
				Aast tmp926_AST = null;
				tmp926_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp926_AST);
				match(KW_DATE);
				break;
			}
			case KW_DOUBLE:
			{
				Aast tmp927_AST = null;
				tmp927_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp927_AST);
				match(KW_DOUBLE);
				break;
			}
			case KW_FLOAT:
			{
				Aast tmp928_AST = null;
				tmp928_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp928_AST);
				match(KW_FLOAT);
				break;
			}
			case KW_INT:
			{
				Aast tmp929_AST = null;
				tmp929_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp929_AST);
				match(KW_INT);
				break;
			}
			case KW_LOGICAL:
			{
				Aast tmp930_AST = null;
				tmp930_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp930_AST);
				match(KW_LOGICAL);
				break;
			}
			case KW_NUMERIC:
			{
				Aast tmp931_AST = null;
				tmp931_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp931_AST);
				match(KW_NUMERIC);
				break;
			}
			case KW_REAL:
			{
				Aast tmp932_AST = null;
				tmp932_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp932_AST);
				match(KW_REAL);
				break;
			}
			case KW_SMALLINT:
			{
				Aast tmp933_AST = null;
				tmp933_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp933_AST);
				match(KW_SMALLINT);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==LPARENS)) {
				sql_data_option();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_157.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			sql_data_type_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_157);
		}
		returnAST = sql_data_type_AST;
	}
	
/**
 * Matches the <code>DEFAULT</code> keyword and the following literal. Used
 * by {@link #sql_column_options}.
 */
	public final void sql_default_value() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_default_value_AST = null;
		
		try {      // for error handling
			Aast tmp934_AST = null;
			tmp934_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp934_AST);
			match(KW_DEFAULT);
			literal();
			astFactory.addASTChild(currentAST, returnAST);
			sql_default_value_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = sql_default_value_AST;
	}
	
/**
 * Matches the <code>NOT NULL</code> keywords and the optional following
 * <code>UNIQUE</code>. Used by {@link #sql_column_options}.
 */
	public final void sql_not_null() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_not_null_AST = null;
		Token  n = null;
		Aast n_AST = null;
		Token  nu = null;
		Aast nu_AST = null;
		
		try {      // for error handling
			n = LT(1);
			n_AST = (Aast)astFactory.create(n);
			astFactory.makeASTRoot(currentAST, n_AST);
			match(KW_NOT);
			n_AST.setType(NOT_NULL);
			nu = LT(1);
			nu_AST = (Aast)astFactory.create(nu);
			match(KW_NULL);
			hide(nu);
			{
			switch ( LA(1)) {
			case KW_UNIQUE:
			{
				Aast tmp935_AST = null;
				tmp935_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp935_AST);
				match(KW_UNIQUE);
				break;
			}
			case DOT:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			sql_not_null_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = sql_not_null_AST;
	}
	
/**
 * Matches limited options (for column data type specifiers) as numeric
 * literals in parenthesis. Called by {@link #sql_data_type}.
 */
	public final void sql_data_option() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_data_option_AST = null;
		
		try {      // for error handling
			Aast tmp936_AST = null;
			tmp936_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp936_AST);
			match(LPARENS);
			literal();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				literal();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			sql_data_option_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_157);
		}
		returnAST = sql_data_option_AST;
	}
	
/**
 * Matches a single field or expression (including SQL aggregate functions) in 
 * a {@link #sql_column_list}. Uses {@link #expr}, {@link #format_phrase} and
 * {@link #any_non_reserved_symbol}. The symbol processing is needed to
 * match on qualified field names that reference aliased table names
 * (a "SQL correlation name").
 */
	public final void sql_individual_column() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_individual_column_AST = null;
		
		try {      // for error handling
			{
			if (((_tokenSet_53.member(LA(1))) && (_tokenSet_172.member(LA(2))) && (_tokenSet_173.member(LA(3))))&&( !sym.isField(LT(1).getText()) )) {
				any_non_reserved_symbol();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((_tokenSet_172.member(LA(1))) && (_tokenSet_173.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				format_phrase(null, null, false, false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_FROM||LA(1)==KW_INTO||LA(1)==COMMA) && (_tokenSet_58.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			sql_individual_column_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_174);
		}
		returnAST = sql_individual_column_AST;
	}
	
/**
 * Matches an embedded SQL aggregate function call. The following are
 * supported:
 * <p>
 * <pre>
 * AVG
 * COUNT
 * MAX
 * MIN
 * SUM
 * </pre>
 */
	public final void sql_aggregate_funcs() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_aggregate_funcs_AST = null;
		Token  m = null;
		Aast m_AST = null;
		
		try {      // for error handling
			
			boolean count = false;
			
			{
			switch ( LA(1)) {
			case KW_AVG:
			{
				Aast tmp937_AST = null;
				tmp937_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp937_AST);
				match(KW_AVG);
				break;
			}
			case KW_COUNT:
			{
				Aast tmp938_AST = null;
				tmp938_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp938_AST);
				match(KW_COUNT);
				count = true;
				break;
			}
			case KW_MAX:
			{
				Aast tmp939_AST = null;
				tmp939_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp939_AST);
				match(KW_MAX);
				break;
			}
			case KW_MIN:
			{
				Aast tmp940_AST = null;
				tmp940_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp940_AST);
				match(KW_MIN);
				break;
			}
			case KW_SUM:
			{
				Aast tmp941_AST = null;
				tmp941_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp941_AST);
				match(KW_SUM);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if (((LA(1)==MULTIPLY))&&( count )) {
				m = LT(1);
				m_AST = (Aast)astFactory.create(m);
				astFactory.addASTChild(currentAST, m_AST);
				match(MULTIPLY);
				
				saveAndReplaceTypeAndText(m_AST, STRING, "\"" + m_AST.getText() + "\"");
				
			}
			else if ((_tokenSet_24.member(LA(1)))) {
				{
				if ((LA(1)==KW_DISTINCT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					Aast tmp942_AST = null;
					tmp942_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp942_AST);
					match(KW_DISTINCT);
				}
				else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				{
				if (((_tokenSet_53.member(LA(1))) && (LA(2)==RPARENS) && (_tokenSet_3.member(LA(3))))&&( !sym.isField(LT(1).getText()) )) {
					any_non_reserved_symbol();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			sql_aggregate_funcs_AST = (Aast)currentAST.root;
			
			saveAndReplaceType(sql_aggregate_funcs_AST, count ? FUNC_INT : FUNC_POLY);                   
			
			// manually write our function-specific annotations
			sql_aggregate_funcs_AST.putAnnotation("builtin", Boolean.valueOf(true));
			sql_aggregate_funcs_AST.putAnnotation("sql", Boolean.valueOf(true));
			
			sql_aggregate_funcs_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = sql_aggregate_funcs_AST;
	}
	
/**
 * Matches a {@link #record} and an optional following 
 * {@link #sql_correlation_name}. Used from {@link #sql_from}.
 */
	public final void sql_table_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_table_spec_AST = null;
		Aast r_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			nothing=record(true, false, false);
			r_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((_tokenSet_15.member(LA(1))) && (_tokenSet_175.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				sql_correlation_name(r_AST.getText());
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_175.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			sql_table_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_175);
		}
		returnAST = sql_table_spec_AST;
	}
	
/**
 * Matches all 3 kinds of explicit join (inner joins, left outer joins and
 * right outer joins). Uses {@link #sql_table_spec} and
 * {@link #sql_join_condition}.  Used by {@link #sql_from}. 
 */
	public final void sql_explicit_join() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_explicit_join_AST = null;
		Token  r = null;
		Aast r_AST = null;
		Token  ou = null;
		Aast ou_AST = null;
		Token  jo = null;
		Aast jo_AST = null;
		Token  in = null;
		Aast in_AST = null;
		Token  l = null;
		Aast l_AST = null;
		Token  out = null;
		Aast out_AST = null;
		Token  j = null;
		Aast j_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_RIGHT:
			{
				r = LT(1);
				r_AST = (Aast)astFactory.create(r);
				astFactory.makeASTRoot(currentAST, r_AST);
				match(KW_RIGHT);
				r_AST.setType(RIGHT_OUTER_JOIN);
				{
				switch ( LA(1)) {
				case KW_OUTER:
				{
					ou = LT(1);
					ou_AST = (Aast)astFactory.create(ou);
					match(KW_OUTER);
					hide(ou);
					break;
				}
				case KW_JOIN:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				jo = LT(1);
				jo_AST = (Aast)astFactory.create(jo);
				match(KW_JOIN);
				hide(jo);
				sql_table_spec();
				astFactory.addASTChild(currentAST, returnAST);
				sql_join_condition();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_JOIN:
			case KW_INNER:
			case KW_LEFT:
			{
				{
				int _cnt629=0;
				_loop629:
				do {
					if ((LA(1)==KW_JOIN||LA(1)==KW_INNER||LA(1)==KW_LEFT)) {
						{
						switch ( LA(1)) {
						case KW_INNER:
						{
							in = LT(1);
							in_AST = (Aast)astFactory.create(in);
							match(KW_INNER);
							hide(in);
							break;
						}
						case KW_LEFT:
						{
							l = LT(1);
							l_AST = (Aast)astFactory.create(l);
							match(KW_LEFT);
							hide(l);
							{
							switch ( LA(1)) {
							case KW_OUTER:
							{
								out = LT(1);
								out_AST = (Aast)astFactory.create(out);
								match(KW_OUTER);
								hide(out);
								break;
							}
							case KW_JOIN:
							{
								break;
							}
							default:
							{
								throw new NoViableAltException(LT(1), getFilename());
							}
							}
							}
							break;
						}
						case KW_JOIN:
						{
							break;
						}
						default:
						{
							throw new NoViableAltException(LT(1), getFilename());
						}
						}
						}
						j = LT(1);
						j_AST = (Aast)astFactory.create(j);
						astFactory.makeASTRoot(currentAST, j_AST);
						match(KW_JOIN);
						j_AST.setType(l_AST == null ? INNER_JOIN : LEFT_OUTER_JOIN);
						sql_table_spec();
						astFactory.addASTChild(currentAST, returnAST);
						sql_join_condition();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						if ( _cnt629>=1 ) { break _loop629; } else {throw new NoViableAltException(LT(1), getFilename());}
					}
					
					_cnt629++;
				} while (true);
				}
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			sql_explicit_join_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_168);
		}
		returnAST = sql_explicit_join_AST;
	}
	
/**
 * Matches an <code>ON</code> followed by an {@link #expr} which is a SQL
 * join condition. Separated to build the tree properly.
 */
	public final void sql_join_condition() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_join_condition_AST = null;
		
		try {      // for error handling
			Aast tmp943_AST = null;
			tmp943_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp943_AST);
			match(KW_ON);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			sql_join_condition_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_176);
		}
		returnAST = sql_join_condition_AST;
	}
	
/**
 * Matches a correlation name ({@link #symbol}) in an {@link #sql_table_spec}
 * and creates a new buffer for the given table name.
 *
 * @param    rtext
 *           The table which is getting an alias.
 */
	public final void sql_correlation_name(
		String rtext
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_correlation_name_AST = null;
		Aast c_AST = null;
		
		try {      // for error handling
			symbol();
			c_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			defineBufferFromSymbol(c_AST, rtext, null, null, false);
			
			sql_correlation_name_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_175);
		}
		returnAST = sql_correlation_name_AST;
	}
	
/**
 * Matches the indicator variable specification in a {@link #sql_into}.
 * Uses {@link #lvalue}.
 */
	public final void sql_indicator_var() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_indicator_var_AST = null;
		
		try {      // for error handling
			Aast tmp944_AST = null;
			tmp944_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp944_AST);
			match(KW_INDICAT);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			sql_indicator_var_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_177);
		}
		returnAST = sql_indicator_var_AST;
	}
	
/**
 * Match the <code>ASCEND</code> or <code>DESCEND</code> keywords. Called
 * by {@link #sql_order_by}.
 */
	public final void sql_direction_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sql_direction_spec_AST = null;
		Token  a = null;
		Aast a_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case KW_ASC:
			{
				a = LT(1);
				a_AST = (Aast)astFactory.create(a);
				astFactory.addASTChild(currentAST, a_AST);
				match(KW_ASC);
				a_AST.setType(KW_ASCEND);
				sql_direction_spec_AST = (Aast)currentAST.root;
				break;
			}
			case KW_DESCEND:
			{
				Aast tmp945_AST = null;
				tmp945_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp945_AST);
				match(KW_DESCEND);
				sql_direction_spec_AST = (Aast)currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = sql_direction_spec_AST;
	}
	
/**
 * Matches the <code>RECID or ROWID</code> keywords and the following
 * expression inside parenthesis.  Calls {@link #expr} and is called by
 * {@link #create_stmt}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void recid_or_rowid() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast recid_or_rowid_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_RECID:
			{
				Aast tmp946_AST = null;
				tmp946_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp946_AST);
				match(KW_RECID);
				break;
			}
			case KW_ROWID:
			{
				Aast tmp947_AST = null;
				tmp947_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp947_AST);
				match(KW_ROWID);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			recid_or_rowid_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_91);
		}
		returnAST = recid_or_rowid_AST;
	}
	
/**   
 * Matches all language statements that have assignment-like syntax. The
 * following statements are so simple that they don't have separate rules
 * but are instead treated as global variables that always exist (thus they
 * are not referenced here but are directly matched in the calling rule):
 * <p>
 * <pre>
 *   CURRENT-LANGUAGE
 *   FRAME-VALUE
 *   PROMSGS
 *   PROPATH
 * </pre>
 * <p>
 * These statements are referenced:
 * <p>
 * <ul>
 *    <li> {@link #current_value_stmt}
 *    <li> {@link #dynamic_current_value_stmt}
 *    <li> {@link #dynamic_new_stmt}
 *    <li> {@link #dynamic_prop_stmt}
 *    <li> {@link #fix_codepage_stmt}
 *    <li> {@link #overlay_stmt}
 *    <li> {@link #set_byte_order_stmt}
 *    <li> {@link #set_pointer_value_stmt}
 *    <li> {@link #set_size_stmt}
 * </ul>
 * The following statements will be parsed as a function call and will be fixed after, in
 * {@link #restoreAssignStyleStmt}, and they are commented in this rule:
 * <ul>
 *    <li> {@link #entry_stmt}
 *    <li> {@link #extent_stmt}
 *    <li> {@link #length_stmt}
 *    <li> {@link #raw_stmt}
 *    <li> {@link #substring_stmt}
 * </ul>
 * <p>
 * This rule is consolidated to allow these constructs to be accessed from
 * {@link #lvalue} which allows then to be in an {@link #assign_stmt} which
 * actually calls this rule via {@link #assign}.  Top level use of these as
 * a language statement is handled via the {@link #assignment} rule which
 * also handles the matching for the <code>EQUALS</code> and following
 * {@link #expr}.
 */
	public final void assign_type_syntax_stmt_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast assign_type_syntax_stmt_list_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_CUR_VAL:
			{
				current_value_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DYN_CURV:
			{
				dynamic_current_value_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DYN_NEW:
			{
				dynamic_new_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DYN_PROP:
			{
				dynamic_prop_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_FIX_CP:
			{
				fix_codepage_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_OVERLAY:
			{
				overlay_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_PUT_BYTE:
			case KW_PUT_BITS:
			case KW_PUT_BYTS:
			case KW_PUT_I64:
			case KW_PUT_DBL:
			case KW_PUT_FLT:
			case KW_PUT_LONG:
			case KW_PUT_SHT:
			case KW_PUT_STR:
			case KW_PUT_UL:
			case KW_PUT_USHT:
			{
				put_memptr_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SET_B_OR:
			{
				set_byte_order_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SET_PTR:
			{
				set_pointer_value_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SET_SZ:
			{
				set_size_stmt();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			assign_type_syntax_stmt_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = assign_type_syntax_stmt_list_AST;
	}
	
/**   
 * Matches the <code>CURRENT-VALUE</code> language statement.  Calls 
 * {@link #sequence_ref} and {@link #database_name} rules.
 * <p>
 * Used by {@link #assign_type_syntax_stmt_list}.
 */
	public final void current_value_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast current_value_stmt_AST = null;
		Token  d = null;
		Aast d_AST = null;
		
		try {      // for error handling
			Aast tmp948_AST = null;
			tmp948_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp948_AST);
			match(KW_CUR_VAL);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			sequence_ref();
			astFactory.addASTChild(currentAST, returnAST);
			
			if (LA(2) != DATABASE)
			{
			int newtype = sym.lookupDatabase(LT(2).getText());
			
			// there should always be a match in valid Progress 4GL source
			// so we throw an exception if this is not the case
			if (newtype != -1)
			{
			LT(2).setType(newtype);
			}
			}
			
			{
			if ((LA(1)==COMMA) && (LA(2)==DATABASE||LA(2)==STRING) && (LA(3)==COMMA||LA(3)==RPARENS)) {
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case DATABASE:
				{
					d = LT(1);
					d_AST = (Aast)astFactory.create(d);
					astFactory.addASTChild(currentAST, d_AST);
					match(DATABASE);
					saveAndReplaceTypeAndText(d_AST, STRING, "\"" + d_AST.getText() + "\"");
					break;
				}
				case STRING:
				{
					Aast tmp949_AST = null;
					tmp949_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp949_AST);
					match(STRING);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((LA(1)==COMMA||LA(1)==RPARENS) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			current_value_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = current_value_stmt_AST;
	}
	
/**   
 * Matches the <code>DYNAMIC-CURRENT-VALUE</code> language statement.  Calls 
 * {@link #database_name} rules.
 * <p>
 * Used by {@link #assign_type_syntax_stmt_list}.
 */
	public final void dynamic_current_value_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dynamic_current_value_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp950_AST = null;
			tmp950_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp950_AST);
			match(KW_DYN_CURV);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			dynamic_current_value_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = dynamic_current_value_stmt_AST;
	}
	
/**
 * Matches the <code>DYNAMIC-NEW</code> statement which looks like an
 * assignment, allowing new object instances to be instantiated using a
 * runtime (dynamic) choice of the class. Uses {@link #func_call_parameters}
 * and is called from {@link #assign_type_syntax_stmt_list} which means
 * that the leftmost <code>lvalue EQUALS</code> is factored out.
 */
	public final void dynamic_new_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dynamic_new_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp951_AST = null;
			tmp951_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp951_AST);
			match(KW_DYN_NEW);
			sym.setLocalLookup(true);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			sym.setLocalLookup(false);
			func_call_parameters(false);
			astFactory.addASTChild(currentAST, returnAST);
			dynamic_new_stmt_AST = (Aast)currentAST.root;
			
			// save the original token type, then rewrite the type
			dynamic_new_stmt_AST.putAnnotation("oldtype", Long.valueOf(dynamic_new_stmt_AST.getType()));
			dynamic_new_stmt_AST.setType(FUNC_CLASS);
			
			// write our function-specific annotations
			sym.annotateFunction(dynamic_new_stmt_AST.getText(), dynamic_new_stmt_AST, false);
			
			// the above probably did not set the class name so we force it here
			sym.annotateClassRef("Progress.Lang.Object", dynamic_new_stmt_AST);
			
			dynamic_new_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = dynamic_new_stmt_AST;
	}
	
/**   
 * Matches the <code>ENTRY</code> language statement.  Calls {@link #expr} rule for up to 3 parameters.
 * <p>
 * Used by {@link #assign_type_syntax_stmt_list}.
 */
	public final void dynamic_prop_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dynamic_prop_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp952_AST = null;
			tmp952_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp952_AST);
			match(KW_DYN_PROP);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			dynamic_prop_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = dynamic_prop_stmt_AST;
	}
	
/**   
 * Matches the <code>FIX-CODEPAGE</code> language statement.  Calls the
 * {@link #expr} rule.
 * <p>
 * Used by {@link #assign_type_syntax_stmt_list}.
 */
	public final void fix_codepage_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast fix_codepage_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp953_AST = null;
			tmp953_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp953_AST);
			match(KW_FIX_CP);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			fix_codepage_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = fix_codepage_stmt_AST;
	}
	
/**   
 * Matches the <code>OVERLAY</code> language statement.  Calls {@link #expr},
 * and {@link #lvalue} rules.
 * <p>
 * Used by {@link #assign_type_syntax_stmt_list}.
 */
	public final void overlay_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast overlay_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp954_AST = null;
			tmp954_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp954_AST);
			match(KW_OVERLAY);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			chained_object_members();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case COMMA:
				{
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					expr();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case RPARENS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			overlay_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = overlay_stmt_AST;
	}
	
/**   
 * Matches the <code>SUBSTRING( , , , ) = expression</code> language 
 * statement.  This rule uses a rule reference to process expressions
 * for what appear to be comma-separated parameters (see {@link #expr}). 
 * Some tokens are suppressed and the <code>EQUALS</code> token is processed
 * in the calling rule.  The resulting AST should be easy to process.
 * <p>
 * This language statement has inherent ambiguity with the built-in function
 * that uses the same <code>SUBSTRING</code> keyword (and has a nearly
 * identical meaning but is only for use in expressions and it cannot be used
 * as an assignment).  Progress gives precedence to matching the language 
 * statement first and then the function form.  This parser implements this 
 * rule in the {@link #lvalue} portion of the top-level {@link #assignment}
 * rule.  Since this is matched before expressions (which is where a function
 * call is matched) the logic works properly and all ambiguity is resolved.
 * <p>
 * Used by {@link #assign_type_syntax_stmt_list}.
 * The call is commented because the this statement is processed via the func_call, and after that fixed in
 * restoreAssignStyleStmt.
 */
	public final void substring_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast substring_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp955_AST = null;
			tmp955_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp955_AST);
			match(KW_SUBSTR);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case COMMA:
				{
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					expr();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case RPARENS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			substring_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = substring_stmt_AST;
	}
	
/**   
 * Simple rule to handle the common case where a {@link #filename}, a
 * <code>STRING</code> or a {@link #value} can be matched.
 * <p>
 * Called by {@link #compile_stmt}, {@link #into_directory_clause},
 * {@link #save_cache_stmt} and {@link #io_through_stmt}.
 */
	public final void external_name_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast external_name_spec_AST = null;
		Token  s = null;
		Aast s_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==STRING) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				s = LT(1);
				s_AST = (Aast)astFactory.create(s);
				astFactory.addASTChild(currentAST, s_AST);
				match(STRING);
				convertStringTo(s_AST, FILENAME);
			}
			else if ((LA(1)==KW_VALUE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				value();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				filename(null);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			external_name_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_28);
		}
		returnAST = external_name_spec_AST;
	}
	
/**   
 * Matches the core set of options for the compile statement.
 * <p>
 * Calls:
 * <p>
 * <ul>
 *    <li> {@link #embedded_assign}
 *    <li> {@link #into_directory_clause}
 *    <li> {@link #external_name_spec}
 *    <li> {@link #optional_listing_clause}
 *    <li> {@link #expr}
 *    <li> {@link #languages_clause}
 * </ul>
 * <p>
 * Used by {@link #compile_stmt}.
 */
	public final void compile_options_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast compile_options_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_ATTR:
			case KW_STRM_IO:
			case KW_GEN_MD5:
			case KW_MIN_SZ:
			{
				{
				switch ( LA(1)) {
				case KW_ATTR:
				{
					Aast tmp956_AST = null;
					tmp956_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp956_AST);
					match(KW_ATTR);
					break;
				}
				case KW_STRM_IO:
				{
					Aast tmp957_AST = null;
					tmp957_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp957_AST);
					match(KW_STRM_IO);
					break;
				}
				case KW_MIN_SZ:
				{
					Aast tmp958_AST = null;
					tmp958_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp958_AST);
					match(KW_MIN_SZ);
					break;
				}
				case KW_GEN_MD5:
				{
					Aast tmp959_AST = null;
					tmp959_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp959_AST);
					match(KW_GEN_MD5);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				switch ( LA(1)) {
				case EQUALS:
				{
					embedded_assign();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case DOT:
				case KW_ATTR:
				case KW_DBG_LST:
				case KW_LISTING:
				case KW_NO_ATTR:
				case KW_NO_ERROR:
				case KW_PREPROC:
				case KW_SAVE:
				case KW_STRM_IO:
				case KW_V6FRAME:
				case KW_XCODE:
				case KW_XREF:
				case KW_XREF_XML:
				case KW_GEN_MD5:
				case KW_LANGUAGE:
				case KW_MIN_SZ:
				case KW_OPTIONS:
				case KW_OPTIONSF:
				case KW_STR_XREF:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			case KW_NO_ATTR:
			{
				Aast tmp960_AST = null;
				tmp960_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp960_AST);
				match(KW_NO_ATTR);
				break;
			}
			case KW_OPTIONS:
			{
				Aast tmp961_AST = null;
				tmp961_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp961_AST);
				match(KW_OPTIONS);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_OPTIONSF:
			{
				Aast tmp962_AST = null;
				tmp962_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp962_AST);
				match(KW_OPTIONSF);
				external_name_spec();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_SAVE:
			{
				Aast tmp963_AST = null;
				tmp963_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp963_AST);
				match(KW_SAVE);
				{
				switch ( LA(1)) {
				case EQUALS:
				{
					embedded_assign();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case DOT:
				case KW_ATTR:
				case KW_DBG_LST:
				case KW_INTO:
				case KW_LISTING:
				case KW_NO_ATTR:
				case KW_NO_ERROR:
				case KW_PREPROC:
				case KW_SAVE:
				case KW_STRM_IO:
				case KW_V6FRAME:
				case KW_XCODE:
				case KW_XREF:
				case KW_XREF_XML:
				case KW_GEN_MD5:
				case KW_LANGUAGE:
				case KW_MIN_SZ:
				case KW_OPTIONS:
				case KW_OPTIONSF:
				case KW_STR_XREF:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				switch ( LA(1)) {
				case KW_INTO:
				{
					into_directory_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case DOT:
				case KW_ATTR:
				case KW_DBG_LST:
				case KW_LISTING:
				case KW_NO_ATTR:
				case KW_NO_ERROR:
				case KW_PREPROC:
				case KW_SAVE:
				case KW_STRM_IO:
				case KW_V6FRAME:
				case KW_XCODE:
				case KW_XREF:
				case KW_XREF_XML:
				case KW_GEN_MD5:
				case KW_LANGUAGE:
				case KW_MIN_SZ:
				case KW_OPTIONS:
				case KW_OPTIONSF:
				case KW_STR_XREF:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			case KW_LISTING:
			{
				Aast tmp964_AST = null;
				tmp964_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp964_AST);
				match(KW_LISTING);
				external_name_spec();
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop689:
				do {
					if ((LA(1)==KW_APPEND||LA(1)==KW_PAGE_SZ||LA(1)==KW_PAGE_WID)) {
						optional_listing_clause();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop689;
					}
					
				} while (true);
				}
				break;
			}
			case KW_XCODE:
			{
				Aast tmp965_AST = null;
				tmp965_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp965_AST);
				match(KW_XCODE);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_XREF:
			case KW_STR_XREF:
			{
				{
				switch ( LA(1)) {
				case KW_STR_XREF:
				{
					Aast tmp966_AST = null;
					tmp966_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp966_AST);
					match(KW_STR_XREF);
					break;
				}
				case KW_XREF:
				{
					Aast tmp967_AST = null;
					tmp967_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp967_AST);
					match(KW_XREF);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				external_name_spec();
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case KW_APPEND:
				case KW_PAGE_SZ:
				case KW_PAGE_WID:
				{
					optional_listing_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case DOT:
				case KW_ATTR:
				case KW_DBG_LST:
				case KW_LISTING:
				case KW_NO_ATTR:
				case KW_NO_ERROR:
				case KW_PREPROC:
				case KW_SAVE:
				case KW_STRM_IO:
				case KW_V6FRAME:
				case KW_XCODE:
				case KW_XREF:
				case KW_XREF_XML:
				case KW_GEN_MD5:
				case KW_LANGUAGE:
				case KW_MIN_SZ:
				case KW_OPTIONS:
				case KW_OPTIONSF:
				case KW_STR_XREF:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			case KW_XREF_XML:
			{
				Aast tmp968_AST = null;
				tmp968_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp968_AST);
				match(KW_XREF_XML);
				external_name_spec();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_LANGUAGE:
			{
				languages_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_DBG_LST:
			case KW_PREPROC:
			{
				{
				switch ( LA(1)) {
				case KW_DBG_LST:
				{
					Aast tmp969_AST = null;
					tmp969_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp969_AST);
					match(KW_DBG_LST);
					break;
				}
				case KW_PREPROC:
				{
					Aast tmp970_AST = null;
					tmp970_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp970_AST);
					match(KW_PREPROC);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				external_name_spec();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_NO_ERROR:
			{
				Aast tmp971_AST = null;
				tmp971_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp971_AST);
				match(KW_NO_ERROR);
				break;
			}
			case KW_V6FRAME:
			{
				Aast tmp972_AST = null;
				tmp972_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp972_AST);
				match(KW_V6FRAME);
				{
				switch ( LA(1)) {
				case EQUALS:
				{
					embedded_assign();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case DOT:
				case KW_ATTR:
				case KW_DBG_LST:
				case KW_LISTING:
				case KW_NO_ATTR:
				case KW_NO_ERROR:
				case KW_PREPROC:
				case KW_SAVE:
				case KW_STRM_IO:
				case KW_V6FRAME:
				case KW_XCODE:
				case KW_XREF:
				case KW_XREF_XML:
				case KW_GEN_MD5:
				case KW_LANGUAGE:
				case KW_MIN_SZ:
				case KW_OPTIONS:
				case KW_OPTIONSF:
				case KW_STR_XREF:
				case KW_USE_REV:
				case KW_USE_UND:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				switch ( LA(1)) {
				case KW_USE_REV:
				{
					Aast tmp973_AST = null;
					tmp973_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp973_AST);
					match(KW_USE_REV);
					break;
				}
				case KW_USE_UND:
				{
					Aast tmp974_AST = null;
					tmp974_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp974_AST);
					match(KW_USE_UND);
					break;
				}
				case DOT:
				case KW_ATTR:
				case KW_DBG_LST:
				case KW_LISTING:
				case KW_NO_ATTR:
				case KW_NO_ERROR:
				case KW_PREPROC:
				case KW_SAVE:
				case KW_STRM_IO:
				case KW_V6FRAME:
				case KW_XCODE:
				case KW_XREF:
				case KW_XREF_XML:
				case KW_GEN_MD5:
				case KW_LANGUAGE:
				case KW_MIN_SZ:
				case KW_OPTIONS:
				case KW_OPTIONSF:
				case KW_STR_XREF:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			compile_options_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_178);
		}
		returnAST = compile_options_clause_AST;
	}
	
/**   
 * Matches the <code>INTO</code> keyword followed by a directory name.
 * <p>
 * Calls {@link #external_name_spec}.
 * <p>
 * Used by {@link #compile_options_clause}.
 */
	public final void into_directory_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast into_directory_clause_AST = null;
		
		try {      // for error handling
			Aast tmp975_AST = null;
			tmp975_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp975_AST);
			match(KW_INTO);
			external_name_spec();
			astFactory.addASTChild(currentAST, returnAST);
			into_directory_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_178);
		}
		returnAST = into_directory_clause_AST;
	}
	
/**   
 * Matches the <code>APPEND, PAGE-SIZE and PAGE-WIDTH</code> keywords
 * followed by an {@link #embedded_assign} or an {@link #expr}.
 * <p>
 * Used by {@link #compile_options_clause}.
 */
	public final void optional_listing_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast optional_listing_clause_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case KW_APPEND:
			{
				Aast tmp976_AST = null;
				tmp976_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp976_AST);
				match(KW_APPEND);
				{
				switch ( LA(1)) {
				case EQUALS:
				{
					embedded_assign();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case DOT:
				case KW_ATTR:
				case KW_DBG_LST:
				case KW_LISTING:
				case KW_NO_ATTR:
				case KW_NO_ERROR:
				case KW_PREPROC:
				case KW_SAVE:
				case KW_STRM_IO:
				case KW_V6FRAME:
				case KW_XCODE:
				case KW_XREF:
				case KW_XREF_XML:
				case KW_APPEND:
				case KW_GEN_MD5:
				case KW_LANGUAGE:
				case KW_MIN_SZ:
				case KW_OPTIONS:
				case KW_OPTIONSF:
				case KW_PAGE_SZ:
				case KW_PAGE_WID:
				case KW_STR_XREF:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				optional_listing_clause_AST = (Aast)currentAST.root;
				break;
			}
			case KW_PAGE_SZ:
			{
				Aast tmp977_AST = null;
				tmp977_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp977_AST);
				match(KW_PAGE_SZ);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				optional_listing_clause_AST = (Aast)currentAST.root;
				break;
			}
			case KW_PAGE_WID:
			{
				Aast tmp978_AST = null;
				tmp978_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp978_AST);
				match(KW_PAGE_WID);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				optional_listing_clause_AST = (Aast)currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_179);
		}
		returnAST = optional_listing_clause_AST;
	}
	
/**   
 * Matches the <code>LANGUAGES</code> keyword and a parenthesized, 
 * comma-separated list of {@link #language_list} entries.  This can be
 * followed by an {@link #embedded_assign} option.
 * <p>
 * Used by {@link #compile_options_clause}.
 */
	public final void languages_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast languages_clause_AST = null;
		
		try {      // for error handling
			Aast tmp979_AST = null;
			tmp979_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp979_AST);
			match(KW_LANGUAGE);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			language_list();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop700:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					language_list();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop700;
				}
				
			} while (true);
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_TXT_SEG:
			{
				Aast tmp980_AST = null;
				tmp980_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp980_AST);
				match(KW_TXT_SEG);
				embedded_assign();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_ATTR:
			case KW_DBG_LST:
			case KW_LISTING:
			case KW_NO_ATTR:
			case KW_NO_ERROR:
			case KW_PREPROC:
			case KW_SAVE:
			case KW_STRM_IO:
			case KW_V6FRAME:
			case KW_XCODE:
			case KW_XREF:
			case KW_XREF_XML:
			case KW_GEN_MD5:
			case KW_LANGUAGE:
			case KW_MIN_SZ:
			case KW_OPTIONS:
			case KW_OPTIONSF:
			case KW_STR_XREF:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			languages_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_178);
		}
		returnAST = languages_clause_AST;
	}
	
/**   
 * Matches the a list of colon separated languages, all of which are made 
 * children of an artificial mode of type <code>LANGUAGES</code>.  Each
 * language is matched by a {@link #expr}.
 * <p>
 * Used by {@link #languages_clause}.
 */
	public final void language_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast language_list_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(LANGUAGES,"language list"));
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop704:
			do {
				if ((LA(1)==COLON)) {
					colon();
					astFactory.addASTChild(currentAST, returnAST);
					expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop704;
				}
				
			} while (true);
			}
			language_list_AST = (Aast)currentAST.root;
			if (language_list_AST.getNumberOfChildren() == 0) language_list_AST = null;
			currentAST.root = language_list_AST;
			currentAST.child = language_list_AST!=null &&language_list_AST.getFirstChild()!=null ?
				language_list_AST.getFirstChild() : language_list_AST;
			currentAST.advanceChildToEnd();
			language_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_29);
		}
		returnAST = language_list_AST;
	}
	
/**
 * Matches the widget phrase construct of the Progress 4GL language which
 * consists of the optional <code>FIELD</code> keyword prefix and the
 * required following widget reference.  This optionally appears in a 
 * referencing rule but does not begin with a specific keyword.  All real 
 * processing is done using the {@link #widget} rule which really delegates
 * its work to {@link #lvalue}.
 * <p>
 * The <code>INPUT</code> keyword can be optionally inserted between the
 * <code>TO</code> and the widget. This is undocumented and has no discernable
 * semantic meaning so it is dropped from the tree. If the <code>INPUT</code>
 * keyword does exist, then it can be followed by an optional
 * {@link #frame_reference} which can't normally exist in front of the
 * widget.
 * <p>
 * Called from {@link #hide_stmt}, {@link #view_stmt}, {@link #widget_list}
 * {@link #comma_widget_list} and {@link #focus_clause}.
 */
	public final void widget_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast widget_phrase_AST = null;
		Token  fi = null;
		Aast fi_AST = null;
		Token  in = null;
		Aast in_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==KW_FIELD)) {
				fi = LT(1);
				fi_AST = (Aast)astFactory.create(fi);
				match(KW_FIELD);
				hide(fi);
			}
			else if ((_tokenSet_150.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_INPUT)) {
				in = LT(1);
				in_AST = (Aast)astFactory.create(in);
				match(KW_INPUT);
				hide(in);
				{
				if ((LA(1)==KW_FRAME) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
					frame_reference(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else if ((_tokenSet_64.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			widget();
			astFactory.addASTChild(currentAST, returnAST);
			widget_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_141);
		}
		returnAST = widget_phrase_AST;
	}
	
/**
 * Matches the <code>MESSAGE STRING or NO-MESSAGE</code> clause used in the
 * <code>PAUSE</code> language statement.  Called by {@link #pause_stmt}.
 */
	public final void simple_message_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast simple_message_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_MSG:
			{
				Aast tmp981_AST = null;
				tmp981_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp981_AST);
				match(KW_MSG);
				Aast tmp982_AST = null;
				tmp982_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp982_AST);
				match(STRING);
				break;
			}
			case KW_NO_MSG:
			{
				Aast tmp983_AST = null;
				tmp983_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp983_AST);
				match(KW_NO_MSG);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			simple_message_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_135);
		}
		returnAST = simple_message_clause_AST;
	}
	
/**   
 * Matches the <code>ALL</code> keyword and an optional list of fields
 * that should not be included. Calls the {@link #widget_array} rule.
 * <p>
 * Used by {@link #disable_stmt} and {@link #enable_stmt}.
 * <p>
 * This is a separate rule to centralize logic and build the AST properly.
 */
	public final void all_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast all_clause_AST = null;
		
		try {      // for error handling
			Aast tmp984_AST = null;
			tmp984_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp984_AST);
			match(KW_ALL);
			{
			switch ( LA(1)) {
			case KW_EXCEPT:
			{
				Aast tmp985_AST = null;
				tmp985_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp985_AST);
				match(KW_EXCEPT);
				widget_array();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_WITH:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			all_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_180);
		}
		returnAST = all_clause_AST;
	}
	
/**
 * Matches a field name and an optional <code>WHEN</code> condition.
 * Calls the {@link #widget} and {@link #format_phrase} rules.
 * <p>
 * Used by {@link #disable_stmt}, {@link #enable_stmt} and 
 * {@link #text_clause}.
 * <p>
 * The use of the format phrase naturally conflicts with the large set of
 * possible following tokens.  This is not really ambiguous so warnings
 * have been disabled.
 * <p>
 * This is a separate rule to centralize logic.
 *
 * @param   enableWidget
 *          <code>true</code> if this field clause represents a widget being enabled in a frame;
 *          else <code>false</code>.
 */
	public final void field_clause(
		boolean enableWidget
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast field_clause_AST = null;
		Aast l_AST = null;
		Aast f_AST = null;
		
		try {      // for error handling
			
			Aast   fld        = null;
			String symbolName = null;
			
			{
			allowSymbolMatch = true;
			lvalue();
			l_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			// reset each loop iteration
			symbolName = null;
			fld        = null;
			
			if (l_AST.getType() == SYMBOL)
			{
			symbolName = l_AST.getText();
			}
			else
			{
			fld = findFieldNode(l_AST);
			}
			
			allowSymbolMatch = false;
			
			{
			if ((_tokenSet_181.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				format_phrase(symbolName, fld, true, enableWidget);
				f_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_182.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			field_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_182);
		}
		returnAST = field_clause_AST;
	}
	
/**   
 * Matches the optional <code>PAUSE</code> keyword prefix and the required
 * following numeric {@link #expr}.
 * <p>
 * Used by {@link #readkey_stmt} and {@link #wait_for_stmt} rules.
 * <p>
 * This is a separate rule to centralize logic and build the AST properly.
 */
	public final void pause_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast pause_clause_AST = null;
		
		try {      // for error handling
			Aast tmp986_AST = null;
			tmp986_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp986_AST);
			match(KW_PAUSE);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			pause_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_140);
		}
		returnAST = pause_clause_AST;
	}
	
/**
  * Matches the <code>DELIMITER</code> keyword and the following single
  * quoted character (a <code>STRING</code>).
  * <p>
  * Used by {@link #export_stmt} and {@link #import_stmt} rules.
  */
	public final void delimiter_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast delimiter_clause_AST = null;
		
		try {      // for error handling
			Aast tmp987_AST = null;
			tmp987_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp987_AST);
			match(KW_DELIMIT);
			Aast tmp988_AST = null;
			tmp988_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp988_AST);
			match(STRING);
			delimiter_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_84);
		}
		returnAST = delimiter_clause_AST;
	}
	
/**
 * Implements proper tree building for the most common field specification
 * in the {@link #export_stmt}.  Roots an {@link #expr} at a node of type
 * <code>EXPORT_FIELD</code>.
 * <p>
 * Progress has an undocumented feature where format and aggregate phrases
 * can be attached to any expression but although a {@link #format_phrase}
 * and {@link #aggregate_phrase} are matched, they are dropped from the
 * resulting tree since in Progress they are silently ignored.
 */
	public final void export_field() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast export_field_AST = null;
		Aast ag_AST = null;
		Aast fmt_AST = null;
		
		try {      // for error handling
			
			int numFP = 0;
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(EXPORT_FIELD,"output field"));
			
			{
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop763:
			do {
				if ((LA(1)==LPARENS) && (_tokenSet_75.member(LA(2))) && (_tokenSet_183.member(LA(3)))) {
					lparens();
					astFactory.addASTChild(currentAST, returnAST);
					aggregate_phrase();
					ag_AST = (Aast)returnAST;
					hide(ag_AST);
					rparens();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((_tokenSet_184.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( numFP < 2 )) {
					format_phrase(null, null, false, false);
					fmt_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					numFP++;
				}
				else {
					break _loop763;
				}
				
			} while (true);
			}
			}
			export_field_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_21);
		}
		returnAST = export_field_AST;
	}
	
/**
  * Matches the <code>UNFORMATTED</code> keyword and the following {@link #record} or
  * {@link #lvalue}.  The record case is an undocumented feature of the 4GL.
  * <p>
  * Another undocumented feature (found in customer source code) is that a CARET can be inserted
  * before the <code>lvalue</code>.  It generates a warning message but still runs un the 4GL.
  * The meaning is questionable (it is probably ignored) since the idea is to read the entire
  * line into the lvalue and the caret means "ignore the content in this position", but in
  * "whole line" more it doesn't make sense.
  * <p>
  * Used by {@link #import_stmt}.
  */
	public final void unformatted_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast unformatted_clause_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			Aast tmp989_AST = null;
			tmp989_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp989_AST);
			match(KW_UNFORMAT);
			{
			if (((_tokenSet_13.member(LA(1))) && (LA(2)==DOT||LA(2)==KW_NO_ERROR||LA(2)==KW_NO_LOBS) && (_tokenSet_11.member(LA(3))))&&( isRecord(LT(1).getText()) )) {
				nothing=record(true, false, false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_185.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				{
				int _cnt778=0;
				_loop778:
				do {
					if ((LA(1)==CARET)) {
						Aast tmp990_AST = null;
						tmp990_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp990_AST);
						match(CARET);
					}
					else if ((_tokenSet_64.member(LA(1)))) {
						lvalue();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						if ( _cnt778>=1 ) { break _loop778; } else {throw new NoViableAltException(LT(1), getFilename());}
					}
					
					_cnt778++;
				} while (true);
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			unformatted_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_186);
		}
		returnAST = unformatted_clause_AST;
	}
	
/**      
 * Implements proper tree building for the most common field specification
 * in the {@link #import_stmt}.  Roots an {@link #lvalue} at a node of type
 * <code>IMPORT_FIELD</code>.
 */
	public final void import_field() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast import_field_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(IMPORT_FIELD,"input field"));
			{
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			}
			import_field_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_129);
		}
		returnAST = import_field_AST;
	}
	
/**   
 * Matches the optional prefix <code>BUFFER or FIELD</code> keyword and
 * the required following buffer ({@link #record}) or field {@link #lvalue}.
 * These two alternatives are disambiguated by semantic predicate.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * Used by {@link #raw_transfer_stmt}.
 */
	public final void buffer_or_field_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast buffer_or_field_spec_AST = null;
		Token  bu = null;
		Aast bu_AST = null;
		Token  fi = null;
		Aast fi_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			{
			if ((LA(1)==KW_BUFFER) && (_tokenSet_49.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				bu = LT(1);
				bu_AST = (Aast)astFactory.create(bu);
				match(KW_BUFFER);
				hide(bu);
			}
			else if ((LA(1)==KW_FIELD)) {
				fi = LT(1);
				fi_AST = (Aast)astFactory.create(fi);
				match(KW_FIELD);
				hide(fi);
			}
			else if ((_tokenSet_49.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((_tokenSet_13.member(LA(1))) && (LA(2)==DOT||LA(2)==KW_NO_ERROR||LA(2)==KW_TO) && (_tokenSet_11.member(LA(3))))&&( isRecord(LT(1).getText()) )) {
				nothing=record(true, false, false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			buffer_or_field_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_187);
		}
		returnAST = buffer_or_field_spec_AST;
	}
	
/**
 * Match the <code>FROM</code> specification of {@link #copy_lob_stmt} using
 * {@link #lob_spec}, {@link #starting_clause} and {@link #for_clause}. The
 * result is always rooted at a <code>KW_FROM</code>, even though that keyword
 * is optional in the 4GL (a token will be manufactured if needed).
 */
	public final void from_lob_source() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast from_lob_source_AST = null;
		
		try {      // for error handling
			
			if (LA(1) != KW_FROM)
			{
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(KW_FROM,"from"));
			}
			
			{
			if ((LA(1)==KW_FROM) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp991_AST = null;
				tmp991_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp991_AST);
				match(KW_FROM);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			lob_spec(false);
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop791:
			do {
				switch ( LA(1)) {
				case KW_STARTING:
				{
					starting_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_FOR:
				{
					for_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					break _loop791;
				}
				}
			} while (true);
			}
			from_lob_source_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_188);
		}
		returnAST = from_lob_source_AST;
	}
	
/**
 * Match the <code>TO</code> specification of {@link #copy_lob_stmt} using
 * {@link #lob_spec}.  The result is always rooted at a <code>KW_TO</code>.
 */
	public final void to_lob_target() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast to_lob_target_AST = null;
		
		try {      // for error handling
			Aast tmp992_AST = null;
			tmp992_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp992_AST);
			match(KW_TO);
			lob_spec(true);
			astFactory.addASTChild(currentAST, returnAST);
			to_lob_target_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_189);
		}
		returnAST = to_lob_target_AST;
	}
	
/**
 * Match the <code>NO-CONVERT</code> or a <code>CONVERT</code> followed by
 * two {@link #source_or_target_clause} references. Called by 
 * {@link #io_options} and {@link #copy_lob_stmt}.
 */
	public final void codepage_convert_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast codepage_convert_phrase_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case KW_NO_CVT:
			{
				Aast tmp993_AST = null;
				tmp993_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp993_AST);
				match(KW_NO_CVT);
				codepage_convert_phrase_AST = (Aast)currentAST.root;
				break;
			}
			case KW_CONVERT:
			{
				Aast tmp994_AST = null;
				tmp994_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp994_AST);
				match(KW_CONVERT);
				{
				_loop1005:
				do {
					if ((LA(1)==KW_SOURCE||LA(1)==KW_TARGET)) {
						source_or_target_clause(true);
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop1005;
					}
					
				} while (true);
				}
				codepage_convert_phrase_AST = (Aast)currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_190);
		}
		returnAST = codepage_convert_phrase_AST;
	}
	
/**
 * Match the specification of a single source or target LOB with is either an {@link #expr}
 * (optionally prepended with the <code>KW_OBJECT</code>) or a <code>KW_FILE</code> followed by
 *  an {@link #expr}. If <code>to</code> is <code>true</code> then {@link #overlay_clause} or
 * <code>KW_APPEND</code> can be optionally matched at the end. Used by {@link #from_lob_source}
 * and {@link #to_lob_target}.
 */
	public final void lob_spec(
		boolean to
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast lob_spec_AST = null;
		Token  ob = null;
		Aast ob_AST = null;
		
		try {      // for error handling
			{
			if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_FILE )) {
				{
				if ((LA(1)==KW_OBJECT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					ob = LT(1);
					ob_AST = (Aast)astFactory.create(ob);
					match(KW_OBJECT);
					hide(ob);
				}
				else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				{
				if (((LA(1)==KW_OVERLAY))&&( to )) {
					overlay_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_191.member(LA(1)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else if ((LA(1)==KW_FILE) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp995_AST = null;
				tmp995_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp995_AST);
				match(KW_FILE);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				{
				if (((LA(1)==KW_APPEND))&&( to )) {
					Aast tmp996_AST = null;
					tmp996_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp996_AST);
					match(KW_APPEND);
				}
				else if ((_tokenSet_191.member(LA(1)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			lob_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_191);
		}
		returnAST = lob_spec_AST;
	}
	
/**
 * Matches the <code>STARTING</code> keyword followed by <code>AT</code>
 * (which is dropped from the tree) and an {@link #expr}. Used by
 * {@link #from_lob_source}.
 */
	public final void starting_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast starting_clause_AST = null;
		Token  at = null;
		Aast at_AST = null;
		
		try {      // for error handling
			Aast tmp997_AST = null;
			tmp997_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp997_AST);
			match(KW_STARTING);
			at = LT(1);
			at_AST = (Aast)astFactory.create(at);
			match(KW_AT);
			hide(at);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			starting_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_192);
		}
		returnAST = starting_clause_AST;
	}
	
/**
 * Matches the <code>FOR</code> keyword followed by an {@link #expr}. Used by
 * {@link #from_lob_source}.
 */
	public final void for_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast for_clause_AST = null;
		
		try {      // for error handling
			Aast tmp998_AST = null;
			tmp998_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp998_AST);
			match(KW_FOR);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			for_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_192);
		}
		returnAST = for_clause_AST;
	}
	
/**
 * Matches the <code>OVERLAY</code> keyword followed by <code>AT</code>
 * (which is dropped from the tree) and an {@link #expr}. <code>KW_TRIM</code>
 * is optionally matched at the end. Used by {@link #lob_spec}.
 */
	public final void overlay_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast overlay_clause_AST = null;
		Token  at = null;
		Aast at_AST = null;
		
		try {      // for error handling
			Aast tmp999_AST = null;
			tmp999_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp999_AST);
			match(KW_OVERLAY);
			at = LT(1);
			at_AST = (Aast)astFactory.create(at);
			match(KW_AT);
			hide(at);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_TRIM:
			{
				Aast tmp1000_AST = null;
				tmp1000_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1000_AST);
				match(KW_TRIM);
				break;
			}
			case DOT:
			case KW_FOR:
			case KW_NO_ERROR:
			case KW_TO:
			case KW_CONVERT:
			case KW_NO_CVT:
			case KW_STARTING:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			overlay_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_191);
		}
		returnAST = overlay_clause_AST;
	}
	
/**   
 * Matches the <code>ENTRY</code> language statement.  Calls {@link #expr},
 * and {@link #lvalue} rules.
 * <p>
 * Used by {@link #assign_type_syntax_stmt_list}.
 * The call is commented because the this statement is processed via the func_call, and after that fixed in
 * restoreAssignStyleStmt.
 */
	public final void entry_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast entry_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp1001_AST = null;
			tmp1001_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1001_AST);
			match(KW_ENTRY);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			entry_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = entry_stmt_AST;
	}
	
/**   
 * Matches the <code>EXTENT</code> language statement. Calls {@link #lvalue}.
 * <p>
 * Used by {@link #assign_type_syntax_stmt_list}.
 * The call is commented because the this statement is processed via the func_call, and after that fixed in
 * restoreAssignStyleStmt.
 */
	public final void extent_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast extent_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp1002_AST = null;
			tmp1002_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1002_AST);
			match(KW_EXTENT);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			extent_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = extent_stmt_AST;
	}
	
/**
 * Matches the <code>LENGTH</code> language statement. Calls {@link #lvalue}.
 * <p>
 * It turns out is NOT an Oracle-only statement, contrary to the
 * documentation.
 * <p>
 * Used by {@link #assign_type_syntax_stmt_list}.
 * The call is commented because the this statement is processed via the func_call, and after that fixed in
 * restoreAssignStyleStmt.
 */
	public final void length_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast length_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp1003_AST = null;
			tmp1003_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1003_AST);
			match(KW_LENGTH);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			length_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = length_stmt_AST;
	}
	
/**
 * Sequence references are unquoted text that must match a sequence name
 * defined in an accessible schema.  This rule matches a {@link #symbol} and
 * converts that token into a properly formatted <code>STRING</code>.
 */
	public final void sequence_ref() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sequence_ref_AST = null;
		Aast s_AST = null;
		
		try {      // for error handling
			symbol();
			s_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			// convert unquoted sequence name to a quoted string
			saveAndReplaceTypeAndText(s_AST, STRING, "\"" + s_AST.getText() + "\"");
			
			sequence_ref_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_29);
		}
		returnAST = sequence_ref_AST;
	}
	
/**
 * Matches the {@code current-value}, {@code dynamic-current-value}, {@code dynamic-next-value}
 * and {@code next-value()} function calls. The root node returned will be a {@code FUNC_INT} or a
 * {@code FUNC_INT64} and there will be 1 to 3 children, of which the first two are {@code STRING}
 * nodes but the last is an {@code FUNC_INT} representing the optional {@code tenant-id} target.
 * <p>
 * The exit action will save any original token type that rewriting may have
 * erased.  This will allow future processing to access this as an annotation
 * named 'oldtype'.
 * <p>
 * Built-in functions have a language keyword as the function name. This 
 * means that built-ins can support abbreviations.  It also means that some
 * built-in functions cannot be hidden by a user-defined function, if the
 * associated keyword is reserved. If the keyword is not reserved, then a
 * built-in function is hidden in the namespace by a user-defined function
 * of the same name.  This method's token type rewriting is dependent upon
 * this logic being implemented in the <code>SymbolResolver</code> class.
 * See {@link SymbolResolver#lookupFunction}.
 * <p>
 * Note that in the resulting AST, the parenthesis and commas used to define
 * the parameter list are discarded.  In other words, they do not appear in
 * the AST as nodes.  Instead, each parameter is created as a separate child
 * node of the function type token.  All parameters are maintained as child
 * nodes in the exact order of the function call itself, so this is
 * essentially the signature of the function.  It it also the proper AST
 * definition to enable simple evaluation of functions with any arbitrary
 * signature.
 */
	public final void sequence_funcs() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sequence_funcs_AST = null;
		Token  d = null;
		Aast d_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_CUR_VAL:
			{
				Aast tmp1004_AST = null;
				tmp1004_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1004_AST);
				match(KW_CUR_VAL);
				break;
			}
			case KW_NEXT_VAL:
			{
				Aast tmp1005_AST = null;
				tmp1005_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1005_AST);
				match(KW_NEXT_VAL);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			sequence_ref();
			astFactory.addASTChild(currentAST, returnAST);
			
			if (LA(2) != DATABASE)
			{
			int newtype = sym.lookupDatabase(LT(2).getText());
			
			// there should always be a match in valid Progress 4GL source
			// so we throw an exception if this is not the case
			if (newtype != -1)
			{
			LT(2).setType(newtype);
			}
			}
			
			{
			if ((LA(1)==COMMA) && (LA(2)==DATABASE||LA(2)==STRING) && (LA(3)==COMMA||LA(3)==RPARENS)) {
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case DATABASE:
				{
					d = LT(1);
					d_AST = (Aast)astFactory.create(d);
					astFactory.addASTChild(currentAST, d_AST);
					match(DATABASE);
					saveAndReplaceTypeAndText(d_AST, STRING, "\"" + d_AST.getText() + "\"");
					break;
				}
				case STRING:
				{
					Aast tmp1006_AST = null;
					tmp1006_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1006_AST);
					match(STRING);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((LA(1)==COMMA||LA(1)==RPARENS) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case COMMA:
			{
				comma();
				astFactory.addASTChild(currentAST, returnAST);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			sequence_funcs_AST = (Aast)currentAST.root;
			
			// save the original token type, then rewrite the type
			saveAndReplaceType(sequence_funcs_AST, FUNC_INT64);
			
			// write our function-specific annotations
			sym.annotateFunction(sequence_funcs_AST.getText(), sequence_funcs_AST, false);
			
			sequence_funcs_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = sequence_funcs_AST;
	}
	
/**
 * Aggregates (in a tree building sense) a simple list of all fields under a specific language
 * statement.  Calls {@link #lvalue} and roots everything at a node of type
 * <code>CONTENT_ARRAY</code>. An undocumented feature of Progress is that each lvalue can
 * optionally be followed by a format phrase (using the {@link #format_phrase} rule).
 *
 * @param   fields
 *          Set into which all database field references should be stored.
 */
	public final void lvalue_list(
		Set<Aast> fields
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast lvalue_list_AST = null;
		Aast l_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(CONTENT_ARRAY,""));
			{
			int _cnt841=0;
			_loop841:
			do {
				if ((_tokenSet_64.member(LA(1)))) {
					lvalue();
					l_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					{
					if ((_tokenSet_98.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						format_phrase(null, null, false, false);
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_97.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					
					int type = l_AST.getType();
					if (type > BEGIN_FIELDTYPES && type < END_FIELDTYPES)
					{
					fields.add(l_AST);
					}
					
				}
				else {
					if ( _cnt841>=1 ) { break _loop841; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt841++;
			} while (true);
			}
			lvalue_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_99);
		}
		returnAST = lvalue_list_AST;
	}
	
/**   
 * Matches a greatly simplified form of the <code>ON</code> statement which
 * is only seen in a {@link #trigger_phrase} Progress construct.  See
 * {@link #on_stmt} for details on the more complicated form.  This form
 * is not compatible with the language statement itself which is why
 * this is a separate rule.  This separation also allows the AST to be
 * built in a more natural manner.
 * <p>
 * This is the location in which we add and remove scopes to the symbol
 * dictionary for trigger blocks.
 * <p>
 * Bogus ANTLR ambiguity warnings have been suppressed.
 */
	public final void simple_on_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast simple_on_stmt_AST = null;
		
		try {      // for error handling
			
			boolean oldBufScope = setupTriggerScope();
			
			Aast tmp1007_AST = null;
			tmp1007_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1007_AST);
			match(KW_ON);
			fixupKeyboardModifiers();
			comma_event_list();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_ANYWHERE) && (_tokenSet_10.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp1008_AST = null;
				tmp1008_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1008_AST);
				match(KW_ANYWHERE);
			}
			else if ((_tokenSet_10.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_PERSIST) && (LA(2)==KW_RUN) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
				persistent_trigger_procedure();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_10.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				single_block(true, true);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			clearTriggerScope(oldBufScope);
			
			simple_on_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_193);
		}
		returnAST = simple_on_stmt_AST;
	}
	
/**   
 * Matches a comma delimited list of events.  Calls {@link #event}. 
 * <p>
 * Used by ON.
 * <p>
 * <b>This rule uses a trick to create an artificial node as a root while
 * still allowing ANTLR to do normal tree building (no suppression of the
 * AST build).</b>  This is only useful in cases where there is no valid
 * token which can be used as a tree root AND where a loop is being used
 * such that the contents of the loop cannot be referenced in a manually
 * built #([,],,,) ANTLR construct. ANTLR doesn't support (as of 2.7.4) the
 * ability to label a loop such that the entire contents can be referenced.
 * If one labels the individual elements inside the loop, only the last one
 * is available when the loop concludes.  However, by leaving the normal
 * tree creation unchanged but manually creating an artificial node and
 * manually setting this node as the root of the returned tree BEFORE the
 * children are added, this problem can be solved.
 */
	public final void comma_event_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast comma_event_list_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(EVENT_LIST,""));
			event();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop932:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					fixupKeyboardModifiers();
					event();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop932;
				}
				
			} while (true);
			}
			comma_event_list_AST = (Aast)currentAST.root;
			if (comma_event_list_AST.getNumberOfChildren() == 0) comma_event_list_AST = null;
			currentAST.root = comma_event_list_AST;
			currentAST.child = comma_event_list_AST!=null &&comma_event_list_AST.getFirstChild()!=null ?
				comma_event_list_AST.getFirstChild() : comma_event_list_AST;
			currentAST.advanceChildToEnd();
			comma_event_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_10);
		}
		returnAST = comma_event_list_AST;
	}
	
/**   
 * Matches the <code>PERSISTENT</code> keyword and the following subset of
 * the {@link #run_stmt}. This matches more constructs than a normal
 * persistent trigger could specify but this should not matter in valid
 * Progress code.
 * <p>
 * Used by {@link #on_stmt}.
 */
	public final void persistent_trigger_procedure() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast persistent_trigger_procedure_AST = null;
		
		try {      // for error handling
			Aast tmp1009_AST = null;
			tmp1009_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1009_AST);
			match(KW_PERSIST);
			run_stmt();
			astFactory.addASTChild(currentAST, returnAST);
			persistent_trigger_procedure_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = persistent_trigger_procedure_AST;
	}
	
/**
 * Implements the referencing phrase to modify a database event trigger,
 * matches on the <code>NEW or OLD</code> keywords and all following
 * optional or required constructs.
 * <p>
 * The 4GL documentation incorrectly specifies that for <code>WRITE</code>
 * triggers, there will be both a <code>NEW</code> and <code>OLD</code>
 * keyword, but it turns out that the <code>NEW</code> keyword is optional,
 * so the <code>OLD</code> keyword can appear by itself.
 * <p>
 * This is separated to make the AST build more natural.  Note that this
 * AST could be improved further.
 *
 * @param    ref
 *           The record or field being referenced. 
 */
	public final void write_referencing_phrase(
		Aast ref
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast write_referencing_phrase_AST = null;
		Token  bu = null;
		Aast bu_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_NEW:
			{
				Aast tmp1010_AST = null;
				tmp1010_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1010_AST);
				match(KW_NEW);
				break;
			}
			case KW_OLD:
			{
				Aast tmp1011_AST = null;
				tmp1011_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1011_AST);
				match(KW_OLD);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==KW_BUFFER) && (_tokenSet_15.member(LA(2))) && (_tokenSet_11.member(LA(3)))) {
				bu = LT(1);
				bu_AST = (Aast)astFactory.create(bu);
				match(KW_BUFFER);
				hide(bu);
			}
			else if ((_tokenSet_15.member(LA(1))) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			symbol();
			b_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			write_referencing_phrase_AST = (Aast)currentAST.root;
			
			write_referencing_phrase_AST.putAnnotation("define_buffer", Boolean.valueOf(true));
			defineBufferFromSymbol(b_AST, ref.getText(), null, null, false);
			
			write_referencing_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = write_referencing_phrase_AST;
	}
	
/**
 * Handles parsing of the NEW VALUE from the ASSIGN schema trigger procedure. The VALUE
 * token is optional and is dropped anyway.
 *
 * Called by {@link #trigger_procedure_stmt}.
 */
	public final void assign_trigger_new_var_def() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast assign_trigger_new_var_def_AST = null;
		Token  va = null;
		Aast va_AST = null;
		Aast sy_AST = null;
		
		try {      // for error handling
			
			String symname = null;
			
			Aast tmp1012_AST = null;
			tmp1012_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1012_AST);
			match(KW_NEW);
			{
			if ((LA(1)==KW_VALUE)) {
				va = LT(1);
				va_AST = (Aast)astFactory.create(va);
				match(KW_VALUE);
				hide(va);
			}
			else if ((_tokenSet_15.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			symname=regular_parm(null, null);
			sy_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			assign_trigger_new_var_def_AST = (Aast)currentAST.root;
			
			sym.setVariableOptions(sy_AST.getText(), assign_trigger_new_var_def_AST);
			sym.annotateVariableOptions(sy_AST.getText(), assign_trigger_new_var_def_AST, true);
			
			assign_trigger_new_var_def_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = assign_trigger_new_var_def_AST;
	}
	
/**
 * Process the OLD variable definition option for an assignment trigger procedure.
 * <p>
 * Matches only <code>OLD</code> branch  followed by an optional <code>VALUE</code> keyword 
 * (dropped) and then the variable definition which is handled by {@link #regular_parm}.
 * <p>
 * If the <code>likeRef</code> parameter is non-null AND this is a keyword <code>OLD</code>
 * where there is no explicit <code>AS</code> or <code>LIKE</code>, then this code will
 * implement an implicit <code>LIKE</code> clause.  This is an undocumented feature that
 * was found in customer code.
 * <p>
 * Called by {@link #trigger_procedure_stmt}, {@link #on_stmt}.
 *
 * @param    likeRef
 *           The variable or field definition to use for an implicit LIKE clause. This may be
 *           <code>null</code>.
 */
	public final void assign_trigger_old_var_def(
		Aast likeRef
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast assign_trigger_old_var_def_AST = null;
		Token  va = null;
		Aast va_AST = null;
		
		try {      // for error handling
			
			String symname = null;
			
			{
			if ((LA(1)==KW_OLD) && (_tokenSet_194.member(LA(2))) && (_tokenSet_93.member(LA(3)))) {
				Aast tmp1013_AST = null;
				tmp1013_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1013_AST);
				match(KW_OLD);
				{
				if ((LA(1)==KW_VALUE)) {
					va = LT(1);
					va_AST = (Aast)astFactory.create(va);
					match(KW_VALUE);
					hide(va);
				}
				else if ((_tokenSet_15.member(LA(1)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				symname=regular_parm(null, likeRef);
				astFactory.addASTChild(currentAST, returnAST);
				assign_trigger_old_var_def_AST = (Aast)currentAST.root;
				
				// ##.putAnnotation("define_buffer", Boolean.valueOf(false));
				
				// pass the AST with all options to the symbol resolver to set
				// those variable options accordingly
				sym.setVariableOptions(symname, assign_trigger_old_var_def_AST);
				
				// write any non-standard options into annotations
				sym.annotateVariableOptions(symname, assign_trigger_old_var_def_AST, true);
				
			}
			else if ((_tokenSet_11.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			assign_trigger_old_var_def_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = assign_trigger_old_var_def_AST;
	}
	
/**   
 * Matches any valid Progress symbol or string returns an artificial token
 * <code>DB_EVENT</code> with a child that is the matched token. Matches
 * <code>CREATE, DELETE, FIND, WRITE and ASSIGN</code> keywords.
 * <p>
 * Used by {@link #on_stmt}.
 */
	public final void db_event() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast db_event_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  f = null;
		Aast f_AST = null;
		Token  w = null;
		Aast w_AST = null;
		Token  a = null;
		Aast a_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_CREATE:
			{
				c = LT(1);
				c_AST = (Aast)astFactory.create(c);
				match(KW_CREATE);
				break;
			}
			case KW_DELETE:
			{
				d = LT(1);
				d_AST = (Aast)astFactory.create(d);
				match(KW_DELETE);
				break;
			}
			case KW_FIND:
			{
				f = LT(1);
				f_AST = (Aast)astFactory.create(f);
				match(KW_FIND);
				break;
			}
			case KW_WRITE:
			{
				w = LT(1);
				w_AST = (Aast)astFactory.create(w);
				match(KW_WRITE);
				break;
			}
			case KW_ASSIGN:
			{
				a = LT(1);
				a_AST = (Aast)astFactory.create(a);
				match(KW_ASSIGN);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			db_event_AST = (Aast)currentAST.root;
			db_event_AST = (Aast)astFactory.make( (new ASTArray(6)).add((Aast)astFactory.create(DB_EVENT,"database event")).add(c_AST).add(d_AST).add(f_AST).add(w_AST).add(a_AST));
			currentAST.root = db_event_AST;
			currentAST.child = db_event_AST!=null &&db_event_AST.getFirstChild()!=null ?
				db_event_AST.getFirstChild() : db_event_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_195);
		}
		returnAST = db_event_AST;
	}
	
/**   
 * Matches any valid Progress symbol or string or other key label and returns
 * an artificial token <code>EVENT</code> with a child that is the matched
 * token. Calls {@link #symbol} and {@link #other_single_char_tokens}. 
 * <p>
 * Used by {@link #event_list} and {@link #comma_event_list}.
 */
	public final void event() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast event_AST = null;
		Token  s = null;
		Aast s_AST = null;
		Aast o_AST = null;
		Aast e_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case STRING:
			{
				s = LT(1);
				s_AST = (Aast)astFactory.create(s);
				astFactory.addASTChild(currentAST, s_AST);
				match(STRING);
				break;
			}
			case MINUS:
			case PLUS:
			case UNKNOWN_TOKEN:
			case AT:
			case EQUALS:
			case LBRACKET:
			case RBRACKET:
			case LPARENS:
			case RPARENS:
			case MULTIPLY:
			case CARET:
			case GT:
			case LT:
			case DIVIDE:
			case UNKNOWN_VAL:
			case NUM_LITERAL:
			{
				other_single_char_tokens();
				o_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
				if ((_tokenSet_27.member(LA(1)))) {
					reserved_or_symbol();
					e_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			event_AST = (Aast)currentAST.root;
			
			if (s_AST != null) convertStringTo(s_AST, EVENT);
			if (o_AST != null) o_AST.setType(EVENT);
			if (e_AST != null) e_AST.setType(EVENT);
			
			// verify if the event is registered in FWD, accross all keyboards
			if (!com.goldencode.p2j.ui.Keyboard.registeredEventName(event_AST.getText()))
			{
			LOG.log(Level.SEVERE, "Event [" + event_AST.getText() + "] is not registered in FWD!");
			}
			
			event_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_109);
		}
		returnAST = event_AST;
	}
	
/**   
 * Matches the list of all valid key function names and generates a node
 * of type <code>KEY_FUNCTION</code>. Used by {@link #on_stmt}.
 * <p>
 * <pre>
 * ABORT
 * APPEND-LINE (undocumented)
 * BACKSPACE
 * BACK-TAB
 * BELL
 * CLEAR
 * CURSOR-DOWN
 * CURSOR-LEFT
 * CURSOR-RIGHT
 * CURSOR-UP
 * DELETE-CHARACTER
 * DELETE-LINE (undocumented)
 * EDITOR-TAB (undocumented)
 * END
 * END-ERROR
 * ENDKEY
 * ENTER-MENUBAR
 * ERROR
 * GET (undocumented)
 * GO
 * HELP
 * HOME
 * INSERT-MODE
 * LEFT-END
 * NEW-LINE (undocumented)
 * NEXT-FRAME
 * PREV-FRAME
 * RECALL
 * RETURN
 * RIGHT-END
 * SCROLL-MODE
 * STOP
 * TAB
 * </pre>
 * <p>
 * <b>Page 785 of the Progress Language Reference lists these as the only
 * valid key functions that can be assigned actions.</b> This is the same
 * as the list on page 6-26 in the Progress Programming Handbook, which
 * makes the same statement about this being the list of possible actions.
 * However, page 6-19 in the Progress Programming Handbook, has a much
 * longer list of key functions and tests show that these other functions
 * ARE accepted in such an <code>ON</code> statement. These confusingly
 * documented additional keywords are supported here. Working 4GL code does
 * rely upon these events.  The keywords that are added (the other keywords
 * show up in both lists) are:
 * <p>
 * <pre>
 * BLOCK
 * BOTTOM-COLUMN
 * BREAK-LINE
 * CANCEL-PICK
 * CHOICES
 * CLOSE
 * COMPILE
 * COPY
 * CUT
 * DEFAULT-POP-UP
 * DELETE-COLUMN
 * DELETE-END-LINE
 * DELETE-FIELD
 * DOWN (found in customer source, not in documentation)
 * EDITOR-BACKTAB
 * EXIT
 * FIND
 * FIND-NEXT
 * FIND-PREVIOUS
 * GOTO
 * INSERT-COLUMN
 * INSERT-FIELD
 * INSERT-FIELD-DATA
 * INSERT-FIELD-LABEL
 * LEFT (found in customer source, not in documentation)
 * MAIN-MENU
 * MOVE
 * NEW
 * NEXT-ERROR
 * NEXT-WORD
 * OPEN-LINE-ABOVE
 * OPTIONS
 * PAGE-DOWN
 * PAGE-LEFT
 * PAGE-RIGHT
 * PAGE-UP
 * PASTE
 * PICK
 * PICK-AREA
 * PICK-BOTH
 * PREV-WORD
 * PUT
 * REPLACE
 * REPORTS
 * RESUME-DISPLAY
 * RIGHT (found in customer source, not in documentation)
 * SAVE-AS
 * SCROLL-LEFT
 * SCROLL-RIGHT
 * SETTINGS
 * STOP-DISPLAY
 * TOP-COLUMN
 * UNIX-END
 * UP (found in customer source, not in documentation)
 * </pre>
 */
	public final void key_function() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast key_function_AST = null;
		Token  s = null;
		Aast s_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case STRING:
			{
				s = LT(1);
				s_AST = (Aast)astFactory.create(s);
				astFactory.addASTChild(currentAST, s_AST);
				match(STRING);
				break;
			}
			case KW_ABORT:
			{
				Aast tmp1014_AST = null;
				tmp1014_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1014_AST);
				match(KW_ABORT);
				break;
			}
			case KW_APPEND_L:
			{
				Aast tmp1015_AST = null;
				tmp1015_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1015_AST);
				match(KW_APPEND_L);
				break;
			}
			case KW_BACKSP:
			{
				Aast tmp1016_AST = null;
				tmp1016_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1016_AST);
				match(KW_BACKSP);
				break;
			}
			case KW_BACK_TAB:
			{
				Aast tmp1017_AST = null;
				tmp1017_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1017_AST);
				match(KW_BACK_TAB);
				break;
			}
			case KW_BELL:
			{
				Aast tmp1018_AST = null;
				tmp1018_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1018_AST);
				match(KW_BELL);
				break;
			}
			case KW_CLEAR:
			{
				Aast tmp1019_AST = null;
				tmp1019_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1019_AST);
				match(KW_CLEAR);
				break;
			}
			case KW_CUR_DOWN:
			{
				Aast tmp1020_AST = null;
				tmp1020_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1020_AST);
				match(KW_CUR_DOWN);
				break;
			}
			case KW_CUR_LEFT:
			{
				Aast tmp1021_AST = null;
				tmp1021_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1021_AST);
				match(KW_CUR_LEFT);
				break;
			}
			case KW_CUR_RGHT:
			{
				Aast tmp1022_AST = null;
				tmp1022_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1022_AST);
				match(KW_CUR_RGHT);
				break;
			}
			case KW_CUR_UP:
			{
				Aast tmp1023_AST = null;
				tmp1023_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1023_AST);
				match(KW_CUR_UP);
				break;
			}
			case KW_DEL_CHAR:
			{
				Aast tmp1024_AST = null;
				tmp1024_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1024_AST);
				match(KW_DEL_CHAR);
				break;
			}
			case KW_DEL_LINE:
			{
				Aast tmp1025_AST = null;
				tmp1025_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1025_AST);
				match(KW_DEL_LINE);
				break;
			}
			case KW_EDIT_TAB:
			{
				Aast tmp1026_AST = null;
				tmp1026_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1026_AST);
				match(KW_EDIT_TAB);
				break;
			}
			case KW_END:
			{
				Aast tmp1027_AST = null;
				tmp1027_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1027_AST);
				match(KW_END);
				break;
			}
			case KW_END_ERR:
			{
				Aast tmp1028_AST = null;
				tmp1028_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1028_AST);
				match(KW_END_ERR);
				break;
			}
			case KW_ENDKEY:
			{
				Aast tmp1029_AST = null;
				tmp1029_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1029_AST);
				match(KW_ENDKEY);
				break;
			}
			case KW_ENTER_MB:
			{
				Aast tmp1030_AST = null;
				tmp1030_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1030_AST);
				match(KW_ENTER_MB);
				break;
			}
			case KW_ERROR:
			{
				Aast tmp1031_AST = null;
				tmp1031_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1031_AST);
				match(KW_ERROR);
				break;
			}
			case KW_GET:
			{
				Aast tmp1032_AST = null;
				tmp1032_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1032_AST);
				match(KW_GET);
				break;
			}
			case KW_GO:
			{
				Aast tmp1033_AST = null;
				tmp1033_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1033_AST);
				match(KW_GO);
				break;
			}
			case KW_HELP:
			{
				Aast tmp1034_AST = null;
				tmp1034_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1034_AST);
				match(KW_HELP);
				break;
			}
			case KW_HOME:
			{
				Aast tmp1035_AST = null;
				tmp1035_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1035_AST);
				match(KW_HOME);
				break;
			}
			case KW_INS_MODE:
			{
				Aast tmp1036_AST = null;
				tmp1036_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1036_AST);
				match(KW_INS_MODE);
				break;
			}
			case KW_LEFT_END:
			{
				Aast tmp1037_AST = null;
				tmp1037_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1037_AST);
				match(KW_LEFT_END);
				break;
			}
			case KW_NEW_LINE:
			{
				Aast tmp1038_AST = null;
				tmp1038_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1038_AST);
				match(KW_NEW_LINE);
				break;
			}
			case KW_NEXT_FR:
			{
				Aast tmp1039_AST = null;
				tmp1039_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1039_AST);
				match(KW_NEXT_FR);
				break;
			}
			case KW_PREV_FR:
			{
				Aast tmp1040_AST = null;
				tmp1040_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1040_AST);
				match(KW_PREV_FR);
				break;
			}
			case KW_RECALL:
			{
				Aast tmp1041_AST = null;
				tmp1041_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1041_AST);
				match(KW_RECALL);
				break;
			}
			case KW_RETURN:
			{
				Aast tmp1042_AST = null;
				tmp1042_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1042_AST);
				match(KW_RETURN);
				break;
			}
			case KW_RT_END:
			{
				Aast tmp1043_AST = null;
				tmp1043_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1043_AST);
				match(KW_RT_END);
				break;
			}
			case KW_SCR_MODE:
			{
				Aast tmp1044_AST = null;
				tmp1044_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1044_AST);
				match(KW_SCR_MODE);
				break;
			}
			case KW_STOP:
			{
				Aast tmp1045_AST = null;
				tmp1045_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1045_AST);
				match(KW_STOP);
				break;
			}
			case KW_TAB:
			{
				Aast tmp1046_AST = null;
				tmp1046_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1046_AST);
				match(KW_TAB);
				break;
			}
			case KW_BLOCK:
			{
				Aast tmp1047_AST = null;
				tmp1047_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1047_AST);
				match(KW_BLOCK);
				break;
			}
			case KW_BOTTOM_C:
			{
				Aast tmp1048_AST = null;
				tmp1048_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1048_AST);
				match(KW_BOTTOM_C);
				break;
			}
			case KW_BREAK_L:
			{
				Aast tmp1049_AST = null;
				tmp1049_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1049_AST);
				match(KW_BREAK_L);
				break;
			}
			case KW_CANCEL_P:
			{
				Aast tmp1050_AST = null;
				tmp1050_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1050_AST);
				match(KW_CANCEL_P);
				break;
			}
			case KW_CHOICES:
			{
				Aast tmp1051_AST = null;
				tmp1051_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1051_AST);
				match(KW_CHOICES);
				break;
			}
			case KW_CLOSE:
			{
				Aast tmp1052_AST = null;
				tmp1052_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1052_AST);
				match(KW_CLOSE);
				break;
			}
			case KW_COMPILE:
			{
				Aast tmp1053_AST = null;
				tmp1053_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1053_AST);
				match(KW_COMPILE);
				break;
			}
			case KW_COPY:
			{
				Aast tmp1054_AST = null;
				tmp1054_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1054_AST);
				match(KW_COPY);
				break;
			}
			case KW_CUT:
			{
				Aast tmp1055_AST = null;
				tmp1055_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1055_AST);
				match(KW_CUT);
				break;
			}
			case KW_DEF_POP:
			{
				Aast tmp1056_AST = null;
				tmp1056_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1056_AST);
				match(KW_DEF_POP);
				break;
			}
			case KW_DEL_COL:
			{
				Aast tmp1057_AST = null;
				tmp1057_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1057_AST);
				match(KW_DEL_COL);
				break;
			}
			case KW_DEL_E_L:
			{
				Aast tmp1058_AST = null;
				tmp1058_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1058_AST);
				match(KW_DEL_E_L);
				break;
			}
			case KW_DEL_FLD:
			{
				Aast tmp1059_AST = null;
				tmp1059_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1059_AST);
				match(KW_DEL_FLD);
				break;
			}
			case KW_DEL_WORD:
			{
				Aast tmp1060_AST = null;
				tmp1060_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1060_AST);
				match(KW_DEL_WORD);
				break;
			}
			case KW_EDIT_B_T:
			{
				Aast tmp1061_AST = null;
				tmp1061_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1061_AST);
				match(KW_EDIT_B_T);
				break;
			}
			case KW_EXIT:
			{
				Aast tmp1062_AST = null;
				tmp1062_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1062_AST);
				match(KW_EXIT);
				break;
			}
			case KW_FIND:
			{
				Aast tmp1063_AST = null;
				tmp1063_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1063_AST);
				match(KW_FIND);
				break;
			}
			case KW_FIND_NXT:
			{
				Aast tmp1064_AST = null;
				tmp1064_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1064_AST);
				match(KW_FIND_NXT);
				break;
			}
			case KW_FIND_PRV:
			{
				Aast tmp1065_AST = null;
				tmp1065_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1065_AST);
				match(KW_FIND_PRV);
				break;
			}
			case KW_GOTO:
			{
				Aast tmp1066_AST = null;
				tmp1066_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1066_AST);
				match(KW_GOTO);
				break;
			}
			case KW_INS_COL:
			{
				Aast tmp1067_AST = null;
				tmp1067_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1067_AST);
				match(KW_INS_COL);
				break;
			}
			case KW_INS_FLD:
			{
				Aast tmp1068_AST = null;
				tmp1068_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1068_AST);
				match(KW_INS_FLD);
				break;
			}
			case KW_INS_FLDD:
			{
				Aast tmp1069_AST = null;
				tmp1069_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1069_AST);
				match(KW_INS_FLDD);
				break;
			}
			case KW_INS_FLDL:
			{
				Aast tmp1070_AST = null;
				tmp1070_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1070_AST);
				match(KW_INS_FLDL);
				break;
			}
			case KW_MAINMENU:
			{
				Aast tmp1071_AST = null;
				tmp1071_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1071_AST);
				match(KW_MAINMENU);
				break;
			}
			case KW_MOVE:
			{
				Aast tmp1072_AST = null;
				tmp1072_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1072_AST);
				match(KW_MOVE);
				break;
			}
			case KW_NEW:
			{
				Aast tmp1073_AST = null;
				tmp1073_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1073_AST);
				match(KW_NEW);
				break;
			}
			case KW_NEXT_ERR:
			{
				Aast tmp1074_AST = null;
				tmp1074_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1074_AST);
				match(KW_NEXT_ERR);
				break;
			}
			case KW_NEXTWORD:
			{
				Aast tmp1075_AST = null;
				tmp1075_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1075_AST);
				match(KW_NEXTWORD);
				break;
			}
			case KW_OPEN_L_A:
			{
				Aast tmp1076_AST = null;
				tmp1076_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1076_AST);
				match(KW_OPEN_L_A);
				break;
			}
			case KW_OPTIONS:
			{
				Aast tmp1077_AST = null;
				tmp1077_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1077_AST);
				match(KW_OPTIONS);
				break;
			}
			case KW_PAGE_DWN:
			{
				Aast tmp1078_AST = null;
				tmp1078_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1078_AST);
				match(KW_PAGE_DWN);
				break;
			}
			case KW_PAGE_LFT:
			{
				Aast tmp1079_AST = null;
				tmp1079_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1079_AST);
				match(KW_PAGE_LFT);
				break;
			}
			case KW_PAGE_RT:
			{
				Aast tmp1080_AST = null;
				tmp1080_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1080_AST);
				match(KW_PAGE_RT);
				break;
			}
			case KW_PAGE_UP:
			{
				Aast tmp1081_AST = null;
				tmp1081_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1081_AST);
				match(KW_PAGE_UP);
				break;
			}
			case KW_PASTE:
			{
				Aast tmp1082_AST = null;
				tmp1082_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1082_AST);
				match(KW_PASTE);
				break;
			}
			case KW_PICK:
			{
				Aast tmp1083_AST = null;
				tmp1083_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1083_AST);
				match(KW_PICK);
				break;
			}
			case KW_PICK_ARE:
			{
				Aast tmp1084_AST = null;
				tmp1084_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1084_AST);
				match(KW_PICK_ARE);
				break;
			}
			case KW_PICK_BTH:
			{
				Aast tmp1085_AST = null;
				tmp1085_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1085_AST);
				match(KW_PICK_BTH);
				break;
			}
			case KW_PREVWORD:
			{
				Aast tmp1086_AST = null;
				tmp1086_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1086_AST);
				match(KW_PREVWORD);
				break;
			}
			case KW_PUT:
			{
				Aast tmp1087_AST = null;
				tmp1087_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1087_AST);
				match(KW_PUT);
				break;
			}
			case KW_REPLACE:
			{
				Aast tmp1088_AST = null;
				tmp1088_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1088_AST);
				match(KW_REPLACE);
				break;
			}
			case KW_REPORTS:
			{
				Aast tmp1089_AST = null;
				tmp1089_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1089_AST);
				match(KW_REPORTS);
				break;
			}
			case KW_RESUME_D:
			{
				Aast tmp1090_AST = null;
				tmp1090_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1090_AST);
				match(KW_RESUME_D);
				break;
			}
			case KW_SAVE_AS:
			{
				Aast tmp1091_AST = null;
				tmp1091_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1091_AST);
				match(KW_SAVE_AS);
				break;
			}
			case KW_SCR_LEFT:
			{
				Aast tmp1092_AST = null;
				tmp1092_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1092_AST);
				match(KW_SCR_LEFT);
				break;
			}
			case KW_SCR_RT:
			{
				Aast tmp1093_AST = null;
				tmp1093_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1093_AST);
				match(KW_SCR_RT);
				break;
			}
			case KW_SETTINGS:
			{
				Aast tmp1094_AST = null;
				tmp1094_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1094_AST);
				match(KW_SETTINGS);
				break;
			}
			case KW_STOP_D:
			{
				Aast tmp1095_AST = null;
				tmp1095_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1095_AST);
				match(KW_STOP_D);
				break;
			}
			case KW_TOP_COL:
			{
				Aast tmp1096_AST = null;
				tmp1096_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1096_AST);
				match(KW_TOP_COL);
				break;
			}
			case KW_UNIX_END:
			{
				Aast tmp1097_AST = null;
				tmp1097_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1097_AST);
				match(KW_UNIX_END);
				break;
			}
			case KW_DOWN:
			{
				Aast tmp1098_AST = null;
				tmp1098_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1098_AST);
				match(KW_DOWN);
				break;
			}
			case KW_LEFT:
			{
				Aast tmp1099_AST = null;
				tmp1099_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1099_AST);
				match(KW_LEFT);
				break;
			}
			case KW_RIGHT:
			{
				Aast tmp1100_AST = null;
				tmp1100_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1100_AST);
				match(KW_RIGHT);
				break;
			}
			case KW_UP:
			{
				Aast tmp1101_AST = null;
				tmp1101_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1101_AST);
				match(KW_UP);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			key_function_AST = (Aast)currentAST.root;
			
			// convert the string to a keyword (TODO: this does not check for the matching subset
			// of key function types)
			if (s_AST != null)
			{
			convertStringTo(s_AST, -1);
			}
			
			saveAndReplaceType(key_function_AST, KEY_FUNCTION);
			
			key_function_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = key_function_AST;
	}
	
/**
 * Matches a comma delimited list of widgets.  Calls {@link #widget_phrase}. 
 * <p>
 * Used by ON.
 * <p>
 * <b>This rule uses a trick to create an artificial node as a root while
 * still allowing ANTLR to do normal tree building (no suppression of the
 * AST build).</b>  This is only useful in cases where there is no valid
 * token which can be used as a tree root AND where a loop is being used
 * such that the contents of the loop cannot be referenced in a manually
 * built #([,],,,) ANTLR construct. ANTLR doesn't support (as of 2.7.4) the
 * ability to label a loop such that the entire contents can be referenced.
 * If one labels the individual elements inside the loop, only the last one
 * is available when the loop concludes.  However, by leaving the normal
 * tree creation unchanged but manually creating an artificial node and
 * manually setting this node as the root of the returned tree BEFORE the
 * children are added, this problem can be solved.
 */
	public final void comma_widget_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast comma_widget_list_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(WIDGET_LIST,""));
			widget_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop925:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					widget_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop925;
				}
				
			} while (true);
			}
			comma_widget_list_AST = (Aast)currentAST.root;
			if (comma_widget_list_AST.getNumberOfChildren() == 0) comma_widget_list_AST = null;
			currentAST.root = comma_widget_list_AST;
			currentAST.child = comma_widget_list_AST!=null &&comma_widget_list_AST.getFirstChild()!=null ?
				comma_widget_list_AST.getFirstChild() : comma_widget_list_AST;
			currentAST.advanceChildToEnd();
			comma_widget_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = comma_widget_list_AST;
	}
	
/**   
 * Matches the <code>OR</code> keyword, the required comma separated event
 * list, <code>OF</code> keyword and then a widget list.  Calls
 * {@link #comma_event_list} and {@link #comma_widget_list} rules.
 * <p>
 * Used by {@link #on_stmt}.
 * <p>
 * This is a separate rule to centralize logic and build the AST properly.
 */
	public final void comma_events_of_widgets_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast comma_events_of_widgets_clause_AST = null;
		Token  or = null;
		Aast or_AST = null;
		
		try {      // for error handling
			or = LT(1);
			or_AST = (Aast)astFactory.create(or);
			match(KW_OR);
			hide(or); fixupKeyboardModifiers();
			comma_event_list();
			astFactory.addASTChild(currentAST, returnAST);
			Aast tmp1102_AST = null;
			tmp1102_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1102_AST);
			match(KW_OF);
			comma_widget_list();
			astFactory.addASTChild(currentAST, returnAST);
			comma_events_of_widgets_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = comma_events_of_widgets_clause_AST;
	}
	
/**
 * Match an end statement (and following DOT) that does not have an associated opening block.
 * This will manufacture an empty block to be returned, so that the downstream code can treat
 * this normally. 
 */
	public final void end_stmt_with_no_beginning() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast end_stmt_with_no_beginning_AST = null;
		
		try {      // for error handling
			end_stmt(true);
			end_stmt_with_no_beginning_AST = (Aast)currentAST.root;
			
			// build the tree
			end_stmt_with_no_beginning_AST = (Aast)astFactory.make( (new ASTArray(3)).add((Aast)astFactory.create(TRIGGER_BLOCK,"trigger block")).add((Aast)astFactory.create(KW_DO,"do")).add((Aast)astFactory.create(BLOCK,"block")));
			
			currentAST.root = end_stmt_with_no_beginning_AST;
			currentAST.child = end_stmt_with_no_beginning_AST!=null &&end_stmt_with_no_beginning_AST.getFirstChild()!=null ?
				end_stmt_with_no_beginning_AST.getFirstChild() : end_stmt_with_no_beginning_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_11);
		}
		returnAST = end_stmt_with_no_beginning_AST;
	}
	
/**   
 * Matches the <code>TO widget_phrase</code> construct of the
 * {@link #apply_stmt}.  Separated to improve the tree build.
 */
	public final void to_event_target() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast to_event_target_AST = null;
		
		try {      // for error handling
			Aast tmp1103_AST = null;
			tmp1103_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1103_AST);
			match(KW_TO);
			widget_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			to_event_target_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = to_event_target_AST;
	}
	
/**   
 * Matches the <code>FOCUS</code> keyword and the required following
 * widget. Calls {@link #widget_phrase}.
 * <p>
 * Used by {@link #wait_for_stmt}.
 * <p>
 * This is a separate rule to centralize logic and build the AST properly.
 */
	public final void focus_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast focus_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1104_AST = null;
			tmp1104_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1104_AST);
			match(KW_FOCUS);
			widget_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			focus_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_140);
		}
		returnAST = focus_clause_AST;
	}
	
/**   
 * Matches the optional <code>OR</code> keyword prefix and the required
 * event list, <code>OF</code> keyword and then a widget list.  Calls
 * {@link #event_list} and {@link #widget_list} rules.
 * <p>
 * Used by {@link #wait_for_stmt}.
 * <p>
 * This is a separate rule to centralize logic and build the AST properly.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 */
	public final void events_of_widgets_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast events_of_widgets_clause_AST = null;
		Token  or = null;
		Aast or_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==KW_OR) && (_tokenSet_108.member(LA(2))) && (_tokenSet_142.member(LA(3)))) {
				or = LT(1);
				or_AST = (Aast)astFactory.create(or);
				match(KW_OR);
				hide(or);
			}
			else if ((_tokenSet_108.member(LA(1))) && (_tokenSet_142.member(LA(2))) && (_tokenSet_143.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			event_list();
			astFactory.addASTChild(currentAST, returnAST);
			Aast tmp1105_AST = null;
			tmp1105_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1105_AST);
			match(KW_OF);
			widget_list();
			astFactory.addASTChild(currentAST, returnAST);
			events_of_widgets_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_140);
		}
		returnAST = events_of_widgets_clause_AST;
	}
	
/**   
 * Matches the <code>SET handle</code> clause and a following {@link #lvalue}.
 * <p>
 * Used by {@link #wait_for_dotnet_stmt}. The subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 */
	public final void set_lvalue() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast set_lvalue_AST = null;
		
		try {      // for error handling
			Aast tmp1106_AST = null;
			tmp1106_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1106_AST);
			match(KW_SET);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			set_lvalue_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = set_lvalue_AST;
	}
	
/**   
 * Matches a space or comma delimited list of events.  Calls {@link #event}. 
 * <p>
 * Used by {@link #wait_for_stmt}.
 * <p>
 * <b>This rule uses a trick to create an artificial node as a root while
 * still allowing ANTLR to do normal tree building (no suppression of the
 * AST build).</b>  This is only useful in cases where there is no valid
 * token which can be used as a tree root AND where a loop is being used
 * such that the contents of the loop cannot be referenced in a manually
 * built #([,],,,) ANTLR construct. ANTLR doesn't support (as of 2.7.4) the
 * ability to label a loop such that the entire contents can be referenced.
 * If one labels the individual elements inside the loop, only the last one
 * is available when the loop concludes.  However, by leaving the normal
 * tree creation unchanged but manually creating an artificial node and
 * manually setting this node as the root of the returned tree BEFORE the
 * children are added, this problem can be solved.
 * <p>
 * This construct is dangerous because the loop must be manually closed.
 * The core issue is that an event can match a reserved keyword and thus 
 * even the <code>OF</code> keyword will be matched as an event rather than
 * the keyword that denotes the end of the event list.  This is only a
 * problem because of the optional commas that delimit events.  If the comma
 * was mandatory, then the lack of a following comma would end the list
 * as is the case in {@link #comma_event_list}.  A semantic predicate was
 * added to close the loop manually when the <code>OF</code> keyword is
 * encountered.
 */
	public final void event_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast event_list_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(EVENT_LIST,""));
			event();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop929:
			do {
				if (((_tokenSet_142.member(LA(1))) && (_tokenSet_142.member(LA(2))) && (_tokenSet_143.member(LA(3))))&&( LA(1) != KW_OF )) {
					{
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_108.member(LA(1)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					event();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop929;
				}
				
			} while (true);
			}
			event_list_AST = (Aast)currentAST.root;
			if (event_list_AST.getNumberOfChildren() == 0) event_list_AST = null;
			currentAST.root = event_list_AST;
			currentAST.child = event_list_AST!=null &&event_list_AST.getFirstChild()!=null ?
				event_list_AST.getFirstChild() : event_list_AST;
			currentAST.advanceChildToEnd();
			event_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_195);
		}
		returnAST = event_list_AST;
	}
	
/**   
 * Matches a space or comma delimited list of widgets.  Calls
 * {@link #widget_phrase}. 
 * <p>
 * Used by {@link #wait_for_stmt} and this form has <code>WAIT-FOR</code>
 * specific logic so it may not be suitable for other use.
 * <p>
 * Bogus ANTLR ambiguity warnings have been suppressed.
 * <p>
 * <b>This rule uses a trick to create an artificial node as a root while
 * still allowing ANTLR to do normal tree building (no suppression of the
 * AST build).</b>  This is only useful in cases where there is no valid
 * token which can be used as a tree root AND where a loop is being used
 * such that the contents of the loop cannot be referenced in a manually
 * built #([,],,,) ANTLR construct. ANTLR doesn't support (as of 2.7.4) the
 * ability to label a loop such that the entire contents can be referenced.
 * If one labels the individual elements inside the loop, only the last one
 * is available when the loop concludes.  However, by leaving the normal
 * tree creation unchanged but manually creating an artificial node and
 * manually setting this node as the root of the returned tree BEFORE the
 * children are added, this problem can be solved.
 * <p>
 * This construct is dangerous because the loop must be manually closed.
 * The core issue is that a widget phrase can match a the <code>FOCUS</code>
 * system handle BUT <code>WAIT-FOR</code> also uses the <code>KW_FOCUS</code>
 * for its own purposes.  This means that the second and following widget 
 * phrases must not match a <code>FOCUS</code> system handle but instead must
 * manually close the loop and allow the calling code to match with a
 * {@link #focus_clause}.  This is only a problem because of the optional
 * commas that delimit widgets.  If the comma was mandatory, then the lack of
 * a following comma would end the list as is the case in 
 * {@link #comma_widget_list}.  A semantic predicate was added to close the
 * loop manually when a <code>KW_FOCUS</code> is encountered. 
 */
	public final void widget_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast widget_list_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(WIDGET_LIST,""));
			widget_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop921:
			do {
				if (((_tokenSet_196.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_FOCUS )) {
					{
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_124.member(LA(1)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					widget_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop921;
				}
				
			} while (true);
			}
			widget_list_AST = (Aast)currentAST.root;
			if (widget_list_AST.getNumberOfChildren() == 0) widget_list_AST = null;
			currentAST.root = widget_list_AST;
			currentAST.child = widget_list_AST!=null &&widget_list_AST.getFirstChild()!=null ?
				widget_list_AST.getFirstChild() : widget_list_AST;
			currentAST.advanceChildToEnd();
			widget_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_140);
		}
		returnAST = widget_list_AST;
	}
	
/**
 * Matches a single widget and wrapps in a root node of type WIDGET_LIST.  Calls
 * {@link #widget_phrase}.
 */
	public final void single_widget_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast single_widget_list_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(WIDGET_LIST,""));
			widget_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			single_widget_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_140);
		}
		returnAST = single_widget_list_AST;
	}
	
/**   
 * Matches any valid Progress single char key label that would not be 
 * recognized as a symbol or string.  Note that 
 * <code>DOT, COLON and COMMA</code> are left out to allow parsing to
 * properly occur.  It is probable that to use these as key labels in
 * Progress, one would have to put the character in a string.
 * <p>
 * Matches:
 * <p>
 * <pre>
 * EQUALS
 * GT
 * LT
 * LPARENS 
 * RPARENS 
 * LBRACKET
 * RBRACKET 
 * PLUS
 * MINUS
 * MULTIPLY
 * DIVIDE
 * AT
 * CARET 
 * UNKNOWN_VAL
 * NUM_LITERAL
 * UNKNOWN_TOKEN
 * </pre>
 * <p>
 * Called by {@link #event}.  <b>USE THIS SPARINGLY, IT IS NASTY!</b>
 */
	public final void other_single_char_tokens() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast other_single_char_tokens_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case EQUALS:
			{
				Aast tmp1107_AST = null;
				tmp1107_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1107_AST);
				match(EQUALS);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case GT:
			{
				Aast tmp1108_AST = null;
				tmp1108_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1108_AST);
				match(GT);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case LT:
			{
				Aast tmp1109_AST = null;
				tmp1109_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1109_AST);
				match(LT);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case LPARENS:
			{
				Aast tmp1110_AST = null;
				tmp1110_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1110_AST);
				match(LPARENS);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case RPARENS:
			{
				Aast tmp1111_AST = null;
				tmp1111_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1111_AST);
				match(RPARENS);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case LBRACKET:
			{
				Aast tmp1112_AST = null;
				tmp1112_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1112_AST);
				match(LBRACKET);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case RBRACKET:
			{
				Aast tmp1113_AST = null;
				tmp1113_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1113_AST);
				match(RBRACKET);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case PLUS:
			{
				Aast tmp1114_AST = null;
				tmp1114_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1114_AST);
				match(PLUS);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case MINUS:
			{
				Aast tmp1115_AST = null;
				tmp1115_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1115_AST);
				match(MINUS);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case MULTIPLY:
			{
				Aast tmp1116_AST = null;
				tmp1116_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1116_AST);
				match(MULTIPLY);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case DIVIDE:
			{
				Aast tmp1117_AST = null;
				tmp1117_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1117_AST);
				match(DIVIDE);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case AT:
			{
				Aast tmp1118_AST = null;
				tmp1118_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1118_AST);
				match(AT);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case CARET:
			{
				Aast tmp1119_AST = null;
				tmp1119_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1119_AST);
				match(CARET);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case UNKNOWN_VAL:
			{
				Aast tmp1120_AST = null;
				tmp1120_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1120_AST);
				match(UNKNOWN_VAL);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case NUM_LITERAL:
			{
				Aast tmp1121_AST = null;
				tmp1121_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1121_AST);
				match(NUM_LITERAL);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			case UNKNOWN_TOKEN:
			{
				Aast tmp1122_AST = null;
				tmp1122_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1122_AST);
				match(UNKNOWN_TOKEN);
				other_single_char_tokens_AST = (Aast)currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_109);
		}
		returnAST = other_single_char_tokens_AST;
	}
	
/**
 * Aggregates (in a tree building sense) a simple list of all fields under a specific language
 * statement.  Calls {@link #widget} and roots everything at a node of type
 * <code>CONTENT_ARRAY</code>. The widget array can be empty (undocumented feature).
 */
	public final void widget_array() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast widget_array_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(CONTENT_ARRAY,""));
			{
			_loop942:
			do {
				if ((_tokenSet_64.member(LA(1)))) {
					widget();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop942;
				}
				
			} while (true);
			}
			widget_array_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_180);
		}
		returnAST = widget_array_AST;
	}
	
/**
 * Matches the <code>DIR</code> keyword and a following {@link #expr}.
 * <p>
 * Used by {@link #load_stmt}.
 */
	public final void dir_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dir_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1123_AST = null;
			tmp1123_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1123_AST);
			match(KW_DIR);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			dir_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_197);
		}
		returnAST = dir_clause_AST;
	}
	
/**
 * Matches the <code>BASE-KEY</code> keyword and a following
 * {@link #external_name_spec}.
 * <p>
 * Used by {@link #load_stmt}.
 */
	public final void base_key_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast base_key_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1124_AST = null;
			tmp1124_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1124_AST);
			match(KW_BASE_KEY);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			base_key_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_197);
		}
		returnAST = base_key_clause_AST;
	}
	
/**
 * Matches the <code>SECTION</code> clause and a required {@link #expr}.
 * Used by {@link #get_key_value_stmt} and {@link #put_key_value_stmt}.
 */
	public final void section_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast section_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1125_AST = null;
			tmp1125_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1125_AST);
			match(KW_SECTION);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			section_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_198);
		}
		returnAST = section_clause_AST;
	}
	
/**
 * Matches the <code>KEY</code> clause and a required {@link #expr} or
 * <code>DEFAULT</code> keyword.  Used by {@link #get_key_value_stmt}
 * and {@link #put_key_value_stmt}.
 */
	public final void key_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast key_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1126_AST = null;
			tmp1126_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1126_AST);
			match(KW_KEY);
			{
			if ((LA(1)==KW_DEFAULT) && (LA(2)==KW_VALUE) && (_tokenSet_24.member(LA(3)))) {
				Aast tmp1127_AST = null;
				tmp1127_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1127_AST);
				match(KW_DEFAULT);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			key_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_199);
		}
		returnAST = key_clause_AST;
	}
	
/**
 * Matches the <code>VALUE</code> clause and a required {@link #expr}.
 * Used by {@link #get_key_value_stmt} and {@link #put_key_value_stmt}.
 */
	public final void value_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast value_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1128_AST = null;
			tmp1128_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1128_AST);
			match(KW_VALUE);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			value_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_200);
		}
		returnAST = value_clause_AST;
	}
	
/**
 * Matches the <code>COLOR or FONT</code> clause.  Used by
 * {@link #put_key_value_stmt}.
 */
	public final void color_or_font_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast color_or_font_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_COLOR:
			{
				Aast tmp1129_AST = null;
				tmp1129_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1129_AST);
				match(KW_COLOR);
				break;
			}
			case KW_FONT:
			{
				Aast tmp1130_AST = null;
				tmp1130_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1130_AST);
				match(KW_FONT);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==KW_ALL) && (LA(2)==DOT||LA(2)==KW_NO_ERROR) && (_tokenSet_11.member(LA(3)))) {
				Aast tmp1131_AST = null;
				tmp1131_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1131_AST);
				match(KW_ALL);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			color_or_font_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_200);
		}
		returnAST = color_or_font_clause_AST;
	}
	
/**   
 * Matches the <code>INPUT FROM and OUTPUT TO</code> language statements.
 * References the following:
 * <p>
 * <ul>
 *     <li> {@link #value}
 *     <li> {@link #os_dir_clause}
 *     <li> {@link #filename}
 * </ul>
 * <p>
 * Although it is undocumented, it is valid to use a string in place of a
 * file or device name (without using the <code>VALUE</code> construct).
 * The only documented use for this is in <code>OUTPUT TO</code> with the
 * &quot;CLIPBOARD&quot; but it turns out that it can be more generally
 * used.
 * <p>
 * This rule is called by {@link #io_stmt} which is what matches the
 * <code>INPUT and OUTPUT</code> keywords. This refactoring allows all I/O
 * statements to be supported without ambiguity.
 */
	public final void io_from_to_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast io_from_to_stmt_AST = null;
		Token  s = null;
		Aast s_AST = null;
		
		try {      // for error handling
			
			boolean output = false;
			
			{
			{
			switch ( LA(1)) {
			case KW_FROM:
			{
				Aast tmp1132_AST = null;
				tmp1132_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1132_AST);
				match(KW_FROM);
				break;
			}
			case KW_TO:
			{
				Aast tmp1133_AST = null;
				tmp1133_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1133_AST);
				match(KW_TO);
				output = true;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==KW_TERM) && (_tokenSet_190.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1134_AST = null;
				tmp1134_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1134_AST);
				match(KW_TERM);
			}
			else if ((LA(1)==STRING) && (_tokenSet_190.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				s = LT(1);
				s_AST = (Aast)astFactory.create(s);
				astFactory.addASTChild(currentAST, s_AST);
				match(STRING);
				
				// convert the Progress string to a Java string
				String txt = character.progressToJavaString(s_AST.getText(), !unixEscapes, false);
				
				int newtype;
				
				// determine the new type (this translates some special cases which the 4GL
				// treats as keywords even though they were entered as string literals)
				if (txt.equalsIgnoreCase("term") || txt.equalsIgnoreCase("terminal"))
				{
				newtype = KW_TERM;
				}
				else if (txt.equalsIgnoreCase("clipboard"))
				{
				newtype = KW_CLIP;
				}
				else if (txt.equalsIgnoreCase("web"))
				{
				newtype = KW_WEB;
				}
				else
				{
				// default
				newtype = FILENAME;
				}
				
				saveAndReplaceTypeAndText(s_AST, newtype, txt);
				
			}
			else if ((LA(1)==KW_OS_DIR) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				os_dir_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1)==KW_PRINTER) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( output )) {
				printer_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1)==KW_WEB) && (_tokenSet_190.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( output )) {
				Aast tmp1135_AST = null;
				tmp1135_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1135_AST);
				match(KW_WEB);
			}
			else if ((LA(1)==KW_VALUE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				value();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				filename(null);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			io_from_to_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_190);
		}
		returnAST = io_from_to_stmt_AST;
	}
	
/**   
 * Matches the <code>INPUT THROUGH/THRU, INPUT-OUTPUT THROUGH/THRU</code>
 * and <code>OUTPUT THROUGH/THRU</code> language statements.
 * <p>
 * References the following:
 * <p>
 * <ul>
 *     <li> {@link #external_name_spec}
 *     <li> {@link #command_token_list}
 * </ul>
 * <p>
 * Although it is undocumented, it is valid to use a string in place of a
 * file or device name (without using the <code>VALUE</code> construct).
 * <p>
 * This rule is called by {@link #io_stmt} which is what matches the
 * <code>INPUT, INPUT-OUTPUT and OUTPUT</code> keywords. This refactoring
 * allows all I/O statements to be supported without ambiguity.
 */
	public final void io_through_stmt() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast io_through_stmt_AST = null;
		
		try {      // for error handling
			Aast tmp1136_AST = null;
			tmp1136_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1136_AST);
			match(KW_THROUGH);
			{
			external_name_spec();
			astFactory.addASTChild(currentAST, returnAST);
			}
			command_token_list(true);
			astFactory.addASTChild(currentAST, returnAST);
			io_through_stmt_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_190);
		}
		returnAST = io_through_stmt_AST;
	}
	
/**   
 * Matches the set of all I/O options and roots them at an <code>IO_OPTIONS</code> node.
 * <p>
 * This rule is called by {@link #io_stmt}.
 *
 * @param    output
 *           If <code>true</code>, then this is an <code>OUTPUT</code> statement. Otherwise
 *           this is either an <code>INPUT</code> or <code>INPUT-OUTPUT</code> statement.
 * @param    thru
 *           If <code>true</code>, then this is an <code>INPUT THROUGH</code>,
 *           <code>INPUT-OUTPUT THROUGH</code> or <code>OUTPUT THROUGH</code> statement.
 *           Progress allows an undocumented <code>NO-ERROR</code> keyword in this
 *           case.
 */
	public final void io_common_options(
		boolean output, boolean thru
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast io_common_options_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(IO_OPTIONS,"options"));
			{
			_loop993:
			do {
				if ((_tokenSet_201.member(LA(1)))) {
					io_options(output, thru);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop993;
				}
				
			} while (true);
			}
			io_common_options_AST = (Aast)currentAST.root;
			if (io_common_options_AST.getNumberOfChildren() == 0) io_common_options_AST = null;
			currentAST.root = io_common_options_AST;
			currentAST.child = io_common_options_AST!=null &&io_common_options_AST.getFirstChild()!=null ?
				io_common_options_AST.getFirstChild() : io_common_options_AST;
			currentAST.advanceChildToEnd();
			io_common_options_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = io_common_options_AST;
	}
	
/**   
 * Matches the <code>OS-DIR</code> construct with its following parenthesized
 * character {@link #expr} and options.
 * <p>
 * This rule is called by {@link #io_from_to_stmt}.
 */
	public final void os_dir_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast os_dir_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1137_AST = null;
			tmp1137_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1137_AST);
			match(KW_OS_DIR);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NO_ATTRL:
			{
				Aast tmp1138_AST = null;
				tmp1138_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1138_AST);
				match(KW_NO_ATTRL);
				break;
			}
			case DOT:
			case KW_FONT:
			case KW_MAP:
			case KW_NO_ERROR:
			case KW_NO_MAP:
			case KW_APPEND:
			case KW_BINARY:
			case KW_COLLATE:
			case KW_CONVERT:
			case KW_ECHO:
			case KW_KEEP_MSG:
			case KW_LANDSCAP:
			case KW_LOB_DIR:
			case KW_NO_CVT:
			case KW_NO_ECHO:
			case KW_NUM_COPY:
			case KW_PAGE_SZ:
			case KW_PAGED:
			case KW_PORTRAIT:
			case KW_UNBUF:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			os_dir_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_190);
		}
		returnAST = os_dir_clause_AST;
	}
	
/**   
 * Matches the <code>PRINTER</code> keyword with its optional following
 * printer name as matched by {@link #filename}.
 * <p>
 * This rule is called by {@link #io_from_to_stmt}.
 */
	public final void printer_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast printer_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1139_AST = null;
			tmp1139_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1139_AST);
			match(KW_PRINTER);
			{
			if ((LA(1)==STRING) && (_tokenSet_190.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1140_AST = null;
				tmp1140_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1140_AST);
				match(STRING);
			}
			else if ((LA(1)==KW_VALUE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				value();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&(
              LA(1) != KW_BINARY   && LA(1) != KW_ECHO     && 
              LA(1) != KW_NO_ECHO  && LA(1) != KW_UNBUF    &&
              LA(1) != KW_MAP      && LA(1) != KW_NO_MAP   &&
              LA(1) != KW_NO_CVT   && LA(1) != KW_CONVERT  &&
              LA(1) != KW_NUM_COPY && LA(1) != KW_PAGE_SZ  &&
              LA(1) != KW_COLLATE  && LA(1) != KW_LANDSCAP &&
              LA(1) != KW_PORTRAIT && LA(1) != KW_APPEND   &&
              LA(1) != KW_PAGED    && LA(1) != KW_KEEP_MSG &&
              LA(1) != KW_FONT
           )) {
				filename(null);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_190.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			printer_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_190);
		}
		returnAST = printer_clause_AST;
	}
	
/**
 * This rule implements the command token list processing for the shell
 * command statements ({@link #shell_command_stmt}).
 * <p>
 * <b>This rule uses a trick to create an artificial node as a root while
 * still allowing ANTLR to do normal tree building (no suppression of the
 * AST build).</b>  This is only useful in cases where there is no valid
 * token which can be used as a tree root AND where a loop is being used
 * such that the contents of the loop cannot be referenced in a manually
 * built #([,],,,) ANTLR construct. ANTLR doesn't support (as of 2.7.4) the
 * ability to label a loop such that the entire contents can be referenced.
 * If one labels the individual elements inside the loop, only the last one
 * is available when the loop concludes.  However, by leaving the normal
 * tree creation unchanged but manually creating an artificial node and
 * manually setting this node as the root of the returned tree BEFORE the
 * children are added, this problem can be solved.
 * <p>
 * All children of the root node are one of the following types:
 * <p>
 * <pre>
 * STRING
 * COMMAND_TEXT
 * KW_VALUE
 * </pre>
 * <p>
 * The <code>COMMAND_TEXT</code> node is set as the type of any matched
 * token which is not of the other two types.  Since any token except
 * <code>DOT</code> can be included here, these tokens MUST be rewritten
 * otherwise downstream processing of the resulting tree would be quite
 * difficult.
 * <p>
 * This rule only exists to create the proper AST, otherwise it would be much
 * simpler to inline since the match is trivial.
 *
 * @param    io_options
 *           <code>true</code> to avoid matching keywords that can be used
 *           as options in one of the I/O through statements.
 */
	public final void command_token_list(
		boolean io_options
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast command_token_list_AST = null;
		Aast v_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  t = null;
		Aast t_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(COMMAND_TOKENS,"tokens"));
			
			int[] exclude = null;
			
			// DOT and EOF are hard coded in the worker routine
			if (io_options)
			{
			exclude = new int[]
			{
			KW_ECHO,
			KW_NO_ECHO,
			KW_UNBUF,
			KW_MAP,
			KW_NO_MAP,
			KW_NO_CVT,
			KW_CONVERT,
			KW_PAGE_SZ,
			KW_PAGED,
			STRING,
			KW_VALUE,
			KW_NO_ERROR
			};
			}
			else
			{
			exclude = new int[]
			{
			STRING,
			KW_VALUE,
			KW_NO_ERROR
			};
			}
			
			mergeUntilWS(exclude);
			
			{
			_loop1827:
			do {
				switch ( LA(1)) {
				case KW_VALUE:
				{
					value();
					v_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					mergeUntilWS(exclude);
					break;
				}
				case STRING:
				{
					Aast tmp1141_AST = null;
					tmp1141_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1141_AST);
					match(STRING);
					mergeUntilWS(exclude);
					break;
				}
				default:
					if (((LA(1)==DOT) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( !followedByWhitespace(LT(1)) )) {
						d = LT(1);
						d_AST = (Aast)astFactory.create(d);
						astFactory.addASTChild(currentAST, d_AST);
						match(DOT);
						
						mergeUntilWS(exclude);
						d_AST.setType(COMMAND_TEXT);
						
					}
					else if (((_tokenSet_202.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&(
               LA(1) != KW_NO_ERROR && 
              (!io_options ||
               (LA(1) != KW_ECHO     && LA(1) != KW_NO_ECHO  &&
                LA(1) != KW_UNBUF    && LA(1) != KW_MAP      &&
                LA(1) != KW_NO_MAP   && LA(1) != KW_NO_CVT   &&
                LA(1) != KW_CONVERT  && LA(1) != KW_PAGE_SZ  &&
                LA(1) != KW_PAGED))
           )) {
						t = LT(1);
						t_AST = (Aast)astFactory.create(t);
						astFactory.addASTChild(currentAST, t_AST);
						matchNot(DOT);
						
						mergeUntilWS(exclude);
						saveAndReplaceType(t_AST, COMMAND_TEXT);
						
					}
				else {
					break _loop1827;
				}
				}
			} while (true);
			}
			command_token_list_AST = (Aast)currentAST.root;
			if (command_token_list_AST.getNumberOfChildren() == 0) command_token_list_AST = null;
			currentAST.root = command_token_list_AST;
			currentAST.child = command_token_list_AST!=null &&command_token_list_AST.getFirstChild()!=null ?
				command_token_list_AST.getFirstChild() : command_token_list_AST;
			currentAST.advanceChildToEnd();
			command_token_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_190);
		}
		returnAST = command_token_list_AST;
	}
	
/**
 * Matches a range of options used in I/O language statements.  Calls the
 * following rules:
 * <p>
 * <ul>
 *    <li> {@link #value} (this is a qualifier for MAP, undocumented feature of the 4GL)
 *    <li> {@link #filename}
 *    <li> {@link #source_or_target_clause}
 *    <li> {@link #literal}
 *    <li> {@link #value}
 * </ul>
 * <p>
 * The use of <code>literal and value</code> is made optional contrary to
 * the Progress documentation since customer code was found where this was
 * a valid construct.
 * <p>
 * Called by {@link #io_common_options}.
 *
 * @param    output
 *           If <code>true</code>, then this is an <code>OUTPUT</code>
 *           statement. Otherwise this is either an <code>INPUT</code> or 
 *           and <code>INPUT-OUTPUT</code> statement.
 * @param    thru
 *           If <code>true</code>, then this is an <code>INPUT THROUGH</code>,
 *           <code>INPUT-OUTPUT THROUGH</code> or <code>OUTPUT THROUGH</code> statement.
 *           Progress allows an undocumented <code>NO-ERROR</code> keyword in this
 *           case.
 */
	public final void io_options(
		boolean output, boolean thru
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast io_options_AST = null;
		Token  ap = null;
		Aast ap_AST = null;
		Token  km = null;
		Aast km_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case KW_BINARY:
			{
				Aast tmp1142_AST = null;
				tmp1142_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1142_AST);
				match(KW_BINARY);
				io_options_AST = (Aast)currentAST.root;
				break;
			}
			case KW_ECHO:
			case KW_NO_ECHO:
			{
				{
				switch ( LA(1)) {
				case KW_ECHO:
				{
					Aast tmp1143_AST = null;
					tmp1143_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1143_AST);
					match(KW_ECHO);
					break;
				}
				case KW_NO_ECHO:
				{
					Aast tmp1144_AST = null;
					tmp1144_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1144_AST);
					match(KW_NO_ECHO);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				io_options_AST = (Aast)currentAST.root;
				break;
			}
			case KW_UNBUF:
			{
				Aast tmp1145_AST = null;
				tmp1145_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1145_AST);
				match(KW_UNBUF);
				io_options_AST = (Aast)currentAST.root;
				break;
			}
			case KW_MAP:
			{
				Aast tmp1146_AST = null;
				tmp1146_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1146_AST);
				match(KW_MAP);
				{
				if ((LA(1)==STRING) && (_tokenSet_190.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1147_AST = null;
					tmp1147_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1147_AST);
					match(STRING);
				}
				else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					filename(null);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				io_options_AST = (Aast)currentAST.root;
				break;
			}
			case KW_NO_MAP:
			{
				Aast tmp1148_AST = null;
				tmp1148_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1148_AST);
				match(KW_NO_MAP);
				io_options_AST = (Aast)currentAST.root;
				break;
			}
			case KW_LOB_DIR:
			{
				Aast tmp1149_AST = null;
				tmp1149_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1149_AST);
				match(KW_LOB_DIR);
				{
				switch ( LA(1)) {
				case BOOL_TRUE:
				case BOOL_FALSE:
				case DEC_LITERAL:
				case DATE_LITERAL:
				case DATETIME_LITERAL:
				case DATETIME_TZ_LITERAL:
				case HEX_LITERAL:
				case UNQUOTED_TEXT:
				case KW_B_ENDIAN:
				case KW_DLL_C_T:
				case KW_EXC_LOCK:
				case KW_FIND_CS:
				case KW_FIND_GLO:
				case KW_FIND_NO:
				case KW_FIND_PO:
				case KW_FIND_SEL:
				case KW_FIND_WA:
				case KW_FUNC_C_T:
				case KW_GET_A_CT:
				case KW_HOST_B_O:
				case KW_L_ENDIAN:
				case KW_NO_LOCK:
				case KW_NO_WAIT:
				case KW_PROC_C_T:
				case KW_READ_AVL:
				case KW_READ_E_N:
				case KW_ROW_CRTD:
				case KW_ROW_DELD:
				case KW_ROW_MODD:
				case KW_ROW_UMOD:
				case KW_SAX_COMP:
				case KW_SAX_PARE:
				case KW_SAX_RUNN:
				case KW_SAX_UNIN:
				case KW_SAX_WBEG:
				case KW_SAX_WCOM:
				case KW_SAX_WCON:
				case KW_SAX_WELM:
				case KW_SAX_WERR:
				case KW_SAX_WIDL:
				case KW_SAX_WTAG:
				case KW_SEAR_SLF:
				case KW_SEAR_TRG:
				case KW_SET_A_CT:
				case KW_SH_LOCK:
				case KW_WIN_DMIN:
				case KW_WIN_MAX:
				case KW_WIN_MIN:
				case KW_WIN_NORM:
				case STRING:
				case UNKNOWN_VAL:
				case NUM_LITERAL:
				{
					literal();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_VALUE:
				{
					value();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case DOT:
				case KW_FONT:
				case KW_MAP:
				case KW_NO_ERROR:
				case KW_NO_MAP:
				case KW_APPEND:
				case KW_BINARY:
				case KW_COLLATE:
				case KW_CONVERT:
				case KW_ECHO:
				case KW_KEEP_MSG:
				case KW_LANDSCAP:
				case KW_LOB_DIR:
				case KW_NO_CVT:
				case KW_NO_ECHO:
				case KW_NUM_COPY:
				case KW_PAGE_SZ:
				case KW_PAGED:
				case KW_PORTRAIT:
				case KW_UNBUF:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				io_options_AST = (Aast)currentAST.root;
				break;
			}
			case KW_CONVERT:
			case KW_NO_CVT:
			{
				codepage_convert_phrase();
				astFactory.addASTChild(currentAST, returnAST);
				io_options_AST = (Aast)currentAST.root;
				break;
			}
			default:
				if (((LA(1)==KW_NO_ERROR))&&( thru )) {
					Aast tmp1150_AST = null;
					tmp1150_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1150_AST);
					match(KW_NO_ERROR);
					io_options_AST = (Aast)currentAST.root;
				}
				else if (((LA(1)==KW_APPEND) && (_tokenSet_190.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( !output && !thru )) {
					ap = LT(1);
					ap_AST = (Aast)astFactory.create(ap);
					match(KW_APPEND);
					hide(ap);
					io_options_AST = (Aast)currentAST.root;
				}
				else if (((LA(1)==KW_KEEP_MSG) && (_tokenSet_190.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( !output )) {
					km = LT(1);
					km_AST = (Aast)astFactory.create(km);
					match(KW_KEEP_MSG);
					hide(km);
					io_options_AST = (Aast)currentAST.root;
				}
				else if (((_tokenSet_203.member(LA(1))) && (_tokenSet_204.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( output )) {
					{
					switch ( LA(1)) {
					case KW_NUM_COPY:
					case KW_PAGE_SZ:
					{
						{
						switch ( LA(1)) {
						case KW_NUM_COPY:
						{
							Aast tmp1151_AST = null;
							tmp1151_AST = (Aast)astFactory.create(LT(1));
							astFactory.makeASTRoot(currentAST, tmp1151_AST);
							match(KW_NUM_COPY);
							break;
						}
						case KW_PAGE_SZ:
						{
							Aast tmp1152_AST = null;
							tmp1152_AST = (Aast)astFactory.create(LT(1));
							astFactory.makeASTRoot(currentAST, tmp1152_AST);
							match(KW_PAGE_SZ);
							break;
						}
						default:
						{
							throw new NoViableAltException(LT(1), getFilename());
						}
						}
						}
						{
						switch ( LA(1)) {
						case BOOL_TRUE:
						case BOOL_FALSE:
						case DEC_LITERAL:
						case DATE_LITERAL:
						case DATETIME_LITERAL:
						case DATETIME_TZ_LITERAL:
						case HEX_LITERAL:
						case UNQUOTED_TEXT:
						case KW_B_ENDIAN:
						case KW_DLL_C_T:
						case KW_EXC_LOCK:
						case KW_FIND_CS:
						case KW_FIND_GLO:
						case KW_FIND_NO:
						case KW_FIND_PO:
						case KW_FIND_SEL:
						case KW_FIND_WA:
						case KW_FUNC_C_T:
						case KW_GET_A_CT:
						case KW_HOST_B_O:
						case KW_L_ENDIAN:
						case KW_NO_LOCK:
						case KW_NO_WAIT:
						case KW_PROC_C_T:
						case KW_READ_AVL:
						case KW_READ_E_N:
						case KW_ROW_CRTD:
						case KW_ROW_DELD:
						case KW_ROW_MODD:
						case KW_ROW_UMOD:
						case KW_SAX_COMP:
						case KW_SAX_PARE:
						case KW_SAX_RUNN:
						case KW_SAX_UNIN:
						case KW_SAX_WBEG:
						case KW_SAX_WCOM:
						case KW_SAX_WCON:
						case KW_SAX_WELM:
						case KW_SAX_WERR:
						case KW_SAX_WIDL:
						case KW_SAX_WTAG:
						case KW_SEAR_SLF:
						case KW_SEAR_TRG:
						case KW_SET_A_CT:
						case KW_SH_LOCK:
						case KW_WIN_DMIN:
						case KW_WIN_MAX:
						case KW_WIN_MIN:
						case KW_WIN_NORM:
						case STRING:
						case UNKNOWN_VAL:
						case NUM_LITERAL:
						{
							literal();
							astFactory.addASTChild(currentAST, returnAST);
							break;
						}
						case KW_VALUE:
						{
							value();
							astFactory.addASTChild(currentAST, returnAST);
							break;
						}
						case DOT:
						case KW_FONT:
						case KW_MAP:
						case KW_NO_ERROR:
						case KW_NO_MAP:
						case KW_APPEND:
						case KW_BINARY:
						case KW_COLLATE:
						case KW_CONVERT:
						case KW_ECHO:
						case KW_KEEP_MSG:
						case KW_LANDSCAP:
						case KW_LOB_DIR:
						case KW_NO_CVT:
						case KW_NO_ECHO:
						case KW_NUM_COPY:
						case KW_PAGE_SZ:
						case KW_PAGED:
						case KW_PORTRAIT:
						case KW_UNBUF:
						{
							break;
						}
						default:
						{
							throw new NoViableAltException(LT(1), getFilename());
						}
						}
						}
						break;
					}
					case KW_COLLATE:
					{
						Aast tmp1153_AST = null;
						tmp1153_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1153_AST);
						match(KW_COLLATE);
						break;
					}
					case KW_KEEP_MSG:
					{
						Aast tmp1154_AST = null;
						tmp1154_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1154_AST);
						match(KW_KEEP_MSG);
						break;
					}
					case KW_LANDSCAP:
					case KW_PORTRAIT:
					{
						{
						switch ( LA(1)) {
						case KW_LANDSCAP:
						{
							Aast tmp1155_AST = null;
							tmp1155_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp1155_AST);
							match(KW_LANDSCAP);
							break;
						}
						case KW_PORTRAIT:
						{
							Aast tmp1156_AST = null;
							tmp1156_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp1156_AST);
							match(KW_PORTRAIT);
							break;
						}
						default:
						{
							throw new NoViableAltException(LT(1), getFilename());
						}
						}
						}
						break;
					}
					case KW_APPEND:
					{
						Aast tmp1157_AST = null;
						tmp1157_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1157_AST);
						match(KW_APPEND);
						break;
					}
					case KW_PAGED:
					{
						Aast tmp1158_AST = null;
						tmp1158_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1158_AST);
						match(KW_PAGED);
						break;
					}
					case KW_FONT:
					{
						Aast tmp1159_AST = null;
						tmp1159_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp1159_AST);
						match(KW_FONT);
						{
						switch ( LA(1)) {
						case BOOL_TRUE:
						case BOOL_FALSE:
						case DEC_LITERAL:
						case DATE_LITERAL:
						case DATETIME_LITERAL:
						case DATETIME_TZ_LITERAL:
						case HEX_LITERAL:
						case UNQUOTED_TEXT:
						case KW_B_ENDIAN:
						case KW_DLL_C_T:
						case KW_EXC_LOCK:
						case KW_FIND_CS:
						case KW_FIND_GLO:
						case KW_FIND_NO:
						case KW_FIND_PO:
						case KW_FIND_SEL:
						case KW_FIND_WA:
						case KW_FUNC_C_T:
						case KW_GET_A_CT:
						case KW_HOST_B_O:
						case KW_L_ENDIAN:
						case KW_NO_LOCK:
						case KW_NO_WAIT:
						case KW_PROC_C_T:
						case KW_READ_AVL:
						case KW_READ_E_N:
						case KW_ROW_CRTD:
						case KW_ROW_DELD:
						case KW_ROW_MODD:
						case KW_ROW_UMOD:
						case KW_SAX_COMP:
						case KW_SAX_PARE:
						case KW_SAX_RUNN:
						case KW_SAX_UNIN:
						case KW_SAX_WBEG:
						case KW_SAX_WCOM:
						case KW_SAX_WCON:
						case KW_SAX_WELM:
						case KW_SAX_WERR:
						case KW_SAX_WIDL:
						case KW_SAX_WTAG:
						case KW_SEAR_SLF:
						case KW_SEAR_TRG:
						case KW_SET_A_CT:
						case KW_SH_LOCK:
						case KW_WIN_DMIN:
						case KW_WIN_MAX:
						case KW_WIN_MIN:
						case KW_WIN_NORM:
						case STRING:
						case UNKNOWN_VAL:
						case NUM_LITERAL:
						{
							literal();
							astFactory.addASTChild(currentAST, returnAST);
							break;
						}
						case KW_VALUE:
						{
							value();
							astFactory.addASTChild(currentAST, returnAST);
							break;
						}
						case DOT:
						case KW_FONT:
						case KW_MAP:
						case KW_NO_ERROR:
						case KW_NO_MAP:
						case KW_APPEND:
						case KW_BINARY:
						case KW_COLLATE:
						case KW_CONVERT:
						case KW_ECHO:
						case KW_KEEP_MSG:
						case KW_LANDSCAP:
						case KW_LOB_DIR:
						case KW_NO_CVT:
						case KW_NO_ECHO:
						case KW_NUM_COPY:
						case KW_PAGE_SZ:
						case KW_PAGED:
						case KW_PORTRAIT:
						case KW_UNBUF:
						{
							break;
						}
						default:
						{
							throw new NoViableAltException(LT(1), getFilename());
						}
						}
						}
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					io_options_AST = (Aast)currentAST.root;
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_190);
		}
		returnAST = io_options_AST;
	}
	
/**   
 * Matches the <code>SOURCE or TARGET</code> and following codepage or field
 * construct which is matched as a {@link #expr}.
 * <p>
 * This rule is called by {@link #codepage_convert_phrase},  when it is
 * matching codepages and by {@link #dde_get_stmt} or
 * {@link #dde_request_stmt} or {@link #dde_send_stmt} when matching as a
 * source or target field.
 *
 * @param    cp
 *           <code>true</code> to allow the <code>CODEPAGE</code> keyword
 *           to be inserted between the <code>SOURCE</code> or 
 *           <code>TARGET</code> and the following expression.
 */
	public final void source_or_target_clause(
		boolean cp
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast source_or_target_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_SOURCE:
			{
				Aast tmp1160_AST = null;
				tmp1160_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1160_AST);
				match(KW_SOURCE);
				break;
			}
			case KW_TARGET:
			{
				Aast tmp1161_AST = null;
				tmp1161_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1161_AST);
				match(KW_TARGET);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if (((LA(1)==KW_CP) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( cp )) {
				Aast tmp1162_AST = null;
				tmp1162_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1162_AST);
				match(KW_CP);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			source_or_target_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_205);
		}
		returnAST = source_or_target_clause_AST;
	}
	
/**   
 * Matches the <code>MENU or SUB-MENU menu</code> reference seen in the
 * {@link #widget_qualifier}.  Other menu or sub-menu references (see
 * {@link #widget_phrase}) are resolved by common/master processing in the
 * {@link #lvalue} rule.
 * <p>
 * This is very similar to the {@link #submenu_descriptor} rule but it is
 * much simpler.  The two rules can't be used as alternatives because they
 * are ambiguous.
 * <p> 
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * <code>MENU or SUB-MENU</code> keyword.
 */
	public final void menu_reference() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast menu_reference_AST = null;
		Aast menu_AST = null;
		
		try {      // for error handling
			
			int ntype = WID_MENU;
			
			{
			switch ( LA(1)) {
			case KW_MENU:
			{
				Aast tmp1163_AST = null;
				tmp1163_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1163_AST);
				match(KW_MENU);
				break;
			}
			case KW_SUB_MENU:
			{
				Aast tmp1164_AST = null;
				tmp1164_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1164_AST);
				match(KW_SUB_MENU);
				ntype = WID_SUB_MENU;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			symbol();
			menu_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			menu_AST.setType(ntype);
			
			menu_reference_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = menu_reference_AST;
	}
	
/**   
 * Matches the <code>VIEW-AS COMBO-BOX</code> phrase which is called from a
 * {@link #view_as_phrase}.  Uses the following:
 * <p>
 * <ul>
 *    <li> {@link #list_items_clause}
 *    <li> {@link #inner_lines_clause}
 *    <li> {@link #size_phrase}
 *    <li> {@link #tooltip_clause}
 *    <li> {@link #max_chars_clause}
 *    <li> {@link #auto_completion_clause}
 * </ul>
 * <p>
 * All options can be specified in any order.
 * <p>
 * ANTLR detects ambiguity but there is no real problem. Warnings are
 * disabled.
 */
	public final void combo_box_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast combo_box_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp1165_AST = null;
			tmp1165_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1165_AST);
			match(KW_COMBO_BX);
			{
			_loop1016:
			do {
				if ((LA(1)==KW_LST_PAIR||LA(1)==KW_LIST_ITM) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					list_items_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_INNER_L) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					inner_lines_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1) >= KW_SIZE && LA(1) <= KW_SIZE_P)) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==KW_BY)) {
					size_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SORT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1166_AST = null;
					tmp1166_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1166_AST);
					match(KW_SORT);
				}
				else if ((LA(1)==KW_TOOLTIP) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tooltip_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DROP_DWN||LA(1)==KW_DROP_LST||LA(1)==KW_SIMPLE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_SIMPLE:
					{
						Aast tmp1167_AST = null;
						tmp1167_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1167_AST);
						match(KW_SIMPLE);
						break;
					}
					case KW_DROP_DWN:
					{
						Aast tmp1168_AST = null;
						tmp1168_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1168_AST);
						match(KW_DROP_DWN);
						break;
					}
					case KW_DROP_LST:
					{
						Aast tmp1169_AST = null;
						tmp1169_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1169_AST);
						match(KW_DROP_LST);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_MAX_CHAR) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					max_chars_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_AUTO_COM) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					auto_completion_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1016;
				}
				
			} while (true);
			}
			combo_box_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = combo_box_phrase_AST;
	}
	
/**   
 * Matches the simplest form of <code>VIEW-AS</code> clauses for
 * <code>FILL-IN, TEXT and TOGGLE-BOX</code>.  See {@link #view_as_phrase}.
 * Calls {@link #size_phrase} and {@link #tooltip_clause} rules.
 * <p>
 * ANTLR detects ambiguity but there is no real problem. Warnings are
 * disabled.
 * <p>
 * This rule must return back a token type value to tell the caller which
 * widget was specified, since it can match 3 different widgets and the
 * caller must update the widget namespace.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * keyword.
 * 
 * @return    The token type of the matched widget name.
 */
	public final int  simple_widget_phrase() throws RecognitionException, TokenStreamException {
		int ntype = -1;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast simple_widget_phrase_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_FILL_IN:
			{
				Aast tmp1170_AST = null;
				tmp1170_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1170_AST);
				match(KW_FILL_IN);
				ntype = WID_FILL_IN;
				break;
			}
			case KW_TEXT:
			{
				Aast tmp1171_AST = null;
				tmp1171_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1171_AST);
				match(KW_TEXT);
				ntype = WID_TEXT;
				break;
			}
			case KW_TOGGL_BX:
			{
				Aast tmp1172_AST = null;
				tmp1172_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1172_AST);
				match(KW_TOGGL_BX);
				ntype = WID_TOGGLE;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop1020:
			do {
				if ((LA(1)==KW_NATIVE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1173_AST = null;
					tmp1173_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1173_AST);
					match(KW_NATIVE);
				}
				else if (((LA(1) >= KW_SIZE && LA(1) <= KW_SIZE_P)) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==KW_BY)) {
					size_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TOOLTIP) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tooltip_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1020;
				}
				
			} while (true);
			}
			simple_widget_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = simple_widget_phrase_AST;
		return ntype;
	}
	
/**   
 * Matches the <code>VIEW-AS EDITOR</code> phrase which is called from a {@link #view_as_phrase}.
 * <p>
 * Under common conditions, the 4GL requires there be a size phrase or inner clause. However,
 * there is an undocumented feature that allows the size phrase/inner clause to be missing
 * SO LONG AS THE WIDGET HAS THEM SPECIFIED ELSEWHERE (e.g. in a DEFINE VARIABLE). This was
 * found in customer source code.  In other words, there must have been a previous VIEW-AS
 * EDITOR clause with the proper minimum setup. We are not checking for that here.  Instead,
 * we are just loosening up the options processing to make it non-mandatory.
 * <p>
 * Uses the following:
 * <p>
 * <ul>
 *    <li> {@link #size_phrase}
 *    <li> {@link #inner_chars_and_lines_clause}
 *    <li> {@link #buffer_chars_or_lines_clause}
 *    <li> {@link #max_chars_clause}
 *    <li> {@link #tooltip_clause} 
 * </ul>
 * <p>
 * ANTLR detects ambiguity but there is no real problem. Warnings are disabled.
 * <p>
 * All options can be specified in any order.
 */
	public final void editor_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast editor_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp1174_AST = null;
			tmp1174_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1174_AST);
			match(KW_EDITOR);
			{
			_loop1024:
			do {
				if ((LA(1)==KW_BUFFER_C||LA(1)==KW_BUFFER_L) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					buffer_chars_or_lines_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_LARGE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1175_AST = null;
					tmp1175_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1175_AST);
					match(KW_LARGE);
				}
				else if ((LA(1)==KW_MAX_CHAR) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					max_chars_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_NO_BOX) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1176_AST = null;
					tmp1176_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1176_AST);
					match(KW_NO_BOX);
				}
				else if ((LA(1)==KW_NO_WRAP) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1177_AST = null;
					tmp1177_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1177_AST);
					match(KW_NO_WRAP);
				}
				else if ((LA(1)==KW_SCROLL_H) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1178_AST = null;
					tmp1178_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1178_AST);
					match(KW_SCROLL_H);
				}
				else if ((LA(1)==KW_SCROLL_V) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1179_AST = null;
					tmp1179_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1179_AST);
					match(KW_SCROLL_V);
				}
				else if ((LA(1)==KW_TOOLTIP) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tooltip_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_206.member(LA(1))) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_SIZE:
					case KW_SIZE_C:
					case KW_SIZE_P:
					{
						size_phrase();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_INNER_C:
					case KW_INNER_L:
					{
						inner_chars_and_lines_clause();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else {
					break _loop1024;
				}
				
			} while (true);
			}
			editor_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = editor_phrase_AST;
	}
	
/**   
 * Matches the <code>VIEW-AS RADIO-SET</code> phrase which is called from a
 * {@link #view_as_phrase}. Uses the following:
 * <p>
 * <ul>
 *    <li> {@link #size_phrase}
 *    <li> {@link #radio_buttons_clause}
 *    <li> {@link #tooltip_clause} 
 * </ul>
 * <p>
 * ANTLR detects ambiguity but there is no real problem. Warnings are
 * disabled.
 * <p>
* All options can be specified in any order.
 */
	public final void radio_set_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast radio_set_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp1180_AST = null;
			tmp1180_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1180_AST);
			match(KW_RADIO_S);
			{
			_loop1029:
			do {
				if ((LA(1)==KW_HORIZ||LA(1)==KW_VERT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_HORIZ:
					{
						Aast tmp1181_AST = null;
						tmp1181_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1181_AST);
						match(KW_HORIZ);
						{
						if ((LA(1)==KW_EXPAND) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
							Aast tmp1182_AST = null;
							tmp1182_AST = (Aast)astFactory.create(LT(1));
							astFactory.addASTChild(currentAST, tmp1182_AST);
							match(KW_EXPAND);
						}
						else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						
						}
						break;
					}
					case KW_VERT:
					{
						Aast tmp1183_AST = null;
						tmp1183_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1183_AST);
						match(KW_VERT);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if (((LA(1) >= KW_SIZE && LA(1) <= KW_SIZE_P)) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==KW_BY)) {
					size_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_RADIO_B) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
					radio_buttons_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TOOLTIP) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tooltip_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1029;
				}
				
			} while (true);
			}
			radio_set_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = radio_set_phrase_AST;
	}
	
/**   
 * Matches the <code>VIEW-AS SELECTION-LIST</code> phrase which is called
 * from a {@link #view_as_phrase}.  Uses the following:
 * <p>
 * <ul>
 *    <li> {@link #list_items_clause}
 *    <li> {@link #size_phrase}
 *    <li> {@link #inner_chars_and_lines_clause} 
 *    <li> {@link #tooltip_clause}
 * </ul>
 * <p>
 * ANTLR detects ambiguity but there is no real problem. Warnings are
 * disabled.
 * <p>
 * All options can be specified in any order.
 */
	public final void selection_list_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast selection_list_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp1184_AST = null;
			tmp1184_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1184_AST);
			match(KW_SEL_LST);
			{
			_loop1034:
			do {
				if ((LA(1)==KW_MULTIPLE||LA(1)==KW_SINGLE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_SINGLE:
					{
						Aast tmp1185_AST = null;
						tmp1185_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1185_AST);
						match(KW_SINGLE);
						break;
					}
					case KW_MULTIPLE:
					{
						Aast tmp1186_AST = null;
						tmp1186_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1186_AST);
						match(KW_MULTIPLE);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_NO_DRAG) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1187_AST = null;
					tmp1187_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1187_AST);
					match(KW_NO_DRAG);
				}
				else if ((LA(1)==KW_LST_PAIR||LA(1)==KW_LIST_ITM) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					list_items_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SCROLL_H) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1188_AST = null;
					tmp1188_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1188_AST);
					match(KW_SCROLL_H);
				}
				else if ((LA(1)==KW_SCROLL_V) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1189_AST = null;
					tmp1189_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1189_AST);
					match(KW_SCROLL_V);
				}
				else if ((_tokenSet_206.member(LA(1))) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_SIZE:
					case KW_SIZE_C:
					case KW_SIZE_P:
					{
						size_phrase();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case KW_INNER_C:
					case KW_INNER_L:
					{
						inner_chars_and_lines_clause();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_SORT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1190_AST = null;
					tmp1190_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1190_AST);
					match(KW_SORT);
				}
				else if ((LA(1)==KW_TOOLTIP) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tooltip_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1034;
				}
				
			} while (true);
			}
			selection_list_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = selection_list_phrase_AST;
	}
	
/**   
 * Matches the <code>VIEW-AS SLIDER</code> phrase which is called
 * from a {@link #view_as_phrase}.  Uses the following:
 * <p>
 * <ul>
 *    <li> {@link #max_and_min_value_clause}
 *    <li> {@link #tic_marks_clause}
 *    <li> {@link #size_phrase}
 *    <li> {@link #tooltip_clause}
 * </ul>
 * <p>
 * ANTLR detects ambiguity but there is no real problem. Warnings are
 * disabled.
 * <p>
 * All options can be specified in any order.
 */
	public final void slider_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast slider_phrase_AST = null;
		
		try {      // for error handling
			Aast tmp1191_AST = null;
			tmp1191_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1191_AST);
			match(KW_SLIDER);
			{
			_loop1038:
			do {
				if ((LA(1)==KW_HORIZ||LA(1)==KW_VERT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case KW_HORIZ:
					{
						Aast tmp1192_AST = null;
						tmp1192_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1192_AST);
						match(KW_HORIZ);
						break;
					}
					case KW_VERT:
					{
						Aast tmp1193_AST = null;
						tmp1193_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1193_AST);
						match(KW_VERT);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((LA(1)==KW_NO_CUR_V) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1194_AST = null;
					tmp1194_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1194_AST);
					match(KW_NO_CUR_V);
				}
				else if ((LA(1)==KW_LG_2_SM) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1195_AST = null;
					tmp1195_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1195_AST);
					match(KW_LG_2_SM);
				}
				else if ((LA(1)==KW_MAX_VAL||LA(1)==KW_MIN_VAL) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					max_and_min_value_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TIC_MARK) && (_tokenSet_207.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tic_marks_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((LA(1) >= KW_SIZE && LA(1) <= KW_SIZE_P)) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (LA(3)==KW_BY)) {
					size_phrase();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_TOOLTIP) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					tooltip_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1038;
				}
				
			} while (true);
			}
			slider_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = slider_phrase_AST;
	}
	
/**   
 * Matches the <code>LIST_ITEMS</code> and <code>LIST_ITEM_PAIRS</code> clauses as used in a
 * phrase from a <code>VIEW-AS COMBO-BOX</code> or <code>VIEW-AS SELECTION-LIST</code> construct.
 * See {@link #combo_box_phrase} or {@link #selection_list_phrase}.
 * <p>
 * By making a separate rule for this, the logic is centralized and the AST is kept simple
 * because all tokens can be rooted at this option's keyword.
 */
	public final void list_items_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast list_items_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_LIST_ITM:
			{
				Aast tmp1196_AST = null;
				tmp1196_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1196_AST);
				match(KW_LIST_ITM);
				break;
			}
			case KW_LST_PAIR:
			{
				Aast tmp1197_AST = null;
				tmp1197_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1197_AST);
				match(KW_LST_PAIR);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			literal();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1059:
			do {
				if ((LA(1)==COMMA) && (_tokenSet_65.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					literal();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1059;
				}
				
			} while (true);
			}
			list_items_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = list_items_clause_AST;
	}
	
/**   
 * Matches the <code>INNER-LINES</code> clause as used in a phrase from a
 * <code>VIEW-AS COMBO-BOX</code> construct.  See {@link #combo_box_phrase}.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * keyword.
 */
	public final void inner_lines_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast inner_lines_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1198_AST = null;
			tmp1198_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1198_AST);
			match(KW_INNER_L);
			whole_number_literal();
			astFactory.addASTChild(currentAST, returnAST);
			inner_lines_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = inner_lines_clause_AST;
	}
	
/**   
 * Matches the <code>MAX-CHARS</code> clause as used in a phrase from a
 * <code>VIEW-AS COMBO-BOX</code> construct.  See {@link #combo_box_phrase}.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * keyword.
 */
	public final void max_chars_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast max_chars_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1199_AST = null;
			tmp1199_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1199_AST);
			match(KW_MAX_CHAR);
			whole_number_literal();
			astFactory.addASTChild(currentAST, returnAST);
			max_chars_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = max_chars_clause_AST;
	}
	
/**   
 * Matches the <code>AUTO-COMPLETION</code> clause as used in a phrase from a
 * <code>VIEW-AS COMBO-BOX</code> construct.  See {@link #combo_box_phrase}.
 * <p>
 * ANTLR detects ambiguity but there is no real problem. Warnings are
 * disabled.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * keyword.
 */
	public final void auto_completion_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast auto_completion_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1200_AST = null;
			tmp1200_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1200_AST);
			match(KW_AUTO_COM);
			{
			if ((LA(1)==KW_UNIQ_MAT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1201_AST = null;
				tmp1201_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1201_AST);
				match(KW_UNIQ_MAT);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			auto_completion_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = auto_completion_clause_AST;
	}
	
/**   
 * Matches the <code>BUFFER-CHARS chars and BUFFER-LINES lines</code> clause
 * as used in a <code>VIEW-AS EDITOR</code> phrase.  See
 * {@link #view_as_phrase} and {@link #editor_phrase}.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * keyword.
 */
	public final void buffer_chars_or_lines_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast buffer_chars_or_lines_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_BUFFER_C:
			{
				Aast tmp1202_AST = null;
				tmp1202_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1202_AST);
				match(KW_BUFFER_C);
				break;
			}
			case KW_BUFFER_L:
			{
				Aast tmp1203_AST = null;
				tmp1203_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1203_AST);
				match(KW_BUFFER_L);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			whole_number_literal();
			astFactory.addASTChild(currentAST, returnAST);
			buffer_chars_or_lines_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = buffer_chars_or_lines_clause_AST;
	}
	
/**   
 * Matches the <code>INNER-CHARS chars INNER-LINES lines</code> clause in an
 * arbitrary order (either keyword will be matched first, which is an
 * undocumented feature.  Although the documentation states both must be
 * present to complete the match, working 4GL code has also shown that it is
 * valid to match only one of the two. As another undocumented feature, the
 * second keyword and literal has been made optional.  This causes some
 * ambiguity to be detected, but the usage is fine.  For this reason, the
 * warning has been disabled.
 * <p>
 * See {@link #inner_chars_and_lines_core}
 */
	public final void inner_chars_and_lines_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast inner_chars_and_lines_clause_AST = null;
		
		try {      // for error handling
			inner_chars_and_lines_core();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_INNER_C||LA(1)==KW_INNER_L) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
				inner_chars_and_lines_core();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			inner_chars_and_lines_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = inner_chars_and_lines_clause_AST;
	}
	
/**   
 * Matches the {@code RADIO-BUTTONS} clause as used in a {@code VIEW-AS RADIO-SET} phrase.  See
 * {@link #view_as_phrase} and {@link #radio_set_phrase}.  The root node will be a {@code KW_RADIO_B}
 * followed by pairs of {@code STRING} and {@code literal}.  Although the documentation suggests that
 * the first element of every pair is a {@code STRING}, but an undocumented feature of the 4GL is that
 * this can also be unquoted text (including non-symbol characters).  This is matched using the
 * {@code malformed_symbol} rules. If this quirk is found, that node is rewritten from {@code SYMBOL} to
 * {@code STRING} so that the downstream code can be simple. 
 * <p>
 * By making a separate rule for this, the logic is centralized and the AST is kept simple because all
 * tokens can be rooted at this option's keyword.
 */
	public final void radio_buttons_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast radio_buttons_clause_AST = null;
		Aast s1_AST = null;
		Aast s2_AST = null;
		
		try {      // for error handling
			Aast tmp1204_AST = null;
			tmp1204_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1204_AST);
			match(KW_RADIO_B);
			{
			if ((LA(1)==STRING) && (LA(2)==COMMA) && (_tokenSet_65.member(LA(3)))) {
				Aast tmp1205_AST = null;
				tmp1205_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1205_AST);
				match(STRING);
			}
			else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
				malformed_symbol();
				s1_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				convertSymbolToString(s1_AST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			literal();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1048:
			do {
				if ((LA(1)==COMMA) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					{
					if ((LA(1)==STRING) && (LA(2)==COMMA) && (_tokenSet_65.member(LA(3)))) {
						Aast tmp1206_AST = null;
						tmp1206_AST = (Aast)astFactory.create(LT(1));
						astFactory.addASTChild(currentAST, tmp1206_AST);
						match(STRING);
					}
					else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
						malformed_symbol();
						s2_AST = (Aast)returnAST;
						astFactory.addASTChild(currentAST, returnAST);
						convertSymbolToString(s2_AST);
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					literal();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1048;
				}
				
			} while (true);
			}
			radio_buttons_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = radio_buttons_clause_AST;
	}
	
/**   
 * Matches the <code>MAX-VALUE num</code> or <code>MIN-VALUE num</code>
 * clauses as used in a <code>VIEW-AS SLIDER</code> phrase.  See
 * {@link #view_as_phrase} and {@link #slider_phrase}.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * keyword.
 */
	public final void max_and_min_value_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast max_and_min_value_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_MAX_VAL:
			{
				Aast tmp1207_AST = null;
				tmp1207_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1207_AST);
				match(KW_MAX_VAL);
				break;
			}
			case KW_MIN_VAL:
			{
				Aast tmp1208_AST = null;
				tmp1208_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1208_AST);
				match(KW_MIN_VAL);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			whole_number_literal();
			astFactory.addASTChild(currentAST, returnAST);
			max_and_min_value_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = max_and_min_value_clause_AST;
	}
	
/**   
 * Matches the <code>TIC-MARKS</code> clause as used in a 
 * <code>VIEW-AS SLIDER</code> phrase.  See {@link #view_as_phrase}
 * and {@link #slider_phrase}.
 * <p>
 * ANTLR detects ambiguity but there is no real problem. Warnings are
 * disabled.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * keyword.
 */
	public final void tic_marks_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast tic_marks_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1209_AST = null;
			tmp1209_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1209_AST);
			match(KW_TIC_MARK);
			{
			switch ( LA(1)) {
			case KW_NONE:
			{
				Aast tmp1210_AST = null;
				tmp1210_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1210_AST);
				match(KW_NONE);
				break;
			}
			case KW_TOP:
			{
				Aast tmp1211_AST = null;
				tmp1211_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1211_AST);
				match(KW_TOP);
				break;
			}
			case KW_BOTTOM:
			{
				Aast tmp1212_AST = null;
				tmp1212_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1212_AST);
				match(KW_BOTTOM);
				break;
			}
			case KW_LEFT:
			{
				Aast tmp1213_AST = null;
				tmp1213_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1213_AST);
				match(KW_LEFT);
				break;
			}
			case KW_RIGHT:
			{
				Aast tmp1214_AST = null;
				tmp1214_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1214_AST);
				match(KW_RIGHT);
				break;
			}
			case KW_BOTH:
			{
				Aast tmp1215_AST = null;
				tmp1215_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1215_AST);
				match(KW_BOTH);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==KW_FREQ) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1216_AST = null;
				tmp1216_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1216_AST);
				match(KW_FREQ);
				whole_number_literal();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			tic_marks_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = tic_marks_clause_AST;
	}
	
/**   
 * Matches the <code>INNER-CHARS chars or INNER-LINES lines</code> clause as
 * used in a <code>VIEW-AS EDITOR</code> phrase.  See {@link #view_as_phrase}
 * and {@link #editor_phrase}.
 * <p>
 * By making a separate rule for this, the logic is centralized and the
 * AST is kept simple because all tokens can be rooted at this option's
 * keyword.
 */
	public final void inner_chars_and_lines_core() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast inner_chars_and_lines_core_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_INNER_C:
			{
				Aast tmp1217_AST = null;
				tmp1217_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1217_AST);
				match(KW_INNER_C);
				break;
			}
			case KW_INNER_L:
			{
				Aast tmp1218_AST = null;
				tmp1218_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1218_AST);
				match(KW_INNER_L);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			whole_number_literal();
			astFactory.addASTChild(currentAST, returnAST);
			inner_chars_and_lines_core_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = inner_chars_and_lines_core_AST;
	}
	
/**
 * Matches a Progress 4GL label reference that refers to a label that was
 * previously defined in a block definition, see {@link #inner_block}.
 * <p>
 * The matching portion of this rule is defined as a single token that
 * matches the union of the label token type and the set of all possible
 * alternatives for symbol names.  Normally, symbols must start with an
 * alphabetic character or underscore, but labels are special in that they
 * can be malformed.  This means they can start with any valid symbol 
 * character (such as a minus, a number or other characters). To implement
 * this, a call to {@link #malformed_symbol} rule is used.
 * <p>
 * Since the <code>malformed_symbol</code> rule includes reserved keywords
 * in its possible token set, if the calling rule has following tokens that
 * map into this set, there will be a potentially inappropriate matching to
 * this rule.  For this reason, this rule may return nothing if it detects
 * that there is no label reference at all.
 * <p>
 * It is important to note that in the end, it is not really valid to have
 * a token type of <code>SYMBOL</code> since this could be anything.  What we
 * really require is a token that is a <code>LABEL</code>.  The result of
 * this rule is always rewritten to have the <code>LABEL</code> type.
 */
	public final void label_reference() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast label_reference_AST = null;
		
		try {      // for error handling
			
			// save off this token for error handling later
			Token lead  = LT(1);
			int   ttype = lead.getType(); 
			
			boolean proper = false;
			boolean mal    = false;
			
			// check if this a normal label                  
			if ((ttype > BEGIN_UNRESERVED && ttype < END_UNRESERVED) ||
			ttype == SYMBOL)
			{
			if (sym.lookupLabel(lead.getText()) != -1)
			{
			proper = true;
			}
			}
			
			if (!proper)
			{
			mal = isMalformedLabel(false, 1, null);
			}
			
			{
			if ((LA(1)==LABEL) && (_tokenSet_101.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1219_AST = null;
				tmp1219_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1219_AST);
				match(LABEL);
			}
			else if ((((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( proper || mal || LA(3) == KW_THROW)) {
				malformed_symbol();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_101.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			label_reference_AST = (Aast)currentAST.root;
			
			if (label_reference_AST != null)
			{
			ttype = label_reference_AST.getType();
			
			if (ttype != LABEL)
			{
			int newtype = sym.lookupLabel(label_reference_AST.getText());
			
			if (newtype == -1 && LA(2) == KW_THROW)
			{
			// bogus label for UNDO, THROW
			newtype = LABEL;
			}
			
			// there should always be a match in valid Progress 4GL source
			// so we throw an exception if this is not the case
			if ( newtype != -1 )
			{
			label_reference_AST.setType( newtype );
			}
			else
			{
			throw new NoViableAltException(lead, getFilename());
			}
			}
			}
			
			label_reference_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_101);
		}
		returnAST = label_reference_AST;
	}
	
/**
 * Matches the <code>GET</code> or <code>SET</code> block of the
 * {@link #def_prop_stmt}. Uses {@link #access_mode}, {@link #param_list_definition},
 * {@link #block} and {@link #end_stmt}.
 */
	public final void getter_setter() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast getter_setter_AST = null;
		Aast a_AST = null;
		Token  g = null;
		Aast g_AST = null;
		Token  s = null;
		Aast s_AST = null;
		Aast p_AST = null;
		Aast b_AST = null;
		
		try {      // for error handling
			
			nestLevel++;
			sym.addScope();
			sym.addSchemaScope(true);
			boolean oldBufScope = bufferScope;
			bufferScope = false;
			inMethodDef = true;
			sym.setInMethod(true);
			
			{
			switch ( LA(1)) {
			case KW_PK_PRIV:
			case KW_PK_PROT:
			case KW_PRIVATE:
			case KW_PROTECTD:
			case KW_PUBLIC:
			{
				access_mode();
				a_AST = (Aast)returnAST;
				break;
			}
			case KW_SET:
			case KW_GET:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_GET:
			{
				g = LT(1);
				g_AST = (Aast)astFactory.create(g);
				match(KW_GET);
				break;
			}
			case KW_SET:
			{
				s = LT(1);
				s_AST = (Aast)astFactory.create(s);
				match(KW_SET);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			if (!( nestLevel == 2 ))
			  throw new SemanticException(" nestLevel == 2 ");
			{
			if ((LA(1)==COLON||LA(1)==LPARENS) && (_tokenSet_208.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				switch ( LA(1)) {
				case LPARENS:
				{
					param_list_definition(false, false, true);
					p_AST = (Aast)returnAST;
					block_term();
					break;
				}
				case COLON:
				{
					colon();
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				block();
				b_AST = (Aast)returnAST;
				{
				switch ( LA(1)) {
				case KW_END:
				{
					end_stmt(false);
					break;
				}
				case DOT:
				case COLON:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((LA(1)==DOT||LA(1)==COLON) && (_tokenSet_11.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			getter_setter_AST = (Aast)currentAST.root;
			
			Aast proproot = g_AST == null ? s_AST : g_AST;
			Aast blk      = b_AST == null ? null : (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(BLOCK,"block")).add(b_AST));
			getter_setter_AST = (Aast)astFactory.make( (new ASTArray(4)).add(proproot).add(a_AST).add(p_AST).add(blk));
			
			// getters/setters are always nested
			bufferScope = oldBufScope;
			inMethodDef = false;
			sym.setInMethod(false);
			
			// don't know if getters/setters propagate, assume true for now (assume same with
			// user_defined_method)
			sym.deleteSchemaScope(true);
			sym.deleteScope();
			inStaticCtxt = false;
			nestLevel--;
			
			currentAST.root = getter_setter_AST;
			currentAST.child = getter_setter_AST!=null &&getter_setter_AST.getFirstChild()!=null ?
				getter_setter_AST.getFirstChild() : getter_setter_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_32);
		}
		returnAST = getter_setter_AST;
	}
	
/**
 * Match the specification of an event handler signature for a 4GL procedure or method that
 * will handle the associated event.  Called from {@link #def_event_stmt}.  Matches an optional
 * <code>KW_SIGNATUR</code>, then a <code>KW_VOID</code> followed by a
 * {@link #param_list_definition}.  The result is rooted at an <code>EVENT_SIGNATURE</code>
 * node. Separated from the main rule in order to build the tree properly.
 */
	public final void event_signature() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast event_signature_AST = null;
		Token  si = null;
		Aast si_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(EVENT_SIGNATURE,"signature"));
			sym.setInMethod(true); 
			
			{
			switch ( LA(1)) {
			case KW_SIGNATUR:
			{
				si = LT(1);
				si_AST = (Aast)astFactory.create(si);
				match(KW_SIGNATUR);
				hide(si);
				break;
			}
			case KW_VOID:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			Aast tmp1220_AST = null;
			tmp1220_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp1220_AST);
			match(KW_VOID);
			param_list_definition(true, false, true);
			astFactory.addASTChild(currentAST, returnAST);
			
			sym.setInMethod(false); 
			
			event_signature_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = event_signature_AST;
	}
	
/**
 * Match the specification of an event handler as a .NET delegate class name
 * that will handle the associated event.  Called from {@link #def_event_stmt}.
 * Matches an optional <code>KW_DELEGATE</code>, then an optional
 * <code>KW_CLASS</code> followed by an {@link #user_defined_type_name}.  The
 * result is rooted at an <code>DOTNET_DELEGATE</code> node. Separated from the
 * main rule in order to build the tree properly.
 */
	public final void dotnet_delegate() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dotnet_delegate_AST = null;
		Token  del = null;
		Aast del_AST = null;
		Token  cl = null;
		Aast cl_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(DOTNET_DELEGATE,"delegate"));
			{
			if ((LA(1)==KW_DELEGATE) && (_tokenSet_0.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				del = LT(1);
				del_AST = (Aast)astFactory.create(del);
				match(KW_DELEGATE);
				hide(del);
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_CLASS) && (_tokenSet_0.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				cl = LT(1);
				cl_AST = (Aast)astFactory.create(cl);
				match(KW_CLASS);
				hide(cl);
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			user_defined_type_name();
			astFactory.addASTChild(currentAST, returnAST);
			dotnet_delegate_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = dotnet_delegate_AST;
	}
	
/**
 * Matches a {@link #literal} or an {@link #lvalue} when the 
 * <code>TODAY</code> or <code>NOW</code> keywords are encountered. Handles a
 * special case for {@link #initializer} but instead of resolving to a 
 * <code>FUNC_DATE</code> or <code>FUNC_DATETIME</code> we override the type
 * to <code>DATE_LITERAL</code>, <code>DATETIME_LITERAL</code> or <code>DATETIME_TZ_LITERAL</code>
 * which is consistent with the usage of this as a constant.
 * <p>
 * Due to nastiness in Progress, there is an undocumented 'feature' that
 * allows one to specify a non-string literal as a string.  This is a problem
 * when one needs to find a token of one type and finds a <code>STRING</code>
 * instead.  For this reason, all callers now provide a state parameter that
 * determines if any possible fixups are needed.  If so, the init rule
 * rewrites the token properly.
 * <p>
 * <b>WARNING: in combination with the above feature, if a logical value is
 * initialized with a string, the format string (implicitly set to 'yes/no'
 * and 'true/false' or explicitly set via <code>LIKE or FORMAT</code>) will
 * determine how such strings will be converted to
 * <code>BOOL_TRUE or BOOL_FALSE</code>.  Since the format string may or may
 * not be known at this point in the parsing, the result cannot be determined  
 * in this rule.  In this case the original <code>STRING</code> is left
 * behind and will be handled by our 'boolean manhandling' processing later.
 * </b>
 *
 * @param    vtype
 *           A token type that describes type of the variable being initialized. This is
 *           the type of the child of the <code>KW_AS</code> or <code>KW_LIKE</code> node.
 */
	public final void initializer_constant(
		int vtype
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast initializer_constant_AST = null;
		Aast l_AST = null;
		
		try {      // for error handling
			
			boolean string  = isCharType(vtype);
			boolean date    = isDateType(vtype);
			boolean numeric = isNumericType(vtype);
			
			Token   content = LT(1);
			String  oldtxt  = content.getText();
			String  newtxt  = null;
			int     oldtype = content.getType();
			int     newtype = -1;
			
			// character type needs this manhandling too
			if (string)
			{
			if (oldtype != STRING && oldtype != UNKNOWN_VAL)
			{
			// wrap this in quotes
			newtxt  = "\"" + oldtxt + "\"";
			newtype = STRING;
			}
			}
			else
			{
			// the SYMBOL case will happen in the "boolean manhandling" situation
			// only handle the STRING case here
			if (oldtype == STRING)
			{
			// OK, we need to re-lex!
			Token fixed = relex(oldtxt);
			
			// nulls should only occur if the input is the empty string
			if (fixed == null)
			{
			// empty string is the same as unknown value in a 4GL date init
			if (date)
			{
			newtxt  = "?";
			newtype = UNKNOWN_VAL;
			}
			else if (numeric)
			{
			// empty string is the same as the 0 value in a 4GL numeric init
			newtxt  = "0";
			newtype = NUM_LITERAL;
			}
			}
			else
			{
			if (oldtype == STRING && (isDateTimeType(vtype) || isDateTimeTzType(vtype)))
			{
			// relex will eat everything after a 'space' char, this ensures the literal is preserved
			// this literal is not a ISO literal, but the string specification of a datetime(-tz)
			fixed = content; 
			
			// mark the literal to be wrapped in a datetime or datetime-tz
			newtxt = character.progressToJavaString(oldtxt, !unixEscapes, false);
			newtype = isDateTimeType(vtype) ? DATETIME_LITERAL : DATETIME_TZ_LITERAL;
			}
			else
			{
			int t = fixed.getType();
			
			// only update the type and text if we found a new match,
			// otherwise defer the fix to later...
			if (t == UNKNOWN_VAL         || t == BOOL_TRUE        || t == BOOL_FALSE   ||
			t == NUM_LITERAL         || t == HEX_LITERAL      || t == DEC_LITERAL  ||
			t == DATE_LITERAL        || t == DATETIME_LITERAL || t == KW_TODAY     ||
			t == DATETIME_TZ_LITERAL || t == KW_NOW)
			{
			newtxt = fixed.getText();
			newtype = fixed.getType();
			}
			}
			}
			}
			}
			
			// date types allow matching of the text that in other known contexts would
			// be a decimal literal, we must rewrite those cases here
			if (date)
			{
			if (oldtype == DEC_LITERAL)
			{
			newtype = DATE_LITERAL;
			}
			}
			
			if (newtxt != null)
			{
			content.setText(newtxt);
			}
			if (newtype != -1 && newtype != oldtype)
			{
			content.setType(newtype);
			}
			
			{
			if ((_tokenSet_65.member(LA(1)))) {
				literal();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_64.member(LA(1))))&&( LA(1) == KW_TODAY || LA(1) == KW_NOW )) {
				lvalue();
				l_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				// don't use saveAndReplaceType() here because we already have
				// the KW_TODAY/KW_NOW as our "oldtype" annotation and we are
				// just replacing the FUNC_* type that is the current type with
				// the literal type which eases our conversion effort in this
				// case since this is the only case where Progress treats these
				// "functions" as literals
				if (l_AST.getType() == FUNC_DATE)
				{
				// today
				l_AST.setType(DATE_LITERAL);
				}
				else if (l_AST.getType() == FUNC_DATETIME_TZ)
				{
				// now
				l_AST.setType(DATETIME_TZ_LITERAL);
				}
				
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			initializer_constant_AST = (Aast)currentAST.root;
			
			if (newtxt != null)
			{
			initializer_constant_AST.putAnnotation("original-text", oldtxt);
			}
			if (newtype != -1 && newtype != oldtype)
			{
			initializer_constant_AST.putAnnotation("oldtype", Long.valueOf(oldtype));
			}
			
			initializer_constant_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = initializer_constant_AST;
	}
	
/**
 * Matches the variable type language keyword in {@link #as_clause} or
 * directly in {@link #parameter}.
 * <p>
 * This design allows the logic to be centralized and reused from multiple 
 * callers.  To do this, this rule requires a single parameter which is the
 * variable name to be added to the dictionary. This is necessary since there
 * is no way to implement a standard match for the symbol name from all
 * language statements that call this rule.
 * <p>
 * The inclusion of the {@link #reserved_or_symbol} rule in the second token
 * position ensures that all possible symbols are considered a possible data
 * type and will be matched by this rule.  This means that the calling rules
 * include a list of reserved and unreserved keywords or generic symbols as
 * one of the options for its 2nd token, thus &quot;pulling&quot; the
 * recursive descent processing down into this rule.
 * <p>
 * It is important to note that in the end, it is not really valid to have
 * a token type of <code>SYMBOL</code>, random keyword match or anything
 * other than one of the valid <b>special abbreviations</b> for a data type.
 * What we really require is a token that is one of the following:
 * <pre>
 *    Data Type Keyword        Actual Minimum Abbrev      Lexer Abbrev
 *    -----------------        ---------------------      -------------
 *    KW_BLOB                  not supported as a variable
 *    KW_CHAR                  c                          char
 *    KW_CLASS                 n/a                        n/a
 *    KW_CLOB                  not supported as a variable
 *    KW_COM_HNDL              n/a                        n/a
 *    KW_DATE                  da                         n/a
 *    KW_DATETIME              n/a                        n/a
 *    KW_DATE_TZ               n/a                        n/a
 *    KW_DEC                   de                         dec
 *    KW_HANDLE                handle                     n/a
 *    KW_INT                   i                          int
 *    KW_INT64                 n/a                        n/a
 *    KW_LOGICAL               l                          n/a
 *    KW_LONGCHAR              n/a                        n/a
 *    KW_MEMPTR                m                          mem
 *    KW_RAW                   ra                         n/a
 *    KW_RECID                 re                         n/a
 *    KW_ROWID                 row                        n/a
 *    KW_WID_HAND              widg                       widget-h
 *    The following are supported in native interfaces:
 *    KW_BYTE                  n/a                        n/a
 *    KW_DOUBLE                n/a                        n/a
 *    KW_FLOAT                 n/a                        n/a
 *    KW_LONG                  n/a                        n/a
 *    KW_SHORT                 n/a                        n/a
 *    KW_UNS_SHRT              n/a                        n/a
 * </pre>
 * <p>
 * The difference between a <code>SYMBOL</code> and a <code>KW_CHAR</code>
 * can only be determined by context (the fact that the lookahead code has
 * identified a match with a <code>SYMBOL</code> token which is a construct 
 * that can occur in an this rule).  Thus <b>if</b> a match is found using
 * lookahead (in the rule that calls this one), then it <b>must</b> be
 * correct and necessary to convert the <code>SYMBOL</code> or other keyword
 * token type into the correct keyword representing the data type, using a
 * special abbreviation test.  This is done in an init action that is 
 * processed at the beginning of this rule. In this way, the rest of the rule
 * only sees the 2nd token as a data token type and never tries to
 * call the <code>reserved_or_symbol</code> rule since calling that rule 
 * would actually try to match (and consume from the token stream) a
 * <code>SYMBOL</code> or other keyword token type.  <b>Specifying a rule
 * reference to obtain its value from a lookahead perspective but then
 * changing the token's type such that the rule reference never gets called, 
 * is the critical trick that enables context sensitive symbol names!</b>
 * <p>
 * This use of a pull rule is only necessary because Progress provides
 * additional special abbreviation support in this construct. This is a set
 * of reduced abbreviations (see table above) beyond the normal (documented
 * or undocumented) abbreviations of a data type keyword as is possible 
 * elsewhere in Progress source code.  The <code>reserved_or_symbol</code> 
 * is needed because some possible reserved keyword matches could occur 
 * that would match one of these special abbreviations and thus the
 * <code>symbol</code> rule would not be sufficient to pull all possible
 * valid keyword matches into this rule.
 * <p>
 * The init action reads the text of the 2nd token and switches the token
 * type to that of the matching data type keyword, if any special
 * abbreviation is found.  All such processing is bypassed if the lexer
 * has already matched a valid data type keyword.
 * <p>
 * The logic of the special abbreviation processing is centralized in the
 * specialDataTypeKeywordAbbreviations() method.
 * <p>
 * Note that this rule does support the addition of scoped shared and global
 * shared variables.  No special steps are necessary to enable this due to
 * a quirk in how Progress handles such variables, they can only be defined
 * in the top-level context (not inside a procedure or function which is the
 * only block in which there is a different scoping level).  For this reason,
 * whenever shared variables are added to the dictionary, they can be added
 * to the current scope, since this is the same as the global scope in any
 * valid Progress code.
 *
 * @param    varName
 *           Text which is the variable name that should be added to the
 *           current scope of the variable dictionary.  If <code>null</code>,
 *           no name will be added and this clause is essentially ignored.
 * @param    nativeTypes
 *           <code>true</code> to support extra type keywords for native
 *           shared library interfaces.
 */
	public final void var_type(
		 String varName, boolean nativeTypes 
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast var_type_AST = null;
		Token  cl = null;
		Aast cl_AST = null;
		Aast nam_AST = null;
		
		try {      // for error handling
			
			int vartype = -1;
			specialDataTypeKeywordAbbreviations(1);
			
			{
			if ((LA(1)==KW_CHAR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1221_AST = null;
				tmp1221_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1221_AST);
				match(KW_CHAR);
				vartype = VAR_CHAR;
			}
			else if ((LA(1)==KW_COM_HNDL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1222_AST = null;
				tmp1222_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1222_AST);
				match(KW_COM_HNDL);
				vartype = VAR_COM_HANDLE;
			}
			else if ((LA(1)==KW_DATE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1223_AST = null;
				tmp1223_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1223_AST);
				match(KW_DATE);
				vartype = VAR_DATE;
			}
			else if ((LA(1)==KW_DATETIME) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1224_AST = null;
				tmp1224_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1224_AST);
				match(KW_DATETIME);
				vartype = VAR_DATETIME;
			}
			else if ((LA(1)==KW_DATE_TZ) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1225_AST = null;
				tmp1225_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1225_AST);
				match(KW_DATE_TZ);
				vartype = VAR_DATETIME_TZ;
			}
			else if ((LA(1)==KW_DEC) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1226_AST = null;
				tmp1226_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1226_AST);
				match(KW_DEC);
				vartype = VAR_DEC;
			}
			else if ((LA(1)==KW_HANDLE||LA(1)==KW_WID_HAND) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				switch ( LA(1)) {
				case KW_HANDLE:
				{
					Aast tmp1227_AST = null;
					tmp1227_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1227_AST);
					match(KW_HANDLE);
					break;
				}
				case KW_WID_HAND:
				{
					Aast tmp1228_AST = null;
					tmp1228_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1228_AST);
					match(KW_WID_HAND);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				vartype = VAR_HANDLE;
			}
			else if ((LA(1)==KW_INT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1229_AST = null;
				tmp1229_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1229_AST);
				match(KW_INT);
				vartype = VAR_INT;
			}
			else if ((LA(1)==KW_INT64) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1230_AST = null;
				tmp1230_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1230_AST);
				match(KW_INT64);
				vartype = VAR_INT64;
			}
			else if ((LA(1)==KW_LOGICAL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1231_AST = null;
				tmp1231_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1231_AST);
				match(KW_LOGICAL);
				vartype = VAR_LOGICAL;
			}
			else if ((LA(1)==KW_LONGCHAR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1232_AST = null;
				tmp1232_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1232_AST);
				match(KW_LONGCHAR);
				vartype = VAR_LONGCHAR;
			}
			else if ((LA(1)==KW_RECID) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1233_AST = null;
				tmp1233_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1233_AST);
				match(KW_RECID);
				vartype = VAR_RECID;
			}
			else if ((LA(1)==KW_ROWID) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1234_AST = null;
				tmp1234_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1234_AST);
				match(KW_ROWID);
				vartype = VAR_ROWID;
			}
			else if ((LA(1)==KW_RAW) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1235_AST = null;
				tmp1235_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1235_AST);
				match(KW_RAW);
				vartype = VAR_RAW;
			}
			else if ((LA(1)==KW_MEMPTR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1236_AST = null;
				tmp1236_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1236_AST);
				match(KW_MEMPTR);
				vartype = VAR_MEMPTR;
			}
			else if ((LA(1)==KW_POLY) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1237_AST = null;
				tmp1237_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1237_AST);
				match(KW_POLY);
				vartype = VAR_POLY;
			}
			else if (((_tokenSet_209.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( nativeTypes )) {
				{
				switch ( LA(1)) {
				case KW_BYTE:
				{
					Aast tmp1238_AST = null;
					tmp1238_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1238_AST);
					match(KW_BYTE);
					vartype = VAR_BYTE;
					break;
				}
				case KW_DOUBLE:
				{
					Aast tmp1239_AST = null;
					tmp1239_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1239_AST);
					match(KW_DOUBLE);
					vartype = VAR_DOUBLE;
					break;
				}
				case KW_FLOAT:
				{
					Aast tmp1240_AST = null;
					tmp1240_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1240_AST);
					match(KW_FLOAT);
					vartype = VAR_FLOAT;
					break;
				}
				case KW_LONG:
				{
					Aast tmp1241_AST = null;
					tmp1241_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1241_AST);
					match(KW_LONG);
					vartype = VAR_LONG;
					break;
				}
				case KW_SHORT:
				{
					Aast tmp1242_AST = null;
					tmp1242_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1242_AST);
					match(KW_SHORT);
					vartype = VAR_SHORT;
					break;
				}
				case KW_UNS_LONG:
				{
					Aast tmp1243_AST = null;
					tmp1243_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1243_AST);
					match(KW_UNS_LONG);
					vartype = VAR_ULONG;
					break;
				}
				case KW_UNS_SHRT:
				{
					Aast tmp1244_AST = null;
					tmp1244_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1244_AST);
					match(KW_UNS_SHRT);
					vartype = VAR_USHORT;
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				if ((LA(1)==KW_CLASS) && (_tokenSet_0.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					cl = LT(1);
					cl_AST = (Aast)astFactory.create(cl);
					match(KW_CLASS);
					hide(cl);
				}
				else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				user_defined_type_name();
				nam_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				vartype = VAR_CLASS;
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			if (varName != null)
			{
			String cls = (nam_AST == null) ? null : (String) nam_AST.getAnnotation("qualified");
			
			// here is where we enable the variable lookup for all subsequent
			// code in this scope, note that Progress only seems to ever have
			// 2 levels of scope: the external proc and any internal proc/
			// trigger defs, since you can only define shared or global shared
			// vars in the external proc scope, we should *not* need to
			// explicitly add vars to the global scope since adding to the
			// current scope should be equivalent
			Variable var = sym.addLocalVariable(varName, vartype, cls);
			
			if (nam_AST != null && nam_AST.isAnnotation("dotnet-array"))
			{
			var.setDotNetArray(true);
			}
			if (nam_AST != null && nam_AST.isAnnotation("generic-type-parameter"))
			{
			var.setGenericType((String) nam_AST.getAnnotation("generic-type-parameter"));
			}
			if (nam_AST != null && nam_AST.isAnnotation("generic-type-is-primitive"))
			{
			var.setGenericPrimitive((boolean) nam_AST.getAnnotation("generic-type-is-primitive"));
			}
			}
			
			var_type_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = var_type_AST;
	}
	
/**   
 * Matches <code>VALIDATE</code> or <code>USE-INDEX</code> keywords and (in
 * the second case) the following index name plus optional
 * <code>AS PRIMARY</code> construct. Used by the {@link #like_clause} on
 * behalf of the {@link #def_temp_table_stmt} rule.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * Separated to properly build the AST.
 *
 * @param    table
 *           The temp-table object that is being modified.
 */
	public final void temp_table_use_index(
		Object table
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast temp_table_use_index_AST = null;
		Aast u_AST = null;
		Token  as = null;
		Aast as_AST = null;
		
		try {      // for error handling
			
			boolean primary = false; 
			
			use_index_clause();
			u_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_AS) && (LA(2)==KW_PRIMARY) && (_tokenSet_3.member(LA(3)))) {
				as = LT(1);
				as_AST = (Aast)astFactory.create(as);
				match(KW_AS);
				hide(as);
				Aast tmp1245_AST = null;
				tmp1245_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1245_AST);
				match(KW_PRIMARY);
				primary = true;
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			Aast child = (Aast) u_AST.getFirstChild();
			sym.addIndexFrom(table, u_AST, child.getText(), primary);
			
			temp_table_use_index_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = temp_table_use_index_AST;
	}
	
/**   
 * Matches the <code>IMAGE-SIZE, IMAGE-SIZE-CHARS and IMAGE-SIZE-PIXELS</code>
 * keywords and the required following width and height.  Used by
 * {@link #image_phrase} and the subtree is rooted by the keyword (which is
 * the reason for using a separate rule for something so simple).
 */
	public final void image_size_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast image_size_clause_AST = null;
		Token  by = null;
		Aast by_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_IMG_SZ:
			{
				Aast tmp1246_AST = null;
				tmp1246_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1246_AST);
				match(KW_IMG_SZ);
				break;
			}
			case KW_IMG_SZ_C:
			{
				Aast tmp1247_AST = null;
				tmp1247_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1247_AST);
				match(KW_IMG_SZ_C);
				break;
			}
			case KW_IMG_SZ_P:
			{
				Aast tmp1248_AST = null;
				tmp1248_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1248_AST);
				match(KW_IMG_SZ_P);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			numeric_literal();
			astFactory.addASTChild(currentAST, returnAST);
			by = LT(1);
			by_AST = (Aast)astFactory.create(by);
			match(KW_BY);
			hide(by);
			numeric_literal();
			astFactory.addASTChild(currentAST, returnAST);
			image_size_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = image_size_clause_AST;
	}
	
/**   
 * Matches the <code>FROM</code> keyword and the required following 
 * coordinates (x y or col row).  Used by the {@link #image_phrase} rule and
 * the subtree is rooted by the keyword (which is the reason for using a
 * separate rule for something so simple).
 */
	public final void from_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast from_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1249_AST = null;
			tmp1249_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1249_AST);
			match(KW_FROM);
			location_spec();
			astFactory.addASTChild(currentAST, returnAST);
			location_spec();
			astFactory.addASTChild(currentAST, returnAST);
			from_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = from_clause_AST;
	}
	
/**
 * This rule implements the column/row/x/y coordinate processing for the
 * <code>AT phrase</code> ({@link #at_phrase}).
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void location_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast location_spec_AST = null;
		Token  c = null;
		Aast c_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_COLUMNS:
			case KW_COL:
			case KW_ROW:
			case KW_X:
			case KW_Y:
			{
				{
				switch ( LA(1)) {
				case KW_COL:
				{
					Aast tmp1250_AST = null;
					tmp1250_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1250_AST);
					match(KW_COL);
					break;
				}
				case KW_COLUMNS:
				{
					c = LT(1);
					c_AST = (Aast)astFactory.create(c);
					astFactory.makeASTRoot(currentAST, c_AST);
					match(KW_COLUMNS);
					c_AST.setType(KW_COL);
					break;
				}
				case KW_ROW:
				{
					Aast tmp1251_AST = null;
					tmp1251_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1251_AST);
					match(KW_ROW);
					break;
				}
				case KW_X:
				{
					Aast tmp1252_AST = null;
					tmp1252_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1252_AST);
					match(KW_X);
					break;
				}
				case KW_Y:
				{
					Aast tmp1253_AST = null;
					tmp1253_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1253_AST);
					match(KW_Y);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				numeric_literal();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_COL_OF:
			case KW_ROW_OF:
			case KW_X_OF:
			case KW_Y_OF:
			{
				{
				switch ( LA(1)) {
				case KW_COL_OF:
				{
					Aast tmp1254_AST = null;
					tmp1254_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1254_AST);
					match(KW_COL_OF);
					break;
				}
				case KW_ROW_OF:
				{
					Aast tmp1255_AST = null;
					tmp1255_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1255_AST);
					match(KW_ROW_OF);
					break;
				}
				case KW_X_OF:
				{
					Aast tmp1256_AST = null;
					tmp1256_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1256_AST);
					match(KW_X_OF);
					break;
				}
				case KW_Y_OF:
				{
					Aast tmp1257_AST = null;
					tmp1257_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1257_AST);
					match(KW_Y_OF);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				ref_point();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			location_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = location_spec_AST;
	}
	
/**
 * Implements the the <code>UNDO</code> action and the optional following
 * label references. This is done to improve the tree build.  This is only
 * called by {@link #on_event_phrase}.
 * <p>
 * Of particular interest is that this rule implements references to labels
 * (see {@link #label_reference}) and to a common form of <code>return</code>
 * keyword processing (see {@link #return_core} which is also accessed from
 * the <code>RETURN</code> statement rule {@link #return_stmt}).
 * <p>
 * Note that the use of expressions in the calling rules creates ambiguity
 * with the use of the label_reference. This rule is unambiguous in practice.
 * For this reason, ambiguity warnings have been disabled.
 */
	public final void undo_basic() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast undo_basic_AST = null;
		
		try {      // for error handling
			Aast tmp1258_AST = null;
			tmp1258_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1258_AST);
			match(KW_UNDO);
			label_reference();
			astFactory.addASTChild(currentAST, returnAST);
			undo_basic_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_101);
		}
		returnAST = undo_basic_AST;
	}
	
/**   
 * Implements the shared core logic for <code>UNDO</code> (see 
 * {@link #undo_stmt}) and the {@link #on_event_phrase}.
 */
	public final void undo_core() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast undo_core_AST = null;
		
		try {      // for error handling
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_LEAVE:
			case KW_NEXT:
			case KW_RETRY:
			{
				other_on_event_actions();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_RETURN:
			{
				return_core();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			undo_core_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = undo_core_AST;
	}
	
/**
 * Matches the <code>KW_THROW</code> with a following {@link #expr} which
 * will be a child node.  Used by the {@link #undo_stmt}.
 */
	public final void throw_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast throw_clause_AST = null;
		
		try {      // for error handling
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			Aast tmp1259_AST = null;
			tmp1259_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1259_AST);
			match(KW_THROW);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			throw_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = throw_clause_AST;
	}
	
/**
 * Implements the other event actions and the optional following label
 * references. This is done to improve the tree build.
 * <p>
 * Of particular interest is that this rule implements references to labels
 * (see {@link #label_reference}) and to a common form of <code>return</code>
 * keyword processing (see {@link #return_core} which is also accessed from
 * the <code>RETURN</code> statement rule {@link #return_stmt}).
 * <p>
 * Note that the use of expressions in the calling rules creates ambiguity
 * with the use of the label_reference. This rule is unambiguous in practice.
 * For this reason, ambiguity warnings have been disabled.
 */
	public final void other_on_event_actions() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast other_on_event_actions_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_LEAVE:
			{
				Aast tmp1260_AST = null;
				tmp1260_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1260_AST);
				match(KW_LEAVE);
				break;
			}
			case KW_NEXT:
			{
				Aast tmp1261_AST = null;
				tmp1261_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1261_AST);
				match(KW_NEXT);
				break;
			}
			case KW_RETRY:
			{
				Aast tmp1262_AST = null;
				tmp1262_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1262_AST);
				match(KW_RETRY);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			label_reference();
			astFactory.addASTChild(currentAST, returnAST);
			other_on_event_actions_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = other_on_event_actions_AST;
	}
	
/**
 * Matches the Progress <code>RETURN</code> keyword and builds the
 * resulting AST.  This is used in multiple locations including the
 * {@link #return_stmt} and the {@link #on_event_phrase}.
 */
	public final void return_core() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast return_core_AST = null;
		
		try {      // for error handling
			Aast tmp1263_AST = null;
			tmp1263_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1263_AST);
			match(KW_RETURN);
			{
			if ((LA(1)==KW_ERROR) && (_tokenSet_147.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1264_AST = null;
				tmp1264_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1264_AST);
				match(KW_ERROR);
			}
			else if ((LA(1)==KW_NO_APPLY) && (_tokenSet_147.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1265_AST = null;
				tmp1265_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1265_AST);
				match(KW_NO_APPLY);
			}
			else if ((_tokenSet_147.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( !isValidBlockHeaderOrQueryKeyword(false) )) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_144.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			return_core_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_144);
		}
		returnAST = return_core_AST;
	}
	
/**   
 * Matches the <code>CACHE-SIZE</code> keyword and the required following
 * integer literal.
 * <p>
 * Used by {@link #query_tuning_phrase} and the subtree is rooted by the
 * keyword (which is the reason for using a separate rule for something so
 * simple).
 */
	public final void query_tuning_cache_size() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast query_tuning_cache_size_AST = null;
		
		try {      // for error handling
			Aast tmp1266_AST = null;
			tmp1266_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1266_AST);
			match(KW_CACHE_SZ);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_BYTE:
			{
				Aast tmp1267_AST = null;
				tmp1267_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1267_AST);
				match(KW_BYTE);
				break;
			}
			case KW_ROW:
			{
				Aast tmp1268_AST = null;
				tmp1268_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1268_AST);
				match(KW_ROW);
				break;
			}
			case KW_ARR_MSG:
			case KW_BIND_WH:
			case KW_CACHE_SZ:
			case KW_DEBUG:
			case KW_HINT:
			case KW_IDX_HINT:
			case KW_JOIN_BY:
			case KW_LOOKAHD:
			case KW_NO_ARMSG:
			case KW_NO_BIND:
			case KW_NO_DEBUG:
			case KW_NO_IDX_H:
			case KW_NO_JOIN:
			case KW_NO_LOOKA:
			case KW_NO_SEP_C:
			case KW_ORD_JOIN:
			case KW_REV_FROM:
			case KW_SEP_CONN:
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			query_tuning_cache_size_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_146);
		}
		returnAST = query_tuning_cache_size_AST;
	}
	
/**   
 * Matches the <code>DEBUG</code> keyword and the optional following
 * qualifier keyword (<code>SQL or EXTENDED</code>).
 * <p>
 * Used by {@link #query_tuning_phrase} and the subtree is rooted by the
 * keyword (which is the reason for using a separate rule for something so
 * simple).
 */
	public final void query_tuning_debug() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast query_tuning_debug_AST = null;
		
		try {      // for error handling
			Aast tmp1269_AST = null;
			tmp1269_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1269_AST);
			match(KW_DEBUG);
			{
			switch ( LA(1)) {
			case KW_SQL:
			{
				Aast tmp1270_AST = null;
				tmp1270_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1270_AST);
				match(KW_SQL);
				break;
			}
			case KW_EXTENDED:
			{
				extended_diag_option();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_ARR_MSG:
			case KW_BIND_WH:
			case KW_CACHE_SZ:
			case KW_DEBUG:
			case KW_HINT:
			case KW_IDX_HINT:
			case KW_JOIN_BY:
			case KW_LOOKAHD:
			case KW_NO_ARMSG:
			case KW_NO_BIND:
			case KW_NO_DEBUG:
			case KW_NO_IDX_H:
			case KW_NO_JOIN:
			case KW_NO_LOOKA:
			case KW_NO_SEP_C:
			case KW_ORD_JOIN:
			case KW_REV_FROM:
			case KW_SEP_CONN:
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			query_tuning_debug_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_146);
		}
		returnAST = query_tuning_debug_AST;
	}
	
/**   
 * Matches the <code>HINT "hint_text"</code> syntax used in the {@link #query_tuning_phrase}. The result
 * will be rooted at KW_HINT and there will be a STRING child.  The string is not documented but was found
 * in customer code.
 */
	public final void query_tuning_hint() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast query_tuning_hint_AST = null;
		
		try {      // for error handling
			Aast tmp1271_AST = null;
			tmp1271_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1271_AST);
			match(KW_HINT);
			Aast tmp1272_AST = null;
			tmp1272_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp1272_AST);
			match(STRING);
			query_tuning_hint_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_146);
		}
		returnAST = query_tuning_hint_AST;
	}
	
/**   
 * Matches the <code>EXTENDED</code> keyword and the optional following
 * qualifier keywords <code>CURSOR, DATA-BIND, PERFORMANCE or VERBOSE</code>.
 * <p>
 * Used by {@link #query_tuning_debug} and the subtree is rooted by the
 * keyword <code>KW_EXTENDED</code> (which is the reason for using a separate
 * rule for something so simple).
 */
	public final void extended_diag_option() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast extended_diag_option_AST = null;
		
		try {      // for error handling
			Aast tmp1273_AST = null;
			tmp1273_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1273_AST);
			match(KW_EXTENDED);
			{
			switch ( LA(1)) {
			case KW_CURSOR:
			{
				Aast tmp1274_AST = null;
				tmp1274_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1274_AST);
				match(KW_CURSOR);
				break;
			}
			case KW_DATA_BND:
			{
				Aast tmp1275_AST = null;
				tmp1275_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1275_AST);
				match(KW_DATA_BND);
				break;
			}
			case KW_PERF:
			{
				Aast tmp1276_AST = null;
				tmp1276_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1276_AST);
				match(KW_PERF);
				break;
			}
			case KW_VERBOSE:
			{
				Aast tmp1277_AST = null;
				tmp1277_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1277_AST);
				match(KW_VERBOSE);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			extended_diag_option_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_146);
		}
		returnAST = extended_diag_option_AST;
	}
	
/**   
 * Matches the <code>OUTER-JOIN</code> keyword and the optional prefix keyword
 * <code>LEFT</code> which are used to specify an outer join or left outer
 * join.  The <code>LEFT</code> token (if it exists) is made a child of 
 * <code>OUTER-JOIN</code>.
 * <p>
 * Used by {@link #record_phrase} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 */
	public final void join_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast join_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_LEFT:
			{
				Aast tmp1278_AST = null;
				tmp1278_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1278_AST);
				match(KW_LEFT);
				break;
			}
			case KW_OUT_JOIN:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			Aast tmp1279_AST = null;
			tmp1279_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1279_AST);
			match(KW_OUT_JOIN);
			join_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_148);
		}
		returnAST = join_clause_AST;
	}
	
/**   
 * Matches the <code>OF</code> keyword and the required following record
 * which is used to specify the table to join on.
 * <p>
 * Used by {@link #record_phrase} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 */
	public final void of_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast of_clause_AST = null;
		
		try {      // for error handling
			
			// if more than one record phrase, can't use
			sym.endIndexFieldSearch();
			
			NameNode nothing = null;
			
			Aast tmp1280_AST = null;
			tmp1280_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1280_AST);
			match(KW_OF);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			of_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_148);
		}
		returnAST = of_clause_AST;
	}
	
/**   
 * Matches the <code>USE-INDEX</code> keyword and the required following
 * index.  The index is matched as a valid user-defined symbol using the
 * {@link #symbol} rule, however the result's token type is rewritten to be
 * <code>INDEX</code>.
 * <p>
 * Used by {@link #record_phrase} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 */
	public final void use_index_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast use_index_clause_AST = null;
		Aast s_AST = null;
		
		try {      // for error handling
			Aast tmp1281_AST = null;
			tmp1281_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1281_AST);
			match(KW_USE_IDX);
			any_non_reserved_symbol();
			s_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			s_AST.setType(INDEX);
			use_index_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = use_index_clause_AST;
	}
	
/**   
 * Matches the <code>USING</code> keyword and the required following list
 * of {@link #lvalue} (fields) and optional matching frames.
 * <p>
 * Each field can be optionally prefaced with the <code>INPUT</code> keyword
 * which seems to have no effect (it is silently dropped). This is an
 * undocumented feature of Progress. This parser drops this keyword if it
 * is found.
 * <p>
 * Used by {@link #record_phrase} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 */
	public final void using_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast using_clause_AST = null;
		Token  in = null;
		Aast in_AST = null;
		Token  an = null;
		Aast an_AST = null;
		Token  in2 = null;
		Aast in2_AST = null;
		
		try {      // for error handling
			Aast tmp1282_AST = null;
			tmp1282_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1282_AST);
			match(KW_USING);
			{
			if ((LA(1)==KW_INPUT)) {
				in = LT(1);
				in_AST = (Aast)astFactory.create(in);
				match(KW_INPUT);
				hide(in);
			}
			else if ((_tokenSet_64.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_FRAME) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
				frame_reference(false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1479:
			do {
				if ((LA(1)==KW_AND) && (_tokenSet_150.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					an = LT(1);
					an_AST = (Aast)astFactory.create(an);
					match(KW_AND);
					hide(an);
					{
					if ((LA(1)==KW_INPUT)) {
						in2 = LT(1);
						in2_AST = (Aast)astFactory.create(in2);
						match(KW_INPUT);
						hide(in2);
					}
					else if ((_tokenSet_64.member(LA(1)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					{
					if ((LA(1)==KW_FRAME) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
						frame_reference(false);
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					lvalue();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1479;
				}
				
			} while (true);
			}
			using_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_148);
		}
		returnAST = using_clause_AST;
	}
	
/**
 * Matches a database name token that can be a string, a character expression
 * that is evaluated via the <code>VALUE( expr )</code> construct, or it
 * can be a symbol that represents a physical filename or a logical database
 * name.  These last two options are differentiated by a boolean passed from
 * the caller.  Used by {@link #connect_stmt}, {@link #create_alias_stmt}
 * and {@link #delete_alias_stmt} rules.
 *
 * @param    physical
 *           If true, the name could be a physical filename, otherwise it is
 *           a logical database name.
 */
	public final void database_name(
		boolean physical
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast database_name_AST = null;
		Aast s_AST = null;
		
		try {      // for error handling
			
			// DOT and EOF are hard coded in the worker routine
			int[] exclude = new int[]
			{
			LPARENS,
			RPARENS
			};
			
			{
			if ((LA(1)==STRING) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1283_AST = null;
				tmp1283_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1283_AST);
				match(STRING);
			}
			else if ((LA(1)==KW_VALUE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				value();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				filename(exclude);
				s_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				if (!physical)
				{
				// convert unquoted database name to a quoted string
				saveAndReplaceTypeAndText(s_AST, STRING, "\"" + s_AST.getText() + "\"");
				}
				
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			database_name_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_28);
		}
		returnAST = database_name_AST;
	}
	
/**
 * Matches any token except <code>NO-ERROR or DOT</code>.  In the
 * {@link #connect_stmt}, database connect options are provided which can
 * conform to any arbitrary syntax.  The options end with either of the
 * above tokens.
 * <p>
 * This rule is nasty because it has to match a list of any kind of token.
 * This is inherently ambiguous, and made worse by the loop.  ANTLR  
 * detects ambiguity but the semantic predicate does resolve it.  As such
 * warnings have been disabled.
 */
	public final void connect_options() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast connect_options_AST = null;
		Aast v_AST = null;
		Token  t = null;
		Aast t_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(CONNECT_OPTIONS,"options"));
			
			// DOT and EOF are hard coded in the worker routine
			int[] exclude = new int[]
			{
			KW_VALUE,
			KW_NO_ERROR
			};
			
			mergeUntilWS(exclude);
			
			{
			_loop1459:
			do {
				if ((LA(1)==KW_VALUE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
					value();
					v_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					mergeUntilWS(exclude);
				}
				else if ((((LA(1) >= DOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( (LA(1) != KW_NO_ERROR && LA(1) != DOT) )) {
					t = LT(1);
					t_AST = (Aast)astFactory.create(t);
					astFactory.addASTChild(currentAST, t_AST);
					matchNot(EOF);
					
					mergeUntilWS(exclude);
					t_AST.setType(CONNECT_TEXT);
					
				}
				else {
					break _loop1459;
				}
				
			} while (true);
			}
			connect_options_AST = (Aast)currentAST.root;
			if (connect_options_AST.getNumberOfChildren() == 0) connect_options_AST = null;
			currentAST.root = connect_options_AST;
			currentAST.child = connect_options_AST!=null &&connect_options_AST.getFirstChild()!=null ?
				connect_options_AST.getFirstChild() : connect_options_AST;
			currentAST.advanceChildToEnd();
			connect_options_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_200);
		}
		returnAST = connect_options_AST;
	}
	
/**
 * Matches a <code>CURRENT or COMPLETE</code> keywords and the following
 * {@link #database_name} or {@link #value} rule references. 
 * <p>
 * Used by {@link #save_cache_stmt}.
 */
	public final void current_or_complete_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast current_or_complete_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_CURRENT:
			{
				Aast tmp1284_AST = null;
				tmp1284_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1284_AST);
				match(KW_CURRENT);
				break;
			}
			case KW_COMPLETE:
			{
				Aast tmp1285_AST = null;
				tmp1285_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1285_AST);
				match(KW_COMPLETE);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			database_name(false);
			astFactory.addASTChild(currentAST, returnAST);
			current_or_complete_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_188);
		}
		returnAST = current_or_complete_clause_AST;
	}
	
/**   
 * Matches a <code>FOR or PRESELECT</code> keyword and the following required
 * {@link #each_first_last_spec} of the {@link #open_query_stmt}.
 * <p>
 * This is only separated to simplify the AST build.
 */
	public final void for_or_preselect_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast for_or_preselect_clause_AST = null;
		Token  f = null;
		Aast f_AST = null;
		Token  p = null;
		Aast p_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_FOR:
			{
				f = LT(1);
				f_AST = (Aast)astFactory.create(f);
				astFactory.makeASTRoot(currentAST, f_AST);
				match(KW_FOR);
				break;
			}
			case KW_PRESEL:
			{
				p = LT(1);
				p_AST = (Aast)astFactory.create(p);
				astFactory.makeASTRoot(currentAST, p_AST);
				match(KW_PRESEL);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			each_first_last_spec(false, false);
			astFactory.addASTChild(currentAST, returnAST);
			for_or_preselect_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_210);
		}
		returnAST = for_or_preselect_clause_AST;
	}
	
/**   
 * Matches a <code>MAX-ROWS</code> keyword and the following numeric expression of the
 * {@link #open_query_stmt}.  The Progress documentation is silent on whether the following
 * expression is required to be a constant.  Customer code has shown that this is a full
 * expression.
 * <p>
 * This is only separated to simplify the AST build.
 */
	public final void max_rows_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast max_rows_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1286_AST = null;
			tmp1286_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1286_AST);
			match(KW_MAX_ROWS);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			max_rows_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_210);
		}
		returnAST = max_rows_clause_AST;
	}
	
/**   
 * Matches the <code>TO RECID, TO ROWID or TO ROW</code> keywords and the
 * following required expression of type <code>RECID, ROWID</code> or integer
 * (in the case of a <code>TO ROW</code>).  Calls {@link #expr}.
 * <p>
 * Used in the {@link #reposition_stmt}.
 * <p>
 * This is only separated to simplify the AST build.
 */
	public final void to_recid_or_rowid_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast to_recid_or_rowid_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1287_AST = null;
			tmp1287_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1287_AST);
			match(KW_TO);
			{
			switch ( LA(1)) {
			case KW_RECID:
			{
				Aast tmp1288_AST = null;
				tmp1288_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1288_AST);
				match(KW_RECID);
				break;
			}
			case KW_ROWID:
			{
				Aast tmp1289_AST = null;
				tmp1289_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1289_AST);
				match(KW_ROWID);
				break;
			}
			case KW_ROW:
			{
				Aast tmp1290_AST = null;
				tmp1290_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1290_AST);
				match(KW_ROW);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1223:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1223;
				}
				
			} while (true);
			}
			to_recid_or_rowid_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_200);
		}
		returnAST = to_recid_or_rowid_clause_AST;
	}
	
/**   
 * Matches a <code>FORWARDS or BACKWARDS</code> keyword and the
 * following required {@link #expr}.  Used in the {@link #reposition_stmt}.
 * <p>
 * This is only separated to simplify the AST build.
 */
	public final void reposition_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast reposition_spec_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_FORWARD:
			{
				Aast tmp1291_AST = null;
				tmp1291_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1291_AST);
				match(KW_FORWARD);
				break;
			}
			case KW_BACKWARD:
			{
				Aast tmp1292_AST = null;
				tmp1292_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1292_AST);
				match(KW_BACKWARD);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			reposition_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_200);
		}
		returnAST = reposition_spec_AST;
	}
	
/**   
 * Matches a <code>FROM</code> keyword and the following {@link #expr}
 * of the {@link #create_database_stmt}.
 * <p>
 * This is only separated to simplify the AST build.
 */
	public final void from_database_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast from_database_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1293_AST = null;
			tmp1293_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1293_AST);
			match(KW_FROM);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_NEW_INST:
			{
				Aast tmp1294_AST = null;
				tmp1294_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1294_AST);
				match(KW_NEW_INST);
				break;
			}
			case DOT:
			case KW_NO_ERROR:
			case KW_REPLACE:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			from_database_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_211);
		}
		returnAST = from_database_clause_AST;
	}
	
/**   
 * This is a convenience method that matches {@link #chained_object_members} except a validating
 * semantic predicate is used to throw an exception if the data type of the variable or field is
 * not <code>HANDLE</code>.  The most common case is a simple <code>lvalue</code> usage, but it
 * is possible to match a handle attribute ot qualified object member.
 * <p>
 * It is an open question as to whether this rule should also have references to
 * <code>FUNC_HANDLE</code> or <code>METH_HANDLE</code>.  Generally the answer would be NO if
 * the caller would need to assign to this handle and YES if the caller would just use the
 * handle.  Most references to this rule are in create/delete rules where this rule is safe. The 
 * {@link #from_handle_clause} does seem to use this differently. These two types are
 * provisionally supported for now until they can be checked in real code.
 * <p>
 * To test for <code>ATTR_HANDLE</code>, <code>ATTR_COM_HANDLE</code>, <code>METH_HANDLE</code>
 * and <code>METH_COM_HANDLE</code>, a simple check for a <code>COLON</code> operator or
 * <code>OBJECT_INVOCATION</code> is done. This test should probably be made more thorough.
 * <p>
 * Used in {@link #create_query_stmt} and in other locations.
 */
	public final void handle() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast handle_AST = null;
		Aast h_AST = null;
		
		try {      // for error handling
			chained_object_members();
			h_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			if (!(
         h_AST.getType() == VAR_HANDLE        ||
         h_AST.getType() == FIELD_HANDLE      ||
         h_AST.getType() == FUNC_HANDLE       ||
         h_AST.getType() == COLON             ||
         h_AST.getType() == OBJECT_INVOCATION ||
         h_AST.getType() == OO_METH_HANDLE    ||
         h_AST.getType() == SYS_HANDLE        ||
         h_AST.getType() == VAR_COM_HANDLE    ||
         h_AST.getType() == FIELD_COM_HANDLE  ||
         h_AST.getType() == FUNC_COM_HANDLE   ||
         h_AST.getType() == OO_METH_COM_HANDLE
      ))
			  throw new SemanticException("\n         h_AST.getType() == VAR_HANDLE        ||\n         h_AST.getType() == FIELD_HANDLE      ||\n         h_AST.getType() == FUNC_HANDLE       ||\n         h_AST.getType() == COLON             ||\n         h_AST.getType() == OBJECT_INVOCATION ||\n         h_AST.getType() == OO_METH_HANDLE    ||\n         h_AST.getType() == SYS_HANDLE        ||\n         h_AST.getType() == VAR_COM_HANDLE    ||\n         h_AST.getType() == FIELD_COM_HANDLE  ||\n         h_AST.getType() == FUNC_COM_HANDLE   ||\n         h_AST.getType() == OO_METH_COM_HANDLE\n      ");
			handle_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_147);
		}
		returnAST = handle_AST;
	}
	
/**   
 * Matches the <code>IN WIDGET-POOL</code> keywords and the required following
 * pool name as a character expression (see {@link #expr}). 
 * <p>
 * Used by {@link #create_query_stmt}, {@link #create_temp_table_stmt},
 * {@link #create_buffer_stmt}, {@link #create_widget_or_object_stmt} and
 * {@link #create_browse_stmt}.
 * <p>
 * This is a separate rule to centralize logic and build the AST properly.
 */
	public final void in_widget_pool_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast in_widget_pool_clause_AST = null;
		Token  i = null;
		Aast i_AST = null;
		Token  wp = null;
		Aast wp_AST = null;
		
		try {      // for error handling
			i = LT(1);
			i_AST = (Aast)astFactory.create(i);
			astFactory.makeASTRoot(currentAST, i_AST);
			match(KW_IN);
			i_AST.setType(IN_WIDGET_POOL);
			wp = LT(1);
			wp_AST = (Aast)astFactory.create(wp);
			match(KW_WID_POOL);
			hide(wp);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			in_widget_pool_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_212);
		}
		returnAST = in_widget_pool_clause_AST;
	}
	
/**   
 * Matches a <code>FOR TABLE</code> construct and the following {@link #expr}
 * of the {@link #create_buffer_stmt}.
 * <p>
 * This is only separated to simplify the AST build.
 */
	public final void for_table_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast for_table_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1295_AST = null;
			tmp1295_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1295_AST);
			match(KW_FOR);
			Aast tmp1296_AST = null;
			tmp1296_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp1296_AST);
			match(KW_TABLE);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			for_table_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_213);
		}
		returnAST = for_table_clause_AST;
	}
	
/**   
 * Matches a <code>BUFFER-NAME</code> keyword and the following {@link #expr}
 * of the {@link #create_buffer_stmt}.
 * <p>
 * This is only separated to simplify the AST build.
 */
	public final void buffer_name_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast buffer_name_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1297_AST = null;
			tmp1297_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1297_AST);
			match(KW_BUF_NAME);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			buffer_name_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_213);
		}
		returnAST = buffer_name_clause_AST;
	}
	
/**
 * Matches the <code>EXCEPT or USING</code> keywords and the required list
 * of following {@link #lvalue}.
 * <p>
 * Used by {@link #buffer_compare_or_copy_stmt}.
 */
	public final void buffer_modification_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast buffer_modification_list_AST = null;
		Aast l_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_EXCEPT:
			{
				Aast tmp1298_AST = null;
				tmp1298_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1298_AST);
				match(KW_EXCEPT);
				break;
			}
			case KW_USING:
			{
				Aast tmp1299_AST = null;
				tmp1299_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1299_AST);
				match(KW_USING);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop1260:
			do {
				if ((_tokenSet_64.member(LA(1)))) {
					
					boolean savePreferFields = preferFields;
					preferFields = true;
					
					lvalue();
					l_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					
					preferFields = false;
					
					if (l_AST.getType() < BEGIN_FIELDTYPES || l_AST.getType() > END_FIELDTYPES)
					{
					LOG.log(Level.SEVERE, "'" + l_AST.getText() + "' is not a field at " + 
					l_AST.getLine() + ":" + l_AST.getColumn());
					}
					
				}
				else {
					break _loop1260;
				}
				
			} while (true);
			}
			buffer_modification_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_188);
		}
		returnAST = buffer_modification_list_AST;
	}
	
/**
 * Matches the <code>TO</code> keyword and the following {@link #record}.
 * <p>
 * Used by {@link #buffer_compare_or_copy_stmt}.
 */
	public final void to_target() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast to_target_AST = null;
		
		try {      // for error handling
			
			NameNode nothing = null;
			
			Aast tmp1300_AST = null;
			tmp1300_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1300_AST);
			match(KW_TO);
			nothing=record(true, false, false);
			astFactory.addASTChild(currentAST, returnAST);
			to_target_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_214);
		}
		returnAST = to_target_AST;
	}
	
/**
 * Matches the <code>SAVE</code> keyword (and optional <code>RESULT IN</code>)
 * and the following {@link #lvalue}.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * Used by {@link #buffer_compare_or_copy_stmt} (only for the compare form).
 */
	public final void save_result_in() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast save_result_in_AST = null;
		
		try {      // for error handling
			Aast tmp1301_AST = null;
			tmp1301_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1301_AST);
			match(KW_SAVE);
			{
			if ((LA(1)==KW_RESULT) && (LA(2)==KW_IN) && (_tokenSet_64.member(LA(3)))) {
				Aast tmp1302_AST = null;
				tmp1302_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1302_AST);
				match(KW_RESULT);
				Aast tmp1303_AST = null;
				tmp1303_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1303_AST);
				match(KW_IN);
			}
			else if ((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			save_result_in_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_214);
		}
		returnAST = save_result_in_AST;
	}
	
/**
 * Matches the <code>COMPARES</code> keyword (and optional 
 * <code>EXPLICIT</code> prefix), an optional <code>NO-ERROR</code> and
 * the {@link #compares_when_block}.
 * <p>
 * Used by {@link #buffer_compare_or_copy_stmt} (only for the compare form).
 */
	public final void explicit_compares() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast explicit_compares_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_COMPARES:
			case KW_EXPLICIT:
			{
				{
				switch ( LA(1)) {
				case KW_EXPLICIT:
				{
					Aast tmp1304_AST = null;
					tmp1304_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1304_AST);
					match(KW_EXPLICIT);
					break;
				}
				case KW_COMPARES:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				Aast tmp1305_AST = null;
				tmp1305_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1305_AST);
				match(KW_COMPARES);
				break;
			}
			case KW_NO_ERROR:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_NO_ERROR:
			{
				Aast tmp1306_AST = null;
				tmp1306_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1306_AST);
				match(KW_NO_ERROR);
				break;
			}
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			compares_when_block();
			astFactory.addASTChild(currentAST, returnAST);
			explicit_compares_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_214);
		}
		returnAST = explicit_compares_AST;
	}
	
/**
 * Matches the <code>ASSIGN</code> keyword and a list of space delimited
 * assignment expressions.  This is similar to but more simplified version
 * of {@link #assign_stmt}.
 * <p>
 * Used by {@link #buffer_compare_or_copy_stmt} only in the copy form.
 * <p>
 * Bogus ANTLR ambiguity warnings are disabled.
 */
	public final void sub_assign_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast sub_assign_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1307_AST = null;
			tmp1307_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1307_AST);
			match(KW_ASSIGN);
			{
			int _cnt1274=0;
			_loop1274:
			do {
				if (((_tokenSet_85.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_NO_ERROR && LA(1) != KW_NO_LOBS )) {
					assign();
					astFactory.addASTChild(currentAST, returnAST);
					{
					if ((LA(1)==KW_WHEN) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
						simple_when_clause();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_144.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
				}
				else {
					if ( _cnt1274>=1 ) { break _loop1274; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt1274++;
			} while (true);
			}
			sub_assign_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_214);
		}
		returnAST = sub_assign_clause_AST;
	}
	
/**
 * Matches the <code>COLON</code> token followed by one or more 
 * {@link #when_clause} constructs and terminated by an <code>END</code>
 * keyword.
 * <p>
 * Used by {@link #explicit_compares}.
 */
	public final void compares_when_block() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast compares_when_block_AST = null;
		Token  en = null;
		Aast en_AST = null;
		Token  co = null;
		Aast co_AST = null;
		
		try {      // for error handling
			Aast tmp1308_AST = null;
			tmp1308_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1308_AST);
			match(COLON);
			{
			_loop1270:
			do {
				if ((LA(1)==KW_WHEN)) {
					when_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1270;
				}
				
			} while (true);
			}
			en = LT(1);
			en_AST = (Aast)astFactory.create(en);
			match(KW_END);
			hide(en);
			co = LT(1);
			co_AST = (Aast)astFactory.create(co);
			match(KW_COMPARES);
			hide(co);
			compares_when_block_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_214);
		}
		returnAST = compares_when_block_AST;
	}
	
/**
 * Matches the <code>CONNECT</code> option for the {@link #create_widget_or_object_stmt}
 * with than optional <code>TO expression</code>.
 */
	public final void com_connect_option() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast com_connect_option_AST = null;
		Token  to = null;
		Aast to_AST = null;
		
		try {      // for error handling
			Aast tmp1309_AST = null;
			tmp1309_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1309_AST);
			match(KW_CONN);
			{
			switch ( LA(1)) {
			case KW_TO:
			{
				to = LT(1);
				to_AST = (Aast)astFactory.create(to);
				match(KW_TO);
				hide(to);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_ASSIGN:
			case KW_IN:
			case KW_NO_ERROR:
			case KW_TRIGGERS:
			case COLON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			com_connect_option_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_117);
		}
		returnAST = com_connect_option_AST;
	}
	
/**
 * Matches the <code>ASSIGN</code> keyword and a list of space delimited
 * <code>ATTRIBUTE</code> assignment expressions.  This is similar to but
 * a more simplified version of {@link #assign_stmt}.  Please note that
 * this is a special form for use in the {@link #create_widget_or_object_stmt} AND
 * that the use of the {@link #attribute_assign} rule for the core logic
 * especially since that use is in a loop) MUST be protected with a
 * semantic predicate to ensure that the rule reference doesn't consume
 * a possible following <code>TRIGGERS</code> keyword (since the leftmost
 * token of the called rule can include ANY reserved or other symbol.
 * <p>
 * Also used in the {@link #create_browse_stmt} and {@link #create_server_stmt}.
 * <p>
 * Bogus ANTLR ambiguity warnings are disabled.
 */
	public final void attribute_assign_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast attribute_assign_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1310_AST = null;
			tmp1310_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1310_AST);
			match(KW_ASSIGN);
			{
			int _cnt1291=0;
			_loop1291:
			do {
				if (((_tokenSet_90.member(LA(1))) && (LA(2)==EQUALS||LA(2)==LBRACKET||LA(2)==LPARENS) && (_tokenSet_215.member(LA(3))))&&( LA(1) != KW_TRIGGERS )) {
					attribute_assign();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					if ( _cnt1291>=1 ) { break _loop1291; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt1291++;
			} while (true);
			}
			attribute_assign_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_216);
		}
		returnAST = attribute_assign_clause_AST;
	}
	
/**   
 * Matches an {@link #attribute_or_method}, an <code>EQUALS</code> token (the 
 * equals sign) and a following {@link #expr}. The token type of the 
 * <code>EQUALS</code> is changed to <code>ASSIGN</code> and the entire
 * construct is rooted on that token.  The token type of the first child
 * of the <code>ASSIGN</code> node must be an attribute, though this is not
 * enforced.
 * <p>
 * Any use of this rule especially if that use is in a loop) MUST be
 * protected with a semantic predicate to ensure that the rule reference 
 * doesn't consume possible following keywords (since the leftmost
 * token of the called rule can include ANY reserved or other symbol.
 * <p>
 * Used by {@link #attribute_assign_clause}.
 */
	public final void attribute_assign() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast attribute_assign_AST = null;
		Token  eq = null;
		Aast eq_AST = null;
		
		try {      // for error handling
			attribute_or_method();
			astFactory.addASTChild(currentAST, returnAST);
			eq = LT(1);
			eq_AST = (Aast)astFactory.create(eq);
			astFactory.makeASTRoot(currentAST, eq_AST);
			match(EQUALS);
			eq_AST.setType(ASSIGN);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			attribute_assign_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_217);
		}
		returnAST = attribute_assign_AST;
	}
	
/**
 * This rule provides generic method and attribute support in a centralized
 * manner.  This is used from {@link #lvalue}.  The result of this rule
 * is either an <code>ATTR_*</code> node or a <code>METH_*</code> node
 * with method parameters (usually an {@link #expr}) as immediate children.
 * <p>
 * All method references are resolved to a value between the range of
 * <code>BEGIN_METH</code> and <code>END_METH</code> types and all attribute
 * references are resolved to a value between the range of 
 * <code>BEGIN_ATTR</code> and <code>END_ATTR</code> types.  A namespace of
 * the method and attribute names and associated types is used to resolve   
 * these values.  <b>This namespace is partial at this time and thus it only
 * represents a small portion of all possible methods and attributes.</b>
 * <p>
 * List of possible resulting token types:
 * <p>
 * <pre>
 *   ATTR_CHAR
 *   ATTR_CLASS
 *   ATTR_COM_HANDLE
 *   ATTR_DATE
 *   ATTR_DATETIME
 *   ATTR_DATETIME_TZ
 *   ATTR_DEC
 *   ATTR_HANDLE
 *   ATTR_INT
 *   ATTR_INT64
 *   ATTR_LOGICAL
 *   ATTR_LONGCHAR
 *   ATTR_MEMPTR
 *   ATTR_RAW
 *   ATTR_RECID
 *   ATTR_ROWID
 *   ATTR_POLY
 *   END_ATTR
 *   BEGIN_METH
 *   METH_CHAR
 *   METH_CLASS
 *   METH_COM_HANDLE
 *   METH_DATE
 *   METH_DATETIME
 *   METH_DATETIME_TZ
 *   METH_DEC
 *   METH_HANDLE
 *   METH_INT
 *   METH_INT64
 *   METH_LOGICAL
 *   METH_LONGCHAR
 *   METH_MEMPTR
 *   METH_RAW
 *   METH_RECID
 *   METH_ROWID
 *   METH_POLY
 *   METH_VOID
 * </pre>
 * <p>
 * This rule uses a {@link #reserved_or_symbol} to create a "pull" for all
 * possible attribute or method names.  In the init action, the 2nd token
 * is inspected to determine if it is an <code>LPARENS</code> or
 * <code>LBRACKET</code> (yes, this is an undocumented "feature").  In either
 * of these cases, this is determined to be a method.  The optional method
 * parameters are then parsed.
 * <p>
 * Please note that this use of reserved keywords is required since
 * attributes and methods can use reserved names.
 * <p>
 * Some parameters are keywords (e.g. <code>NO-LOCK</code>) rather than
 * valid expressions. For this reason, the {@link #reserved_or_symbol} rule
 * is the last-ditch alternative for a parameter.
 * <p>
 * WARNING: starting in Progress v10.x attributes and methods can be chained
 * using the <code>COLON</code> operator. This means that this rule will
 * recursively call itself to implement such support. 
 */
	public final void attribute_or_method() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast attribute_or_method_AST = null;
		Token  lb = null;
		Aast lb_AST = null;
		Token  rb = null;
		Aast rb_AST = null;
		
		try {      // for error handling
			
			int     oldtype  = -1;
			int     current  = LA(1);
			boolean oldpref = preferWidgets;
			
			// temporarily disable widget preference so the expression will
			// parse without widget refs
			if (oldpref)
			{
			preferWidgets = false;
			}
			
			if (current < BEGIN_ATTR_METH || current > END_ATTR_METH)
			{
			// fixup for stupid/unnecessary Progress ambiguity
			if (current == KW_WIDTH)
			{
			current = KW_WIDTH_C;
			}
			
			// do a lookup, it better find something!
			int newtype = sym.lookupAttributeOrMethod(current);
			
			// save off old type
			oldtype = current;
			
			// undocumented keyword synonym
			if (oldtype == KW_COLUMNS)
			{
			oldtype = KW_COL;
			}
			
			// handle a fixup due to ambiguity in Progress (it is also an               
			// ATTR_HANDLE and that is how it is returned from the lookup)
			if (current == KW_BUF_FLD)
			{
			if (LA(2) == LPARENS || LA(2) == LBRACKET)
			{
			newtype = METH_HANDLE;
			}
			}
			
			// safety first
			if ( newtype != -1 )
			{
			// set the type
			LT(1).setType( newtype );
			}
			else
			{
			// unknown method or attribute!
			throw new NoViableAltException(LT(1), getFilename());
			}
			}
			
			boolean possibleLparens = true;
			if (LA(1) > BEGIN_ATTR && LA(1) < END_ATTR)
			{
			// this must include all possible attributes which can receive an argument 
			// (like BUFFER-VALUE)
			possibleLparens = oldtype == KW_BUF_VAL  || // buffer-value
			oldtype == KW_DATA_SRI || // data-source-rowid
			oldtype == KW_GET_B_A  || // get-bytes-available
			oldtype == KW_GET_SRCB || // get-source-buffer
			oldtype == KW_IDX_INFO || // index-information
			oldtype == KW_IS_P_SET || // is-parameter-set
			oldtype == KW_KEYS     || // keys
			oldtype == KW_NEXT_RID || // next-rowid
			oldtype == KW_REST_RID || // restart-rowid
			oldtype == KW_SAVE_WST || // save-where-string
			oldtype == KW_STR_VAL  || // string-value
			oldtype == KW_TOP_NAVQ    // top-nav-query
			;
			}
			
			{
			{
			switch ( LA(1)) {
			case ATTR_CHAR:
			{
				Aast tmp1311_AST = null;
				tmp1311_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1311_AST);
				match(ATTR_CHAR);
				break;
			}
			case ATTR_CLASS:
			{
				Aast tmp1312_AST = null;
				tmp1312_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1312_AST);
				match(ATTR_CLASS);
				break;
			}
			case ATTR_COM_HANDLE:
			{
				Aast tmp1313_AST = null;
				tmp1313_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1313_AST);
				match(ATTR_COM_HANDLE);
				break;
			}
			case ATTR_DATE:
			{
				Aast tmp1314_AST = null;
				tmp1314_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1314_AST);
				match(ATTR_DATE);
				break;
			}
			case ATTR_DATETIME:
			{
				Aast tmp1315_AST = null;
				tmp1315_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1315_AST);
				match(ATTR_DATETIME);
				break;
			}
			case ATTR_DATETIME_TZ:
			{
				Aast tmp1316_AST = null;
				tmp1316_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1316_AST);
				match(ATTR_DATETIME_TZ);
				break;
			}
			case ATTR_DEC:
			{
				Aast tmp1317_AST = null;
				tmp1317_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1317_AST);
				match(ATTR_DEC);
				break;
			}
			case ATTR_HANDLE:
			{
				Aast tmp1318_AST = null;
				tmp1318_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1318_AST);
				match(ATTR_HANDLE);
				break;
			}
			case ATTR_INT:
			{
				Aast tmp1319_AST = null;
				tmp1319_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1319_AST);
				match(ATTR_INT);
				break;
			}
			case ATTR_INT64:
			{
				Aast tmp1320_AST = null;
				tmp1320_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1320_AST);
				match(ATTR_INT64);
				break;
			}
			case ATTR_LOGICAL:
			{
				Aast tmp1321_AST = null;
				tmp1321_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1321_AST);
				match(ATTR_LOGICAL);
				break;
			}
			case ATTR_LONGCHAR:
			{
				Aast tmp1322_AST = null;
				tmp1322_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1322_AST);
				match(ATTR_LONGCHAR);
				break;
			}
			case ATTR_MEMPTR:
			{
				Aast tmp1323_AST = null;
				tmp1323_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1323_AST);
				match(ATTR_MEMPTR);
				break;
			}
			case ATTR_RAW:
			{
				Aast tmp1324_AST = null;
				tmp1324_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1324_AST);
				match(ATTR_RAW);
				break;
			}
			case ATTR_RECID:
			{
				Aast tmp1325_AST = null;
				tmp1325_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1325_AST);
				match(ATTR_RECID);
				break;
			}
			case ATTR_ROWID:
			{
				Aast tmp1326_AST = null;
				tmp1326_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1326_AST);
				match(ATTR_ROWID);
				break;
			}
			case ATTR_POLY:
			{
				Aast tmp1327_AST = null;
				tmp1327_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1327_AST);
				match(ATTR_POLY);
				break;
			}
			case METH_CHAR:
			{
				Aast tmp1328_AST = null;
				tmp1328_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1328_AST);
				match(METH_CHAR);
				break;
			}
			case METH_CLASS:
			{
				Aast tmp1329_AST = null;
				tmp1329_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1329_AST);
				match(METH_CLASS);
				break;
			}
			case METH_COM_HANDLE:
			{
				Aast tmp1330_AST = null;
				tmp1330_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1330_AST);
				match(METH_COM_HANDLE);
				break;
			}
			case METH_DATE:
			{
				Aast tmp1331_AST = null;
				tmp1331_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1331_AST);
				match(METH_DATE);
				break;
			}
			case METH_DATETIME:
			{
				Aast tmp1332_AST = null;
				tmp1332_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1332_AST);
				match(METH_DATETIME);
				break;
			}
			case METH_DATETIME_TZ:
			{
				Aast tmp1333_AST = null;
				tmp1333_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1333_AST);
				match(METH_DATETIME_TZ);
				break;
			}
			case METH_DEC:
			{
				Aast tmp1334_AST = null;
				tmp1334_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1334_AST);
				match(METH_DEC);
				break;
			}
			case METH_HANDLE:
			{
				Aast tmp1335_AST = null;
				tmp1335_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1335_AST);
				match(METH_HANDLE);
				break;
			}
			case METH_INT:
			{
				Aast tmp1336_AST = null;
				tmp1336_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1336_AST);
				match(METH_INT);
				break;
			}
			case METH_INT64:
			{
				Aast tmp1337_AST = null;
				tmp1337_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1337_AST);
				match(METH_INT64);
				break;
			}
			case METH_LOGICAL:
			{
				Aast tmp1338_AST = null;
				tmp1338_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1338_AST);
				match(METH_LOGICAL);
				break;
			}
			case METH_LONGCHAR:
			{
				Aast tmp1339_AST = null;
				tmp1339_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1339_AST);
				match(METH_LONGCHAR);
				break;
			}
			case METH_MEMPTR:
			{
				Aast tmp1340_AST = null;
				tmp1340_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1340_AST);
				match(METH_MEMPTR);
				break;
			}
			case METH_RAW:
			{
				Aast tmp1341_AST = null;
				tmp1341_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1341_AST);
				match(METH_RAW);
				break;
			}
			case METH_RECID:
			{
				Aast tmp1342_AST = null;
				tmp1342_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1342_AST);
				match(METH_RECID);
				break;
			}
			case METH_ROWID:
			{
				Aast tmp1343_AST = null;
				tmp1343_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1343_AST);
				match(METH_ROWID);
				break;
			}
			case METH_POLY:
			{
				Aast tmp1344_AST = null;
				tmp1344_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1344_AST);
				match(METH_POLY);
				break;
			}
			case METH_VOID:
			{
				Aast tmp1345_AST = null;
				tmp1345_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1345_AST);
				match(METH_VOID);
				break;
			}
			default:
				if ((_tokenSet_27.member(LA(1)))) {
					reserved_or_symbol();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if (((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( possibleLparens )) {
				{
				if ((LA(1)==LBRACKET||LA(1)==LPARENS) && (_tokenSet_215.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case LPARENS:
					{
						lparens();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case LBRACKET:
					{
						lb = LT(1);
						lb_AST = (Aast)astFactory.create(lb);
						match(LBRACKET);
						hide(lb);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					{
					if ((_tokenSet_24.member(LA(1)))) {
						{
						if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
							expr();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if ((_tokenSet_27.member(LA(1))) && (LA(2)==RBRACKET||LA(2)==COMMA||LA(2)==RPARENS) && (_tokenSet_3.member(LA(3)))) {
							reserved_or_symbol();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						
						}
						{
						_loop1739:
						do {
							if ((LA(1)==COMMA)) {
								comma();
								astFactory.addASTChild(currentAST, returnAST);
								{
								if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
									expr();
									astFactory.addASTChild(currentAST, returnAST);
								}
								else if ((_tokenSet_27.member(LA(1))) && (LA(2)==RBRACKET||LA(2)==COMMA||LA(2)==RPARENS) && (_tokenSet_3.member(LA(3)))) {
									reserved_or_symbol();
									astFactory.addASTChild(currentAST, returnAST);
								}
								else {
									throw new NoViableAltException(LT(1), getFilename());
								}
								
								}
							}
							else {
								break _loop1739;
							}
							
						} while (true);
						}
					}
					else if ((LA(1)==RBRACKET||LA(1)==RPARENS)) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
					{
					switch ( LA(1)) {
					case RPARENS:
					{
						rparens();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case RBRACKET:
					{
						rb = LT(1);
						rb_AST = (Aast)astFactory.create(rb);
						match(RBRACKET);
						hide(rb);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			attribute_or_method_AST = (Aast)currentAST.root;
			
			// reset back to state at entrance to this method
			if (oldpref)
			{
			preferWidgets = true;
			}
			
			int ttype = attribute_or_method_AST.getType();
			
			// store the fully qualified class name for atts/meths that return
			// an object reference
			if (ttype == ATTR_CLASS || ttype == METH_CLASS)
			{
			String cls = sym.lookupAttributeOrMethodClass(current);
			
			if (cls == null)
			{
			String err = String.format("Missing class name for %s!",
			attribute_or_method_AST.getDescriptiveTokenText());
			throw genExc(err, attribute_or_method_AST);
			}
			
			sym.annotateClassRef(cls, attribute_or_method_AST);
			}
			
			// save off original type from before token rewriting
			if (oldtype != -1)
			attribute_or_method_AST.putAnnotation("oldtype", Long.valueOf(oldtype));
			
			attribute_or_method_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = attribute_or_method_AST;
	}
	
/**   
 * This is a convenience method that matches {@link #lvalue} except a
 * validating semantic predicate is used to throw an exception if the
 * data type of the variable or field is not a <code>COM-HANDLE</code>.
 * <p>
 * It is an open question as to whether this rule should also have references
 * to <code>FUNC_COM_HANDLE</code>.  Generally the answer would
 * be NO if the caller would need to assign to this handle and YES if the
 * caller would just use the handle.  Right now, references to this rule are
 * in create/release rules where this rule is safe.
 * <p>
 * Used in {@link #create_widget_or_object_stmt} and {@link #release_object_stmt}.
 */
	public final void com_handle() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast com_handle_AST = null;
		Aast h_AST = null;
		
		try {      // for error handling
			lvalue();
			h_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			if (!(
         h_AST.getType() == VAR_COM_HANDLE   ||
         h_AST.getType() == FIELD_COM_HANDLE ||
         (h_AST.getType() == SYS_HANDLE          &&
          h_AST.getAnnotation("oldtype") != null &&
          ((Long) h_AST.getAnnotation("oldtype")).intValue() == KW_COM_SELF)
      ))
			  throw new SemanticException("\n         h_AST.getType() == VAR_COM_HANDLE   ||\n         h_AST.getType() == FIELD_COM_HANDLE ||\n         (h_AST.getType() == SYS_HANDLE          &&\n          h_AST.getAnnotation(\"oldtype\") != null &&\n          ((Long) h_AST.getAnnotation(\"oldtype\")).intValue() == KW_COM_SELF)\n      ");
			com_handle_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = com_handle_AST;
	}
	
/**
 * Matches <code>ITEM</code> clause followed by an {@link #expr}. Used by
 * {@link #dde_advise_stmt}, {@link #dde_get_stmt}, {@link #dde_request_stmt}
 * and {@link #dde_send_stmt}.
 */
	public final void item_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast item_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1346_AST = null;
			tmp1346_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1346_AST);
			match(KW_ITEM);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			item_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_218);
		}
		returnAST = item_clause_AST;
	}
	
/**
 * Matches <code>TIME</code> clause followed by an {@link #expr}. Used by
 * {@link #dde_advise_stmt}, {@link #dde_execute_stmt}, {@link #dde_get_stmt},
 * {@link #dde_request_stmt} and {@link #dde_send_stmt}.
 */
	public final void time_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast time_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1347_AST = null;
			tmp1347_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1347_AST);
			match(KW_TIME);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			time_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_200);
		}
		returnAST = time_clause_AST;
	}
	
/**
 * Matches <code>COMMAND</code> clause followed by an {@link #expr}. Used by
 * {@link #dde_execute_stmt}.
 */
	public final void command_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast command_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1348_AST = null;
			tmp1348_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1348_AST);
			match(KW_COMMAND);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			command_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_218);
		}
		returnAST = command_clause_AST;
	}
	
/**
 * Matches <code>FRAME</code> clause followed by a {@link #handle}.
 * Used by {@link #dde_initiate_stmt}.
 */
	public final void frame_handle_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast frame_handle_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1349_AST = null;
			tmp1349_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1349_AST);
			match(KW_FRAME);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			frame_handle_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_219);
		}
		returnAST = frame_handle_clause_AST;
	}
	
/**
 * Matches <code>APPLICATION</code> clause followed by an {@link #expr}.
 * Used by {@link #dde_initiate_stmt}.
 */
	public final void application_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast application_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1350_AST = null;
			tmp1350_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1350_AST);
			match(KW_APPL);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			application_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_220);
		}
		returnAST = application_clause_AST;
	}
	
/**
 * Matches <code>TOPIC</code> clause followed by an {@link #expr}.
 * Used by {@link #dde_initiate_stmt}.
 */
	public final void topic_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast topic_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1351_AST = null;
			tmp1351_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1351_AST);
			match(KW_TOPIC);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			topic_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_200);
		}
		returnAST = topic_clause_AST;
	}
	
/**
 * Matches <code>UPDATE</code> clause followed by an {@link #lvalue}.
 * Used by {@link #system_dialog_color_stmt}, 
 * {@link #system_dialog_font_stmt}, {@link #system_dialog_get_file_stmt} and
 * {@link #system_dialog_printer_setup_stmt}.
 */
	public final void update_logical_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast update_logical_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1352_AST = null;
			tmp1352_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1352_AST);
			match(KW_UPDATE);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			update_logical_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_221);
		}
		returnAST = update_logical_clause_AST;
	}
	
/**   
 * Matches the <code>IN WINDOW</code> clause followed by a {@link #handle}.
 * Used by {@link #system_dialog_color_stmt}, 
 * {@link #system_dialog_font_stmt}, {@link #system_dialog_get_file_stmt} and
 * {@link #system_dialog_printer_setup_stmt}.
 */
	public final void in_window_handle_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast in_window_handle_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1353_AST = null;
			tmp1353_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1353_AST);
			match(KW_IN);
			Aast tmp1354_AST = null;
			tmp1354_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp1354_AST);
			match(KW_WINDOW);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			in_window_handle_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_221);
		}
		returnAST = in_window_handle_clause_AST;
	}
	
/**   
 * Matches the <code>MAX-SIZE or MIN-SIZE</code> clause followed by an
 * {@link #expr}.  Used by {@link #system_dialog_font_stmt}.
 */
	public final void min_max_size_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast min_max_size_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_MAX_SZ:
			{
				Aast tmp1355_AST = null;
				tmp1355_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1355_AST);
				match(KW_MAX_SZ);
				break;
			}
			case KW_MIN_SZ:
			{
				Aast tmp1356_AST = null;
				tmp1356_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1356_AST);
				match(KW_MIN_SZ);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			min_max_size_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_222);
		}
		returnAST = min_max_size_clause_AST;
	}
	
/**   
 * Matches the <code>INITIAL-DIR</code> clause followed by an {@link #expr}. 
 * Used by {@link #system_dialog_get_file_stmt}.
 */
	public final void initial_dir_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast initial_dir_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1357_AST = null;
			tmp1357_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1357_AST);
			match(KW_INIT_DIR);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			initial_dir_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_223);
		}
		returnAST = initial_dir_clause_AST;
	}
	
/**   
 * Matches the <code>TITLE</code> clause followed by an {@link #expr}.  Used
 * by {@link #system_dialog_get_file_stmt}.
 */
	public final void title_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast title_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1358_AST = null;
			tmp1358_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1358_AST);
			match(KW_TITLE);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			title_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_224);
		}
		returnAST = title_clause_AST;
	}
	
/**   
 * Matches the <code>DEFAULT-EXTENSION</code> clause followed by an 
 * {@link #expr}. Used by {@link #system_dialog_get_file_stmt}.
 */
	public final void default_extension_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast default_extension_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1359_AST = null;
			tmp1359_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1359_AST);
			match(KW_DEF_EXTN);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			default_extension_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_223);
		}
		returnAST = default_extension_clause_AST;
	}
	
/**   
 * Matches the <code>FILTERS</code> clause followed by a list of pairs of
 * character expressions matched by {@link #filter_spec}. Optionally uses
 * {@link #initial_filter_num}. Used by {@link #system_dialog_get_file_stmt}.
 */
	public final void filters_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast filters_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1360_AST = null;
			tmp1360_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1360_AST);
			match(KW_FILTERS);
			filter_spec();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1360:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					filter_spec();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1360;
				}
				
			} while (true);
			}
			{
			switch ( LA(1)) {
			case KW_INIT_FLT:
			{
				initial_filter_num();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_TITLE:
			case KW_UPDATE:
			case KW_ASK_OVER:
			case KW_CREAT_TF:
			case KW_DEF_EXTN:
			case KW_FILTERS:
			case KW_INIT_DIR:
			case KW_MULTIPLE:
			case KW_MUST_EXI:
			case KW_RET_2SD:
			case KW_SAVE_AS:
			case KW_USE_FIL:
			case KW_AT_W_BRW:
			case KW_UPLOAD:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			filters_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_225);
		}
		returnAST = filters_clause_AST;
	}
	
/**
 * Matches AT-WEB-BROWSER option.
 */
	public final void at_web_browser_option() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast at_web_browser_option_AST = null;
		
		try {      // for error handling
			Aast tmp1361_AST = null;
			tmp1361_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1361_AST);
			match(KW_AT_W_BRW);
			{
			switch ( LA(1)) {
			case KW_UPLOAD:
			{
				at_web_browser_upload();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_TITLE:
			case KW_UPDATE:
			case KW_ASK_OVER:
			case KW_CREAT_TF:
			case KW_DEF_EXTN:
			case KW_FILTERS:
			case KW_INIT_DIR:
			case KW_MULTIPLE:
			case KW_MUST_EXI:
			case KW_RET_2SD:
			case KW_SAVE_AS:
			case KW_USE_FIL:
			case KW_AT_W_BRW:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			at_web_browser_option_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_223);
		}
		returnAST = at_web_browser_option_AST;
	}
	
/**
 * Matches UPLOAD DIR option.
 */
	public final void at_web_browser_upload() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast at_web_browser_upload_AST = null;
		
		try {      // for error handling
			Aast tmp1362_AST = null;
			tmp1362_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1362_AST);
			match(KW_UPLOAD);
			{
			switch ( LA(1)) {
			case KW_DIR:
			{
				match(KW_DIR);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_TITLE:
			case KW_UPDATE:
			case KW_ASK_OVER:
			case KW_CREAT_TF:
			case KW_DEF_EXTN:
			case KW_FILTERS:
			case KW_INIT_DIR:
			case KW_MULTIPLE:
			case KW_MUST_EXI:
			case KW_RET_2SD:
			case KW_SAVE_AS:
			case KW_USE_FIL:
			case KW_AT_W_BRW:
			case KW_UPLOAD:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			at_web_browser_upload_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_225);
		}
		returnAST = at_web_browser_upload_AST;
	}
	
/**   
 * Matches the <code>NUM-COPIES</code> clause followed by an {@link #expr}.
 * Used by {@link #system_dialog_printer_setup_stmt}.
 */
	public final void num_copies_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast num_copies_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1364_AST = null;
			tmp1364_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1364_AST);
			match(KW_NUM_COPY);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			num_copies_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_226);
		}
		returnAST = num_copies_clause_AST;
	}
	
/**
 * Matches a pair of {@link #expr} and roots both of them at a node of type
 * <code>FILTER_SPEC</code>. Used by {@link #filters_clause}. 
 */
	public final void filter_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast filter_spec_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(FILTER_SPEC,""));
			
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			filter_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_227);
		}
		returnAST = filter_spec_AST;
	}
	
/**
 * Matches <code>INITIAL-FILTER</code> clause followed by an {@link #expr}.
 * Used by {@link #filters_clause}. 
 */
	public final void initial_filter_num() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast initial_filter_num_AST = null;
		
		try {      // for error handling
			Aast tmp1365_AST = null;
			tmp1365_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1365_AST);
			match(KW_INIT_FLT);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			initial_filter_num_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_225);
		}
		returnAST = initial_filter_num_AST;
	}
	
/**
 * Matches <code>WINDOW-NAME</code> clause followed by an {@link #expr}.
 * Used by {@link #system_help_stmt}.
 */
	public final void window_name_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast window_name_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1366_AST = null;
			tmp1366_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1366_AST);
			match(KW_WIN_NAME);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			window_name_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_228);
		}
		returnAST = window_name_clause_AST;
	}
	
/**
 * Matches all the various commands that can be passed to the {@link #system_help_stmt}. Uses
 * {@link #expr}, {@link #position_clause_arg_x}, {@link #position_clause_arg_y},
 * {@link #position_clause_arg_width} and {@link #position_clause_arg_height}.
 */
	public final void help_command_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast help_command_clause_AST = null;
		
		try {      // for error handling
			switch ( LA(1)) {
			case KW_CONTENTS:
			{
				Aast tmp1367_AST = null;
				tmp1367_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1367_AST);
				match(KW_CONTENTS);
				help_command_clause_AST = (Aast)currentAST.root;
				break;
			}
			case KW_FINDER:
			{
				Aast tmp1368_AST = null;
				tmp1368_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1368_AST);
				match(KW_FINDER);
				help_command_clause_AST = (Aast)currentAST.root;
				break;
			}
			case KW_FORCE_F:
			{
				Aast tmp1369_AST = null;
				tmp1369_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1369_AST);
				match(KW_FORCE_F);
				help_command_clause_AST = (Aast)currentAST.root;
				break;
			}
			case KW_HELP:
			{
				Aast tmp1370_AST = null;
				tmp1370_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1370_AST);
				match(KW_HELP);
				help_command_clause_AST = (Aast)currentAST.root;
				break;
			}
			case KW_QUIT:
			{
				Aast tmp1371_AST = null;
				tmp1371_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1371_AST);
				match(KW_QUIT);
				help_command_clause_AST = (Aast)currentAST.root;
				break;
			}
			case KW_ALT_KEY:
			case KW_COMMAND:
			case KW_CTX:
			case KW_CTX_POP:
			case KW_HELP_TOP:
			case KW_KEY:
			case KW_PART_KEY:
			case KW_SET_CONT:
			{
				{
				switch ( LA(1)) {
				case KW_CTX:
				{
					Aast tmp1372_AST = null;
					tmp1372_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1372_AST);
					match(KW_CTX);
					break;
				}
				case KW_SET_CONT:
				{
					Aast tmp1373_AST = null;
					tmp1373_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1373_AST);
					match(KW_SET_CONT);
					break;
				}
				case KW_CTX_POP:
				{
					Aast tmp1374_AST = null;
					tmp1374_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1374_AST);
					match(KW_CTX_POP);
					break;
				}
				case KW_KEY:
				{
					Aast tmp1375_AST = null;
					tmp1375_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1375_AST);
					match(KW_KEY);
					break;
				}
				case KW_PART_KEY:
				{
					Aast tmp1376_AST = null;
					tmp1376_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1376_AST);
					match(KW_PART_KEY);
					break;
				}
				case KW_COMMAND:
				{
					Aast tmp1377_AST = null;
					tmp1377_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1377_AST);
					match(KW_COMMAND);
					break;
				}
				case KW_HELP_TOP:
				{
					Aast tmp1378_AST = null;
					tmp1378_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1378_AST);
					match(KW_HELP_TOP);
					break;
				}
				case KW_ALT_KEY:
				{
					Aast tmp1379_AST = null;
					tmp1379_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1379_AST);
					match(KW_ALT_KEY);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				help_command_clause_AST = (Aast)currentAST.root;
				break;
			}
			case KW_MULT_KEY:
			{
				Aast tmp1380_AST = null;
				tmp1380_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1380_AST);
				match(KW_MULT_KEY);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				Aast tmp1381_AST = null;
				tmp1381_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1381_AST);
				match(KW_TEXT);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				help_command_clause_AST = (Aast)currentAST.root;
				break;
			}
			default:
				if ((LA(1)==KW_POS) && (LA(2)==KW_MAXIMIZE)) {
					Aast tmp1382_AST = null;
					tmp1382_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1382_AST);
					match(KW_POS);
					Aast tmp1383_AST = null;
					tmp1383_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1383_AST);
					match(KW_MAXIMIZE);
					help_command_clause_AST = (Aast)currentAST.root;
				}
				else if ((LA(1)==KW_POS) && (LA(2)==KW_X)) {
					Aast tmp1384_AST = null;
					tmp1384_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1384_AST);
					match(KW_POS);
					position_clause_arg_x();
					astFactory.addASTChild(currentAST, returnAST);
					position_clause_arg_y();
					astFactory.addASTChild(currentAST, returnAST);
					position_clause_arg_width();
					astFactory.addASTChild(currentAST, returnAST);
					position_clause_arg_height();
					astFactory.addASTChild(currentAST, returnAST);
					help_command_clause_AST = (Aast)currentAST.root;
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = help_command_clause_AST;
	}
	
/**
 * Matches {@code X} and a following {@link #expr}.  Used by {@link #help_command_clause}.
 */
	public final void position_clause_arg_x() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast position_clause_arg_x_AST = null;
		
		try {      // for error handling
			Aast tmp1385_AST = null;
			tmp1385_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1385_AST);
			match(KW_X);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			position_clause_arg_x_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_229);
		}
		returnAST = position_clause_arg_x_AST;
	}
	
/**
 * Matches {@code Y} and a following {@link #expr}.  Used by {@link #help_command_clause}.
 */
	public final void position_clause_arg_y() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast position_clause_arg_y_AST = null;
		
		try {      // for error handling
			Aast tmp1386_AST = null;
			tmp1386_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1386_AST);
			match(KW_Y);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			position_clause_arg_y_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_230);
		}
		returnAST = position_clause_arg_y_AST;
	}
	
/**
 * Matches {@code WIDTH} and a following {@link #expr}.  Used by {@link #help_command_clause}.
 */
	public final void position_clause_arg_width() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast position_clause_arg_width_AST = null;
		
		try {      // for error handling
			Aast tmp1387_AST = null;
			tmp1387_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1387_AST);
			match(KW_WIDTH);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			position_clause_arg_width_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_231);
		}
		returnAST = position_clause_arg_width_AST;
	}
	
/**
 * Matches {@code HEIGHT} and a following {@link #expr}.  Used by {@link #help_command_clause}.
 */
	public final void position_clause_arg_height() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast position_clause_arg_height_AST = null;
		
		try {      // for error handling
			Aast tmp1388_AST = null;
			tmp1388_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1388_AST);
			match(KW_HEIGHT_C);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			position_clause_arg_height_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_36);
		}
		returnAST = position_clause_arg_height_AST;
	}
	
/**
 * Matches the <code>BEFORE-TABLE</code> clause with the following {@link #symbol}. Used
 * from {@link #def_temp_table_stmt}.
 *
 * @return   The before-table name to define.
 */
	public final String  before_table_clause() throws RecognitionException, TokenStreamException {
		String tname = null;
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast before_table_clause_AST = null;
		Aast t_AST = null;
		
		try {      // for error handling
			Aast tmp1389_AST = null;
			tmp1389_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1389_AST);
			match(KW_B4_TABLE);
			symbol();
			t_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			tname = t_AST.getText();
			before_table_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = before_table_clause_AST;
		return tname;
	}
	
/**
 * Matches a field definition when creating a temp-table using the 
 * <code>DEFINE TEMP-TABLE or DEFINE WORK-TABLE</code> statements. Called
 * by {@link #def_temp_table_stmt} rules.
 * <p>
 * Calls {@link #symbol}, {@link #as_field_clause}, {@link #like_clause}
 * and {@link #temp_table_field_options}.  As an undocumented feature, the
 * <code>temp_table_field_options</code> can be matched before the
 * <code>AS</code> or <code>LIKE</code> clause. This was found in working
 * 4GL code and is supported.
 * <p>
 * This rule parses the field name, type and any options.  The table object
 * that the field is associated with is passed in as a parameter. This is
 * used with the name and type to add the field to the schema namespace.
 * <p>
 * <b>An artificial root node is created to contain all tokens under a single
 * root with type <code>DEFINE_FIELD</code>. This rule uses a trick to create
 * an artificial node as a root while still allowing ANTLR to do normal tree
 * building (no suppression of the AST build).</b> This is only useful in
 * cases where there is no valid token which can be used as a tree root AND
 * where a loop is being used such that the contents of the loop cannot be 
 * referenced in a manually built #([,],,,) ANTLR construct. ANTLR doesn't
 * support (as of 2.7.4) the ability to label a loop such that the entire
 * contents can be referenced. If one labels the individual elements inside
 * the loop, only the last one is available when the loop concludes. 
 * However, by leaving the normal tree creation unchanged but manually 
 * creating an artificial node and manually setting this node as the root
 * of the returned tree BEFORE the children are added, this problem can be
 * solved.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 *
 * @param    table
 *           The table object to associate this field with in the schema
 *           namespace.
 */
	public final void add_temp_table_field(
		Object table
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast add_temp_table_field_AST = null;
		Token  fi = null;
		Aast fi_AST = null;
		Aast f_AST = null;
		Aast a_AST = null;
		Aast l_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(DEFINE_FIELD,"define field"));
			
			String fname = null;
			int    ftype = -1;
			
			{
			if ((LA(1)==KW_FIELD)) {
				fi = LT(1);
				fi_AST = (Aast)astFactory.create(fi);
				match(KW_FIELD);
				hide(fi);
			}
			else if ((_tokenSet_15.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			symbol();
			f_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			fname = f_AST.getText();
			{
			if ((_tokenSet_232.member(LA(1))) && (_tokenSet_52.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				temp_table_field_options(fname, ftype);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_AS||LA(1)==KW_LIKE||LA(1)==KW_LIKE_SEQ) && (_tokenSet_81.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			switch ( LA(1)) {
			case KW_AS:
			{
				as_field_clause(fname, table);
				a_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				ftype = a_AST.getFirstChild().getType();
				
				break;
			}
			case KW_LIKE:
			case KW_LIKE_SEQ:
			{
				like_clause(fname, table, false);
				l_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				ftype = l_AST.getFirstChild().getType();
				
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				temp_table_field_options(fname, ftype);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			add_temp_table_field_AST = (Aast)currentAST.root;
			
			// this should be able to find the right field because the temp-tab
			// should be in the closest scope, thus the options will be forced
			// into the field just defined
			sym.setFieldOptions(fname, add_temp_table_field_AST);
			
			add_temp_table_field_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = add_temp_table_field_AST;
	}
	
/**
 * Matches an index definition of a <code>DEFINE TEMP-TABLE</code> language
 * statement.  Calls {@link #symbol}, {@link #is_clause} and
 * {@link #index_field_clause}.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * Used by {@link #def_temp_table_stmt}.
 *
 * @param    table
 *           The temp-table object that is being modified. 
 */
	public final void index_clause(
		Object table
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast index_clause_AST = null;
		Token  i = null;
		Aast i_AST = null;
		Aast s_AST = null;
		
		String idxName = null;
		Token  tok     = LT(2);
		
		
		try {      // for error handling
			i = LT(1);
			i_AST = (Aast)astFactory.create(i);
			astFactory.makeASTRoot(currentAST, i_AST);
			match(KW_INDEX);
			any_non_reserved_symbol();
			s_AST = (Aast)returnAST;
			
			// not sure why ANTLR treats this differently, but we were not able to use a label
			// here, we had to cache the token above instead; not sure why but we actually do
			// also need to have a label there
			idxName = tok.getText();
			hide(tok);
			
			// this will store the "index" keyword text as the "original-text" annotation while
			// placing the index name (from the symbol) as the new text for the #i node
			saveAndReplaceTypeAndText(i_AST, INDEX, idxName);
			
			{
			_loop1443:
			do {
				if ((LA(1)==KW_AS||LA(1)==KW_IS)) {
					is_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1443;
				}
				
			} while (true);
			}
			{
			int _cnt1445=0;
			_loop1445:
			do {
				if ((_tokenSet_15.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					index_field_clause(table);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					if ( _cnt1445>=1 ) { break _loop1445; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt1445++;
			} while (true);
			}
			
			// can't reference ## here for some reason!
			sym.addIndex(table, idxName, i_AST);
			
			index_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = index_clause_AST;
	}
	
/**   
 * Matches the field options that can be specified when creating a temp-table
 * using the <code>DEFINE TEMP-TABLE or DEFINE WORK-TABLE</code> statements.
 * Called by {@link #add_temp_table_field}.
 * <p>
 * All options can be specified in any order.
 * <p>
 * Calls:
 * <p>
 * <ul>
 *    <li> {@link #extent}
 *    <li> {@link #initializer}
 *    <li> {@link #label}
 *    <li> {@link #ui_stuff}
 *    <li> {@link #format_string}
 *    <li> {@link #help_string}
 *    <li> {@link #column_label}
 *    <li> {@link #decimals_clause}
 *    <li> {@link #view_as_phrase}
 *    <li> {@link #case_sensitive}
 * </ul>
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 *
 * @param    symText
 *           The name of the symbol being added which is passed to the
 *           view-as phrase so that the widget namespace can be maintained
 *           properly.
 * @param    ftype
 *           A token type that describes type of the field being created.  This is the type
 *           of the child of the <code>KW_AS</code> or <code>KW_LIKE</code> node.
 */
	public final void temp_table_field_options(
		String symText, int ftype
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast temp_table_field_options_AST = null;
		
		try {      // for error handling
			
			int size = -1;
			int initcount= -1;
			boolean containsExtent = false;
			
			{
			_loop1436:
			do {
				if ((LA(1)==KW_TTCP) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1390_AST = null;
					tmp1390_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1390_AST);
					match(KW_TTCP);
				}
				else if ((LA(1)==KW_MAND) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1391_AST = null;
					tmp1391_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1391_AST);
					match(KW_MAND);
				}
				else if ((LA(1)==KW_COL_CP) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					column_codepage();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_EXTENT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					size=extent();
					astFactory.addASTChild(currentAST, returnAST);
					containsExtent = true;
				}
				else if ((LA(1)==KW_INIT) && (_tokenSet_55.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					initcount=initializer(ftype);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_LABEL) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					label(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_47.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					ui_stuff();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_FORMAT) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					format_string(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_HELP) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					help_string();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_COL_LAB) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					column_label();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_DECIMALS) && (LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
					decimals_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_CASE_SEN||LA(1)==KW_NOT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					case_sensitive();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_SERIALZH) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1392_AST = null;
					tmp1392_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1392_AST);
					match(KW_SERIALZH);
				}
				else if ((LA(1)==KW_SERIALZN) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					serialize_name();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_XML_DTYP) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					xml_data_type();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_XML_NTYP) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					xml_node_type();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_XML_NNAM) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3)))) {
					xml_node_name();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_VIEW_AS) && (_tokenSet_56.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					view_as_phrase(null);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1436;
				}
				
			} while (true);
			}
			
			// Handle the situation where there may have been an initializer but no explicit extent
			// initcount != -1 and size == -1 would be indicative of this.
			if (containsExtent)
			{
			size = (size == -1 && initcount != -1) ? initcount : size;
			}
			
			temp_table_field_options_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = temp_table_field_options_AST;
	}
	
/**
 * Matches the <code>AS</code> language keyword that defines the data type
 * of a field to be added to the a temp-table. This rule encapsulates the
 * logic of matching the correct variable data type and adding this field
 * into the temp-table or work-table being defined.
 * <p>
 * This is called from {@link #add_temp_table_field}.
 * <p>
 * The inclusion of the {@link #reserved_or_symbol} rule in the second token
 * position ensures that all possible symbols are considered a possible field
 * type and will be matched by this rule.  This means that the calling rules
 * include a list of reserved and unreserved keywords or generic symbols as
 * one of the options for its 2nd token, thus &quot;pulling&quot; the
 * recursive descent processing down into this rule.
 * <p>
 * It is important to note that in the end, it is not really valid to have
 * a token type of <code>SYMBOL</code>, random keyword match or anything
 * other than one of the valid <b>special abbreviations</b> for a field type.
 * What we really require is a token that is one of the following:
 * <pre>
 *    Data Type Keyword        Actual Minimum Abbrev      Lexer Abbrev
 *    -----------------        ---------------------      -------------
 *    KW_BLOB                  n/a                        n/a
 *    KW_CHAR                  c                          char
 *    KW_CLASS                 n/a                        n/a
 *    KW_CLOB                  n/a                        n/a
 *    KW_COM_HNDL              n/a                        n/a
 *    KW_DATE                  da                         n/a
 *    KW_DATETIME              n/a                        n/a
 *    KW_DATE_TZ               n/a                        n/a
 *    KW_DEC                   de                         dec
 *    KW_HANDLE                handle                     n/a
 *    KW_INT                   i                          int
 *    KW_INT64                 n/a                        n/a
 *    KW_LOGICAL               l                          n/a
 *    KW_LONGCHAR              NOT SUPPORTED AS A FIELD!!!!!!!!!!!!!!!
 *    KW_MEMPTR                NOT SUPPORTED AS A FIELD!!!!!!!!!!!!!!!
 *    KW_RAW                   ra                         n/a
 *    KW_RECID                 re                         n/a
 *    KW_ROWID                 row                        n/a
 *    KW_WID_HAND              widg                       widget-h
 * </pre>
 * <p>
 * The difference between a <code>SYMBOL</code> and a <code>KW_CHAR</code>
 * can only be determined by context (the fact that the lookahead code has
 * identified a match with a <code>SYMBOL</code> token which is a construct 
 * that can occur in an this rule).  Thus <b>if</b> a match is found using
 * lookahead (in the rule that calls this one), then it <b>must</b> be
 * correct and necessary to convert the <code>SYMBOL</code> or other keyword
 * token type into the correct keyword representing the field type, using a
 * special abbreviation test.  This is done in an init action that is 
 * processed at the beginning of this rule. In this way, the rest of the rule
 * only sees the 2nd token as a field token type and never tries to
 * call the <code>reserved_or_symbol</code> rule since calling that rule 
 * would actually try to match (and consume from the token stream) a
 * <code>SYMBOL</code> or other keyword token type.  <b>Specifying a rule
 * reference to obtain its value from a lookahead perspective but then
 * changing the token's type such that the rule reference never gets called, 
 * is the critical trick that enables context sensitive symbol names!</b>
 * <p>
 * This use of a pull rule is only necessary because Progress provides
 * additional special abbreviation support in this construct. This is a set
 * of reduced abbreviations (see table above) beyond the normal (documented
 * or undocumented) abbreviations of a field type keyword as is possible 
 * elsewhere in Progress source code.  The <code>reserved_or_symbol</code> 
 * is needed because some possible reserved keyword matches could occur 
 * that would match one of these special abbreviations and thus the
 * <code>symbol</code> rule would not be sufficient to pull all possible
 * valid keyword matches into this rule.
 * <p>
 * The init action reads the text of the 2nd token and switches the token
 * type to that of the matching field type keyword, if any special
 * abbreviation is found.  All such processing is bypassed if the lexer
 * has already matched a valid field type keyword.
 * <p>
 * The logic of the special abbreviation processing is centralized in the
 * specialDataTypeKeywordAbbreviations() method.
 *
 * @param   symName
 *          The name of the field to add.
 * @param   table
 *          The table in which the field should be added.
 */
	public final void as_field_clause(
		String symName, Object table
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast as_field_clause_AST = null;
		Token  cl = null;
		Aast cl_AST = null;
		
		try {      // for error handling
			
			int ftype = -1;
			specialDataTypeKeywordAbbreviations(2);
			
			{
			Aast tmp1393_AST = null;
			tmp1393_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1393_AST);
			match(KW_AS);
			{
			if ((LA(1)==KW_BLOB) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1394_AST = null;
				tmp1394_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1394_AST);
				match(KW_BLOB);
				ftype = FIELD_BLOB;
			}
			else if ((LA(1)==KW_CHAR) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1395_AST = null;
				tmp1395_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1395_AST);
				match(KW_CHAR);
				ftype = FIELD_CHAR;
			}
			else if ((LA(1)==KW_CLOB) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1396_AST = null;
				tmp1396_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1396_AST);
				match(KW_CLOB);
				ftype = FIELD_CLOB;
			}
			else if ((LA(1)==KW_COM_HNDL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1397_AST = null;
				tmp1397_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1397_AST);
				match(KW_COM_HNDL);
				ftype = FIELD_COM_HANDLE;
			}
			else if ((LA(1)==KW_DATE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1398_AST = null;
				tmp1398_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1398_AST);
				match(KW_DATE);
				ftype = FIELD_DATE;
			}
			else if ((LA(1)==KW_DATETIME) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1399_AST = null;
				tmp1399_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1399_AST);
				match(KW_DATETIME);
				ftype = FIELD_DATETIME;
			}
			else if ((LA(1)==KW_DATE_TZ) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1400_AST = null;
				tmp1400_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1400_AST);
				match(KW_DATE_TZ);
				ftype = FIELD_DATETIME_TZ;
			}
			else if ((LA(1)==KW_DEC) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1401_AST = null;
				tmp1401_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1401_AST);
				match(KW_DEC);
				ftype = FIELD_DEC;
			}
			else if ((LA(1)==KW_HANDLE) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1402_AST = null;
				tmp1402_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1402_AST);
				match(KW_HANDLE);
				ftype = FIELD_HANDLE;
			}
			else if ((LA(1)==KW_INT) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1403_AST = null;
				tmp1403_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1403_AST);
				match(KW_INT);
				ftype = FIELD_INT;
			}
			else if ((LA(1)==KW_INT64) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1404_AST = null;
				tmp1404_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1404_AST);
				match(KW_INT64);
				ftype = FIELD_INT64;
			}
			else if ((LA(1)==KW_LOGICAL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1405_AST = null;
				tmp1405_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1405_AST);
				match(KW_LOGICAL);
				ftype = FIELD_LOGICAL;
			}
			else if ((LA(1)==KW_RAW) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1406_AST = null;
				tmp1406_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1406_AST);
				match(KW_RAW);
				ftype = FIELD_RAW;
			}
			else if ((LA(1)==KW_RECID) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1407_AST = null;
				tmp1407_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1407_AST);
				match(KW_RECID);
				ftype = FIELD_RECID;
			}
			else if ((LA(1)==KW_ROWID) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1408_AST = null;
				tmp1408_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1408_AST);
				match(KW_ROWID);
				ftype = FIELD_ROWID;
			}
			else if ((LA(1)==KW_WID_HAND) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1409_AST = null;
				tmp1409_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1409_AST);
				match(KW_WID_HAND);
				ftype = FIELD_HANDLE;
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				{
				if ((LA(1)==KW_CLASS) && (_tokenSet_0.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					cl = LT(1);
					cl_AST = (Aast)astFactory.create(cl);
					match(KW_CLASS);
					hide(cl);
				}
				else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				user_defined_type_name();
				astFactory.addASTChild(currentAST, returnAST);
				ftype = FIELD_CLASS;
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			as_field_clause_AST = (Aast)currentAST.root;
			
			sym.addField(table, symName, ftype, as_field_clause_AST);
			sym.promoteTable(table, true, false, false);
			
			as_field_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = as_field_clause_AST;
	}
	
/**
 * Matches the <code>COLUMN-CODEPAGE</code> option with a following
 * {@link #expr}.  Used by {@link #temp_table_field_options}.
 */
	public final void column_codepage() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast column_codepage_AST = null;
		
		try {      // for error handling
			Aast tmp1410_AST = null;
			tmp1410_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1410_AST);
			match(KW_COL_CP);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			column_codepage_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = column_codepage_AST;
	}
	
/**
 * Matches <code>XML-DATA-TYPE</code> with a following <code>STRING</code>. Used by 
 * {@link #temp_table_field_options}.
 */
	public final void xml_data_type() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast xml_data_type_AST = null;
		
		try {      // for error handling
			Aast tmp1411_AST = null;
			tmp1411_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1411_AST);
			match(KW_XML_DTYP);
			Aast tmp1412_AST = null;
			tmp1412_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp1412_AST);
			match(STRING);
			xml_data_type_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = xml_data_type_AST;
	}
	
/**
 * Matches the <code>IS</code> keyword of a <code>DEFINE TEMP-TABLE</code>
 * language statement and handles the optional index qualifiers.  Note that
 * <b>Progress also allows the <code>AS</code> keyword to be substituted for
 * <code>IS</code> although this is undocumented!</b>  This rule supports
 * both forms but the token type is always set to <code>KW_IS</code> to
 * simplify tree processing.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * Used by {@link #index_clause}.
 */
	public final void is_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast is_clause_AST = null;
		Token  i = null;
		Aast i_AST = null;
		Token  k = null;
		Aast k_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_IS:
			{
				i = LT(1);
				i_AST = (Aast)astFactory.create(i);
				astFactory.makeASTRoot(currentAST, i_AST);
				match(KW_IS);
				i_AST.setType(PROPERTIES);
				break;
			}
			case KW_AS:
			{
				k = LT(1);
				k_AST = (Aast)astFactory.create(k);
				astFactory.makeASTRoot(currentAST, k_AST);
				match(KW_AS);
				k_AST.setType(PROPERTIES);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop1449:
			do {
				if ((LA(1)==KW_UNIQUE)) {
					Aast tmp1413_AST = null;
					tmp1413_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1413_AST);
					match(KW_UNIQUE);
				}
				else if ((LA(1)==KW_PRIMARY) && (_tokenSet_233.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1414_AST = null;
					tmp1414_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1414_AST);
					match(KW_PRIMARY);
				}
				else if ((LA(1)==KW_WORD_IDX) && (_tokenSet_233.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					Aast tmp1415_AST = null;
					tmp1415_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1415_AST);
					match(KW_WORD_IDX);
				}
				else {
					break _loop1449;
				}
				
			} while (true);
			}
			is_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_54);
		}
		returnAST = is_clause_AST;
	}
	
/**   
 * Matches the index field clause of a <code>DEFINE TEMP-TABLE</code> language statement.  Calls
 * {@link #symbol} and optionally {@link #sql_direction_spec} and roots everything under an
 * artificial token <code>INDEX_FIELD</code>.
 * <p>
 * Note: There is an undocumented keyword, <code>case-sensitive</code>, that can qualify the
 * index name.
 * <p>
 * We must NOT call {@link #lvalue} here, because the 4GL has very tight restrictions on what can
 * match and using lvalue does a full schema-namespace lookup that can have ambiguity which the
 * 4GL would not detect.  The symbol is rewritten and annotated to be a field, so that the result
 * is the same as if we has used <code>lvalue</code>. The 4GL restrictions:
 * <p>
 * <ul>
 *   <li> must be a field in the current temp-table/work-table definition
 *   <li> cannot be a qualified name
 *   <li> cannot be abbreviated
 *   <li> cannot reference an unsubscripted extent field
 *   <li> cannot reference a subscripted extent field
 * </ul>
 * <p>
 * Used by {@link #index_clause}.
 *
 * @param    table
 *           The temp-table object that is being modified. 
 */
	public final void index_field_clause(
		Object table
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast index_field_clause_AST = null;
		Aast s_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(INDEX_FIELD,"index field"));
			symbol();
			s_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			sym.annotateField(s_AST, table, false, false);
			
			{
			if ((LA(1)==KW_ASC||LA(1)==KW_DESCEND) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				sql_direction_spec();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_CASE_SEN) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1416_AST = null;
				tmp1416_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1416_AST);
				match(KW_CASE_SEN);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			index_field_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = index_field_clause_AST;
	}
	
/**
 * Matches a Progress 4GL database reference that refers to a valid database
 * or an alias to a valid database.
 * <p>
 * The matching portion of this rule is defined as a single token that
 * matches the union of the <code>DATABASE</code> token type and the set of
 * all possible alternatives for symbol names (a reference to the 
 * {@link #symbol} rule).
 * <p>
 * Note that if this rule is used as an alternative to a rule that includes a
 * leftmost token defined by the <code>symbol</code> rule, there will be an
 * ambiguity that is only resolved by lookahead <b>and</b> the proper
 * ordering of the rules.
 * <p>
 * It is required that where this rule is referenced as one alternative that
 * conflicts with the definitions of other alternatives, <b>the order of the 
 * alternatives must be more specific (in terms of matching criteria) to less
 * specific</b>.
 * <p>
 * The inclusion of the <code>symbol</code> rule ensures that all valid
 * symbols are considered a database and will be matched by this rule.
 * <p>
 * It is important to note that in the end, it is not really valid to have
 * a token type of <code>SYMBOL</code> since this could be anything.  What we
 * really require is a token that is type <code>DATABASE</code>.
 * <p>
 * The difference between a <code>SYMBOL</code> and a <code>DATABASE</code>
 * can only be determined by context (the fact that the lookahead code has
 * identified a match with a <code>SYMBOL</code> token which is a construct
 * that can occur in a <code>database</code> call.  Thus <b>if</b> a match is
 * found using lookahead (in the rule that calls this one), then it
 * <b>must</b> be correct and necessary to convert the <code>SYMBOL</code> 
 * token type into the correct type. This is done in an init action that is 
 * processed at the beginning of this rule. In this way, the rest of the rule 
 * only sees the first token as a valid <code>DATABASE</code> and never tries
 * to call the <code>symbol</code> rule since calling that rule would actually 
 * try to match (and consume from the token stream) a <code>SYMBOL</code>
 * token type.  <b>Specifying a rule reference to obtain its value from a 
 * lookahead perspective but then changing the token's type such that the
 * rule reference never gets called, is the critical trick that enables
 * context sensitive symbol names!</b>
 * <p>
 * This rule can only be used in cases where it is non-optional OR there is
 * no ambiguity (between the set of unreserved keywords referenced herein and 
 * any following keywords that would be improperly matched by this rule).
 * In this case a semantic predicate could be used to isolate the conflicting
 * token types and bypass this rule reference in those cases.
 */
	public final void database() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast database_AST = null;
		
		try {      // for error handling
			
			if (LA(1) != DATABASE)
			{
			int newtype = sym.lookupDatabase(LT(1).getText());
			
			// there should always be a match in valid Progress 4GL source
			// so we throw an exception if this is not the case
			if ( newtype != -1 )
			{
			LT(1).setType( newtype );
			}
			else
			{
			throw new NoViableAltException(LT(1), getFilename());
			}
			}
			
			{
			if ((LA(1)==DATABASE)) {
				Aast tmp1417_AST = null;
				tmp1417_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1417_AST);
				match(DATABASE);
			}
			else if ((_tokenSet_15.member(LA(1)))) {
				symbol();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			database_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_6);
		}
		returnAST = database_AST;
	}
	
/**   
 * Matches the <code>ROW or FIELD</code> keyword and the required following
 * {@link #choose_field_spec}.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * Used by {@link #choose_stmt}.
 */
	public final void choose_row_or_field_list() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast choose_row_or_field_list_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_ROW:
			{
				Aast tmp1418_AST = null;
				tmp1418_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1418_AST);
				match(KW_ROW);
				choose_field_spec();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_FIELD:
			{
				Aast tmp1419_AST = null;
				tmp1419_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1419_AST);
				match(KW_FIELD);
				{
				int _cnt1502=0;
				_loop1502:
				do {
					if ((_tokenSet_64.member(LA(1)))) {
						choose_field_spec();
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						if ( _cnt1502>=1 ) { break _loop1502; } else {throw new NoViableAltException(LT(1), getFilename());}
					}
					
					_cnt1502++;
				} while (true);
				}
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			choose_row_or_field_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_234);
		}
		returnAST = choose_row_or_field_list_AST;
	}
	
/**   
 * Matches the <code>KEYS</code> keyword and the required following
 * {@link #lvalue} of <code>CHARACTER</code> data type.
 * <p>
 * Used by {@link #choose_stmt}.
 */
	public final void choose_keys_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast choose_keys_clause_AST = null;
		Aast c_AST = null;
		
		try {      // for error handling
			Aast tmp1420_AST = null;
			tmp1420_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1420_AST);
			match(KW_KEYS);
			lvalue();
			c_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			if (!( c_AST.getType() == VAR_CHAR || c_AST.getType() == FIELD_CHAR ))
			  throw new SemanticException(" c_AST.getType() == VAR_CHAR || c_AST.getType() == FIELD_CHAR ");
			choose_keys_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_234);
		}
		returnAST = choose_keys_clause_AST;
	}
	
/**   
 * Matches an {@link #lvalue} and an optional following 
 * {@link #choose_help_clause}.
 * <p>
 * Used by {@link #choose_row_or_field_list}.
 */
	public final void choose_field_spec() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast choose_field_spec_AST = null;
		
		try {      // for error handling
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_HELP)) {
				choose_help_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_235.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			choose_field_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_235);
		}
		returnAST = choose_field_spec_AST;
	}
	
/**   
 * Matches the <code>HELP</code> keyword and the required following
 * <code>STRING</code>.
 * <p>
 * Used by {@link #choose_field_spec}.
 */
	public final void choose_help_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast choose_help_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1421_AST = null;
			tmp1421_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1421_AST);
			match(KW_HELP);
			Aast tmp1422_AST = null;
			tmp1422_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp1422_AST);
			match(STRING);
			choose_help_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_235);
		}
		returnAST = choose_help_clause_AST;
	}
	
/**      
 * Implements proper tree building for the most common field specification
 * in the {@link #put_stmt}.  Uses {@link #expr}, {@link #format_string} and 
 * {@link #to_or_at_clause}.  Roots everything at a node of type
 * <code>PUT_FIELD</code>.
 */
	public final void put_field() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast put_field_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(PUT_FIELD,"output field"));
			{
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1515:
			do {
				if ((LA(1)==KW_FORMAT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					format_string(true);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==KW_AT||LA(1)==KW_TO) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					to_or_at_clause();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1515;
				}
				
			} while (true);
			}
			}
			put_field_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_21);
		}
		returnAST = put_field_AST;
	}
	
/**      
 * Matches the <code>AT or TO</code> keywords and a required following
 * expression.  This is a variant of some constructs in the 
 * {@link #format_phrase} however this rule is not compatible with those
 * rules.  This calls {@link #expr} and is used by {@link #put_stmt}.
 */
	public final void to_or_at_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast to_or_at_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_AT:
			{
				Aast tmp1423_AST = null;
				tmp1423_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1423_AST);
				match(KW_AT);
				break;
			}
			case KW_TO:
			{
				Aast tmp1424_AST = null;
				tmp1424_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1424_AST);
				match(KW_TO);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			to_or_at_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_21);
		}
		returnAST = to_or_at_clause_AST;
	}
	
/**   
 * Matches a <code>FROM</code> keyword and the following {@link #handle}.
 * Used in the {@link #publish_stmt}.
 * <p>
 * This is only separated to simplify the AST build.
 */
	public final void from_handle_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast from_handle_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1425_AST = null;
			tmp1425_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1425_AST);
			match(KW_FROM);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			from_handle_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_236);
		}
		returnAST = from_handle_clause_AST;
	}
	
/**   
 * Matches a parenthesized list of comma-separated parameters used in a call-site and uses a
 * rule reference to {@link #parameter} to properly build the AST.  The parameters are optional
 * as some customer code has been found that has an empty set of parenthesis.
 * <p>
 * Called from {@link #run_stmt}, {@link #function}, {@link #super_function},
 * {@link #super_stmt}, {@link #run_super_stmt}, {@link #new_phrase},
 * {@link #run_stored_proc_stmt} {@link #this_object_stmt} and {@link #publish_stmt}.  
 *
 * @param    allowAs
 *          {@code true} if the caller is should allow matching on an {@code as_clause}.  This is an
 *          undocumented "feature" of the 4GL. 
 */
	public final void param_passing_list(
		boolean allowAs
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast param_passing_list_AST = null;
		Aast p_AST = null;
		Aast p2_AST = null;
		
		try {      // for error handling
			Aast tmp1426_AST = null;
			tmp1426_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1426_AST);
			match(LPARENS);
			{
			if ((_tokenSet_24.member(LA(1)))) {
				parameter();
				p_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				{
				if (((LA(1)==KW_AS))&&( allowAs || p_AST.downPath(EXPRESSION, OBJECT_INVOCATION) )) {
					as_clause(null, false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((LA(1)==COMMA||LA(1)==RPARENS)) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				{
				_loop1601:
				do {
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						parameter();
						p2_AST = (Aast)returnAST;
						astFactory.addASTChild(currentAST, returnAST);
						{
						if (((LA(1)==KW_AS))&&( allowAs || p2_AST.downPath(EXPRESSION, OBJECT_INVOCATION) )) {
							as_clause(null, false);
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if ((LA(1)==COMMA||LA(1)==RPARENS)) {
						}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						
						}
					}
					else {
						break _loop1601;
					}
					
				} while (true);
				}
			}
			else if ((LA(1)==RPARENS)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			param_passing_list_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = param_passing_list_AST;
	}
	
/**   
 * Matches a <code>PROCEDURE</code> keyword and the following {@link #handle}.
 * Used in the {@link #subscribe_stmt}.
 * <p>
 * This is only separated to simplify the AST build.
 */
	public final void proc_handle_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast proc_handle_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1427_AST = null;
			tmp1427_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1427_AST);
			match(KW_PROC);
			handle();
			astFactory.addASTChild(currentAST, returnAST);
			proc_handle_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_24);
		}
		returnAST = proc_handle_clause_AST;
	}
	
/**   
 * Matches the <code>IN</code> keyword and the required following expression
 * that resolves to the procedure handle construct in which the internal
 * procedure is to be run.
 * <p>
 * Used by {@link #run_stmt}, {@link #dynamic_function_func}, {@link #event_proc_clause}, 
 * {@link #subscribe_stmt} and {@link #unsubscribe_stmt}, the subtree is rooted by the keyword 
 * (which is the reason for using a separate rule for something so simple).
 */
	public final void in_procedure_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast in_procedure_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1428_AST = null;
			tmp1428_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1428_AST);
			match(KW_IN);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			in_procedure_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_237);
		}
		returnAST = in_procedure_clause_AST;
	}
	
/**   
 * Matches a <code>RUN-PROCEDURE</code> keyword and the following 
 * character {@link #expr}. Used in the {@link #subscribe_stmt}.
 * <p>
 * This is only separated to simplify the AST build.
 */
	public final void run_proc_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast run_proc_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1429_AST = null;
			tmp1429_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1429_AST);
			match(KW_RUN_PROC);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			run_proc_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_200);
		}
		returnAST = run_proc_clause_AST;
	}
	
/**
 * Matches the list of {@link #expr} or {@link #space_or_skip} input for 
 * the {@link #msg_stmt}.  The input can be made in any order and with any
 * number of items.  Everything will be rooted at a <code>CONTENT_ARRAY</code>
 * node.
 */
	public final void content_array() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast content_array_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(CONTENT_ARRAY,""));
			{
			_loop1548:
			do {
				if ((LA(1)==KW_SKIP||LA(1)==KW_SPACE) && (_tokenSet_21.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					space_or_skip();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_VIEW_AS && LA(1) != KW_SET && LA(1) != KW_UPDATE && LA(1) != KW_IN )) {
					expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1548;
				}
				
			} while (true);
			}
			content_array_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_238);
		}
		returnAST = content_array_AST;
	}
	
/**   
 * Matches the <code>VIEW-AS ALERT-BOX</code> construct and the optional
 * following definitions.  Calls {@link #buttons_clause} and 
 * {@link #simple_title_string} rules.  It is unclear if the options need
 * to be processed in any order.  At the current time, they are only
 * processed in a fixed order.
 * <p>
 * Used by {@link #msg_stmt}.
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void view_as_alert_box_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast view_as_alert_box_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1430_AST = null;
			tmp1430_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1430_AST);
			match(KW_VIEW_AS);
			Aast tmp1431_AST = null;
			tmp1431_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp1431_AST);
			match(KW_ALERT_BX);
			{
			switch ( LA(1)) {
			case KW_MSG:
			{
				Aast tmp1432_AST = null;
				tmp1432_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1432_AST);
				match(KW_MSG);
				break;
			}
			case KW_QUEST:
			{
				Aast tmp1433_AST = null;
				tmp1433_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1433_AST);
				match(KW_QUEST);
				break;
			}
			case KW_INFO:
			{
				Aast tmp1434_AST = null;
				tmp1434_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1434_AST);
				match(KW_INFO);
				break;
			}
			case KW_ERROR:
			{
				Aast tmp1435_AST = null;
				tmp1435_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1435_AST);
				match(KW_ERROR);
				break;
			}
			case KW_WARN:
			{
				Aast tmp1436_AST = null;
				tmp1436_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1436_AST);
				match(KW_WARN);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_SET:
			case KW_TITLE:
			case KW_UPDATE:
			case KW_VIEW_AS:
			case KW_BUTTON:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_BUTTON:
			{
				buttons_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_SET:
			case KW_TITLE:
			case KW_UPDATE:
			case KW_VIEW_AS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			switch ( LA(1)) {
			case KW_TITLE:
			{
				title_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case DOT:
			case KW_IN:
			case KW_SET:
			case KW_UPDATE:
			case KW_VIEW_AS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			view_as_alert_box_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_238);
		}
		returnAST = view_as_alert_box_clause_AST;
	}
	
/**   
 * Matches the <code>SET field or UPDATE field</code> construct and the
 * required following as or like clause. Note that by using the 
 * {@link #as_clause} and {@link #like_clause} rules, the variable
 * namespace is naturally updated which should be correct. Also uses
 * {@link #lvalue} and {@link #format_string} rules.  The options can
 * be specified in any order.
 * <p>
 * Experience shows that a variable that is already defined can be
 * redefined (or Progress ignores the second definition) using this
 * phrase.  For this reason, it is possible to encounter an 
 * <code>AS or LIKE</code> construct after an <code>lvalue</code>. However,
 * this implementation is written to pass <code>null</code> as the symbol
 * name which makes either called rule bypass the variable addition to
 * the namespace.  If it turns out that Progress actually redefines the
 * variable, a change will be needed here.  Normally, it is not possible
 * to redefine a variable, so this behavior is unusual.
 * <p>
 * Used by {@link #msg_stmt}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void set_or_update_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast set_or_update_clause_AST = null;
		Aast f_AST = null;
		
		try {      // for error handling
			
			boolean newVar = false;
			
			{
			{
			switch ( LA(1)) {
			case KW_SET:
			{
				Aast tmp1437_AST = null;
				tmp1437_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1437_AST);
				match(KW_SET);
				break;
			}
			case KW_UPDATE:
			{
				Aast tmp1438_AST = null;
				tmp1438_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1438_AST);
				match(KW_UPDATE);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if (((_tokenSet_15.member(LA(1))) && (LA(2)==KW_AS||LA(2)==KW_LIKE||LA(2)==KW_LIKE_SEQ) && (_tokenSet_81.member(LA(3))))&&( sym.lookupVariable(LT(1).getText()) == -1 )) {
				symbol();
				f_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case KW_AS:
				{
					as_clause(f_AST.getText(), false);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_LIKE:
				case KW_LIKE_SEQ:
				{
					like_clause(f_AST.getText(), null, false);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				newVar = true;
			}
			else if ((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case KW_AS:
				{
					as_clause(null, false);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_LIKE:
				case KW_LIKE_SEQ:
				{
					like_clause(null, null, false);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case DOT:
				case KW_AUTO_RET:
				case KW_FORMAT:
				case KW_IN:
				case KW_SET:
				case KW_UPDATE:
				case KW_VIEW_AS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			_loop1564:
			do {
				switch ( LA(1)) {
				case KW_FORMAT:
				{
					format_string(false);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_AUTO_RET:
				{
					Aast tmp1439_AST = null;
					tmp1439_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1439_AST);
					match(KW_AUTO_RET);
					break;
				}
				default:
				{
					break _loop1564;
				}
				}
			} while (true);
			}
			}
			set_or_update_clause_AST = (Aast)currentAST.root;
			
			if (newVar)
			{
			// pass the AST with all options to the symbol resolver to set
			// those variable options accordingly (really only applies to the
			// format_string and KW_AUTO_RET)
			sym.setVariableOptions(f_AST.getText(), set_or_update_clause_AST);      
			
			// write any non-standard options into annotations (this will
			// really only be the tempIdx since there are no real options
			// in this form of variable definition)
			sym.annotateVariableOptions(f_AST.getText(), set_or_update_clause_AST, true);
			}
			
			set_or_update_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_238);
		}
		returnAST = set_or_update_clause_AST;
	}
	
/**   
 * Matches the <code>BUTTONS</code>keyword and the required following 
 * button set.  Note that the <code>BUTTON</code> keyword is a valid
 * abbreviation for <code>BUTTONS</code> but it is a separate keyword, used
 * elsewhere in Progress.  For this reason, this rule matches on both
 * keywords and the token type is set to <code>BUTTONS</code> either way.
 * <p>
 * Used by {@link #view_as_alert_box_clause}.
 * <p>
 * The subtree is rooted by the keyword (which is the reason for using a 
 * separate rule for something so simple).
 */
	public final void buttons_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast buttons_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1440_AST = null;
			tmp1440_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1440_AST);
			match(KW_BUTTON);
			{
			switch ( LA(1)) {
			case KW_YES_NO:
			{
				Aast tmp1441_AST = null;
				tmp1441_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1441_AST);
				match(KW_YES_NO);
				break;
			}
			case KW_YES_NO_C:
			{
				Aast tmp1442_AST = null;
				tmp1442_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1442_AST);
				match(KW_YES_NO_C);
				break;
			}
			case KW_OK:
			{
				Aast tmp1443_AST = null;
				tmp1443_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1443_AST);
				match(KW_OK);
				break;
			}
			case KW_OK_CAN:
			{
				Aast tmp1444_AST = null;
				tmp1444_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1444_AST);
				match(KW_OK_CAN);
				break;
			}
			case KW_RETRY_C:
			{
				Aast tmp1445_AST = null;
				tmp1445_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1445_AST);
				match(KW_RETRY_C);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			buttons_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_239);
		}
		returnAST = buttons_clause_AST;
	}
	
/**   
 * Matches one of the <code>PERSISTENT</code>, <code>SINGLE-RUN</code>, <code>SINGLETON</code> or
 * <code>AS-THREAD</code> keywords and the optional following <code>SET</code> construct. The
 * AS-THREAD is an optional FWD extension to run the given code on a new thread.
 * <p>
 * <b>Note that there is no procedure handle processing implemented at this time. The matching is
 * done as a symbol only, no namespace is maintained.</b>
 * <p>
 * Used by {@link #run_stmt} and the subtree is rooted by the keyword (which is the reason for
 * using a separate rule for something so simple).
 */
	public final void persist_or_single_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast persist_or_single_clause_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_PERSIST:
			{
				Aast tmp1446_AST = null;
				tmp1446_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1446_AST);
				match(KW_PERSIST);
				break;
			}
			case KW_SING_RUN:
			{
				Aast tmp1447_AST = null;
				tmp1447_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1447_AST);
				match(KW_SING_RUN);
				break;
			}
			case KW_SINGLTON:
			{
				Aast tmp1448_AST = null;
				tmp1448_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1448_AST);
				match(KW_SINGLTON);
				break;
			}
			case KW_AS_THRD:
			{
				Aast tmp1449_AST = null;
				tmp1449_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1449_AST);
				match(KW_AS_THRD);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==KW_SET) && (_tokenSet_64.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				set_handle();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_136.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			persist_or_single_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_136);
		}
		returnAST = persist_or_single_clause_AST;
	}
	
/**   
 * Matches the <code>SET handle</code> clause and a following {@link #lvalue}
 * which must be a handle type.
 * <p>
 * Used by {@link #persist_or_single_clause}, {@link #run_stmt} and 
 * {@link #asynch_clause}.  The subtree is rooted by the keyword (which is
 * the reason for using a separate rule for something so simple).
 */
	public final void set_handle() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast set_handle_AST = null;
		Aast l_AST = null;
		
		try {      // for error handling
			Aast tmp1450_AST = null;
			tmp1450_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1450_AST);
			match(KW_SET);
			lvalue();
			l_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			if (!( isHandleType(l_AST) ))
			  throw new SemanticException(" isHandleType(l_AST) ");
			set_handle_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_136);
		}
		returnAST = set_handle_AST;
	}
	
/**   
 * Matches the <code>ON</code> keyword and the optional following 
 * <code>SERVER handle</code> construct.
 * <p>
 * <b>Note that there is no session or server handle processing implemented 
 * at this time.  The matching is done as a symbol only, no namespace
 * is maintained.</b>
 * <p>
 * Used by {@link #run_stmt} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 * <p>
 * Ambiguity warnings are disabled because although ANTLR detects that the
 * optional <code>SERVER</code> keyword could conflict with the following
 * symbol, in fact Progress (and our implementation) both give preference
 * to the keyword.
 */
	public final void on_server_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast on_server_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1451_AST = null;
			tmp1451_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1451_AST);
			match(KW_ON);
			{
			if ((LA(1)==KW_SERVER) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp1452_AST = null;
				tmp1452_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1452_AST);
				match(KW_SERVER);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_TRANS) && (_tokenSet_136.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				trans_distinct_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_136.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			on_server_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_136);
		}
		returnAST = on_server_clause_AST;
	}
	
/**   
 * Matches the <code>ASYNCHRONOUS</code> clause and following options.
 * Calls {@link #set_handle} and {@link #event_proc_clause}.
 * <p>
 * Used by {@link #run_stmt} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 */
	public final void asynch_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast asynch_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1453_AST = null;
			tmp1453_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1453_AST);
			match(KW_ASYNC);
			{
			if ((LA(1)==KW_SET) && (_tokenSet_64.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				set_handle();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_136.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((LA(1)==KW_EVT_PROC) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				event_proc_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_136.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			asynch_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_136);
		}
		returnAST = asynch_clause_AST;
	}
	
/**
 * Matches a list of expressions as valid preprocessor/compiler arguments
 * in the <code>RUN</code> language statement and builds a single AST of
 * the entire list, rooted at an artificial <code>ARGUMENTS</code> node.
 * <p>
 * As an undocumented 4GL feature, {@link #value} can be referenced instead of
 * an expression.
 * <p>
 * <b>This rule uses a trick to create an artificial node as a root while
 * still allowing ANTLR to do normal tree building (no suppression of the
 * AST build).</b>  This is only useful in cases where there is no valid
 * token which can be used as a tree root AND where a loop is being used
 * such that the contents of the loop cannot be referenced in a manually
 * built #([,],,,) ANTLR construct. ANTLR doesn't support (as of 2.7.4) the
 * ability to label a loop such that the entire contents can be referenced.
 * If one labels the individual elements inside the loop, only the last one
 * is available when the loop concludes.  However, by leaving the normal
 * tree creation unchanged but manually creating an artificial node and
 * manually setting this node as the root of the returned tree BEFORE the
 * children are added, this problem can be solved.
 * <p>
 * Though undocumented, customer source has shown that it is valid to
 * insert a comma in between each preprocessor argument.  These are
 * optionally matched and discarded.
 * <p>
 * There is an undocumented feature of the 4GL where certain "junk" tokens can be matched
 * instead of an expression. If the next token is DOT (without following whitespace), COLON,
 * RPARENS, EQUALS, LBRACKET, RBRACKET, UNKNOWN_TOKEN (for "}" or "|"), COMMA, LT, GT or
 * NOT_EQ then attempt to merge until WS is hit with an exclusion KW_VALUE and KW_NO_ERROR.
 * The resulting token will be set to BROKEN_PREPROC_ARG (and matched that way).  The only
 * exception is LPARENS which is valid for this case in the 4GL, but which cannot be
 * disambiguated from the use of LPARENS in a real expression (which also works).  This
 * LPARENS case remains a TODO.
 * <p>
 * Called by {@link #run_stmt}.  This rule only exists to create the proper
 * AST, otherwise it would be much simpler to inline since the match is
 * trivial.
 */
	public final void preproc_arguments() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast preproc_arguments_AST = null;
		
		try {      // for error handling
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(ARGUMENTS,"arguments"));
			{
			_loop1575:
			do {
				if ((LA(1)==KW_VALUE) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
					value();
					astFactory.addASTChild(currentAST, returnAST);
					fixupBrokenPreprocArg();
				}
				else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					expr();
					astFactory.addASTChild(currentAST, returnAST);
					fixupBrokenPreprocArg();
				}
				else if ((LA(1)==BROKEN_PREPROC_ARG)) {
					Aast tmp1454_AST = null;
					tmp1454_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1454_AST);
					match(BROKEN_PREPROC_ARG);
					fixupBrokenPreprocArg();
				}
				else {
					break _loop1575;
				}
				
			} while (true);
			}
			preproc_arguments_AST = (Aast)currentAST.root;
			if (preproc_arguments_AST.getNumberOfChildren() == 0) preproc_arguments_AST = null;
			currentAST.root = preproc_arguments_AST;
			currentAST.child = preproc_arguments_AST!=null &&preproc_arguments_AST.getFirstChild()!=null ?
				preproc_arguments_AST.getFirstChild() : preproc_arguments_AST;
			currentAST.advanceChildToEnd();
			preproc_arguments_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_200);
		}
		returnAST = preproc_arguments_AST;
	}
	
/**   
 * Matches the <code>TRANSACTION DISTINCT</code> clause. Although official documentation states 
 * that both keywords are needed to define the clause, practice showed the DISTINCT keyword is
 * optional.
 * <p>
 * Used by {@link #run_stmt} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 */
	public final void trans_distinct_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast trans_distinct_clause_AST = null;
		Token  t = null;
		Aast t_AST = null;
		Token  di = null;
		Aast di_AST = null;
		
		try {      // for error handling
			t = LT(1);
			t_AST = (Aast)astFactory.create(t);
			astFactory.makeASTRoot(currentAST, t_AST);
			match(KW_TRANS);
			t_AST.setType(TRANSACTION_DISTINCT);
			{
			if ((LA(1)==KW_DISTINCT) && (_tokenSet_136.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				di = LT(1);
				di_AST = (Aast)astFactory.create(di);
				match(KW_DISTINCT);
				hide(di);
			}
			else if ((_tokenSet_136.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			trans_distinct_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_136);
		}
		returnAST = trans_distinct_clause_AST;
	}
	
/**   
 * Matches the <code>EVENT-PROCEDURE</code> clause and its required
 * expression and optional {@link #in_procedure_clause}.
 * <p>
 * Used by {@link #asynch_clause} and the subtree is rooted by the keyword
 * (which is the reason for using a separate rule for something so simple).
 * <p>
 * Bogus ANTLR ambiguity warnings have been disabled.
 */
	public final void event_proc_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast event_proc_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1455_AST = null;
			tmp1455_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1455_AST);
			match(KW_EVT_PROC);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_IN) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				in_procedure_clause();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_136.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			event_proc_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_136);
		}
		returnAST = event_proc_clause_AST;
	}
	
/**
 * Matches a single parameter being passed at a call-site. The preceding <code>INPUT</code>,
 * <code>INPUT-OUTPUT</code> and <code>OUTPUT</code> keywords are optional. The core parameter is
 * matched using the {@link #expr} rule.
 * <p>
 * The <code>INPUT</code> keyword can also be found as the leftmost token in a conditional
 * expression (there is a function by the same name that takes a single non-parenthesized
 * parameter). This conflicts with the optional keyword here.  Warnings has been disabled for that
 * subrule as a result.
 * <p>
 * To actually use the <code>INPUT</code> built-in function as a parameter, one must paranthesize
 * the call OR add the following FRAME frame-name qualifier between the KW_INPUT and the widget
 * name.  This is how it works in Progress!  Otherwise the presence of the KW_INPUT is treated as
 * an ignored mode qualifier.
 * <p>
 * The subtree returned from this rule will be rooted at an artificial node of type
 * <code>PARAMETER</code>.
 * <p>
 * Called from {@link #param_passing_list}.
 */
	public final void parameter() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast parameter_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(PARAMETER,"parameter"));
			
			boolean isInputFunc = (LA(1) == KW_INPUT &&
			LA(2) == KW_FRAME &&
			resolveLvalueCoreType(4, false) != -1);
			
			{
			if (((LA(1)==KW_INPUT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( !isInputFunc )) {
				Aast tmp1456_AST = null;
				tmp1456_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1456_AST);
				match(KW_INPUT);
			}
			else if ((LA(1)==KW_OUTPUT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp1457_AST = null;
				tmp1457_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1457_AST);
				match(KW_OUTPUT);
			}
			else if ((LA(1)==KW_IN_OUT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp1458_AST = null;
				tmp1458_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1458_AST);
				match(KW_IN_OUT);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1609:
			do {
				switch ( LA(1)) {
				case KW_APPEND:
				{
					Aast tmp1459_AST = null;
					tmp1459_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1459_AST);
					match(KW_APPEND);
					break;
				}
				case KW_BY_VALUE:
				{
					Aast tmp1460_AST = null;
					tmp1460_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1460_AST);
					match(KW_BY_VALUE);
					break;
				}
				case KW_BY_REF:
				{
					Aast tmp1461_AST = null;
					tmp1461_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1461_AST);
					match(KW_BY_REF);
					break;
				}
				case KW_BIND:
				{
					Aast tmp1462_AST = null;
					tmp1462_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1462_AST);
					match(KW_BIND);
					break;
				}
				default:
				{
					break _loop1609;
				}
				}
			} while (true);
			}
			parameter_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_240);
		}
		returnAST = parameter_AST;
	}
	
/**
 * Matches a single statement parameter definition for methods, constructors, destructors,
 * property getters/setters and user-defined function definitions. This is not used at
 * call-sites but only to define the interface for the given callable unit.
 * <p>
 * Optionally matches <code>INPUT, INPUT-OUTPUT and OUTPUT</code> keywords or a
 * <code>BUFFER</code> definition as well as a range of possible table parameter types.
 * The {@link #table_parm}, {@link #def_buf_stmt} and {@link #as_clause} rules are used.
 * <p>
 * This rule will define new variables in the variable dictionary. For normal variables it
 * calls the {@link #as_clause} rule to add this variable name into the variable dictionary
 * with the correct data type.  Note that this rule passes the variable name as a
 * <code>String</code> argument to the <code>as_clause</code> rule since this current rule has
 * the knowledge of this name but doesn't have the knowledge of how to deal with the data types
 * and variable dictionary.
 * <p>
 * Instead of an AS clause, this will also match the undocumented {@link #like_clause}. 
 * <p>
 * For buffers and other table parameters, these are each handled by separate rules.
 * <p>
 * Note that it seems that the 2nd alternative (a symbol followed by the
 * <code>AS</code> keyword) should be detected as ambiguous with the
 * 3rd alternative (an expression).  However ANTLR automatically inserts
 * a test for the 2nd token being equivalent to <code>AS</code> which 
 * disambiguates these alternatives.  This may be due to the use of a rule
 * reference rather than an inline keyword implementation.  <b>If this coding
 * changes, a semantic predicate may have to be used to manually disambiguate.
 * There will be no ANTLR warnings since these have been disabled, so you
 * MUST exercise great care in modifying this rule.</b>
 * <p>
 * The <code>INPUT</code> keyword can also be found as the leftmost token
 * in a conditional expression (there is a function by the same name that 
 * takes a single non-parenthesized parameter). This conflicts with the
 * optional keyword here, but we will match first on this keyword and this
 * is the correct behavior.  Warnings has been disabled for that subrule as
 * a result.
 * <p>
 * The subtree returned from this rule will be rooted at an artificial node
 * of type <code>PARAMETER</code>.
 * <p>
 * Called from {@link #param_list_definition}.
 *
 * @param    defineBuffer
 *           <code>true</code> if the caller supports inline buffer
 *           definitions (versus just passing a buffer parameter which
 *           doesn't create a new buffer).
 * @param    funcDef
 *           <code>true</code> if the caller is a FUNCTION definition. 
 * @param    oo
 *           {@code true} if being called from OO features.  In OO usage, reserved keywords can
 *           be used as parameter names. 
 */
	public final void parameter_spec(
		boolean defineBuffer, boolean funcDef, boolean oo
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast parameter_spec_AST = null;
		Token  k1 = null;
		Aast k1_AST = null;
		Token  k2 = null;
		Aast k2_AST = null;
		Token  k3 = null;
		Aast k3_AST = null;
		Aast tp_AST = null;
		Aast buf_AST = null;
		Aast param_AST = null;
		Aast res_AST = null;
		Aast vt_AST = null;
		
		try {      // for error handling
			
			String  varname = null;
			boolean abbrev  = false;
			int     size    = -1;
			
			// this should really be changed to a different token type to differentiate it from
			// the parameter passing syntax in the parameter rule
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(PARAMETER,"parameter"));
			
			{
			if ((LA(1)==KW_INPUT) && (_tokenSet_0.member(LA(2))) && (_tokenSet_241.member(LA(3)))) {
				k1 = LT(1);
				k1_AST = (Aast)astFactory.create(k1);
				astFactory.addASTChild(currentAST, k1_AST);
				match(KW_INPUT);
			}
			else if ((LA(1)==KW_OUTPUT) && (_tokenSet_0.member(LA(2))) && (_tokenSet_241.member(LA(3)))) {
				k2 = LT(1);
				k2_AST = (Aast)astFactory.create(k2);
				astFactory.addASTChild(currentAST, k2_AST);
				match(KW_OUTPUT);
			}
			else if ((LA(1)==KW_IN_OUT) && (_tokenSet_0.member(LA(2))) && (_tokenSet_241.member(LA(3)))) {
				k3 = LT(1);
				k3_AST = (Aast)astFactory.create(k3);
				astFactory.addASTChild(currentAST, k3_AST);
				match(KW_IN_OUT);
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_241.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			{
			if ((_tokenSet_57.member(LA(1))) && (_tokenSet_58.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				varname=table_parm();
				tp_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1)==KW_BUFFER) && (_tokenSet_242.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( defineBuffer )) {
				def_buf_stmt(false, funcDef, false, null, null);
				buf_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_27.member(LA(1))) && (LA(2)==KW_AS||LA(2)==KW_LIKE||LA(2)==KW_LIKE_SEQ) && (_tokenSet_81.member(LA(3)))) {
				{
				if (((_tokenSet_15.member(LA(1))) && (LA(2)==KW_AS||LA(2)==KW_LIKE||LA(2)==KW_LIKE_SEQ) && (_tokenSet_81.member(LA(3))))&&( !oo )) {
					symbol();
					param_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					varname = param_AST.getText();
				}
				else if ((_tokenSet_27.member(LA(1))) && (LA(2)==KW_AS||LA(2)==KW_LIKE||LA(2)==KW_LIKE_SEQ) && (_tokenSet_81.member(LA(3)))) {
					reserved_or_symbol();
					res_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					varname = res_AST.getText();
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				{
				switch ( LA(1)) {
				case KW_AS:
				{
					as_clause(varname, false);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_LIKE:
				case KW_LIKE_SEQ:
				{
					like_clause(varname, null, false);
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				switch ( LA(1)) {
				case KW_EXTENT:
				{
					size=extent();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case COMMA:
				case RPARENS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((_tokenSet_0.member(LA(1))) && (_tokenSet_243.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				var_type(null, false);
				vt_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				abbrev = true;
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			parameter_spec_AST = (Aast)currentAST.root;
			
			// this should only occur during function definitions and only for
			// table handles or symbols followed by the AS keyword
			if (varname != null)
			{
			// the only option to set is the parameter type
			sym.setVariableOptions(varname, parameter_spec_AST);
			
			// write any non-standard options into annotations (this probably
			// only means the tempidx and extent since no other options are really
			// possible)
			sym.annotateVariableOptions(varname, parameter_spec_AST, true);
			
			// check if the type was specified
			if (k1_AST == null && k2_AST == null && k3_AST == null)
			{
			// default to KW_INPUT
			parameter_spec_AST.putAnnotation("parmtype", Long.valueOf(KW_INPUT));
			}
			}
			else
			{
			// in the parameter definition case where this is not a full
			// variable definition (it is the abbreviated var def, a table,
			// table-handle, buffer), create those annotations that are
			// possible
			
			Aast mode  = (k1_AST == null) ? ((k2_AST == null) ? k3_AST : k2_AST) : k1_AST;
			int  ptype = (mode == null) ? KW_INPUT : mode.getType();
			parameter_spec_AST.putAnnotation("parmtype", Long.valueOf(ptype));
			
			Aast typ = (tp_AST == null) ? ((buf_AST == null) ? vt_AST : buf_AST) : tp_AST;
			if (typ != null)
			parameter_spec_AST.putAnnotation("type", Long.valueOf(typ.getType()));
			}
			
			// remember if this is an OO parameter def or a user-defined function parameter def
			parameter_spec_AST.putAnnotation("isOO", oo);
			
			parameter_spec_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_29);
		}
		returnAST = parameter_spec_AST;
	}
	
/**
 * Match the <code>integer-field = PROC-HANDLE</code> clause of the
 * {@link #run_stored_proc_stmt} rule. This matches an {@link #lvalue}
 * followed by an <code>EQUALS</code> and then another <code>lvalue</code>.
 * The result is rooted at an <code>ASSIGN</code> node. This is separated
 * to allow the tree to be built properly.  Also called from the
 * {@link #close_stored_proc_stmt}.
 */
	public final void assign_proc_handle() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast assign_proc_handle_AST = null;
		Token  eq = null;
		Aast eq_AST = null;
		
		try {      // for error handling
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			eq = LT(1);
			eq_AST = (Aast)astFactory.create(eq);
			astFactory.makeASTRoot(currentAST, eq_AST);
			match(EQUALS);
			eq_AST.setType(ASSIGN);
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			assign_proc_handle_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_244);
		}
		returnAST = assign_proc_handle_AST;
	}
	
/**
 * Implements the 2nd lowest precedence level of Progress 4GL expressions
 * <code>KW_AND</code> (the logical AND) operator.  This also matches the
 * bitwise AND operator.
 * <p>
 * This is only called by the top level {@link #expr} rule.  This method
 * calls the {@link #bitwise_xor_expr} rule.
 * <p>
 * There is a bogus ambiguity warning generated by this rule (which occurs
 * because of the addition of the special <code>IF THEN ELSE</code> function
 * (see {@link #if_func}) in the {@link #primary_expr} rule. No real ambiguity
 * seems to exist and no errors can be found, so warnings have been disabled.
 * <p>
 * See the top level expression parsing rule {@link #expr} for more details.
 */
	public final void log_and_expr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast log_and_expr_AST = null;
		Aast bx1_AST = null;
		Token  kwa = null;
		Aast kwa_AST = null;
		
		try {      // for error handling
			bitwise_xor_expr();
			bx1_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1646:
			do {
				if ((LA(1)==KW_AND) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					kwa = LT(1);
					kwa_AST = (Aast)astFactory.create(kwa);
					astFactory.makeASTRoot(currentAST, kwa_AST);
					match(KW_AND);
					
					if (isEnum(bx1_AST))
					{
					saveAndReplaceType(kwa_AST, BITWISE_AND);
					}
					
					checkExtraSpace(kwa_AST, false);
					matchAssign = false; 
					
					bitwise_xor_expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1646;
				}
				
			} while (true);
			}
			log_and_expr_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = log_and_expr_AST;
	}
	
/**
 * Implements the 2nd lowest precedence level of Progress 4GL expressions
 * <code>KW_XOR</code> (the bitwise XOR) operator.
 * <p>
 * This is only called by the top level {@link #expr} rule.  This method
 * calls the {@link #log_not_expr} rule.
 * <p>
 * There is a bogus ambiguity warning generated by this rule (which occurs
 * because of the addition of the special <code>IF THEN ELSE</code> function
 * (see {@link #if_func}) in the {@link #primary_expr} rule. No real ambiguity
 * seems to exist and no errors can be found, so warnings have been disabled.
 * <p>
 * See the top level expression parsing rule {@link #expr} for more details.
 */
	public final void bitwise_xor_expr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast bitwise_xor_expr_AST = null;
		Token  kwx = null;
		Aast kwx_AST = null;
		
		try {      // for error handling
			log_not_expr();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1649:
			do {
				if ((LA(1)==KW_XOR) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					kwx = LT(1);
					kwx_AST = (Aast)astFactory.create(kwx);
					astFactory.makeASTRoot(currentAST, kwx_AST);
					match(KW_XOR);
					
					// we do this for consistency only, it could have stayed as KW_XOR because it is
					// unambiguous
					saveAndReplaceType(kwx_AST, BITWISE_XOR);
					checkExtraSpace(kwx_AST, false);
					matchAssign = false; 
					
					log_not_expr();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1649;
				}
				
			} while (true);
			}
			bitwise_xor_expr_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = bitwise_xor_expr_AST;
	}
	
/**
 * Implements the 4th lowest precedence level of Progress 4GL expressions
 * <code>KW_NOT</code> (the logical NOT) operator.
 * <p>
 * This is only called by the 2nd level {@link #log_and_expr} rule.
 * This method calls the {@link #compare_expr} rule.
 * <p>
 * See the top level expression parsing rule {@link #expr} for more details.
 */
	public final void log_not_expr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast log_not_expr_AST = null;
		Token  nt = null;
		Aast nt_AST = null;
		Aast ce_AST = null;
		
		try {      // for error handling
			{
			if ((LA(1)==KW_NOT) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				nt = LT(1);
				nt_AST = (Aast)astFactory.create(nt);
				astFactory.makeASTRoot(currentAST, nt_AST);
				match(KW_NOT);
				matchAssign = false;
			}
			else if ((_tokenSet_24.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			compare_expr();
			ce_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			if (nt_AST != null && isEnum(ce_AST))
			{
			saveAndReplaceType(nt_AST, BITWISE_NOT);
			}
			
			log_not_expr_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = log_not_expr_AST;
	}
	
/**
 * Implements the 5th lowest precedence level of Progress 4GL expressions
 * - the comparison operators.
 * <p>
 * This is only called by the 3nd level {@link #log_not_expr} rule. This  
 * method subsequently calls the {@link #sum_expr} rule.
 * <p>
 * Provides the following operators:
 * <pre>
 *    EQUALS or KW_EQ 
 *    NOT_EQ or KW_NE
 *    GT     or KW_GT
 *    LT     or KW_LT
 *    GTE    or KW_GTE
 *    LTE    or KW_LTE
 *    KW_BEGINS
 *    KW_MATCHES
 *    KW_CONTAINS
 * </pre>
 * <p>
 * When in an embedded SQL statement, the following additional operators
 * are supported:
 * <pre>
 *    KW_BETWEEN
 *    NOT_BETWEEN
 *    KW_LIKE
 *    NOT_LIKE
 *    KW_IN
 *    NOT_IN
 *    IS_NULL
 *    IS_NOT_NULL
 * </pre>
 * <p>
 * If this is called from within a <code>WHERE</code> clause that is in
 * an SQL {@link #select_stmt}, then all forms of sub-select are supported
 * in this rule. Uses {@link #sub_select_stmt} and
 * {@link #in_operator_sub_select_stmt} to provide this support.
 * <p>
 * Note that to eliminate ambiguity with the unreserved keywords listed
 * above, if any of these keywords are found in the proper operator position 
 * we reset the token type to the associated non-keyword operator's type.
 * <p>
 * The other two alternative approaches each cause problems:
 * <ul>
 *    <li> If the token type is not forced to the non-keyword type, then
 *         expression evaluation would be more complicated because more
 *         than one token type would generate the same action.
 *    <li> If the token type of the keyword was forced to the non-keyword
 *         corresponding operator by the lexer's keyword lookup mechanism, 
 *         then the non-reserved keywords could never be used as user-defined 
 *         symbols since the token type would always be set to the operators
 *         instead.  This would not match how Progress works.
 * </ul>
 * <p>
 * The approach taken allows for the lexer to <b>always</b> set the token
 * type to the unreserved keyword (e.g. the text <code>EQ</code> is set to
 * the <code>KW_EQ</code> token type.  Then it is the parser's context that
 * determines if that token matches into this rule or not.  If so, the token
 * type is rewritten to the correct matching operator. In this case it would
 * be set to the token type <code>EQUALS</code> which is the same as if the
 * lexer had encountered the '=' character.  This generates a simple tree
 * where the operators are well known.  However, if the keyword is used as
 * a symbol name (e.g. a variable), this will work unchanged as the lexer
 * won't hard code the type as the operator.  See {@link #lvalue} for more
 * details.
 * <p>
 * See the top level expression parsing rule {@link #expr} for more details.
 * <p>
 * Note that ANTLR reports ambiguity between this rule and the {@link #assign}
 * rule.  The ambiguity is resolved by the ordering of the top level rule
 * placing the <code>ASSIGN</code> language statement (which is unambiguous)
 * with higher precedence than the <code>assignment</code> rule. As long as
 * the <code>assign</code> rule is only used by the <code>assign_stmt</code>
 * rule, there is no real ambiguity.  For this reason, ambiguity warnings
 * are suppressed for this rule.
 */
	public final void compare_expr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast compare_expr_AST = null;
		Token  eq = null;
		Aast eq_AST = null;
		Token  ne = null;
		Aast ne_AST = null;
		Token  gt = null;
		Aast gt_AST = null;
		Token  lt = null;
		Aast lt_AST = null;
		Token  ge = null;
		Aast ge_AST = null;
		Token  le = null;
		Aast le_AST = null;
		Token  kwb = null;
		Aast kwb_AST = null;
		Token  kwm = null;
		Aast kwm_AST = null;
		Token  kwc = null;
		Aast kwc_AST = null;
		Token  nb = null;
		Aast nb_AST = null;
		Token  be = null;
		Aast be_AST = null;
		Token  nl = null;
		Aast nl_AST = null;
		Token  li = null;
		Aast li_AST = null;
		Token  ni = null;
		Aast ni_AST = null;
		Token  in = null;
		Aast in_AST = null;
		Token  inn = null;
		Aast inn_AST = null;
		Token  no = null;
		Aast no_AST = null;
		Token  nu = null;
		Aast nu_AST = null;
		Token  inu = null;
		Aast inu_AST = null;
		Token  nu2 = null;
		Aast nu2_AST = null;
		
		try {      // for error handling
			
			boolean inBetween = false;
			boolean inLike    = false;
			boolean inIn      = false;
			boolean isNull    = false;
			boolean avoid     = false;
			
			sum_expr();
			astFactory.addASTChild(currentAST, returnAST);
			
			// additional code to bypass the operator checking in the case
			// where were ARE NOT in embedded SQL mode and there is a following
			// keyword that might be confused with an embedded SQL operator
			// (for example, in def_var_stmt where there is a like_clause that
			// follows a format_string)
			
			int ttype = LA(1);
			
			avoid = !embeddedSql && (ttype == KW_LIKE    ||
			ttype == KW_NOT     ||
			ttype == KW_IN      ||
			ttype == KW_BETWEEN ||
			ttype == KW_IS); 
			
			{
			if (((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( !avoid )) {
				{
				_loop1659:
				do {
					if ((_tokenSet_245.member(LA(1))) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						
						matchAssign = false; 
						
						{
						switch ( LA(1)) {
						case EQUALS:
						{
							Aast tmp1463_AST = null;
							tmp1463_AST = (Aast)astFactory.create(LT(1));
							astFactory.makeASTRoot(currentAST, tmp1463_AST);
							match(EQUALS);
							break;
						}
						case KW_EQ:
						{
							eq = LT(1);
							eq_AST = (Aast)astFactory.create(eq);
							astFactory.makeASTRoot(currentAST, eq_AST);
							match(KW_EQ);
							checkExtraSpace(eq_AST, true); eq_AST.setType(EQUALS);
							break;
						}
						case NOT_EQ:
						{
							Aast tmp1464_AST = null;
							tmp1464_AST = (Aast)astFactory.create(LT(1));
							astFactory.makeASTRoot(currentAST, tmp1464_AST);
							match(NOT_EQ);
							break;
						}
						case KW_NE:
						{
							ne = LT(1);
							ne_AST = (Aast)astFactory.create(ne);
							astFactory.makeASTRoot(currentAST, ne_AST);
							match(KW_NE);
							checkExtraSpace(ne_AST, true); ne_AST.setType(NOT_EQ);
							break;
						}
						case GT:
						{
							Aast tmp1465_AST = null;
							tmp1465_AST = (Aast)astFactory.create(LT(1));
							astFactory.makeASTRoot(currentAST, tmp1465_AST);
							match(GT);
							break;
						}
						case KW_GT:
						{
							gt = LT(1);
							gt_AST = (Aast)astFactory.create(gt);
							astFactory.makeASTRoot(currentAST, gt_AST);
							match(KW_GT);
							checkExtraSpace(gt_AST, true); gt_AST.setType(GT);
							break;
						}
						case LT:
						{
							Aast tmp1466_AST = null;
							tmp1466_AST = (Aast)astFactory.create(LT(1));
							astFactory.makeASTRoot(currentAST, tmp1466_AST);
							match(LT);
							break;
						}
						case KW_LT:
						{
							lt = LT(1);
							lt_AST = (Aast)astFactory.create(lt);
							astFactory.makeASTRoot(currentAST, lt_AST);
							match(KW_LT);
							checkExtraSpace(lt_AST, true); lt_AST.setType(LT);
							break;
						}
						case GTE:
						{
							Aast tmp1467_AST = null;
							tmp1467_AST = (Aast)astFactory.create(LT(1));
							astFactory.makeASTRoot(currentAST, tmp1467_AST);
							match(GTE);
							break;
						}
						case KW_GTE:
						{
							ge = LT(1);
							ge_AST = (Aast)astFactory.create(ge);
							astFactory.makeASTRoot(currentAST, ge_AST);
							match(KW_GTE);
							checkExtraSpace(ge_AST, true); ge_AST.setType(GTE);
							break;
						}
						case LTE:
						{
							Aast tmp1468_AST = null;
							tmp1468_AST = (Aast)astFactory.create(LT(1));
							astFactory.makeASTRoot(currentAST, tmp1468_AST);
							match(LTE);
							break;
						}
						case KW_LTE:
						{
							le = LT(1);
							le_AST = (Aast)astFactory.create(le);
							astFactory.makeASTRoot(currentAST, le_AST);
							match(KW_LTE);
							checkExtraSpace(le_AST, true); le_AST.setType(LTE);
							break;
						}
						case KW_BEGINS:
						{
							kwb = LT(1);
							kwb_AST = (Aast)astFactory.create(kwb);
							astFactory.makeASTRoot(currentAST, kwb_AST);
							match(KW_BEGINS);
							checkExtraSpace(kwb_AST, false);
							break;
						}
						case KW_MATCHES:
						{
							kwm = LT(1);
							kwm_AST = (Aast)astFactory.create(kwm);
							astFactory.makeASTRoot(currentAST, kwm_AST);
							match(KW_MATCHES);
							checkExtraSpace(kwm_AST, false);
							break;
						}
						case KW_CONTAINS:
						{
							kwc = LT(1);
							kwc_AST = (Aast)astFactory.create(kwc);
							astFactory.makeASTRoot(currentAST, kwc_AST);
							match(KW_CONTAINS);
							checkExtraSpace(kwc_AST, false);
							break;
						}
						default:
							if (((_tokenSet_246.member(LA(1))))&&( embeddedSql )) {
								{
								switch ( LA(1)) {
								case KW_BETWEEN:
								{
									Aast tmp1469_AST = null;
									tmp1469_AST = (Aast)astFactory.create(LT(1));
									astFactory.makeASTRoot(currentAST, tmp1469_AST);
									match(KW_BETWEEN);
									inBetween = true;
									break;
								}
								case KW_LIKE:
								{
									Aast tmp1470_AST = null;
									tmp1470_AST = (Aast)astFactory.create(LT(1));
									astFactory.makeASTRoot(currentAST, tmp1470_AST);
									match(KW_LIKE);
									inLike = true;
									break;
								}
								case KW_IN:
								{
									Aast tmp1471_AST = null;
									tmp1471_AST = (Aast)astFactory.create(LT(1));
									astFactory.makeASTRoot(currentAST, tmp1471_AST);
									match(KW_IN);
									inIn = true;
									break;
								}
								default:
									if ((LA(1)==KW_NOT) && (LA(2)==KW_BETWEEN)) {
										nb = LT(1);
										nb_AST = (Aast)astFactory.create(nb);
										astFactory.makeASTRoot(currentAST, nb_AST);
										match(KW_NOT);
										be = LT(1);
										be_AST = (Aast)astFactory.create(be);
										match(KW_BETWEEN);
										hide(be);
										
										nb_AST.setType(NOT_BETWEEN);
										inBetween = true;
										
									}
									else if ((LA(1)==KW_NOT) && (LA(2)==KW_LIKE)) {
										nl = LT(1);
										nl_AST = (Aast)astFactory.create(nl);
										astFactory.makeASTRoot(currentAST, nl_AST);
										match(KW_NOT);
										li = LT(1);
										li_AST = (Aast)astFactory.create(li);
										match(KW_LIKE);
										hide(li);
										
										nb_AST.setType(NOT_LIKE);
										inLike = true;
										
									}
									else if ((LA(1)==KW_NOT) && (LA(2)==KW_IN)) {
										ni = LT(1);
										ni_AST = (Aast)astFactory.create(ni);
										astFactory.makeASTRoot(currentAST, ni_AST);
										match(KW_NOT);
										in = LT(1);
										in_AST = (Aast)astFactory.create(in);
										match(KW_IN);
										hide(in);
										
										ni_AST.setType(NOT_IN);
										inIn = true;
										
									}
									else if ((LA(1)==KW_IS) && (LA(2)==KW_NOT)) {
										inn = LT(1);
										inn_AST = (Aast)astFactory.create(inn);
										astFactory.makeASTRoot(currentAST, inn_AST);
										match(KW_IS);
										no = LT(1);
										no_AST = (Aast)astFactory.create(no);
										match(KW_NOT);
										hide(no);
										nu = LT(1);
										nu_AST = (Aast)astFactory.create(nu);
										match(KW_NULL);
										hide(nu);
										
										in_AST.setType(IS_NOT_NULL);
										isNull = true;
										
									}
									else if ((LA(1)==KW_IS) && (LA(2)==KW_NULL)) {
										inu = LT(1);
										inu_AST = (Aast)astFactory.create(inu);
										astFactory.makeASTRoot(currentAST, inu_AST);
										match(KW_IS);
										nu2 = LT(1);
										nu2_AST = (Aast)astFactory.create(nu2);
										match(KW_NULL);
										hide(nu2);
										
										inu_AST.setType(IS_NULL);
										isNull = true;
										
									}
								else {
									throw new NoViableAltException(LT(1), getFilename());
								}
								}
								}
							}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						}
						}
						{
						if (((LA(1)==LPARENS) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( inIn )) {
							in_operator_parms();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if (((_tokenSet_247.member(LA(1))) && (LA(2)==KW_EXISTS||LA(2)==KW_SELECT||LA(2)==LPARENS) && (_tokenSet_152.member(LA(3))))&&( embeddedSql && selectNestLevel > 1 )) {
							sub_select_stmt();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if (((_tokenSet_24.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( !isNull )) {
							sum_expr();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						
						}
						{
						if (((LA(1)==KW_AND) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( inBetween )) {
							and_expr();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if (((LA(1)==KW_ESCAPE) && (LA(2)==STRING) && (_tokenSet_3.member(LA(3))))&&( inLike )) {
							escape_char();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if (((LA(1)==KW_IN||LA(1)==KW_NOT) && (LA(2)==KW_IN||LA(2)==LPARENS) && (_tokenSet_24.member(LA(3))))&&( embeddedSql && selectNestLevel > 1 )) {
							in_operator_sub_select_stmt();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
						}
						else {
							throw new NoViableAltException(LT(1), getFilename());
						}
						
						}
					}
					else {
						break _loop1659;
					}
					
				} while (true);
				}
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			compare_expr_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = compare_expr_AST;
	}
	
/**
 * Qualifying 3rd expression for the <code>BETWEEN</code> operator.
 */
	public final void and_expr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast and_expr_AST = null;
		
		try {      // for error handling
			Aast tmp1472_AST = null;
			tmp1472_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1472_AST);
			match(KW_AND);
			sum_expr();
			astFactory.addASTChild(currentAST, returnAST);
			and_expr_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = and_expr_AST;
	}
	
/**
 * Matches <code>ESCAPE</code> keyword and a following string literal
 * for the <code>LIKE</code> operator.
 */
	public final void escape_char() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast escape_char_AST = null;
		
		try {      // for error handling
			Aast tmp1473_AST = null;
			tmp1473_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1473_AST);
			match(KW_ESCAPE);
			Aast tmp1474_AST = null;
			tmp1474_AST = (Aast)astFactory.create(LT(1));
			astFactory.addASTChild(currentAST, tmp1474_AST);
			match(STRING);
			escape_char_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = escape_char_AST;
	}
	
/**
 * Implements the 7th precedence level of Progress 4GL expressions, the
 * <code>MULTIPLY</code>, <code>DIVIDE</code> and <code>KW_MOD</code>
 * operators.
 * <p>
 * This is only called by the 5th level {@link #sum_expr} rule. This  
 * method subsequently calls the {@link #un_type} rule. 
 * <p>
 * See the top level expression parsing rule {@link #expr} for more details.
 * <p>
 * Note that ANTLR reports ambiguity between this rule and the {@link #assign}
 * rule.  The ambiguity is resolved by the ordering of the top level rule
 * placing the <code>ASSIGN</code> language statement (which is unambiguous)
 * with higher precedence than the <code>assignment</code> rule. As long as
 * the <code>assign</code> rule is only used by the <code>assign_stmt</code>
 * rule, there is no real ambiguity.  For this reason, ambiguity warnings
 * are suppressed for this rule.
 */
	public final void prod_expr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast prod_expr_AST = null;
		
		try {      // for error handling
			un_type();
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1669:
			do {
				if ((LA(1)==KW_MOD||LA(1)==MULTIPLY||LA(1)==DIVIDE) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					{
					switch ( LA(1)) {
					case MULTIPLY:
					{
						Aast tmp1475_AST = null;
						tmp1475_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp1475_AST);
						match(MULTIPLY);
						break;
					}
					case DIVIDE:
					{
						Aast tmp1476_AST = null;
						tmp1476_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp1476_AST);
						match(DIVIDE);
						break;
					}
					case KW_MOD:
					{
						Aast tmp1477_AST = null;
						tmp1477_AST = (Aast)astFactory.create(LT(1));
						astFactory.makeASTRoot(currentAST, tmp1477_AST);
						match(KW_MOD);
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
					
					matchAssign = false; 
					
					un_type();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1669;
				}
				
			} while (true);
			}
			prod_expr_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = prod_expr_AST;
	}
	
/**
 * Implements the 8th precedence level of Progress 4GL expressions, the
 * unary operators <code>PLUS</code> and <code>MINUS</code>. This rule is
 * different in structure from the previous levels, as the operator is
 * leftmost and optional.  There is always a right operand.
 * <p>
 * In any case where the programmer did not use intervening whitespace
 * between the operator and a literal value (integer or decimal), the 
 * lexer will have already included that sign character in the text of
 * the literal's token.  So this rule would not apply.  This rule can only
 * be encountered when there is a separate operator token in the token stream
 * which only occurs in the absence of whitespace. Since postfixed unary
 * operators can only occur on literals and then only without intervening
 * whitespace, this rule never has to match on a postfixed unary operator.
 * <p>
 * This is only called by the 6th level {@link #prod_expr} rule. This  
 * method subsequently calls the {@link #primary_expr} rule. 
 * <p>
 * See the top level expression parsing rule {@link #expr} for more details.
 */
	public final void un_type() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast un_type_AST = null;
		Token  m = null;
		Aast m_AST = null;
		Token  p = null;
		Aast p_AST = null;
		Aast l_AST = null;
		Token  eq = null;
		Aast eq_AST = null;
		Aast e_AST = null;
		
		try {      // for error handling
			
			boolean realAssign = false;
			boolean lstmt  = false;
			
			if (isLstmt(LA(1)) && LA(2) == LPARENS)
			{
			lstmt = true;
			}
			
			{
			if (((LA(1)==MINUS))&&(
              !(allowStringMatch &&
                LA(2) == MINUS)   &&
                (followedByWhitespace(LT(1)) ||
                 LA(2) == LPARENS)
           )) {
				m = LT(1);
				m_AST = (Aast)astFactory.create(m);
				astFactory.makeASTRoot(currentAST, m_AST);
				match(MINUS);
				m_AST.setType( UN_MINUS ); matchAssign = false;
			}
			else if (((LA(1)==PLUS))&&(
              !(allowStringMatch &&
                LA(2) == PLUS)   &&
                (followedByWhitespace(LT(1)) ||
                 LA(2) == LPARENS)
           )) {
				p = LT(1);
				p_AST = (Aast)astFactory.create(p);
				astFactory.makeASTRoot(currentAST, p_AST);
				match(PLUS);
				p_AST.setType( UN_PLUS ); matchAssign = false;
			}
			else if ((_tokenSet_85.member(LA(1)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			chained_object_members();
			l_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			if (((LA(1)==EQUALS) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( matchAssign && isLvalue(l_AST) )) {
				eq = LT(1);
				eq_AST = (Aast)astFactory.create(eq);
				astFactory.makeASTRoot(currentAST, eq_AST);
				match(EQUALS);
				
				eq_AST.setType(ASSIGN);
				realAssign = true;
				matchAssign = false;
				
				// we need to decrement exprLvl so that the r-value will have a chance to wrap in 
				// EXPRESSION.
				exprLvl--;
				
				if (l_AST.getType() == COM_INVOCATION && l_AST.getChildAt(1).getType() == COM_METHOD)
				{
				l_AST.getChildAt(1).setType(COM_PROPERTY);
				}
				
				expr();
				e_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				// this is an assignment, so no need to wrap the assignment's 'expr' call in an
				// EXPRESSION node; we need to mark this flag to know the ASSIGNMENT doesn't need
				// an EXPRESSION child
				skipExpression = true;
				
				if (lstmt)
				{
				restoreAssignStyleStmt(l_AST);
				}
				
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			
			if (realAssign && !lstmt)
			{
			restoreEqualsOperator(l_AST, eq_AST);
			}
			
			un_type_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = un_type_AST;
	}
	
/**
 * Implements the 10th and highest precendence level of Progress 4GL expressions, the parenthesis
 * precedence operators and any all of the common expression constructs ("terms").  The following
 * are supported (in this order):
 * <p>
 * <ol>
 *    <li> {@link #literal}
 *    <li> {@link #new_phrase}
 *    <li> {@link #sql_aggregate_funcs}
 *    <li> {@link #seek_func}
 *    <li> {@link #cast_func}
 *    <li> {@link #type_of_func}
 *    <li> {@link #sequence_funcs}
 *    <li> {@link #dynamic_function_func}
 *    <li> {@link #frame_funcs}
 *    <li> {@link #record_funcs}
 *    <li> {@link #func_call}
 *    <li> {@link #method_call}
 *    <li> {@link #class_event}
 *    <li> {@link #user_defined_type_name}
 *    <li> {@link #accum_function}
 *    <li> {@link #can_find_function}
 *    <li> {@link #lvalue}
 *    <li> {@link #postfix_funcs}
 *    <li> {@link #if_func}
 *    <li> {@link #super_function}
 * </ol>
 * <p>
 * Progress has several unusual functions that don't parenthesize parameters
 * (e.g. available or ambiguous) and sometimes the function names are even
 * postfixed after the first parameter (entered or not entered)! This
 * design requires that such functions have hard coded matching rules that
 * are called from here.
 * <p>
 * This rule is different in structure from the previous levels, as the
 * there is just a set of alternatives and one of them allows direct recursion
 * back to the top level <code>expr</code> expression entry point.
 * <p>
 * Due to the nature of the <code>func_call</code> and <code>lvalue</code>
 * rules, there is an inherent ambiguity since either of these can be
 * comprised of a user-defined symbol.  We use 2 tricks to resolve this
 * ambiguity:
 * <ul>
 *    <li> Both rule references must specify a match with the full set of
 *         possible token types that can be seen as user-defined symbols.
 *         This is done by referencing a common {@link #symbol} rule. This
 *         rule reference generates the proper lookahead code in the top
 *         level parser rules, such that these rules will be triggered
 *         when necessary.  By placing the more specific of the two rules
 *         <code>func_call</code> first, the lack of a match on the
 *         subsequent parenthesis causes processing to drop through to
 *         <code>lvalue</code>, resolving the ambiguity generated by the
 *         need to have a common reference to the <code>symbol</code> rule.
 *         It is most important to understand that without this common rule
 *         reference, the generated lookahead code would be incorrect and
 *         these rules would not work.
 *    <li> When these rules are properly matched by lookahead, the symbol
 *         token types are rewritten to match the function or variable
 *         types that are required by the respective rules.  This is critical
 *         to allowing expression evaluation to occur, otherwise there would
 *         be no real record of the proper token type (be it an lvalue or
 *         function call).  In addition, these token types are data type
 *         specific (e.g. there is a type for <code>VAR_INT</code>, 
 *         <code>VAR_LOGICAL</code> and all other variable data types).
 * </ul>
 * <p>
 * <code>method_call</code> is similar to <code>func_call</code> and is
 * disambiguated from <code>lvalue</code> and <code>func_call</code> with a
 * semantic predicate that does a method name lookup.
 * <p>
 * Similar to the problems with <code>lvalue</code> and <code>func_call</code>
 * <code>record_funcs</code> are also ambiguous since there is a
 * {@link #record} which is required in the leftmost token when dealing with
 * a postfixed function name.  This ambiguity is resolved by a query to the
 * schema namespace in a semantic predicate. If the symbol is a record, the
 * record rule is matched, otherwise it is bypassed.
 * <p>
 * This is only called by the 8th level {@link #chained_object_members} rule.
 * <p>
 * See the top level expression parsing rule {@link #expr} for more details.
 * <p>
 * ANTLR will detect ambiguity between many of these  alternatives.  This has
 * been determined to be non-ambiguous for the Progress domain so ambiguity
 * warnings have been disabled. 
 */
	public final void primary_expr() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast primary_expr_AST = null;
		Aast q_AST = null;
		Aast l_AST = null;
		Aast p1_AST = null;
		Aast p2_AST = null;
		
		try {      // for error handling
			
			boolean connected = false;
			boolean isStatic  = false;
			String  nextTxt   = LT(1).getText();
			
			// fixup the LT(1) by discarding the crap and putting the last token
			// back together
			if (isMalformedSymbolFuncCall())
			{
			nextTxt = reassembleMalformedSymbol();
			}
			
			// the connected built-in can match an unquoted dbname that can
			// appear as a symbol (but we can't JUST match on that since it
			// can also be a var which appears here as a symbol token), so we
			// temporarily enable symbol matching in the lvalue rule
			if (LA(1) == KW_CONN_ED && LA(2) == LPARENS)
			{
			connected = true;
			allowSymbolMatch = true;
			}
			
			{
			if ((_tokenSet_65.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				literal();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1)==KW_NEW) && (_tokenSet_0.member(LA(2))) && (LA(3)==PLUS||LA(3)==LPARENS))&&(
              LA(2) != LPARENS &&
              (!sym.isTable(LT(2).getText()) || sym.canLoadClass(LT(2).getText()))
           )) {
				new_phrase();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1)==KW_GETCLASS) && (LA(2)==LPARENS) && (_tokenSet_0.member(LA(3))))&&(
              LA(2) == LPARENS && sym.isBuiltinFunction(nextTxt)
           )) {
				get_class_func();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_248.member(LA(1))) && (LA(2)==LPARENS) && (_tokenSet_152.member(LA(3))))&&( embeddedSql )) {
				sql_aggregate_funcs();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_SEEK) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				seek_func();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_CAST) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				cast_func();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_TYPE_OF) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				type_of_func();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_CUR_VAL||LA(1)==KW_NEXT_VAL) && (LA(2)==LPARENS) && (_tokenSet_15.member(LA(3)))) {
				sequence_funcs();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_DYN_FUNC) && (LA(2)==LPARENS) && (_tokenSet_24.member(LA(3)))) {
				dynamic_function_func();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_249.member(LA(1))) && (LA(2)==LPARENS) && ((LA(3) >= FILEROOT && LA(3) <= JUNK))) {
				frame_funcs();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_250.member(LA(1))) && (_tokenSet_251.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
              (LA(1) != KW_ERROR    && 
               LA(1) != KW_ROWID    && 
               LA(1) != KW_REJECTED && 
               LA(1) != KW_ROW_STAT && 
               LA(1) != KW_DATA_SM  && 
               LA(1) != KW_REC_LEN) || LA(2) == LPARENS
           )) {
				record_funcs();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_252.member(LA(1))) && (LA(2)==LPARENS) && (_tokenSet_79.member(LA(3))))&&( 
              !evaluatingExpression  &&
              LA(1) != KW_DYN_NEW    &&
              LA(1) != KW_SUPER      &&
              ((LA(1) >= BEGIN_OO_METH && LA(1) <= END_OO_METH) ||
               sym.isObjectMethod(null, nextTxt, inStaticCtxt))
           )) {
				method_call(null, inStaticCtxt, false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_253.member(LA(1))) && (LA(2)==LPARENS) && (_tokenSet_79.member(LA(3))))&&( 
              (LA(1) >= BEGIN_FUNCTYPES && LA(1) <= END_FUNCTYPES) ||
              (LA(1) != KW_DYN_NEW && sym.lookupFunction(nextTxt) != -1)
           )) {
				func_call();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_254.member(LA(1))) && (LA(2)==COLON) && (LA(3)==KW_PUBLISH||LA(3)==KW_SUBSCRIB||LA(3)==KW_UNSUBSCR))&&( 
              LA(1) == CLASS_EVENT ||
              ((inStaticCtxt  && (sym.lookupDataMember(null, nextTxt, true) == CLASS_EVENT)) ||
               (!inStaticCtxt && (sym.lookupDataMember(null, nextTxt) == CLASS_EVENT)))
           )) {
				isStatic = sym.isStaticDataMember(null, nextTxt);
				class_event(null, isStatic);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( 
              !evaluatingExpression                           &&
              LA(1) != KW_DYN_NEW                             &&
              LA(1) != KW_SUPER                               &&
              !isQualifiedFieldNameQuirk(LT(1), LT(2), LT(3)) &&
              ((inStaticCtxt  && (sym.lookupDataMember(null, nextTxt, true) != -1)) ||
               (!inStaticCtxt && (sym.lookupDataMember(null, nextTxt) != -1)))
           )) {
				isStatic = sym.isStaticDataMember(null, nextTxt);
				object_data_member(null, isStatic);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_0.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
              !evaluatingExpression                           &&
              LA(1) != KW_DYN_NEW                             &&
              LA(1) != KW_SUPER                               &&
              !isQualifiedFieldNameQuirk(LT(1), LT(2), LT(3)) && 
              sym.lookupVariable(nextTxt) == -1               &&
              !(sym.isField(nextTxt) && LA(2) != COLON)       &&
              !(LA(1) == KW_BUFFER && sym.isTable(LT(2).getText())) &&
              sym.canLoadClass(nextTxt)
           )) {
				user_defined_type_name();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_ACCUM) && (_tokenSet_24.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				accum_function();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_CAN_FIND) && (LA(2)==LPARENS) && (_tokenSet_255.member(LA(3)))) {
				can_find_function();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((LA(1)==KW_SUPER) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(2) != COLON )) {
				super_function();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				lvalue();
				q_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				{
				if (((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( 
                   (q_AST.getType() == KW_FRAME || q_AST.getType() == KW_BROWSE) &&
                   ((sym.lookupVariable(LT(1).getText()) != -1) ||
                    (sym.isField(LT(1).getText())))
                )) {
					lvalue();
					l_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
					{
					if (((LA(1)==KW_NOT||LA(1)==KW_ENTERED) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
                        (LA(1) == KW_NOT && LA(2) == KW_ENTERED) || 
                        (LA(1) == KW_ENTERED)              
                     )) {
						postfix_funcs();
						p1_AST = (Aast)returnAST;
						astFactory.addASTChild(currentAST, returnAST);
					}
					else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					}
					else {
						throw new NoViableAltException(LT(1), getFilename());
					}
					
					}
				}
				else if (((LA(1)==KW_NOT||LA(1)==KW_ENTERED) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&(
                   (LA(1) == KW_NOT && LA(2) == KW_ENTERED) || 
                   (LA(1) == KW_ENTERED)              
                )) {
					postfix_funcs();
					p2_AST = (Aast)returnAST;
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
			}
			else if ((LA(1)==KW_IF) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				if_func();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==LPARENS)) {
				Aast tmp1478_AST = null;
				tmp1478_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1478_AST);
				match(LPARENS);
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				rparens();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			primary_expr_AST = (Aast)currentAST.root;
			
			if (connected)
			{
			allowSymbolMatch = false;
			}
			
			// rewrite entered/not entered to match normal func call 
			if (p1_AST != null || p2_AST != null)
			{
			Aast post = (p1_AST != null ? p1_AST : p2_AST);
			
			// attach the main lvalue
			q_AST.setNextSibling(null);
			post.setFirstChild(q_AST);
			
			// avoid infinite loops in tree building ops, so we "do it 
			// ourselves"
			if (l_AST != null)
			{
			l_AST.setNextSibling(null);
			q_AST.setNextSibling(l_AST);
			}
			
			primary_expr_AST = post;
			}
			
			currentAST.root = primary_expr_AST;
			currentAST.child = primary_expr_AST!=null &&primary_expr_AST.getFirstChild()!=null ?
				primary_expr_AST.getFirstChild() : primary_expr_AST;
			currentAST.advanceChildToEnd();
			primary_expr_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = primary_expr_AST;
	}
	
/**
 * Helper rule to match a {@link #method_call}, {@link #class_event} or an 
 * {@link #object_data_member} in a {@link #chained_object_members}. This
 * rule will match one or the other and will disambiguate the two based on
 * a lookup of the method name in the given class' namespace. This method
 * MUST ONLY be used from the 3rd-most token from the left of the expression
 * (or further right than that) since it uses {@link #any_symbol_at_all} to
 * pull even reserved keywords into this rule and then it rewrites the token
 * types before lookahead picks the subrules. This allows the subrules to
 * be common code that are also called from {@link #primary_expr} (where they
 * are not allowed to match with reserved keywords, even in Progress, and doing
 * so would hose the parser bigtime).
 *
 * @param    cls
 *           Class name containing the members for which to search.
 * @param    isStatic    
 *           <code>true</code> if this is a static reference.
 * @param    isSuper    
 *           <code>true</code> if the rvalue refnode is the SUPER keyword.
 */
	public final void downstream_chained_reference(
		String cls, boolean isStatic, boolean isSuper
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast downstream_chained_reference_AST = null;
		
		try {      // for error handling
			
			CommonToken tok      = (CommonToken) LT(1);
			String      txt      = tok.getText();
			int         type     = tok.getType();
			boolean     unquoted = false;
			int         newtype  = -1;
			
			boolean     methodLookup       = false;
			boolean     instanceDataLookup = false;
			boolean     staticDataLookup   = false;
			
			boolean prevChain = sym.isChainedReference();
			sym.setChainedReference(true);
			
			boolean remove = false;
			
			// special unquoted method name matching case
			if (insideClassEvent && LA(2) != LPARENS)
			{
			if (sym.isObjectMethod(cls, txt, isStatic))
			{
			newtype  = SYMBOL;
			unquoted = true;
			}
			}
			
			if (newtype == -1)
			{
			// for a method name, LA(2) must be an LPARENS
			if (LA(2) == LPARENS)
			{
			methodLookup = true;
			
			// instance-qualified members can be static or instance, class-qualified members
			// can only be static
			newtype = sym.lookupObjectMethod(cls, txt, isStatic);
			}
			
			// there are possible constructs where an expression can be used in a language
			// statement and the following LPARENS is not related to a method call but instead
			// there is a data member being referenced; for example:
			// RUN proc IN this-object:var (INPUT some-run-stmt-param).
			// for this reason, we have checked the method case first, but if it did not match
			// then we need to check the data members even though LA(2) is LPARENS
			
			if (newtype == -1)
			{
			if (!isStatic)
			{
			instanceDataLookup = true;
			
			// instance-qualified members can be static or instance
			newtype = sym.lookupDataMember(cls, txt);
			}
			else
			{
			staticDataLookup = true;
			
			// class-qualified members can only be static
			newtype = sym.lookupDataMember(cls, txt, true);
			}
			}
			}
			
			sym.setChainedReference(prevChain);
			
			// if we have to rewrite, do it here
			if ((newtype >= BEGIN_OO_METH && newtype <= END_OO_METH)   ||
			(newtype >= BEGIN_VARTYPES && newtype <= END_VARTYPES) ||
			newtype == CLASS_EVENT                                 ||
			newtype == SYMBOL)
			{
			tok.setType(newtype);
			}
			else
			{
			System.out.printf("Lookup of %s (%s) in %s (static = %b) failed; attempted method %b, " +
			"instance data %b, static data %b;\n",
			txt,
			lookupTokenName(type),
			cls,
			isStatic,
			methodLookup,
			instanceDataLookup,
			staticDataLookup); 
			
			// must be an unreserved keyword, reserved keyword, DB_SYMBOL,
			// FILENAME, BOOL_FALSE or BOOL_TRUE that is not recognized as a
			// class member
			throw new NoViableAltException(tok, getFilename());
			}
			
			{
			if (((LA(1)==SYMBOL) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( unquoted )) {
				Aast tmp1479_AST = null;
				tmp1479_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1479_AST);
				match(SYMBOL);
			}
			else if (((_tokenSet_252.member(LA(1))) && (LA(2)==LPARENS) && (_tokenSet_79.member(LA(3))))&&( LA(1) >= BEGIN_OO_METH && LA(1) <= END_OO_METH )) {
				method_call(cls, isStatic, isSuper);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_254.member(LA(1))) && (LA(2)==COLON) && (LA(3)==KW_PUBLISH||LA(3)==KW_SUBSCRIB||LA(3)==KW_UNSUBSCR))&&( LA(1) == CLASS_EVENT )) {
				class_event(cls, isStatic);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				object_data_member(cls, isStatic);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_1.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				any_symbol_at_all();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			downstream_chained_reference_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = downstream_chained_reference_AST;
	}
	
/**
 * Matches COM method and property references, their optional parenthesized parameters list. Uses recursion
 * to support chaining.  The result will be rooted at a <code>COM_METHOD</code> or <code>COM_PROPERTY</code>
 * node.  Any parameters will be direct children using the {@link #com_parameter}, the parenthesis and commas
 * will be dropped.  This rule rewrites the token type of the first token, as it will be a symbol or reserved
 * keyword on entry. That first token is the method or property name and the original token type will be
 * saved in the <code>oldtype</code> annotation.
 * <p>
 * The {@link #reserved_or_symbol} rule is used to "pull" processing down this path but it never will be
 * matched due to the token rewriting. If a 2nd token of <code>LPARENS</code> is seen, then the result will
 * be a <code>COM_METHOD</code>, even if this is really an indexed property which uses a parenthesized list
 * of integer expressions as an index, one per array dimension.  This is a flaw which cannot be resolved
 * without information not available in the source code.  So those indexed properties will have to be
 * disambiguated from methods by some later process.
 * <p>
 * The 4GL allows a string literal to be used in place of a COM property name or COM method name. This only
 * works on a COM-HANDLE and not on a regular HANDLE referent. The STRING token is never matched at runtime
 * since the type is overwritten, but it is used for "pull" processing. This is an undocumented feature of
 * the 4GL.
 * <p>
 * There are COM property and method names that are documented in the language reference. These have some
 * special meaning or importance and thus they are given better support than the unknown interfaces in the
 * controls that are used (such interfaces are only known on systems in which those controls are
 * registered). In our case one can find the following token types set into the <code>oldtype</code>
 * annotation of a <code>COM_PROPERTY</code> or <code>COM_METHOD</code>. The following are supported:
 * <p>
 * <pre>
 * Token Type        Name                        Type
 * ---------------   --------------------------  --------------------
 * KW_CNTRL_NM       Control-Name                Property
 * KW_CONTROLS       Controls                    Property
 * KW_HEIGHT_C       Height                      Property
 * KW_HONOR_PK       HonorProKeys                Property
 * KW_HONOR_RK       HonorReturnKey              Property
 * KW_LEFT           Left                        Property
 * KW_LOADCTRL       LoadContols                 Method
 * KW_NAME           Name                        Property
 * KW_TAG            Tag                         Property
 * KW_TOP            Top                         Property
 * KW_WID_HAND       Widget-Handle               Property
 * KW_WIDTH          Width                       Property
 * </pre>
 */
	public final void com_property_or_method() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast com_property_or_method_AST = null;
		
		try {      // for error handling
			
			int oldtype  = -1;
			int current  = LA(1);
			
			if (current != COM_METHOD && current != COM_PROPERTY)
			{
			int newtype = (LA(2) == LPARENS) ? COM_METHOD : COM_PROPERTY;
			
			// save off old type
			oldtype = current;
			
			// set the type
			LT(1).setType(newtype);
			}
			
			{
			{
			switch ( LA(1)) {
			case COM_METHOD:
			{
				Aast tmp1480_AST = null;
				tmp1480_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1480_AST);
				match(COM_METHOD);
				break;
			}
			case COM_PROPERTY:
			{
				Aast tmp1481_AST = null;
				tmp1481_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1481_AST);
				match(COM_PROPERTY);
				{
				if ((LA(1)==LBRACKET) && ((LA(2) >= DOT && LA(2) <= JUNK)) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					subscript();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				break;
			}
			case STRING:
			{
				Aast tmp1482_AST = null;
				tmp1482_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1482_AST);
				match(STRING);
				break;
			}
			default:
				if ((_tokenSet_27.member(LA(1)))) {
					reserved_or_symbol();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			if ((LA(1)==LPARENS) && (_tokenSet_80.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				lparens();
				astFactory.addASTChild(currentAST, returnAST);
				{
				if ((_tokenSet_80.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
					com_parameter();
					astFactory.addASTChild(currentAST, returnAST);
					{
					_loop1748:
					do {
						if ((LA(1)==COMMA)) {
							comma();
							astFactory.addASTChild(currentAST, returnAST);
							com_parameter();
							astFactory.addASTChild(currentAST, returnAST);
						}
						else {
							break _loop1748;
						}
						
					} while (true);
					}
				}
				else if ((LA(1)==RPARENS) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				rparens();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			}
			com_property_or_method_AST = (Aast)currentAST.root;
			
			// save off original type from before token rewriting
			if (oldtype != -1)
			com_property_or_method_AST.putAnnotation("oldtype", Long.valueOf(oldtype));
			
			com_property_or_method_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = com_property_or_method_AST;
	}
	
/**   
 * Matches an optional widget qualifier using the keyword <code>IN</code>.
 *  Calls the {@link #frame_reference}, {@link #lvalue} (for browse) and
 * {@link #menu_reference} rules.  Roots the tree at the <code>IN</code>.
 * <p>
 * Used by <code>lvalue</code> and the recursive call to <code>lvalue</code>
 * is protected by a semantic predicate keyed off of <code>KW_BROWSE</code>.
 * <p>
 * Uses a flag to allow a match for the <code>IN prochandle</code> using
 * {@link #expr} for matching when called from rules which can ambiguously
 * match both this clause and a following expression.
 */
	public final void widget_qualifier() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast widget_qualifier_AST = null;
		
		try {      // for error handling
			Aast tmp1483_AST = null;
			tmp1483_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1483_AST);
			match(KW_IN);
			{
			if ((LA(1)==KW_FRAME) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				frame_reference(false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((LA(1)==KW_MENU||LA(1)==KW_SUB_MENU) && (_tokenSet_15.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				menu_reference();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if (((_tokenSet_64.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( LA(1) == KW_BROWSE )) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			widget_qualifier_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = widget_qualifier_AST;
	}
	
/**
 * Match <code>LPARENS expr RPARENS</code> which is valid (undocumented) syntax for specifying
 * the subscript on an extent field when used in a <code>DB_REF_NON_STATIC</code> construct.
 * The <code>RPARENS</code> is dropped and the <code>expr</code> is rooted at the
 * <code>LPARENS</code>.
 */
	public final void lparens_subscript() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast lparens_subscript_AST = null;
		
		try {      // for error handling
			Aast tmp1484_AST = null;
			tmp1484_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1484_AST);
			match(LPARENS);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			lparens_subscript_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = lparens_subscript_AST;
	}
	
/**      
 * Matches all Progress 4GL method calls and their parenthesized parameter
 * lists.
 * <p>
 * The matching portion of this rule comes in 2 parts:
 * <ul>
 *    <li> The leftmost token is the method name.  This is defined as the
 *         union of the set of all method token types (one for each return 
 *         data type, e.g. <code>OO_METH_INT</code>) and the set of all possible
 *         alternatives for symbol names (a reference to the
 *         {@link #any_non_reserved_symbol}. Although all reserved keywords can
 *         be used as method names, this use of all possible keywords would
 *         create huge ambiguity if allowed in the leftmost token of an
 *         expression. This rule can be called in such a location for a
 *         "standalone" method call (within the class in which it is
 *         defined). However, in that case Progress disallows matching with
 *         reserved keywords, so one must use the class name (for static
 *         events) or THIS-OBJECT (for instance events) as a qualifier.
 *         That is why this rule doesn't "pull" the reserved keywords. The
 *         {@link #downstream_chained_reference} does include reserved
 *         keywords and it does call this rule.  However, it rewrites the
 *         token types up front so that the lookahead won't break.
 *    <li> The next part is the {@link #func_call_parameters}.
 * </ul>
 * <p>
 * It is required that where this rule is referenced as one alternative that
 * conflicts with the definitions of other alternatives (see
 * {@link #primary_expr} and {@link #lvalue}), <b>the order of the 
 * alternatives must be more specific (in terms of matching criteria) to less
 * specific</b>.  Since the <code>method_call</code> rule contains the very
 * specific <code>symbol</code> followed by <code>LPARENS</code> pattern,
 * it is more specific than a simple <code>symbol</code> by itself (which is
 * the definition of an <code>lvalue</code>.  For this reason, 
 * <code>func_call</code> must always be placed ahead of <code>lvalue</code>
 * in alternative lists.
 * <p>
 * The inclusion of the <code>any_symbol_at_all</code> rule ensures that all
 * valid symbols that are followed by an <code>LPARENS</code> are considered a
 * method call and will be matched by this rule.  This means that the 
 * top level expression processing will include a symbol as one of the options
 * for its leftmost token, thus &quot;pulling&quot; the recursive descent
 * processing down the <code>expr</code> rule.
 * <p>
 * It is important to note that in the end, it is not really valid to have
 * a token type of <code>SYMBOL</code> since this could be anything.  What we
 * really require is a leftmost token that is one of the valid function
 * tokens:
 * <pre>
 *   OO_METH_CHAR
 *   OO_METH_CLASS
 *   OO_METH_COM_HANDLE
 *   OO_METH_DATE
 *   OO_METH_DATETIME
 *   OO_METH_DATETIME_TZ
 *   OO_METH_DEC
 *   OO_METH_INT
 *   OO_METH_INT64
 *   OO_METH_HANDLE
 *   OO_METH_LOGICAL
 *   OO_METH_LONGCHAR
 *   OO_METH_MEMPTR
 *   OO_METH_RAW
 *   OO_METH_RECID
 *   OO_METH_ROWID
 *   OO_METH_POLY
 *   OO_METH_VOID
 * </pre>
 * <p>
 * There is ambiguity between this rule and the {@link #func_call} rule
 * which is resolved by semantic predicates that use the next token's text
 * to determine if there is a match to a function or method call.
 * <p>
 * All methods have a token type associated with their respective return
 * value.  Some built-in method may have the special type of 
 * <code>OO_METH_POLY</code>. This special type indicates that the method can
 * return multiple different return types. <code>OO_METH_VOID</code> is a
 * special type which returns no value.
 * <p>
 * The exit action will save any original token type that rewriting may have
 * erased.  This will allow future processing to access this as an annotation
 * named 'oldtype'.
 *
 * @param    cls
 *           Fully qualified name of the class being referenced or
 *           <code>null</code> if this is within the current class
 *           definition.
 * @param    isStatic    
 *           <code>true</code> if this is a static reference.
 * @param    isSuper    
 *           <code>true</code> if the rvalue refnode is the SUPER keyword.
 */
	public final void method_call(
		String cls, boolean isStatic, boolean isSuper
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast method_call_AST = null;
		
		try {      // for error handling
			
			int     oldtype  = -1;
			int     current  = LA(1);
			String  methname = LT(1).getText();
			
			if (current < BEGIN_OO_METH || current > END_OO_METH)
			{
			// this is just a guess until we have the parameters parsed below, if the type is
			// wrong it will be fixed when we annotate
			int newtype = sym.lookupObjectMethod(cls, methname, isStatic);
			
			// there should always be a match in valid Progress 4GL source
			// so we throw an exception if this is not the case
			if (newtype != -1)
			{
			oldtype = LA(1);
			LT(1).setType(newtype);
			}
			else
			{
			throw new NoViableAltException(LT(1), getFilename());
			}
			}
			
			{
			switch ( LA(1)) {
			case OO_METH_CHAR:
			{
				Aast tmp1485_AST = null;
				tmp1485_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1485_AST);
				match(OO_METH_CHAR);
				break;
			}
			case OO_METH_CLASS:
			{
				Aast tmp1486_AST = null;
				tmp1486_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1486_AST);
				match(OO_METH_CLASS);
				break;
			}
			case OO_METH_COM_HANDLE:
			{
				Aast tmp1487_AST = null;
				tmp1487_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1487_AST);
				match(OO_METH_COM_HANDLE);
				break;
			}
			case OO_METH_DATE:
			{
				Aast tmp1488_AST = null;
				tmp1488_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1488_AST);
				match(OO_METH_DATE);
				break;
			}
			case OO_METH_DATETIME:
			{
				Aast tmp1489_AST = null;
				tmp1489_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1489_AST);
				match(OO_METH_DATETIME);
				break;
			}
			case OO_METH_DATETIME_TZ:
			{
				Aast tmp1490_AST = null;
				tmp1490_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1490_AST);
				match(OO_METH_DATETIME_TZ);
				break;
			}
			case OO_METH_DEC:
			{
				Aast tmp1491_AST = null;
				tmp1491_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1491_AST);
				match(OO_METH_DEC);
				break;
			}
			case OO_METH_HANDLE:
			{
				Aast tmp1492_AST = null;
				tmp1492_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1492_AST);
				match(OO_METH_HANDLE);
				break;
			}
			case OO_METH_INT:
			{
				Aast tmp1493_AST = null;
				tmp1493_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1493_AST);
				match(OO_METH_INT);
				break;
			}
			case OO_METH_INT64:
			{
				Aast tmp1494_AST = null;
				tmp1494_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1494_AST);
				match(OO_METH_INT64);
				break;
			}
			case OO_METH_LOGICAL:
			{
				Aast tmp1495_AST = null;
				tmp1495_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1495_AST);
				match(OO_METH_LOGICAL);
				break;
			}
			case OO_METH_LONGCHAR:
			{
				Aast tmp1496_AST = null;
				tmp1496_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1496_AST);
				match(OO_METH_LONGCHAR);
				break;
			}
			case OO_METH_MEMPTR:
			{
				Aast tmp1497_AST = null;
				tmp1497_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1497_AST);
				match(OO_METH_MEMPTR);
				break;
			}
			case OO_METH_RAW:
			{
				Aast tmp1498_AST = null;
				tmp1498_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1498_AST);
				match(OO_METH_RAW);
				break;
			}
			case OO_METH_RECID:
			{
				Aast tmp1499_AST = null;
				tmp1499_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1499_AST);
				match(OO_METH_RECID);
				break;
			}
			case OO_METH_ROWID:
			{
				Aast tmp1500_AST = null;
				tmp1500_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1500_AST);
				match(OO_METH_ROWID);
				break;
			}
			case OO_METH_POLY:
			{
				Aast tmp1501_AST = null;
				tmp1501_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1501_AST);
				match(OO_METH_POLY);
				break;
			}
			case OO_METH_VOID:
			{
				Aast tmp1502_AST = null;
				tmp1502_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1502_AST);
				match(OO_METH_VOID);
				break;
			}
			default:
				if ((_tokenSet_53.member(LA(1)))) {
					any_non_reserved_symbol();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			func_call_parameters(false);
			astFactory.addASTChild(currentAST, returnAST);
			method_call_AST = (Aast)currentAST.root;
			
			// save any original token type that rewriting may have erased
			if (oldtype != -1)
			method_call_AST.putAnnotation("oldtype", Long.valueOf(oldtype));
			
			// this leaves notes behind regarding the called method
			sym.annotateObjectMethod(cls, methname, isStatic, isSuper, method_call_AST);
			
			method_call_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = method_call_AST;
	}
	
/**      
 * Matches all Progress 4GL class event references and the usage of the publish,
 * subscribe and unsubscribe methods.
 * <p>
 * The matching portion of this rule comes in 3 parts:
 * <ul>
 *    <li> The leftmost token is the event name.  This is defined as the
 *         {@link #any_non_reserved_symbol}. Although all reserved keywords can
 *         be used as class events, this use of all possible keywords would
 *         create huge ambiguity if allowed in the leftmost token of an
 *         expression. This rule can be called in such a location for a
 *         "standalone" event reference (within the class in which it is
 *         defined). However, in that case Progress disallows matching with
 *         reserved keywords, so one must use the class name (for static
 *         events) or THIS-OBJECT (for instance events) as a qualifier.
 *         That is why this rule doesn't "pull" the reserved keywords. The
 *         {@link #downstream_chained_reference} does include reserved
 *         keywords and it does call this rule.  However, it rewrites the
 *         token types up front so that the lookahead won't break.
 *    <li> The next part is the <code>COLON</code> followed by one of the
 *         keywords <code>KW_PUBLISH</code>, <code>KW_SUBSCRIB</code> or
 *         <code>KW_UNSUBSCR</code>. 
 *    <li> The <code>KW_PUBLISH</code> case is followed by
 *         {@link #func_call_parameters}.
 *    <li> The <code>KW_SUBSCRIB</code> and <code>KW_UNSUBSCR</code> cases have
 *         common matching logic.  They are always followed by an
 *         <code>LPARENS</code>. Inside the parenthesis can be an
 *         optional {@link #expr} plus <code>COLON</code> and then an
 *         <code>any_symbol_at_all</code> unquoted method name reference.  
 *         The other alternative inside the parenthesis is an <code>expr</code>
 *         followed by an optional <code>COMMA</code> plus <code>expr</code>.
 *         At the end is always an <code>RPARENS</code>.
 * </ul>
 * <p>
 * It is required that where this rule is referenced as one alternative that
 * conflicts with the definitions of other alternatives (see
 * {@link #primary_expr} and {@link #lvalue}), <b>the order of the 
 * alternatives must be more specific (in terms of matching criteria) to less
 * specific</b>.  For this reason, this rule must always be placed ahead of
 * <code>lvalue</code> in alternative lists.
 * <p>
 * The inclusion of the <code>any_symbol_at_all</code> rule ensures that all
 * valid symbols that are followed by an <code>LPARENS</code> are considered a
 * method call and will be matched by this rule.  This means that the 
 * top level expression processing will include a symbol as one of the options
 * for its leftmost token, thus &quot;pulling&quot; the recursive descent
 * processing down the <code>expr</code> rule.
 * <p>
 * It is important to note that in the end, it is not really valid to have
 * a token type of <code>SYMBOL</code> since this could be anything.  What we
 * really require is a leftmost token that is <code>CLASS_EVENT</code>.
 * <p>
 * The exit action will save any original token type that rewriting may have
 * erased.  This will allow future processing to access this as an annotation
 * named 'oldtype'.
 *
 * @param    cls
 *           Fully qualified name of the class being referenced or
 *           <code>null</code> if this is within the current class
 *           definition.
 * @param    isStatic    
 *           <code>true</code> if this is a static reference.
 */
	public final void class_event(
		String cls, boolean isStatic
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast class_event_AST = null;
		Token  evt = null;
		Aast evt_AST = null;
		Token  c = null;
		Aast c_AST = null;
		
		try {      // for error handling
			
			String oldClassName = currentClassName; 
			currentClassName = cls;
			
			boolean oldStaticFlag = currentStaticFlag;
			currentStaticFlag = isStatic;
			
			int     oldtype  = -1;
			int     current  = LA(1);
			String  evtname = LT(1).getText();
			
			if (current != CLASS_EVENT)
			{
			int newtype = sym.lookupDataMember(cls, evtname, isStatic);
			
			// there should always be a match in valid Progress 4GL source
			// so we throw an exception if this is not the case
			if (newtype == CLASS_EVENT)
			{
			oldtype = LA(1);
			LT(1).setType(newtype);
			}
			else
			{
			throw new NoViableAltException(LT(1), getFilename());
			}
			}
			
			{
			if ((LA(1)==CLASS_EVENT)) {
				evt = LT(1);
				evt_AST = (Aast)astFactory.create(evt);
				astFactory.addASTChild(currentAST, evt_AST);
				match(CLASS_EVENT);
				
				annotateVariable(evt_AST.getText(), CLASS_EVENT, evt_AST);
				
			}
			else if ((_tokenSet_53.member(LA(1)))) {
				any_non_reserved_symbol();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(COLON);
			c_AST.setType(OBJECT_INVOCATION);
			{
			switch ( LA(1)) {
			case KW_PUBLISH:
			{
				Aast tmp1503_AST = null;
				tmp1503_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1503_AST);
				match(KW_PUBLISH);
				func_call_parameters(false);
				astFactory.addASTChild(currentAST, returnAST);
				class_event_AST = (Aast)currentAST.root;
				
				sym.annotateObjectEvent(evt_AST, class_event_AST, inStaticCtxt);
				
				break;
			}
			case KW_SUBSCRIB:
			case KW_UNSUBSCR:
			{
				{
				{
				switch ( LA(1)) {
				case KW_SUBSCRIB:
				{
					Aast tmp1504_AST = null;
					tmp1504_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1504_AST);
					match(KW_SUBSCRIB);
					break;
				}
				case KW_UNSUBSCR:
				{
					Aast tmp1505_AST = null;
					tmp1505_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1505_AST);
					match(KW_UNSUBSCR);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				lparens();
				astFactory.addASTChild(currentAST, returnAST);
				{
				if (((_tokenSet_1.member(LA(1))) && (LA(2)==RPARENS) && (_tokenSet_3.member(LA(3))))&&( 
                      (LA(1) >= BEGIN_OO_METH && LA(1) <= END_OO_METH) ||
                      sym.isObjectMethod(null, LT(1).getText(), inStaticCtxt)
                   )) {
					any_symbol_at_all();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
					insideClassEvent = true;
					expr();
					astFactory.addASTChild(currentAST, returnAST);
					insideClassEvent = false;
					{
					switch ( LA(1)) {
					case COMMA:
					{
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						expr();
						astFactory.addASTChild(currentAST, returnAST);
						break;
					}
					case RPARENS:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					}
					}
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				rparens();
				astFactory.addASTChild(currentAST, returnAST);
				}
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			
			// save any original token type that rewriting may have erased
			if (oldtype != -1)
			evt_AST.putAnnotation("oldtype", Long.valueOf(oldtype));
			
			currentClassName  = oldClassName;
			currentStaticFlag = oldStaticFlag;
			
			class_event_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = class_event_AST;
	}
	
/**      
 * Matches all Progress 4GL {@link #lvalue} references that exist in the
 * namespace of the given class name.
 * <p>
 * This rule is simply a convenience method to use the current class name 
 * instance variable to bias the <code>lvalue</code> to lookup data members
 * within the given namespace. When done, the flag is set back to its prior
 * state.
 *
 * @param    cls
 *           Class name containing the members for which to search.
 * @param    isStatic    
 *           <code>true</code> if this is a static reference.
 */
	public final void object_data_member(
		String cls, boolean isStatic
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast object_data_member_AST = null;
		Aast lv_AST = null;
		
		try {      // for error handling
			
			String oldClassName = currentClassName; 
			currentClassName = cls;
			
			boolean oldStaticFlag = currentStaticFlag;
			currentStaticFlag = isStatic;
			
			int    newtype = -1;
			int    oldtype = -1;
			String txt     = LT(1).getText();
			
			// TODO: the following code is duplicated in downstream_chained_reference and we
			//       should work this into common code
			
			// reserved keywords that match data members as the start of an expression can
			// appear here and need to be fixed up before lvalue otherwise they may be interpreted
			// as qualifiers or other syntax (e.g. a data member named "query")
			if (LA(1) < BEGIN_VARTYPES || LA(1) > END_VARTYPES)
			{
			if (!isStatic)
			{
			// instance-qualified members can be static or instance
			newtype = sym.lookupDataMember(cls, txt);
			}
			else
			{
			// class-qualified members can only be static
			newtype = sym.lookupDataMember(cls, txt, true);
			}
			
			if (newtype != -1)
			{
			oldtype = LA(1);
			LT(1).setType(newtype);
			}
			else
			{
			// must be an unreserved keyword, reserved keyword, DB_SYMBOL,
			// FILENAME, BOOL_FALSE or BOOL_TRUE that is not recognized as a
			// class member
			throw new NoViableAltException(LT(1), getFilename());
			}
			}
			
			boolean classLookup = sym.isClassLookup();
			sym.setClassLookup(true);
			
			lvalue();
			lv_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			
			sym.setClassLookup(classLookup);
			
			currentClassName  = oldClassName;
			currentStaticFlag = oldStaticFlag;
			
			if (oldtype != -1)
			{
			lv_AST.putAnnotation("oldtype", (long) oldtype);
			}
			
			object_data_member_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = object_data_member_AST;
	}
	
/**
 * Matches the <code>NEW</code> phrase in an expression, allowing new object
 * instances to be instantiated. Uses {@link #user_defined_type_name} and
 * {@link #param_passing_list} and is called from {@link #primary_expr}.
 */
	public final void new_phrase() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast new_phrase_AST = null;
		Aast udt_AST = null;
		
		try {      // for error handling
			Aast tmp1506_AST = null;
			tmp1506_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1506_AST);
			match(KW_NEW);
			user_defined_type_name();
			udt_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			param_passing_list(false);
			astFactory.addASTChild(currentAST, returnAST);
			new_phrase_AST = (Aast)currentAST.root;
			
			// save the original token type, then rewrite the type
			new_phrase_AST.putAnnotation("oldtype", Long.valueOf(new_phrase_AST.getType()));
			new_phrase_AST.setType(FUNC_CLASS);
			
			// write our function-specific annotations
			sym.annotateFunction(new_phrase_AST.getText(), new_phrase_AST, false);
			
			// the above probably did not set the class name so we force it here
			String qname = (String) udt_AST.getAnnotation("qualified");
			if (qname == null)
			{
			String err = String.format("Unable to find 'qualified' annotation.");
			throw genExc(err, new_phrase_AST);
			}
			sym.annotateClassRef(qname, new_phrase_AST);
			
			// this leaves notes behind regarding the called ctor
			sym.annotateObjectMethod(qname, null, false, new_phrase_AST);
			
			new_phrase_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = new_phrase_AST;
	}
	
/**
 * Matches the <code>GET-CLASS(class-name)</code> builtin-function.  A separate rule is required to force
 * the single argument of this function to be a qualified or unqualified type name.
 */
	public final void get_class_func() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast get_class_func_AST = null;
		
		try {      // for error handling
			Aast tmp1507_AST = null;
			tmp1507_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1507_AST);
			match(KW_GETCLASS);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			user_defined_type_name();
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			get_class_func_AST = (Aast)currentAST.root;
			
			// save the original token type, then rewrite the type
			get_class_func_AST.putAnnotation("oldtype", Long.valueOf(get_class_func_AST.getType()));
			get_class_func_AST.setType(FUNC_CLASS);
			
			// write our function-specific annotations
			sym.annotateFunction(get_class_func_AST.getText(), get_class_func_AST, false);
			
			// the above probably did not set the class name so we force it here
			sym.annotateClassRef("Progress.Lang.Class", get_class_func_AST);
			
			get_class_func_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = get_class_func_AST;
	}
	
/**      
 * Matches the <code>seek()</code> function call.  The root node returned
 * will be a <code>FUNC_INT</code> and there will be one child which may
 * be <code>KW_INPUT</code>, <code>KW_OUTPUT</code> or an expression that
 * represents a stream.
 * <p>
 * The exit action will save any original token type that rewriting may have
 * erased.  This will allow future processing to access this as an annotation
 * named 'oldtype'.
 * <p>
 * Built-in functions have a language keyword as the function name. This 
 * means that built-ins can support abbreviations.  It also means that some
 * built-in functions cannot be hidden by a user-defined function, if the
 * associated keyword is reserved. If the keyword is not reserved, then a
 * built-in function is hidden in the namespace by a user-defined function
 * of the same name.  This method's token type rewriting is dependent upon
 * this logic being implemented in the <code>SymbolResolver</code> class.
 * See {@link SymbolResolver#lookupFunction}.
 * <p>
 * Note that in the resulting AST, the parenthesis and commas used to define
 * the parameter list are discarded.  In other words, they do not appear in
 * the AST as nodes.  Instead, each parameter (which can be a complete
 * expression subtree or a simple single node like an lvalue) is created
 * as a separate child node of the function type token.  All parameters are 
 * maintained as child nodes in the exact order of the function call itself,
 * so this is essentially the signature of the function.  It it also the
 * proper AST definition to enable simple evaluation of functions with any
 * arbitrary signature.
 * <p>
 * The <code>SEEK</code> function can reference the unnamed input or unnamed
 * output streams using only the keywords <code>INPUT</code> and
 * <code>OUTPUT</code>. This is honored.
 */
	public final void seek_func() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast seek_func_AST = null;
		Token  s = null;
		Aast s_AST = null;
		
		try {      // for error handling
			s = LT(1);
			s_AST = (Aast)astFactory.create(s);
			astFactory.makeASTRoot(currentAST, s_AST);
			match(KW_SEEK);
			s_AST.setType(FUNC_INT);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==KW_INPUT) && (LA(2)==RPARENS) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1508_AST = null;
				tmp1508_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1508_AST);
				match(KW_INPUT);
			}
			else if ((LA(1)==KW_OUTPUT) && (LA(2)==RPARENS) && (_tokenSet_3.member(LA(3)))) {
				Aast tmp1509_AST = null;
				tmp1509_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1509_AST);
				match(KW_OUTPUT);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			seek_func_AST = (Aast)currentAST.root;
			
			// save the original token type that rewriting erased
			seek_func_AST.putAnnotation("oldtype", Long.valueOf(KW_SEEK));
			
			// write our function-specific annotations
			sym.annotateFunction(s_AST.getText(), seek_func_AST, false);            
			
			seek_func_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = seek_func_AST;
	}
	
/**      
 * Matches the <code>cast()</code> function call.  The root node returned
 * will be a <code>FUNC_CLASS</code> and there will be an {@link #expr} child
 * and a second child of {@link #user_defined_type_name}.
 * <p>
 * The exit action will save any original token type that rewriting may have
 * erased.  This will allow future processing to access this as an annotation
 * named 'oldtype'.
 * <p>
 * Built-in functions have a language keyword as the function name. This 
 * means that built-ins can support abbreviations.  It also means that some
 * built-in functions cannot be hidden by a user-defined function, if the
 * associated keyword is reserved. If the keyword is not reserved, then a
 * built-in function is hidden in the namespace by a user-defined function
 * of the same name.  This method's token type rewriting is dependent upon
 * this logic being implemented in the <code>SymbolResolver</code> class.
 * See {@link SymbolResolver#lookupFunction}.
 * <p>
 * Note that in the resulting AST, the parenthesis and commas used to define
 * the parameter list are discarded.  In other words, they do not appear in
 * the AST as nodes.  Instead, each parameter (which can be a complete
 * expression subtree or a simple single node like an lvalue) is created
 * as a separate child node of the function type token.  All parameters are 
 * maintained as child nodes in the exact order of the function call itself,
 * so this is essentially the signature of the function.  It it also the
 * proper AST definition to enable simple evaluation of functions with any
 * arbitrary signature.
 */
	public final void cast_func() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast cast_func_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Aast udt_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CAST);
			c_AST.setType(FUNC_CLASS);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			user_defined_type_name();
			udt_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			cast_func_AST = (Aast)currentAST.root;
			
			// save the original token type that rewriting erased
			cast_func_AST.putAnnotation("oldtype", Long.valueOf(KW_CAST));
			
			// write our function-specific annotations
			sym.annotateFunction(c_AST.getText(), cast_func_AST, false);
			
			// the above probably did not set the class name so we force it here
			String qname = (String) udt_AST.getAnnotation("qualified");
			if (qname == null)
			{
			String err = String.format("Unable to find 'qualified' annotation.");
			throw genExc(err, cast_func_AST);
			}
			sym.annotateClassRef(qname, cast_func_AST);
			
			cast_func_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = cast_func_AST;
	}
	
/**      
 * Matches the <code>type-of()</code> function call.  The root node returned
 * will be a <code>FUNC_LOGICAL</code> and there will be an {@link #expr} child
 * and a second child of {@link #user_defined_type_name}.
 * <p>
 * The exit action will save any original token type that rewriting may have
 * erased.  This will allow future processing to access this as an annotation
 * named 'oldtype'.
 * <p>
 * Built-in functions have a language keyword as the function name. This 
 * means that built-ins can support abbreviations.  It also means that some
 * built-in functions cannot be hidden by a user-defined function, if the
 * associated keyword is reserved. If the keyword is not reserved, then a
 * built-in function is hidden in the namespace by a user-defined function
 * of the same name.  This method's token type rewriting is dependent upon
 * this logic being implemented in the <code>SymbolResolver</code> class.
 * See {@link SymbolResolver#lookupFunction}.
 * <p>
 * Note that in the resulting AST, the parenthesis and commas used to define
 * the parameter list are discarded.  In other words, they do not appear in
 * the AST as nodes.  Instead, each parameter (which can be a complete
 * expression subtree or a simple single node like an lvalue) is created
 * as a separate child node of the function type token.  All parameters are 
 * maintained as child nodes in the exact order of the function call itself,
 * so this is essentially the signature of the function.  It it also the
 * proper AST definition to enable simple evaluation of functions with any
 * arbitrary signature.
 */
	public final void type_of_func() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast type_of_func_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Aast udt_AST = null;
		
		try {      // for error handling
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_TYPE_OF);
			c_AST.setType(FUNC_LOGICAL);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			comma();
			astFactory.addASTChild(currentAST, returnAST);
			user_defined_type_name();
			udt_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			type_of_func_AST = (Aast)currentAST.root;
			
			// save the original token type that rewriting erased
			type_of_func_AST.putAnnotation("oldtype", Long.valueOf(KW_TYPE_OF));
			
			// write our function-specific annotations
			sym.annotateFunction(c_AST.getText(), type_of_func_AST, false);
			
			// the above probably did not set the class name so we force it here
			String qname = (String) udt_AST.getAnnotation("qualified");
			if (qname == null)
			{
			String err = String.format("Unable to find 'qualified' annotation.");
			throw genExc(err, type_of_func_AST);
			}
			sym.annotateClassRef(qname, type_of_func_AST);
			
			type_of_func_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = type_of_func_AST;
	}
	
/**      
 * Matches the <code>dynamic-function()</code> function call.  The root node
 * returned will be a <code>FUNC_POLY</code> and there will be at least one
 * child which would be an expression that names the function to be called.
 * This mandatory first parameter many optionally be followed by a
 * {@link #in_procedure_clause} and then any number of comma-separated
 * parameter expressions.
 * <p>
 * The exit action will save any original token type that rewriting may have
 * erased.  This will allow future processing to access this as an annotation
 * named 'oldtype'.
 * <p>
 * Built-in functions have a language keyword as the function name. This 
 * means that built-ins can support abbreviations.  It also means that some
 * built-in functions cannot be hidden by a user-defined function, if the
 * associated keyword is reserved. If the keyword is not reserved, then a
 * built-in function is hidden in the namespace by a user-defined function
 * of the same name.  This method's token type rewriting is dependent upon
 * this logic being implemented in the <code>SymbolResolver</code> class.
 * See {@link SymbolResolver#lookupFunction}.
 * <p>
 * Note that in the resulting AST, the parenthesis and commas used to define
 * the parameter list are discarded.  In other words, they do not appear in
 * the AST as nodes.  Instead, each parameter (which can be a complete
 * expression subtree or a simple single node like an lvalue) is created
 * as a separate child node of the function type token.  All parameters are 
 * maintained as child nodes in the exact order of the function call itself,
 * so this is essentially the signature of the function.  It it also the
 * proper AST definition to enable simple evaluation of functions with any
 * arbitrary signature.
 */
	public final void dynamic_function_func() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast dynamic_function_func_AST = null;
		Token  d = null;
		Aast d_AST = null;
		
		try {      // for error handling
			d = LT(1);
			d_AST = (Aast)astFactory.create(d);
			astFactory.makeASTRoot(currentAST, d_AST);
			match(KW_DYN_FUNC);
			
			d_AST.setType(FUNC_POLY);
			inDynFunc = true;
			
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			func_call_parm(false);
			astFactory.addASTChild(currentAST, returnAST);
			inDynFunc = false;
			{
			switch ( LA(1)) {
			case KW_IN:
			{
				in_procedure_clause();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case COMMA:
			case RPARENS:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			{
			_loop1725:
			do {
				if ((LA(1)==COMMA)) {
					comma();
					astFactory.addASTChild(currentAST, returnAST);
					func_call_parm(false);
					astFactory.addASTChild(currentAST, returnAST);
				}
				else {
					break _loop1725;
				}
				
			} while (true);
			}
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			dynamic_function_func_AST = (Aast)currentAST.root;
			
			// save the original token type that rewriting erased
			dynamic_function_func_AST.putAnnotation("oldtype", Long.valueOf(KW_DYN_FUNC));
			
			// write our function-specific annotations
			sym.annotateFunction(d_AST.getText(), dynamic_function_func_AST, false);            
			
			dynamic_function_func_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = dynamic_function_func_AST;
	}
	
/**      
 * Matches the frame related function calls that can take a frame name as
 * a parameter. The following are supported:
 * <p>
 * <pre>
 * Function      Type
 * ------------  -------------
 * FRAME-COL     FUNC_DEC
 * FRAME-DOWN    FUNC_INT
 * FRAME-LINE    FUNC_INT
 * FRAME-ROW     FUNC_DEC
 * </pre>
 * <p>
 * The root node returned will be a <code>FUNC_INT</code> or 
 * <code>FUNC_DEC</code> and there will be one child node which is a frame
 * reference (see {@link #lvalue}) OR it is a <code>SYMBOL</code> that is an
 * invalid frame name.  Progress silently tolerates such an invalid frame
 * name and just returns 0 at runtime. This method is needed because of this
 * behavior since an invalid frame reference would not be possible in a
 * regular <code>lvalue</code>.
 * <p>
 * The exit action will save any original token type that rewriting may have
 * erased.  This will allow future processing to access this as an annotation
 * named 'oldtype'.
 * <p>
 * Built-in functions have a language keyword as the function name. This 
 * means that built-ins can support abbreviations.  It also means that some
 * built-in functions cannot be hidden by a user-defined function, if the
 * associated keyword is reserved. If the keyword is not reserved, then a
 * built-in function is hidden in the namespace by a user-defined function
 * of the same name.  This method's token type rewriting is dependent upon
 * this logic being implemented in the <code>SymbolResolver</code> class.
 * See {@link SymbolResolver#lookupFunction}.
 * <p>
 * Note that in the resulting AST, the parenthesis and commas used to define
 * the parameter list are discarded.  In other words, they do not appear in
 * the AST as nodes.  Instead, each parameter (which can be a complete
 * expression subtree or a simple single node like an lvalue) is created
 * as a separate child node of the function type token.  All parameters are 
 * maintained as child nodes in the exact order of the function call itself,
 * so this is essentially the signature of the function.  It it also the
 * proper AST definition to enable simple evaluation of functions with any
 * arbitrary signature.
 */
	public final void frame_funcs() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast frame_funcs_AST = null;
		Token  fc = null;
		Aast fc_AST = null;
		Token  fd = null;
		Aast fd_AST = null;
		Token  fl = null;
		Aast fl_AST = null;
		Token  fr = null;
		Aast fr_AST = null;
		Aast frame_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_FR_COL:
			{
				fc = LT(1);
				fc_AST = (Aast)astFactory.create(fc);
				astFactory.makeASTRoot(currentAST, fc_AST);
				match(KW_FR_COL);
				saveAndReplaceType(fc_AST, FUNC_DEC);
				break;
			}
			case KW_FR_DOWN:
			{
				fd = LT(1);
				fd_AST = (Aast)astFactory.create(fd);
				astFactory.makeASTRoot(currentAST, fd_AST);
				match(KW_FR_DOWN);
				saveAndReplaceType(fd_AST, FUNC_INT);
				break;
			}
			case KW_FR_LINE:
			{
				fl = LT(1);
				fl_AST = (Aast)astFactory.create(fl);
				astFactory.makeASTRoot(currentAST, fl_AST);
				match(KW_FR_LINE);
				saveAndReplaceType(fl_AST, FUNC_INT);
				break;
			}
			case KW_FR_ROW:
			{
				fr = LT(1);
				fr_AST = (Aast)astFactory.create(fr);
				astFactory.makeASTRoot(currentAST, fr_AST);
				match(KW_FR_ROW);
				saveAndReplaceType(fr_AST, FUNC_DEC);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((((LA(1) >= FILEROOT && LA(1) <= JUNK)) && ((LA(2) >= FILEROOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != KW_FRAME )) {
				malformed_symbol();
				frame_AST = (Aast)returnAST;
				astFactory.addASTChild(currentAST, returnAST);
				
				// it is possible to pass anything (even a name that isn't 
				// a frame) so we only convert this if the frame name is valid
				if (sym.lookupFrame(frame_AST.getText()) != -1)
				{
				frame_AST.setType(WID_FRAME);
				}
				
			}
			else if ((_tokenSet_64.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				lvalue();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			frame_funcs_AST = (Aast)currentAST.root;
			
			// write our function-specific annotations
			sym.annotateFunction(frame_funcs_AST.getText(), frame_funcs_AST, false);            
			
			frame_funcs_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = frame_funcs_AST;
	}
	
/**
 * This rule implements the special built-in functions that can be used
 * used in an expression for processing {@link #record} or
 * {@link #primary_expr} (a field) but which don't take normal parenthesized
 * parameters (the single parameter for each of these is postfixed) or the
 * function takes parenthesized parameters but the parameters include a
 * <code>record</code> (which is not normally allowed in an expression).  The
 * <code>INPUT</code> form can have an optional prefixed 
 * {@link #frame_reference}.
 * <p>
 * The following are matched:
 * <p>
 * <pre>
 *       Function Syntax           Optional Parens            Notes
 * ------------------------------  ---------------  ---------------------------
 * AVAILABLE record                       Y
 * AMBIGUOUS record                       Y
 * CURRENT-CHANGED record                 Y
 * ERROR( record )                        N
 * INPUT field                            N*        Parens can be matched in the
 *                                                  primary_expr rule that is
 *                                                  used to match the field, but
 *                                                  it doesn't operate the same
 *                                                  way as function parens.
 * INPUT FRAME frame field                N*        See INPUT field notes above.
 * LOCKED record                          Y
 * NEW record                             Y
 * RECID( record )                        N
 * RECORD-LENGTH( record )                N
 * ROWID( record )                        N
 * ROW-STATE( record )                    N
 * </pre>
 * <p>
 * This rule is described as special because it doesn't follow the normal
 * patterns of function calls, even for built-in functions.  Since this
 * does not match the standard (generic) function call syntax, this function
 * was implemented as a standalone alternative in {@link #primary_expr},
 * which makes it a peer of the generic {@link #func_call} rule.
 * <p>
 * Ambiguity warnings were generated in the {@link #parameter} and 
 * {@link #on_stmt} rules when this rule was added to {@link #primary_expr}.
 * As far as can be found, there is no real ambiguity in practice and those
 * rules have had ambiguity warnings suppressed as a result.
 * <p>
 * Parenthesis can be optionally used in some of these functions as noted
 * in the above table.
 */
	public final void record_funcs() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast record_funcs_AST = null;
		Token  a = null;
		Aast a_AST = null;
		Token  b = null;
		Aast b_AST = null;
		Token  c = null;
		Aast c_AST = null;
		Token  d = null;
		Aast d_AST = null;
		Token  e = null;
		Aast e_AST = null;
		Token  i = null;
		Aast i_AST = null;
		Token  er = null;
		Aast er_AST = null;
		Token  re = null;
		Aast re_AST = null;
		Token  ro = null;
		Aast ro_AST = null;
		Token  rj = null;
		Aast rj_AST = null;
		Token  rs = null;
		Aast rs_AST = null;
		Token  rd = null;
		Aast rd_AST = null;
		Token  rl = null;
		Aast rl_AST = null;
		
		try {      // for error handling
			
			boolean matched_set = false;
			int     ftype       = -1;
			String  fname       = LT(1).getText();
			
			NameNode nothing = null;
			
			{
			switch ( LA(1)) {
			case KW_AMBIG:
			case KW_AVAIL:
			case KW_CUR_CHG:
			case KW_LOCKED:
			case KW_NEW:
			{
				{
				switch ( LA(1)) {
				case KW_AVAIL:
				{
					a = LT(1);
					a_AST = (Aast)astFactory.create(a);
					astFactory.makeASTRoot(currentAST, a_AST);
					match(KW_AVAIL);
					saveAndReplaceType(a_AST, FUNC_LOGICAL);
					break;
				}
				case KW_AMBIG:
				{
					b = LT(1);
					b_AST = (Aast)astFactory.create(b);
					astFactory.makeASTRoot(currentAST, b_AST);
					match(KW_AMBIG);
					saveAndReplaceType(b_AST, FUNC_LOGICAL);
					break;
				}
				case KW_CUR_CHG:
				{
					c = LT(1);
					c_AST = (Aast)astFactory.create(c);
					astFactory.makeASTRoot(currentAST, c_AST);
					match(KW_CUR_CHG);
					saveAndReplaceType(c_AST, FUNC_LOGICAL);
					break;
				}
				case KW_LOCKED:
				{
					d = LT(1);
					d_AST = (Aast)astFactory.create(d);
					astFactory.makeASTRoot(currentAST, d_AST);
					match(KW_LOCKED);
					saveAndReplaceType(d_AST, FUNC_LOGICAL);
					break;
				}
				case KW_NEW:
				{
					e = LT(1);
					e_AST = (Aast)astFactory.create(e);
					astFactory.makeASTRoot(currentAST, e_AST);
					match(KW_NEW);
					saveAndReplaceType(e_AST, FUNC_LOGICAL);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				if ((LA(1)==LPARENS)) {
					lparens();
					astFactory.addASTChild(currentAST, returnAST);
					matched_set = true;
				}
				else if ((_tokenSet_13.member(LA(1)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				nothing=record(true, false, false);
				astFactory.addASTChild(currentAST, returnAST);
				{
				if (((LA(1)==RPARENS) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3))))&&( matched_set )) {
					rparens();
					astFactory.addASTChild(currentAST, returnAST);
				}
				else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				break;
			}
			case KW_INPUT:
			{
				i = LT(1);
				i_AST = (Aast)astFactory.create(i);
				astFactory.makeASTRoot(currentAST, i_AST);
				match(KW_INPUT);
				saveAndReplaceType(i_AST, FUNC_POLY);
				primary_expr();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case KW_RECID:
			case KW_DATA_SM:
			case KW_ERROR:
			case KW_REC_LEN:
			case KW_REJECTED:
			case KW_ROW_STAT:
			case KW_ROWID:
			{
				{
				switch ( LA(1)) {
				case KW_ERROR:
				{
					er = LT(1);
					er_AST = (Aast)astFactory.create(er);
					astFactory.makeASTRoot(currentAST, er_AST);
					match(KW_ERROR);
					saveAndReplaceType(er_AST, FUNC_LOGICAL);
					break;
				}
				case KW_RECID:
				{
					re = LT(1);
					re_AST = (Aast)astFactory.create(re);
					astFactory.makeASTRoot(currentAST, re_AST);
					match(KW_RECID);
					saveAndReplaceType(re_AST, FUNC_RECID);
					break;
				}
				case KW_ROWID:
				{
					ro = LT(1);
					ro_AST = (Aast)astFactory.create(ro);
					astFactory.makeASTRoot(currentAST, ro_AST);
					match(KW_ROWID);
					saveAndReplaceType(ro_AST, FUNC_ROWID);
					break;
				}
				case KW_REJECTED:
				{
					rj = LT(1);
					rj_AST = (Aast)astFactory.create(rj);
					astFactory.makeASTRoot(currentAST, rj_AST);
					match(KW_REJECTED);
					saveAndReplaceType(rj_AST, FUNC_LOGICAL);
					break;
				}
				case KW_ROW_STAT:
				{
					rs = LT(1);
					rs_AST = (Aast)astFactory.create(rs);
					astFactory.makeASTRoot(currentAST, rs_AST);
					match(KW_ROW_STAT);
					saveAndReplaceType(rs_AST, FUNC_INT);
					break;
				}
				case KW_DATA_SM:
				{
					rd = LT(1);
					rd_AST = (Aast)astFactory.create(rd);
					astFactory.makeASTRoot(currentAST, rd_AST);
					match(KW_DATA_SM);
					saveAndReplaceType(rd_AST, FUNC_LOGICAL);
					break;
				}
				case KW_REC_LEN:
				{
					rl = LT(1);
					rl_AST = (Aast)astFactory.create(rl);
					astFactory.makeASTRoot(currentAST, rl_AST);
					match(KW_REC_LEN);
					saveAndReplaceType(rl_AST, FUNC_INT);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				lparens();
				astFactory.addASTChild(currentAST, returnAST);
				nothing=record(true, false, false);
				astFactory.addASTChild(currentAST, returnAST);
				rparens();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			record_funcs_AST = (Aast)currentAST.root;
			
			// write our function-specific annotations
			sym.annotateFunction(fname, record_funcs_AST, false);
			
			record_funcs_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = record_funcs_AST;
	}
	
/**      
 * Matches all Progress 4GL function calls that take parenthesized parameter
 * lists.  Built-in Progress functions that don't take arguments also do not
 * take parenthesized parameters.  These special cases are handled as
 * predefined variables in the symbol dictionary, since they essentially are
 * read-only variables even though they are called functions.
 * <p>
 * The matching portion of this rule comes in 2 parts:
 * <ul>
 *    <li> The leftmost token is the function name.  This is defined as the
 *         union of the set of all function token types (one for each return 
 *         data type, e.g. <code>FUNC_INT</code>) and the set of all possible
 *         alternatives for symbol names (a reference to the {@link #symbol}
 *         for function names). Both <code>lvalue</code> and
 *         <code>func_call</code> refer to a leftmost token that includes the
 *         symbol text.  This creates an ambiguity that is only resolved by
 *         lookahead <b>and</b> the proper ordering of the rules (since both
 *         are equal alternatives in the <code>primary_expr</code> rule).
 *    <li> The next part is the {@link #func_call_parameters}.
 * </ul>
 * <p>
 * It is required that where this rule is referenced as one alternative that
 * conflicts with the definitions of other alternatives (see
 * {@link #primary_expr} and {@link #lvalue}), <b>the order of the 
 * alternatives must be more specific (in terms of matching criteria) to less
 * specific</b>.  Since the <code>func_call</code> rule contains the very
 * specific <code>symbol</code> followed by <code>LPARENS</code> pattern,
 * it is more specific than a simple <code>symbol</code> by itself (which is
 * the definition of an <code>lvalue</code>.  For this reason, 
 * <code>func_call</code> must always be placed ahead of <code>lvalue</code>
 * in alternative lists.
 * <p>
 * The inclusion of the <code>malformed_symbol</code> rule ensures that all
 * symbols that are followed by an <code>LPARENS</code> are considered a
 * function call and will be matched by this rule.  This means that the 
 * top level expression processing will include a symbol as one of the options
 * for its leftmost token, thus &quot;pulling&quot; the recursive descent
 * processing down the <code>expr</code> rule.
 * <p>
 * It is important to note that in the end, it is not really valid to have
 * a token type of <code>SYMBOL</code> since this could be anything.  What we
 * really require is a leftmost token that is one of the valid function
 * tokens:
 * <pre>
 *   FUNC_CHAR
 *   FUNC_CLASS
 *   FUNC_COM_HANDLE
 *   FUNC_DATE
 *   FUNC_DATETIME
 *   FUNC_DATETIME_TZ
 *   FUNC_DEC
 *   FUNC_INT
 *   FUNC_INT64
 *   FUNC_HANDLE
 *   FUNC_LOGICAL
 *   FUNC_LONGCHAR
 *   FUNC_MEMPTR
 *   FUNC_RAW
 *   FUNC_RECID
 *   FUNC_ROWID
 *   FUNC_POLY
 * </pre>
 * The difference between a <code>SYMBOL</code> and a <code>FUNC_INT</code>
 * can only be determined by context (the fact that the lookahead code has
 * identified a match with a <code>SYMBOL</code> token followed by an
 * <code>LPARENS</code> token which is a construct that can <b>only</b> occur
 * in a function call.  Thus <b>if</b> a match is found using lookahead (in 
 * the rule that calls this one), then it <b>must</b> be correct and 
 * necessary to convert the <code>SYMBOL</code> token type into the correct 
 * function type, using a lookup into the function namespace. This is done in
 * an init action that is processed at the beginning of this rule. In this
 * way, the rest of the rule only sees the first token as a valid function
 * token type and never tries to call the <code>symbol</code> rule since
 * calling that rule would actually try to match (and consume from the
 * token stream) a <code>SYMBOL</code> token type.  <b>Specifying a rule
 * reference to obtain its value from a lookahead perspective but then
 * changing the token's type such that the rule reference never gets called,
 * is the critical trick that enables context sensitive symbol names!</b>
 * <p>
 * All functions have a token type associated with their respective return
 * value.  Some built-in functions may have the special type of 
 * <code>FUNC_POLY</code>. This special type indicates that the function can
 * return multiple different return types. The built-in functions typically
 * implement this return type based on the type of the parameters passed. 
 * User-defined functions cannot provide the same feature, this can only 
 * occur in built-in functions.
 * <p>
 * The exit action will save any original token type that rewriting may have
 * erased.  This will allow future processing to access this as an annotation
 * named 'oldtype'.
 * <p>
 * Built-in functions have a language keyword as the function name. This 
 * means that built-ins can support abbreviations.  It also means that some
 * built-in functions cannot be hidden by a user-defined function, if the
 * associated keyword is reserved. If the keyword is not reserved, then a
 * built-in function is hidden in the namespace by a user-defined function
 * of the same name.  This method's token type rewriting is dependent upon
 * this logic being implemented in the <code>SymbolResolver</code> class.
 * See {@link SymbolResolver#lookupFunction}.
 * <p>
 * To ensure this method sees tokens matching the list of functions with
 * reserved names, the {@link #reserved_functions} method is included as
 * an alternative.  This is the same 'pull' trick that is being used for
 * generic symbols above.  The reason that the generic symbol technique is
 * not enough to pull reserved functions is that only unreserved keywords
 * are pulled by the <code>symbol</code> method.  This can't be changed
 * without negative impacts on other code, since <code>symbol</code> is 
 * used in many locations in the parser.  Instead a custom method was
 * created to generate pull.
 */
	public final void func_call() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast func_call_AST = null;
		
		try {      // for error handling
			
			int     oldtype  = -1;
			int     current  = LA(1);
			String  funcname = LT(1).getText();
			boolean builtin  = false;
			boolean isFieldArg = false;
			
			if (current < BEGIN_FUNCTYPES || current > END_FUNCTYPES)
			{
			Function func    = sym.lookupFunctionDef(funcname);
			int      newtype = sym.lookupWrappedType(func);
			
			// there should always be a match in valid Progress 4GL source
			// so we throw an exception if this is not the case
			if (newtype != -1)
			{
			oldtype = LA(1);
			// dynamic-invoke allows INPUT parameters
			builtin = func.isBuiltin() && oldtype != KW_DYN_INVK;
			LT(1).setType(newtype);
			}
			else
			{
			throw new NoViableAltException(LT(1), getFilename());
			}
			
			isFieldArg = oldtype == KW_FIRST_OF ||
			oldtype == KW_LAST_OF  ||
			oldtype == KW_FIRST    ||
			oldtype == KW_LAST;
			
			if (isFieldArg)
			{
			preferFields = true;
			}
			}
			
			{
			{
			switch ( LA(1)) {
			case FUNC_CHAR:
			{
				Aast tmp1510_AST = null;
				tmp1510_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1510_AST);
				match(FUNC_CHAR);
				break;
			}
			case FUNC_CLASS:
			{
				Aast tmp1511_AST = null;
				tmp1511_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1511_AST);
				match(FUNC_CLASS);
				break;
			}
			case FUNC_COM_HANDLE:
			{
				Aast tmp1512_AST = null;
				tmp1512_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1512_AST);
				match(FUNC_COM_HANDLE);
				break;
			}
			case FUNC_DATE:
			{
				Aast tmp1513_AST = null;
				tmp1513_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1513_AST);
				match(FUNC_DATE);
				break;
			}
			case FUNC_DATETIME:
			{
				Aast tmp1514_AST = null;
				tmp1514_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1514_AST);
				match(FUNC_DATETIME);
				break;
			}
			case FUNC_DATETIME_TZ:
			{
				Aast tmp1515_AST = null;
				tmp1515_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1515_AST);
				match(FUNC_DATETIME_TZ);
				break;
			}
			case FUNC_DEC:
			{
				Aast tmp1516_AST = null;
				tmp1516_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1516_AST);
				match(FUNC_DEC);
				break;
			}
			case FUNC_HANDLE:
			{
				Aast tmp1517_AST = null;
				tmp1517_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1517_AST);
				match(FUNC_HANDLE);
				break;
			}
			case FUNC_INT:
			{
				Aast tmp1518_AST = null;
				tmp1518_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1518_AST);
				match(FUNC_INT);
				break;
			}
			case FUNC_INT64:
			{
				Aast tmp1519_AST = null;
				tmp1519_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1519_AST);
				match(FUNC_INT64);
				break;
			}
			case FUNC_LOGICAL:
			{
				Aast tmp1520_AST = null;
				tmp1520_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1520_AST);
				match(FUNC_LOGICAL);
				break;
			}
			case FUNC_LONGCHAR:
			{
				Aast tmp1521_AST = null;
				tmp1521_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1521_AST);
				match(FUNC_LONGCHAR);
				break;
			}
			case FUNC_MEMPTR:
			{
				Aast tmp1522_AST = null;
				tmp1522_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1522_AST);
				match(FUNC_MEMPTR);
				break;
			}
			case FUNC_RAW:
			{
				Aast tmp1523_AST = null;
				tmp1523_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1523_AST);
				match(FUNC_RAW);
				break;
			}
			case FUNC_RECID:
			{
				Aast tmp1524_AST = null;
				tmp1524_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1524_AST);
				match(FUNC_RECID);
				break;
			}
			case FUNC_ROWID:
			{
				Aast tmp1525_AST = null;
				tmp1525_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1525_AST);
				match(FUNC_ROWID);
				break;
			}
			case FUNC_POLY:
			{
				Aast tmp1526_AST = null;
				tmp1526_AST = (Aast)astFactory.create(LT(1));
				astFactory.makeASTRoot(currentAST, tmp1526_AST);
				match(FUNC_POLY);
				break;
			}
			case KW_U_MSG:
			case KW_ASC:
			case KW_ALIAS:
			case KW_CAN_DO:
			case KW_CAST:
			case KW_CHR:
			case KW_CONN_ED:
			case KW_COUNT_OF:
			case KW_DBCP:
			case KW_DBCOLL:
			case KW_DBPARAM:
			case KW_DBREST:
			case KW_DBTASKID:
			case KW_DBTYPE:
			case KW_DBVERS:
			case KW_DYN_ENUM:
			case KW_DYN_FUNC:
			case KW_DYN_INVK:
			case KW_DYN_PROP:
			case KW_ENCODE:
			case KW_ENTRY:
			case KW_ETIME:
			case KW_FILL:
			case KW_FIRST:
			case KW_FIRST_OF:
			case KW_FR_COL:
			case KW_FR_DOWN:
			case KW_FR_LINE:
			case KW_FR_ROW:
			case KW_GET_BYTE:
			case KW_GET_CODP:
			case KW_GET_COLL:
			case KW_HASHCODE:
			case KW_INDEX:
			case KW_IS_LEAD:
			case KW_KBLABEL:
			case KW_KEYCODE:
			case KW_KEYFUNC:
			case KW_KEYLAB:
			case KW_KW:
			case KW_LAST:
			case KW_LAST_OF:
			case KW_LDBNAME:
			case KW_LIB:
			case KW_LINE_CNT:
			case KW_LOOKUP:
			case KW_MEMBER:
			case KW_NUM_ENT:
			case KW_PAGE_NUM:
			case KW_PDBNAME:
			case KW_PROGNAME:
			case KW_PROVER:
			case KW_QRY_OFF:
			case KW_R_INDEX:
			case KW_SDBNAME:
			case KW_SEARCH:
			case KW_SETUSER:
			case KW_TO_ROWID:
			case KW_TRIM:
			case KW_USERID:
			{
				reserved_functions();
				astFactory.addASTChild(currentAST, returnAST);
				break;
			}
			case UNKNOWN_TOKEN:
			{
				Aast tmp1527_AST = null;
				tmp1527_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1527_AST);
				match(UNKNOWN_TOKEN);
				break;
			}
			default:
				if ((_tokenSet_15.member(LA(1)))) {
					symbol();
					astFactory.addASTChild(currentAST, returnAST);
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			func_call_parameters(builtin);
			astFactory.addASTChild(currentAST, returnAST);
			}
			func_call_AST = (Aast)currentAST.root;
			
			// save any original token type that rewriting may have erased
			if (oldtype != -1)
			func_call_AST.putAnnotation("oldtype", Long.valueOf(oldtype));
			
			// write our function-specific annotations
			sym.annotateFunction(funcname, func_call_AST, false);            
			
			if (isFieldArg)
			{
			preferFields = false;
			}
			
			func_call_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = func_call_AST;
	}
	
/**
 * This rule implements the special built-in <code>ACCUM</code> function,
 * which can be used in an expression (which is what differentiates
 * it from the language statement of the same name). Note that this construct
 * inherently conflicts with the language statement and the parser resolves
 * this just as Progress does: by giving the language statement 
 * {@link #accumulate_stmt} precedence and thus matching on it first (in the
 * top-level {@link #statement} rule rather than in {@link #assignment}
 * which is how this current rule gets matched.
 * <p>
 * This rule is described as special because it doesn't follow the normal
 * patterns of function calls, even for built-in functions. In particular,
 * it has 2 unparenthesized parameters that are actually either a
 * multi-keyword {@link #aggregate_phrase} or an {@link #expr}. Since this
 * does not match the standard (generic) function call syntax, this function
 * was implemented as a standalone alternative in {@link #primary_expr},
 * which makes it a peer of the generic {@link #func_call} rule.
 * <p>
 * Ambiguity warnings were generated in the <code>aggregate_phrase</code>
 * when this rule was added to the {@link #primary_expr}. As far as can be
 * found, there is no real ambiguity in practice and that rule has had
 * ambiguity warnings suppressed as a result.
 */
	public final void accum_function() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast accum_function_AST = null;
		Token  a = null;
		Aast a_AST = null;
		
		try {      // for error handling
			a = LT(1);
			a_AST = (Aast)astFactory.create(a);
			astFactory.makeASTRoot(currentAST, a_AST);
			match(KW_ACCUM);
			saveAndReplaceType(a_AST, FUNC_POLY);
			aggregate_phrase();
			astFactory.addASTChild(currentAST, returnAST);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			accum_function_AST = (Aast)currentAST.root;
			
			// write our function-specific annotations
			sym.annotateFunction(accum_function_AST.getText(), accum_function_AST, false);            
			
			accum_function_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = accum_function_AST;
	}
	
/**
 * This rule implements the special built-in <code>CAN-FIND</code> function,
 * which can be used in an expression.
 * <p>
 * This rule is described as special because it doesn't follow the normal
 * patterns of function calls, even for built-in functions. In particular,
 * its parameters are an exact match for the {@link #find_stmt} excluding
 * the <code>FIND</code> keyword itself! Since this does not match the
 * standard (generic) function call syntax, this function was implemented
 * as a standalone alternative in {@link #primary_expr}, which makes it a
 * peer of the generic {@link #func_call} rule.
 */
	public final void can_find_function() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast can_find_function_AST = null;
		Token  c = null;
		Aast c_AST = null;
		
		try {      // for error handling
			
			// push a scope, where the target buffers will be added
			sym.addSchemaScope(false);
			
			c = LT(1);
			c_AST = (Aast)astFactory.create(c);
			astFactory.makeASTRoot(currentAST, c_AST);
			match(KW_CAN_FIND);
			saveAndReplaceType(c_AST, FUNC_LOGICAL);
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			switch ( LA(1)) {
			case KW_FIRST:
			{
				Aast tmp1528_AST = null;
				tmp1528_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1528_AST);
				match(KW_FIRST);
				break;
			}
			case KW_LAST:
			{
				Aast tmp1529_AST = null;
				tmp1529_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1529_AST);
				match(KW_LAST);
				break;
			}
			case KW_NEXT:
			{
				Aast tmp1530_AST = null;
				tmp1530_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1530_AST);
				match(KW_NEXT);
				break;
			}
			case KW_CURRENT:
			{
				Aast tmp1531_AST = null;
				tmp1531_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1531_AST);
				match(KW_CURRENT);
				break;
			}
			default:
				if ((LA(1)==KW_PREV) && (_tokenSet_13.member(LA(2))) && (_tokenSet_256.member(LA(3)))) {
					Aast tmp1532_AST = null;
					tmp1532_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1532_AST);
					match(KW_PREV);
				}
				else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_256.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			
			boolean oldUniqueFieldMatch = sym.setUniqueFieldMatch(false);
			
			record_phrase(true, false);
			astFactory.addASTChild(currentAST, returnAST);
			
			sym.setUniqueFieldMatch(oldUniqueFieldMatch);
			
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			can_find_function_AST = (Aast)currentAST.root;
			
			// write our function-specific annotations
			sym.annotateFunction(can_find_function_AST.getText(), can_find_function_AST, false);
			
			// remove the scope, but do not propagate
			sym.deleteSchemaScope(false);
			
			can_find_function_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = can_find_function_AST;
	}
	
/**
 * This rule implements the special built-in <code>SUPER</code> function,
 * which can be used in an expression.
 * <p>
 * This rule is described as special because it doesn't follow the normal
 * patterns of function calls, even for built-in functions. In particular,
 * its optional parameters are an exact match for the {@link #parameter}
 * rule. Since this does not match the standard (generic) function call
 * syntax, this function was implemented as a standalone alternative in
 * {@link #primary_expr}, which makes it a peer of the generic 
 * {@link #func_call} rule.
 * <p>
 * ANTLR's bogus ambiguity warnings have been disabled.
 */
	public final void super_function() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast super_function_AST = null;
		Token  s = null;
		Aast s_AST = null;
		
		try {      // for error handling
			s = LT(1);
			s_AST = (Aast)astFactory.create(s);
			astFactory.makeASTRoot(currentAST, s_AST);
			match(KW_SUPER);
			saveAndReplaceType(s_AST, FUNC_POLY);
			{
			if ((LA(1)==LPARENS) && (_tokenSet_79.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
				param_passing_list(false);
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			super_function_AST = (Aast)currentAST.root;
			
			// write our function-specific annotations
			sym.annotateFunction(super_function_AST.getText(), super_function_AST, false);            
			
			super_function_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = super_function_AST;
	}
	
/**
 * This rule implements the special built-in functions that can be used
 * used in an expression but which don't take normal parenthesized parameters
 * AND for which the single {@link #lvalue} parameter for each of these is
 * prefixed in front of the function name.  Note that the <code>lvalue</code>
 * is not matched here, but rather in {@link #primary_expr}. 
 * <p>
 * The following are matched:
 * <p>
 * <pre>
 * lvalue ENTERED
 * lvalue NOT ENTERED
 * </pre>
 * <p>
 * This rule is described as special because it doesn't follow the normal
 * patterns of function calls, even for built-in functions.  Since this
 * does not match the standard (generic) function call syntax, this function
 * was implemented as an option after the <code>lvalue</code> alternative in
 * in the calling rule.
 */
	public final void postfix_funcs() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast postfix_funcs_AST = null;
		
		try {      // for error handling
			
			boolean entered = true;
			
			{
			switch ( LA(1)) {
			case KW_NOT:
			{
				Aast tmp1533_AST = null;
				tmp1533_AST = (Aast)astFactory.create(LT(1));
				match(KW_NOT);
				entered = false;
				break;
			}
			case KW_ENTERED:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			Aast tmp1534_AST = null;
			tmp1534_AST = (Aast)astFactory.create(LT(1));
			match(KW_ENTERED);
			postfix_funcs_AST = (Aast)currentAST.root;
			
			String funcName = "entered";
			int    oldtype  = KW_ENTERED;
			
			if (!entered)
			{
			funcName = "not entered";
			oldtype  = NOT_ENTERED;
			}
			
			postfix_funcs_AST = (Aast)astFactory.make( (new ASTArray(1)).add((Aast)astFactory.create(FUNC_LOGICAL,funcName)));
			
			// write our function-specific annotations
			sym.annotateFunction(funcName, postfix_funcs_AST, false);            
			
			// add the oldtype annotation
			postfix_funcs_AST.putAnnotation("oldtype", Long.valueOf(oldtype));
			
			currentAST.root = postfix_funcs_AST;
			currentAST.child = postfix_funcs_AST!=null &&postfix_funcs_AST.getFirstChild()!=null ?
				postfix_funcs_AST.getFirstChild() : postfix_funcs_AST;
			currentAST.advanceChildToEnd();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = postfix_funcs_AST;
	}
	
/**
 * This rule implements the special built-in <code>IF THEN ELSE</code>
 * function, which can be used in an expression (which is what differentiates
 * it from the language statement of the same name). Note that this construct
 * inherently conflicts with the language statement and the parser resolves
 * this just as Progress does: by giving the language statement 
 * {@link #if_stmt} precedence and thus matching on it first (in the
 * top-level {@link #statement} rule rather than in {@link #assignment}
 * which is how this current rule gets matched.
 * <p>
 * This rule is described as special because it doesn't follow the normal
 * patterns of function calls, even for built-in functions. In particular,
 * it has 3 reserved keywords that are all requried (the <code>ELSE</code>
 * is not optional) and in between each keyword is an expression. Since this
 * does not match the standard (generic) function call syntax, this function
 * was implemented as a standalone alternative in {@link #primary_expr},
 * which makes it a peer of the generic {@link #func_call} rule.
 * <p>
 * Ambiguity warnings were generated in the {@link #log_and_expr} and in
 * {@link #sum_expr} when this rule was added to the {@link #primary_expr}
 * rule. As far as can be found, there is no real ambiguity in practice and
 * those rules have had ambiguity warnings suppressed as a result.
 */
	public final void if_func() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast if_func_AST = null;
		Token  i = null;
		Aast i_AST = null;
		Token  th = null;
		Aast th_AST = null;
		Token  el = null;
		Aast el_AST = null;
		
		try {      // for error handling
			i = LT(1);
			i_AST = (Aast)astFactory.create(i);
			astFactory.makeASTRoot(currentAST, i_AST);
			match(KW_IF);
			saveAndReplaceType(i_AST, FUNC_POLY);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			th = LT(1);
			th_AST = (Aast)astFactory.create(th);
			match(KW_THEN);
			hide(th);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			el = LT(1);
			el_AST = (Aast)astFactory.create(el);
			match(KW_ELSE);
			hide(el);
			expr();
			astFactory.addASTChild(currentAST, returnAST);
			if_func_AST = (Aast)currentAST.root;
			
			// write our function-specific annotations
			sym.annotateFunction(if_func_AST.getText(), if_func_AST, false);            
			
			if_func_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = if_func_AST;
	}
	
/**   
 * Matches Progress 4GL built-in function names that are <b>reserved</b> 
 * keywords. This only includes functions that take parameters. Built-in
 * functions that take no parameters are treated like variables.  See
 * {@link #reserved_variables}.
 * <p>
 * This is generally only used to generate the proper lookahead predictions
 * in the top level parser methods, such that calling rules would see tokens
 * of this type.  It is expected that the calling method would rewrite the
 * token type of such tokens such that this alternative is never actually
 * entered at runtime.  Thus this method really just provides a 'pull' into
 * the calling method.  See {@link #func_call}.
 * <p> 
 * Note that there are some built-in functions that can act like variables
 * OR as a normal parenthesized function.  In other words, for the following
 * list, the parenthesis are optional:
 * <p>
 * <ul>
 *    <li>ETIME
 *    <li>FRAME-COL
 *    <li>FRAME-DOWN
 *    <li>FRAME-LINE
 *    <li>FRAME-ROW
 *    <li>LINE-COUNTER
 *    <li>PAGE-NUMBER
 *    <li>PROVERSION
 *    <li>USERID
 * </ul>
 * <p>
 * Such keywords are included in both this rule and in
 * <code>reserved_variables</code>. 
 */
	public final void reserved_functions() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast reserved_functions_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_U_MSG:
			{
				Aast tmp1535_AST = null;
				tmp1535_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1535_AST);
				match(KW_U_MSG);
				break;
			}
			case KW_ALIAS:
			{
				Aast tmp1536_AST = null;
				tmp1536_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1536_AST);
				match(KW_ALIAS);
				break;
			}
			case KW_ASC:
			{
				Aast tmp1537_AST = null;
				tmp1537_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1537_AST);
				match(KW_ASC);
				break;
			}
			case KW_CAN_DO:
			{
				Aast tmp1538_AST = null;
				tmp1538_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1538_AST);
				match(KW_CAN_DO);
				break;
			}
			case KW_CAST:
			{
				Aast tmp1539_AST = null;
				tmp1539_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1539_AST);
				match(KW_CAST);
				break;
			}
			case KW_CHR:
			{
				Aast tmp1540_AST = null;
				tmp1540_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1540_AST);
				match(KW_CHR);
				break;
			}
			case KW_COUNT_OF:
			{
				Aast tmp1541_AST = null;
				tmp1541_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1541_AST);
				match(KW_COUNT_OF);
				break;
			}
			case KW_CONN_ED:
			{
				Aast tmp1542_AST = null;
				tmp1542_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1542_AST);
				match(KW_CONN_ED);
				break;
			}
			case KW_DBCP:
			{
				Aast tmp1543_AST = null;
				tmp1543_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1543_AST);
				match(KW_DBCP);
				break;
			}
			case KW_DBCOLL:
			{
				Aast tmp1544_AST = null;
				tmp1544_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1544_AST);
				match(KW_DBCOLL);
				break;
			}
			case KW_DBPARAM:
			{
				Aast tmp1545_AST = null;
				tmp1545_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1545_AST);
				match(KW_DBPARAM);
				break;
			}
			case KW_DBREST:
			{
				Aast tmp1546_AST = null;
				tmp1546_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1546_AST);
				match(KW_DBREST);
				break;
			}
			case KW_DBTASKID:
			{
				Aast tmp1547_AST = null;
				tmp1547_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1547_AST);
				match(KW_DBTASKID);
				break;
			}
			case KW_DBTYPE:
			{
				Aast tmp1548_AST = null;
				tmp1548_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1548_AST);
				match(KW_DBTYPE);
				break;
			}
			case KW_DBVERS:
			{
				Aast tmp1549_AST = null;
				tmp1549_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1549_AST);
				match(KW_DBVERS);
				break;
			}
			case KW_DYN_ENUM:
			{
				Aast tmp1550_AST = null;
				tmp1550_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1550_AST);
				match(KW_DYN_ENUM);
				break;
			}
			case KW_DYN_FUNC:
			{
				Aast tmp1551_AST = null;
				tmp1551_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1551_AST);
				match(KW_DYN_FUNC);
				break;
			}
			case KW_DYN_INVK:
			{
				Aast tmp1552_AST = null;
				tmp1552_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1552_AST);
				match(KW_DYN_INVK);
				break;
			}
			case KW_DYN_PROP:
			{
				Aast tmp1553_AST = null;
				tmp1553_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1553_AST);
				match(KW_DYN_PROP);
				break;
			}
			case KW_ENCODE:
			{
				Aast tmp1554_AST = null;
				tmp1554_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1554_AST);
				match(KW_ENCODE);
				break;
			}
			case KW_ENTRY:
			{
				Aast tmp1555_AST = null;
				tmp1555_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1555_AST);
				match(KW_ENTRY);
				break;
			}
			case KW_ETIME:
			{
				Aast tmp1556_AST = null;
				tmp1556_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1556_AST);
				match(KW_ETIME);
				break;
			}
			case KW_FILL:
			{
				Aast tmp1557_AST = null;
				tmp1557_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1557_AST);
				match(KW_FILL);
				break;
			}
			case KW_FIRST:
			{
				Aast tmp1558_AST = null;
				tmp1558_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1558_AST);
				match(KW_FIRST);
				break;
			}
			case KW_FIRST_OF:
			{
				Aast tmp1559_AST = null;
				tmp1559_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1559_AST);
				match(KW_FIRST_OF);
				break;
			}
			case KW_FR_COL:
			{
				Aast tmp1560_AST = null;
				tmp1560_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1560_AST);
				match(KW_FR_COL);
				break;
			}
			case KW_FR_DOWN:
			{
				Aast tmp1561_AST = null;
				tmp1561_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1561_AST);
				match(KW_FR_DOWN);
				break;
			}
			case KW_FR_LINE:
			{
				Aast tmp1562_AST = null;
				tmp1562_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1562_AST);
				match(KW_FR_LINE);
				break;
			}
			case KW_FR_ROW:
			{
				Aast tmp1563_AST = null;
				tmp1563_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1563_AST);
				match(KW_FR_ROW);
				break;
			}
			case KW_GET_BYTE:
			{
				Aast tmp1564_AST = null;
				tmp1564_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1564_AST);
				match(KW_GET_BYTE);
				break;
			}
			case KW_GET_CODP:
			{
				Aast tmp1565_AST = null;
				tmp1565_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1565_AST);
				match(KW_GET_CODP);
				break;
			}
			case KW_GET_COLL:
			{
				Aast tmp1566_AST = null;
				tmp1566_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1566_AST);
				match(KW_GET_COLL);
				break;
			}
			case KW_HASHCODE:
			{
				Aast tmp1567_AST = null;
				tmp1567_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1567_AST);
				match(KW_HASHCODE);
				break;
			}
			case KW_INDEX:
			{
				Aast tmp1568_AST = null;
				tmp1568_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1568_AST);
				match(KW_INDEX);
				break;
			}
			case KW_IS_LEAD:
			{
				Aast tmp1569_AST = null;
				tmp1569_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1569_AST);
				match(KW_IS_LEAD);
				break;
			}
			case KW_KBLABEL:
			{
				Aast tmp1570_AST = null;
				tmp1570_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1570_AST);
				match(KW_KBLABEL);
				break;
			}
			case KW_KEYCODE:
			{
				Aast tmp1571_AST = null;
				tmp1571_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1571_AST);
				match(KW_KEYCODE);
				break;
			}
			case KW_KEYFUNC:
			{
				Aast tmp1572_AST = null;
				tmp1572_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1572_AST);
				match(KW_KEYFUNC);
				break;
			}
			case KW_KEYLAB:
			{
				Aast tmp1573_AST = null;
				tmp1573_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1573_AST);
				match(KW_KEYLAB);
				break;
			}
			case KW_KW:
			{
				Aast tmp1574_AST = null;
				tmp1574_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1574_AST);
				match(KW_KW);
				break;
			}
			case KW_LAST:
			{
				Aast tmp1575_AST = null;
				tmp1575_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1575_AST);
				match(KW_LAST);
				break;
			}
			case KW_LAST_OF:
			{
				Aast tmp1576_AST = null;
				tmp1576_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1576_AST);
				match(KW_LAST_OF);
				break;
			}
			case KW_LDBNAME:
			{
				Aast tmp1577_AST = null;
				tmp1577_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1577_AST);
				match(KW_LDBNAME);
				break;
			}
			case KW_LIB:
			{
				Aast tmp1578_AST = null;
				tmp1578_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1578_AST);
				match(KW_LIB);
				break;
			}
			case KW_LINE_CNT:
			{
				Aast tmp1579_AST = null;
				tmp1579_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1579_AST);
				match(KW_LINE_CNT);
				break;
			}
			case KW_LOOKUP:
			{
				Aast tmp1580_AST = null;
				tmp1580_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1580_AST);
				match(KW_LOOKUP);
				break;
			}
			case KW_MEMBER:
			{
				Aast tmp1581_AST = null;
				tmp1581_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1581_AST);
				match(KW_MEMBER);
				break;
			}
			case KW_NUM_ENT:
			{
				Aast tmp1582_AST = null;
				tmp1582_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1582_AST);
				match(KW_NUM_ENT);
				break;
			}
			case KW_PAGE_NUM:
			{
				Aast tmp1583_AST = null;
				tmp1583_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1583_AST);
				match(KW_PAGE_NUM);
				break;
			}
			case KW_PDBNAME:
			{
				Aast tmp1584_AST = null;
				tmp1584_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1584_AST);
				match(KW_PDBNAME);
				break;
			}
			case KW_PROGNAME:
			{
				Aast tmp1585_AST = null;
				tmp1585_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1585_AST);
				match(KW_PROGNAME);
				break;
			}
			case KW_PROVER:
			{
				Aast tmp1586_AST = null;
				tmp1586_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1586_AST);
				match(KW_PROVER);
				break;
			}
			case KW_QRY_OFF:
			{
				Aast tmp1587_AST = null;
				tmp1587_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1587_AST);
				match(KW_QRY_OFF);
				break;
			}
			case KW_R_INDEX:
			{
				Aast tmp1588_AST = null;
				tmp1588_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1588_AST);
				match(KW_R_INDEX);
				break;
			}
			case KW_SDBNAME:
			{
				Aast tmp1589_AST = null;
				tmp1589_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1589_AST);
				match(KW_SDBNAME);
				break;
			}
			case KW_SEARCH:
			{
				Aast tmp1590_AST = null;
				tmp1590_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1590_AST);
				match(KW_SEARCH);
				break;
			}
			case KW_SETUSER:
			{
				Aast tmp1591_AST = null;
				tmp1591_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1591_AST);
				match(KW_SETUSER);
				break;
			}
			case KW_TO_ROWID:
			{
				Aast tmp1592_AST = null;
				tmp1592_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1592_AST);
				match(KW_TO_ROWID);
				break;
			}
			case KW_TRIM:
			{
				Aast tmp1593_AST = null;
				tmp1593_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1593_AST);
				match(KW_TRIM);
				break;
			}
			case KW_USERID:
			{
				Aast tmp1594_AST = null;
				tmp1594_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1594_AST);
				match(KW_USERID);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			reserved_functions_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_257);
		}
		returnAST = reserved_functions_AST;
	}
	
/**
 * Matches a parenthesized, comma-delimited list of {@link #func_call_parm}
 * parameters.
 * <p>
 * This matches a set of 2 or more tokens where the first is always
 * <code>LPARENS</code> and the last is always <code>RPARENS</code>. In between is an
 * optional expression, optionally followed by any number of
 * [<code>COMMA</code> func_call_parm] constructs.  This is a parameter list
 * and it can contain any kind of expression.  This rule calls the top level
 * expression entry point allows the full variety of all possible expressions
 * to be specified as parameters.
 * <p> 
 * Note that in the resulting AST, the parenthesis and commas used to define
 * the parameter list are discarded.  In other words, they do not appear in
 * the AST as nodes.  Instead, each parameter (which can be a complete
 * expression subtree or a simple single node like an lvalue) is created
 * as a separate child node of the function type token.  All parameters are 
 * maintained as child nodes in the exact order of the function call itself,
 * so this is essentially the signature of the function.  It it also the
 * proper AST definition to enable simple evaluation of functions with any
 * arbitrary signature.
 * <p>
 * There is an undocumented feature of the 4GL where <code>INPUT</code>,
 * <code>OUTPUT</code> and <code>INPUT-OUTPUT</code> are all ignored if
 * present in a function call parameter. This can be seen in the
 * {@link #func_call_parm}.
 *
 * @param    builtin
 *           <code>true</code> if this is a built-in function.
 */
	public final void func_call_parameters(
		boolean builtin
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast func_call_parameters_AST = null;
		
		try {      // for error handling
			lparens();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((_tokenSet_24.member(LA(1)))) {
				func_call_parm(builtin);
				astFactory.addASTChild(currentAST, returnAST);
				{
				_loop1705:
				do {
					if ((LA(1)==COMMA)) {
						comma();
						astFactory.addASTChild(currentAST, returnAST);
						func_call_parm(builtin);
						astFactory.addASTChild(currentAST, returnAST);
					}
					else {
						break _loop1705;
					}
					
				} while (true);
				}
			}
			else if ((LA(1)==RPARENS)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			rparens();
			astFactory.addASTChild(currentAST, returnAST);
			func_call_parameters_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = func_call_parameters_AST;
	}
	
/**
 * Represents a function call parameter which is the equivalent of an
 * {@link #expr} BUT it can be optionally prefaced with any of the keywords
 * <code>INPUT, INPUT-OUTPUT or OUTPUT</code>.  These are ignored but seem
 * to be tolerated since it looks the same as <code>RUN</code> statement
 * or <code>PUBLISH</code> statement parameters (as well as the various
 * procedure and function declarations).  The only exception to this is
 * if the function call is to a built-in function that has not been overridden
 * by a user-defined function. In such a case, the <code>INPUT</code> keyword
 * will be treated as the built-in <code>INPUT</code> function instead of
 * being ignored.
 * <p>
 * To actually use the <code>INPUT</code> built-in function as a parameter,
 * (in a call to a user-defined function) one must parenthesize the call OR add the
 * following FRAME frame-name qualifier between the KW_INPUT and the widget name.
 * This is how it works in Progress!  Otherwise the presence of the KW_INPUT is
 * treated as an ignored mode qualifier. 
 *
 * @param    builtin
 *           <code>true</code> if this is a parameter to a builtin function.
 */
	public final void func_call_parm(
		boolean builtin
	) throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast func_call_parm_AST = null;
		Aast e_AST = null;
		
		boolean isInputFunc = (LA(1) == KW_INPUT &&
		LA(2) == KW_FRAME &&
		resolveLvalueCoreType(4, false) != -1);
		boolean classLookup = sym.isClassLookup();
		sym.setClassLookup(false);
		
		
		try {      // for error handling
			{
			if (((LA(1)==KW_INPUT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( !builtin && !isInputFunc )) {
				Aast tmp1595_AST = null;
				tmp1595_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1595_AST);
				match(KW_INPUT);
			}
			else if ((LA(1)==KW_OUTPUT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp1596_AST = null;
				tmp1596_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1596_AST);
				match(KW_OUTPUT);
			}
			else if ((LA(1)==KW_IN_OUT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
				Aast tmp1597_AST = null;
				tmp1597_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1597_AST);
				match(KW_IN_OUT);
			}
			else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			expr();
			e_AST = (Aast)returnAST;
			astFactory.addASTChild(currentAST, returnAST);
			{
			_loop1709:
			do {
				switch ( LA(1)) {
				case KW_APPEND:
				{
					Aast tmp1598_AST = null;
					tmp1598_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1598_AST);
					match(KW_APPEND);
					break;
				}
				case KW_BY_VALUE:
				{
					Aast tmp1599_AST = null;
					tmp1599_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1599_AST);
					match(KW_BY_VALUE);
					break;
				}
				case KW_BY_REF:
				{
					Aast tmp1600_AST = null;
					tmp1600_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1600_AST);
					match(KW_BY_REF);
					break;
				}
				case KW_BIND:
				{
					Aast tmp1601_AST = null;
					tmp1601_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1601_AST);
					match(KW_BIND);
					break;
				}
				default:
				{
					break _loop1709;
				}
				}
			} while (true);
			}
			
			sym.setClassLookup(classLookup);
			
			func_call_parm_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_258);
		}
		returnAST = func_call_parm_AST;
	}
	
/**
 * Matches the array subscripting operator [ ] in all of its forms. The most
 * basic version requires a single integer expression (which can be as simple
 * as an integer constant or it can include a full expression including other
 * variables or fields).  Since Progress 4GL allows whitespace to be placed
 * between the symbol name and the left bracket, as well as used arbitrarily
 * inside the brackets, this subscripting support is best implemented in 
 * the parser.  Note that the Progress documentation states that the subscript
 * must be specified only as integer constants, experience proves that 
 * the real requirement is for it to be an integer expression.
 * <p>
 * In Progress it is possible to reference a range of array elements in 
 * some cases (e.g. the <code>DISPLAY</code> language statement) however it
 * is not possible to do this in traditional expressions (i.e. Progress does
 * not have integrated support for vector operations).  To use this range
 * subscript, the initial expression is followed by the <code>FOR</code>
 * keyword and then an integer constant to specify the length of the range. 
 * This rule handles both forms, although there is no checking to confirm
 * that the range form is only used in valid locations.
 * <p>
 * The resulting tree is rooted under the left bracket token and the right
 * bracket is discarded.
 * <p>
 * When called during the processing of {@link #like_clause}, the expression
 * being matched is always converted into the equivalent of a 
 * <code>NUM_LITERAL</code> with a value of 1. Strangely, this is how 
 * Progress does it.  The bizarre thing here is that complete garbage can
 * be inserted in this expression and if it is close enough to something that
 * would be a valid expression it will be allowed.  Here is a list of 
 * subscripts that can work:
 * <p>
 * <pre>
 * def var array  as int extent 10 init [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].
 *
 * def var scalar1 like array[3].
 * def var scalar2 like array[1].
 * def var scalar3 like array[0].            -&gt; normally invalid since 0 is out of bounds!
 * def var scalar4 like array[17].           -&gt; normally invalid since 17 is out of bounds!
 * def var scalar5 like array[trash].        -&gt; normally invalid since trash is not a var!
 * def var scalar6 like array[trash + junk]. -&gt; normally invalid since trash and junk are not vars!
 * def var scalar7 like array[1 + 2].
 * </pre>
 * <p>
 * Additionally, with the advent of .NET object support in 10.2x, the index
 * property concept of .NET is supported.  This means that any kind of
 * expression (not just numeric) can be used to index into .NET object arrays
 * if that .NET class has the proper support.
 * <p>
 * In Progress, all of the above are treated as a <code>like array[1]</code>
 * though this is undocumented and non-intuitive.  Either way, we do the
 * same thing.
 * <p>
 * This rule is only called by the {@link #lvalue} rule.
 */
	public final void subscript() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast subscript_AST = null;
		Token  rb = null;
		Aast rb_AST = null;
		
		try {      // for error handling
			
			boolean oldpref = preferWidgets;
			
			// temporarily disable widget preference so the expression will
			// parse without widget refs
			if (oldpref)
			{
			preferWidgets = false;
			}
			
			{
			Aast tmp1602_AST = null;
			tmp1602_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1602_AST);
			match(LBRACKET);
			{
			if (((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( !inLikeClause )) {
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case KW_FOR:
				{
					Aast tmp1603_AST = null;
					tmp1603_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1603_AST);
					match(KW_FOR);
					whole_number_literal();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case RBRACKET:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if (((LA(1) >= DOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				likeSubscript();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			rb = LT(1);
			rb_AST = (Aast)astFactory.create(rb);
			match(RBRACKET);
			hide(rb);
			}
			
			// reset back to state at entrance to this method
			if (oldpref)
			{
			preferWidgets = true;
			}         
			
			subscript_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = subscript_AST;
	}
	
/**
 * Matches a single COM parameter which is an {@link #expr} and which may 
 * have optional modifiers for overriding data types (see 
 * {@link #com_as_clause}) or for specifying passing parameters by pointer
 * (<code>BY-POINTER</code> or <code>BY-VARIANT-POINTER</code>).
 * <p>
 * The tree will always be rooted by <code>COM_PARAMETER</code>. Even if
 * there is no parameter expression, this rule will return a single node
 * of this type so that the null parameter construct of COM can be properly
 * supported.  In other words, the expression is optional.
 * <p>
 * <code>KW_IN_OUT</code> and <code>KW_OUTPUT</code> are matched as
 * optionally prefacing this construct.
 * <p>
 * Called by {@link #com_property_or_method}.
 */
	public final void com_parameter() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast com_parameter_AST = null;
		
		try {      // for error handling
			
			astFactory.makeASTRoot(currentAST, (Aast)astFactory.create(COM_PARAMETER,""));
			
			boolean isInputFunc = (LA(1) == KW_INPUT &&
			LA(2) == KW_FRAME &&
			resolveLvalueCoreType(4, false) != -1);
			
			{
			if ((_tokenSet_24.member(LA(1)))) {
				{
				if (((LA(1)==KW_INPUT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK)))&&( !isInputFunc )) {
					Aast tmp1604_AST = null;
					tmp1604_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1604_AST);
					match(KW_INPUT);
				}
				else if ((LA(1)==KW_IN_OUT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					Aast tmp1605_AST = null;
					tmp1605_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1605_AST);
					match(KW_IN_OUT);
				}
				else if ((LA(1)==KW_OUTPUT) && (_tokenSet_24.member(LA(2))) && ((LA(3) >= DOT && LA(3) <= JUNK))) {
					Aast tmp1606_AST = null;
					tmp1606_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1606_AST);
					match(KW_OUTPUT);
				}
				else if ((_tokenSet_24.member(LA(1))) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3)))) {
				}
				else {
					throw new NoViableAltException(LT(1), getFilename());
				}
				
				}
				expr();
				astFactory.addASTChild(currentAST, returnAST);
				{
				switch ( LA(1)) {
				case KW_AS:
				{
					com_as_clause();
					astFactory.addASTChild(currentAST, returnAST);
					break;
				}
				case KW_BY_PTR:
				case KW_BY_VAR_P:
				case COMMA:
				case RPARENS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				{
				switch ( LA(1)) {
				case KW_BY_PTR:
				{
					Aast tmp1607_AST = null;
					tmp1607_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1607_AST);
					match(KW_BY_PTR);
					break;
				}
				case KW_BY_VAR_P:
				{
					Aast tmp1608_AST = null;
					tmp1608_AST = (Aast)astFactory.create(LT(1));
					astFactory.addASTChild(currentAST, tmp1608_AST);
					match(KW_BY_VAR_P);
					break;
				}
				case COMMA:
				case RPARENS:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
			}
			else if ((LA(1)==COMMA||LA(1)==RPARENS)) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			com_parameter_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_29);
		}
		returnAST = com_parameter_AST;
	}
	
/**
 * Matches the construct following a COM parameter which overrides the
 * default Progress type conversion with a more specific COM type conversion.
 * The first token must be a <code>KW_AS</code> and this will root the
 * sub-tree.
 * <p>
 * The following types are known to be possible (and the normal ones in
 * {@link #as_clause} are known to be impossible to use here):
 * <p>
 * <pre>
 * CURRENCY
 * FLOAT
 * ERROR-CODE
 * IUNKNOWN
 * SHORT
 * UNSIGNED-BYTE
 * </pre>
 * <p>
 * Called by {@link #com_parameter}.
 */
	public final void com_as_clause() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast com_as_clause_AST = null;
		
		try {      // for error handling
			Aast tmp1609_AST = null;
			tmp1609_AST = (Aast)astFactory.create(LT(1));
			astFactory.makeASTRoot(currentAST, tmp1609_AST);
			match(KW_AS);
			{
			switch ( LA(1)) {
			case KW_CURRENCY:
			{
				Aast tmp1610_AST = null;
				tmp1610_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1610_AST);
				match(KW_CURRENCY);
				break;
			}
			case KW_FLOAT:
			{
				Aast tmp1611_AST = null;
				tmp1611_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1611_AST);
				match(KW_FLOAT);
				break;
			}
			case KW_ERR_CODE:
			{
				Aast tmp1612_AST = null;
				tmp1612_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1612_AST);
				match(KW_ERR_CODE);
				break;
			}
			case KW_IUNKNOWN:
			{
				Aast tmp1613_AST = null;
				tmp1613_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1613_AST);
				match(KW_IUNKNOWN);
				break;
			}
			case KW_SHORT:
			{
				Aast tmp1614_AST = null;
				tmp1614_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1614_AST);
				match(KW_SHORT);
				break;
			}
			case KW_UNS_BYTE:
			{
				Aast tmp1615_AST = null;
				tmp1615_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1615_AST);
				match(KW_UNS_BYTE);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			com_as_clause_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_259);
		}
		returnAST = com_as_clause_AST;
	}
	
/**   
 * Matches Progress 4GL built-in variable names that are <b>reserved</b> 
 * keywords. This includes functions that take NO parameters. Built-in
 * functions that take no parameters are treated like variables.  For more
 * on functions that take parameters and which have reserved names, see
 * {@link #reserved_functions}.
 * <p>
 * This rule also lists those system handles that are reserved keywords,
 * since such handles are essentially global variables and thus are
 * implemented here as such.
 * <p>
 * This is generally only used to generate the proper lookahead predictions
 * in the top level parser methods, such that calling rules would see tokens
 * of this type.  It is expected that the calling method would rewrite the
 * token type of such tokens such that this alternative is never actually
 * entered at runtime.  Thus this method really just provides a 'pull' into
 * the calling method.  See {@link #lvalue}.
 * <p>
 * Note that there are some built-in functions that can act like variables
 * OR as a normal parenthesized function.  In other words, for the following
 * list, the parenthesis are optional:
 * <p>
 * <ul>
 *    <li>ETIME
 *    <li>GET-CODEPAGE
 *    <li>GET-CODEPAGES
 *    <li>FRAME-COL
 *    <li>FRAME-DOWN
 *    <li>FRAME-LINE
 *    <li>FRAME-ROW
 *    <li>LINE-COUNTER
 *    <li>PAGE-NUMBER
 *    <li>PROVERSION
 *    <li>USERID
 * </ul>
 * <p>
 * Such keywords are included in both this rule and in
 * <code>reserved_functions</code>.
 */
	public final void reserved_variables() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast reserved_variables_AST = null;
		
		try {      // for error handling
			{
			switch ( LA(1)) {
			case KW_U_CTRL:
			{
				Aast tmp1616_AST = null;
				tmp1616_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1616_AST);
				match(KW_U_CTRL);
				break;
			}
			case KW_U_MSG:
			{
				Aast tmp1617_AST = null;
				tmp1617_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1617_AST);
				match(KW_U_MSG);
				break;
			}
			case KW_U_SERIAL:
			{
				Aast tmp1618_AST = null;
				tmp1618_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1618_AST);
				match(KW_U_SERIAL);
				break;
			}
			case KW_U_PCTRL:
			{
				Aast tmp1619_AST = null;
				tmp1619_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1619_AST);
				match(KW_U_PCTRL);
				break;
			}
			case KW_ACT_FORM:
			{
				Aast tmp1620_AST = null;
				tmp1620_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1620_AST);
				match(KW_ACT_FORM);
				break;
			}
			case KW_ACT_WIN:
			{
				Aast tmp1621_AST = null;
				tmp1621_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1621_AST);
				match(KW_ACT_WIN);
				break;
			}
			case KW_AUD_CTRL:
			{
				Aast tmp1622_AST = null;
				tmp1622_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1622_AST);
				match(KW_AUD_CTRL);
				break;
			}
			case KW_AUD_POL:
			{
				Aast tmp1623_AST = null;
				tmp1623_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1623_AST);
				match(KW_AUD_POL);
				break;
			}
			case KW_CLIP:
			{
				Aast tmp1624_AST = null;
				tmp1624_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1624_AST);
				match(KW_CLIP);
				break;
			}
			case KW_CODEBASE:
			{
				Aast tmp1625_AST = null;
				tmp1625_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1625_AST);
				match(KW_CODEBASE);
				break;
			}
			case KW_COMPILER:
			{
				Aast tmp1626_AST = null;
				tmp1626_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1626_AST);
				match(KW_COMPILER);
				break;
			}
			case KW_CUR_LANG:
			{
				Aast tmp1627_AST = null;
				tmp1627_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1627_AST);
				match(KW_CUR_LANG);
				break;
			}
			case KW_CUR_WIN:
			{
				Aast tmp1628_AST = null;
				tmp1628_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1628_AST);
				match(KW_CUR_WIN);
				break;
			}
			case KW_DATASRV:
			{
				Aast tmp1629_AST = null;
				tmp1629_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1629_AST);
				match(KW_DATASRV);
				break;
			}
			case KW_DBNAME:
			{
				Aast tmp1630_AST = null;
				tmp1630_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1630_AST);
				match(KW_DBNAME);
				break;
			}
			case KW_DEBUGGER:
			{
				Aast tmp1631_AST = null;
				tmp1631_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1631_AST);
				match(KW_DEBUGGER);
				break;
			}
			case KW_DEF_WIN:
			{
				Aast tmp1632_AST = null;
				tmp1632_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1632_AST);
				match(KW_DEF_WIN);
				break;
			}
			case KW_DSL_MGR:
			{
				Aast tmp1633_AST = null;
				tmp1633_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1633_AST);
				match(KW_DSL_MGR);
				break;
			}
			case KW_ERR_STAT:
			{
				Aast tmp1634_AST = null;
				tmp1634_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1634_AST);
				match(KW_ERR_STAT);
				break;
			}
			case KW_ETIME:
			{
				Aast tmp1635_AST = null;
				tmp1635_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1635_AST);
				match(KW_ETIME);
				break;
			}
			case KW_FIL_INFO:
			{
				Aast tmp1636_AST = null;
				tmp1636_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1636_AST);
				match(KW_FIL_INFO);
				break;
			}
			case KW_FOCUS:
			{
				Aast tmp1637_AST = null;
				tmp1637_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1637_AST);
				match(KW_FOCUS);
				break;
			}
			case KW_FR_COL:
			{
				Aast tmp1638_AST = null;
				tmp1638_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1638_AST);
				match(KW_FR_COL);
				break;
			}
			case KW_FR_DB:
			{
				Aast tmp1639_AST = null;
				tmp1639_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1639_AST);
				match(KW_FR_DB);
				break;
			}
			case KW_FR_DOWN:
			{
				Aast tmp1640_AST = null;
				tmp1640_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1640_AST);
				match(KW_FR_DOWN);
				break;
			}
			case KW_FR_FIELD:
			{
				Aast tmp1641_AST = null;
				tmp1641_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1641_AST);
				match(KW_FR_FIELD);
				break;
			}
			case KW_FR_FILE:
			{
				Aast tmp1642_AST = null;
				tmp1642_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1642_AST);
				match(KW_FR_FILE);
				break;
			}
			case KW_FR_INDEX:
			{
				Aast tmp1643_AST = null;
				tmp1643_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1643_AST);
				match(KW_FR_INDEX);
				break;
			}
			case KW_FR_LINE:
			{
				Aast tmp1644_AST = null;
				tmp1644_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1644_AST);
				match(KW_FR_LINE);
				break;
			}
			case KW_FR_NAME:
			{
				Aast tmp1645_AST = null;
				tmp1645_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1645_AST);
				match(KW_FR_NAME);
				break;
			}
			case KW_FR_ROW:
			{
				Aast tmp1646_AST = null;
				tmp1646_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1646_AST);
				match(KW_FR_ROW);
				break;
			}
			case KW_FR_VAL:
			{
				Aast tmp1647_AST = null;
				tmp1647_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1647_AST);
				match(KW_FR_VAL);
				break;
			}
			case KW_FWD_DRIV:
			{
				Aast tmp1648_AST = null;
				tmp1648_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1648_AST);
				match(KW_FWD_DRIV);
				break;
			}
			case KW_GW:
			{
				Aast tmp1649_AST = null;
				tmp1649_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1649_AST);
				match(KW_GW);
				break;
			}
			case KW_GET_CODP:
			{
				Aast tmp1650_AST = null;
				tmp1650_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1650_AST);
				match(KW_GET_CODP);
				break;
			}
			case KW_GO_PEND:
			{
				Aast tmp1651_AST = null;
				tmp1651_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1651_AST);
				match(KW_GO_PEND);
				break;
			}
			case KW_IS_ATTR:
			{
				Aast tmp1652_AST = null;
				tmp1652_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1652_AST);
				match(KW_IS_ATTR);
				break;
			}
			case KW_LASTKEY:
			{
				Aast tmp1653_AST = null;
				tmp1653_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1653_AST);
				match(KW_LASTKEY);
				break;
			}
			case KW_LAST_EVT:
			{
				Aast tmp1654_AST = null;
				tmp1654_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1654_AST);
				match(KW_LAST_EVT);
				break;
			}
			case KW_LINE_CNT:
			{
				Aast tmp1655_AST = null;
				tmp1655_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1655_AST);
				match(KW_LINE_CNT);
				break;
			}
			case KW_LOG_MGR:
			{
				Aast tmp1656_AST = null;
				tmp1656_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1656_AST);
				match(KW_LOG_MGR);
				break;
			}
			case KW_MSG_LINE:
			{
				Aast tmp1657_AST = null;
				tmp1657_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1657_AST);
				match(KW_MSG_LINE);
				break;
			}
			case KW_NOW:
			{
				Aast tmp1658_AST = null;
				tmp1658_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1658_AST);
				match(KW_NOW);
				break;
			}
			case KW_NUM_ALIA:
			{
				Aast tmp1659_AST = null;
				tmp1659_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1659_AST);
				match(KW_NUM_ALIA);
				break;
			}
			case KW_NUM_DBS:
			{
				Aast tmp1660_AST = null;
				tmp1660_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1660_AST);
				match(KW_NUM_DBS);
				break;
			}
			case KW_OPSYS:
			{
				Aast tmp1661_AST = null;
				tmp1661_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1661_AST);
				match(KW_OPSYS);
				break;
			}
			case KW_PAGE_NUM:
			{
				Aast tmp1662_AST = null;
				tmp1662_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1662_AST);
				match(KW_PAGE_NUM);
				break;
			}
			case KW_PROC_HND:
			{
				Aast tmp1663_AST = null;
				tmp1663_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1663_AST);
				match(KW_PROC_HND);
				break;
			}
			case KW_PROC_ST:
			{
				Aast tmp1664_AST = null;
				tmp1664_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1664_AST);
				match(KW_PROC_ST);
				break;
			}
			case KW_PROFILER:
			{
				Aast tmp1665_AST = null;
				tmp1665_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1665_AST);
				match(KW_PROFILER);
				break;
			}
			case KW_PROGRESS:
			{
				Aast tmp1666_AST = null;
				tmp1666_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1666_AST);
				match(KW_PROGRESS);
				break;
			}
			case KW_PROMSGS:
			{
				Aast tmp1667_AST = null;
				tmp1667_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1667_AST);
				match(KW_PROMSGS);
				break;
			}
			case KW_PROPATH:
			{
				Aast tmp1668_AST = null;
				tmp1668_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1668_AST);
				match(KW_PROPATH);
				break;
			}
			case KW_PROVER:
			{
				Aast tmp1669_AST = null;
				tmp1669_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1669_AST);
				match(KW_PROVER);
				break;
			}
			case KW_RCOD_INF:
			{
				Aast tmp1670_AST = null;
				tmp1670_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1670_AST);
				match(KW_RCOD_INF);
				break;
			}
			case KW_RETRY:
			{
				Aast tmp1671_AST = null;
				tmp1671_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1671_AST);
				match(KW_RETRY);
				break;
			}
			case KW_RTOPSYS:
			{
				Aast tmp1672_AST = null;
				tmp1672_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1672_AST);
				match(KW_RTOPSYS);
				break;
			}
			case KW_SCRN_LNS:
			{
				Aast tmp1673_AST = null;
				tmp1673_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1673_AST);
				match(KW_SCRN_LNS);
				break;
			}
			case KW_SECUR_P:
			{
				Aast tmp1674_AST = null;
				tmp1674_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1674_AST);
				match(KW_SECUR_P);
				break;
			}
			case KW_SELF:
			{
				Aast tmp1675_AST = null;
				tmp1675_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1675_AST);
				match(KW_SELF);
				break;
			}
			case KW_SESSION:
			{
				Aast tmp1676_AST = null;
				tmp1676_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1676_AST);
				match(KW_SESSION);
				break;
			}
			case KW_SUPER:
			{
				Aast tmp1677_AST = null;
				tmp1677_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1677_AST);
				match(KW_SUPER);
				break;
			}
			case KW_TERM:
			{
				Aast tmp1678_AST = null;
				tmp1678_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1678_AST);
				match(KW_TERM);
				break;
			}
			case KW_THIS_OBJ:
			{
				Aast tmp1679_AST = null;
				tmp1679_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1679_AST);
				match(KW_THIS_OBJ);
				break;
			}
			case KW_THIS_PRC:
			{
				Aast tmp1680_AST = null;
				tmp1680_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1680_AST);
				match(KW_THIS_PRC);
				break;
			}
			case KW_TIME:
			{
				Aast tmp1681_AST = null;
				tmp1681_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1681_AST);
				match(KW_TIME);
				break;
			}
			case KW_TRANS:
			{
				Aast tmp1682_AST = null;
				tmp1682_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1682_AST);
				match(KW_TRANS);
				break;
			}
			case KW_USERID:
			{
				Aast tmp1683_AST = null;
				tmp1683_AST = (Aast)astFactory.create(LT(1));
				astFactory.addASTChild(currentAST, tmp1683_AST);
				match(KW_USERID);
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			}
			}
			reserved_variables_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = reserved_variables_AST;
	}
	
/**
 * Read the following tokens until the <code>RBRACKET</code>, discard these
 * and build an <code>EXPRESSION -&gt; NUM_LITERAL</code> subtree with the
 * value of 1.  This is needed to support bizarre behavior of subscripts in 
 * a {@link #like_clause}.  It is called from {@link #subscript}.
 */
	public final void likeSubscript() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast likeSubscript_AST = null;
		Token  junk = null;
		Aast junk_AST = null;
		
		try {      // for error handling
			{
			int _cnt1776=0;
			_loop1776:
			do {
				if ((((LA(1) >= DOT && LA(1) <= JUNK)) && ((LA(2) >= DOT && LA(2) <= JUNK)) && (_tokenSet_3.member(LA(3))))&&( LA(1) != RBRACKET )) {
					junk = LT(1);
					junk_AST = (Aast)astFactory.create(junk);
					matchNot(EOF);
					hide(junk);
				}
				else {
					if ( _cnt1776>=1 ) { break _loop1776; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt1776++;
			} while (true);
			}
			likeSubscript_AST = (Aast)currentAST.root;
			
			likeSubscript_AST = (Aast)astFactory.make( (new ASTArray(2)).add((Aast)astFactory.create(EXPRESSION,"expression")).add((Aast)astFactory.make( (new ASTArray(1)).add((Aast)astFactory.create(NUM_LITERAL,"1")))));
			
			currentAST.root = likeSubscript_AST;
			currentAST.child = likeSubscript_AST!=null &&likeSubscript_AST.getFirstChild()!=null ?
				likeSubscript_AST.getFirstChild() : likeSubscript_AST;
			currentAST.advanceChildToEnd();
			likeSubscript_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_260);
		}
		returnAST = likeSubscript_AST;
	}
	
/**
 * This rule implements the reference-point construct used in at-phrase.
 * It is called from {@link #at_phrase} rule only.
 * <p>
 * ANTLR detects ambiguity due to the use of non-reserved keywords 
 * and the potential to use symbols and expressions in the k=1 construct in
 * an upper level rule {@link #frame_phrase}.  To eliminate the ambiguity
 * warning, ANTLR's greedy option had to be explicitly enabled.   
 * Since greedy is the default, this doesn't change the code generation, it
 * only suppresses the warning.  <b>Note that this rule checks the k=2 
 * lookahead before matching the <code>PLUS or MINUS</code> keywords.  This 
 * may be OK but it may also bypass the match in a case where something
 * unexpected follows the optional keyword.  Since this cannot be proven
 * for all cases, watch this code!</b> 
 */
	public final void ref_point() throws RecognitionException, TokenStreamException {
		
		returnAST = null;
		ASTPair currentAST = new ASTPair();
		Aast ref_point_AST = null;
		
		try {      // for error handling
			lvalue();
			astFactory.addASTChild(currentAST, returnAST);
			{
			if ((LA(1)==MINUS||LA(1)==PLUS) && (LA(2)==DEC_LITERAL||LA(2)==HEX_LITERAL||LA(2)==NUM_LITERAL) && (_tokenSet_3.member(LA(3)))) {
				{
				switch ( LA(1)) {
				case PLUS:
				{
					Aast tmp1684_AST = null;
					tmp1684_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1684_AST);
					match(PLUS);
					break;
				}
				case MINUS:
				{
					Aast tmp1685_AST = null;
					tmp1685_AST = (Aast)astFactory.create(LT(1));
					astFactory.makeASTRoot(currentAST, tmp1685_AST);
					match(MINUS);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				}
				}
				numeric_literal();
				astFactory.addASTChild(currentAST, returnAST);
			}
			else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (_tokenSet_3.member(LA(3)))) {
			}
			else {
				throw new NoViableAltException(LT(1), getFilename());
			}
			
			}
			ref_point_AST = (Aast)currentAST.root;
		}
		catch (RecognitionException ex) {
			reportError(ex);
			recover(ex,_tokenSet_3);
		}
		returnAST = ref_point_AST;
	}
	
	
	public static final String[] _tokenNames = {
		"<0>",
		"EOF",
		"<2>",
		"NULL_TREE_LOOKAHEAD",
		"DOT",
		"FILEROOT",
		"DB_SYMBOL",
		"ANY_LOCK",
		"FILENAME",
		"BACKSLASH",
		"LIBRARY_REF",
		"BEGIN_RECORDTYPES",
		"TABLE",
		"BUFFER",
		"TEMP_TABLE",
		"WORK_TABLE",
		"END_RECORDTYPES",
		"BEGIN_BUFFERTYPES",
		"NO_REFERENCE",
		"WEAK_REFERENCE",
		"STRONG_REFERENCE",
		"FREE_REFERENCE",
		"END_BUFFERTYPES",
		"EXPANDED_SCOPE",
		"BUFFER_SCOPE",
		"BEGIN_SCHEMA",
		"ABBREVIATED",
		"AREA",
		"CATEGORY",
		"CYCLE_ON_LIMIT",
		"DESCRIPTION",
		"DUMP_NAME",
		"FROZEN",
		"HIDDEN",
		"INCREMENT",
		"MANDATORY",
		"ORDER",
		"POSITION",
		"SQL_WIDTH",
		"TRAILER",
		"VALEXP",
		"VALMSG",
		"VALMG_SA",
		"BEGIN_SCHEMAKW",
		"KW_ABBV",
		"KW_AREA",
		"KW_BIGINT",
		"KW_BUFRPOOL",
		"KW_BUFPOOL",
		"KW_CATEGORY",
		"KW_CLOB_CP",
		"KW_CLOB_COL",
		"KW_CLOB_TYP",
		"KW_COL_L_SA",
		"KW_CRC",
		"KW_CYCLE",
		"KW_DMP_NAME",
		"KW_FLD_TRG",
		"KW_FIXCHAR",
		"KW_FMT_SA",
		"KW_FROZEN",
		"KW_HELP_SA",
		"KW_IDX_FLD",
		"KW_INACTIVE",
		"KW_INCR",
		"KW_INIT_SA",
		"KW_LABEL_SA",
		"KW_LOB_AREA",
		"KW_LOB_BYTE",
		"KW_LOB_SIZE",
		"KW_MULTI_TN",
		"KW_NO_DEFAR",
		"KW_NO_OVRRD",
		"KW_NOT_CS",
		"KW_NULLALWD",
		"KW_PSC",
		"KW_SEQUENCE",
		"KW_SQL_WID",
		"KW_TAB_TRG",
		"KW_TIMESTMP",
		"KW_VALEXP",
		"KW_VALMSG",
		"KW_VALMG_SA",
		"END_SCHEMAKW",
		"BEGIN_METATYPES",
		"FIELD_BIGINT",
		"FIELD_BYTE",
		"FIELD_DOUBLE",
		"FIELD_FIXCHAR",
		"FIELD_FLOAT",
		"FIELD_SHORT",
		"FIELD_TIMESTAMP",
		"FIELD_TIME",
		"END_METATYPES",
		"END_SCHEMA",
		"DATABASE",
		"INDEX",
		"INDEX_FIELD",
		"BEGIN_INDEX_MATCH_TYPES",
		"NO_MATCH",
		"SELF_REFERENCE",
		"EQUALITY_MATCH",
		"BEGINS_MATCH",
		"RANGE_MATCH",
		"WORD_MATCH",
		"SORT_MATCH",
		"END_INDEX_MATCH_TYPES",
		"SEQUENCE",
		"PROPERTIES",
		"MANY_TO_ONE",
		"ONE_TO_MANY",
		"ONE_TO_ONE",
		"KEY_FIELD",
		"RAW_STRING",
		"QUERY",
		"QUERY_SUBST",
		"CLIENT_WHERE",
		"CLIENT_WHERE_SUBST",
		"EMBEDDED_SQL",
		"COLUMN_LIST",
		"BLOCK",
		"PROCEDURE",
		"CLASS_DEF",
		"INTERFACE_DEF",
		"ENUM_DEF",
		"METHOD_DEF",
		"CONSTRUCTOR",
		"DESTRUCTOR",
		"CLASS_NAME",
		"ANNOTATION",
		"OBJECT_INVOCATION",
		"METHOD_INVOCATION",
		"PROPERTY_INVOCATION",
		"EVENT_SIGNATURE",
		"DOTNET_DELEGATE",
		"INT_PROC",
		"WEB_PROC",
		"FUNCTION",
		"INNER_BLOCK",
		"TRIGGER_BLOCK",
		"EDITING_BLOCK",
		"FRAME_SCOPE",
		"FRAME_ALLOC",
		"COPY_TO_SB",
		"COPY_FROM_SB",
		"CUSTOMER_SPECIFIC",
		"VALIDATION",
		"TRANSACTION",
		"SUB_TRANSACTION",
		"NO_TRANSACTION",
		"STATEMENT",
		"BROKEN_PREPROC_ARG",
		"LABEL_DEF",
		"LABEL",
		"EXPRESSION",
		"EVENT",
		"DB_EVENT",
		"CLASS_EVENT",
		"EVENT_LIST",
		"KEY_FUNCTION",
		"WIDGET_LIST",
		"WIDGET_POOL",
		"ASSIGNMENT",
		"ASSIGN",
		"ARGUMENTS",
		"PARAMETER",
		"HANDLE_TO",
		"COMMAND_TOKENS",
		"COMMAND_TEXT",
		"CONNECT_OPTIONS",
		"CONNECT_TEXT",
		"IO_OPTIONS",
		"PUT_FIELD",
		"IMPORT_FIELD",
		"EXPORT_FIELD",
		"AGGREGATE",
		"FRAME_PHRASE",
		"FORMAT_PHRASE",
		"TRIGGER_PHRASE",
		"RECORD_PHRASE",
		"COLOR_PHRASE",
		"INLINE_VAR_DEF_ARRAY",
		"INLINE_VAR_DEF",
		"CONTENT_ARRAY",
		"FRAME_ELEMENT",
		"WHEN_LIST",
		"EMBEDDED_ASSIGNMENT",
		"FORM_ITEM",
		"COLUMN_REF",
		"RUNTIME_FRAME_OPTIONS",
		"RUNTIME_BROWSE_OPTIONS",
		"PARENT_CHILD_RELATION",
		"DATA_SET",
		"DATA_SOURCE",
		"DATA_RELATION",
		"PARENT_ID_RELATION",
		"LANGUAGES",
		"DYNAMIC",
		"MINUS",
		"PLUS",
		"UN_MINUS",
		"UN_PLUS",
		"BITWISE_OR",
		"BITWISE_AND",
		"BITWISE_NOT",
		"BITWISE_XOR",
		"BOOL_TRUE",
		"BOOL_FALSE",
		"DEC_LITERAL",
		"DATE_LITERAL",
		"DATETIME_LITERAL",
		"DATETIME_TZ_LITERAL",
		"HEX_LITERAL",
		"UNQUOTED_TEXT",
		"NO_LOCK_LITERAL",
		"SHARE_LOCK_LITERAL",
		"EXCLUSIVE_LOCK_LITERAL",
		"NO_WAIT_LITERAL",
		"READ_AVAILABLE_LITERAL",
		"READ_EXACT_NUM_LITERAL",
		"SEARCH_SELF_LITERAL",
		"SEARCH_TARGET_LITERAL",
		"PROC_CALL_TYPE_LITERAL",
		"FUNC_CALL_TYPE_LITERAL",
		"GET_ATTR_CTYPE_LITERAL",
		"SET_ATTR_CTYPE_LITERAL",
		"DLL_CALL_TYPE_LITERAL",
		"OPTION",
		"COM_METHOD",
		"COM_PROPERTY",
		"COM_PARAMETER",
		"COM_INVOCATION",
		"ENUM_VALUE",
		"FILTER_SPEC",
		"SUPPORT_LVL_NONE",
		"SUPPORT_LVL_PARTIAL",
		"SUPPORT_LVL_FULL_WITH_LIMITATIONS",
		"SUPPORT_LVL_FULL",
		"BOGUS",
		"STATIC_WRAPPER",
		"FRAME_LOCK",
		"FRAME_UNLOCK",
		"BEGIN_MULTIWORD",
		"ALTER_TABLE",
		"AS_BUTTON",
		"CLOSE_QUERY",
		"CLOSE_CURSOR",
		"CLOSE_STORED_PROCEDURE",
		"CREATE_ALIAS",
		"CREATE_BROWSE",
		"CREATE_BUFFER",
		"CREATE_CALL",
		"CREATE_CLIENT_PRINCIPAL",
		"CREATE_OBJECT",
		"CREATE_DATABASE",
		"CREATE_DATASET",
		"CREATE_DATA_SOURCE",
		"CREATE_INDEX",
		"CREATE_QUERY",
		"CREATE_SAX_ATTRIBUTES",
		"CREATE_SAX_READER",
		"CREATE_SAX_WRITER",
		"CREATE_SERVER",
		"CREATE_SRV_SOCKET",
		"CREATE_SOAP_HEADER",
		"CREATE_SOAP_HEADER_ENTRYREF",
		"CREATE_SOCKET",
		"CREATE_TABLE",
		"CREATE_TEMP_TABLE",
		"CREATE_VIEW",
		"CREATE_WIDGET",
		"CREATE_WIDGET_POOL",
		"CREATE_X_DOCUMENT",
		"CREATE_X_NODEREF",
		"DDE_ADVISE",
		"DDE_EXECUTE",
		"DDE_GET",
		"DDE_INITIATE",
		"DDE_REQUEST",
		"DDE_SEND",
		"DDE_TERMINATE",
		"DECLARE_CURSOR",
		"DEFINE_BROWSE",
		"DEFINE_BUFFER",
		"DEFINE_BUTTON",
		"DEFINE_DATASET",
		"DEFINE_DATA_SOURCE",
		"DEFINE_ENUM",
		"DEFINE_EVENT",
		"DEFINE_FIELD",
		"DEFINE_FRAME",
		"DEFINE_IMAGE",
		"DEFINE_MENU",
		"DEFINE_PARAMETER",
		"DEFINE_PROPERTY",
		"DEFINE_QUERY",
		"DEFINE_RECTANGLE",
		"DEFINE_STREAM",
		"DEFINE_SUB_MENU",
		"DEFINE_TEMP_TABLE",
		"DEFINE_VARIABLE",
		"DEFINE_WORK_TABLE",
		"DELETE_ALIAS",
		"DELETE_FROM",
		"DELETE_OBJECT",
		"DELETE_PROCEDURE",
		"DELETE_WIDGET",
		"DELETE_WIDGET_POOL",
		"DISABLE_TRIGGERS",
		"DROP_INDEX",
		"DROP_TABLE",
		"DROP_VIEW",
		"EMPTY_TEMP_TABLE",
		"GROUP_BY",
		"IN_WIDGET_POOL",
		"INNER_JOIN",
		"INPUT_CLEAR",
		"INPUT_CLOSE",
		"INPUT_FROM",
		"INPUT_THRU",
		"INPUT_OUTPUT_CLOSE",
		"INPUT_OUTPUT_THRU",
		"INSERT_INTO",
		"IS_NULL",
		"IS_NOT_NULL",
		"LEFT_OUTER_JOIN",
		"OPEN_CURSOR",
		"OPEN_QUERY",
		"ORDER_BY",
		"OUTPUT_CLOSE",
		"OUTPUT_THRU",
		"OUTPUT_TO",
		"NOT_BETWEEN",
		"NOT_ENTERED",
		"NOT_EXISTS",
		"NOT_IN",
		"NOT_LIKE",
		"NOT_NULL",
		"PROCESS_EVENTS",
		"PUT_CURSOR",
		"PUT_SCREEN",
		"RELEASE_EXTERNAL",
		"RELEASE_OBJECT",
		"RIGHT_OUTER_JOIN",
		"RUN_SUPER",
		"RUN_STORED_PROCEDURE",
		"SAVE_CACHE",
		"SYSTEM_DIALOG_COLOR",
		"SYSTEM_DIALOG_FONT",
		"SYSTEM_DIALOG_GET_DIR",
		"SYSTEM_DIALOG_GET_FILE",
		"SYSTEM_DIALOG_PRINTER_SETUP",
		"TRANSACTION_DISTINCT",
		"TRIGGER_PROCEDURE",
		"TRANSACTION_MODE_AUTO",
		"UPDATE_SQL",
		"WHERE_CURRENT_OF",
		"WITH_CHECK_OPTION",
		"WITH_GRANT_OPTION",
		"DATA_SOURCE_QUERY",
		"DATA_SOURCE_BUFFER",
		"END_MULTIWORD",
		"BEGIN_FUNCTYPES",
		"FUNC_CHAR",
		"FUNC_CLASS",
		"FUNC_COM_HANDLE",
		"FUNC_DATE",
		"FUNC_DATETIME",
		"FUNC_DATETIME_TZ",
		"FUNC_DEC",
		"FUNC_INT",
		"FUNC_INT64",
		"FUNC_LOGICAL",
		"FUNC_LONGCHAR",
		"FUNC_RECID",
		"FUNC_ROWID",
		"FUNC_HANDLE",
		"FUNC_RAW",
		"FUNC_MEMPTR",
		"FUNC_POLY",
		"FUNC_VOID",
		"END_FUNCTYPES",
		"BEGIN_LVALUE",
		"BEGIN_VARTYPES",
		"VAR_CHAR",
		"VAR_CLASS",
		"VAR_COM_HANDLE",
		"VAR_DATE",
		"VAR_DATETIME",
		"VAR_DATETIME_TZ",
		"VAR_DEC",
		"VAR_HANDLE",
		"VAR_INT",
		"VAR_INT64",
		"VAR_LOGICAL",
		"VAR_LONGCHAR",
		"VAR_MEMPTR",
		"VAR_RAW",
		"VAR_RECID",
		"VAR_ROWID",
		"SYS_HANDLE",
		"VAR_POLY",
		"BEGIN_NATIVE_VARTYPES",
		"VAR_BYTE",
		"VAR_DOUBLE",
		"VAR_FLOAT",
		"VAR_LONG",
		"VAR_SHORT",
		"VAR_ULONG",
		"VAR_USHORT",
		"END_NATIVE_VARTYPES",
		"END_VARTYPES",
		"BEGIN_FIELDTYPES",
		"FIELD_BLOB",
		"FIELD_CHAR",
		"FIELD_CLASS",
		"FIELD_CLOB",
		"FIELD_COM_HANDLE",
		"FIELD_DATE",
		"FIELD_DATETIME",
		"FIELD_DATETIME_TZ",
		"FIELD_DEC",
		"FIELD_INT",
		"FIELD_INT64",
		"FIELD_LOGICAL",
		"FIELD_RECID",
		"FIELD_ROWID",
		"FIELD_HANDLE",
		"FIELD_RAW",
		"END_FIELDTYPES",
		"BEGIN_WIDGETS",
		"WID_BROWSE",
		"WID_BROWSE_COL",
		"WID_BUTTON",
		"WID_COMBO",
		"WID_DIALOG",
		"WID_EDITOR",
		"WID_FILL_IN",
		"WID_FRAME",
		"WID_IMAGE",
		"WID_LITERAL",
		"WID_MENU",
		"WID_MENU_ITM",
		"WID_RADIO",
		"WID_RECT",
		"WID_SEL_LST",
		"WID_SLIDER",
		"WID_SUB_MENU",
		"WID_TEXT",
		"WID_TOGGLE",
		"WID_WINDOW",
		"END_WIDGETS",
		"STREAM",
		"END_LVALUE",
		"BEGIN_ATTR_METH",
		"BEGIN_ATTR",
		"ATTR_CHAR",
		"ATTR_CLASS",
		"ATTR_COM_HANDLE",
		"ATTR_DATE",
		"ATTR_DATETIME",
		"ATTR_DATETIME_TZ",
		"ATTR_DEC",
		"ATTR_HANDLE",
		"ATTR_INT",
		"ATTR_INT64",
		"ATTR_LOGICAL",
		"ATTR_LONGCHAR",
		"ATTR_MEMPTR",
		"ATTR_RAW",
		"ATTR_RECID",
		"ATTR_ROWID",
		"ATTR_POLY",
		"END_ATTR",
		"BEGIN_METH",
		"METH_CHAR",
		"METH_CLASS",
		"METH_COM_HANDLE",
		"METH_DATE",
		"METH_DATETIME",
		"METH_DATETIME_TZ",
		"METH_DEC",
		"METH_HANDLE",
		"METH_INT",
		"METH_INT64",
		"METH_LOGICAL",
		"METH_LONGCHAR",
		"METH_MEMPTR",
		"METH_POLY",
		"METH_RAW",
		"METH_RECID",
		"METH_ROWID",
		"METH_VOID",
		"END_METH",
		"END_ATTR_METH",
		"BEGIN_OO_METH",
		"OO_METH_CHAR",
		"OO_METH_CLASS",
		"OO_METH_COM_HANDLE",
		"OO_METH_DATE",
		"OO_METH_DATETIME",
		"OO_METH_DATETIME_TZ",
		"OO_METH_DEC",
		"OO_METH_HANDLE",
		"OO_METH_INT",
		"OO_METH_INT64",
		"OO_METH_LOGICAL",
		"OO_METH_LONGCHAR",
		"OO_METH_MEMPTR",
		"OO_METH_RAW",
		"OO_METH_RECID",
		"OO_METH_ROWID",
		"OO_METH_POLY",
		"OO_METH_VOID",
		"END_OO_METH",
		"BEGIN_RESERVED",
		"KW_U_CTRL",
		"KW_U_MSG",
		"KW_U_PCTRL",
		"KW_U_SERIAL",
		"KW_ACCUM",
		"KW_ADD",
		"KW_ASCEND",
		"KW_ASC",
		"KW_ACT_FORM",
		"KW_ACT_WIN",
		"KW_ALIAS",
		"KW_ALL",
		"KW_ALTER",
		"KW_AMBIG",
		"KW_ANALYZ",
		"KW_AND",
		"KW_ANY",
		"KW_APPLY",
		"KW_AS",
		"KW_ASYNC",
		"KW_ASSIGN",
		"KW_AT",
		"KW_ATTR",
		"KW_AUD_CTRL",
		"KW_AUD_POL",
		"KW_AUTHORZN",
		"KW_AUTO_RET",
		"KW_AVAIL",
		"KW_B_ENDIAN",
		"KW_BACKGRND",
		"KW_B4_HIDE",
		"KW_BEGINS",
		"KW_BELL",
		"KW_BETWEEN",
		"KW_BLANK",
		"KW_BREAK",
		"KW_BTOS",
		"KW_BUF_COMP",
		"KW_BUF_COPY",
		"KW_BY",
		"KW_CALL",
		"KW_CAN_DO",
		"KW_CAN_FIND",
		"KW_CASE",
		"KW_CASE_SEN",
		"KW_CAST",
		"KW_CENTER",
		"KW_CHR",
		"KW_CHECK",
		"KW_CLEAR",
		"KW_CLIP",
		"KW_CODEBASE",
		"KW_COL_LAB",
		"KW_COLON",
		"KW_COLOR",
		"KW_COLUMNS",
		"KW_COMPILER",
		"KW_CONN_ED",
		"KW_CONTROL",
		"KW_COUNT_OF",
		"KW_CPY_LOB",
		"KW_CREATE",
		"KW_CTOS",
		"KW_CURRENT",
		"KW_CUR_CHG",
		"KW_CUR_LANG",
		"KW_CUR_WIN",
		"KW_CURSOR",
		"KW_DATA_SRC",
		"KW_DATABASE",
		"KW_DATASRV",
		"KW_DATASET",
		"KW_DB_CTXT",
		"KW_DB_REF",
		"KW_DB_REM_H",
		"KW_DBCP",
		"KW_DBCOLL",
		"KW_DBNAME",
		"KW_DBPARAM",
		"KW_DBREST",
		"KW_DBTASKID",
		"KW_DBTYPE",
		"KW_DBVERS",
		"KW_DDE",
		"KW_DEBLANK",
		"KW_DEBUGGER",
		"KW_DBG_LST",
		"KW_DECIMALS",
		"KW_DECLARE",
		"KW_DEFAULT",
		"KW_DEF_NOXL",
		"KW_DEF_WIN",
		"KW_DEFINE",
		"KW_DELETE",
		"KW_DELIMIT",
		"KW_DESCEND",
		"KW_DICT",
		"KW_DISABLE",
		"KW_DIS_A_ZA",
		"KW_DISCONN",
		"KW_DISP",
		"KW_DISTINCT",
		"KW_DLL_C_T",
		"KW_DO",
		"KW_DOS",
		"KW_DOWN",
		"KW_DROP",
		"KW_DSET_HND",
		"KW_DSL_MGR",
		"KW_DYN_ENUM",
		"KW_DYN_FUNC",
		"KW_DYN_INVK",
		"KW_DYN_NEW",
		"KW_DYN_PROP",
		"KW_EACH",
		"KW_EDITING",
		"KW_ELSE",
		"KW_ENABLE",
		"KW_ENCODE",
		"KW_END",
		"KW_ENTRY",
		"KW_ERR_STAT",
		"KW_ESCAPE",
		"KW_EVT_PROC",
		"KW_EXC_LOCK",
		"KW_EXISTS",
		"KW_ETIME",
		"KW_EXCEPT",
		"KW_EXPORT",
		"KW_FETCH",
		"KW_FIELD",
		"KW_FIL_INFO",
		"KW_FILL",
		"KW_FIND",
		"KW_FIND_CS",
		"KW_FIND_GLO",
		"KW_FIND_NO",
		"KW_FIND_PO",
		"KW_FIND_SEL",
		"KW_FIND_WA",
		"KW_FIRST",
		"KW_FIRST_OF",
		"KW_FOCUS",
		"KW_FONT",
		"KW_FOR",
		"KW_FORM",
		"KW_FORMAT",
		"KW_FRAME",
		"KW_FR_COL",
		"KW_FR_DB",
		"KW_FR_DOWN",
		"KW_FR_FIELD",
		"KW_FR_FILE",
		"KW_FR_INDEX",
		"KW_FR_LINE",
		"KW_FR_NAME",
		"KW_FR_ROW",
		"KW_FR_VAL",
		"KW_FROM",
		"KW_FROM_CHR",
		"KW_FROM_PIX",
		"KW_FUNC_C_T",
		"KW_FWD_DRIV",
		"KW_GW",
		"KW_GET_A_CT",
		"KW_GET_BUFH",
		"KW_GET_BYTE",
		"KW_GET_CODP",
		"KW_GET_COLL",
		"KW_GET_ERRC",
		"KW_GET_ERRR",
		"KW_GET_FNAM",
		"KW_GET_FOFF",
		"KW_GET_K_V",
		"KW_GLOBAL",
		"KW_GO_ON",
		"KW_GO_PEND",
		"KW_GRANT",
		"KW_GRAPHIC",
		"KW_GROUP",
		"KW_HASHCODE",
		"KW_HEADER",
		"KW_HAVING",
		"KW_HELP",
		"KW_HIDE",
		"KW_HOST_B_O",
		"KW_IF",
		"KW_IMPORT",
		"KW_IN",
		"KW_INDEX",
		"KW_INDICAT",
		"KW_INPUT",
		"KW_IN_OUT",
		"KW_INSERT",
		"KW_INTO",
		"KW_IS",
		"KW_IS_ATTR",
		"KW_IS_LEAD",
		"KW_JOIN",
		"KW_KBLABEL",
		"KW_KEYCODE",
		"KW_KEYFUNC",
		"KW_KEYLAB",
		"KW_KEYS",
		"KW_KW",
		"KW_L_ENDIAN",
		"KW_LABEL",
		"KW_LAST",
		"KW_LASTKEY",
		"KW_LAST_EVT",
		"KW_LAST_OF",
		"KW_LDBNAME",
		"KW_LEAVE",
		"KW_LIB",
		"KW_LIKE",
		"KW_LINE_CNT",
		"KW_LISTING",
		"KW_LOCKED",
		"KW_LOG_MGR",
		"KW_LOOKUP",
		"KW_MACH_CLS",
		"KW_MAP",
		"KW_MEMBER",
		"KW_MOUSE",
		"KW_MPE",
		"KW_MSG",
		"KW_MSG_LINE",
		"KW_NEW",
		"KW_NEXT",
		"KW_NEXT_PMT",
		"KW_NO_ATTR",
		"KW_NO_ATTRL",
		"KW_NO_ERROR",
		"KW_NO_FILL",
		"KW_NO_FOCUS",
		"KW_NO_HIDE",
		"KW_NO_LABEL",
		"KW_NO_LOBS",
		"KW_NO_LOCK",
		"KW_NO_MAP",
		"KW_NO_MSG",
		"KW_NO_PAUSE",
		"KW_NO_PRE",
		"KW_NO_RET_V",
		"KW_NO_UNDO",
		"KW_NO_VALID",
		"KW_NO_WAIT",
		"KW_NOT",
		"KW_NOW",
		"KW_NULL",
		"KW_NUM_ALIA",
		"KW_NUM_DBS",
		"KW_NUM_ENT",
		"KW_OF",
		"KW_OFF",
		"KW_OLD",
		"KW_ON",
		"KW_OPEN",
		"KW_OR",
		"KW_OUTPUT",
		"KW_OPSYS",
		"KW_OPTION",
		"KW_OS2",
		"KW_OS_APPND",
		"KW_OS_COPY",
		"KW_OS_CMD",
		"KW_OS_MKDIR",
		"KW_OS_DEL",
		"KW_OS_DIR",
		"KW_OS_REN",
		"KW_OTHER",
		"KW_OVERLAY",
		"KW_PAGE",
		"KW_PAGE_B",
		"KW_PAGE_NUM",
		"KW_PAGE_T",
		"KW_PARM",
		"KW_PASSWD_F",
		"KW_PAUSE",
		"KW_PDBNAME",
		"KW_PERSIST",
		"KW_PIXELS",
		"KW_PREPROC",
		"KW_PRIVILEG",
		"KW_PROCESS",
		"KW_PROC_C_T",
		"KW_PROC_HND",
		"KW_PROC_ST",
		"KW_PROFILER",
		"KW_PROGNAME",
		"KW_PROGRESS",
		"KW_PROMPT",
		"KW_PRMT_FOR",
		"KW_PROMSGS",
		"KW_PROPATH",
		"KW_PROVER",
		"KW_PUBLISH",
		"KW_PUT",
		"KW_PUT_BYTE",
		"KW_PUT_K_V",
		"KW_QUERY",
		"KW_QRY_CLOS",
		"KW_QRY_OFF",
		"KW_QRY_TUNE",
		"KW_QUIT",
		"KW_R_INDEX",
		"KW_RCOD_INF",
		"KW_READ_AVL",
		"KW_READ_E_N",
		"KW_READKEY",
		"KW_RECID",
		"KW_RECT",
		"KW_RELEASE",
		"KW_REPEAT",
		"KW_REPL_CRE",
		"KW_REPL_DEL",
		"KW_REPL_WRI",
		"KW_REPOS",
		"KW_REPOS_B",
		"KW_REPOS_F",
		"KW_REPOS_2R",
		"KW_REPOS_2I",
		"KW_RETAIN",
		"KW_RETRY",
		"KW_RETURN",
		"KW_REVERT",
		"KW_REVOKE",
		"KW_ROW_CRTD",
		"KW_ROW_DELD",
		"KW_ROW_MODD",
		"KW_ROW_UMOD",
		"KW_RTOPSYS",
		"KW_RUN",
		"KW_SAVE",
		"KW_SAX_COMP",
		"KW_SAX_PARE",
		"KW_SAX_RUNN",
		"KW_SAX_UNIN",
		"KW_SAX_WBEG",
		"KW_SAX_WCOM",
		"KW_SAX_WCON",
		"KW_SAX_WELM",
		"KW_SAX_WERR",
		"KW_SAX_WIDL",
		"KW_SAX_WTAG",
		"KW_SCHEMA",
		"KW_SCREEN",
		"KW_SCRN_IO",
		"KW_SCRN_LNS",
		"KW_SCROLL",
		"KW_SDBNAME",
		"KW_SEAR_SLF",
		"KW_SEAR_TRG",
		"KW_SEARCH",
		"KW_SECUR_P",
		"KW_SEEK",
		"KW_SELECT",
		"KW_SELF",
		"KW_SESSION",
		"KW_SET",
		"KW_SET_A_CT",
		"KW_SETUSER",
		"KW_SH_LOCK",
		"KW_SHARED",
		"KW_SHOW_ST",
		"KW_SING_RUN",
		"KW_SKIP",
		"KW_SKIP_D_R",
		"KW_SOME",
		"KW_SPACE",
		"KW_STATUS",
		"KW_STREAM",
		"KW_STRM_HND",
		"KW_STRM_IO",
		"KW_SUBSCRIB",
		"KW_SUPER",
		"KW_SYS_DLG",
		"KW_TABLE",
		"KW_TAB_NUM",
		"KW_TERM",
		"KW_TEXT",
		"KW_THEN",
		"KW_THIS_OBJ",
		"KW_THIS_PRC",
		"KW_TIME",
		"KW_TITLE",
		"KW_TO",
		"KW_TOP_ONLY",
		"KW_TO_ROWID",
		"KW_TRANS",
		"KW_TRIGGER",
		"KW_TRIGGERS",
		"KW_TRIM",
		"KW_TXT_CURS",
		"KW_UNDO",
		"KW_UNION",
		"KW_UNIQUE",
		"KW_UNIX",
		"KW_UNDERLIN",
		"KW_UNFORMAT",
		"KW_UNSUBSCR",
		"KW_UP",
		"KW_UPDATE",
		"KW_USE_IDX",
		"KW_USERID",
		"KW_USING",
		"KW_V6FRAME",
		"KW_VALUE",
		"KW_VAL_CHG",
		"KW_VALUES",
		"KW_VIEW",
		"KW_VIEW_AS",
		"KW_VMS",
		"KW_WAIT_FOR",
		"KW_WHEN",
		"KW_WHERE",
		"KW_WHILE",
		"KW_WINDOW",
		"KW_WIN_DMIN",
		"KW_WIN_MAX",
		"KW_WIN_MIN",
		"KW_WIN_NORM",
		"KW_WITH",
		"KW_WORK_TAB",
		"KW_WRITE",
		"KW_XCODE",
		"KW_XOR",
		"KW_XREF",
		"KW_XREF_XML",
		"END_RESERVED",
		"BEGIN_UNRESERVED",
		"KW_ABORT",
		"KW_ABS",
		"KW_ABSTRACT",
		"KW_ACC_CHG",
		"KW_ACC_RCHG",
		"KW_ACCEL",
		"KW_ACTIVE",
		"KW_ACTOR",
		"KW_ADD_BUF",
		"KW_ADD_C_C",
		"KW_ADD_C_F",
		"KW_ADD_EVTP",
		"KW_ADD_F_F",
		"KW_ADD_1ST",
		"KW_ADD_HENT",
		"KW_ADD_INVL",
		"KW_ADD_IDXF",
		"KW_ADD_LAST",
		"KW_ADD_L_C",
		"KW_ADD_LIKF",
		"KW_ADD_LIKI",
		"KW_ADD_NEWF",
		"KW_ADD_NEWI",
		"KW_ADD_PREL",
		"KW_ADD_REL",
		"KW_ADD_SLOC",
		"KW_ADD_SRCB",
		"KW_ADD_SUP",
		"KW_ADM_DATA",
		"KW_ADM_TO",
		"KW_ADVISE",
		"KW_AFT_BUFF",
		"KW_AFT_FILL",
		"KW_AFT_R_F",
		"KW_AFT_ROID",
		"KW_AFT_TBL",
		"KW_ALERT_BX",
		"KW_ALIGN",
		"KW_ALLW_C_S",
		"KW_ALLW_REP",
		"KW_ALT_KEY",
		"KW_ALW_ON_T",
		"KW_ANSI_ONL",
		"KW_ANY_KEY",
		"KW_ANY_PRT",
		"KW_ANYWHERE",
		"KW_APPEND",
		"KW_APPEND_C",
		"KW_APPEND_L",
		"KW_APPL_A_B",
		"KW_APPL",
		"KW_APPL_CID",
		"KW_APPL_CBK",
		"KW_APP_INFO",
		"KW_APP_PW",
		"KW_APP_UID",
		"KW_ARR_MSG",
		"KW_ASCII_2H",
		"KW_ASK_OVER",
		"KW_ASSEMBLY",
		"KW_ASYNC_RC",
		"KW_ASYNC_RH",
		"KW_ATT_DSRC",
		"KW_ATT_PLST",
		"KW_ATTR_NAM",
		"KW_AUD_ENAB",
		"KW_AUD_EV_C",
		"KW_AUTHBLOB",
		"KW_AUTHEN_F",
		"KW_AUTO_COM",
		"KW_AUTO_DEL",
		"KW_AUTO_D_X",
		"KW_AUTO_END",
		"KW_AUTO_GO",
		"KW_AUTO_IND",
		"KW_AUTO_RES",
		"KW_AUTO_SYN",
		"KW_AUTO_VAL",
		"KW_AUTO_ZAP",
		"KW_AUTOMATC",
		"KW_AVERAGE",
		"KW_AVG",
		"KW_AVL_FMTS",
		"KW_AVL_MSGS",
		"KW_BACKSP",
		"KW_BACKWARD",
		"KW_BACK_TAB",
		"KW_BAS_LOGG",
		"KW_BASE64_D",
		"KW_BASE64_E",
		"KW_BASE_ADE",
		"KW_BASE_KEY",
		"KW_BATCH_MO",
		"KW_BATCH_SZ",
		"KW_B4_BUFF",
		"KW_B4_FILL",
		"KW_B4_R_F",
		"KW_B4_ROWID",
		"KW_B4_TABLE",
		"KW_BEG_EV_G",
		"KW_BGCOLOR",
		"KW_BGCOLRGB",
		"KW_BINARY",
		"KW_BIND",
		"KW_BIND_WH",
		"KW_BLOB",
		"KW_BLOCK",
		"KW_BLK_LVL",
		"KW_BLK_IT_D",
		"KW_BORD_B_C",
		"KW_BORD_B_P",
		"KW_BORD_L_C",
		"KW_BORD_L_P",
		"KW_BORD_R_C",
		"KW_BORD_R_P",
		"KW_BORD_T_C",
		"KW_BORD_T_P",
		"KW_BOTH",
		"KW_BOTTOM",
		"KW_BOTTOM_C",
		"KW_BOX",
		"KW_BOX_SEL",
		"KW_BR_AGENT",
		"KW_BR_IP",
		"KW_BR_PORT",
		"KW_BR_TZ",
		"KW_BREAK_L",
		"KW_BROWSE",
		"KW_BUFFER",
		"KW_BUFFER_C",
		"KW_BUF_CREA",
		"KW_BUF_DEL",
		"KW_BUF_FLD",
		"KW_BUF_GRPI",
		"KW_BUF_GRPN",
		"KW_BUF_HNDL",
		"KW_BUF_NAME",
		"KW_BUF_PARI",
		"KW_BUFFER_L",
		"KW_BUF_REL",
		"KW_BUF_TENI",
		"KW_BUF_TENN",
		"KW_BUF_VLID",
		"KW_BUF_VAL",
		"KW_BUTTON",
		"KW_BY_PTR",
		"KW_BY_REF",
		"KW_BY_VALUE",
		"KW_BY_VAR_P",
		"KW_BYTE",
		"KW_BYTES_R",
		"KW_BYTES_W",
		"KW_CACHE",
		"KW_CACHE_SZ",
		"KW_CALL_NAM",
		"KW_CALL_TYP",
		"KW_CANC_BRK",
		"KW_CANCEL_B",
		"KW_CANCEL_P",
		"KW_CANCEL_R",
		"KW_CANCELLD",
		"KW_CAN_CREA",
		"KW_CAN_DEL",
		"KW_CAN_DUMP",
		"KW_CAN_LOAD",
		"KW_CAN_QRY",
		"KW_CAN_READ",
		"KW_CAN_SET",
		"KW_CAN_WRT",
		"KW_CAPS",
		"KW_CARE_PNT",
		"KW_CBIT",
		"KW_CATCH",
		"KW_CDECL",
		"KW_CFG_NAME",
		"KW_CHAINED",
		"KW_CHAR",
		"KW_CHAR_LEN",
		"KW_CHARSET",
		"KW_CHART",
		"KW_CHECKED",
		"KW_CHECK_AM",
		"KW_CHLD_BUF",
		"KW_CHLD_NUM",
		"KW_CHOICES",
		"KW_CHOOSE",
		"KW_CLASS",
		"KW_CLN_IP",
		"KW_CLN_PORT",
		"KW_CLN_TZ",
		"KW_CLN_TIME",
		"KW_CLOB",
		"KW_CLR_SEL",
		"KW_CLR_AP_C",
		"KW_CLR_LOG",
		"KW_CLR_S_AR",
		"KW_CLS_TYPE",
		"KW_CLNT_C_I",
		"KW_CLNT_DIS",
		"KW_CLNT_PRL",
		"KW_CLNT_TTY",
		"KW_CLNT_TYP",
		"KW_CLNT_WS",
		"KW_CLONE_ND",
		"KW_CLOSE",
		"KW_CLOSE_AP",
		"KW_CLOSE_LG",
		"KW_CNCL_R_A",
		"KW_CNTRL_BX",
		"KW_CODE",
		"KW_CP_CVT",
		"KW_CP",
		"KW_COLLATE",
		"KW_COLON_AL",
		"KW_COLR_TAB",
		"KW_COL",
		"KW_COL_BGC",
		"KW_COL_CP",
		"KW_COL_DC",
		"KW_COL_FGC",
		"KW_COL_FONT",
		"KW_COL_MOV",
		"KW_COL_PFC",
		"KW_COL_OF",
		"KW_COL_R_O",
		"KW_COL_RES",
		"KW_COL_SCR",
		"KW_COM_HNDL",
		"KW_COM_SELF",
		"KW_COMBO_BX",
		"KW_COMMAND",
		"KW_COMPARE",
		"KW_COMPARES",
		"KW_COMPILE",
		"KW_COMPLETE",
		"KW_CONN",
		"KW_CONSTRUC",
		"KW_CTX",
		"KW_CTX_H",
		"KW_CTX_H_F",
		"KW_CTX_H_ID",
		"KW_CTX_POP",
		"KW_CONTAINS",
		"KW_CONTENTS",
		"KW_CNTRL_FR",
		"KW_CNTRL_NM",
		"KW_CONTROLS",
		"KW_CVT_DT",
		"KW_CONVERT",
		"KW_CVT_2OFF",
		"KW_CVT_3D_C",
		"KW_COOKIE_D",
		"KW_COPY",
		"KW_CPY_DSET",
		"KW_CPY_SATR",
		"KW_CPY_TTBL",
		"KW_COUNT",
		"KW_COVERAGE",
		"KW_CPCASE",
		"KW_CPCOLL",
		"KW_CPINTERN",
		"KW_CPLOG",
		"KW_CPPRINT",
		"KW_CPRCODEI",
		"KW_CPRCODEO",
		"KW_CPSTREAM",
		"KW_CPTERM",
		"KW_CRC_VAL",
		"KW_CREAT_LK",
		"KW_CR_LK_SQ",
		"KW_CREAT_OA",
		"KW_CREAT_ND",
		"KW_CREAT_NN",
		"KW_CREAT_RL",
		"KW_CREAT_TF",
		"KW_CURRENCY",
		"KW_CUR_COL",
		"KW_CUR_DATE",
		"KW_CUR_QRY",
		"KW_CUR_RES",
		"KW_CUR_RQI",
		"KW_CUR_RSI",
		"KW_CUR_R_M",
		"KW_CUR_VAL",
		"KW_CUR_CHAR",
		"KW_CUR_ENV",
		"KW_CUR_DOWN",
		"KW_CUR_ITER",
		"KW_CUR_LEFT",
		"KW_CUR_LINE",
		"KW_CUR_OFF",
		"KW_CUR_RGHT",
		"KW_CUR_UP",
		"KW_CUT",
		"KW_DATA_BND",
		"KW_DATA_E_R",
		"KW_DATA_REL",
		"KW_DATA_SCM",
		"KW_DATA_SM",
		"KW_DATA_SRI",
		"KW_DATATYPE",
		"KW_DATE",
		"KW_DATETIME",
		"KW_DATE_TZ",
		"KW_DATE_FMT",
		"KW_DAY",
		"KW_DB_JOIN",
		"KW_DB_LIST",
		"KW_DCOLOR",
		"KW_DDE_ERR",
		"KW_DDE_ID",
		"KW_DDE_ITEM",
		"KW_DDE_NAME",
		"KW_DDE_NOTI",
		"KW_DDE_TOPI",
		"KW_DEBUG",
		"KW_DECRYPT",
		"KW_DBG_ALRT",
		"KW_DE_REGIS",
		"KW_DEC",
		"KW_DECL_NSP",
		"KW_DEF_ACTN",
		"KW_DEFLT_BN",
		"KW_DEF_BUFH",
		"KW_DEF_COMM",
		"KW_DEF_EXTN",
		"KW_DEF_STR",
		"KW_DEF_POP",
		"KW_DEF_VAL",
		"KW_DEF_UEVM",
		"KW_DELEGATE",
		"KW_DEL_CHAR",
		"KW_DEL_COL",
		"KW_DEL_COOK",
		"KW_DEL_C_R",
		"KW_DEL_E_L",
		"KW_DEL_FLD",
		"KW_DEL_H_EN",
		"KW_DEL_LINE",
		"KW_DEL_NODE",
		"KW_DEL_PROC",
		"KW_DEL_R_L",
		"KW_DEL_S_C",
		"KW_DEL_S_R",
		"KW_DEL_S_RS",
		"KW_DEL_WORD",
		"KW_DESCR",
		"KW_DESEL_FR",
		"KW_DESEL_R",
		"KW_DESEL_SR",
		"KW_DESELCTN",
		"KW_DESTRUCT",
		"KW_DET_DSRC",
		"KW_DEVICEID",
		"KW_DIALOG",
		"KW_DIR",
		"KW_DIRECTRY",
		"KW_DIS_D_TR",
		"KW_DIS_L_TR",
		"KW_DIS_REDR",
		"KW_DISABL_C",
		"KW_DISABLED",
		"KW_DISPATCH",
		"KW_DISP_MSG",
		"KW_DISP_TZ",
		"KW_DISP_TYP",
		"KW_DOMAIN_D",
		"KW_DOMAIN_N",
		"KW_DOMAIN_T",
		"KW_DOUBLE",
		"KW_DRAG_EN",
		"KW_DROP_DWN",
		"KW_DROP_FN",
		"KW_DROP_LST",
		"KW_DROP_TAR",
		"KW_DUMP",
		"KW_DUMP_LGN",
		"KW_DYN_CAST",
		"KW_DYN_CURV",
		"KW_DYN_NEXV",
		"KW_DYNAMIC",
		"KW_ECHO",
		"KW_EDGE_C",
		"KW_EDGE_P",
		"KW_EDIT_C_P",
		"KW_EDIT_C_U",
		"KW_EDIT_CLR",
		"KW_EDIT_CPY",
		"KW_EDIT_CUT",
		"KW_EDIT_PAS",
		"KW_EDIT_UND",
		"KW_EDITOR",
		"KW_EDIT_B_T",
		"KW_EDIT_TAB",
		"KW_EH_FL",
		"KW_EH_SR",
		"KW_NO_EMBED",
		"KW_EMPTY",
		"KW_EMPTY_DS",
		"KW_EMPTY_SN",
		"KW_EMPTY_TT",
		"KW_ENABLE_C",
		"KW_ENABLE_E",
		"KW_ENC_AMK",
		"KW_ENC_SALT",
		"KW_ENCODING",
		"KW_ENCRYPT",
		"KW_END_B_SN",
		"KW_END_DOC",
		"KW_END_ELEM",
		"KW_END_EV_G",
		"KW_END_SEAR",
		"KW_END_USER",
		"KW_END_ERR",
		"KW_END_F_D",
		"KW_END_MOV",
		"KW_END_RESZ",
		"KW_END_RRES",
		"KW_ENDKEY",
		"KW_ENT_TLST",
		"KW_ENUM",
		"KW_ENTERED",
		"KW_ENTER_MB",
		"KW_ENT_EX_L",
		"KW_ERROR",
		"KW_ERR_CODE",
		"KW_ERR_COL",
		"KW_ERR_OBJD",
		"KW_ERR_ROW",
		"KW_ERR_S_T",
		"KW_ERR_STR",
		"KW_EQ",
		"KW_EVENTS",
		"KW_EVT_GRID",
		"KW_EVT_TYPE",
		"KW_E_PROC_C",
		"KW_EXCL_ID",
		"KW_EXCL_WEB",
		"KW_EXECUTE",
		"KW_EXEC_LOG",
		"KW_EXIT",
		"KW_EXITCODE",
		"KW_EXP",
		"KW_EXPAND",
		"KW_EXPANDBL",
		"KW_EXPORT_P",
		"KW_EXPLICIT",
		"KW_EXTENDED",
		"KW_EXTENT",
		"KW_EXTERN",
		"KW_FETCH_SR",
		"KW_FGCOLOR",
		"KW_FGCOLRGB",
		"KW_FILE",
		"KW_FIL_C_D",
		"KW_FIL_C_T",
		"KW_FIL_NAME",
		"KW_FIL_OFF",
		"KW_FIL_M_D",
		"KW_FIL_M_T",
		"KW_FIL_SIZE",
		"KW_FIL_TYPE",
		"KW_FILL_IN",
		"KW_FILL_MOD",
		"KW_FILL_WST",
		"KW_FILLED",
		"KW_FILTERS",
		"KW_FINAL",
		"KW_FINALLY",
		"KW_FIND_BR",
		"KW_FIND_CUR",
		"KW_FIND_FD",
		"KW_FIND_1ST",
		"KW_FIND_LST",
		"KW_FIND_NXT",
		"KW_FIND_PRV",
		"KW_FIND_UNI",
		"KW_FINDER",
		"KW_FIR_DSET",
		"KW_FIRST_AR",
		"KW_FIRST_BU",
		"KW_FIRST_CH",
		"KW_FIRST_CO",
		"KW_FIRST_DS",
		"KW_FIRST_FM",
		"KW_FIRST_OB",
		"KW_FIRST_PR",
		"KW_FIRST_QR",
		"KW_FIRST_SR",
		"KW_FIRST_SS",
		"KW_FIRST_SO",
		"KW_FIRST_TI",
		"KW_FIT_LCOL",
		"KW_FIX_CP",
		"KW_FIXD_ONL",
		"KW_FLAGS",
		"KW_FLAT_BUT",
		"KW_FLOAT",
		"KW_FONT_TAB",
		"KW_FOCUS_R",
		"KW_FOCUS_RS",
		"KW_FORCE_F",
		"KW_FORE",
		"KW_F_KEY_H",
		"KW_FORM_INP",
		"KW_FORM_LIN",
		"KW_FMT_DT",
		"KW_FORMATTE",
		"KW_FORWARD",
		"KW_FRAGMENT",
		"KW_FREQ",
		"KW_FROM_CUR",
		"KW_FR_SPACE",
		"KW_FR_X",
		"KW_FR_Y",
		"KW_FUNCT",
		"KW_FULL_H_C",
		"KW_FULL_H_P",
		"KW_FULL_W_C",
		"KW_FULL_W_P",
		"KW_FULLPATH",
		"KW_FWD_LOGF",
		"KW_FWD_ONLY",
		"KW_GEN_MD5",
		"KW_GEN_PBEK",
		"KW_GEN_PBES",
		"KW_GEN_RNDK",
		"KW_GEN_UUID",
		"KW_GET",
		"KW_GETATTRI",
		"KW_GET_ATTR",
		"KW_GET_A_N",
		"KW_GET_BDAT",
		"KW_GET_BITS",
		"KW_GET_B_OR",
		"KW_GET_BLUE",
		"KW_GET_BR_C",
		"KW_GET_BYTS",
		"KW_GET_B_A",
		"KW_GET_CFG",
		"KW_GET_CFGV",
		"KW_GET_CBPC",
		"KW_GET_CBPN",
		"KW_GET_CGIL",
		"KW_GET_CGIV",
		"KW_GET_CGL",
		"KW_GET_CGLV",
		"KW_GET_CHG",
		"KW_GET_CHLD",
		"KW_GET_CLL",
		"KW_GET_CLNT",
		"KW_GET_CREL",
		"KW_GET_CUR",
		"KW_GET_DIR",
		"KW_GET_DBCL",
		"KW_GET_DBL",
		"KW_GET_DS_B",
		"KW_GET_D_E",
		"KW_GET_D_F",
		"KW_GET_DYN",
		"KW_GET_FILE",
		"KW_GET_1ST",
		"KW_GET_FLT",
		"KW_GET_GRN",
		"KW_GET_HD_E",
		"KW_GET_IBNN",
		"KW_GET_IBQN",
		"KW_GET_I64",
		"KW_GET_ITER",
		"KW_GET_LAST",
		"KW_GET_LNBI",
		"KW_GET_LIC",
		"KW_GET_LONG",
		"KW_GET_LPRM",
		"KW_GET_L_V",
		"KW_GET_MOP",
		"KW_GET_MSG",
		"KW_GET_MSGG",
		"KW_GET_MSGS",
		"KW_GET_NEXT",
		"KW_GET_NODE",
		"KW_GET_NUM",
		"KW_GET_PAR",
		"KW_GET_PTR",
		"KW_GET_PREV",
		"KW_GET_PROP",
		"KW_GET_PRT",
		"KW_GET_QNBI",
		"KW_GET_R_R",
		"KW_GET_RED",
		"KW_GET_REL",
		"KW_GET_RGB",
		"KW_GET_SHRT",
		"KW_GET_SELW",
		"KW_GET_SER",
		"KW_GET_SIG",
		"KW_GET_SRCB",
		"KW_GET_SZ",
		"KW_GET_S_O",
		"KW_GET_STR",
		"KW_GET_T_S",
		"KW_GET_TBI",
		"KW_GET_TBNN",
		"KW_GET_TBQN",
		"KW_GET_TI",
		"KW_GET_THCH",
		"KW_GET_THPX",
		"KW_GET_TOPB",
		"KW_GET_TWCH",
		"KW_GET_TWPX",
		"KW_GET_UBI",
		"KW_GET_UL",
		"KW_GET_USHT",
		"KW_GET_U_F",
		"KW_GET_VAL",
		"KW_GET_VBI",
		"KW_GET_VBNN",
		"KW_GET_VBQN",
		"KW_GET_WAIT",
		"KW_GET_WKDR",
		"KW_GO",
		"KW_GOTO",
		"KW_GRD_F_H",
		"KW_GRD_F_V",
		"KW_GRD_SNAP",
		"KW_GRD_UHC",
		"KW_GRD_UHP",
		"KW_GRD_UWC",
		"KW_GRD_UWP",
		"KW_GRD_VIS",
		"KW_GROUP_BX",
		"KW_GETCLASS",
		"KW_GET_CGI",
		"KW_GET_COOK",
		"KW_GET_FLD",
		"KW_GT",
		"KW_GTE",
		"KW_GUID",
		"KW_HANDLE",
		"KW_HANDLER",
		"KW_HAS_LOBS",
		"KW_HAS_REC",
		"KW_HEIGHT_C",
		"KW_HEIGHT_P",
		"KW_HELP_TOP",
		"KW_HEX_DECD",
		"KW_HEX_ENCD",
		"KW_HID_FLD",
		"KW_HID_FLDL",
		"KW_HIDDEN",
		"KW_HINT",
		"KW_HOME",
		"KW_HORIZ",
		"KW_HTML_CHS",
		"KW_HTML_ENC",
		"KW_HTML_EOL",
		"KW_HTML_EOP",
		"KW_HTML_FRB",
		"KW_HTML_FRE",
		"KW_HTML_H_B",
		"KW_HTML_H_E",
		"KW_HTML_T_B",
		"KW_HTML_T_E",
		"KW_HTMLERR",
		"KW_HWND",
		"KW_HYPERLNK",
		"KW_HONOR_PK",
		"KW_HONOR_RK",
		"KW_ICON",
		"KW_ICFPARM",
		"KW_IDEPHWND",
		"KW_IDEWNTYP",
		"KW_IDX_HINT",
		"KW_IDX_INFO",
		"KW_IGN_CMOD",
		"KW_IMAGE",
		"KW_IMG_DOWN",
		"KW_IMG_INS",
		"KW_IMG_ONLY",
		"KW_IMG_SZ",
		"KW_IMG_SZ_C",
		"KW_IMG_SZ_P",
		"KW_IMG_UP",
		"KW_IDX_REPO",
		"KW_IMM_DISP",
		"KW_IMP_NODE",
		"KW_IMP_PRNC",
		"KW_IMPLEMTS",
		"KW_IN_HNDL",
		"KW_INC_EX_I",
		"KW_INFO",
		"KW_INH_BGC",
		"KW_INH_FGC",
		"KW_INHERITS",
		"KW_INIT_SES",
		"KW_INIT",
		"KW_INIT_C_P",
		"KW_INIT_D_T",
		"KW_INIT_DIR",
		"KW_INIT_FLT",
		"KW_INITIATE",
		"KW_INNER_C",
		"KW_INNER_L",
		"KW_INNER",
		"KW_INPT_VAL",
		"KW_INS_ATTR",
		"KW_INS_B4",
		"KW_INS_BTAB",
		"KW_INS_COL",
		"KW_INS_FLD",
		"KW_INS_FLDD",
		"KW_INS_FLDL",
		"KW_INS_MODE",
		"KW_INS_FILE",
		"KW_INS_ROW",
		"KW_INS_STR",
		"KW_INS_TAB",
		"KW_INST_PRC",
		"KW_INT",
		"KW_INT64",
		"KW_INT_ENT",
		"KW_INTERFAC",
		"KW_INTERVAL",
		"KW_INVOKE",
		"KW_IP_TIME",
		"KW_IS_CLASS",
		"KW_IS_COLCP",
		"KW_IS_CP_FX",
		"KW_IS_DB_MT",
		"KW_IS_JSON",
		"KW_IS_M_TEN",
		"KW_IS_OPEN",
		"KW_IS_PART",
		"KW_IS_P_SET",
		"KW_IS_R_SEL",
		"KW_IS_SEL",
		"KW_IS_XML",
		"KW_ISO_DATE",
		"KW_ITEM",
		"KW_ITEM_ROW",
		"KW_ITER_CHG",
		"KW_IUNKNOWN",
		"KW_JAVA",
		"KW_JOIN_BY",
		"KW_KEEP_CON",
		"KW_KEEP_ZOR",
		"KW_KEEP_MSG",
		"KW_KEEP_SEC",
		"KW_KEEP_TAB",
		"KW_KEY",
		"KW_KW_ALL",
		"KW_LAB_BGC",
		"KW_LAB_DC",
		"KW_LAB_FGC",
		"KW_LAB_FONT",
		"KW_LAB_PFC",
		"KW_LABELS",
		"KW_LAB_H_C",
		"KW_LANDSCAP",
		"KW_LANGUAGE",
		"KW_LARGE",
		"KW_LAST_BAT",
		"KW_LAST_FRM",
		"KW_LAST_OBJ",
		"KW_LAST_TI",
		"KW_LG_2_SM",
		"KW_LAST_AR",
		"KW_LAST_CH",
		"KW_LAST_PRC",
		"KW_LAST_SRV",
		"KW_LAST_SS",
		"KW_LAST_SOC",
		"KW_LCHR_2NV",
		"KW_LEFT",
		"KW_LEFT_AL",
		"KW_LEFT_END",
		"KW_LEFT_MC",
		"KW_LEFT_MDC",
		"KW_LEFT_MD",
		"KW_LEFT_MU",
		"KW_LENGTH",
		"KW_LINE",
		"KW_L_TRIM",
		"KW_LIB_C_C",
		"KW_LISTINGS",
		"KW_LST_PAIR",
		"KW_LIST_ITM",
		"KW_LIST_PNM",
		"KW_LIT_QSTN",
		"KW_LST_EVNT",
		"KW_LST_QRY",
		"KW_LST_SET",
		"KW_LST_WID",
		"KW_LOAD",
		"KW_LOAD_DMN",
		"KW_LOAD_ICO",
		"KW_LOAD_IMG",
		"KW_LOAD_I_D",
		"KW_LOAD_I_I",
		"KW_LOAD_I_U",
		"KW_LOAD_M_P",
		"KW_LOAD_PIC",
		"KW_LOAD_S_I",
		"KW_LOADCTRL",
		"KW_LOB_DIR",
		"KW_LOC_V_I",
		"KW_LOC_C_N",
		"KW_LOC_HOST",
		"KW_LOC_L_N",
		"KW_LOC_NAME",
		"KW_LOC_PORT",
		"KW_LOC_P_ID",
		"KW_LOC_S_ID",
		"KW_LOC_TYPE",
		"KW_LOCK_REG",
		"KW_LOG",
		"KW_LOG_A_EV",
		"KW_LOG_E_TS",
		"KW_LOG_EN_T",
		"KW_LOG_ID",
		"KW_LOG_HOST",
		"KW_LOG_STAT",
		"KW_LOG_THRS",
		"KW_LOGF_NAM",
		"KW_LOGG_LEV",
		"KW_LOGICAL",
		"KW_LOGOUT",
		"KW_LOOKAHD",
		"KW_LONG",
		"KW_LONGCHAR",
		"KW_LC",
		"KW_LT",
		"KW_LTE",
		"KW_MAINMENU",
		"KW_MAND",
		"KW_MAN_HIGH",
		"KW_MARG_EX",
		"KW_MARG_H_C",
		"KW_MARG_H_P",
		"KW_MARG_W_C",
		"KW_MARG_W_P",
		"KW_MARK_NEW",
		"KW_MARK_RS",
		"KW_MATCHES",
		"KW_MAX",
		"KW_MAX_BTN",
		"KW_MAX_CHAR",
		"KW_MAX_D_G",
		"KW_MAX_HT",
		"KW_MAX_H_C",
		"KW_MAX_H_P",
		"KW_MAX_LVL",
		"KW_MAX_W_C",
		"KW_MAX_W_P",
		"KW_MAX_ROWS",
		"KW_MAX_SZ",
		"KW_MAX_VAL",
		"KW_MAX_WID",
		"KW_MAXIMIZE",
		"KW_MD5_VAL",
		"KW_MD5_DIG",
		"KW_MEMPTR",
		"KW_MPTR_2NV",
		"KW_MENU",
		"KW_MENU_BAR",
		"KW_MENU_DRP",
		"KW_MENU_ITM",
		"KW_MENU_KEY",
		"KW_MENU_MOU",
		"KW_MERGE_BF",
		"KW_MERGE_CH",
		"KW_MERGE_RC",
		"KW_METHOD",
		"KW_MF_DFR",
		"KW_MF_DI",
		"KW_MF_DIP",
		"KW_MF_DL",
		"KW_MF_DR",
		"KW_MF_DT",
		"KW_MF_DTAX",
		"KW_MF_DTAXL",
		"KW_MF_DTAXR",
		"KW_MF_DTB",
		"KW_MF_DTBL",
		"KW_MF_DTBR",
		"KW_MF_DTSX",
		"KW_MF_GF",
		"KW_MF_GFH",
		"KW_MF_GFSD",
		"KW_MF_GFSR",
		"KW_MF_GPH",
		"KW_MF_GPN",
		"KW_MF_GPW",
		"KW_MF_GTW",
		"KW_MF_GXY",
		"KW_MF_GZF",
		"KW_MF_INIT",
		"KW_MF_IR",
		"KW_MF_MPDF",
		"KW_MF_P2MU",
		"KW_MF_RP",
		"KW_MF_SF",
		"KW_MF_SFC",
		"KW_MF_SFH",
		"KW_MF_SI",
		"KW_MF_SIA",
		"KW_MF_SLA",
		"KW_MF_SLC",
		"KW_MF_SLM",
		"KW_MF_SLS",
		"KW_MF_SNP",
		"KW_MF_SNTL",
		"KW_MF_SPF",
		"KW_MF_SPN",
		"KW_MF_SPNP",
		"KW_MF_SPNT",
		"KW_MF_SPO",
		"KW_MF_SR",
		"KW_MF_STA",
		"KW_MF_STC",
		"KW_MF_STS",
		"KW_MF_SXY",
		"KW_MF_SZF",
		"KW_MODIFIRS",
		"KW_MSG_AREA",
		"KW_MSG_AFNT",
		"KW_MSG_AMSG",
		"KW_MSG_DIG",
		"KW_MESSAGES",
		"KW_MDL_MC",
		"KW_MDL_MDC",
		"KW_MDL_MD",
		"KW_MDL_MU",
		"KW_MIN",
		"KW_MIN_BTN",
		"KW_MIN_CWCH",
		"KW_MIN_CWPX",
		"KW_MIN_H_C",
		"KW_MIN_H_P",
		"KW_MIN_SCHM",
		"KW_MIN_SZ",
		"KW_MIN_VAL",
		"KW_MIN_W_C",
		"KW_MIN_W_P",
		"KW_MNEMON",
		"KW_MODIFIED",
		"KW_MOD",
		"KW_MONTH",
		"KW_MOU_XC",
		"KW_MOU_XDC",
		"KW_MOU_XD",
		"KW_MOU_XU",
		"KW_MOU_MC",
		"KW_MOU_MDC",
		"KW_MOU_MD",
		"KW_MOU_MU",
		"KW_MOU_MVC",
		"KW_MOU_MVDC",
		"KW_MOU_MVD",
		"KW_MOU_MVU",
		"KW_MOU_PTR",
		"KW_MOU_SC",
		"KW_MOU_SDC",
		"KW_MOU_SD",
		"KW_MOU_SU",
		"KW_MOVABLE",
		"KW_MOVE",
		"KW_MOV_A_T",
		"KW_MOV_B_T",
		"KW_MOV_COL",
		"KW_MOV_2_B",
		"KW_MOV_2_T",
		"KW_MOV_2EOF",
		"KW_MSICON",
		"KW_MSPNTNUM",
		"KW_MTIME",
		"KW_MULT_CMP",
		"KW_MULTIPLE",
		"KW_MULT_KEY",
		"KW_MULTI_IN",
		"KW_MUST_EXI",
		"KW_MUST_UND",
		"KW_NAME",
		"KW_NAMESP_P",
		"KW_NAMESP_U",
		"KW_NATIVE",
		"KW_NE",
		"KW_NEEDS_AP",
		"KW_NEEDS_PR",
		"KW_NESTED",
		"KW_NEXT_COL",
		"KW_NEXT_ERR",
		"KW_NEXT_FR",
		"KW_NEXT_RID",
		"KW_NEXT_SIB",
		"KW_NEXT_TAB",
		"KW_NEXT_VAL",
		"KW_NEXTWORD",
		"KW_NEW_INST",
		"KW_NEW_LINE",
		"KW_NEW_ROW",
		"KW_NEW_SESS",
		"KW_NON_SER",
		"KW_NNMSP_SL",
		"KW_NORMAL",
		"KW_NORMALZE",
		"KW_NO_APPLY",
		"KW_NO_ARMSG",
		"KW_NO_ASSGN",
		"KW_NO_AUTOV",
		"KW_NO_BIND",
		"KW_NO_BOX",
		"KW_NO_COLS",
		"KW_NO_CONS",
		"KW_NO_CVT",
		"KW_NO_CV_3D",
		"KW_NO_CUR_V",
		"KW_NO_DEBUG",
		"KW_NO_DRAG",
		"KW_NO_ECHO",
		"KW_NO_EH_SR",
		"KW_NO_EH_FL",
		"KW_NO_EM_SP",
		"KW_NO_HELP",
		"KW_NO_IDX_H",
		"KW_NO_INHBG",
		"KW_NO_INHFG",
		"KW_NO_JOIN",
		"KW_NO_LOOKA",
		"KW_NO_ROW_M",
		"KW_NO_SCH_M",
		"KW_NO_SEP_C",
		"KW_NO_SEPS",
		"KW_NO_SCR_V",
		"KW_NO_TAB_S",
		"KW_NO_UNDL",
		"KW_NO_WRAP",
		"KW_NODE_CHE",
		"KW_NODE_VAL",
		"KW_NODE_V2M",
		"KW_NODV_2LC",
		"KW_NONE",
		"KW_NUM_BUFF",
		"KW_NUM_BUTT",
		"KW_NUM_CHLN",
		"KW_NUM_CH_R",
		"KW_NUM_COL",
		"KW_NUM_COPY",
		"KW_NUM_DROP",
		"KW_NUM_FLD",
		"KW_NUM_FMTS",
		"KW_NUM_HD_E",
		"KW_NUM_ITMS",
		"KW_NUM_ITER",
		"KW_NUM_LOGF",
		"KW_NUM_LK_C",
		"KW_NUM_LNS",
		"KW_NUM_MSG",
		"KW_NUM_PARM",
		"KW_NUM_REF",
		"KW_NUM_REL",
		"KW_NUM_REPL",
		"KW_NUM_RES",
		"KW_NUM_SR",
		"KW_NUM_SRCB",
		"KW_NUM_TOPB",
		"KW_NUM_SW",
		"KW_NUM_TABS",
		"KW_NUM_2RTN",
		"KW_NUM_V_C",
		"KW_NUM_D_P",
		"KW_NUMERIC",
		"KW_NUM_FMT",
		"KW_NUM_SEP",
		"KW_OBJECT",
		"KW_OCT_LEN",
		"KW_OFF_END",
		"KW_OFF_HOME",
		"KW_OK",
		"KW_OK_CAN",
		"KW_OLE_INVL",
		"KW_OLE_NAML",
		"KW_ON_FR_B",
		"KW_ONLY",
		"KW_ORG_HAND",
		"KW_ORG_ROID",
		"KW_ORDER",
		"KW_ORD_JOIN",
		"KW_OPEN_L_A",
		"KW_OPENMIME",
		"KW_OPENPOPU",
		"KW_OPEN_URL",
		"KW_OPTIONS",
		"KW_OPTIONSF",
		"KW_ORDINAL",
		"KW_OS_DRV",
		"KW_OS_ERR",
		"KW_OS_G_ENV",
		"KW_OS_UID",
		"KW_OUT_JOIN",
		"KW_OUTER",
		"KW_OUTPUTCT",
		"KW_OUT_HDR",
		"KW_OUT_HH",
		"KW_OUT_MSGS",
		"KW_OVERRIDE",
		"KW_OWNER",
		"KW_OWN_DOC",
		"KW_P2J_RC",
		"KW_PAGE_DWN",
		"KW_PAGE_LFT",
		"KW_PAGE_RT",
		"KW_PAGE_SZ",
		"KW_PAGE_UP",
		"KW_PAGE_WID",
		"KW_PAGED",
		"KW_PAR_BUFF",
		"KW_PAR_FLDA",
		"KW_PAR_FLDB",
		"KW_PAR_IFLD",
		"KW_PAR_IREL",
		"KW_PAR_REL",
		"KW_PAR_W_C",
		"KW_PARENT",
		"KW_PART_KEY",
		"KW_PATHNAME",
		"KW_PARSE_ST",
		"KW_PASCAL",
		"KW_PASTE",
		"KW_PBE_H_AL",
		"KW_PBE_KEYR",
		"KW_PERF",
		"KW_PREF_DS",
		"KW_PRE_LBL",
		"KW_PRS_PROC",
		"KW_PRS_C_D",
		"KW_PFCOLOR",
		"KW_PICK",
		"KW_PICK_ARE",
		"KW_PICK_BTH",
		"KW_PIX_COL",
		"KW_PIX_ROW",
		"KW_PK_PRIV",
		"KW_PK_PROT",
		"KW_POLY",
		"KW_POP_MENU",
		"KW_POP_ONLY",
		"KW_PORTRAIT",
		"KW_POS",
		"KW_PRECISN",
		"KW_PREP_STR",
		"KW_PREPARED",
		"KW_PRESEL",
		"KW_PREV",
		"KW_PREV_COL",
		"KW_PREV_FR",
		"KW_PREV_SIB",
		"KW_PREV_T_I",
		"KW_PREVWORD",
		"KW_PRIM_P_P",
		"KW_PRIMARY",
		"KW_PRINTER",
		"KW_PRT_C_H",
		"KW_PRT_HDC",
		"KW_PRT_NAME",
		"KW_PRT_PORT",
		"KW_PRT_SET",
		"KW_PRIVATE",
		"KW_PRIV_DAT",
		"KW_PROCNAME",
		"KW_PROCTYPE",
		"KW_PROC_COM",
		"KW_PROC",
		"KW_PROC_W_R",
		"KW_PROC_TXT",
		"KW_PROC_T_B",
		"KW_PRODATAS",
		"KW_PROFILNG",
		"KW_PROG_SRC",
		"KW_PRO_ARCH",
		"KW_PROPERTY",
		"KW_PROTECTD",
		"KW_PROXY",
		"KW_PROX_PWD",
		"KW_PROX_UID",
		"KW_PUBLIC",
		"KW_PUB_ID",
		"KW_PUB_EVTS",
		"KW_PUT_BITS",
		"KW_PUT_BYTS",
		"KW_PUT_I64",
		"KW_PUT_DBL",
		"KW_PUT_FLT",
		"KW_PUT_LONG",
		"KW_PUT_SHT",
		"KW_PUT_STR",
		"KW_PUT_UL",
		"KW_PUT_USHT",
		"KW_QRY_OPEN",
		"KW_QRY_PREP",
		"KW_QUAL_UID",
		"KW_QUEST",
		"KW_QUE_MSG",
		"KW_QUOTER",
		"KW_RADIO_B",
		"KW_RADIO_S",
		"KW_RANDOM",
		"KW_RAW",
		"KW_RAW_TRAN",
		"KW_READ",
		"KW_REAL",
		"KW_READ_FIL",
		"KW_READ_JSN",
		"KW_READ_ONL",
		"KW_READ_RES",
		"KW_READ_XML",
		"KW_READ_XSC",
		"KW_RECALL",
		"KW_REC_LEN",
		"KW_RECURSE",
		"KW_REF_ONLY",
		"KW_REFR_A_P",
		"KW_REFRESH",
		"KW_REFRABLE",
		"KW_REG_DMN",
		"KW_REGISTER",
		"KW_REJ_CHGS",
		"KW_REJ_RCHG",
		"KW_REJECTED",
		"KW_REL_FLDS",
		"KW_RELS_ACT",
		"KW_RELSESID",
		"KW_REM_HOST",
		"KW_REM_PORT",
		"KW_REMOTE",
		"KW_REM_ATTR",
		"KW_REM_EVTP",
		"KW_REM_CHLD",
		"KW_REM_SUP",
		"KW_REPLACE",
		"KW_REPOS_M",
		"KW_REP_CHLD",
		"KW_REP_STXT",
		"KW_REPORTS",
		"KW_REQUEST",
		"KW_REQ_INFO",
		"KW_RSP_INFO",
		"KW_RESET",
		"KW_RESIZE",
		"KW_RESIZABL",
		"KW_REST_RID",
		"KW_REST_ROW",
		"KW_RESULT",
		"KW_RESUME_D",
		"KW_RET_SHAP",
		"KW_RETRY_C",
		"KW_RET_INS",
		"KW_RET_VAL",
		"KW_RET_VDT",
		"KW_RET_VLT",
		"KW_RET_2SD",
		"KW_RETURNS",
		"KW_REV_FROM",
		"KW_RFRSH_UI",
		"KW_RGB_VAL",
		"KW_RIGHT",
		"KW_RIGHT_AL",
		"KW_RT_END",
		"KW_RT_MC",
		"KW_RT_MDC",
		"KW_RT_MD",
		"KW_RT_MU",
		"KW_R_TRIM",
		"KW_ROLE",
		"KW_ROLES",
		"KW_ROUND",
		"KW_ROUNDED",
		"KW_ROUTINEL",
		"KW_ROW",
		"KW_ROW_CRT",
		"KW_ROW_DEL",
		"KW_ROW_DISP",
		"KW_ROW_ENTR",
		"KW_ROW_H_C",
		"KW_ROW_H_P",
		"KW_ROW_LEAV",
		"KW_ROW_OF",
		"KW_ROW_MARK",
		"KW_ROW_RESZ",
		"KW_ROW_STAT",
		"KW_ROW_UPD",
		"KW_ROWID",
		"KW_RUN_PROC",
		"KW_RUN_W_O",
		"KW_RULE",
		"KW_RULE_ROW",
		"KW_RULE_Y",
		"KW_SAVE_AS",
		"KW_SAVE_FIL",
		"KW_SAX_ATTR",
		"KW_SAX_PARF",
		"KW_SAX_PARN",
		"KW_SAX_PARS",
		"KW_SAX_READ",
		"KW_SAX_WRIT",
		"KW_SAVE_RCH",
		"KW_SAVE_WST",
		"KW_SCH_CHG",
		"KW_SCH_LOC",
		"KW_SCH_MARS",
		"KW_SCH_PATH",
		"KW_SCROLLBL",
		"KW_SCROLLBA",
		"KW_SCR_DELT",
		"KW_SCR_LEFT",
		"KW_SCROLL_H",
		"KW_SCR_MODE",
		"KW_SCR_NOT",
		"KW_SCR_OFFS",
		"KW_SCR_RT",
		"KW_SCR_2CR",
		"KW_SCR_2ITM",
		"KW_SCR_2SR",
		"KW_SCR_COL",
		"KW_SCR_HGHT",
		"KW_SCR_SCAL",
		"KW_SCR_WDTH",
		"KW_SCRN_VAL",
		"KW_SCROLL_V",
		"KW_SCR_RPOS",
		"KW_SCROLLIN",
		"KW_SEAL",
		"KW_SEAL_TST",
		"KW_SECTION",
		"KW_SEL_ALL",
		"KW_SEL_END",
		"KW_SEL_FOCR",
		"KW_SEL_NEXT",
		"KW_SEL_PREV",
		"KW_SEL_ROW",
		"KW_SEL_STRT",
		"KW_SEL_TXT",
		"KW_SELECTBL",
		"KW_SELECTED",
		"KW_SELECTN",
		"KW_SEL_LST",
		"KW_SEND",
		"KW_SEND_SQL",
		"KW_SENSITIV",
		"KW_SEPS",
		"KW_SEP_CONN",
		"KW_SEP_FGC",
		"KW_SERIALAB",
		"KW_SERIALZH",
		"KW_SERIALZN",
		"KW_SERIALZR",
		"KW_SERVER",
		"KW_SESS_END",
		"KW_SESSN_ID",
		"KW_SRV_C_B",
		"KW_SRV_C_BR",
		"KW_SRV_C_C",
		"KW_SRV_C_I",
		"KW_SRV_OP_M",
		"KW_SETTINGS",
		"KW_SET_ACTR",
		"KW_SET_ACTX",
		"KW_SET_ATTR",
		"KW_SET_A_L",
		"KW_SET_A_N",
		"KW_SET_BLUE",
		"KW_SET_BRK",
		"KW_SET_BUF",
		"KW_SET_B_OR",
		"KW_SET_CB_P",
		"KW_SET_CBAC",
		"KW_SET_CLNT",
		"KW_SET_COMM",
		"KW_SET_C_P",
		"KW_SET_CONT",
		"KW_SET_COOK",
		"KW_SET_DBCL",
		"KW_SET_DYN",
		"KW_SET_EVMO",
		"KW_SET_GRN",
		"KW_SET_ISRC",
		"KW_SET_LSTK",
		"KW_SET_M_UN",
		"KW_SET_N_F",
		"KW_SET_NODE",
		"KW_SET_ODST",
		"KW_SET_OPT",
		"KW_SET_PARM",
		"KW_SET_PROP",
		"KW_SET_PTR",
		"KW_SET_RED",
		"KW_SET_RGB",
		"KW_SET_RRP",
		"KW_SET_RPOS",
		"KW_SET_ROLL",
		"KW_SET_SEL",
		"KW_SET_SERD",
		"KW_SET_SZ",
		"KW_SET_S_AR",
		"KW_SET_T_S",
		"KW_SET_U_F",
		"KW_SET_S_O",
		"KW_SET_WAIT",
		"KW_SET_WKDR",
		"KW_SET_W_S",
		"KW_SRV_SOCK",
		"KW_SHA1_DIG",
		"KW_SHORT",
		"KW_SHOW_ITB",
		"KW_SIDE_L",
		"KW_SIDE_L_H",
		"KW_SIGNATUR",
		"KW_SILENT",
		"KW_SIMPLE",
		"KW_SINGLE",
		"KW_SINGLTON",
		"KW_SIZE",
		"KW_SIZE_C",
		"KW_SIZE_P",
		"KW_SLIDER",
		"KW_SMAL_ICO",
		"KW_SMAL_TTL",
		"KW_SMALLINT",
		"KW_SRC_PROC",
		"KW_SOAP_HDR",
		"KW_SOAP_HER",
		"KW_SOAP_F",
		"KW_SOAP_F_A",
		"KW_SOAP_F_C",
		"KW_SOAP_F_D",
		"KW_SOAP_FMH",
		"KW_SOAP_F_N",
		"KW_SOAP_F_R",
		"KW_SOAP_F_S",
		"KW_SOAP_FSC",
		"KW_SOAP_VER",
		"KW_SOCKET",
		"KW_SORT",
		"KW_SORT_ASC",
		"KW_SORT_NUM",
		"KW_SOURCE",
		"KW_SQL",
		"KW_SQRT",
		"KW_SSL_SRVN",
		"KW_STANDALN",
		"KW_START",
		"KW_START_BS",
		"KW_START_DC",
		"KW_START_EL",
		"KW_START_MV",
		"KW_START_RS",
		"KW_START_RR",
		"KW_START_SC",
		"KW_STARTING",
		"KW_STAT_DET",
		"KW_STATIC",
		"KW_STATUS_A",
		"KW_STAT_A_F",
		"KW_STDCALL",
		"KW_STOP",
		"KW_STOP_AFT",
		"KW_STOP_D",
		"KW_STOP_PRS",
		"KW_STOPPED",
		"KW_STORPROC",
		"KW_STUP_PAR",
		"KW_ST_2_FIT",
		"KW_STR_VAL",
		"KW_STR_XREF",
		"KW_STRICT",
		"KW_STRIC_ER",
		"KW_STRING",
		"KW_SUB_AVG",
		"KW_SUB_CNT",
		"KW_SUB_MAX",
		"KW_SUB_MENU",
		"KW_SUB_M_H",
		"KW_SUB_MIN",
		"KW_SUB_TOT",
		"KW_SUBSTIT",
		"KW_SUBSTR",
		"KW_SUBTYPE",
		"KW_SUM",
		"KW_SUP_NS_P",
		"KW_SUP_PROC",
		"KW_SUP_WARN",
		"KW_SUPW_LST",
		"KW_SYM_EN_A",
		"KW_SYM_EN_I",
		"KW_SYM_EN_K",
		"KW_SYM_SUPP",
		"KW_SYNCHRON",
		"KW_SYS_A_B",
		"KW_SYS_HELP",
		"KW_SYS_ID",
		"KW_TAB",
		"KW_TAB_CRCL",
		"KW_TAB_HAND",
		"KW_TAB_LIST",
		"KW_TAB_POS",
		"KW_TAB_SCAN",
		"KW_TAB_STOP",
		"KW_TAG",
		"KW_TARGET",
		"KW_TAR_PROC",
		"KW_TEMP_DIR",
		"KW_TEMP_TAB",
		"KW_TRC_FILT",
		"KW_TRAC_CHG",
		"KW_TT_PREP",
		"KW_TEN_ID",
		"KW_TENNAME",
		"KW_TN_TOID",
		"KW_TERM_HK",
		"KW_TERMINAT",
		"KW_TXT_SEG",
		"KW_TXT_SEL",
		"KW_3D",
		"KW_THROUGH",
		"KW_THROW",
		"KW_THR_SAFE",
		"KW_TIC_MARK",
		"KW_TIMEZONE",
		"KW_TIME_SRC",
		"KW_TITL_BGC",
		"KW_TITL_DC",
		"KW_TITL_FGC",
		"KW_TITL_FON",
		"KW_TODAY",
		"KW_TOGGL_BX",
		"KW_TOOLTIP",
		"KW_TOOLTIPS",
		"KW_TOP",
		"KW_TOP_COL",
		"KW_TOP_NAVQ",
		"KW_TOPIC",
		"KW_TOTAL",
		"KW_TRACING",
		"KW_TRAILING",
		"KW_TRAN_I_P",
		"KW_TRAN_MOD",
		"KW_TRANSPAR",
		"KW_TRUNC",
		"KW_TTCP",
		"KW_TYPE",
		"KW_TYPE_OF",
		"KW_UNBOX",
		"KW_UNBUF",
		"KW_UNDO_T_S",
		"KW_UNIQ_ID",
		"KW_UNIQ_MAT",
		"KW_UNIX_END",
		"KW_UNL_HID",
		"KW_UNLOAD",
		"KW_UNS_BYTE",
		"KW_UNS_SHRT",
		"KW_UNS_LONG",
		"KW_UPD_ATTR",
		"KW_URL",
		"KW_URL_DECO",
		"KW_URL_ENCO",
		"KW_URL_FLD",
		"KW_URL_FLDL",
		"KW_URL_FMT",
		"KW_URL_PW",
		"KW_URL_UID",
		"KW_USE",
		"KW_USE_DCT",
		"KW_USE_FIL",
		"KW_USE_REV",
		"KW_USE_TXT",
		"KW_USE_UND",
		"KW_USE_WIDP",
		"KW_USR_DATA",
		"KW_USER_ID",
		"KW_UTC_OFF",
		"KW_V6DISP",
		"KW_VAL_ENAB",
		"KW_VAL_EXPR",
		"KW_VAL_MSG",
		"KW_VAL_SEAL",
		"KW_VAL_XML",
		"KW_VALIDATE",
		"KW_VAL_EVT",
		"KW_VAL_HND",
		"KW_VAL_OBJ",
		"KW_VAR",
		"KW_VERBOSE",
		"KW_VERSION",
		"KW_VERT",
		"KW_VIEW_FCR",
		"KW_VIRT_HC",
		"KW_VIRT_HP",
		"KW_VIRT_WC",
		"KW_VIRT_WP",
		"KW_VISIBLE",
		"KW_WAIT",
		"KW_VOID",
		"KW_WARN",
		"KW_WC_AD_AP",
		"KW_WEB",
		"KW_WEB_CTX",
		"KW_WEB_FUP",
		"KW_WEB_OUT",
		"KW_WEEK",
		"KW_WHERE_ST",
		"KW_WIDGET",
		"KW_WID_ENT",
		"KW_WID_HAND",
		"KW_WID_ID",
		"KW_WID_LEAV",
		"KW_WID_POOL",
		"KW_WIDTH",
		"KW_WIDTH_C",
		"KW_WIDTH_P",
		"KW_WIN_CLOS",
		"KW_WIN_NAME",
		"KW_WIN_RESI",
		"KW_WIN_REST",
		"KW_WIN_STAT",
		"KW_WIN_SYS",
		"KW_WORD_IDX",
		"KW_WORD_WRP",
		"KW_WA_H_P",
		"KW_WA_W_P",
		"KW_WA_X",
		"KW_WA_Y",
		"KW_WR_CDATA",
		"KW_WR_CHARS",
		"KW_WR_CMNT",
		"KW_WR_DATA",
		"KW_WR_D_ELM",
		"KW_WR_E_ELM",
		"KW_WR_ENT_R",
		"KW_WR_EXDTD",
		"KW_WR_FRAGM",
		"KW_WR_JSON",
		"KW_WR_MSG",
		"KW_WR_PRINS",
		"KW_WR_STAT",
		"KW_WR_XML",
		"KW_WR_XMLSC",
		"KW_WUPL_ERR",
		"KW_WUPL_FLS",
		"KW_X",
		"KW_XML_DTYP",
		"KW_XML_E_EL",
		"KW_XML_NNAM",
		"KW_XML_NTYP",
		"KW_XML_SCHP",
		"KW_XML_S_ER",
		"KW_XML_SNSP",
		"KW_XPR2PDF",
		"KW_X_DOC",
		"KW_X_NODE",
		"KW_X_OF",
		"KW_YEAR",
		"KW_YEAR_OFF",
		"KW_YES_NO",
		"KW_YES_NO_C",
		"KW_Y",
		"KW_Y_OF",
		"BEGIN_FWD_EXTENSION",
		"KW_TIMER",
		"KW_CALLBACK",
		"KW_ENABLED",
		"KW_CEASE",
		"CREATE_TIMER",
		"CREATE_GENERIC_OCX",
		"KW_CONNTYPE",
		"KW_ACTIVATE",
		"KW_ADD_TO_A",
		"KW_ADD_CC_A",
		"KW_ADD_BCCA",
		"KW_AS_THRD",
		"KW_ATT_FILE",
		"KW_ATT_URL",
		"KW_CHECK_BO",
		"KW_CLR_ATTL",
		"KW_CLR_BCCL",
		"KW_CLR_CC_L",
		"KW_CLR_EMBL",
		"KW_CLR_TO_L",
		"KW_EMB_FILE",
		"KW_EMB_URL",
		"KW_GET_ATTL",
		"KW_GET_BCCL",
		"KW_GET_CC_L",
		"KW_GET_EMBL",
		"KW_GET_TO_L",
		"KW_SMTP_EML",
		"KW_SMTPFROM",
		"KW_SMTPHOST",
		"KW_SMTPHTML",
		"KW_SMTPPORT",
		"KW_SMTPREPL",
		"KW_SMTPSUBJ",
		"KW_SMTPTEXT",
		"KW_SMTPUSER",
		"KW_SMTP_PW",
		"KW_SMTP_VAL",
		"CREATE_SMTP_EMAIL",
		"KW_REPORT",
		"KW_RPT_ADDC",
		"KW_RPT_DSGN",
		"KW_RPT_CAP",
		"KW_RPT_CSV",
		"KW_RPT_DOCX",
		"KW_RPT_GSRC",
		"KW_RPT_GSRR",
		"KW_RPT_HTML",
		"KW_RPT_ICSV",
		"KW_RPT_PDF",
		"KW_RPT_RTF",
		"KW_RPT_SRC",
		"KW_RPT_XLS",
		"KW_RPT_XLSX",
		"KW_SET_R_P",
		"CREATE_REPORT",
		"KW_TREEVIEW",
		"KW_ADD_C_N",
		"KW_ADD_F_N",
		"KW_ADD_L_N",
		"KW_ADD_N_N",
		"KW_BUILD_TR",
		"KW_CLR_ALL",
		"KW_CLR_NIML",
		"KW_CLR_NODS",
		"KW_COL_NODE",
		"KW_COLL_A_E",
		"KW_COLL_ALL",
		"KW_CRE_IMAG",
		"KW_CREAT_SN",
		"KW_CRT_MIMG",
		"KW_DCLK_EXP",
		"KW_DD_OTREE",
		"KW_DRAGDROP",
		"KW_ENS_N_V",
		"KW_EXP_N_IC",
		"KW_EXP_NODE",
		"KW_EXP_ON_E",
		"KW_EXP_SCLK",
		"KW_EXPA_ALL",
		"KW_FIND_NOD",
		"KW_FIRST_N",
		"KW_FNT_BOLD",
		"KW_FNT_ITAL",
		"KW_FNT_NAME",
		"KW_FNT_SIZE",
		"KW_FNT_UNDL",
		"KW_FOC_NKEY",
		"KW_FOC_NODE",
		"KW_FS_NKEY",
		"KW_FS_NODE",
		"KW_FV_NODE",
		"KW_GET_FCN",
		"KW_GET_N_AT",
		"KW_GET_N_BG",
		"KW_GET_N_FG",
		"KW_GET_N_HC",
		"KW_GET_N_N",
		"KW_GET_NLEV",
		"KW_GET_NSN",
		"KW_GET_NTXT",
		"KW_GET_NVV",
		"KW_GET_PARN",
		"KW_GET_PSN",
		"KW_GET_SNC",
		"KW_GET_TNOD",
		"KW_HIT_TEST",
		"KW_HIT_TFWD",
		"KW_INDENT",
		"KW_IS_MSEL",
		"KW_IS_N_EXP",
		"KW_NEW_LBL",
		"KW_N_AEDIT",
		"KW_N_BEDIT",
		"KW_N_CLICK",
		"KW_N_COLED",
		"KW_N_COLING",
		"KW_N_EXPED",
		"KW_N_EXPING",
		"KW_N_HEIGHT",
		"KW_N_KEY_ID",
		"KW_NODE_BLD",
		"KW_NODE_CNT",
		"KW_NODE_EXP",
		"KW_NODE_ICO",
		"KW_NODE_ID",
		"KW_NODE_IDX",
		"KW_NODE_KEY",
		"KW_NODE_PAR",
		"KW_NODE_TXT",
		"KW_NODES",
		"KW_REM_NOCO",
		"KW_REM_NODE",
		"KW_SCR_NTOP",
		"KW_SCR_VERT",
		"KW_SCR_WLNS",
		"KW_SEL_NID",
		"KW_SEL_NKEY",
		"KW_SEL_NODE",
		"KW_SEL_SFVN",
		"KW_SET_MSEL",
		"KW_SET_N_BG",
		"KW_SET_N_FG",
		"KW_SET_N_HC",
		"KW_SET_NTXT",
		"KW_SET_SNC",
		"KW_SET_TN_I",
		"KW_SHOW_BUT",
		"KW_TEXTEDIT",
		"KW_TNOD_VAL",
		"KW_TREE_R_H",
		"KW_TRIG_NOD",
		"KW_TRIG_COL",
		"KW_SCR_NODC",
		"KW_V_N_CNT",
		"KW_V_R_CNT",
		"KW_TABSET",
		"KW_ADD_TAB",
		"KW_TABS",
		"KW_CLR_TABS",
		"KW_CURR_TAB",
		"KW_TAB_IDX",
		"KW_TAB_ML",
		"KW_TAB_SHOW",
		"KW_SET_F_D",
		"KW_FOC_ASEL",
		"KW_HTML_BWS",
		"KW_CTX_PATH",
		"KW_OPENHTML",
		"KW_OPENPAGE",
		"KW_POSTMSG",
		"KW_PRINT",
		"KW_RES_BASE",
		"KW_TREELIST",
		"KW_AST_ACTI",
		"KW_CRT_COL",
		"KW_COL_SRT",
		"KW_C_T_V_N",
		"KW_C_NOD_D",
		"KW_DATE_SEP",
		"KW_DEC_SEP",
		"KW_EVT_ACTI",
		"KW_FIX_C_L",
		"KW_G_C_BGCO",
		"KW_G_C_FGCO",
		"KW_G_COL_P",
		"KW_G_COL_W",
		"KW_GET_C_S",
		"KW_IS_C_VIS",
		"KW_M_D_I_P",
		"KW_M_U_I_P",
		"KW_RESORT",
		"KW_S_C_BGCO",
		"KW_S_C_FGCO",
		"KW_S_COL_C",
		"KW_S_COL_W",
		"KW_SET_C_IC",
		"KW_SET_C_S",
		"KW_SET_C_VI",
		"KW_SHOW_HDR",
		"KW_SHR_D_F",
		"KW_SOR_C_C",
		"KW_SOR_COLS",
		"KW_THO_SEP",
		"KW_AT_W_BRW",
		"KW_UPLOAD",
		"KW_H_SCRL_P",
		"KW_V_SCRL_P",
		"KW_IMG_LIST",
		"KW_IL_IMG",
		"KW_IL_BGCOL",
		"KW_IL_HEIGH",
		"KW_IL_WIDTH",
		"KW_IL_LIST",
		"KW_IL_MASK",
		"KW_IL_OVER",
		"KW_IL_UMASK",
		"KW_ADD_IMG",
		"KW_MS_CLICK",
		"KW_MS_DBCLK",
		"KW_MS_DOWN",
		"KW_MS_MOVE",
		"KW_MS_UP",
		"KW_OCX_MBTN",
		"KW_OCX_MSHT",
		"KW_OCX_MSX",
		"KW_OCX_MSY",
		"KW_OLE_DGMD",
		"KW_OLE_DRMD",
		"KW_OLE_DRAG",
		"KW_OLE_EFFE",
		"KW_OLE_STAT",
		"KW_OLE_DEFC",
		"KW_OLE_DATF",
		"KW_OLE_AEFF",
		"KW_OLE_CDRG",
		"KW_OLE_DD",
		"KW_OLE_DGOV",
		"KW_OLE_GIVF",
		"KW_OLE_SETD",
		"KW_OLE_STDG",
		"KW_OLE_X",
		"KW_OLE_Y",
		"KW_DRAG_NOD",
		"KW_DRAG_OVR",
		"KW_PROG_BAR",
		"KW_PB_APPEA",
		"KW_PB_ENABL",
		"KW_PB_BRSTY",
		"KW_PB_ORIEN",
		"KW_PB_MIN",
		"KW_PB_MAX",
		"KW_PB_VALUE",
		"KW_PB_SCROL",
		"KW_COM_DATA",
		"KW_CALBGCLR",
		"KW_CALFGCLR",
		"KW_CALTITBG",
		"KW_CALTITFG",
		"KW_CALTRLFG",
		"KW_CALENDAR",
		"KW_CALCUFMT",
		"KW_CALFMTST",
		"KW_CALUPDWN",
		"KW_CALVALUE",
		"KW_CLEA_TAB",
		"KW_CLEA_WIN",
		"KW_GET_SIMG",
		"KW_KPAD_HOT",
		"KW_KPAD_CLE",
		"KW_KPAD_QRY",
		"KW_LCD_REFR",
		"KW_LCD_SWIN",
		"KW_LCD_WSTR",
		"KW_NUM_PNTS",
		"KW_SET_IMGF",
		"KW_SET_PENW",
		"KW_SET_IMGH",
		"KW_SET_IMGW",
		"KW_SET_JMOD",
		"KW_SET_JSTX",
		"KW_SET_JSTY",
		"KW_SET_CPTM",
		"KW_SET_SWIN",
		"KW_SET_TSTA",
		"KW_SET_TBME",
		"KW_TAB_MOD",
		"KW_BTN_LIST",
		"KW_BL_CURGR",
		"KW_BL_CGR_K",
		"KW_BL_BTNFN",
		"KW_BL_ITMFN",
		"KW_BL_GCLR",
		"KW_BL_GADD",
		"KW_BL_GIFP",
		"KW_BL_IADD",
		"KW_BL_G_KEY",
		"KW_BL_GIKEY",
		"KW_BL_NGR",
		"KW_BL_NGRI",
		"KW_BL_G_GR",
		"KW_BL_G_GRI",
		"KW_CAPFNT",
		"KW_CAPFNTSZ",
		"KW_SPRSHEET",
		"KW_FLTR_MAP",
		"KW_SORT_MAP",
		"KW_DIS_STRP",
		"KW_DIS_CEDT",
		"KW_UNIQ_KEY",
		"END_FWD_EXTENSION",
		"END_UNRESERVED",
		"BEGIN_CALLGRAPH",
		"FILE_RESOURCE",
		"AST_NODE",
		"IPC_RESOURCE",
		"NATIVE_PROGRAM_RESOURCE",
		"UNKNOWN_RESOURCE",
		"INCLUDES",
		"RUN_FILENAME",
		"RUN_FILENAME_ON_SERVER",
		"RUN_INT_PROC",
		"RUN_INT_PROC_ON_SERVER",
		"RUN_VALUE",
		"RUN_VALUE_ON_SERVER",
		"RUN_PORT_TYPE_ON_SERVER",
		"RUN_PORT_TYPE_VALUE_ON_SERVER",
		"RUN_LIBRARY_REF",
		"RUN_LIBRARY_REF_ON_SERVER",
		"FUNCTION_CALL",
		"AMBIGUOUS",
		"MISSING",
		"PROCEDURE_FILE",
		"INCLUDE_FILE",
		"SCHEMA_FILE",
		"EXTERNAL_PROCEDURE",
		"INTERNAL_PROCEDURE",
		"LIBRARY_PROCEDURE",
		"PORT_TYPE",
		"SHARED_LIBRARY",
		"NATIVE_API",
		"NATIVE_PROCESS",
		"CHILD_PROCESS",
		"NETWORK_CONNECTION",
		"COM_OBJECT",
		"DDE_SERVER",
		"OCX_CONTROL",
		"DEFINE_PROPERTY_GET",
		"DEFINE_PROPERTY_SET",
		"MORE",
		"END_CALLGRAPH",
		"UNKNOWN_TOKEN",
		"AT",
		"EQUALS",
		"LBRACKET",
		"RBRACKET",
		"COLON",
		"COMMA",
		"LPARENS",
		"RPARENS",
		"STRING",
		"MULTIPLY",
		"KW_NOT_ACTV",
		"CARET",
		"MULT_ASSIGN",
		"PLUS_ASSIGN",
		"MINUS_ASSIGN",
		"DIV_ASSIGN",
		"GT",
		"LT",
		"DIVIDE",
		"UNKNOWN_VAL",
		"NUM_LITERAL",
		"SYMBOL",
		"KW_LIKE_SEQ",
		"NOT_EQ",
		"GTE",
		"LTE",
		"DB_REF_NON_STATIC",
		"WS",
		"TILDE",
		"COMMENT",
		"HEX_DIGIT",
		"VALID_SYM_CHAR",
		"SSTRING",
		"DSTRING",
		"XSTRING",
		"RSTRING",
		"STR_OPTIONS",
		"LETTER",
		"DIGIT",
		"SYM_CHAR",
		"CMT_OPEN",
		"CMT_CLOSE",
		"SLASH_SLASH",
		"MONTH_TRASH_MODE",
		"YEAR_TRASH_MODE",
		"JUNK"
	};
	
	protected void buildTokenTypeASTClassMap() {
		tokenTypeToASTClassMap=null;
	};
	
	private static final long[] mk_tokenSet_0() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=49152L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17594333528064L;
		return data;
	}
	public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
	private static final long[] mk_tokenSet_1() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=49152L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
	private static final long[] mk_tokenSet_2() {
		long[] data = new long[80];
		data[9]=2304L;
		data[10]=8388608L;
		data[11]=549755813912L;
		data[12]=576742227296911488L;
		data[13]=36169534507319552L;
		data[14]=9015995347763200L;
		data[16]=3377699720527872L;
		data[17]=8L;
		data[21]=34359738368L;
		data[22]=64L;
		data[25]=4194304L;
		data[28]=262144L;
		data[30]=536870912L;
		data[32]=6597069766672L;
		data[33]=1146884L;
		data[35]=576460752303423488L;
		data[37]=576461302059237376L;
		data[38]=67108864L;
		data[39]=4398046511104L;
		return data;
	}
	public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
	private static final long[] mk_tokenSet_3() {
		long[] data = new long[120];
		data[0]=-14L;
		for (int i = 1; i<=46; i++) { data[i]=-1L; }
		data[47]=31L;
		return data;
	}
	public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
	private static final long[] mk_tokenSet_4() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=49280L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17594333528064L;
		return data;
	}
	public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
	private static final long[] mk_tokenSet_5() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=49152L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592722915328L;
		return data;
	}
	public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
	private static final long[] mk_tokenSet_6() {
		long[] data = new long[48];
		data[0]=2L;
		return data;
	}
	public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
	private static final long[] mk_tokenSet_7() {
		long[] data = new long[80];
		data[9]=2304L;
		data[10]=8388608L;
		data[12]=281474976710656L;
		data[13]=36028797018963968L;
		data[14]=8796093022208L;
		data[16]=3377699720527872L;
		data[28]=262144L;
		data[37]=576460752303423488L;
		data[38]=67108864L;
		data[39]=4398046511104L;
		return data;
	}
	public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
	private static final long[] mk_tokenSet_8() {
		long[] data = new long[68];
		data[32]=6597069766656L;
		data[33]=1114116L;
		return data;
	}
	public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
	private static final long[] mk_tokenSet_9() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=1097728L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=26388279066624L;
		return data;
	}
	public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
	private static final long[] mk_tokenSet_10() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789022515200L;
		return data;
	}
	public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
	private static final long[] mk_tokenSet_11() {
		long[] data = new long[120];
		data[0]=129362L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30806336602112L;
		return data;
	}
	public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
	private static final long[] mk_tokenSet_12() {
		long[] data = new long[48];
		data[0]=2L;
		data[9]=4294967296L;
		data[10]=512L;
		data[12]=32L;
		return data;
	}
	public static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12());
	private static final long[] mk_tokenSet_13() {
		long[] data = new long[120];
		data[0]=129088L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13());
	private static final long[] mk_tokenSet_14() {
		long[] data = new long[94];
		data[0]=16L;
		data[3]=4177920L;
		data[8]=4294967296L;
		data[9]=4398046511104L;
		data[10]=2305844246164339785L;
		data[11]=307388266754211840L;
		data[12]=108086399646826498L;
		data[13]=88064546076672L;
		data[14]=4157570285568L;
		data[26]=72057594037927936L;
		data[31]=4611686018427387904L;
		data[38]=1048576L;
		data[46]=13196287016960L;
		return data;
	}
	public static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14());
	private static final long[] mk_tokenSet_15() {
		long[] data = new long[120];
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15());
	private static final long[] mk_tokenSet_16() {
		long[] data = new long[94];
		data[0]=16L;
		data[3]=128L;
		data[14]=9007199254740992L;
		data[22]=64L;
		data[25]=1116691496960L;
		data[35]=576460752303423488L;
		data[39]=268435456L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16());
	private static final long[] mk_tokenSet_17() {
		long[] data = new long[94];
		data[0]=16L;
		data[3]=128L;
		data[25]=1099511627776L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
	private static final long[] mk_tokenSet_18() {
		long[] data = new long[94];
		data[0]=16L;
		data[3]=128L;
		data[22]=17179869184L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_18 = new BitSet(mk_tokenSet_18());
	private static final long[] mk_tokenSet_19() {
		long[] data = new long[120];
		data[9]=36037593111986176L;
		data[10]=1048576L;
		data[12]=2305843009213693952L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_19 = new BitSet(mk_tokenSet_19());
	private static final long[] mk_tokenSet_20() {
		long[] data = new long[120];
		data[0]=129360L;
		data[2]=536870912L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789148344320L;
		return data;
	}
	public static final BitSet _tokenSet_20 = new BitSet(mk_tokenSet_20());
	private static final long[] mk_tokenSet_21() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789014126592L;
		return data;
	}
	public static final BitSet _tokenSet_21 = new BitSet(mk_tokenSet_21());
	private static final long[] mk_tokenSet_22() {
		long[] data = new long[80];
		data[0]=16L;
		data[8]=297403670400663808L;
		data[9]=144240201965764615L;
		data[10]=-3449194364608183759L;
		data[11]=1129335897456696L;
		data[12]=1301735459987324080L;
		data[13]=2035989329242948866L;
		data[14]=13999948804L;
		data[16]=1073741824L;
		data[17]=-9223354442521247744L;
		data[18]=1342177280L;
		data[21]=1L;
		data[22]=128L;
		data[23]=8L;
		data[27]=4096L;
		data[31]=22517998136852480L;
		data[33]=8796093022208L;
		data[34]=281474976710656L;
		data[37]=8796093022208L;
		data[38]=1152921504606855168L;
		data[39]=292734250661184000L;
		return data;
	}
	public static final BitSet _tokenSet_22 = new BitSet(mk_tokenSet_22());
	private static final long[] mk_tokenSet_23() {
		long[] data = new long[48];
		data[9]=36037593111986176L;
		data[10]=1048576L;
		data[12]=2305843009213693952L;
		return data;
	}
	public static final BitSet _tokenSet_23 = new BitSet(mk_tokenSet_23());
	private static final long[] mk_tokenSet_24() {
		long[] data = new long[120];
		data[0]=320L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789014126592L;
		return data;
	}
	public static final BitSet _tokenSet_24 = new BitSet(mk_tokenSet_24());
	private static final long[] mk_tokenSet_25() {
		long[] data = new long[94];
		data[0]=16L;
		data[46]=872415232L;
		return data;
	}
	public static final BitSet _tokenSet_25 = new BitSet(mk_tokenSet_25());
	private static final long[] mk_tokenSet_26() {
		long[] data = new long[94];
		data[0]=16L;
		data[46]=335544320L;
		return data;
	}
	public static final BitSet _tokenSet_26 = new BitSet(mk_tokenSet_26());
	private static final long[] mk_tokenSet_27() {
		long[] data = new long[120];
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_27 = new BitSet(mk_tokenSet_27());
	private static final long[] mk_tokenSet_28() {
		long[] data = new long[188];
		data[0]=-16L;
		for (int i = 1; i<=46; i++) { data[i]=-1L; }
		data[47]=31L;
		return data;
	}
	public static final BitSet _tokenSet_28 = new BitSet(mk_tokenSet_28());
	private static final long[] mk_tokenSet_29() {
		long[] data = new long[94];
		data[46]=1342177280L;
		return data;
	}
	public static final BitSet _tokenSet_29 = new BitSet(mk_tokenSet_29());
	private static final long[] mk_tokenSet_30() {
		long[] data = new long[96];
		data[0]=-32L;
		for (int i = 1; i<=45; i++) { data[i]=-1L; }
		data[46]=-17592186044417L;
		data[47]=31L;
		return data;
	}
	public static final BitSet _tokenSet_30 = new BitSet(mk_tokenSet_30());
	private static final long[] mk_tokenSet_31() {
		long[] data = new long[94];
		data[0]=16L;
		data[11]=1L;
		data[33]=4L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_31 = new BitSet(mk_tokenSet_31());
	private static final long[] mk_tokenSet_32() {
		long[] data = new long[94];
		data[0]=16L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_32 = new BitSet(mk_tokenSet_32());
	private static final long[] mk_tokenSet_33() {
		long[] data = new long[94];
		data[0]=16L;
		data[11]=1L;
		data[12]=268435456L;
		data[17]=4294967296L;
		data[31]=144115188075855872L;
		data[32]=67108864L;
		data[33]=4L;
		data[37]=4398046511104L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_33 = new BitSet(mk_tokenSet_33());
	private static final long[] mk_tokenSet_34() {
		long[] data = new long[94];
		data[0]=16L;
		data[14]=9007199254740992L;
		data[22]=64L;
		data[25]=1116691496960L;
		data[35]=576460752303423488L;
		data[39]=268435456L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_34 = new BitSet(mk_tokenSet_34());
	private static final long[] mk_tokenSet_35() {
		long[] data = new long[120];
		data[0]=336L;
		data[3]=49152L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_35 = new BitSet(mk_tokenSet_35());
	private static final long[] mk_tokenSet_36() {
		long[] data = new long[48];
		data[0]=16L;
		return data;
	}
	public static final BitSet _tokenSet_36 = new BitSet(mk_tokenSet_36());
	private static final long[] mk_tokenSet_37() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=1097728L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=26388815937536L;
		return data;
	}
	public static final BitSet _tokenSet_37 = new BitSet(mk_tokenSet_37());
	private static final long[] mk_tokenSet_38() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=1097856L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=26388815937536L;
		return data;
	}
	public static final BitSet _tokenSet_38 = new BitSet(mk_tokenSet_38());
	private static final long[] mk_tokenSet_39() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=49280L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_39 = new BitSet(mk_tokenSet_39());
	private static final long[] mk_tokenSet_40() {
		long[] data = new long[120];
		data[0]=336L;
		data[3]=49280L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17595004616704L;
		return data;
	}
	public static final BitSet _tokenSet_40 = new BitSet(mk_tokenSet_40());
	private static final long[] mk_tokenSet_41() {
		long[] data = new long[120];
		data[0]=129362L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30807410343936L;
		return data;
	}
	public static final BitSet _tokenSet_41 = new BitSet(mk_tokenSet_41());
	private static final long[] mk_tokenSet_42() {
		long[] data = new long[94];
		data[0]=16L;
		data[11]=8589934593L;
		data[21]=2251799813685248L;
		data[22]=140737488355328L;
		data[33]=4L;
		data[46]=671088640L;
		return data;
	}
	public static final BitSet _tokenSet_42 = new BitSet(mk_tokenSet_42());
	private static final long[] mk_tokenSet_43() {
		long[] data = new long[94];
		data[0]=16L;
		data[3]=128L;
		data[11]=8589934593L;
		data[21]=2251799813685248L;
		data[22]=140737488355328L;
		data[33]=4L;
		data[46]=671088640L;
		return data;
	}
	public static final BitSet _tokenSet_43 = new BitSet(mk_tokenSet_43());
	private static final long[] mk_tokenSet_44() {
		long[] data = new long[48];
		data[11]=1L;
		return data;
	}
	public static final BitSet _tokenSet_44 = new BitSet(mk_tokenSet_44());
	private static final long[] mk_tokenSet_45() {
		long[] data = new long[120];
		data[10]=1048576L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_45 = new BitSet(mk_tokenSet_45());
	private static final long[] mk_tokenSet_46() {
		long[] data = new long[120];
		data[0]=129088L;
		data[10]=1048576L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_46 = new BitSet(mk_tokenSet_46());
	private static final long[] mk_tokenSet_47() {
		long[] data = new long[82];
		data[8]=576460752303423488L;
		data[10]=524288L;
		data[14]=72057594037927936L;
		data[16]=8388608L;
		data[18]=34359929856L;
		data[19]=549755813888L;
		data[21]=18014398509481984L;
		data[26]=532575944704L;
		data[29]=2251799813685248L;
		data[32]=34359738368L;
		data[34]=562949953421312L;
		data[40]=2L;
		return data;
	}
	public static final BitSet _tokenSet_47 = new BitSet(mk_tokenSet_47());
	private static final long[] mk_tokenSet_48() {
		long[] data = new long[76];
		data[11]=67108864L;
		data[13]=1125899906842624L;
		data[28]=2097152L;
		data[35]=2L;
		data[37]=576460752303423488L;
		return data;
	}
	public static final BitSet _tokenSet_48 = new BitSet(mk_tokenSet_48());
	private static final long[] mk_tokenSet_49() {
		long[] data = new long[120];
		data[0]=129344L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458764237731528448L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_49 = new BitSet(mk_tokenSet_49());
	private static final long[] mk_tokenSet_50() {
		long[] data = new long[120];
		data[10]=64L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_50 = new BitSet(mk_tokenSet_50());
	private static final long[] mk_tokenSet_51() {
		long[] data = new long[120];
		data[8]=648799821322256384L;
		data[9]=134217728L;
		data[10]=576460752308142080L;
		data[11]=576460752370794496L;
		data[14]=-1125897759358976L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=52776558133248L;
		return data;
	}
	public static final BitSet _tokenSet_51 = new BitSet(mk_tokenSet_51());
	private static final long[] mk_tokenSet_52() {
		long[] data = new long[120];
		data[0]=129344L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=65973419769856L;
		return data;
	}
	public static final BitSet _tokenSet_52 = new BitSet(mk_tokenSet_52());
	private static final long[] mk_tokenSet_53() {
		long[] data = new long[120];
		data[0]=320L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_53 = new BitSet(mk_tokenSet_53());
	private static final long[] mk_tokenSet_54() {
		long[] data = new long[120];
		data[8]=4194304L;
		data[11]=128L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_54 = new BitSet(mk_tokenSet_54());
	private static final long[] mk_tokenSet_55() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964704832925936L;
		data[9]=2319780420788555104L;
		data[10]=2310357483690196101L;
		data[11]=-3169407961672843008L;
		data[12]=126468430181695744L;
		data[13]=-6232886943492016000L;
		data[14]=-1121776721460708L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30788506615808L;
		return data;
	}
	public static final BitSet _tokenSet_55 = new BitSet(mk_tokenSet_55());
	private static final long[] mk_tokenSet_56() {
		long[] data = new long[78];
		data[14]=1L;
		data[18]=16777216L;
		data[20]=288230376151711744L;
		data[22]=2L;
		data[33]=1099511627776L;
		data[35]=4503599627370496L;
		data[37]=8L;
		data[38]=562949953421312L;
		return data;
	}
	public static final BitSet _tokenSet_56 = new BitSet(mk_tokenSet_56());
	private static final long[] mk_tokenSet_57() {
		long[] data = new long[78];
		data[9]=140737488357376L;
		data[13]=2305843009213693952L;
		data[38]=131072L;
		return data;
	}
	public static final BitSet _tokenSet_57 = new BitSet(mk_tokenSet_57());
	private static final long[] mk_tokenSet_58() {
		long[] data = new long[120];
		data[0]=129344L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789014126592L;
		return data;
	}
	public static final BitSet _tokenSet_58 = new BitSet(mk_tokenSet_58());
	private static final long[] mk_tokenSet_59() {
		long[] data = new long[68];
		data[13]=8796093022208L;
		data[23]=8L;
		data[32]=6597069766656L;
		data[33]=1114116L;
		return data;
	}
	public static final BitSet _tokenSet_59 = new BitSet(mk_tokenSet_59());
	private static final long[] mk_tokenSet_60() {
		long[] data = new long[94];
		data[0]=16L;
		data[13]=8796093022208L;
		data[23]=8L;
		data[46]=671088640L;
		return data;
	}
	public static final BitSet _tokenSet_60 = new BitSet(mk_tokenSet_60());
	private static final long[] mk_tokenSet_61() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=49152L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17595944140800L;
		return data;
	}
	public static final BitSet _tokenSet_61 = new BitSet(mk_tokenSet_61());
	private static final long[] mk_tokenSet_62() {
		long[] data = new long[52];
		data[25]=566231040L;
		return data;
	}
	public static final BitSet _tokenSet_62 = new BitSet(mk_tokenSet_62());
	private static final long[] mk_tokenSet_63() {
		long[] data = new long[52];
		data[21]=648518346341351424L;
		data[25]=469762048L;
		return data;
	}
	public static final BitSet _tokenSet_63 = new BitSet(mk_tokenSet_63());
	private static final long[] mk_tokenSet_64() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458764237731528448L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_64 = new BitSet(mk_tokenSet_64());
	private static final long[] mk_tokenSet_65() {
		long[] data = new long[94];
		data[3]=4177920L;
		data[8]=4294967296L;
		data[9]=4398046511104L;
		data[10]=2305844246164339713L;
		data[11]=289356276058685440L;
		data[12]=108086399646826496L;
		data[13]=88064546076672L;
		data[14]=4123168604160L;
		data[46]=13196287016960L;
		return data;
	}
	public static final BitSet _tokenSet_65 = new BitSet(mk_tokenSet_65());
	private static final long[] mk_tokenSet_66() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537991408L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458764237731528448L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_66 = new BitSet(mk_tokenSet_66());
	private static final long[] mk_tokenSet_67() {
		long[] data = new long[82];
		data[13]=8589934656L;
		data[40]=112L;
		return data;
	}
	public static final BitSet _tokenSet_67 = new BitSet(mk_tokenSet_67());
	private static final long[] mk_tokenSet_68() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458764237731528448L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17593259786240L;
		return data;
	}
	public static final BitSet _tokenSet_68 = new BitSet(mk_tokenSet_68());
	private static final long[] mk_tokenSet_69() {
		long[] data = new long[78];
		data[9]=140737488357632L;
		data[10]=8388608L;
		data[12]=281474976710656L;
		data[13]=2413929400270585856L;
		data[16]=3377699720527872L;
		data[19]=134217728L;
		data[28]=2359296L;
		data[37]=576460752303423488L;
		data[38]=67239936L;
		return data;
	}
	public static final BitSet _tokenSet_69 = new BitSet(mk_tokenSet_69());
	private static final long[] mk_tokenSet_70() {
		long[] data = new long[74];
		data[9]=13510798882111488L;
		data[12]=70368744701952L;
		data[19]=16384L;
		data[20]=35184372088832L;
		data[22]=4294967296L;
		data[33]=8581545984L;
		data[36]=35321811107840L;
		return data;
	}
	public static final BitSet _tokenSet_70 = new BitSet(mk_tokenSet_70());
	private static final long[] mk_tokenSet_71() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2306124486371574880L;
		data[10]=4513237517467780L;
		data[11]=-3458764237731528448L;
		data[12]=18030186813456640L;
		data[13]=-8646904408308678528L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_71 = new BitSet(mk_tokenSet_71());
	private static final long[] mk_tokenSet_72() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458764237731528448L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17593528221696L;
		return data;
	}
	public static final BitSet _tokenSet_72 = new BitSet(mk_tokenSet_72());
	private static final long[] mk_tokenSet_73() {
		long[] data = new long[82];
		data[8]=576460752303423488L;
		data[18]=263168L;
		data[34]=144678138029277184L;
		data[40]=13651605089943552L;
		return data;
	}
	public static final BitSet _tokenSet_73 = new BitSet(mk_tokenSet_73());
	private static final long[] mk_tokenSet_74() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=1114112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458764237731528448L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=26388279066624L;
		return data;
	}
	public static final BitSet _tokenSet_74 = new BitSet(mk_tokenSet_74());
	private static final long[] mk_tokenSet_75() {
		long[] data = new long[94];
		data[16]=24L;
		data[18]=2251799813685248L;
		data[27]=-9223372036854775808L;
		data[29]=16777216L;
		data[37]=7421932185906577408L;
		data[38]=72057594037927940L;
		data[46]=1073741824L;
		return data;
	}
	public static final BitSet _tokenSet_75 = new BitSet(mk_tokenSet_75());
	private static final long[] mk_tokenSet_76() {
		long[] data = new long[94];
		data[3]=1114112L;
		data[8]=576460752303423488L;
		data[18]=263168L;
		data[34]=144678138029277184L;
		data[40]=13651605089943552L;
		data[46]=8796093022208L;
		return data;
	}
	public static final BitSet _tokenSet_76 = new BitSet(mk_tokenSet_76());
	private static final long[] mk_tokenSet_77() {
		long[] data = new long[120];
		data[0]=129360L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789014126592L;
		return data;
	}
	public static final BitSet _tokenSet_77 = new BitSet(mk_tokenSet_77());
	private static final long[] mk_tokenSet_78() {
		long[] data = new long[78];
		data[16]=24L;
		data[18]=2251799813685248L;
		data[27]=-9223372036854775808L;
		data[29]=16777216L;
		data[37]=7421932185906577408L;
		data[38]=72057594037927940L;
		return data;
	}
	public static final BitSet _tokenSet_78 = new BitSet(mk_tokenSet_78());
	private static final long[] mk_tokenSet_79() {
		long[] data = new long[120];
		data[0]=320L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30790087868416L;
		return data;
	}
	public static final BitSet _tokenSet_79 = new BitSet(mk_tokenSet_79());
	private static final long[] mk_tokenSet_80() {
		long[] data = new long[120];
		data[0]=320L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30790356303872L;
		return data;
	}
	public static final BitSet _tokenSet_80 = new BitSet(mk_tokenSet_80());
	private static final long[] mk_tokenSet_81() {
		long[] data = new long[120];
		data[0]=129344L;
		data[3]=49152L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17594333528064L;
		return data;
	}
	public static final BitSet _tokenSet_81 = new BitSet(mk_tokenSet_81());
	private static final long[] mk_tokenSet_82() {
		long[] data = new long[120];
		data[0]=129360L;
		data[2]=536870912L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30806193995776L;
		return data;
	}
	public static final BitSet _tokenSet_82 = new BitSet(mk_tokenSet_82());
	private static final long[] mk_tokenSet_83() {
		long[] data = new long[188];
		data[0]=-16L;
		for (int i = 1; i<=45; i++) { data[i]=-1L; }
		data[46]=-1073741825L;
		data[47]=31L;
		return data;
	}
	public static final BitSet _tokenSet_83 = new BitSet(mk_tokenSet_83());
	private static final long[] mk_tokenSet_84() {
		long[] data = new long[120];
		data[0]=129360L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30806193995776L;
		return data;
	}
	public static final BitSet _tokenSet_84 = new BitSet(mk_tokenSet_84());
	private static final long[] mk_tokenSet_85() {
		long[] data = new long[120];
		data[0]=320L;
		data[2]=536870912L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789014126592L;
		return data;
	}
	public static final BitSet _tokenSet_85 = new BitSet(mk_tokenSet_85());
	private static final long[] mk_tokenSet_86() {
		long[] data = new long[120];
		data[0]=129360L;
		data[2]=536870912L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=65990574473216L;
		return data;
	}
	public static final BitSet _tokenSet_86 = new BitSet(mk_tokenSet_86());
	private static final long[] mk_tokenSet_87() {
		long[] data = new long[120];
		data[0]=320L;
		data[2]=536870912L;
		data[3]=206158479360L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-246290705285353L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17594333528064L;
		return data;
	}
	public static final BitSet _tokenSet_87 = new BitSet(mk_tokenSet_87());
	private static final long[] mk_tokenSet_88() {
		long[] data = new long[120];
		data[0]=320L;
		data[2]=536870912L;
		data[3]=49152L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_88 = new BitSet(mk_tokenSet_88());
	private static final long[] mk_tokenSet_89() {
		long[] data = new long[120];
		data[3]=206158430208L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17594333528064L;
		return data;
	}
	public static final BitSet _tokenSet_89 = new BitSet(mk_tokenSet_89());
	private static final long[] mk_tokenSet_90() {
		long[] data = new long[120];
		data[7]=35184271425280L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_90 = new BitSet(mk_tokenSet_90());
	private static final long[] mk_tokenSet_91() {
		long[] data = new long[48];
		data[0]=16L;
		data[11]=17592186044416L;
		data[14]=4398046511104L;
		return data;
	}
	public static final BitSet _tokenSet_91 = new BitSet(mk_tokenSet_91());
	private static final long[] mk_tokenSet_92() {
		long[] data = new long[94];
		data[0]=16L;
		data[8]=792633810473713664L;
		data[9]=274894684160L;
		data[10]=576460752308142080L;
		data[11]=285873090592768L;
		data[12]=33554432L;
		data[14]=72062011411791936L;
		data[16]=8388608L;
		data[18]=34359929856L;
		data[19]=549755813888L;
		data[21]=18014398509481984L;
		data[26]=532575944704L;
		data[29]=2251799813685248L;
		data[30]=2305843009213693952L;
		data[32]=34359738368L;
		data[34]=562949953421312L;
		data[39]=274877906944L;
		data[40]=2L;
		data[46]=35184380477440L;
		return data;
	}
	public static final BitSet _tokenSet_92 = new BitSet(mk_tokenSet_92());
	private static final long[] mk_tokenSet_93() {
		long[] data = new long[120];
		data[0]=129362L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=65990708690944L;
		return data;
	}
	public static final BitSet _tokenSet_93 = new BitSet(mk_tokenSet_93());
	private static final long[] mk_tokenSet_94() {
		long[] data = new long[120];
		data[0]=336L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1783425457136349424L;
		data[9]=2319780420788555104L;
		data[10]=2310357483694914693L;
		data[11]=-3169407961672843007L;
		data[12]=126468430181695744L;
		data[13]=-6222753844330432384L;
		data[14]=-1117376527465955L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30788473061376L;
		return data;
	}
	public static final BitSet _tokenSet_94 = new BitSet(mk_tokenSet_94());
	private static final long[] mk_tokenSet_95() {
		long[] data = new long[120];
		data[0]=336L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964704832925936L;
		data[9]=2319780420788555104L;
		data[10]=2310357483690196101L;
		data[11]=-3169407961672843007L;
		data[12]=126468430181695744L;
		data[13]=-6222753844330432384L;
		data[14]=-1117378674949603L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30788473061376L;
		return data;
	}
	public static final BitSet _tokenSet_95 = new BitSet(mk_tokenSet_95());
	private static final long[] mk_tokenSet_96() {
		long[] data = new long[96];
		data[0]=-288L;
		for (int i = 1; i<=46; i++) { data[i]=-1L; }
		data[47]=31L;
		return data;
	}
	public static final BitSet _tokenSet_96 = new BitSet(mk_tokenSet_96());
	private static final long[] mk_tokenSet_97() {
		long[] data = new long[120];
		data[0]=336L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458764237731528448L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1121501843553764L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_97 = new BitSet(mk_tokenSet_97());
	private static final long[] mk_tokenSet_98() {
		long[] data = new long[120];
		data[0]=336L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1999598511011672304L;
		data[9]=2319776297636728160L;
		data[10]=580973989833998468L;
		data[11]=-3458478364640935680L;
		data[12]=18382030568423680L;
		data[13]=-6232975008038092672L;
		data[14]=-1121482516200868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=52776566521856L;
		return data;
	}
	public static final BitSet _tokenSet_98 = new BitSet(mk_tokenSet_98());
	private static final long[] mk_tokenSet_99() {
		long[] data = new long[48];
		data[0]=16L;
		data[14]=4398046511104L;
		return data;
	}
	public static final BitSet _tokenSet_99 = new BitSet(mk_tokenSet_99());
	private static final long[] mk_tokenSet_100() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964704832925936L;
		data[9]=2319780420788555104L;
		data[10]=2310357483690196101L;
		data[11]=-3169407961672843008L;
		data[12]=126468430181695744L;
		data[13]=-6232886943492016000L;
		data[14]=-1121776721460708L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30788473061376L;
		return data;
	}
	public static final BitSet _tokenSet_100 = new BitSet(mk_tokenSet_100());
	private static final long[] mk_tokenSet_101() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789416779776L;
		return data;
	}
	public static final BitSet _tokenSet_101 = new BitSet(mk_tokenSet_101());
	private static final long[] mk_tokenSet_102() {
		long[] data = new long[120];
		data[0]=129088L;
		data[9]=18014398509481984L;
		data[10]=65536L;
		data[11]=524288L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_102 = new BitSet(mk_tokenSet_102());
	private static final long[] mk_tokenSet_103() {
		long[] data = new long[120];
		data[0]=129360L;
		data[2]=536870912L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789416779776L;
		return data;
	}
	public static final BitSet _tokenSet_103 = new BitSet(mk_tokenSet_103());
	private static final long[] mk_tokenSet_104() {
		long[] data = new long[120];
		data[0]=336L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537991408L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458764237731528448L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1121501843553764L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_104 = new BitSet(mk_tokenSet_104());
	private static final long[] mk_tokenSet_105() {
		long[] data = new long[48];
		data[0]=16L;
		data[10]=8L;
		data[11]=17592186044416L;
		data[14]=4398080065536L;
		return data;
	}
	public static final BitSet _tokenSet_105 = new BitSet(mk_tokenSet_105());
	private static final long[] mk_tokenSet_106() {
		long[] data = new long[82];
		data[8]=576460752303423488L;
		data[10]=524288L;
		data[12]=4L;
		data[14]=72057594037927936L;
		data[16]=8388608L;
		data[18]=34359929856L;
		data[19]=549755813888L;
		data[21]=18014398509481984L;
		data[26]=532575944704L;
		data[29]=2251799813685248L;
		data[32]=34359738368L;
		data[34]=562949953421312L;
		data[40]=2L;
		return data;
	}
	public static final BitSet _tokenSet_106 = new BitSet(mk_tokenSet_106());
	private static final long[] mk_tokenSet_107() {
		long[] data = new long[48];
		data[12]=1649267441664L;
		data[13]=8796093022208L;
		data[14]=4194304L;
		return data;
	}
	public static final BitSet _tokenSet_107 = new BitSet(mk_tokenSet_107());
	private static final long[] mk_tokenSet_108() {
		long[] data = new long[120];
		data[3]=192L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=34659979231232L;
		return data;
	}
	public static final BitSet _tokenSet_108 = new BitSet(mk_tokenSet_108());
	private static final long[] mk_tokenSet_109() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=34660247666688L;
		return data;
	}
	public static final BitSet _tokenSet_109 = new BitSet(mk_tokenSet_109());
	private static final long[] mk_tokenSet_110() {
		long[] data = new long[48];
		data[8]=65536L;
		data[9]=70377602547714L;
		data[10]=9007199254741024L;
		for (int i = 11; i<=12; i++) { data[i]=32L; }
		data[13]=1099511628800L;
		data[14]=4194304L;
		data[17]=-9223372036854775808L;
		return data;
	}
	public static final BitSet _tokenSet_110 = new BitSet(mk_tokenSet_110());
	private static final long[] mk_tokenSet_111() {
		long[] data = new long[120];
		data[0]=129344L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30793309093888L;
		return data;
	}
	public static final BitSet _tokenSet_111 = new BitSet(mk_tokenSet_111());
	private static final long[] mk_tokenSet_112() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30790087868416L;
		return data;
	}
	public static final BitSet _tokenSet_112 = new BitSet(mk_tokenSet_112());
	private static final long[] mk_tokenSet_113() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789014126592L;
		return data;
	}
	public static final BitSet _tokenSet_113 = new BitSet(mk_tokenSet_113());
	private static final long[] mk_tokenSet_114() {
		long[] data = new long[94];
		data[11]=17592186044416L;
		data[13]=131072L;
		data[18]=134217728L;
		data[21]=562949953421312L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_114 = new BitSet(mk_tokenSet_114());
	private static final long[] mk_tokenSet_115() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2896236775045467488L;
		data[10]=4513237525856388L;
		data[11]=-3458746645545484032L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125882710195684L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592320262144L;
		return data;
	}
	public static final BitSet _tokenSet_115 = new BitSet(mk_tokenSet_115());
	private static final long[] mk_tokenSet_116() {
		long[] data = new long[76];
		for (int i = 8; i<=9; i++) { data[i]=67108864L; }
		data[11]=21990500990976L;
		data[12]=1073741824L;
		data[13]=144115188075986944L;
		data[14]=457396904263680L;
		data[22]=4611686018427387904L;
		data[26]=4398046511104L;
		data[29]=2147483648L;
		data[31]=108086391056891904L;
		data[37]=4503599627370496L;
		return data;
	}
	public static final BitSet _tokenSet_116 = new BitSet(mk_tokenSet_116());
	private static final long[] mk_tokenSet_117() {
		long[] data = new long[94];
		data[0]=16L;
		data[8]=16777216L;
		data[11]=17592186044417L;
		data[14]=2048L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_117 = new BitSet(mk_tokenSet_117());
	private static final long[] mk_tokenSet_118() {
		long[] data = new long[94];
		data[0]=16L;
		data[8]=16777216L;
		data[11]=17592186044416L;
		data[14]=2048L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_118 = new BitSet(mk_tokenSet_118());
	private static final long[] mk_tokenSet_119() {
		long[] data = new long[120];
		data[0]=129360L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=65973394604032L;
		return data;
	}
	public static final BitSet _tokenSet_119 = new BitSet(mk_tokenSet_119());
	private static final long[] mk_tokenSet_120() {
		long[] data = new long[120];
		data[0]=129360L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=65974468345856L;
		return data;
	}
	public static final BitSet _tokenSet_120 = new BitSet(mk_tokenSet_120());
	private static final long[] mk_tokenSet_121() {
		long[] data = new long[120];
		data[0]=336L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964704832958704L;
		data[9]=2319780420788555104L;
		data[10]=2310357483690196101L;
		data[11]=-3169407961672843007L;
		data[12]=126468430181695744L;
		data[13]=-6222753844330432384L;
		data[14]=-1117378674949603L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30788473061376L;
		return data;
	}
	public static final BitSet _tokenSet_121 = new BitSet(mk_tokenSet_121());
	private static final long[] mk_tokenSet_122() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964704832925936L;
		data[9]=2319780420788555104L;
		data[10]=2310357483690196101L;
		data[11]=-3169407961672843008L;
		data[12]=126468430181695744L;
		data[13]=-6222753844330432384L;
		data[14]=-1121776721460707L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30788473061376L;
		return data;
	}
	public static final BitSet _tokenSet_122 = new BitSet(mk_tokenSet_122());
	private static final long[] mk_tokenSet_123() {
		long[] data = new long[120];
		data[0]=336L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537991408L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856452L;
		data[11]=-3449756901037833975L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_123 = new BitSet(mk_tokenSet_123());
	private static final long[] mk_tokenSet_124() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856452L;
		data[11]=-3458764237731528440L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_124 = new BitSet(mk_tokenSet_124());
	private static final long[] mk_tokenSet_125() {
		long[] data = new long[120];
		data[0]=129360L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776039921913184L;
		data[10]=4513237525856388L;
		data[11]=-3458183695592062720L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899889540580L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17609365913600L;
		return data;
	}
	public static final BitSet _tokenSet_125 = new BitSet(mk_tokenSet_125());
	private static final long[] mk_tokenSet_126() {
		long[] data = new long[120];
		data[0]=129360L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776039921913184L;
		data[10]=4513237525856388L;
		data[11]=-3458183695592062720L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17609365913600L;
		return data;
	}
	public static final BitSet _tokenSet_126 = new BitSet(mk_tokenSet_126());
	private static final long[] mk_tokenSet_127() {
		long[] data = new long[120];
		data[0]=129360L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458183695592062720L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17609365913600L;
		return data;
	}
	public static final BitSet _tokenSet_127 = new BitSet(mk_tokenSet_127());
	private static final long[] mk_tokenSet_128() {
		long[] data = new long[48];
		data[0]=16L;
		data[10]=8L;
		data[11]=580542139465728L;
		return data;
	}
	public static final BitSet _tokenSet_128 = new BitSet(mk_tokenSet_128());
	private static final long[] mk_tokenSet_129() {
		long[] data = new long[120];
		data[0]=336L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458183695592062720L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17609365913600L;
		return data;
	}
	public static final BitSet _tokenSet_129 = new BitSet(mk_tokenSet_129());
	private static final long[] mk_tokenSet_130() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513254705725572L;
		data[11]=-3458764237731528448L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064804L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_130 = new BitSet(mk_tokenSet_130());
	private static final long[] mk_tokenSet_131() {
		long[] data = new long[78];
		data[10]=17179869184L;
		data[14]=64L;
		data[17]=-9223372036854775808L;
		data[38]=274877906944L;
		return data;
	}
	public static final BitSet _tokenSet_131 = new BitSet(mk_tokenSet_131());
	private static final long[] mk_tokenSet_132() {
		long[] data = new long[48];
		data[8]=16777216L;
		data[9]=8589934594L;
		data[10]=512L;
		data[14]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_132 = new BitSet(mk_tokenSet_132());
	private static final long[] mk_tokenSet_133() {
		long[] data = new long[94];
		data[8]=9007267974217728L;
		data[9]=576495936675512320L;
		data[10]=576460752303424000L;
		data[11]=549755813888L;
		data[12]=35184372088832L;
		data[13]=256L;
		data[14]=2251799815782400L;
		data[15]=34359738368L;
		data[16]=567348536803968L;
		data[17]=-9223363240761622528L;
		data[18]=140737756790784L;
		data[19]=-4323455642245660672L;
		data[20]=1729382256910274604L;
		data[21]=8796262957056L;
		data[22]=24576L;
		data[23]=8L;
		data[24]=4611686024869838848L;
		data[25]=1116892707587883008L;
		data[26]=360287970189639680L;
		data[27]=4503599627370496L;
		data[29]=144115188075855872L;
		data[30]=84672512L;
		data[31]=38280596832649216L;
		data[32]=162130067755898624L;
		data[33]=4503599627370496L;
		data[34]=343614178304L;
		data[35]=77594640L;
		data[36]=128L;
		data[37]=43980465111040L;
		data[38]=9007199254773760L;
		data[39]=128L;
		data[46]=2147483648L;
		return data;
	}
	public static final BitSet _tokenSet_133 = new BitSet(mk_tokenSet_133());
	private static final long[] mk_tokenSet_134() {
		long[] data = new long[120];
		data[0]=129362L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=34660113448960L;
		return data;
	}
	public static final BitSet _tokenSet_134 = new BitSet(mk_tokenSet_134());
	private static final long[] mk_tokenSet_135() {
		long[] data = new long[48];
		data[0]=16L;
		data[8]=17179869184L;
		data[11]=4503737066323969L;
		return data;
	}
	public static final BitSet _tokenSet_135 = new BitSet(mk_tokenSet_135());
	private static final long[] mk_tokenSet_136() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=545259520L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789014126592L;
		return data;
	}
	public static final BitSet _tokenSet_136 = new BitSet(mk_tokenSet_136());
	private static final long[] mk_tokenSet_137() {
		long[] data = new long[84];
		data[12]=268435456L;
		data[13]=562949953421312L;
		data[36]=-9223372036854775808L;
		data[41]=4L;
		return data;
	}
	public static final BitSet _tokenSet_137 = new BitSet(mk_tokenSet_137());
	private static final long[] mk_tokenSet_138() {
		long[] data = new long[48];
		data[11]=1099528404992L;
		data[13]=384L;
		return data;
	}
	public static final BitSet _tokenSet_138 = new BitSet(mk_tokenSet_138());
	private static final long[] mk_tokenSet_139() {
		long[] data = new long[120];
		data[0]=336L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856452L;
		data[11]=-3458764237731528439L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_139 = new BitSet(mk_tokenSet_139());
	private static final long[] mk_tokenSet_140() {
		long[] data = new long[120];
		data[0]=16L;
		data[3]=192L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=34659979231232L;
		return data;
	}
	public static final BitSet _tokenSet_140 = new BitSet(mk_tokenSet_140());
	private static final long[] mk_tokenSet_141() {
		long[] data = new long[120];
		data[0]=129362L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=34660381884416L;
		return data;
	}
	public static final BitSet _tokenSet_141 = new BitSet(mk_tokenSet_141());
	private static final long[] mk_tokenSet_142() {
		long[] data = new long[120];
		data[3]=192L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=34660247666688L;
		return data;
	}
	public static final BitSet _tokenSet_142 = new BitSet(mk_tokenSet_142());
	private static final long[] mk_tokenSet_143() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=192L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=34660247666688L;
		return data;
	}
	public static final BitSet _tokenSet_143 = new BitSet(mk_tokenSet_143());
	private static final long[] mk_tokenSet_144() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789148344320L;
		return data;
	}
	public static final BitSet _tokenSet_144 = new BitSet(mk_tokenSet_144());
	private static final long[] mk_tokenSet_145() {
		long[] data = new long[76];
		data[12]=4503599627370496L;
		data[21]=136314880L;
		data[37]=8796093022208L;
		return data;
	}
	public static final BitSet _tokenSet_145 = new BitSet(mk_tokenSet_145());
	private static final long[] mk_tokenSet_146() {
		long[] data = new long[94];
		data[15]=8796093022208L;
		data[16]=134217728L;
		data[17]=4096L;
		data[19]=70368744177664L;
		data[24]=2305843009213693952L;
		data[25]=524288L;
		data[26]=67108864L;
		data[27]=70368744177664L;
		data[30]=344543118298710016L;
		data[31]=1125899906842624L;
		data[34]=8589934592L;
		data[35]=144115188075855872L;
		data[46]=1073741824L;
		return data;
	}
	public static final BitSet _tokenSet_146 = new BitSet(mk_tokenSet_146());
	private static final long[] mk_tokenSet_147() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789148344320L;
		return data;
	}
	public static final BitSet _tokenSet_147 = new BitSet(mk_tokenSet_147());
	private static final long[] mk_tokenSet_148() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30790490521600L;
		return data;
	}
	public static final BitSet _tokenSet_148 = new BitSet(mk_tokenSet_148());
	private static final long[] mk_tokenSet_149() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30790490521600L;
		return data;
	}
	public static final BitSet _tokenSet_149 = new BitSet(mk_tokenSet_149());
	private static final long[] mk_tokenSet_150() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458764237731528440L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_150 = new BitSet(mk_tokenSet_150());
	private static final long[] mk_tokenSet_151() {
		long[] data = new long[120];
		data[0]=64L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_151 = new BitSet(mk_tokenSet_151());
	private static final long[] mk_tokenSet_152() {
		long[] data = new long[120];
		data[0]=320L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30793309093888L;
		return data;
	}
	public static final BitSet _tokenSet_152 = new BitSet(mk_tokenSet_152());
	private static final long[] mk_tokenSet_153() {
		long[] data = new long[64];
		data[0]=16L;
		data[10]=1048576L;
		data[14]=32768L;
		data[31]=562949953421312L;
		return data;
	}
	public static final BitSet _tokenSet_153 = new BitSet(mk_tokenSet_153());
	private static final long[] mk_tokenSet_154() {
		long[] data = new long[76];
		data[17]=34359738368L;
		data[19]=1125904201809920L;
		data[20]=68719476736L;
		data[22]=68719476736L;
		data[26]=2L;
		data[27]=17592186044416L;
		data[31]=17179869184L;
		data[33]=35184372088832L;
		data[37]=64L;
		return data;
	}
	public static final BitSet _tokenSet_154 = new BitSet(mk_tokenSet_154());
	private static final long[] mk_tokenSet_155() {
		long[] data = new long[48];
		data[0]=16L;
		data[8]=72339069014638592L;
		data[9]=536870912L;
		data[10]=4194304L;
		data[11]=576460752303685632L;
		return data;
	}
	public static final BitSet _tokenSet_155 = new BitSet(mk_tokenSet_155());
	private static final long[] mk_tokenSet_156() {
		long[] data = new long[48];
		data[8]=72339069014638592L;
		data[9]=536870912L;
		data[10]=4194304L;
		data[11]=576460752303685632L;
		return data;
	}
	public static final BitSet _tokenSet_156 = new BitSet(mk_tokenSet_156());
	private static final long[] mk_tokenSet_157() {
		long[] data = new long[120];
		data[0]=80L;
		data[8]=72339069014638592L;
		data[9]=536870912L;
		data[10]=4194304L;
		data[11]=576460752303685632L;
		data[14]=-1125899906777088L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_157 = new BitSet(mk_tokenSet_157());
	private static final long[] mk_tokenSet_158() {
		long[] data = new long[120];
		data[0]=80L;
		data[14]=-1125899906777088L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_158 = new BitSet(mk_tokenSet_158());
	private static final long[] mk_tokenSet_159() {
		long[] data = new long[120];
		data[0]=80L;
		data[8]=4194304L;
		data[14]=-1125899906777088L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_159 = new BitSet(mk_tokenSet_159());
	private static final long[] mk_tokenSet_160() {
		long[] data = new long[94];
		data[0]=16L;
		data[10]=1048576L;
		data[14]=4398046543872L;
		data[31]=562949953421312L;
		data[46]=1073741824L;
		return data;
	}
	public static final BitSet _tokenSet_160 = new BitSet(mk_tokenSet_160());
	private static final long[] mk_tokenSet_161() {
		long[] data = new long[48];
		data[0]=16L;
		data[10]=17179869184L;
		return data;
	}
	public static final BitSet _tokenSet_161 = new BitSet(mk_tokenSet_161());
	private static final long[] mk_tokenSet_162() {
		long[] data = new long[48];
		data[8]=32768L;
		data[9]=8589934592L;
		data[11]=32L;
		data[12]=16L;
		data[13]=1099511627776L;
		data[14]=4194304L;
		return data;
	}
	public static final BitSet _tokenSet_162 = new BitSet(mk_tokenSet_162());
	private static final long[] mk_tokenSet_163() {
		long[] data = new long[48];
		data[10]=17179869184L;
		data[14]=64L;
		return data;
	}
	public static final BitSet _tokenSet_163 = new BitSet(mk_tokenSet_163());
	private static final long[] mk_tokenSet_164() {
		long[] data = new long[48];
		data[13]=1099511627776L;
		data[14]=536870912L;
		return data;
	}
	public static final BitSet _tokenSet_164 = new BitSet(mk_tokenSet_164());
	private static final long[] mk_tokenSet_165() {
		long[] data = new long[48];
		data[10]=17179869184L;
		data[11]=64L;
		return data;
	}
	public static final BitSet _tokenSet_165 = new BitSet(mk_tokenSet_165());
	private static final long[] mk_tokenSet_166() {
		long[] data = new long[94];
		data[0]=16L;
		data[10]=324259173171724288L;
		data[14]=4432406282240L;
		data[31]=562949953421312L;
		data[46]=1342177280L;
		return data;
	}
	public static final BitSet _tokenSet_166 = new BitSet(mk_tokenSet_166());
	private static final long[] mk_tokenSet_167() {
		long[] data = new long[70];
		data[11]=1024L;
		data[25]=1125899906842624L;
		data[26]=72057594037927936L;
		data[34]=68719476736L;
		return data;
	}
	public static final BitSet _tokenSet_167 = new BitSet(mk_tokenSet_167());
	private static final long[] mk_tokenSet_168() {
		long[] data = new long[94];
		data[0]=16L;
		data[10]=324259173171724288L;
		data[14]=4432406282240L;
		data[31]=562949953421312L;
		data[46]=1073741824L;
		return data;
	}
	public static final BitSet _tokenSet_168 = new BitSet(mk_tokenSet_168());
	private static final long[] mk_tokenSet_169() {
		long[] data = new long[48];
		data[0]=16L;
		data[14]=34359738368L;
		return data;
	}
	public static final BitSet _tokenSet_169 = new BitSet(mk_tokenSet_169());
	private static final long[] mk_tokenSet_170() {
		long[] data = new long[94];
		data[0]=16L;
		data[14]=34359738368L;
		data[46]=268435456L;
		return data;
	}
	public static final BitSet _tokenSet_170 = new BitSet(mk_tokenSet_170());
	private static final long[] mk_tokenSet_171() {
		long[] data = new long[94];
		data[0]=16L;
		data[14]=34359738368L;
		data[46]=1342177280L;
		return data;
	}
	public static final BitSet _tokenSet_171 = new BitSet(mk_tokenSet_171());
	private static final long[] mk_tokenSet_172() {
		long[] data = new long[94];
		data[8]=792633810473713664L;
		data[9]=274894684160L;
		data[10]=576460769488011264L;
		data[11]=285873090592832L;
		data[12]=33554432L;
		data[14]=72057613365280832L;
		data[16]=8388608L;
		data[18]=34359929856L;
		data[19]=549755813888L;
		data[21]=18014398509481984L;
		data[26]=532575944704L;
		data[29]=2251799813685248L;
		data[30]=2305843009213693952L;
		data[32]=34359738368L;
		data[34]=562949953421312L;
		data[39]=274877906944L;
		data[40]=2L;
		data[46]=35184648912896L;
		return data;
	}
	public static final BitSet _tokenSet_172 = new BitSet(mk_tokenSet_172());
	private static final long[] mk_tokenSet_173() {
		long[] data = new long[120];
		data[0]=129344L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=65973663039488L;
		return data;
	}
	public static final BitSet _tokenSet_173 = new BitSet(mk_tokenSet_173());
	private static final long[] mk_tokenSet_174() {
		long[] data = new long[94];
		data[10]=17179869184L;
		data[11]=64L;
		data[46]=268435456L;
		return data;
	}
	public static final BitSet _tokenSet_174 = new BitSet(mk_tokenSet_174());
	private static final long[] mk_tokenSet_175() {
		long[] data = new long[94];
		data[0]=16L;
		data[10]=324259173171724288L;
		data[11]=1024L;
		data[12]=16L;
		data[14]=4432406282240L;
		data[25]=1125899906842624L;
		data[26]=72057594037927936L;
		data[31]=562949953421312L;
		data[34]=68719476736L;
		data[46]=1342177280L;
		return data;
	}
	public static final BitSet _tokenSet_175 = new BitSet(mk_tokenSet_175());
	private static final long[] mk_tokenSet_176() {
		long[] data = new long[94];
		data[0]=16L;
		data[10]=324259173171724288L;
		data[11]=1024L;
		data[14]=4432406282240L;
		data[25]=1125899906842624L;
		data[26]=72057594037927936L;
		data[31]=562949953421312L;
		data[46]=1073741824L;
		return data;
	}
	public static final BitSet _tokenSet_176 = new BitSet(mk_tokenSet_176());
	private static final long[] mk_tokenSet_177() {
		long[] data = new long[94];
		data[0]=16L;
		data[10]=17179869184L;
		data[46]=268435456L;
		return data;
	}
	public static final BitSet _tokenSet_177 = new BitSet(mk_tokenSet_177());
	private static final long[] mk_tokenSet_178() {
		long[] data = new long[76];
		data[0]=16L;
		for (int i = 8; i<=9; i++) { data[i]=67108864L; }
		data[11]=21990500990976L;
		data[12]=1073741824L;
		data[13]=144115188075986944L;
		data[14]=457396904263680L;
		data[22]=4611686018427387904L;
		data[26]=4398046511104L;
		data[29]=2147483648L;
		data[31]=108086391056891904L;
		data[37]=4503599627370496L;
		return data;
	}
	public static final BitSet _tokenSet_178 = new BitSet(mk_tokenSet_178());
	private static final long[] mk_tokenSet_179() {
		long[] data = new long[76];
		data[0]=16L;
		for (int i = 8; i<=9; i++) { data[i]=67108864L; }
		data[11]=21990500990976L;
		data[12]=1073741824L;
		data[13]=144115188075986944L;
		data[14]=457396904263680L;
		data[15]=8589934592L;
		data[22]=4611686018427387904L;
		data[26]=4398046511104L;
		data[29]=2147483648L;
		data[31]=108086391056891904L;
		data[32]=10240L;
		data[37]=4503599627370496L;
		return data;
	}
	public static final BitSet _tokenSet_179 = new BitSet(mk_tokenSet_179());
	private static final long[] mk_tokenSet_180() {
		long[] data = new long[48];
		data[0]=16L;
		data[11]=1L;
		data[14]=4398046511104L;
		return data;
	}
	public static final BitSet _tokenSet_180 = new BitSet(mk_tokenSet_180());
	private static final long[] mk_tokenSet_181() {
		long[] data = new long[120];
		data[0]=336L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1999598515306639600L;
		data[9]=2319780695683239264L;
		data[10]=2886818235998338181L;
		data[11]=-3169122088582250239L;
		data[12]=126468430215250176L;
		data[13]=-6222753844330432384L;
		data[14]=-1117359347596707L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=65973927280640L;
		return data;
	}
	public static final BitSet _tokenSet_181 = new BitSet(mk_tokenSet_181());
	private static final long[] mk_tokenSet_182() {
		long[] data = new long[120];
		data[0]=336L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964704832925936L;
		data[9]=2319780420788555104L;
		data[10]=2310357483690196101L;
		data[11]=-3169407961672843007L;
		data[12]=126468430181695744L;
		data[13]=-6222753844330432384L;
		data[14]=-1117378674949603L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789546803200L;
		return data;
	}
	public static final BitSet _tokenSet_182 = new BitSet(mk_tokenSet_182());
	private static final long[] mk_tokenSet_183() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=65974468345856L;
		return data;
	}
	public static final BitSet _tokenSet_183 = new BitSet(mk_tokenSet_183());
	private static final long[] mk_tokenSet_184() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=65973394604032L;
		return data;
	}
	public static final BitSet _tokenSet_184 = new BitSet(mk_tokenSet_184());
	private static final long[] mk_tokenSet_185() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856388L;
		data[11]=-3458764237731528448L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17609365913600L;
		return data;
	}
	public static final BitSet _tokenSet_185 = new BitSet(mk_tokenSet_185());
	private static final long[] mk_tokenSet_186() {
		long[] data = new long[48];
		data[0]=16L;
		data[11]=580542139465728L;
		return data;
	}
	public static final BitSet _tokenSet_186 = new BitSet(mk_tokenSet_186());
	private static final long[] mk_tokenSet_187() {
		long[] data = new long[48];
		data[0]=16L;
		data[11]=17592186044416L;
		data[14]=64L;
		return data;
	}
	public static final BitSet _tokenSet_187 = new BitSet(mk_tokenSet_187());
	private static final long[] mk_tokenSet_188() {
		long[] data = new long[48];
		data[14]=64L;
		return data;
	}
	public static final BitSet _tokenSet_188 = new BitSet(mk_tokenSet_188());
	private static final long[] mk_tokenSet_189() {
		long[] data = new long[62];
		data[0]=16L;
		data[11]=17592186044416L;
		data[18]=8796093022208L;
		data[30]=2199023255552L;
		return data;
	}
	public static final BitSet _tokenSet_189 = new BitSet(mk_tokenSet_189());
	private static final long[] mk_tokenSet_190() {
		long[] data = new long[80];
		data[0]=16L;
		data[10]=524288L;
		data[11]=2269400589664256L;
		data[15]=8589934592L;
		data[16]=33554432L;
		data[18]=8796093022336L;
		data[20]=281474976710656L;
		data[26]=2199560126464L;
		data[27]=8388608L;
		data[30]=72567767433216L;
		data[31]=1024L;
		data[32]=70368744196096L;
		data[39]=8L;
		return data;
	}
	public static final BitSet _tokenSet_190 = new BitSet(mk_tokenSet_190());
	private static final long[] mk_tokenSet_191() {
		long[] data = new long[76];
		data[0]=16L;
		data[10]=1048576L;
		data[11]=17592186044416L;
		data[14]=64L;
		data[18]=8796093022208L;
		data[30]=2199023255552L;
		data[37]=137438953472L;
		return data;
	}
	public static final BitSet _tokenSet_191 = new BitSet(mk_tokenSet_191());
	private static final long[] mk_tokenSet_192() {
		long[] data = new long[76];
		data[10]=1048576L;
		data[14]=64L;
		data[37]=137438953472L;
		return data;
	}
	public static final BitSet _tokenSet_192 = new BitSet(mk_tokenSet_192());
	private static final long[] mk_tokenSet_193() {
		long[] data = new long[48];
		data[9]=576460752303423488L;
		data[12]=16L;
		return data;
	}
	public static final BitSet _tokenSet_193 = new BitSet(mk_tokenSet_193());
	private static final long[] mk_tokenSet_194() {
		long[] data = new long[120];
		data[14]=-1125899772624896L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_194 = new BitSet(mk_tokenSet_194());
	private static final long[] mk_tokenSet_195() {
		long[] data = new long[48];
		data[12]=2L;
		return data;
	}
	public static final BitSet _tokenSet_195 = new BitSet(mk_tokenSet_195());
	private static final long[] mk_tokenSet_196() {
		long[] data = new long[120];
		data[0]=320L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1206964700537958640L;
		data[9]=2319776022742044000L;
		data[10]=4513237525856452L;
		data[11]=-3458764237731528440L;
		data[12]=18382030534869248L;
		data[13]=-6232975008038092672L;
		data[14]=-1125899890064868L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592454479872L;
		return data;
	}
	public static final BitSet _tokenSet_196 = new BitSet(mk_tokenSet_196());
	private static final long[] mk_tokenSet_197() {
		long[] data = new long[48];
		data[0]=16L;
		data[11]=18141941858304L;
		data[15]=137438953472L;
		data[16]=16384L;
		data[20]=4194304L;
		return data;
	}
	public static final BitSet _tokenSet_197 = new BitSet(mk_tokenSet_197());
	private static final long[] mk_tokenSet_198() {
		long[] data = new long[54];
		data[26]=4294967296L;
		return data;
	}
	public static final BitSet _tokenSet_198 = new BitSet(mk_tokenSet_198());
	private static final long[] mk_tokenSet_199() {
		long[] data = new long[48];
		data[14]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_199 = new BitSet(mk_tokenSet_199());
	private static final long[] mk_tokenSet_200() {
		long[] data = new long[48];
		data[0]=16L;
		data[11]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_200 = new BitSet(mk_tokenSet_200());
	private static final long[] mk_tokenSet_201() {
		long[] data = new long[80];
		data[10]=524288L;
		data[11]=2269400589664256L;
		data[15]=8589934592L;
		data[16]=33554432L;
		data[18]=8796093022336L;
		data[20]=281474976710656L;
		data[26]=2199560126464L;
		data[27]=8388608L;
		data[30]=72567767433216L;
		data[31]=1024L;
		data[32]=70368744196096L;
		data[39]=8L;
		return data;
	}
	public static final BitSet _tokenSet_201 = new BitSet(mk_tokenSet_201());
	private static final long[] mk_tokenSet_202() {
		long[] data = new long[96];
		data[0]=-32L;
		for (int i = 1; i<=13; i++) { data[i]=-1L; }
		data[14]=-134217729L;
		for (int i = 15; i<=45; i++) { data[i]=-1L; }
		data[46]=-2147483649L;
		data[47]=31L;
		return data;
	}
	public static final BitSet _tokenSet_202 = new BitSet(mk_tokenSet_202());
	private static final long[] mk_tokenSet_203() {
		long[] data = new long[66];
		data[10]=524288L;
		data[15]=8589934592L;
		data[18]=128L;
		data[26]=2199560126464L;
		data[31]=1024L;
		data[32]=70368744196096L;
		return data;
	}
	public static final BitSet _tokenSet_203 = new BitSet(mk_tokenSet_203());
	private static final long[] mk_tokenSet_204() {
		long[] data = new long[94];
		data[0]=16L;
		data[3]=4177920L;
		data[8]=4294967296L;
		data[9]=4398046511104L;
		data[10]=2305844246164864001L;
		data[11]=291625676648349696L;
		data[12]=108086399646826496L;
		data[13]=88064546076672L;
		data[14]=4123302821888L;
		data[15]=8589934592L;
		data[16]=33554432L;
		data[18]=8796093022336L;
		data[20]=281474976710656L;
		data[26]=2199560126464L;
		data[27]=8388608L;
		data[30]=72567767433216L;
		data[31]=1024L;
		data[32]=70368744196096L;
		data[39]=8L;
		data[46]=13196287016960L;
		return data;
	}
	public static final BitSet _tokenSet_204 = new BitSet(mk_tokenSet_204());
	private static final long[] mk_tokenSet_205() {
		long[] data = new long[80];
		data[0]=16L;
		data[10]=524288L;
		data[11]=2269400589664256L;
		data[15]=8589934592L;
		data[16]=33554432L;
		data[18]=8796093022336L;
		data[20]=281474976710656L;
		data[26]=2199562223616L;
		data[27]=8388608L;
		data[30]=72567767433216L;
		data[31]=1024L;
		data[32]=70368744196096L;
		data[37]=16777216L;
		data[38]=8388608L;
		data[39]=8L;
		return data;
	}
	public static final BitSet _tokenSet_205 = new BitSet(mk_tokenSet_205());
	private static final long[] mk_tokenSet_206() {
		long[] data = new long[76];
		data[25]=844424930131968L;
		data[37]=7L;
		return data;
	}
	public static final BitSet _tokenSet_206 = new BitSet(mk_tokenSet_206());
	private static final long[] mk_tokenSet_207() {
		long[] data = new long[78];
		data[16]=3298534883328L;
		data[26]=72057594037927936L;
		data[31]=16L;
		data[34]=68719476736L;
		data[38]=4503599627370496L;
		return data;
	}
	public static final BitSet _tokenSet_207 = new BitSet(mk_tokenSet_207());
	private static final long[] mk_tokenSet_208() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30790230474752L;
		return data;
	}
	public static final BitSet _tokenSet_208 = new BitSet(mk_tokenSet_208());
	private static final long[] mk_tokenSet_209() {
		long[] data = new long[80];
		data[17]=256L;
		data[20]=68719476736L;
		data[22]=68719476736L;
		data[27]=140737488355328L;
		data[36]=36028797018963968L;
		data[39]=6144L;
		return data;
	}
	public static final BitSet _tokenSet_209 = new BitSet(mk_tokenSet_209());
	private static final long[] mk_tokenSet_210() {
		long[] data = new long[58];
		data[0]=16L;
		data[8]=9345848836096L;
		data[12]=2251799813685248L;
		data[18]=128L;
		data[25]=1073741824L;
		data[28]=512L;
		return data;
	}
	public static final BitSet _tokenSet_210 = new BitSet(mk_tokenSet_210());
	private static final long[] mk_tokenSet_211() {
		long[] data = new long[70];
		data[0]=16L;
		data[11]=17592186044416L;
		data[34]=1024L;
		return data;
	}
	public static final BitSet _tokenSet_211 = new BitSet(mk_tokenSet_211());
	private static final long[] mk_tokenSet_212() {
		long[] data = new long[94];
		data[0]=16L;
		data[8]=16777216L;
		data[11]=17592186044417L;
		data[14]=2048L;
		data[16]=576460752303423488L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_212 = new BitSet(mk_tokenSet_212());
	private static final long[] mk_tokenSet_213() {
		long[] data = new long[48];
		data[0]=16L;
		data[11]=17592186044417L;
		data[16]=576460752303423488L;
		return data;
	}
	public static final BitSet _tokenSet_213 = new BitSet(mk_tokenSet_213());
	private static final long[] mk_tokenSet_214() {
		long[] data = new long[94];
		data[0]=16L;
		data[8]=281474993487872L;
		data[11]=580542139465728L;
		data[13]=131072L;
		data[16]=33554432L;
		data[18]=134217728L;
		data[21]=562949953421312L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_214 = new BitSet(mk_tokenSet_214());
	private static final long[] mk_tokenSet_215() {
		long[] data = new long[120];
		data[0]=320L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30790154977280L;
		return data;
	}
	public static final BitSet _tokenSet_215 = new BitSet(mk_tokenSet_215());
	private static final long[] mk_tokenSet_216() {
		long[] data = new long[94];
		data[0]=16L;
		data[14]=2048L;
		data[46]=134217728L;
		return data;
	}
	public static final BitSet _tokenSet_216 = new BitSet(mk_tokenSet_216());
	private static final long[] mk_tokenSet_217() {
		long[] data = new long[120];
		data[0]=16L;
		data[7]=35184271425280L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592320262144L;
		return data;
	}
	public static final BitSet _tokenSet_217 = new BitSet(mk_tokenSet_217());
	private static final long[] mk_tokenSet_218() {
		long[] data = new long[48];
		data[0]=16L;
		data[11]=17592186044416L;
		data[14]=16L;
		return data;
	}
	public static final BitSet _tokenSet_218 = new BitSet(mk_tokenSet_218());
	private static final long[] mk_tokenSet_219() {
		long[] data = new long[48];
		data[15]=137438953472L;
		return data;
	}
	public static final BitSet _tokenSet_219 = new BitSet(mk_tokenSet_219());
	private static final long[] mk_tokenSet_220() {
		long[] data = new long[78];
		data[38]=36028797018963968L;
		return data;
	}
	public static final BitSet _tokenSet_220 = new BitSet(mk_tokenSet_220());
	private static final long[] mk_tokenSet_221() {
		long[] data = new long[90];
		data[0]=16L;
		data[11]=1L;
		data[14]=4194336L;
		data[15]=35184908959744L;
		data[19]=72057594037927968L;
		data[22]=8589934624L;
		data[25]=35184372088832L;
		data[26]=2199023255552L;
		data[28]=1024L;
		data[29]=2147483648L;
		data[30]=144L;
		data[31]=1024L;
		data[32]=70368744177664L;
		data[34]=2147483648L;
		data[35]=16L;
		data[39]=16777216L;
		data[44]=8L;
		return data;
	}
	public static final BitSet _tokenSet_221 = new BitSet(mk_tokenSet_221());
	private static final long[] mk_tokenSet_222() {
		long[] data = new long[60];
		data[0]=16L;
		data[11]=1L;
		data[14]=4194304L;
		data[15]=536870912L;
		data[22]=8589934592L;
		data[28]=1024L;
		data[29]=2147483648L;
		return data;
	}
	public static final BitSet _tokenSet_222 = new BitSet(mk_tokenSet_222());
	private static final long[] mk_tokenSet_223() {
		long[] data = new long[90];
		data[0]=16L;
		data[11]=1L;
		data[14]=4194336L;
		data[15]=35184372088832L;
		data[19]=72057594037927968L;
		data[22]=32L;
		data[25]=35184372088832L;
		data[30]=144L;
		data[34]=2147483648L;
		data[35]=16L;
		data[39]=16777216L;
		data[44]=8L;
		return data;
	}
	public static final BitSet _tokenSet_223 = new BitSet(mk_tokenSet_223());
	private static final long[] mk_tokenSet_224() {
		long[] data = new long[90];
		data[0]=16L;
		data[11]=1L;
		data[13]=8796093022208L;
		data[14]=2151677984L;
		data[15]=35184372088832L;
		data[19]=72057594037927968L;
		data[22]=32L;
		data[25]=35184372088832L;
		data[30]=144L;
		data[34]=2147483648L;
		data[35]=16L;
		data[39]=16777216L;
		data[44]=24L;
		return data;
	}
	public static final BitSet _tokenSet_224 = new BitSet(mk_tokenSet_224());
	private static final long[] mk_tokenSet_225() {
		long[] data = new long[90];
		data[0]=16L;
		data[11]=1L;
		data[14]=4194336L;
		data[15]=35184372088832L;
		data[19]=72057594037927968L;
		data[22]=32L;
		data[25]=35184372088832L;
		data[30]=144L;
		data[34]=2147483648L;
		data[35]=16L;
		data[39]=16777216L;
		data[44]=24L;
		return data;
	}
	public static final BitSet _tokenSet_225 = new BitSet(mk_tokenSet_225());
	private static final long[] mk_tokenSet_226() {
		long[] data = new long[66];
		data[0]=16L;
		data[11]=1L;
		data[14]=4194304L;
		data[26]=2199023255552L;
		data[31]=1024L;
		data[32]=70368744177664L;
		return data;
	}
	public static final BitSet _tokenSet_226 = new BitSet(mk_tokenSet_226());
	private static final long[] mk_tokenSet_227() {
		long[] data = new long[94];
		data[0]=16L;
		data[11]=1L;
		data[14]=4194336L;
		data[15]=35184372088832L;
		data[19]=72057594037927968L;
		data[22]=32L;
		data[25]=105553116266496L;
		data[30]=144L;
		data[34]=2147483648L;
		data[35]=16L;
		data[39]=16777216L;
		data[44]=24L;
		data[46]=268435456L;
		return data;
	}
	public static final BitSet _tokenSet_227 = new BitSet(mk_tokenSet_227());
	private static final long[] mk_tokenSet_228() {
		long[] data = new long[74];
		data[10]=576460752303423488L;
		data[12]=4503599627370496L;
		data[15]=134217728L;
		data[18]=347925905408L;
		data[22]=1099511693312L;
		data[24]=36028797018963968L;
		data[26]=4294967296L;
		data[30]=32L;
		data[32]=140737496743936L;
		data[36]=4194304L;
		return data;
	}
	public static final BitSet _tokenSet_228 = new BitSet(mk_tokenSet_228());
	private static final long[] mk_tokenSet_229() {
		long[] data = new long[82];
		data[40]=4503599627370496L;
		return data;
	}
	public static final BitSet _tokenSet_229 = new BitSet(mk_tokenSet_229());
	private static final long[] mk_tokenSet_230() {
		long[] data = new long[82];
		data[40]=16L;
		return data;
	}
	public static final BitSet _tokenSet_230 = new BitSet(mk_tokenSet_230());
	private static final long[] mk_tokenSet_231() {
		long[] data = new long[50];
		data[24]=9007199254740992L;
		return data;
	}
	public static final BitSet _tokenSet_231 = new BitSet(mk_tokenSet_231());
	private static final long[] mk_tokenSet_232() {
		long[] data = new long[94];
		data[8]=648799821322256384L;
		data[9]=134217728L;
		data[10]=576460752308142080L;
		data[11]=576460752370794496L;
		data[14]=72057596185411584L;
		data[16]=8388608L;
		data[18]=34359933952L;
		data[19]=549755813888L;
		data[21]=20266198323167232L;
		data[25]=4398046511104L;
		data[26]=532575944704L;
		data[27]=9007199254740992L;
		data[29]=2251799813685248L;
		data[32]=34359738368L;
		data[34]=562949953421312L;
		data[35]=3458764513820540928L;
		data[38]=-9223372036854775808L;
		data[40]=1786706395138L;
		data[46]=35184372088832L;
		return data;
	}
	public static final BitSet _tokenSet_232 = new BitSet(mk_tokenSet_232());
	private static final long[] mk_tokenSet_233() {
		long[] data = new long[120];
		data[8]=4194304L;
		data[11]=128L;
		data[14]=-1125899906777088L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_233 = new BitSet(mk_tokenSet_233());
	private static final long[] mk_tokenSet_234() {
		long[] data = new long[48];
		data[0]=16L;
		data[8]=288230377225453568L;
		data[10]=2251799813685248L;
		data[11]=17592186077184L;
		data[12]=67108864L;
		data[14]=4398046511104L;
		return data;
	}
	public static final BitSet _tokenSet_234 = new BitSet(mk_tokenSet_234());
	private static final long[] mk_tokenSet_235() {
		long[] data = new long[120];
		data[0]=336L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=23L;
		data[8]=1495195077763412208L;
		data[9]=2319776022742044000L;
		data[10]=6765037339541636L;
		data[11]=-3458746645545451264L;
		data[12]=18382030601978112L;
		data[13]=-6232975008038092672L;
		data[14]=-1121501843553764L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_235 = new BitSet(mk_tokenSet_235());
	private static final long[] mk_tokenSet_236() {
		long[] data = new long[94];
		data[0]=16L;
		data[10]=1125899906842624L;
		data[46]=536870912L;
		return data;
	}
	public static final BitSet _tokenSet_236 = new BitSet(mk_tokenSet_236());
	private static final long[] mk_tokenSet_237() {
		long[] data = new long[120];
		data[0]=336L;
		data[2]=545259520L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30790356303872L;
		return data;
	}
	public static final BitSet _tokenSet_237 = new BitSet(mk_tokenSet_237());
	private static final long[] mk_tokenSet_238() {
		long[] data = new long[48];
		data[0]=16L;
		data[11]=1L;
		data[13]=8796093022208L;
		data[14]=2151677952L;
		return data;
	}
	public static final BitSet _tokenSet_238 = new BitSet(mk_tokenSet_238());
	private static final long[] mk_tokenSet_239() {
		long[] data = new long[48];
		data[0]=16L;
		data[11]=1L;
		data[13]=8796093022208L;
		data[14]=2151677984L;
		return data;
	}
	public static final BitSet _tokenSet_239 = new BitSet(mk_tokenSet_239());
	private static final long[] mk_tokenSet_240() {
		long[] data = new long[94];
		data[8]=4194304L;
		data[46]=1342177280L;
		return data;
	}
	public static final BitSet _tokenSet_240 = new BitSet(mk_tokenSet_240());
	private static final long[] mk_tokenSet_241() {
		long[] data = new long[120];
		data[0]=129344L;
		data[2]=536870912L;
		data[3]=4178112L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=65974728392704L;
		return data;
	}
	public static final BitSet _tokenSet_241 = new BitSet(mk_tokenSet_241());
	private static final long[] mk_tokenSet_242() {
		long[] data = new long[120];
		data[10]=1048576L;
		data[11]=262144L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17593528221696L;
		return data;
	}
	public static final BitSet _tokenSet_242 = new BitSet(mk_tokenSet_242());
	private static final long[] mk_tokenSet_243() {
		long[] data = new long[120];
		data[0]=320L;
		data[3]=49280L;
		data[8]=-8L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17595675705344L;
		return data;
	}
	public static final BitSet _tokenSet_243 = new BitSet(mk_tokenSet_243());
	private static final long[] mk_tokenSet_244() {
		long[] data = new long[94];
		data[0]=16L;
		data[11]=17592186044416L;
		data[14]=34359738368L;
		data[46]=536870912L;
		return data;
	}
	public static final BitSet _tokenSet_244 = new BitSet(mk_tokenSet_244());
	private static final long[] mk_tokenSet_245() {
		long[] data = new long[94];
		data[8]=171798691840L;
		data[11]=576460752370532481L;
		data[18]=137438953472L;
		data[21]=17179869184L;
		data[24]=211106232532992L;
		data[27]=4615063718147915776L;
		data[30]=8192L;
		data[46]=494230493462528L;
		return data;
	}
	public static final BitSet _tokenSet_245 = new BitSet(mk_tokenSet_245());
	private static final long[] mk_tokenSet_246() {
		long[] data = new long[48];
		data[8]=137438953472L;
		data[11]=576460752370532481L;
		return data;
	}
	public static final BitSet _tokenSet_246 = new BitSet(mk_tokenSet_246());
	private static final long[] mk_tokenSet_247() {
		long[] data = new long[94];
		data[8]=1081344L;
		data[10]=2L;
		data[11]=576460752303423488L;
		data[13]=4503599627370496L;
		data[46]=536870912L;
		return data;
	}
	public static final BitSet _tokenSet_247 = new BitSet(mk_tokenSet_247());
	private static final long[] mk_tokenSet_248() {
		long[] data = new long[78];
		data[16]=16L;
		data[18]=2251799813685248L;
		data[27]=-9223372036854775808L;
		data[29]=16777216L;
		data[38]=4L;
		return data;
	}
	public static final BitSet _tokenSet_248 = new BitSet(mk_tokenSet_248());
	private static final long[] mk_tokenSet_249() {
		long[] data = new long[48];
		data[10]=5452595200L;
		return data;
	}
	public static final BitSet _tokenSet_249 = new BitSet(mk_tokenSet_249());
	private static final long[] mk_tokenSet_250() {
		long[] data = new long[70];
		data[8]=2147614720L;
		data[9]=16L;
		data[11]=550292684808L;
		data[12]=288230376151711744L;
		data[19]=536870912L;
		data[21]=134217728L;
		data[33]=-9214364837600034816L;
		data[34]=5764607523034234880L;
		return data;
	}
	public static final BitSet _tokenSet_250 = new BitSet(mk_tokenSet_250());
	private static final long[] mk_tokenSet_251() {
		long[] data = new long[120];
		data[0]=129344L;
		data[2]=536870912L;
		data[3]=4177920L;
		data[5]=1152912708513824768L;
		data[6]=-387028579778561L;
		data[7]=-281474976710633L;
		data[8]=-5L;
		for (int i = 9; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=30789014126592L;
		return data;
	}
	public static final BitSet _tokenSet_251 = new BitSet(mk_tokenSet_251());
	private static final long[] mk_tokenSet_252() {
		long[] data = new long[120];
		data[0]=320L;
		data[7]=-281474976710656L;
		data[8]=3L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_252 = new BitSet(mk_tokenSet_252());
	private static final long[] mk_tokenSet_253() {
		long[] data = new long[120];
		data[5]=1152912708513824768L;
		data[8]=-6914679093501868000L;
		data[9]=1454099729695473664L;
		data[10]=72088385816297732L;
		data[11]=19508328962L;
		data[12]=10142032831971329L;
		data[13]=35338990911488L;
		data[14]=-1125899890061056L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592190238720L;
		return data;
	}
	public static final BitSet _tokenSet_253 = new BitSet(mk_tokenSet_253());
	private static final long[] mk_tokenSet_254() {
		long[] data = new long[120];
		data[0]=320L;
		data[2]=536870912L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_254 = new BitSet(mk_tokenSet_254());
	private static final long[] mk_tokenSet_255() {
		long[] data = new long[120];
		data[0]=129088L;
		data[9]=8L;
		data[10]=65536L;
		data[11]=1099512152064L;
		data[14]=-1125899906842624L;
		for (int i = 15; i<=44; i++) { data[i]=-1L; }
		data[45]=140737488355327L;
		data[46]=17592186044416L;
		return data;
	}
	public static final BitSet _tokenSet_255 = new BitSet(mk_tokenSet_255());
	private static final long[] mk_tokenSet_256() {
		long[] data = new long[94];
		data[3]=4177920L;
		data[8]=4294967296L;
		data[9]=4398046511104L;
		data[10]=2305844246164339785L;
		data[11]=307388266754211840L;
		data[12]=108086399646826498L;
		data[13]=88064546076672L;
		data[14]=4157570285568L;
		data[26]=72057594037927936L;
		data[31]=4611686018427387904L;
		data[38]=1048576L;
		data[46]=13197360758784L;
		return data;
	}
	public static final BitSet _tokenSet_256 = new BitSet(mk_tokenSet_256());
	private static final long[] mk_tokenSet_257() {
		long[] data = new long[94];
		data[46]=536870912L;
		return data;
	}
	public static final BitSet _tokenSet_257 = new BitSet(mk_tokenSet_257());
	private static final long[] mk_tokenSet_258() {
		long[] data = new long[94];
		data[11]=1L;
		data[46]=1342177280L;
		return data;
	}
	public static final BitSet _tokenSet_258 = new BitSet(mk_tokenSet_258());
	private static final long[] mk_tokenSet_259() {
		long[] data = new long[94];
		data[17]=144L;
		data[46]=1342177280L;
		return data;
	}
	public static final BitSet _tokenSet_259 = new BitSet(mk_tokenSet_259());
	private static final long[] mk_tokenSet_260() {
		long[] data = new long[94];
		data[46]=67108864L;
		return data;
	}
	public static final BitSet _tokenSet_260 = new BitSet(mk_tokenSet_260());
	
	}