public class ProgressParser extends antlr.LLkParser implements ProgressParserTokenTypes
ProgressLexer
). More specifically, the parser does
the following:
nextToken
method.
This method tokenizes the lexer's input stream of characters and
returns the next found Token
object.
external_proc()
- this is designed to
parse an entire (already preprocessed) Progress 4GL
source file
expr()
- designed to parse any valid
Progress 4GL expression
ExpressionEvaluator
and the related helper
class 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 do
or repeat
).
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.
Please note that this is a generated file using ANTLR 2.7.4 and a
grammar specified in progress.g
.
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.
The top level entry points are designed to either match a single construct
(e.g. expr
which parses and matches a single expression) or
to iteratively match a set of constructs that might comprise an entire
source file (e.g. external_proc
).
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 "k" 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.
For details on how the context sensitive symbol resolution occurs, please
see primary_expr()
, func_call()
, lvalue()
,
record(boolean, boolean, boolean)
, label_reference()
and symbol()
. In
addition, it is important to review the lexer's role in symbol resolution
(see ProgressLexer.mSYMBOL(boolean)
).
Implementation WARNING: ANTLR syntactic predicates cannot be used 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.
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: BEGIN_RESERVED
through END_RESERVED
(for the reserved keywords) and BEGIN_UNRESERVED
through
END_UNRESERVED
(for unreserved keywords). Then the lexer is
modified to have a 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 oldtype
annotation on
built-in functions/variables. Do NOT be disturbed by the lack of any
usage of these tokens in the parser itself.
Open TODOs/Issues:
run_stored_proc_stmt()
and
close_stored_proc_stmt()
for more details
record(boolean, boolean, boolean)
rule)
NAMESPACE-URI
and/or
NAMESPACE-PREFIX
options (see
namespace_clause()
) is not honored at this time
form_item(java.util.Set<com.goldencode.ast.Aast>)
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 isFormVarDefinition()
which is some example code for a partial solution but it does not
work completely enough to be used;
constant_form_item()
, column_ref()
and
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?
def_var_stmt(boolean[])
may need to exclude RAW and MEMPTR fields
from adding a WID_FILL_IN definition (like it does today for
handle types)
choose_keys_clause()
?
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
_tokenNames |
static antlr.collections.impl.BitSet |
_tokenSet_0 |
static antlr.collections.impl.BitSet |
_tokenSet_1 |
static antlr.collections.impl.BitSet |
_tokenSet_10 |
static antlr.collections.impl.BitSet |
_tokenSet_100 |
static antlr.collections.impl.BitSet |
_tokenSet_101 |
static antlr.collections.impl.BitSet |
_tokenSet_102 |
static antlr.collections.impl.BitSet |
_tokenSet_103 |
static antlr.collections.impl.BitSet |
_tokenSet_104 |
static antlr.collections.impl.BitSet |
_tokenSet_105 |
static antlr.collections.impl.BitSet |
_tokenSet_106 |
static antlr.collections.impl.BitSet |
_tokenSet_107 |
static antlr.collections.impl.BitSet |
_tokenSet_108 |
static antlr.collections.impl.BitSet |
_tokenSet_109 |
static antlr.collections.impl.BitSet |
_tokenSet_11 |
static antlr.collections.impl.BitSet |
_tokenSet_110 |
static antlr.collections.impl.BitSet |
_tokenSet_111 |
static antlr.collections.impl.BitSet |
_tokenSet_112 |
static antlr.collections.impl.BitSet |
_tokenSet_113 |
static antlr.collections.impl.BitSet |
_tokenSet_114 |
static antlr.collections.impl.BitSet |
_tokenSet_115 |
static antlr.collections.impl.BitSet |
_tokenSet_116 |
static antlr.collections.impl.BitSet |
_tokenSet_117 |
static antlr.collections.impl.BitSet |
_tokenSet_118 |
static antlr.collections.impl.BitSet |
_tokenSet_119 |
static antlr.collections.impl.BitSet |
_tokenSet_12 |
static antlr.collections.impl.BitSet |
_tokenSet_120 |
static antlr.collections.impl.BitSet |
_tokenSet_121 |
static antlr.collections.impl.BitSet |
_tokenSet_122 |
static antlr.collections.impl.BitSet |
_tokenSet_123 |
static antlr.collections.impl.BitSet |
_tokenSet_124 |
static antlr.collections.impl.BitSet |
_tokenSet_125 |
static antlr.collections.impl.BitSet |
_tokenSet_126 |
static antlr.collections.impl.BitSet |
_tokenSet_127 |
static antlr.collections.impl.BitSet |
_tokenSet_128 |
static antlr.collections.impl.BitSet |
_tokenSet_129 |
static antlr.collections.impl.BitSet |
_tokenSet_13 |
static antlr.collections.impl.BitSet |
_tokenSet_130 |
static antlr.collections.impl.BitSet |
_tokenSet_131 |
static antlr.collections.impl.BitSet |
_tokenSet_132 |
static antlr.collections.impl.BitSet |
_tokenSet_133 |
static antlr.collections.impl.BitSet |
_tokenSet_134 |
static antlr.collections.impl.BitSet |
_tokenSet_135 |
static antlr.collections.impl.BitSet |
_tokenSet_136 |
static antlr.collections.impl.BitSet |
_tokenSet_137 |
static antlr.collections.impl.BitSet |
_tokenSet_138 |
static antlr.collections.impl.BitSet |
_tokenSet_139 |
static antlr.collections.impl.BitSet |
_tokenSet_14 |
static antlr.collections.impl.BitSet |
_tokenSet_140 |
static antlr.collections.impl.BitSet |
_tokenSet_141 |
static antlr.collections.impl.BitSet |
_tokenSet_142 |
static antlr.collections.impl.BitSet |
_tokenSet_143 |
static antlr.collections.impl.BitSet |
_tokenSet_144 |
static antlr.collections.impl.BitSet |
_tokenSet_145 |
static antlr.collections.impl.BitSet |
_tokenSet_146 |
static antlr.collections.impl.BitSet |
_tokenSet_147 |
static antlr.collections.impl.BitSet |
_tokenSet_148 |
static antlr.collections.impl.BitSet |
_tokenSet_149 |
static antlr.collections.impl.BitSet |
_tokenSet_15 |
static antlr.collections.impl.BitSet |
_tokenSet_150 |
static antlr.collections.impl.BitSet |
_tokenSet_151 |
static antlr.collections.impl.BitSet |
_tokenSet_152 |
static antlr.collections.impl.BitSet |
_tokenSet_153 |
static antlr.collections.impl.BitSet |
_tokenSet_154 |
static antlr.collections.impl.BitSet |
_tokenSet_155 |
static antlr.collections.impl.BitSet |
_tokenSet_156 |
static antlr.collections.impl.BitSet |
_tokenSet_157 |
static antlr.collections.impl.BitSet |
_tokenSet_158 |
static antlr.collections.impl.BitSet |
_tokenSet_159 |
static antlr.collections.impl.BitSet |
_tokenSet_16 |
static antlr.collections.impl.BitSet |
_tokenSet_160 |
static antlr.collections.impl.BitSet |
_tokenSet_161 |
static antlr.collections.impl.BitSet |
_tokenSet_162 |
static antlr.collections.impl.BitSet |
_tokenSet_163 |
static antlr.collections.impl.BitSet |
_tokenSet_164 |
static antlr.collections.impl.BitSet |
_tokenSet_165 |
static antlr.collections.impl.BitSet |
_tokenSet_166 |
static antlr.collections.impl.BitSet |
_tokenSet_167 |
static antlr.collections.impl.BitSet |
_tokenSet_168 |
static antlr.collections.impl.BitSet |
_tokenSet_169 |
static antlr.collections.impl.BitSet |
_tokenSet_17 |
static antlr.collections.impl.BitSet |
_tokenSet_170 |
static antlr.collections.impl.BitSet |
_tokenSet_171 |
static antlr.collections.impl.BitSet |
_tokenSet_172 |
static antlr.collections.impl.BitSet |
_tokenSet_173 |
static antlr.collections.impl.BitSet |
_tokenSet_174 |
static antlr.collections.impl.BitSet |
_tokenSet_175 |
static antlr.collections.impl.BitSet |
_tokenSet_176 |
static antlr.collections.impl.BitSet |
_tokenSet_177 |
static antlr.collections.impl.BitSet |
_tokenSet_178 |
static antlr.collections.impl.BitSet |
_tokenSet_179 |
static antlr.collections.impl.BitSet |
_tokenSet_18 |
static antlr.collections.impl.BitSet |
_tokenSet_180 |
static antlr.collections.impl.BitSet |
_tokenSet_181 |
static antlr.collections.impl.BitSet |
_tokenSet_182 |
static antlr.collections.impl.BitSet |
_tokenSet_183 |
static antlr.collections.impl.BitSet |
_tokenSet_184 |
static antlr.collections.impl.BitSet |
_tokenSet_185 |
static antlr.collections.impl.BitSet |
_tokenSet_186 |
static antlr.collections.impl.BitSet |
_tokenSet_187 |
static antlr.collections.impl.BitSet |
_tokenSet_188 |
static antlr.collections.impl.BitSet |
_tokenSet_189 |
static antlr.collections.impl.BitSet |
_tokenSet_19 |
static antlr.collections.impl.BitSet |
_tokenSet_190 |
static antlr.collections.impl.BitSet |
_tokenSet_191 |
static antlr.collections.impl.BitSet |
_tokenSet_192 |
static antlr.collections.impl.BitSet |
_tokenSet_193 |
static antlr.collections.impl.BitSet |
_tokenSet_194 |
static antlr.collections.impl.BitSet |
_tokenSet_195 |
static antlr.collections.impl.BitSet |
_tokenSet_196 |
static antlr.collections.impl.BitSet |
_tokenSet_197 |
static antlr.collections.impl.BitSet |
_tokenSet_198 |
static antlr.collections.impl.BitSet |
_tokenSet_199 |
static antlr.collections.impl.BitSet |
_tokenSet_2 |
static antlr.collections.impl.BitSet |
_tokenSet_20 |
static antlr.collections.impl.BitSet |
_tokenSet_200 |
static antlr.collections.impl.BitSet |
_tokenSet_201 |
static antlr.collections.impl.BitSet |
_tokenSet_202 |
static antlr.collections.impl.BitSet |
_tokenSet_203 |
static antlr.collections.impl.BitSet |
_tokenSet_204 |
static antlr.collections.impl.BitSet |
_tokenSet_205 |
static antlr.collections.impl.BitSet |
_tokenSet_206 |
static antlr.collections.impl.BitSet |
_tokenSet_207 |
static antlr.collections.impl.BitSet |
_tokenSet_208 |
static antlr.collections.impl.BitSet |
_tokenSet_209 |
static antlr.collections.impl.BitSet |
_tokenSet_21 |
static antlr.collections.impl.BitSet |
_tokenSet_210 |
static antlr.collections.impl.BitSet |
_tokenSet_211 |
static antlr.collections.impl.BitSet |
_tokenSet_212 |
static antlr.collections.impl.BitSet |
_tokenSet_213 |
static antlr.collections.impl.BitSet |
_tokenSet_214 |
static antlr.collections.impl.BitSet |
_tokenSet_215 |
static antlr.collections.impl.BitSet |
_tokenSet_216 |
static antlr.collections.impl.BitSet |
_tokenSet_217 |
static antlr.collections.impl.BitSet |
_tokenSet_218 |
static antlr.collections.impl.BitSet |
_tokenSet_219 |
static antlr.collections.impl.BitSet |
_tokenSet_22 |
static antlr.collections.impl.BitSet |
_tokenSet_220 |
static antlr.collections.impl.BitSet |
_tokenSet_221 |
static antlr.collections.impl.BitSet |
_tokenSet_222 |
static antlr.collections.impl.BitSet |
_tokenSet_223 |
static antlr.collections.impl.BitSet |
_tokenSet_224 |
static antlr.collections.impl.BitSet |
_tokenSet_225 |
static antlr.collections.impl.BitSet |
_tokenSet_226 |
static antlr.collections.impl.BitSet |
_tokenSet_227 |
static antlr.collections.impl.BitSet |
_tokenSet_228 |
static antlr.collections.impl.BitSet |
_tokenSet_229 |
static antlr.collections.impl.BitSet |
_tokenSet_23 |
static antlr.collections.impl.BitSet |
_tokenSet_230 |
static antlr.collections.impl.BitSet |
_tokenSet_231 |
static antlr.collections.impl.BitSet |
_tokenSet_232 |
static antlr.collections.impl.BitSet |
_tokenSet_233 |
static antlr.collections.impl.BitSet |
_tokenSet_234 |
static antlr.collections.impl.BitSet |
_tokenSet_235 |
static antlr.collections.impl.BitSet |
_tokenSet_236 |
static antlr.collections.impl.BitSet |
_tokenSet_237 |
static antlr.collections.impl.BitSet |
_tokenSet_238 |
static antlr.collections.impl.BitSet |
_tokenSet_239 |
static antlr.collections.impl.BitSet |
_tokenSet_24 |
static antlr.collections.impl.BitSet |
_tokenSet_240 |
static antlr.collections.impl.BitSet |
_tokenSet_241 |
static antlr.collections.impl.BitSet |
_tokenSet_242 |
static antlr.collections.impl.BitSet |
_tokenSet_243 |
static antlr.collections.impl.BitSet |
_tokenSet_244 |
static antlr.collections.impl.BitSet |
_tokenSet_245 |
static antlr.collections.impl.BitSet |
_tokenSet_246 |
static antlr.collections.impl.BitSet |
_tokenSet_247 |
static antlr.collections.impl.BitSet |
_tokenSet_248 |
static antlr.collections.impl.BitSet |
_tokenSet_249 |
static antlr.collections.impl.BitSet |
_tokenSet_25 |
static antlr.collections.impl.BitSet |
_tokenSet_250 |
static antlr.collections.impl.BitSet |
_tokenSet_251 |
static antlr.collections.impl.BitSet |
_tokenSet_252 |
static antlr.collections.impl.BitSet |
_tokenSet_253 |
static antlr.collections.impl.BitSet |
_tokenSet_254 |
static antlr.collections.impl.BitSet |
_tokenSet_255 |
static antlr.collections.impl.BitSet |
_tokenSet_256 |
static antlr.collections.impl.BitSet |
_tokenSet_257 |
static antlr.collections.impl.BitSet |
_tokenSet_258 |
static antlr.collections.impl.BitSet |
_tokenSet_259 |
static antlr.collections.impl.BitSet |
_tokenSet_26 |
static antlr.collections.impl.BitSet |
_tokenSet_260 |
static antlr.collections.impl.BitSet |
_tokenSet_261 |
static antlr.collections.impl.BitSet |
_tokenSet_262 |
static antlr.collections.impl.BitSet |
_tokenSet_263 |
static antlr.collections.impl.BitSet |
_tokenSet_264 |
static antlr.collections.impl.BitSet |
_tokenSet_265 |
static antlr.collections.impl.BitSet |
_tokenSet_266 |
static antlr.collections.impl.BitSet |
_tokenSet_267 |
static antlr.collections.impl.BitSet |
_tokenSet_268 |
static antlr.collections.impl.BitSet |
_tokenSet_269 |
static antlr.collections.impl.BitSet |
_tokenSet_27 |
static antlr.collections.impl.BitSet |
_tokenSet_270 |
static antlr.collections.impl.BitSet |
_tokenSet_271 |
static antlr.collections.impl.BitSet |
_tokenSet_272 |
static antlr.collections.impl.BitSet |
_tokenSet_273 |
static antlr.collections.impl.BitSet |
_tokenSet_274 |
static antlr.collections.impl.BitSet |
_tokenSet_275 |
static antlr.collections.impl.BitSet |
_tokenSet_276 |
static antlr.collections.impl.BitSet |
_tokenSet_277 |
static antlr.collections.impl.BitSet |
_tokenSet_278 |
static antlr.collections.impl.BitSet |
_tokenSet_279 |
static antlr.collections.impl.BitSet |
_tokenSet_28 |
static antlr.collections.impl.BitSet |
_tokenSet_280 |
static antlr.collections.impl.BitSet |
_tokenSet_281 |
static antlr.collections.impl.BitSet |
_tokenSet_282 |
static antlr.collections.impl.BitSet |
_tokenSet_283 |
static antlr.collections.impl.BitSet |
_tokenSet_284 |
static antlr.collections.impl.BitSet |
_tokenSet_285 |
static antlr.collections.impl.BitSet |
_tokenSet_286 |
static antlr.collections.impl.BitSet |
_tokenSet_287 |
static antlr.collections.impl.BitSet |
_tokenSet_288 |
static antlr.collections.impl.BitSet |
_tokenSet_289 |
static antlr.collections.impl.BitSet |
_tokenSet_29 |
static antlr.collections.impl.BitSet |
_tokenSet_290 |
static antlr.collections.impl.BitSet |
_tokenSet_291 |
static antlr.collections.impl.BitSet |
_tokenSet_292 |
static antlr.collections.impl.BitSet |
_tokenSet_293 |
static antlr.collections.impl.BitSet |
_tokenSet_294 |
static antlr.collections.impl.BitSet |
_tokenSet_295 |
static antlr.collections.impl.BitSet |
_tokenSet_296 |
static antlr.collections.impl.BitSet |
_tokenSet_297 |
static antlr.collections.impl.BitSet |
_tokenSet_298 |
static antlr.collections.impl.BitSet |
_tokenSet_299 |
static antlr.collections.impl.BitSet |
_tokenSet_3 |
static antlr.collections.impl.BitSet |
_tokenSet_30 |
static antlr.collections.impl.BitSet |
_tokenSet_300 |
static antlr.collections.impl.BitSet |
_tokenSet_301 |
static antlr.collections.impl.BitSet |
_tokenSet_302 |
static antlr.collections.impl.BitSet |
_tokenSet_303 |
static antlr.collections.impl.BitSet |
_tokenSet_304 |
static antlr.collections.impl.BitSet |
_tokenSet_305 |
static antlr.collections.impl.BitSet |
_tokenSet_306 |
static antlr.collections.impl.BitSet |
_tokenSet_307 |
static antlr.collections.impl.BitSet |
_tokenSet_308 |
static antlr.collections.impl.BitSet |
_tokenSet_309 |
static antlr.collections.impl.BitSet |
_tokenSet_31 |
static antlr.collections.impl.BitSet |
_tokenSet_310 |
static antlr.collections.impl.BitSet |
_tokenSet_311 |
static antlr.collections.impl.BitSet |
_tokenSet_312 |
static antlr.collections.impl.BitSet |
_tokenSet_313 |
static antlr.collections.impl.BitSet |
_tokenSet_314 |
static antlr.collections.impl.BitSet |
_tokenSet_315 |
static antlr.collections.impl.BitSet |
_tokenSet_316 |
static antlr.collections.impl.BitSet |
_tokenSet_317 |
static antlr.collections.impl.BitSet |
_tokenSet_318 |
static antlr.collections.impl.BitSet |
_tokenSet_319 |
static antlr.collections.impl.BitSet |
_tokenSet_32 |
static antlr.collections.impl.BitSet |
_tokenSet_320 |
static antlr.collections.impl.BitSet |
_tokenSet_321 |
static antlr.collections.impl.BitSet |
_tokenSet_322 |
static antlr.collections.impl.BitSet |
_tokenSet_323 |
static antlr.collections.impl.BitSet |
_tokenSet_324 |
static antlr.collections.impl.BitSet |
_tokenSet_325 |
static antlr.collections.impl.BitSet |
_tokenSet_326 |
static antlr.collections.impl.BitSet |
_tokenSet_327 |
static antlr.collections.impl.BitSet |
_tokenSet_328 |
static antlr.collections.impl.BitSet |
_tokenSet_329 |
static antlr.collections.impl.BitSet |
_tokenSet_33 |
static antlr.collections.impl.BitSet |
_tokenSet_330 |
static antlr.collections.impl.BitSet |
_tokenSet_331 |
static antlr.collections.impl.BitSet |
_tokenSet_332 |
static antlr.collections.impl.BitSet |
_tokenSet_333 |
static antlr.collections.impl.BitSet |
_tokenSet_334 |
static antlr.collections.impl.BitSet |
_tokenSet_335 |
static antlr.collections.impl.BitSet |
_tokenSet_336 |
static antlr.collections.impl.BitSet |
_tokenSet_337 |
static antlr.collections.impl.BitSet |
_tokenSet_338 |
static antlr.collections.impl.BitSet |
_tokenSet_339 |
static antlr.collections.impl.BitSet |
_tokenSet_34 |
static antlr.collections.impl.BitSet |
_tokenSet_340 |
static antlr.collections.impl.BitSet |
_tokenSet_341 |
static antlr.collections.impl.BitSet |
_tokenSet_342 |
static antlr.collections.impl.BitSet |
_tokenSet_343 |
static antlr.collections.impl.BitSet |
_tokenSet_344 |
static antlr.collections.impl.BitSet |
_tokenSet_345 |
static antlr.collections.impl.BitSet |
_tokenSet_346 |
static antlr.collections.impl.BitSet |
_tokenSet_347 |
static antlr.collections.impl.BitSet |
_tokenSet_348 |
static antlr.collections.impl.BitSet |
_tokenSet_349 |
static antlr.collections.impl.BitSet |
_tokenSet_35 |
static antlr.collections.impl.BitSet |
_tokenSet_350 |
static antlr.collections.impl.BitSet |
_tokenSet_351 |
static antlr.collections.impl.BitSet |
_tokenSet_352 |
static antlr.collections.impl.BitSet |
_tokenSet_353 |
static antlr.collections.impl.BitSet |
_tokenSet_354 |
static antlr.collections.impl.BitSet |
_tokenSet_355 |
static antlr.collections.impl.BitSet |
_tokenSet_356 |
static antlr.collections.impl.BitSet |
_tokenSet_357 |
static antlr.collections.impl.BitSet |
_tokenSet_358 |
static antlr.collections.impl.BitSet |
_tokenSet_359 |
static antlr.collections.impl.BitSet |
_tokenSet_36 |
static antlr.collections.impl.BitSet |
_tokenSet_360 |
static antlr.collections.impl.BitSet |
_tokenSet_361 |
static antlr.collections.impl.BitSet |
_tokenSet_362 |
static antlr.collections.impl.BitSet |
_tokenSet_363 |
static antlr.collections.impl.BitSet |
_tokenSet_364 |
static antlr.collections.impl.BitSet |
_tokenSet_365 |
static antlr.collections.impl.BitSet |
_tokenSet_366 |
static antlr.collections.impl.BitSet |
_tokenSet_367 |
static antlr.collections.impl.BitSet |
_tokenSet_368 |
static antlr.collections.impl.BitSet |
_tokenSet_369 |
static antlr.collections.impl.BitSet |
_tokenSet_37 |
static antlr.collections.impl.BitSet |
_tokenSet_370 |
static antlr.collections.impl.BitSet |
_tokenSet_371 |
static antlr.collections.impl.BitSet |
_tokenSet_372 |
static antlr.collections.impl.BitSet |
_tokenSet_373 |
static antlr.collections.impl.BitSet |
_tokenSet_374 |
static antlr.collections.impl.BitSet |
_tokenSet_375 |
static antlr.collections.impl.BitSet |
_tokenSet_376 |
static antlr.collections.impl.BitSet |
_tokenSet_377 |
static antlr.collections.impl.BitSet |
_tokenSet_378 |
static antlr.collections.impl.BitSet |
_tokenSet_379 |
static antlr.collections.impl.BitSet |
_tokenSet_38 |
static antlr.collections.impl.BitSet |
_tokenSet_380 |
static antlr.collections.impl.BitSet |
_tokenSet_381 |
static antlr.collections.impl.BitSet |
_tokenSet_382 |
static antlr.collections.impl.BitSet |
_tokenSet_383 |
static antlr.collections.impl.BitSet |
_tokenSet_384 |
static antlr.collections.impl.BitSet |
_tokenSet_385 |
static antlr.collections.impl.BitSet |
_tokenSet_39 |
static antlr.collections.impl.BitSet |
_tokenSet_4 |
static antlr.collections.impl.BitSet |
_tokenSet_40 |
static antlr.collections.impl.BitSet |
_tokenSet_41 |
static antlr.collections.impl.BitSet |
_tokenSet_42 |
static antlr.collections.impl.BitSet |
_tokenSet_43 |
static antlr.collections.impl.BitSet |
_tokenSet_44 |
static antlr.collections.impl.BitSet |
_tokenSet_45 |
static antlr.collections.impl.BitSet |
_tokenSet_46 |
static antlr.collections.impl.BitSet |
_tokenSet_47 |
static antlr.collections.impl.BitSet |
_tokenSet_48 |
static antlr.collections.impl.BitSet |
_tokenSet_49 |
static antlr.collections.impl.BitSet |
_tokenSet_5 |
static antlr.collections.impl.BitSet |
_tokenSet_50 |
static antlr.collections.impl.BitSet |
_tokenSet_51 |
static antlr.collections.impl.BitSet |
_tokenSet_52 |
static antlr.collections.impl.BitSet |
_tokenSet_53 |
static antlr.collections.impl.BitSet |
_tokenSet_54 |
static antlr.collections.impl.BitSet |
_tokenSet_55 |
static antlr.collections.impl.BitSet |
_tokenSet_56 |
static antlr.collections.impl.BitSet |
_tokenSet_57 |
static antlr.collections.impl.BitSet |
_tokenSet_58 |
static antlr.collections.impl.BitSet |
_tokenSet_59 |
static antlr.collections.impl.BitSet |
_tokenSet_6 |
static antlr.collections.impl.BitSet |
_tokenSet_60 |
static antlr.collections.impl.BitSet |
_tokenSet_61 |
static antlr.collections.impl.BitSet |
_tokenSet_62 |
static antlr.collections.impl.BitSet |
_tokenSet_63 |
static antlr.collections.impl.BitSet |
_tokenSet_64 |
static antlr.collections.impl.BitSet |
_tokenSet_65 |
static antlr.collections.impl.BitSet |
_tokenSet_66 |
static antlr.collections.impl.BitSet |
_tokenSet_67 |
static antlr.collections.impl.BitSet |
_tokenSet_68 |
static antlr.collections.impl.BitSet |
_tokenSet_69 |
static antlr.collections.impl.BitSet |
_tokenSet_7 |
static antlr.collections.impl.BitSet |
_tokenSet_70 |
static antlr.collections.impl.BitSet |
_tokenSet_71 |
static antlr.collections.impl.BitSet |
_tokenSet_72 |
static antlr.collections.impl.BitSet |
_tokenSet_73 |
static antlr.collections.impl.BitSet |
_tokenSet_74 |
static antlr.collections.impl.BitSet |
_tokenSet_75 |
static antlr.collections.impl.BitSet |
_tokenSet_76 |
static antlr.collections.impl.BitSet |
_tokenSet_77 |
static antlr.collections.impl.BitSet |
_tokenSet_78 |
static antlr.collections.impl.BitSet |
_tokenSet_79 |
static antlr.collections.impl.BitSet |
_tokenSet_8 |
static antlr.collections.impl.BitSet |
_tokenSet_80 |
static antlr.collections.impl.BitSet |
_tokenSet_81 |
static antlr.collections.impl.BitSet |
_tokenSet_82 |
static antlr.collections.impl.BitSet |
_tokenSet_83 |
static antlr.collections.impl.BitSet |
_tokenSet_84 |
static antlr.collections.impl.BitSet |
_tokenSet_85 |
static antlr.collections.impl.BitSet |
_tokenSet_86 |
static antlr.collections.impl.BitSet |
_tokenSet_87 |
static antlr.collections.impl.BitSet |
_tokenSet_88 |
static antlr.collections.impl.BitSet |
_tokenSet_89 |
static antlr.collections.impl.BitSet |
_tokenSet_9 |
static antlr.collections.impl.BitSet |
_tokenSet_90 |
static antlr.collections.impl.BitSet |
_tokenSet_91 |
static antlr.collections.impl.BitSet |
_tokenSet_92 |
static antlr.collections.impl.BitSet |
_tokenSet_93 |
static antlr.collections.impl.BitSet |
_tokenSet_94 |
static antlr.collections.impl.BitSet |
_tokenSet_95 |
static antlr.collections.impl.BitSet |
_tokenSet_96 |
static antlr.collections.impl.BitSet |
_tokenSet_97 |
static antlr.collections.impl.BitSet |
_tokenSet_98 |
static antlr.collections.impl.BitSet |
_tokenSet_99 |
private boolean |
allowStringMatch
Allows matching certain unquoted text as strings.
|
private boolean |
allowSymbolMatch
Flag to allow
lvalue() to match a SYMBOL . |
private static java.lang.String |
AST_CLASS
Name of the specialized AST class to use when parsing.
|
private boolean |
bufferScope
Set to
false when the parser is currently in an internal
procedure, function or trigger, otherwise is set true . |
private boolean |
builtInCls
true if we are parsing a built-in class/interface. |
private int |
constStmts
Tracks the number of statements within a constructor.
|
private boolean |
consumeErr
true to consume errors and automatically restart parsing. |
private java.lang.String |
currentClassName
Class name to use in
lvalue() for data member lookups. |
private boolean |
currentStaticFlag
Flag to use in
lvalue() for static-only data member lookups. |
private boolean |
debug
Debug mode for the parser.
|
private boolean |
dotNetCls
true if we are parsing a .NET class/interface. |
private boolean |
embeddedSql
Modify
expr() process when inside embedded SQL statements. |
private int |
errorCount
The number of errors encountered during parsing
|
private boolean |
evaluatingExpression
Determines if the parser was entered for preprocessor expression
evaluation.
|
private int |
exprLvl
Tracks the level of recursion in the
expr() rule. |
private boolean |
forceTemp
Prefer temp-tables where the name conflicts with a table.
|
private antlr.TokenStreamHiddenTokenFilter |
hidden
Filter implementation to allow access to hidden tokens.
|
private boolean |
inLikeClause
|
private boolean |
insideClass
Flag indicating we are processing the class body.
|
private boolean |
insideClassEvent
Allow matching an unquoted method name in special cases.
|
private boolean |
inStaticCtxt
true if we are parsing inside a static method. |
private boolean |
inUnion
true if processing an SQL UNION statement. |
private int |
nestLevel
Tracks the nesting level of procedures and functions.
|
private boolean |
preferWidgets
|
private int |
preScanPass
Greater than 0 if the parser was entered via pre_scan_class.
|
private int |
selectNestLevel
Tracks the number of times an SQL SELECT statement is nested.
|
private int |
sqlNestLevel
Tracks the number of times an SQL UNION statement is nested.
|
private SymbolResolver |
sym
Contains all symbol resolution dictionaries and provides the
maintenance/lookup methods.
|
private static java.util.Map |
tokenLookup
Provides an efficient reverse lookup of names to token types.
|
private boolean |
topLevelEntry
true if the parser was entered via external_proc. |
private java.lang.String |
validateFieldName
The name of the database field being currently processed for possible
validation.
|
private boolean |
validation
true if a validate expression is being processed. |
private boolean |
webspeed
true if parsing a WebSpeed program. |
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
ABBREVIATED, AGGREGATE, ALTER_TABLE, AMBIGUOUS, ANY_LOCK, AREA, ARGUMENTS, AS_BUTTON, ASSIGN, ASSIGNMENT, AST_NODE, AT, 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_POLY, ATTR_RAW, ATTR_RECID, ATTR_ROWID, BACKSLASH, BEGIN_ATTR, BEGIN_ATTR_METH, BEGIN_BUFFERTYPES, BEGIN_CALLGRAPH, BEGIN_FIELDTYPES, BEGIN_FUNCTYPES, BEGIN_FWD_EXTENSION, BEGIN_INDEX_MATCH_TYPES, BEGIN_LVALUE, BEGIN_METATYPES, BEGIN_METH, BEGIN_MULTIWORD, BEGIN_NATIVE_VARTYPES, BEGIN_RECORDTYPES, BEGIN_RESERVED, BEGIN_SCHEMA, BEGIN_SCHEMAKW, BEGIN_UNRESERVED, BEGIN_VARTYPES, BEGIN_WIDGETS, BEGINS_MATCH, BLOCK, BOGUS, BOOL_FALSE, BOOL_TRUE, BUFFER, BUFFER_SCOPE, CARET, CHILD_PROCESS, CLASS_DEF, CLASS_EVENT, CLASS_NAME, CLIENT_WHERE, CLIENT_WHERE_SUBST, CLOSE_CURSOR, CLOSE_QUERY, CLOSE_STORED_PROCEDURE, CMT_CLOSE, CMT_OPEN, COLON, COLOR_PHRASE, COLUMN_LIST, COLUMN_REF, COM_INVOCATION, COM_METHOD, COM_OBJECT, COM_PARAMETER, COM_PROPERTY, COMMA, COMMAND_TEXT, COMMAND_TOKENS, COMMENT, CONNECT_OPTIONS, CONNECT_TEXT, CONSTRUCTOR, CONTENT_ARRAY, COPY_FROM_SB, COPY_TO_SB, CREATE_ALIAS, CREATE_BROWSE, CREATE_BUFFER, CREATE_CALL, CREATE_CLIENT_PRINCIPAL, CREATE_DATA_SOURCE, CREATE_DATABASE, CREATE_DATASET, CREATE_INDEX, CREATE_OBJECT, CREATE_QUERY, CREATE_SAX_ATTRIBUTES, CREATE_SAX_READER, CREATE_SAX_WRITER, CREATE_SERVER, CREATE_SOAP_HEADER, CREATE_SOAP_HEADER_ENTRYREF, CREATE_SOCKET, CREATE_SRV_SOCKET, CREATE_TABLE, CREATE_TEMP_TABLE, CREATE_TIMER, CREATE_VIEW, CREATE_WIDGET, CREATE_WIDGET_POOL, CREATE_X_DOCUMENT, CREATE_X_NODEREF, CUSTOMER_SPECIFIC, CYCLE_ON_LIMIT, DATA_RELATION, DATA_SET, DATA_SOURCE, DATABASE, DATE_LITERAL, DATETIME_LITERAL, DATETIME_TZ_LITERAL, DB_EVENT, DB_REF_NON_STATIC, DB_SYMBOL, DDE_ADVISE, DDE_EXECUTE, DDE_GET, DDE_INITIATE, DDE_REQUEST, DDE_SEND, DDE_SERVER, DDE_TERMINATE, DEC_LITERAL, DECLARE_CURSOR, DEFINE_BROWSE, DEFINE_BUFFER, DEFINE_BUTTON, DEFINE_DATA_SOURCE, DEFINE_DATASET, DEFINE_EVENT, DEFINE_FIELD, DEFINE_FRAME, DEFINE_IMAGE, DEFINE_MENU, DEFINE_PARAMETER, DEFINE_PROPERTY, DEFINE_PROPERTY_GET, DEFINE_PROPERTY_SET, 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, DESCRIPTION, DESTRUCTOR, DIGIT, DISABLE_TRIGGERS, DIVIDE, DOT, DOTNET_DELEGATE, DROP_INDEX, DROP_TABLE, DROP_VIEW, DSTRING, DUMP_NAME, DYNAMIC, EDITING_BLOCK, EMBEDDED_ASSIGNMENT, EMBEDDED_SQL, EMPTY_TEMP_TABLE, END_ATTR, END_ATTR_METH, END_BUFFERTYPES, END_CALLGRAPH, END_FIELDTYPES, END_FUNCTYPES, END_FWD_EXTENSION, END_INDEX_MATCH_TYPES, END_LVALUE, END_METATYPES, END_METH, END_MULTIWORD, END_NATIVE_VARTYPES, END_RECORDTYPES, END_RESERVED, END_SCHEMA, END_SCHEMAKW, END_UNRESERVED, END_VARTYPES, END_WIDGETS, EOF, EQUALITY_MATCH, EQUALS, EVENT, EVENT_LIST, EVENT_SIGNATURE, EXCLUSIVE_LOCK_LITERAL, EXPANDED_SCOPE, EXPORT_FIELD, EXPRESSION, EXTERNAL_PROCEDURE, FIELD_BIGINT, FIELD_BLOB, FIELD_BYTE, FIELD_CHAR, FIELD_CLASS, FIELD_CLOB, FIELD_COM_HANDLE, FIELD_DATE, FIELD_DATETIME, FIELD_DATETIME_TZ, FIELD_DEC, FIELD_DOUBLE, FIELD_FIXCHAR, FIELD_FLOAT, FIELD_HANDLE, FIELD_INT, FIELD_INT64, FIELD_LOGICAL, FIELD_RAW, FIELD_RECID, FIELD_ROWID, FIELD_SHORT, FIELD_TIME, FIELD_TIMESTAMP, FILE_RESOURCE, FILENAME, FILEROOT, FILTER_SPEC, FORM_ITEM, FORMAT_PHRASE, FRAME_ALLOC, FRAME_ELEMENT, FRAME_LOCK, FRAME_PHRASE, FRAME_SCOPE, FRAME_UNLOCK, FREE_REFERENCE, FROZEN, FUNC_CHAR, FUNC_CLASS, FUNC_COM_HANDLE, FUNC_DATE, FUNC_DATETIME, FUNC_DATETIME_TZ, FUNC_DEC, FUNC_HANDLE, FUNC_INT, FUNC_INT64, FUNC_LOGICAL, FUNC_LONGCHAR, FUNC_MEMPTR, FUNC_POLY, FUNC_RAW, FUNC_RECID, FUNC_ROWID, FUNCTION, FUNCTION_CALL, GROUP_BY, GT, GTE, HANDLE_TO, HIDDEN, IMPORT_FIELD, IN_WIDGET_POOL, INCLUDE_FILE, INCLUDES, INCREMENT, INDEX, INDEX_FIELD, INLINE_VAR_DEF, INLINE_VAR_DEF_ARRAY, INNER_BLOCK, INNER_JOIN, INPUT_CLEAR, INPUT_CLOSE, INPUT_FROM, INPUT_OUTPUT_CLOSE, INPUT_OUTPUT_THRU, INPUT_THRU, INSERT_INTO, INT_PROC, INTERFACE_DEF, INTERNAL_PROCEDURE, IO_OPTIONS, IPC_RESOURCE, IS_NOT_NULL, IS_NULL, JUNK, KEY_FIELD, KEY_FUNCTION, KW_3D, KW_ABBV, KW_ABORT, KW_ABS, KW_ABSTRACT, KW_ACC_CHG, KW_ACC_RCHG, KW_ACCEL, KW_ACCUM, KW_ACT_FORM, KW_ACT_WIN, KW_ACTIVE, KW_ACTOR, KW_ADD, KW_ADD_1ST, KW_ADD_BUF, KW_ADD_C_C, KW_ADD_C_F, KW_ADD_EVTP, KW_ADD_F_F, KW_ADD_HENT, KW_ADD_IDXF, KW_ADD_INVL, KW_ADD_L_C, KW_ADD_LAST, 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_ALIAS, KW_ALL, KW_ALLW_C_S, KW_ALLW_REP, KW_ALT_KEY, KW_ALTER, KW_ALW_ON_T, KW_AMBIG, KW_ANALYZ, KW_AND, KW_ANSI_ONL, KW_ANY, KW_ANY_KEY, KW_ANY_PRT, KW_ANYWHERE, KW_APP_INFO, KW_APP_PW, KW_APP_UID, KW_APPEND, KW_APPEND_C, KW_APPEND_L, KW_APPL, KW_APPL_A_B, KW_APPL_CBK, KW_APPL_CID, KW_APPLY, KW_AREA, KW_ARR_MSG, KW_AS, KW_ASC, KW_ASCEND, KW_ASCII_2H, KW_ASK_OVER, KW_ASSEMBLY, KW_ASSIGN, KW_ASYNC, KW_ASYNC_RC, KW_ASYNC_RH, KW_AT, KW_ATT_DSRC, KW_ATT_PLST, KW_ATTR, KW_ATTR_NAM, KW_AUD_CTRL, KW_AUD_ENAB, KW_AUD_EV_C, KW_AUD_POL, KW_AUTHEN_F, KW_AUTHORZN, KW_AUTO_COM, KW_AUTO_D_X, KW_AUTO_DEL, KW_AUTO_END, KW_AUTO_GO, KW_AUTO_IND, KW_AUTO_RES, KW_AUTO_RET, KW_AUTO_SYN, KW_AUTO_VAL, KW_AUTO_ZAP, KW_AUTOMATC, KW_AVAIL, KW_AVERAGE, KW_AVG, KW_AVL_FMTS, KW_AVL_MSGS, KW_B_ENDIAN, KW_B4_BUFF, KW_B4_FILL, KW_B4_HIDE, KW_B4_R_F, KW_B4_ROWID, KW_B4_TABLE, KW_BACK_TAB, KW_BACKGRND, KW_BACKSP, KW_BACKWARD, KW_BAS_LOGG, KW_BASE_ADE, KW_BASE_KEY, KW_BASE64_D, KW_BASE64_E, KW_BATCH_MO, KW_BATCH_SZ, KW_BEG_EV_G, KW_BEGINS, KW_BELL, KW_BETWEEN, KW_BGCOLOR, KW_BIGINT, KW_BINARY, KW_BIND, KW_BIND_WH, KW_BLANK, KW_BLK_IT_D, KW_BLK_LVL, KW_BLOB, KW_BLOCK, 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_BREAK, KW_BREAK_L, KW_BROWSE, KW_BTOS, KW_BUF_COMP, KW_BUF_COPY, KW_BUF_CREA, KW_BUF_DEL, KW_BUF_FLD, KW_BUF_HNDL, KW_BUF_NAME, KW_BUF_REL, KW_BUF_VAL, KW_BUF_VLID, KW_BUFFER, KW_BUFFER_C, KW_BUFFER_L, KW_BUFPOOL, KW_BUFRPOOL, KW_BUTTON, KW_BY, 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, KW_CALL_NAM, KW_CALL_TYP, KW_CALLBACK, KW_CAN_CREA, KW_CAN_DEL, KW_CAN_DO, KW_CAN_DUMP, KW_CAN_FIND, KW_CAN_LOAD, KW_CAN_QRY, KW_CAN_READ, KW_CAN_SET, KW_CAN_WRT, KW_CANC_BRK, KW_CANCEL_B, KW_CANCEL_P, KW_CANCEL_R, KW_CANCELLD, KW_CAPS, KW_CARE_PNT, KW_CASE, KW_CASE_SEN, KW_CAST, KW_CATCH, KW_CBIT, KW_CDECL, KW_CEASE, KW_CENTER, KW_CFG_NAME, KW_CHAINED, KW_CHAR, KW_CHAR_LEN, KW_CHARSET, KW_CHECK, KW_CHECK_AM, KW_CHECKED, KW_CHLD_BUF, KW_CHLD_NUM, KW_CHOICES, KW_CHOOSE, KW_CHR, KW_CLASS, KW_CLEAR, KW_CLIP, KW_CLNT_C_I, KW_CLNT_PRL, KW_CLNT_TTY, KW_CLNT_TYP, KW_CLNT_WS, KW_CLOB, KW_CLOB_COL, KW_CLOB_CP, KW_CLOB_TYP, KW_CLONE_ND, KW_CLOSE, KW_CLOSE_AP, KW_CLOSE_LG, KW_CLR_AP_C, KW_CLR_LOG, KW_CLR_S_AR, KW_CLR_SEL, KW_CLS_TYPE, KW_CNCL_R_A, KW_CNTRL_BX, KW_CNTRL_FR, KW_CNTRL_NM, KW_CODE, KW_CODEBASE, KW_COL, KW_COL_BGC, KW_COL_CP, KW_COL_DC, KW_COL_FGC, KW_COL_FONT, KW_COL_LAB, KW_COL_MOV, KW_COL_OF, KW_COL_PFC, KW_COL_R_O, KW_COL_RES, KW_COL_SCR, KW_COLLATE, KW_COLON, KW_COLON_AL, KW_COLOR, KW_COLR_TAB, KW_COLUMNS, KW_COM_HNDL, KW_COM_SELF, KW_COMBO_BX, KW_COMMAND, KW_COMPARE, KW_COMPARES, KW_COMPILE, KW_COMPILER, KW_COMPLETE, KW_CONN, KW_CONN_ED, KW_CONSTRUC, KW_CONTAINS, KW_CONTENTS, KW_CONTROL, KW_CONTROLS, KW_CONVERT, KW_COOKIE_D, KW_COPY, KW_COUNT, KW_COUNT_OF, KW_COVERAGE, KW_CP, KW_CP_CVT, KW_CPCASE, KW_CPCOLL, KW_CPINTERN, KW_CPLOG, KW_CPPRINT, KW_CPRCODEI, KW_CPRCODEO, KW_CPSTREAM, KW_CPTERM, KW_CPY_DSET, KW_CPY_LOB, KW_CPY_SATR, KW_CPY_TTBL, KW_CRC, KW_CRC_VAL, KW_CREAT_LK, KW_CREAT_ND, KW_CREAT_NN, KW_CREAT_OA, KW_CREAT_RL, KW_CREAT_TF, KW_CREATE, KW_CTOS, KW_CTX, KW_CTX_H, KW_CTX_H_F, KW_CTX_H_ID, KW_CTX_POP, KW_CUR_CHAR, KW_CUR_CHG, KW_CUR_COL, KW_CUR_DATE, KW_CUR_DOWN, KW_CUR_ENV, KW_CUR_ITER, KW_CUR_LANG, KW_CUR_LEFT, KW_CUR_LINE, KW_CUR_OFF, KW_CUR_R_M, KW_CUR_RES, KW_CUR_RGHT, KW_CUR_UP, KW_CUR_VAL, KW_CUR_WIN, KW_CURRENCY, KW_CURRENT, KW_CURSOR, KW_CUT, KW_CVT_2OFF, KW_CVT_3D_C, KW_CVT_DT, KW_CYCLE, KW_DATA_BND, KW_DATA_E_R, KW_DATA_REL, KW_DATA_SCM, KW_DATA_SM, KW_DATA_SRC, KW_DATABASE, KW_DATASET, KW_DATASRV, KW_DATATYPE, KW_DATE, KW_DATE_FMT, KW_DATE_TZ, KW_DATETIME, KW_DAY, KW_DB_CTXT, KW_DB_REF, KW_DB_REM_H, KW_DBCOLL, KW_DBCP, KW_DBG_ALRT, KW_DBG_LST, KW_DBNAME, KW_DBPARAM, KW_DBREST, KW_DBTASKID, KW_DBTYPE, KW_DBVERS, KW_DCOLOR, KW_DDE, KW_DDE_ERR, KW_DDE_ID, KW_DDE_ITEM, KW_DDE_NAME, KW_DDE_NOTI, KW_DDE_TOPI, KW_DEBLANK, KW_DEBUG, KW_DEBUGGER, KW_DEC, KW_DECIMALS, KW_DECL_NSP, KW_DECLARE, KW_DECRYPT, KW_DEF_ACTN, KW_DEF_BUFH, KW_DEF_COMM, KW_DEF_EXTN, KW_DEF_NOXL, KW_DEF_POP, KW_DEF_STR, KW_DEF_UEVM, KW_DEF_VAL, KW_DEF_WIN, KW_DEFAULT, KW_DEFINE, KW_DEFLT_BN, KW_DEL_C_R, KW_DEL_CHAR, KW_DEL_COL, KW_DEL_COOK, 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_R, KW_DEL_S_RS, KW_DEL_WORD, KW_DELEGATE, KW_DELETE, KW_DELIMIT, KW_DESCEND, KW_DESCR, KW_DESEL_FR, KW_DESEL_R, KW_DESEL_SR, KW_DESELCTN, KW_DESTRUCT, KW_DET_DSRC, KW_DIALOG, KW_DICT, KW_DIR, KW_DIRECTRY, KW_DIS_A_ZA, KW_DIS_D_TR, KW_DIS_L_TR, KW_DIS_REDR, KW_DISABL_C, KW_DISABLE, KW_DISABLED, KW_DISCONN, KW_DISP, KW_DISP_MSG, KW_DISP_TYP, KW_DISP_TZ, KW_DISPATCH, KW_DISTINCT, KW_DMP_NAME, KW_DO, KW_DOMAIN_D, KW_DOMAIN_N, KW_DOMAIN_T, KW_DOS, KW_DOUBLE, KW_DOWN, KW_DRAG_EN, KW_DROP, KW_DROP_DWN, KW_DROP_FN, KW_DROP_LST, KW_DROP_TAR, KW_DSET_HND, KW_DSL_MGR, KW_DUMP, KW_DUMP_LGN, KW_DYN_CAST, KW_DYN_CURV, KW_DYN_FUNC, KW_DYN_INVK, KW_DYN_NEW, KW_DYN_NEXV, KW_DYNAMIC, KW_E_PROC_C, KW_EACH, KW_ECHO, KW_EDGE_C, KW_EDGE_P, KW_EDIT_B_T, KW_EDIT_C_P, KW_EDIT_C_U, KW_EDIT_CLR, KW_EDIT_CPY, KW_EDIT_CUT, KW_EDIT_PAS, KW_EDIT_TAB, KW_EDIT_UND, KW_EDITING, KW_EDITOR, KW_ELSE, KW_EMPTY, KW_EMPTY_DS, KW_EMPTY_SN, KW_EMPTY_TT, KW_ENABLE, KW_ENABLE_C, KW_ENABLE_E, KW_ENABLED, KW_ENC_AMK, KW_ENC_SALT, KW_ENCODE, KW_ENCODING, KW_ENCRYPT, KW_END, KW_END_B_SN, KW_END_DOC, KW_END_ELEM, KW_END_ERR, KW_END_EV_G, KW_END_F_D, KW_END_MOV, KW_END_RESZ, KW_END_RRES, KW_END_SEAR, KW_END_USER, KW_ENDKEY, KW_ENT_TLST, KW_ENTER_MB, KW_ENTERED, KW_ENTRY, KW_EQ, KW_ERR_CODE, KW_ERR_COL, KW_ERR_OBJD, KW_ERR_ROW, KW_ERR_S_T, KW_ERR_STAT, KW_ERR_STR, KW_ERROR, KW_ESCAPE, KW_ETIME, KW_EVENTS, KW_EVT_GRID, KW_EVT_PROC, KW_EVT_TYPE, KW_EXC_LOCK, KW_EXCEPT, KW_EXCL_ID, KW_EXCL_WEB, KW_EXEC_LOG, KW_EXECUTE, KW_EXISTS, KW_EXIT, KW_EXP, KW_EXPAND, KW_EXPANDBL, KW_EXPLICIT, KW_EXPORT, KW_EXPORT_P, KW_EXTENDED, KW_EXTENT, KW_EXTERN, KW_F_KEY_H, KW_FETCH, KW_FETCH_SR, KW_FGCOLOR, KW_FIELD, KW_FIL_C_D, KW_FIL_C_T, KW_FIL_INFO, KW_FIL_M_D, KW_FIL_M_T, KW_FIL_NAME, KW_FIL_OFF, KW_FIL_SIZE, KW_FIL_TYPE, KW_FILE, KW_FILL, KW_FILL_IN, KW_FILL_MOD, KW_FILL_WST, KW_FILLED, KW_FILTERS, KW_FINAL, KW_FINALLY, KW_FIND, KW_FIND_1ST, KW_FIND_BR, KW_FIND_CS, KW_FIND_CUR, KW_FIND_FD, KW_FIND_GLO, KW_FIND_LST, KW_FIND_NO, KW_FIND_NXT, KW_FIND_PO, KW_FIND_PRV, KW_FIND_SEL, KW_FIND_UNI, KW_FIND_WA, KW_FINDER, KW_FIR_DSET, KW_FIRST, KW_FIRST_AR, KW_FIRST_BU, KW_FIRST_CH, KW_FIRST_CO, KW_FIRST_DS, KW_FIRST_FM, KW_FIRST_OB, KW_FIRST_OF, KW_FIRST_PR, KW_FIRST_QR, KW_FIRST_SO, KW_FIRST_SR, KW_FIRST_SS, KW_FIRST_TI, KW_FIT_LCOL, KW_FIX_CP, KW_FIXCHAR, KW_FIXD_ONL, KW_FLAT_BUT, KW_FLD_TRG, KW_FLOAT, KW_FMT_DT, KW_FOCUS, KW_FOCUS_R, KW_FOCUS_RS, KW_FONT, KW_FONT_TAB, KW_FOR, KW_FORCE_F, KW_FORE, KW_FORM, KW_FORM_INP, KW_FORM_LIN, KW_FORMAT, KW_FORMATTE, KW_FORWARD, 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_SPACE, KW_FR_VAL, KW_FR_X, KW_FR_Y, KW_FRAGMENT, KW_FRAME, KW_FREQ, KW_FROM, KW_FROM_CHR, KW_FROM_CUR, KW_FROM_PIX, KW_FROZEN, KW_FULL_H_C, KW_FULL_H_P, KW_FULL_W_C, KW_FULL_W_P, KW_FULLPATH, KW_FUNC_C_T, KW_FUNCT, KW_FWD_ONLY, KW_GEN_MD5, KW_GEN_PBEK, KW_GEN_PBES, KW_GEN_RNDK, KW_GEN_UUID, KW_GET, KW_GET_1ST, KW_GET_A_CT, KW_GET_A_N, KW_GET_ATTR, KW_GET_B_A, KW_GET_B_OR, KW_GET_BDAT, KW_GET_BITS, KW_GET_BLUE, KW_GET_BR_C, KW_GET_BUFH, KW_GET_BYTE, KW_GET_BYTS, KW_GET_CBPC, KW_GET_CBPN, KW_GET_CFG, KW_GET_CFGV, KW_GET_CGI, KW_GET_CGIL, KW_GET_CGIV, KW_GET_CGL, KW_GET_CGLV, KW_GET_CHG, KW_GET_CHLD, KW_GET_CLL, KW_GET_CODP, KW_GET_COLL, KW_GET_COOK, KW_GET_CP, KW_GET_CREL, KW_GET_CUR, KW_GET_D_E, KW_GET_D_F, KW_GET_DBL, KW_GET_DIR, KW_GET_DS_B, KW_GET_DYN, KW_GET_ERRC, KW_GET_ERRR, KW_GET_FILE, KW_GET_FLD, KW_GET_FLT, KW_GET_FNAM, KW_GET_FOFF, KW_GET_GRN, KW_GET_HD_E, KW_GET_I64, KW_GET_IBNN, KW_GET_IBQN, KW_GET_ITER, KW_GET_K_V, KW_GET_L_V, KW_GET_LAST, KW_GET_LNBI, KW_GET_LONG, 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_PREV, KW_GET_PROP, KW_GET_PRT, KW_GET_PTR, KW_GET_QNBI, KW_GET_R_R, KW_GET_RED, KW_GET_REL, KW_GET_RGB, KW_GET_S_O, KW_GET_SELW, KW_GET_SER, KW_GET_SHRT, KW_GET_SIG, KW_GET_SRCB, KW_GET_STR, KW_GET_SZ, KW_GET_T_S, KW_GET_TBI, KW_GET_TBNN, KW_GET_TBQN, KW_GET_THCH, KW_GET_THPX, KW_GET_TI, KW_GET_TOPB, KW_GET_TWCH, KW_GET_TWPX, KW_GET_U_F, KW_GET_UBI, KW_GET_UL, KW_GET_USHT, KW_GET_VAL, KW_GET_VBI, KW_GET_VBNN, KW_GET_VBQN, KW_GET_WAIT, KW_GETATTRI, KW_GLOBAL, KW_GO, KW_GO_ON, KW_GO_PEND, KW_GOTO, KW_GRANT, KW_GRAPHIC, 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, KW_GROUP_BX, KW_GT, KW_GTE, KW_GUID, KW_GW, KW_HANDLE, KW_HANDLER, KW_HAS_LOBS, KW_HAS_REC, KW_HAVING, KW_HEADER, KW_HEIGHT_C, KW_HEIGHT_P, KW_HELP, KW_HELP_TOP, KW_HEX_DECD, KW_HEX_ENCD, KW_HID_FLD, KW_HID_FLDL, KW_HIDDEN, KW_HIDE, KW_HINT, KW_HOME, KW_HONOR_PK, KW_HONOR_RK, KW_HORIZ, KW_HOST_B_O, 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_ICFPARM, KW_ICON, KW_IDEPHWND, KW_IDEWNTYP, KW_IDX_FLD, KW_IDX_HINT, KW_IDX_INFO, KW_IDX_REPO, KW_IF, KW_IGN_CMOD, KW_IMAGE, KW_IMG_DOWN, KW_IMG_INS, KW_IMG_SZ, KW_IMG_SZ_C, KW_IMG_SZ_P, KW_IMG_UP, KW_IMM_DISP, KW_IMP_NODE, KW_IMP_PRNC, KW_IMPLEMTS, KW_IMPORT, KW_IN, KW_IN_HNDL, KW_IN_OUT, KW_INACTIVE, KW_INC_EX_I, KW_INCR, KW_INDEX, KW_INDICAT, KW_INFO, KW_INH_BGC, KW_INH_FGC, KW_INHERITS, KW_INIT, KW_INIT_D_T, KW_INIT_DIR, KW_INIT_FLT, KW_INIT_SES, KW_INITIATE, KW_INNER, KW_INNER_C, KW_INNER_L, KW_INPT_VAL, KW_INPUT, KW_INS_ATTR, KW_INS_B4, KW_INS_BTAB, KW_INS_COL, KW_INS_FILE, KW_INS_FLD, KW_INS_FLDD, KW_INS_FLDL, KW_INS_MODE, KW_INS_ROW, KW_INS_STR, KW_INS_TAB, KW_INSERT, KW_INST_PRC, KW_INT, KW_INT_ENT, KW_INT64, KW_INTERFAC, KW_INTERVAL, KW_INTO, KW_INVOKE, KW_IS, KW_IS_ATTR, KW_IS_CLASS, KW_IS_COLCP, KW_IS_CP_FX, KW_IS_LEAD, KW_IS_OPEN, 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_JOIN, KW_JOIN_BY, KW_KBLABEL, KW_KEEP_CON, KW_KEEP_MSG, KW_KEEP_SEC, KW_KEEP_TAB, KW_KEEP_ZOR, KW_KEY, KW_KEYCODE, KW_KEYFUNC, KW_KEYLAB, KW_KEYS, KW_KW, KW_KW_ALL, KW_L_ENDIAN, KW_L_TRIM, KW_LAB_BGC, KW_LAB_DC, KW_LAB_FGC, KW_LAB_FONT, KW_LAB_PFC, KW_LABEL, KW_LABELS, KW_LANDSCAP, KW_LANGUAGE, KW_LARGE, KW_LAST, KW_LAST_AR, KW_LAST_BAT, KW_LAST_CH, KW_LAST_EVT, KW_LAST_FRM, KW_LAST_OBJ, KW_LAST_OF, KW_LAST_PRC, KW_LAST_SOC, KW_LAST_SRV, KW_LAST_SS, KW_LAST_TI, KW_LASTKEY, KW_LC, KW_LCHR_2NV, KW_LDBNAME, KW_LEAVE, KW_LEFT, KW_LEFT_AL, KW_LEFT_END, KW_LEFT_MC, KW_LEFT_MD, KW_LEFT_MDC, KW_LEFT_MU, KW_LENGTH, KW_LG_2_SM, KW_LIB, KW_LIKE, KW_LIKE_SEQ, KW_LINE, KW_LINE_CNT, KW_LIST_ITM, KW_LIST_PNM, KW_LISTING, KW_LISTINGS, KW_LIT_QSTN, KW_LOAD, KW_LOAD_DMN, KW_LOAD_I_D, KW_LOAD_I_I, KW_LOAD_I_U, KW_LOAD_ICO, KW_LOAD_IMG, KW_LOAD_M_P, KW_LOAD_PIC, KW_LOAD_S_I, KW_LOADCTRL, KW_LOB_AREA, KW_LOB_BYTE, KW_LOB_DIR, KW_LOB_SIZE, KW_LOC_C_N, KW_LOC_HOST, KW_LOC_L_N, KW_LOC_NAME, KW_LOC_P_ID, KW_LOC_PORT, KW_LOC_S_ID, KW_LOC_TYPE, KW_LOCK_REG, KW_LOCKED, KW_LOG, KW_LOG_A_EV, KW_LOG_E_TS, KW_LOG_EN_T, KW_LOG_HOST, KW_LOG_ID, KW_LOG_MGR, KW_LOG_STAT, KW_LOG_THRS, KW_LOGF_NAM, KW_LOGG_LEV, KW_LOGICAL, KW_LOGOUT, KW_LONG, KW_LONGCHAR, KW_LOOKAHD, KW_LOOKUP, KW_LST_EVNT, KW_LST_PAIR, KW_LST_QRY, KW_LST_SET, KW_LST_WID, KW_LT, KW_LTE, KW_MACH_CLS, KW_MAINMENU, KW_MAN_HIGH, KW_MAND, KW_MAP, KW_MARG_EX, KW_MARG_H_C, KW_MARG_H_P, KW_MARG_W_C, KW_MARG_W_P, KW_MATCHES, KW_MAX, KW_MAX_BTN, KW_MAX_CHAR, KW_MAX_D_G, KW_MAX_H_C, KW_MAX_H_P, KW_MAX_HT, KW_MAX_ROWS, KW_MAX_SZ, KW_MAX_VAL, KW_MAX_W_C, KW_MAX_W_P, KW_MAX_WID, KW_MAXIMIZE, KW_MD5_DIG, KW_MD5_VAL, KW_MDL_MC, KW_MDL_MD, KW_MDL_MDC, KW_MDL_MU, KW_MEMBER, KW_MEMPTR, 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_MESSAGES, KW_METHOD, 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_MOD, KW_MODIFIED, KW_MONTH, KW_MOU_MC, KW_MOU_MD, KW_MOU_MDC, KW_MOU_MU, KW_MOU_MVC, KW_MOU_MVD, KW_MOU_MVDC, KW_MOU_MVU, KW_MOU_PTR, KW_MOU_SC, KW_MOU_SD, KW_MOU_SDC, KW_MOU_SU, KW_MOU_XC, KW_MOU_XD, KW_MOU_XDC, KW_MOU_XU, KW_MOUSE, KW_MOV_2_B, KW_MOV_2_T, KW_MOV_2EOF, KW_MOV_A_T, KW_MOV_B_T, KW_MOV_COL, KW_MOVABLE, KW_MOVE, KW_MPE, KW_MPTR_2NV, KW_MSG, KW_MSG_AFNT, KW_MSG_AREA, KW_MSG_DIG, KW_MSG_LINE, KW_MTIME, KW_MULT_CMP, KW_MULT_KEY, KW_MULTI_IN, KW_MULTIPLE, 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_NEW, KW_NEW_INST, KW_NEW_LINE, KW_NEW_ROW, KW_NEXT, KW_NEXT_COL, KW_NEXT_ERR, KW_NEXT_FR, KW_NEXT_PMT, KW_NEXT_RID, KW_NEXT_SIB, KW_NEXT_TAB, KW_NEXT_VAL, KW_NEXTWORD, KW_NNMSP_SL, KW_NO_APPLY, KW_NO_ARMSG, KW_NO_ASSGN, KW_NO_ATTR, KW_NO_ATTRL, KW_NO_AUTOV, KW_NO_BIND, KW_NO_BOX, KW_NO_COLS, KW_NO_CONS, KW_NO_CUR_V, KW_NO_CV_3D, KW_NO_CVT, KW_NO_DEBUG, KW_NO_DRAG, KW_NO_ECHO, KW_NO_EM_SP, KW_NO_ERROR, KW_NO_FILL, KW_NO_FOCUS, KW_NO_HELP, KW_NO_HIDE, KW_NO_IDX_H, KW_NO_INHBG, KW_NO_INHFG, KW_NO_JOIN, KW_NO_LABEL, KW_NO_LOBS, KW_NO_LOCK, KW_NO_LOOKA, KW_NO_MAP, KW_NO_MSG, KW_NO_OVRRD, KW_NO_PAUSE, KW_NO_PRE, KW_NO_RET_V, KW_NO_ROW_M, KW_NO_SCH_M, KW_NO_SCR_V, KW_NO_SEP_C, KW_NO_SEPS, KW_NO_TAB_S, KW_NO_UNDL, KW_NO_UNDO, KW_NO_VALID, KW_NO_WAIT, KW_NO_WRAP, KW_NODE_V2M, KW_NODE_VAL, KW_NODV_2LC, KW_NONE, KW_NORMAL, KW_NORMALZE, KW_NOT, KW_NOT_ACTV, KW_NOT_CS, KW_NOW, KW_NULL, KW_NULLALWD, KW_NUM_2RTN, KW_NUM_ALIA, KW_NUM_BUFF, KW_NUM_BUTT, KW_NUM_CH_R, KW_NUM_CHLN, KW_NUM_COL, KW_NUM_COPY, KW_NUM_D_P, KW_NUM_DBS, KW_NUM_DROP, KW_NUM_ENT, KW_NUM_FLD, KW_NUM_FMT, KW_NUM_FMTS, KW_NUM_HD_E, KW_NUM_ITER, KW_NUM_ITMS, KW_NUM_LK_C, KW_NUM_LNS, KW_NUM_LOGF, KW_NUM_MSG, KW_NUM_PARM, KW_NUM_REF, KW_NUM_REL, KW_NUM_REPL, KW_NUM_RES, KW_NUM_SEP, KW_NUM_SR, KW_NUM_SRCB, KW_NUM_SW, KW_NUM_TABS, KW_NUM_TOPB, KW_NUM_V_C, KW_NUMERIC, KW_OBJECT, KW_OCT_LEN, KW_OF, KW_OFF, KW_OFF_END, KW_OFF_HOME, KW_OK, KW_OK_CAN, KW_OLD, KW_OLE_INVL, KW_OLE_NAML, KW_ON, KW_ON_FR_B, KW_ONLY, KW_OPEN, KW_OPEN_L_A, KW_OPEN_URL, KW_OPSYS, KW_OPTION, KW_OPTIONS, KW_OR, KW_ORD_JOIN, KW_ORDER, KW_ORDINAL, KW_ORG_HAND, KW_ORG_ROID, KW_OS_APPND, KW_OS_CMD, KW_OS_COPY, KW_OS_DEL, KW_OS_DIR, KW_OS_DRV, KW_OS_ERR, KW_OS_G_ENV, KW_OS_MKDIR, KW_OS_REN, KW_OS2, KW_OTHER, KW_OUT_HDR, KW_OUT_HH, KW_OUT_JOIN, KW_OUT_MSGS, KW_OUTER, KW_OUTPUT, KW_OUTPUTCT, KW_OVERLAY, KW_OVERRIDE, KW_OWN_DOC, KW_OWNER, KW_P2J_RC, KW_PAGE, KW_PAGE_B, KW_PAGE_DWN, KW_PAGE_LFT, KW_PAGE_NUM, KW_PAGE_RT, KW_PAGE_SZ, KW_PAGE_T, 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_PARM, KW_PARSE_ST, KW_PART_KEY, KW_PASCAL, KW_PASSWD_F, KW_PASTE, KW_PATHNAME, KW_PAUSE, KW_PBE_H_AL, KW_PBE_KEYR, KW_PDBNAME, KW_PERF, KW_PERSIST, KW_PFCOLOR, KW_PICK, KW_PICK_ARE, KW_PICK_BTH, KW_PIX_COL, KW_PIX_ROW, KW_PIXELS, KW_POP_MENU, KW_POP_ONLY, KW_PORTRAIT, KW_POS, KW_PRECISN, KW_PREF_DS, KW_PREP_STR, KW_PREPARED, KW_PREPROC, KW_PRESEL, KW_PREV, KW_PREV_COL, KW_PREV_FR, KW_PREV_SIB, KW_PREV_T_I, KW_PREVWORD, KW_PRIMARY, KW_PRINTER, KW_PRIV_DAT, KW_PRIVATE, KW_PRIVILEG, KW_PRMT_FOR, KW_PROC, KW_PROC_C_T, KW_PROC_COM, KW_PROC_HND, KW_PROC_ST, KW_PROC_T_B, KW_PROC_TXT, KW_PROC_W_R, KW_PROCESS, KW_PROCNAME, KW_PRODATAS, KW_PROFILER, KW_PROFILNG, KW_PROG_SRC, KW_PROGNAME, KW_PROGRESS, KW_PROMPT, KW_PROMSGS, KW_PROPATH, KW_PROPERTY, KW_PROTECTD, KW_PROVER, KW_PROX_PWD, KW_PROX_UID, KW_PROXY, KW_PRS_C_D, KW_PRS_PROC, KW_PRT_C_H, KW_PRT_HDC, KW_PRT_NAME, KW_PRT_PORT, KW_PRT_SET, KW_PSC, KW_PUB_EVTS, KW_PUB_ID, KW_PUBLIC, KW_PUBLISH, KW_PUT, KW_PUT_BITS, KW_PUT_BYTE, KW_PUT_BYTS, KW_PUT_DBL, KW_PUT_FLT, KW_PUT_I64, KW_PUT_K_V, KW_PUT_LONG, KW_PUT_SHT, KW_PUT_STR, KW_PUT_UL, KW_PUT_USHT, KW_QRY_CLOS, KW_QRY_OFF, KW_QRY_OPEN, KW_QRY_PREP, KW_QRY_TUNE, KW_QUE_MSG, KW_QUERY, KW_QUEST, KW_QUIT, KW_QUOTER, KW_R_INDEX, KW_R_TRIM, KW_RADIO_B, KW_RADIO_S, KW_RANDOM, KW_RAW, KW_RAW_TRAN, KW_RCOD_INF, KW_READ, KW_READ_AVL, KW_READ_E_N, KW_READ_FIL, KW_READ_JSN, KW_READ_ONL, KW_READ_RES, KW_READ_XML, KW_READ_XSC, KW_READKEY, KW_REAL, KW_REC_LEN, KW_RECALL, KW_RECID, KW_RECT, KW_RECURSE, KW_REF_ONLY, KW_REFR_A_P, KW_REFRABLE, KW_REFRESH, KW_REG_DMN, KW_REJ_CHGS, KW_REJ_RCHG, KW_REJECTED, KW_REL_FLDS, KW_RELEASE, KW_RELS_ACT, KW_REM_ATTR, KW_REM_CHLD, KW_REM_EVTP, KW_REM_HOST, KW_REM_PORT, KW_REM_SUP, KW_REMOTE, KW_REP_CHLD, KW_REP_STXT, KW_REPEAT, KW_REPL_CRE, KW_REPL_DEL, KW_REPL_WRI, KW_REPLACE, KW_REPORTS, KW_REPOS, KW_REPOS_2I, KW_REPOS_2R, KW_REPOS_B, KW_REPOS_F, KW_REPOS_M, KW_REQUEST, KW_RESET, KW_RESIZABL, KW_RESIZE, KW_REST_RID, KW_RESULT, KW_RESUME_D, KW_RET_2SD, KW_RET_INS, KW_RET_SHAP, KW_RET_VAL, KW_RET_VDT, KW_RETAIN, KW_RETRY, KW_RETRY_C, KW_RETURN, KW_RETURNS, KW_REV_FROM, KW_REVERT, KW_REVOKE, KW_RGB_VAL, KW_RIGHT, KW_RIGHT_AL, KW_ROLES, KW_ROUND, KW_ROUNDED, KW_ROUTINEL, KW_ROW, KW_ROW_CRT, KW_ROW_CRTD, KW_ROW_DEL, KW_ROW_DELD, KW_ROW_DISP, KW_ROW_ENTR, KW_ROW_H_C, KW_ROW_H_P, KW_ROW_LEAV, KW_ROW_MARK, KW_ROW_MODD, KW_ROW_OF, KW_ROW_RESZ, KW_ROW_STAT, KW_ROW_UMOD, KW_ROW_UPD, KW_ROWID, KW_RT_END, KW_RT_MC, KW_RT_MD, KW_RT_MDC, KW_RT_MU, KW_RULE, KW_RULE_ROW, KW_RULE_Y, KW_RUN, KW_RUN_PROC, KW_RUN_W_O, KW_SAVE, KW_SAVE_AS, KW_SAVE_FIL, KW_SAVE_RCH, KW_SAVE_WST, KW_SAX_ATTR, KW_SAX_COMP, KW_SAX_PARE, KW_SAX_PARF, KW_SAX_PARN, KW_SAX_PARS, KW_SAX_READ, 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_WRIT, KW_SAX_WTAG, KW_SCH_CHG, KW_SCH_LOC, KW_SCH_MARS, KW_SCH_PATH, KW_SCHEMA, KW_SCR_2CR, KW_SCR_2ITM, KW_SCR_2SR, KW_SCR_DELT, KW_SCR_LEFT, KW_SCR_MODE, KW_SCR_NOT, KW_SCR_OFFS, KW_SCR_RPOS, KW_SCR_RT, KW_SCREEN, KW_SCRN_IO, KW_SCRN_LNS, KW_SCRN_VAL, KW_SCROLL, KW_SCROLL_H, KW_SCROLL_V, KW_SCROLLBA, KW_SCROLLBL, KW_SCROLLIN, KW_SDBNAME, KW_SEAL, KW_SEAL_TST, KW_SEAR_SLF, KW_SEAR_TRG, KW_SEARCH, KW_SECTION, KW_SECUR_P, KW_SEEK, KW_SEL_ALL, KW_SEL_END, KW_SEL_FOCR, KW_SEL_LST, KW_SEL_NEXT, KW_SEL_PREV, KW_SEL_ROW, KW_SEL_STRT, KW_SEL_TXT, KW_SELECT, KW_SELECTBL, KW_SELECTED, KW_SELECTN, KW_SELF, KW_SEND, KW_SEND_SQL, KW_SENSITIV, KW_SEP_CONN, KW_SEP_FGC, KW_SEPS, KW_SEQUENCE, KW_SERIALZH, KW_SERIALZN, KW_SERIALZR, KW_SERVER, KW_SESS_END, KW_SESSION, KW_SESSN_ID, KW_SET, KW_SET_A_CT, KW_SET_A_L, KW_SET_A_N, KW_SET_ACTR, KW_SET_ACTX, KW_SET_ATTR, KW_SET_B_OR, KW_SET_BLUE, KW_SET_BRK, KW_SET_BUF, KW_SET_C_P, KW_SET_CB_P, KW_SET_CBAC, KW_SET_CLNT, KW_SET_COMM, KW_SET_CONT, KW_SET_COOK, KW_SET_DBCL, KW_SET_DYN, KW_SET_EVMO, KW_SET_GRN, KW_SET_ISRC, 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_ROLL, KW_SET_RPOS, KW_SET_RRP, KW_SET_S_AR, KW_SET_S_O, KW_SET_SEL, KW_SET_SERD, KW_SET_SZ, KW_SET_T_S, KW_SET_U_F, KW_SET_W_S, KW_SET_WAIT, KW_SETTINGS, KW_SETUSER, KW_SH_LOCK, KW_SHA1_DIG, KW_SHARED, KW_SHORT, KW_SHOW_ITB, KW_SHOW_ST, KW_SIDE_L, KW_SIDE_L_H, KW_SIGNATUR, KW_SILENT, KW_SIMPLE, KW_SINGLE, KW_SIZE, KW_SIZE_C, KW_SIZE_P, KW_SKIP, KW_SKIP_D_R, KW_SLIDER, KW_SMAL_ICO, KW_SMAL_TTL, KW_SMALLINT, KW_SOAP_F, KW_SOAP_F_A, KW_SOAP_F_C, KW_SOAP_F_D, KW_SOAP_F_S, KW_SOAP_HDR, KW_SOAP_HER, KW_SOCKET, KW_SOME, KW_SORT, KW_SORT_ASC, KW_SORT_NUM, KW_SOURCE, KW_SPACE, KW_SQL, KW_SQL_WID, KW_SQRT, KW_SRC_PROC, KW_SRV_C_B, KW_SRV_C_BR, KW_SRV_C_C, KW_SRV_C_I, KW_SRV_OP_M, KW_SRV_SOCK, KW_SSL_SRVN, KW_ST_2_FIT, KW_STANDALN, KW_START, KW_START_BS, KW_START_DC, KW_START_EL, KW_START_MV, KW_START_RR, KW_START_RS, KW_START_SC, KW_STARTING, KW_STAT_A_F, KW_STAT_DET, KW_STATIC, KW_STATUS, KW_STATUS_A, KW_STDCALL, KW_STOP, KW_STOP_AFT, KW_STOP_D, KW_STOP_PRS, KW_STOPPED, KW_STORPROC, KW_STR_VAL, KW_STR_XREF, KW_STREAM, KW_STRICT, KW_STRING, KW_STRM_HND, KW_STRM_IO, KW_STUP_PAR, KW_SUB_AVG, KW_SUB_CNT, KW_SUB_M_H, KW_SUB_MAX, KW_SUB_MENU, KW_SUB_MIN, KW_SUB_TOT, KW_SUBSCRIB, KW_SUBSTIT, KW_SUBSTR, KW_SUBTYPE, KW_SUM, KW_SUP_NS_P, KW_SUP_PROC, KW_SUP_WARN, KW_SUPER, KW_SYM_EN_A, KW_SYM_EN_I, KW_SYM_EN_K, KW_SYM_SUPP, KW_SYNCHRON, KW_SYS_A_B, KW_SYS_DLG, KW_SYS_HELP, KW_SYS_ID, KW_TAB, KW_TAB_CRCL, KW_TAB_HAND, KW_TAB_LIST, KW_TAB_NUM, KW_TAB_POS, KW_TAB_SCAN, KW_TAB_STOP, KW_TAB_TRG, KW_TABLE, KW_TAG, KW_TAR_PROC, KW_TARGET, KW_TEMP_DIR, KW_TEMP_TAB, KW_TERM, KW_TERMINAT, KW_TEXT, KW_THEN, KW_THIS_OBJ, KW_THIS_PRC, KW_THROUGH, KW_THROW, KW_TIC_MARK, KW_TIME, KW_TIME_SRC, KW_TIMER, KW_TIMESTMP, KW_TIMEZONE, KW_TITL_BGC, KW_TITL_DC, KW_TITL_FGC, KW_TITL_FON, KW_TITLE, KW_TO, KW_TO_ROWID, KW_TODAY, KW_TOGGL_BX, KW_TOOLTIP, KW_TOOLTIPS, KW_TOP, KW_TOP_COL, KW_TOP_NAVQ, KW_TOP_ONLY, KW_TOPIC, KW_TOTAL, KW_TRAC_CHG, KW_TRAILING, KW_TRAN_I_P, KW_TRAN_MOD, KW_TRANS, KW_TRANSPAR, KW_TRC_FILT, KW_TRIGGER, KW_TRIGGERS, KW_TRIM, KW_TRUNC, KW_TT_PREP, KW_TTCP, KW_TXT_CURS, KW_TXT_SEG, KW_TXT_SEL, KW_TYPE, KW_TYPE_OF, KW_U_CTRL, KW_U_MSG, KW_U_PCTRL, KW_U_SERIAL, KW_UNBOX, KW_UNBUF, KW_UNDERLIN, KW_UNDO, KW_UNFORMAT, KW_UNION, KW_UNIQ_ID, KW_UNIQ_MAT, KW_UNIQUE, KW_UNIX, KW_UNIX_END, KW_UNL_HID, KW_UNLOAD, KW_UNS_BYTE, KW_UNS_LONG, KW_UNS_SHRT, KW_UNSUBSCR, KW_UP, KW_UPD_ATTR, KW_UPDATE, 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_IDX, KW_USE_REV, KW_USE_TXT, KW_USE_UND, KW_USE_WIDP, KW_USER_ID, KW_USERID, KW_USING, KW_USR_DATA, KW_UTC_OFF, KW_V6DISP, KW_V6FRAME, KW_VAL_CHG, KW_VAL_ENAB, KW_VAL_EVT, KW_VAL_EXPR, KW_VAL_HND, KW_VAL_MSG, KW_VAL_OBJ, KW_VAL_SEAL, KW_VAL_XML, KW_VALEXP, KW_VALIDATE, KW_VALMSG, KW_VALUE, KW_VALUES, KW_VAR, KW_VERBOSE, KW_VERSION, KW_VERT, KW_VIEW, KW_VIEW_AS, KW_VIEW_FCR, KW_VIRT_HC, KW_VIRT_HP, KW_VIRT_WC, KW_VIRT_WP, KW_VISIBLE, KW_VMS, KW_VOID, KW_WA_H_P, KW_WA_W_P, KW_WA_X, KW_WA_Y, KW_WAIT_FOR, KW_WARN, KW_WEB, KW_WEB_CTX, KW_WEB_OUT, KW_WEEK, KW_WHEN, KW_WHERE, KW_WHERE_ST, KW_WHILE, KW_WID_ENT, KW_WID_HAND, KW_WID_ID, KW_WID_LEAV, KW_WID_POOL, KW_WIDGET, KW_WIDTH, KW_WIDTH_C, KW_WIDTH_P, KW_WIN_CLOS, KW_WIN_DMIN, KW_WIN_MAX, KW_WIN_MIN, KW_WIN_NAME, KW_WIN_NORM, KW_WIN_RESI, KW_WIN_REST, KW_WIN_STAT, KW_WIN_SYS, KW_WINDOW, KW_WITH, KW_WORD_IDX, KW_WORD_WRP, KW_WORK_TAB, KW_WR_CDATA, KW_WR_CHARS, KW_WR_CMNT, KW_WR_D_ELM, KW_WR_DATA, 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_WRITE, KW_X, KW_X_DOC, KW_X_NODE, KW_X_OF, KW_XCODE, KW_XML_DTYP, KW_XML_NNAM, KW_XML_NTYP, KW_XML_SCHP, KW_XML_SNSP, KW_XREF, KW_XREF_XML, KW_Y, KW_Y_OF, KW_YEAR, KW_YEAR_OFF, KW_YES_NO, KW_YES_NO_C, LABEL, LABEL_DEF, LANGUAGES, LBRACKET, LEFT_OUTER_JOIN, LETTER, LIBRARY_PROCEDURE, LIBRARY_REF, LPARENS, LT, LTE, MANDATORY, MANY_TO_ONE, 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, METHOD_DEF, METHOD_INVOCATION, MINUS, MISSING, MORE, MULTIPLY, NATIVE_API, NATIVE_PROCESS, NATIVE_PROGRAM_RESOURCE, NETWORK_CONNECTION, NO_LOCK_LITERAL, NO_MATCH, NO_REFERENCE, NO_TRANSACTION, NO_WAIT_LITERAL, NOT_BETWEEN, NOT_ENTERED, NOT_EQ, NOT_EXISTS, NOT_IN, NOT_LIKE, NOT_NULL, NULL_TREE_LOOKAHEAD, NUM_LITERAL, OBJECT_INVOCATION, OCX_CONTROL, ONE_TO_MANY, ONE_TO_ONE, OPEN_CURSOR, OPEN_QUERY, OPTION, ORDER, ORDER_BY, OUTPUT_CLOSE, OUTPUT_THRU, OUTPUT_TO, PARAMETER, PARENT_CHILD_RELATION, PARENT_ID_RELATION, PLUS, PORT_TYPE, POSITION, PROCEDURE, PROCEDURE_FILE, PROCESS_EVENTS, PROPERTIES, PROPERTY_INVOCATION, PUT_CURSOR, PUT_FIELD, PUT_SCREEN, QUERY, QUERY_SUBST, RANGE_MATCH, RAW_STRING, RBRACKET, READ_AVAILABLE_LITERAL, READ_EXACT_NUM_LITERAL, RECORD_PHRASE, RELEASE_EXTERNAL, RELEASE_OBJECT, RIGHT_OUTER_JOIN, RPARENS, RSTRING, RUN_FILENAME, RUN_FILENAME_ON_SERVER, RUN_INT_PROC, RUN_INT_PROC_ON_SERVER, RUN_LIBRARY_REF, RUN_LIBRARY_REF_ON_SERVER, RUN_PORT_TYPE_ON_SERVER, RUN_PORT_TYPE_VALUE_ON_SERVER, RUN_STORED_PROCEDURE, RUN_SUPER, RUN_VALUE, RUN_VALUE_ON_SERVER, RUNTIME_BROWSE_OPTIONS, RUNTIME_FRAME_OPTIONS, SAVE_CACHE, SCHEMA_FILE, SEARCH_SELF_LITERAL, SEARCH_TARGET_LITERAL, SELF_REFERENCE, SEQUENCE, SHARE_LOCK_LITERAL, SHARED_LIBRARY, SORT_MATCH, SQL_WIDTH, SSTRING, STATEMENT, STR_OPTIONS, STREAM, STRING, STRONG_REFERENCE, SUB_TRANSACTION, SUPPORT_LVL_FULL, SUPPORT_LVL_FULL_WITH_LIMITATIONS, SUPPORT_LVL_NONE, SUPPORT_LVL_PARTIAL, SYM_CHAR, SYMBOL, SYS_HANDLE, SYSTEM_DIALOG_COLOR, SYSTEM_DIALOG_FONT, SYSTEM_DIALOG_GET_DIR, SYSTEM_DIALOG_GET_FILE, SYSTEM_DIALOG_PRINTER_SETUP, TABLE, TEMP_TABLE, TILDE, TRAILER, TRANSACTION, TRANSACTION_DISTINCT, TRANSACTION_MODE_AUTO, TRIGGER_BLOCK, TRIGGER_PHRASE, TRIGGER_PROCEDURE, UN_MINUS, UN_PLUS, UNKNOWN_RESOURCE, UNKNOWN_TOKEN, UNKNOWN_VAL, UPDATE_SQL, VALEXP, VALID_SYM_CHAR, VALIDATION, VALMSG, VAR_BYTE, VAR_CHAR, VAR_CLASS, VAR_COM_HANDLE, VAR_DATE, VAR_DATETIME, VAR_DATETIME_TZ, VAR_DEC, VAR_DOUBLE, VAR_FLOAT, VAR_HANDLE, VAR_INT, VAR_INT64, VAR_LOGICAL, VAR_LONG, VAR_LONGCHAR, VAR_MEMPTR, VAR_RAW, VAR_RECID, VAR_ROWID, VAR_SHORT, VAR_ULONG, VAR_USHORT, WEAK_REFERENCE, WEB_PROC, WHEN_LIST, WHERE_CURRENT_OF, 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, WIDGET_LIST, WIDGET_POOL, WITH_CHECK_OPTION, WITH_GRANT_OPTION, WORD_MATCH, WORK_TABLE, WS, XSTRING
Modifier | Constructor and Description |
---|---|
|
ProgressParser(antlr.ParserSharedInputState state) |
|
ProgressParser(antlr.TokenBuffer tokenBuf) |
protected |
ProgressParser(antlr.TokenBuffer tokenBuf,
int k) |
|
ProgressParser(antlr.TokenStream lexer) |
protected |
ProgressParser(antlr.TokenStream lexer,
int k) |
|
ProgressParser(antlr.TokenStream lexer,
SymbolResolver sr)
Constructs a parser using a lexer and a user-defined symbol resolver.
|
Modifier and Type | Method and Description |
---|---|
void |
access_mode()
Matches
KW_PUBLIC , KW_PROTECTD or
KW_PRIVATE . |
void |
accum_clause()
Matches the
ACCUM keyword and the optional following maximum
length. |
void |
accum_function()
This rule implements the special built-in
ACCUM function,
which can be used in an expression (which is what differentiates
it from the language statement of the same name). |
void |
accumulate_stmt()
Matches the
ACCUMULATE language statement. |
void |
add_temp_table_field(java.lang.Object table)
Matches a field definition when creating a temp-table using the
DEFINE TEMP-TABLE or DEFINE WORK-TABLE statements. |
void |
aggregate_phrase()
Matches an aggregate phrase, most often used in the
DISPLAY
language statement. |
void |
all_clause()
Matches the
ALL keyword and an optional list of fields
that should not be included. |
void |
alter_table_stmt()
Support SQL
ALTER TABLE directly in 4GL code. |
void |
and_expr()
Qualifying 3rd expression for the
BETWEEN operator. |
private void |
annotateVariable(java.lang.String name,
int type,
Aast node)
Handle annotation of variables.
|
void |
any_non_reserved_symbol()
|
void |
any_symbol_at_all()
Matches a
reserved_or_symbol() , a DB_SYMBOL ,
BOOL_TRUE , BOOL_FALSE or aFILENAME
and always returns a SYMBOL node. |
void |
application_clause()
Matches
APPLICATION clause followed by an expr() . |
void |
apply_stmt()
Matches the
APPLY language statement. |
void |
as_button_quirk(java.lang.String symName)
Matches an
AS BUTTON clause and adds a button widget as if an inline
DEFINE BUTTON had been implemented. |
void |
as_clause(java.lang.String varName,
boolean nativeTypes)
Matches the
AS language keyword that defines the data type
of a variable to be added to the variable dictionary. |
void |
as_field_clause(java.lang.String symName,
java.lang.Object table)
Matches the
AS language keyword that defines the data type
of a field to be added to the a temp-table. |
void |
assign_proc_handle()
Match the
integer-field = PROC-HANDLE clause of the
run_stored_proc_stmt() rule. |
void |
assign_stmt()
Matches an
ASSIGN Progress 4GL language statement. |
void |
assign_trigger_new_var_def()
Handles parsing of the NEW VALUE from the ASSIGN schema trigger procedure.
|
void |
assign_trigger_old_var_def(Aast likeRef)
Process the OLD variable definition option for an assignment trigger procedure.
|
void |
assign_type_syntax_stmt_list()
Matches all language statements that have assignment-like syntax.
|
void |
assign()
Implements the semantics of the assignment sub-expression in a Progress
ASSIGN language statement. |
void |
assignment()
Matches both forms of an assignment statement (explicit assignment to
an
lvalue and the alternate implicit discard of the
expression's return value). |
void |
asynch_clause()
Matches the
ASYNCHRONOUS clause and following options. |
java.lang.String |
at_base_field_clause(boolean matchSym)
Matches the
@ sign and the required following variable or
field name (see lvalue() ). |
void |
at_phrase()
This rule implements the at-phrase construct.
|
private void |
attachAllAssignSchemaValidation(antlr.ASTPair anchor,
Aast recordRef,
SymbolResolver sym,
boolean createFormatPhrase)
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.
|
private java.util.List<Aast> |
attachAssignSchemaValidation(antlr.ASTPair anchor,
Aast schemaRef,
java.lang.String schemaName,
java.lang.String bufName,
SymbolResolver sym)
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.
|
private java.util.List<Aast> |
attachAssignSchemaValidation(antlr.ASTPair anchor,
Aast fieldRef,
SymbolResolver sym)
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.
|
private void |
attachDeleteSchemaValidation(antlr.ASTPair anchor,
Aast recordRef,
SymbolResolver sym)
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.
|
private java.util.List<Aast> |
attachSchemaValidation(antlr.ASTPair anchor,
Aast valExp,
Aast valMsg,
java.lang.String schemaName,
java.lang.String bufName,
SymbolResolver sym,
java.lang.String help)
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.
|
void |
attribute_assign_clause()
Matches the
ASSIGN keyword and a list of space delimited
ATTRIBUTE assignment expressions. |
void |
attribute_assign()
|
void |
attribute_or_method()
This rule provides generic method and attribute support in a centralized
manner.
|
void |
auto_completion_clause()
Matches the
AUTO-COMPLETION clause as used in a phrase from a
VIEW-AS COMBO-BOX construct. |
void |
base_key_clause()
Matches the
BASE-KEY keyword and a following
external_name_spec() . |
java.lang.String |
before_table_clause()
Matches the
BEFORE-TABLE clause with the following symbol() . |
void |
block_level_stmt()
Matches the
KW_BLK_LVL keyword with a following on_event_phrase() . |
void |
block_list()
Matches all forms of inner blocks (nestable blocks - not procedures and
not functions) including
DO , REPEAT and
FOR . |
void |
block()
This is the primary top-level rule that recursively handles Progress 4GL
source files.
|
void |
broken_preproc_args()
Match anything except a
DOT or KW_NO_ERROR . |
void |
browse_all_list()
Matches the shorthand of specifying all fields (and optional exclude list
of fields) instead of an explicit field list, in the
browse_enable_phrase() rule. |
void |
browse_enable_phrase()
Matches the phrase which specifies which columns in the
column_spec() are enabled for input (always is preceded by the
ENABLE keyword). |
void |
browse_options_phrase()
Matches the browse options phrase that is almost the same as the frame
phrase construct (except it is only used in the defining browses).
|
void |
buffer_chars_or_lines_clause()
Matches the
BUFFER-CHARS chars and BUFFER-LINES lines clause
as used in a VIEW-AS EDITOR phrase. |
void |
buffer_compare_or_copy_stmt()
Matches the
BUFFER-COMPARE and BUFFER-COPY language statements
and all following constructs. |
void |
buffer_modification_list()
Matches the
EXCEPT or USING keywords and the required list
of following lvalue() . |
void |
buffer_name_clause()
|
void |
buffer_or_field_spec()
Matches the optional prefix
BUFFER or FIELD keyword and
the required following buffer (record(boolean, boolean, boolean) ) or field lvalue() . |
protected void |
buildTokenTypeASTClassMap() |
void |
button_reference()
Matches the
CANCEL-BUTTON or DEFAULT-BUTTON keywords and the
required following button name. |
void |
buttons_clause()
Matches the
BUTTONS keyword and the required following
button set. |
void |
by_clause()
Matches the
BY keyword and the required following expression. |
void |
cache_records()
Matches the
CACHE option for the DEFINE QUERY
language statement. |
void |
call_stmt()
Matches the
CALL language statement, the required
filename() of the invoked HLC (host language call) function and
and optional list of expr() (arguments). |
void |
can_find_function()
This rule implements the special built-in
CAN-FIND function,
which can be used in an expression. |
void |
case_sensitive()
Matches the
CASE-SENSITIVE keyword with the optional
preceeding NOT keyword. |
void |
case_stmt()
Matches the
CASE language statement. |
void |
cast_func()
Matches the
cast() function call. |
void |
catch_stmt()
Implements a
KW_CATCH block which is part of the structured
error handling added in 10.2x. |
void |
chained_object_members()
Implements the 8th precedence level of Progress 4GL expressions, the chaining of object
and handle references.
|
private void |
checkAndFixLabelWithReservedKeywordPrefix(int idx)
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.
|
private void |
checkExtraSpace(Aast binOperator)
The P4GL requires an additional space after keyword operators.
|
void |
choose_field_spec()
Matches an
lvalue() and an optional following
choose_help_clause() . |
void |
choose_help_clause()
Matches the
HELP keyword and the required following
STRING . |
void |
choose_keys_clause()
|
void |
choose_row_or_field_list()
Matches the
ROW or FIELD keyword and the required following
choose_field_spec() . |
void |
choose_stmt()
Matches the
CHOOSE language statement, the required following
choose_row_or_field_list() and all possible options (which can be
specified in any order). |
void |
class_def()
This rule creates the block structure for a class definition.
|
void |
class_event(java.lang.String cls,
boolean isStatic)
Matches all Progress 4GL class event references and the usage of the publish,
subscribe and unsubscribe methods.
|
void |
class_stmt()
Implements the structure of a
CLASS language statement. |
void |
clear_stmt()
Matches the
CLEAR language statement. |
private void |
clearTriggerScope(boolean oldBufScope)
Common code to remove a scope (symbol dictionary and schema scopes) for
a trigger.
|
void |
close_cursor_stmt()
Matches the
CLOSE keyword with a following symbol() . |
void |
close_query_stmt()
Matches a
CLOSE QUERY language statement and the required
following query name (see malformed_symbol() ). |
void |
close_stored_proc_stmt()
Matches the
CLOSE STORED-PROCEDURE language statement, the
following reserved_or_symbol() , the optional assign()
and optional where_clause() . |
void |
codepage_convert_phrase()
|
void |
collate_clause()
Matches the
COLLATE keyword and the required following
2 or 3 character expressions. |
void |
colon_constant()
Matches a specific
COLON literal clause used in the
format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean) . |
void |
color_field_list(java.util.Set<Aast> fields)
Aggregates (in a tree building sense) the list of all fields having
color(s) set by a
color_stmt() . |
void |
color_or_font_clause()
Matches the
COLOR or FONT clause. |
void |
color_phrase()
Matches the color_phrase construct of the Progress 4GL language.
|
void |
color_spec()
Matches the color_spec construct of the Progress 4GL language.
|
void |
color_stmt()
Matches the
COLOR language statement and the required
following color specification. |
void |
column_codepage()
Matches the
COLUMN-CODEPAGE option with a following
expr() . |
void |
column_format_phrase()
Matches the column format phrase construct of the Progress 4GL language
which is used in a
DEFINE BROWSE . |
void |
column_label()
Matches the
COLUMN-LABEL keyword and the required following
string. |
void |
column_ref()
Defines one column element in a list of columns to enable in the
browse_enable_phrase() . |
void |
column_spec()
Matches the column specification for a
DEFINE BROWSE
language statement which is started by a DISPLAY keyword. |
void |
columns_clause()
Matches the
COLUMNS keyword and the required preceding
numeric literal. |
void |
com_as_clause()
Matches the construct following a COM parameter which overrides the
default Progress type conversion with a more specific COM type conversion.
|
void |
com_connect_option()
|
void |
com_handle()
This is a convenience method that matches
lvalue() except a
validating semantic predicate is used to throw an exception if the
data type of the variable or field is not a COM-HANDLE . |
void |
com_parameter()
Matches a single COM parameter which is an
expr() and which may
have optional modifiers for overriding data types (see
com_as_clause() ) or for specifying passing parameters by pointer
(BY-POINTER or BY-VARIANT-POINTER ). |
void |
com_property_or_method()
Matches COM method and property references, their optional parenthesized
parameters list.
|
void |
combo_box_phrase()
Matches the
VIEW-AS COMBO-BOX phrase which is called from a
view_as_phrase(java.lang.String) . |
void |
comma_event_list()
Matches a comma delimited list of events.
|
void |
comma_events_of_widgets_clause()
Matches the
OR keyword, the required comma separated event
list, OF keyword and then a widget list. |
void |
comma_widget_list()
Matches a comma delimited list of widgets.
|
void |
command_clause()
Matches
COMMAND clause followed by an expr() . |
void |
command_token_list(boolean io_options)
This rule implements the command token list processing for the shell
command statements (
shell_command_stmt() ). |
Aast |
common_block_options()
Matches common options that a
FOR, DO or REPEAT Progress 4GL
language statement can implement. |
void |
compare_expr()
Implements the 4th lowest precedence level of Progress 4GL expressions
- the comparison operators.
|
void |
compares_when_block()
Matches the
COLON token followed by one or more
when_clause() constructs and terminated by an END
keyword. |
void |
compile_options_clause()
Matches the core set of options for the compile statement.
|
void |
compile_stmt()
Matches the
COMPILE language statement. |
void |
connect_options()
Matches any token except
NO-ERROR or DOT . |
void |
connect_stmt()
Matches a
CONNECT language statement, the following
database_name(boolean) and arbitrary connect options. |
void |
constant_form_item()
Matches the constant prefixed subclause of the
form_item(java.util.Set<com.goldencode.ast.Aast>) . |
void |
constructor_stmt() |
void |
constructor()
This rule creates the block structure for a constructor definition.
|
void |
content_array()
|
void |
context_help_file()
Matches the
CONTEXT-HELP-FILE keyword and the required
following filename() . |
private void |
convertStringTo(Aast node,
int newtype)
Helper function to convert a
STRING node into a node of the specified type. |
void |
copy_lob_stmt()
Matches the
COPY-LOB language statement. |
void |
crap_to_ignore()
Undocumented syntax found in working code that is ignored in Progress.
|
void |
create_alias_stmt()
Matches a
CREATE ALIAS language statement, and the following
database names (see database_name(boolean) ). |
void |
create_browse_stmt()
Matches a
CREATE BROWSE language statement, and the
following options. |
void |
create_buffer_stmt()
Matches a
CREATE BUFFER language statement, the required
following handle() , the required FOR TABLE
construct (see for_table_clause() ) and the optional
in_widget_pool_clause() and buffer_name_clause() rules. |
void |
create_call_stmt()
Matches a
CREATE CALL language statement, the required
following handle() and the optional in_widget_pool_clause() . |
void |
create_client_principal_stmt()
Matches a
CREATE CLIENT-PRINCIPAL language statement and the
required following handle() . |
void |
create_database_stmt()
Matches a
CREATE DATABASE language statement, the required
following expressions and the optional REPLACE or NO-ERROR
keywords. |
void |
create_dataset_stmt()
Matches a
CREATE DATASET language statement, the required
following handle() and the optional in_widget_pool_clause() . |
void |
create_datasource_stmt()
Matches a
CREATE DATA-SOURCE language statement, the required
following handle() and the optional in_widget_pool_clause() . |
void |
create_index_stmt()
Matches the
CREATE INDEX statement with a following
symbol() , record(boolean, boolean, boolean) and one or more lvalue() . |
void |
create_query_stmt()
Matches a
CREATE QUERY language statement, the required
following handle() and the optional in_widget_pool_clause() . |
void |
create_sax_stmt()
Matches a
CREATE SAX-READER , CREATE SAX-WRITER
and CREATE SAX-ATTRIBUTES language statements and the required
following handle() . |
void |
create_server_stmt()
Matches a
CREATE SERVER language statement, the following
handle() and the optional attribute_assign_clause() . |
void |
create_soap_header_entryref_stmt()
Matches a
CREATE SOAP-HEADER language statement, and the
following options. |
void |
create_soap_header_stmt()
Matches a
CREATE SOAP-HEADER language statement, and the
following options. |
void |
create_socket_stmt()
Matches a
CREATE SERVER-SOCKET or CREATE SOCKET language
statements and the required following handle() . |
void |
create_stmt()
Matches the
CREATE language statement and implements all
following options. |
void |
create_table_stmt()
Support SQL
CREATE TABLE directly in 4GL code. |
void |
create_temp_table_stmt()
Matches a
CREATE TEMP-TABLE language statement, the required
following handle variable/field and the optional
in_widget_pool_clause() . |
void |
create_view_stmt()
Support SQL
CREATE VIEW directly in 4GL code. |
void |
create_widget_or_object_stmt()
Matches a
CREATE widget_type or CREATE automation-object language
statement, and the following options. |
void |
create_widget_pool_stmt()
Matches a
CREATE WIDGET-POOL language statement, and the
following optional expr() and/or KW_PERSIST . |
void |
create_xml_stmt()
Matches a
CREATE X-DOCUMENT or CREATE X-NODEREF language
statements and the required following handle() . |
void |
current_or_complete_clause()
Matches a
CURRENT or COMPLETE keywords and the following
database_name(boolean) or value() rule references. |
void |
current_value_stmt()
Matches the
CURRENT-VALUE language statement. |
void |
data_relation(int idx)
Matches a
DATA-RELATION clause in a def_dataset_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast) . |
void |
database_name(boolean physical)
Matches a database name token that can be a string, a character expression
that is evaluated via the
VALUE( expr ) construct, or it
can be a symbol that represents a physical filename or a logical database
name. |
void |
database()
Matches a Progress 4GL database reference that refers to a valid database
or an alias to a valid database.
|
void |
datasrc_keys_clause()
Matches the
KEYS clause in a source buffer specification of
the DEFINE DATA-SOURCE statement. |
void |
db_event()
Matches any valid Progress symbol or string returns an artificial token
DB_EVENT with a child that is the matched token. |
void |
dde_advise_stmt()
Matches the
DDE ADVISE language statement. |
void |
dde_execute_stmt()
Matches the
DDE EXECUTE language statement. |
void |
dde_get_stmt()
Matches the
DDE GET language statement. |
void |
dde_initiate_stmt()
Matches the
DDE INITIATE language statement. |
void |
dde_request_stmt()
Matches the
DDE REQUEST language statement. |
void |
dde_send_stmt()
Matches the
DDE SEND language statement. |
void |
dde_terminate_stmt()
Matches the
DDE TERMINATE language statement. |
void |
decimals_clause()
Matches the
DECIMALS keyword and the required following
integer literal. |
void |
declare_cursor_stmt()
Support SQL
DECLARE CURSOR directly in 4GL code. |
java.lang.String |
def_browse_stmt()
Matches a
DEFINE BROWSE Progress 4GL language statement. |
void |
def_buf_stmt(boolean define_stmt,
boolean optionalSym,
Aast am,
Aast st)
Matches a
DEFINE BUFFER Progress 4GL language statement. |
java.lang.String |
def_button_stmt(boolean[] allowColon)
Matches a
DEFINE BUTTON Progress 4GL language statement. |
void |
def_dataset_stmt(Aast am,
Aast st)
Matches the
DEFINE DATASET language statement. |
void |
def_datasrc_stmt(Aast am,
Aast st)
Matches the
DEFINE DATA-SOURCE language statement. |
java.lang.String |
def_event_stmt()
Matches a
DEFINE EVENT Progress 4GL language statement. |
java.lang.Object[] |
def_frame_stmt()
Matches a
DEFINE FRAME Progress 4GL language statement
which is nearly identical to the form_stmt() . |
java.lang.String |
def_image_stmt()
Matches a
DEFINE IMAGE Progress 4GL language statement. |
int |
def_menu_stmt()
Matches a
DEFINE MENU or DEFINE SUB-MENU Progress 4GL
language statement. |
java.lang.String |
def_parm_stmt()
Matches a
DEFINE PARAMETER Progress 4GL language statement. |
java.lang.String |
def_prop_stmt()
Matches a
DEFINE PROPERTY Progress 4GL language statement. |
void |
def_query_stmt(Aast am,
Aast st)
Matches a
DEFINE QUERY Progress 4GL language statement. |
java.lang.String |
def_rect_stmt(boolean[] allowColon)
Matches a
DEFINE RECTANGLE Progress 4GL language statement. |
void |
def_stream_stmt()
Matches a
DEFINE STREAM Progress 4GL language statement. |
java.lang.String |
def_temp_table_stmt(boolean tt_new,
boolean tt_global,
boolean tt_shared,
Aast am,
Aast st)
Matches a
DEFINE TEMP-TABLE or DEFINE WORK-TABLE Progress 4GL
language statement (note that WORKFILE is a synonym for
WORK-TABLE and is handled as such. |
java.lang.String |
def_var_stmt(boolean[] allowColon)
Matches a
DEFINE VARIABLE Progress 4GL language statement. |
void |
default_extension_clause()
Matches the
DEFAULT-EXTENSION clause followed by an
expr() . |
void |
define_stmt()
Matches the
DEFINE Progress 4GL language statement and
switches into the correct alternative based on the lookahead tokens. |
private void |
defineBufferFromSymbol(Aast symbol,
java.lang.String recordName,
Aast am,
Aast st,
boolean forceTemp)
Defines a new buffer for the given record name based on the given symbol node which
specifies the buffer name.
|
void |
delete_alias_stmt()
Matches a
DELETE ALIAS language statement, and the following
database_name(boolean) . |
void |
delete_from_stmt()
Support SQL
DELETE FROM directly in 4GL code. |
void |
delete_object_stmt()
Matches a
DELETE OBJECT language statement, and the
following required expr() which must resolve to a handle or an object
reference. |
void |
delete_procedure_stmt()
Matches a
DELETE PROCEDURE language statement, and the
following required expr() . |
void |
delete_stmt()
Matches the
DELETE language statement and implements all
following options. |
void |
delete_widget_pool_stmt()
Matches a
DELETE WIDGET-POOL language statement, and the
following optional expr() . |
void |
delete_widget_stmt()
Matches a
DELETE WIDGET language statement, and the
following required handle() (or list thereof). |
void |
delimiter_clause()
Matches the
DELIMITER keyword and the following single
quoted character (a STRING ). |
void |
destructor_stmt() |
void |
destructor()
This rule creates the block structure for a destructor definition.
|
void |
dir_clause()
Matches the
DIR keyword and a following expr() . |
void |
disable_stmt()
Matches the
DISABLE language statement. |
void |
disable_triggers_stmt()
Matches the
DISABLE TRIGGERS statement, the qualifier for
DUMP or LOAD and the associated record(boolean, boolean, boolean) . |
void |
disconnect_stmt()
Matches a
DISCONNECT language statement, and the following
database_name(boolean) . |
void |
display_color_clause()
Matches the
DISPLAY color_phrase construct used in a color
specification (actually the DISPLAY keyword is optional). |
void |
display_stmt()
Matches the
DISPLAY language statement and builds the associated AST. |
void |
do_repeat_stmt()
Matches both
DO and REPEAT Progress 4GL language
statements. |
void |
dotnet_delegate()
Match the specification of an event handler as a .NET delegate class name
that will handle the associated event.
|
void |
down_clause_or_loop_incr()
Disambiguate between a
loop_incr() (which always starts with an
lvalue() ) and a down_clause() (which optionally starts with
an expr() ). |
void |
down_clause()
Matches the
DOWN keyword and the optional preceding
expression. |
void |
downstream_chained_reference(java.lang.String cls,
boolean isStatic)
Helper rule to match a
method_call(java.lang.String, boolean) , class_event(java.lang.String, boolean) or an
object_data_member(java.lang.String, boolean) in a chained_object_members() . |
void |
drop_index_stmt()
Support SQL
DROP INDEX directly in 4GL code. |
void |
drop_table_stmt()
Support SQL
DROP TABLE directly in 4GL code. |
void |
drop_view_stmt()
Support SQL
DROP VIEW directly in 4GL code. |
void |
dynamic_current_value_stmt()
Matches the
DYNAMIC-CURRENT-VALUE language statement. |
void |
dynamic_function_func()
Matches the
dynamic-function() function call. |
void |
dynamic_new_stmt()
Matches the
DYNAMIC-NEW statement which looks like an
assignment, allowing new object instances to be instantiated using a
runtime (dynamic) choice of the class. |
void |
each_first_last_spec(boolean force,
boolean noProp)
Matches the construction used in the
preselect_phrase() ,
for_or_preselect_clause() and in the for_stmt() for
specifying one or more record_phrase(boolean, boolean) specifications and
optionally prefixing the phrase with the EACH, FIRST or LAST
keywords. |
void |
edge_clause()
Matches the
EDGE-CHARS or EDGE-PIXELS construct of the
Progress 4GL language. |
void |
editor_phrase()
Matches the
VIEW-AS EDITOR phrase which is called from a view_as_phrase(java.lang.String) . |
void |
else_clause()
Matches the
ELSE block of an IF THEN ELSE
language statement. |
void |
embedded_assign()
Matches an
EQUALS token (the equals sign) and a following
expr() . |
void |
embedded_sql()
This is a simple placeholder to match the use of a SQL
SELECT
statement used directly in 4GL code in order to obtain a count of records
from a given table. |
void |
empty_stmt()
An empty statement (a perfectly legal Progress 4GL construct).
|
void |
empty_temp_table_stmt()
Matches an
EMPTY TEMP-TABLE language statement and the
required following temp-table name as a record(boolean, boolean, boolean) . |
void |
enable_stmt()
Matches the
ENABLE language statement. |
void |
end_stmt_with_no_beginning()
Match an end statement (and following DOT) that does not have an associated opening block.
|
void |
end_stmt(boolean eat)
Matches an
END Progress 4GL language statement. |
void |
entry_stmt()
Matches the
ENTRY language statement. |
void |
escape_char()
Matches
ESCAPE keyword and a following string literal
for the LIKE operator. |
void |
event_list()
Matches a space or comma delimited list of events.
|
void |
event_proc_clause()
Matches the
EVENT-PROCEDURE clause and its required
expression and optional in_procedure_clause() . |
void |
event_signature()
Match the specification of an event handler signature for a 4GL procedure or method that
will handle the associated event.
|
void |
event()
Matches any valid Progress symbol or string or other key label and returns
an artificial token
EVENT with a child that is the matched
token. |
void |
events_of_widgets_clause()
Matches the optional
OR keyword prefix and the required
event list, OF keyword and then a widget list. |
void |
except_list()
Specifies an list of fields that are not excluded from the previous record
or query definition.
|
void |
explicit_compares()
Matches the
COMPARES keyword (and optional
EXPLICIT prefix), an optional NO-ERROR and
the compares_when_block() . |
void |
export_field()
Implements proper tree building for the most common field specification
in the
export_stmt() . |
void |
export_stmt()
Matches the
EXPORT language statement. |
void |
expr()
Parses any valid Progress 4GL expression and creates an AST that is
suitable for evaluation.
|
void |
extended_diag_option()
Matches the
EXTENDED keyword and the optional following
qualifier keywords CURSOR, DATA-BIND, PERFORMANCE or VERBOSE . |
void |
extent_stmt()
Matches the
EXTENT language statement. |
int |
extent()
Matches the
EXTENT keyword and the optional integer constant
that follows it. |
void |
external_api_definition()
Match the
EXTERNAL keyword with a required following
STRING (shared library name). |
void |
external_name_spec()
|
boolean |
external_proc()
Top-level program definition (and entry point) of a Progress 4GL external
procedure.
|
void |
fetch_stmt()
Support SQL
FETCH directly in 4GL code. |
void |
field_clause(boolean enableWidget)
Matches a field name and an optional
WHEN condition. |
void |
field_list()
Matches the
FIELDS or EXCEPT keywords and the
optional following field list which is used to specify the list of fields
to include or exclude from a particular table. |
void |
field_mapping_clause()
Matches a
RELATION-FIELDS keyword followed by a list of
one or more parent_child_field_relation() references. |
void |
filename()
Matches all valid filenames (relative and absolute).
|
void |
filter_spec()
Matches a pair of
expr() and roots both of them at a node of type
FILTER_SPEC . |
void |
filters_clause()
Matches the
FILTERS clause followed by a list of pairs of
character expressions matched by filter_spec() . |
void |
finally_stmt()
Implements a
KW_FINALLY block which is part of the structured
error handling added in 10.2x. |
void |
find_stmt()
Matches the
FIND language statement and implements all
forms with most of the core processing delegated to the
record_phrase(boolean, boolean) rule. |
private Aast |
findFieldNode(Aast possible)
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.
|
void |
fix_codepage_stmt()
Matches the
FIX-CODEPAGE language statement. |
void |
focus_clause()
Matches the
FOCUS keyword and the required following
widget. |
private boolean |
followedByLineEnd(antlr.Token tok)
Check if the given token is followed by whitespace in the original
source code which includes a newline character.
|
private boolean |
followedByWhitespace(antlr.Token tok)
Check if the given token is followed by whitespace in the original
source code (by reading from the hidden token stream).
|
void |
for_clause()
Matches the
FOR keyword followed by an expr() . |
void |
for_data_relation_spec()
Matches a
FOR followed by two record(boolean, boolean, boolean) references
and options including field_mapping_clause() . |
void |
for_or_preselect_clause()
Matches a
FOR or PRESELECT keyword and the following required
each_first_last_spec(boolean, boolean) of the open_query_stmt() . |
void |
for_parent_relation_spec()
Matches a
FOR followed by two record(boolean, boolean, boolean) references
and options including field_mapping_clause() . |
void |
for_query_clause()
Match the
FOR keyword followed by a query_reference() . |
void |
for_record_spec(boolean flds,
boolean keys,
boolean force)
Matches the manner of specifying a list of records (and optional include or
exclude list of fields) for certain database related language statements.
|
void |
for_stmt()
Matches
FOR Progress 4GL language statement. |
void |
for_table_clause()
|
void |
form_item(java.util.Set<Aast> fields)
Matches the form item construct of the Progress 4GL language.
|
void |
form_stmt()
Matches a
FORM Progress 4GL language statement which is
nearly identical to the def_frame_stmt() . |
void |
format_phrase(java.lang.String symName,
Aast fld,
boolean frameDef,
boolean enableWidget)
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.
|
void |
format_string(boolean dynExpr)
Matches the
FORMAT keyword and the required following
string. |
void |
frame_funcs()
Matches the frame related function calls that can take a frame name as
a parameter.
|
void |
frame_handle_clause()
Matches
FRAME clause followed by a handle() . |
void |
frame_phrase(boolean blockHdr,
boolean editing)
Matches the frame phrase construct of the Progress 4GL language which
always begins with the
WITH keyword. |
void |
frame_reference(boolean define)
Matches the
FRAME frame reference seen in many Progress
language statements such as clear_stmt() and the common
frame_phrase(boolean, boolean) . |
void |
from_assembly()
Matches the
KW_FROM in a using_stmt() . |
void |
from_clause()
Matches the
FROM keyword and the required following
coordinates (x y or col row). |
void |
from_database_clause()
|
void |
from_handle_clause()
Matches a
FROM keyword and the following handle() . |
void |
from_lob_source()
Match the
FROM specification of copy_lob_stmt() using
lob_spec(boolean) , starting_clause() and for_clause() . |
void |
func_call_parameters(boolean builtin)
Matches a parenthesized, comma-delimited list of
func_call_parm(boolean)
parameters. |
void |
func_call_parm(boolean builtin)
Represents a function call parameter which is the equivalent of an
expr() BUT it can be optionally prefaced with any of the keywords
INPUT, INPUT-OUTPUT or OUTPUT . |
void |
func_call()
Matches all Progress 4GL function calls that take parenthesized parameter
lists.
|
int |
func_return()
Matches the optional
RETURNS keyword and the required
function return datatype (which is specified whether the
RETURNS keyword is there or not. |
boolean |
func_stmt()
Implements the structure of a
FUNCTION 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. |
void |
function()
This rule creates the block structure for a function or handles the case
of a forward function declaration (without a block).
|
java.lang.RuntimeException |
genExc(java.lang.String msg,
Aast node)
Helper to package up an error message and the no-viable-alternative location details
into a single exception instance.
|
java.lang.RuntimeException |
genExc(java.lang.String msg,
antlr.Token node)
Helper to package up an error message and the no-viable-alternative location details
into a single exception instance.
|
void |
get_key_value_stmt()
Matches the
GET-KEY-VALUE statement. |
void |
get_stmt()
Matches a
GET language statement, the required keywords and
query name (see query_reference() ). |
int |
getErrorCount()
Returns the number of errors encountered during parsing.
|
private java.lang.String |
getFrameName(Aast framePhrase)
Simple helper to extract a frame name from a frame phrase node.
|
private java.lang.String |
getObjectClassName(Aast node)
Find the class name referenced by the given object reference.
|
void |
getter_setter()
|
void |
go_on_clause()
Matches the
GO-ON() construct and the list of key labels
that follow in enclosing parenthesis. |
void |
grant_stmt()
Support SQL
GRANT directly in 4GL code. |
void |
handle()
This is a convenience method that matches
lvalue() except a
validating semantic predicate is used to throw an exception if the
data type of the variable or field is not HANDLE . |
void |
help_command_clause()
Matches all the various commands that can be passed to the
system_help_stmt() . |
void |
help_string()
Matches the
HELP keyword and the required following
string. |
void |
hide_stmt()
Matches the
HIDE language statement. |
private void |
honorKeywordIgnoreList(Keyword[] ignored)
Remove any built-in functions or global variables that are defined with the given
keywords.
|
void |
if_func()
This rule implements the special built-in
IF THEN ELSE
function, which can be used in an expression (which is what differentiates
it from the language statement of the same name). |
void |
if_stmt()
Matches the
IF THEN ELSE language statement. |
void |
image_phrase()
Matches the image phrase which is called from a
def_button_stmt(boolean[])
or a def_image_stmt() . |
void |
image_size_clause()
Matches the
IMAGE-SIZE, IMAGE-SIZE-CHARS and IMAGE-SIZE-PIXELS
keywords and the required following width and height. |
void |
image_stuff()
Matches a set of image oriented keywords and keywords and the required
following
image_phrase() . |
void |
implements_clause()
Matches
KW_IMPLMTS with one or more comma-separated following
user_defined_type_name() . |
void |
import_field()
Implements proper tree building for the most common field specification
in the
import_stmt() . |
void |
import_stmt()
Matches the
IMPORT language statement. |
void |
in_operator_parms()
Matches the value list or sub-select portion of an
IN
operator. |
void |
in_operator_sub_select_stmt()
Matches a sub-select in a
WHERE clause that is based on the
IN operator. |
void |
in_procedure_clause()
Matches the
IN keyword and the required following expression
that resolves to the procedure handle construct in which the internal
procedure is to be run. |
void |
in_super_clause()
Matches
IN SUPER keywords in a func_stmt() and is
separated to improve the tree. |
void |
in_super_or_in_handle()
|
void |
in_widget_pool_clause()
Matches the
IN WIDGET-POOL keywords and the required following
pool name as a character expression (see expr() ). |
void |
in_window_clause()
Matches the
IN WINDOW clause seen in many Progress language
statements such as status_stmt() and pause_stmt() . |
void |
in_window_handle_clause()
Matches the
IN WINDOW clause followed by a handle() . |
void |
index_clause(java.lang.Object table)
Matches an index definition of a
DEFINE TEMP-TABLE language
statement. |
void |
index_field_clause(java.lang.Object table)
Matches the index field clause of a
DEFINE TEMP-TABLE language statement. |
void |
inherits_clause()
Matches the
KW_INHERITS with a following
user_defined_type_name() . |
void |
initial_dir_clause()
Matches the
INITIAL-DIR clause followed by an expr() . |
void |
initial_filter_num()
Matches
INITIAL-FILTER clause followed by an expr() . |
private void |
initializeAttributesDictionary()
Loads the
SymbolResolver with Progress 4GL attributes and
methods. |
private void |
initializeFunctionDictionary()
Loads the
SymbolResolver with Progress 4GL built-in
functions (which take parameters). |
private void |
initializeProcedureDictionary()
Loads the
SymbolResolver with Progress 4GL internal
procedures that are well known. |
void |
initializer_constant(int vtype)
|
void |
initializer(int vtype)
Matches the
INITIAL keyword and the required single literal
or a left/right bracket bounded (and comma separated) list of literals. |
private void |
initializeStreamDictionary()
Loads the
SymbolResolver with Progress 4GL internal
streams that are well known. |
private void |
initializeVariableDictionary()
Loads the
SymbolResolver with Progress 4GL built-in
variables and any built-in functions which DO NOT take parameters. |
void |
inner_block(boolean eat,
Aast malformed)
This rule creates the block structure for a Progress 4GL nestable block.
|
void |
inner_chars_and_lines_clause()
Matches the
INNER-CHARS chars INNER-LINES lines clause in an
arbitrary order (either keyword will be matched first, which is an
undocumented feature. |
void |
inner_chars_and_lines_core()
Matches the
INNER-CHARS chars or INNER-LINES lines clause as
used in a VIEW-AS EDITOR phrase. |
void |
inner_lines_clause()
Matches the
INNER-LINES clause as used in a phrase from a
VIEW-AS COMBO-BOX construct. |
void |
insert_into_stmt()
Support SQL
INSERT INTO directly in 4GL code. |
void |
insert_stmt()
Matches the
INSERT language statement. |
void |
interface_def()
This rule creates the block structure for an interface definition.
|
void |
interface_stmt()
Implements the structure of a
INTERFACE language statement. |
void |
into_directory_clause()
Matches the
INTO keyword followed by a directory name. |
void |
io_common_options(boolean output,
boolean thru)
Matches the set of all I/O options and roots them at an
IO_OPTIONS node. |
void |
io_from_to_stmt()
Matches the
INPUT FROM and OUTPUT TO language statements. |
void |
io_options(boolean output,
boolean thru)
Matches a range of options used in I/O language statements.
|
void |
io_stmt()
Matches the various permutations of language statements that start with
the
INPUT, INPUT-OUTPUT or OUTPUT keywords. |
void |
io_through_stmt()
Matches the
INPUT THROUGH/THRU, INPUT-OUTPUT THROUGH/THRU
and OUTPUT THROUGH/THRU language statements. |
void |
is_clause()
Matches the
IS keyword of a DEFINE TEMP-TABLE
language statement and handles the optional index qualifiers. |
boolean |
isBuiltInCls()
Tests if this is parsing a built-in 4GL class/interface.
|
private boolean |
isCharType(int type)
Returns
true if the given type is KW_CHAR ,
KW_LONGCHAR , VAR_CHAR ,
VAR_LONGCHAR , FIELD_CHAR or
FIELD_CLOB . |
private boolean |
isComHandleType(Aast lvalue)
Returns
true if the given type is a variable, field, function, method,
attribute or system handle that refers to a COM-HANDLE. |
boolean |
isConsumeError()
Tests if the consume error flag is turned on.
|
private boolean |
isDateType(int type)
Returns
true if the given type is KW_DATE ,
KW_DATETIME , KW_DATE_TZ , VAR_DATE ,
VAR_DATETIME , VAR_DATETIME_TZ , FIELD_DATE ,
FIELD_DATETIME or FIELD_DATETIME_TZ . |
boolean |
isDebug()
Tests if debug is turned on.
|
boolean |
isDotNetCls()
Tests if this is parsing a .NET class/interface.
|
boolean |
isEvaluatingExpression()
Gets the status of the expression evaluation member.
|
private boolean |
isFormVarDefinition()
Scan forward to determine if the current node is an inline variable
definition.
|
private boolean |
isHandleType(Aast node)
Returns
true if the given type is a variable, field,
function, method, attribute that refers to a handle or if it is a
system handle. |
private boolean |
isLiteral(Aast node)
Report if the node is a literal.
|
private boolean |
isMalformedLabel(boolean def,
int start,
java.util.function.Predicate<antlr.CommonToken> follow)
Manually looks ahead an arbitrary number of tokens to determine if the next tokens
represent a malformed symbol.
|
private boolean |
isMalformedSymbol(int start)
Manually looks ahead an arbitrary number of tokens to determine if the
next tokens represent a malformed symbol.
|
private boolean |
isMalformedSymbolFuncCall()
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
LPARENS . |
private boolean |
isNumericType(int type)
Returns
true if the given type is KW_INT ,
KW_INT64 , KW_RECID , VAR_INT ,
VAR_INT64 , VAR_RECID , FIELD_INT ,
FIELD_INT64 or FIELD_RECID . |
private boolean |
isObjectType(Aast node)
Returns
true if the given type is VAR_CLASS ,
FIELD_CLASS , FUNC_CLASS ,
METH_CLASS , CLASS_NAME or if this is a built-in
attribute or non-user defined method call COLON that has a
ATTR_CLASS or METH_CLASS in the index
position 1. |
private boolean |
isObjectType(int type)
Returns
true if the given type is VAR_CLASS ,
FIELD_CLASS , FUNC_CLASS ,
METH_CLASS , CLASS_NAME or
ATTR_CLASS . |
private boolean |
isProperLabel(int typ)
Manually looks ahead an 2 tokens to determine if the next tokens represent a properly
formed symbol.
|
private boolean |
isQualifiedFieldNameQuirk(antlr.Token tok1,
antlr.Token tok2,
antlr.Token tok3)
Use lookahead to determine if the qualified database name quirk is
present in the given tokens.
|
private boolean |
isRecord(java.lang.String text)
|
private boolean |
isSomeSymbol(int ttype)
Detect if the given token type is a symbol or unreserved keyword.
|
private boolean |
isUserDefFunctionCall(antlr.Token tok1,
antlr.Token tok2)
Check if this token is a user-defined function call.
|
boolean |
isWebSpeed()
Tests if this is parsing a WebSpeed program.
|
void |
item_clause()
Matches
ITEM clause followed by an expr() . |
void |
join_clause()
Matches the
OUTER-JOIN keyword and the optional prefix keyword
LEFT which are used to specify an outer join or left outer
join. |
void |
key_clause()
|
void |
key_function()
Matches the list of all valid key function names and generates a node
of type
KEY_FUNCTION . |
void |
label_reference()
Matches a Progress 4GL label reference that refers to a label that was
previously defined in a block definition, see
inner_block(boolean, com.goldencode.ast.Aast) . |
void |
label()
Matches the
LABEL keyword and the required string literal
or comma separated list of string literals. |
void |
language_list()
Matches the a list of colon separated languages, all of which are made
children of an artificial mode of type
LANGUAGES . |
void |
languages_clause()
Matches the
LANGUAGES keyword and a parenthesized,
comma-separated list of language_list() entries. |
void |
length_stmt()
Matches the
LENGTH language statement. |
void |
like_clause(java.lang.String symName,
java.lang.Object table,
boolean tablename)
Matches the
LIKE 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. |
void |
like_menu_clause()
Matches the
LIKE language keyword that defines the name of
a menu to pattern another menu upon. |
void |
like_widget_clause()
Matches the
LIKE language keyword that defines the name of
a widget to pattern another widget upon. |
void |
likeSubscript()
Read the following tokens until the
RBRACKET , discard these
and build an EXPRESSION -> NUM_LITERAL subtree with the
value of 1. |
void |
list_items_clause()
Matches the
LIST_ITEMS and LIST_ITEM_PAIRS clauses as used in a
phrase from a VIEW-AS COMBO-BOX or VIEW-AS SELECTION-LIST construct. |
void |
literal_format_phrase()
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.
|
void |
literal()
Matches all variations of Progress literals (constants).
|
void |
load_stmt()
Matches the
LOAD language statement with a required following
expr() . |
void |
lob_spec(boolean to)
|
void |
location_spec()
This rule implements the column/row/x/y coordinate processing for the
AT phrase (at_phrase() ). |
void |
log_and_expr()
Implements the 2nd lowest precedence level of Progress 4GL expressions
KW_AND (the logical AND) operator. |
void |
log_not_expr()
Implements the 3rd lowest precedence level of Progress 4GL expressions
KW_NOT (the logical NOT) operator. |
static java.lang.String |
lookupTokenName(int type)
Translates an integer value of a parser token type into the associated
human readable text representation.
|
static int |
lookupTokenType(java.lang.String tokenName)
Translates a text representation of a parser token type into the
actual integer value.
|
void |
loop_incr()
Matches the loop increment definition defined by the
TO
keyword and optionally the BY keyword. |
void |
lvalue_list(java.util.Set<Aast> fields)
Aggregates (in a tree building sense) a simple list of all fields under a specific language
statement.
|
void |
lvalue()
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.
|
static void |
main(java.lang.String[] args)
Provides a command line interface for an end user to drive and/or test
this class.
|
void |
malformed_symbol()
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.
|
void |
map_to_actual_name()
|
private boolean |
matchesList(int type,
int[] list)
Tests if the given
type matches any in the given list. |
void |
matchRange(int t1,
int t2)
Matches and consumes a token that must be within a specific range of
token types.
|
void |
max_and_min_value_clause()
Matches the
MAX-VALUE num or MIN-VALUE num
clauses as used in a VIEW-AS SLIDER phrase. |
void |
max_chars_clause()
Matches the
MAX-CHARS clause as used in a phrase from a
VIEW-AS COMBO-BOX construct. |
void |
max_rows_clause()
Matches a
MAX-ROWS keyword and the following numeric expression of the
open_query_stmt() . |
void |
menu_element_descriptor()
Matches the
RULE or SKIP keywords or the other possible
constructs menu_item_phrase() and submenu_descriptor() that
can be used as a menu element. |
void |
menu_item_phrase()
Matches a
MENU-ITEM definition in the Progress 4GL
DEFINE MENU or DEFINE SUB-MENU language statements. |
void |
menu_reference()
Matches the
MENU or SUB-MENU menu reference seen in the
widget_qualifier() . |
private boolean |
mergeUntilWS(int[] end)
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.
|
void |
method_call(java.lang.String cls,
boolean isStatic)
Matches all Progress 4GL method calls and their parenthesized parameter
lists.
|
int |
method_return()
Matches the return datatype of a user-defined method.
|
void |
method_stmt() |
void |
min_max_size_clause()
Matches the
MAX-SIZE or MIN-SIZE clause followed by an
expr() . |
void |
misc_frame_opts()
Matches the
RETAIN, SCROLL and WIDTH keywords and the required
following numeric or decimal literal. |
private static long[] |
mk_tokenSet_0() |
private static long[] |
mk_tokenSet_1() |
private static long[] |
mk_tokenSet_10() |
private static long[] |
mk_tokenSet_100() |
private static long[] |
mk_tokenSet_101() |
private static long[] |
mk_tokenSet_102() |
private static long[] |
mk_tokenSet_103() |
private static long[] |
mk_tokenSet_104() |
private static long[] |
mk_tokenSet_105() |
private static long[] |
mk_tokenSet_106() |
private static long[] |
mk_tokenSet_107() |
private static long[] |
mk_tokenSet_108() |
private static long[] |
mk_tokenSet_109() |
private static long[] |
mk_tokenSet_11() |
private static long[] |
mk_tokenSet_110() |
private static long[] |
mk_tokenSet_111() |
private static long[] |
mk_tokenSet_112() |
private static long[] |
mk_tokenSet_113() |
private static long[] |
mk_tokenSet_114() |
private static long[] |
mk_tokenSet_115() |
private static long[] |
mk_tokenSet_116() |
private static long[] |
mk_tokenSet_117() |
private static long[] |
mk_tokenSet_118() |
private static long[] |
mk_tokenSet_119() |
private static long[] |
mk_tokenSet_12() |
private static long[] |
mk_tokenSet_120() |
private static long[] |
mk_tokenSet_121() |
private static long[] |
mk_tokenSet_122() |
private static long[] |
mk_tokenSet_123() |
private static long[] |
mk_tokenSet_124() |
private static long[] |
mk_tokenSet_125() |
private static long[] |
mk_tokenSet_126() |
private static long[] |
mk_tokenSet_127() |
private static long[] |
mk_tokenSet_128() |
private static long[] |
mk_tokenSet_129() |
private static long[] |
mk_tokenSet_13() |
private static long[] |
mk_tokenSet_130() |
private static long[] |
mk_tokenSet_131() |
private static long[] |
mk_tokenSet_132() |
private static long[] |
mk_tokenSet_133() |
private static long[] |
mk_tokenSet_134() |
private static long[] |
mk_tokenSet_135() |
private static long[] |
mk_tokenSet_136() |
private static long[] |
mk_tokenSet_137() |
private static long[] |
mk_tokenSet_138() |
private static long[] |
mk_tokenSet_139() |
private static long[] |
mk_tokenSet_14() |
private static long[] |
mk_tokenSet_140() |
private static long[] |
mk_tokenSet_141() |
private static long[] |
mk_tokenSet_142() |
private static long[] |
mk_tokenSet_143() |
private static long[] |
mk_tokenSet_144() |
private static long[] |
mk_tokenSet_145() |
private static long[] |
mk_tokenSet_146() |
private static long[] |
mk_tokenSet_147() |
private static long[] |
mk_tokenSet_148() |
private static long[] |
mk_tokenSet_149() |
private static long[] |
mk_tokenSet_15() |
private static long[] |
mk_tokenSet_150() |
private static long[] |
mk_tokenSet_151() |
private static long[] |
mk_tokenSet_152() |
private static long[] |
mk_tokenSet_153() |
private static long[] |
mk_tokenSet_154() |
private static long[] |
mk_tokenSet_155() |
private static long[] |
mk_tokenSet_156() |
private static long[] |
mk_tokenSet_157() |
private static long[] |
mk_tokenSet_158() |
private static long[] |
mk_tokenSet_159() |
private static long[] |
mk_tokenSet_16() |
private static long[] |
mk_tokenSet_160() |
private static long[] |
mk_tokenSet_161() |
private static long[] |
mk_tokenSet_162() |
private static long[] |
mk_tokenSet_163() |
private static long[] |
mk_tokenSet_164() |
private static long[] |
mk_tokenSet_165() |
private static long[] |
mk_tokenSet_166() |
private static long[] |
mk_tokenSet_167() |
private static long[] |
mk_tokenSet_168() |
private static long[] |
mk_tokenSet_169() |
private static long[] |
mk_tokenSet_17() |
private static long[] |
mk_tokenSet_170() |
private static long[] |
mk_tokenSet_171() |
private static long[] |
mk_tokenSet_172() |
private static long[] |
mk_tokenSet_173() |
private static long[] |
mk_tokenSet_174() |
private static long[] |
mk_tokenSet_175() |
private static long[] |
mk_tokenSet_176() |
private static long[] |
mk_tokenSet_177() |
private static long[] |
mk_tokenSet_178() |
private static long[] |
mk_tokenSet_179() |
private static long[] |
mk_tokenSet_18() |
private static long[] |
mk_tokenSet_180() |
private static long[] |
mk_tokenSet_181() |
private static long[] |
mk_tokenSet_182() |
private static long[] |
mk_tokenSet_183() |
private static long[] |
mk_tokenSet_184() |
private static long[] |
mk_tokenSet_185() |
private static long[] |
mk_tokenSet_186() |
private static long[] |
mk_tokenSet_187() |
private static long[] |
mk_tokenSet_188() |
private static long[] |
mk_tokenSet_189() |
private static long[] |
mk_tokenSet_19() |
private static long[] |
mk_tokenSet_190() |
private static long[] |
mk_tokenSet_191() |
private static long[] |
mk_tokenSet_192() |
private static long[] |
mk_tokenSet_193() |
private static long[] |
mk_tokenSet_194() |
private static long[] |
mk_tokenSet_195() |
private static long[] |
mk_tokenSet_196() |
private static long[] |
mk_tokenSet_197() |
private static long[] |
mk_tokenSet_198() |
private static long[] |
mk_tokenSet_199() |
private static long[] |
mk_tokenSet_2() |
private static long[] |
mk_tokenSet_20() |
private static long[] |
mk_tokenSet_200() |
private static long[] |
mk_tokenSet_201() |
private static long[] |
mk_tokenSet_202() |
private static long[] |
mk_tokenSet_203() |
private static long[] |
mk_tokenSet_204() |
private static long[] |
mk_tokenSet_205() |
private static long[] |
mk_tokenSet_206() |
private static long[] |
mk_tokenSet_207() |
private static long[] |
mk_tokenSet_208() |
private static long[] |
mk_tokenSet_209() |
private static long[] |
mk_tokenSet_21() |
private static long[] |
mk_tokenSet_210() |
private static long[] |
mk_tokenSet_211() |
private static long[] |
mk_tokenSet_212() |
private static long[] |
mk_tokenSet_213() |
private static long[] |
mk_tokenSet_214() |
private static long[] |
mk_tokenSet_215() |
private static long[] |
mk_tokenSet_216() |
private static long[] |
mk_tokenSet_217() |
private static long[] |
mk_tokenSet_218() |
private static long[] |
mk_tokenSet_219() |
private static long[] |
mk_tokenSet_22() |
private static long[] |
mk_tokenSet_220() |
private static long[] |
mk_tokenSet_221() |
private static long[] |
mk_tokenSet_222() |
private static long[] |
mk_tokenSet_223() |
private static long[] |
mk_tokenSet_224() |
private static long[] |
mk_tokenSet_225() |
private static long[] |
mk_tokenSet_226() |
private static long[] |
mk_tokenSet_227() |
private static long[] |
mk_tokenSet_228() |
private static long[] |
mk_tokenSet_229() |
private static long[] |
mk_tokenSet_23() |
private static long[] |
mk_tokenSet_230() |
private static long[] |
mk_tokenSet_231() |
private static long[] |
mk_tokenSet_232() |
private static long[] |
mk_tokenSet_233() |
private static long[] |
mk_tokenSet_234() |
private static long[] |
mk_tokenSet_235() |
private static long[] |
mk_tokenSet_236() |
private static long[] |
mk_tokenSet_237() |
private static long[] |
mk_tokenSet_238() |
private static long[] |
mk_tokenSet_239() |
private static long[] |
mk_tokenSet_24() |
private static long[] |
mk_tokenSet_240() |
private static long[] |
mk_tokenSet_241() |
private static long[] |
mk_tokenSet_242() |
private static long[] |
mk_tokenSet_243() |
private static long[] |
mk_tokenSet_244() |
private static long[] |
mk_tokenSet_245() |
private static long[] |
mk_tokenSet_246() |
private static long[] |
mk_tokenSet_247() |
private static long[] |
mk_tokenSet_248() |
private static long[] |
mk_tokenSet_249() |
private static long[] |
mk_tokenSet_25() |
private static long[] |
mk_tokenSet_250() |
private static long[] |
mk_tokenSet_251() |
private static long[] |
mk_tokenSet_252() |
private static long[] |
mk_tokenSet_253() |
private static long[] |
mk_tokenSet_254() |
private static long[] |
mk_tokenSet_255() |
private static long[] |
mk_tokenSet_256() |
private static long[] |
mk_tokenSet_257() |
private static long[] |
mk_tokenSet_258() |
private static long[] |
mk_tokenSet_259() |
private static long[] |
mk_tokenSet_26() |
private static long[] |
mk_tokenSet_260() |
private static long[] |
mk_tokenSet_261() |
private static long[] |
mk_tokenSet_262() |
private static long[] |
mk_tokenSet_263() |
private static long[] |
mk_tokenSet_264() |
private static long[] |
mk_tokenSet_265() |
private static long[] |
mk_tokenSet_266() |
private static long[] |
mk_tokenSet_267() |
private static long[] |
mk_tokenSet_268() |
private static long[] |
mk_tokenSet_269() |
private static long[] |
mk_tokenSet_27() |
private static long[] |
mk_tokenSet_270() |
private static long[] |
mk_tokenSet_271() |
private static long[] |
mk_tokenSet_272() |
private static long[] |
mk_tokenSet_273() |
private static long[] |
mk_tokenSet_274() |
private static long[] |
mk_tokenSet_275() |
private static long[] |
mk_tokenSet_276() |
private static long[] |
mk_tokenSet_277() |
private static long[] |
mk_tokenSet_278() |
private static long[] |
mk_tokenSet_279() |
private static long[] |
mk_tokenSet_28() |
private static long[] |
mk_tokenSet_280() |
private static long[] |
mk_tokenSet_281() |
private static long[] |
mk_tokenSet_282() |
private static long[] |
mk_tokenSet_283() |
private static long[] |
mk_tokenSet_284() |
private static long[] |
mk_tokenSet_285() |
private static long[] |
mk_tokenSet_286() |
private static long[] |
mk_tokenSet_287() |
private static long[] |
mk_tokenSet_288() |
private static long[] |
mk_tokenSet_289() |
private static long[] |
mk_tokenSet_29() |
private static long[] |
mk_tokenSet_290() |
private static long[] |
mk_tokenSet_291() |
private static long[] |
mk_tokenSet_292() |
private static long[] |
mk_tokenSet_293() |
private static long[] |
mk_tokenSet_294() |
private static long[] |
mk_tokenSet_295() |
private static long[] |
mk_tokenSet_296() |
private static long[] |
mk_tokenSet_297() |
private static long[] |
mk_tokenSet_298() |
private static long[] |
mk_tokenSet_299() |
private static long[] |
mk_tokenSet_3() |
private static long[] |
mk_tokenSet_30() |
private static long[] |
mk_tokenSet_300() |
private static long[] |
mk_tokenSet_301() |
private static long[] |
mk_tokenSet_302() |
private static long[] |
mk_tokenSet_303() |
private static long[] |
mk_tokenSet_304() |
private static long[] |
mk_tokenSet_305() |
private static long[] |
mk_tokenSet_306() |
private static long[] |
mk_tokenSet_307() |
private static long[] |
mk_tokenSet_308() |
private static long[] |
mk_tokenSet_309() |
private static long[] |
mk_tokenSet_31() |
private static long[] |
mk_tokenSet_310() |
private static long[] |
mk_tokenSet_311() |
private static long[] |
mk_tokenSet_312() |
private static long[] |
mk_tokenSet_313() |
private static long[] |
mk_tokenSet_314() |
private static long[] |
mk_tokenSet_315() |
private static long[] |
mk_tokenSet_316() |
private static long[] |
mk_tokenSet_317() |
private static long[] |
mk_tokenSet_318() |
private static long[] |
mk_tokenSet_319() |
private static long[] |
mk_tokenSet_32() |
private static long[] |
mk_tokenSet_320() |
private static long[] |
mk_tokenSet_321() |
private static long[] |
mk_tokenSet_322() |
private static long[] |
mk_tokenSet_323() |
private static long[] |
mk_tokenSet_324() |
private static long[] |
mk_tokenSet_325() |
private static long[] |
mk_tokenSet_326() |
private static long[] |
mk_tokenSet_327() |
private static long[] |
mk_tokenSet_328() |
private static long[] |
mk_tokenSet_329() |
private static long[] |
mk_tokenSet_33() |
private static long[] |
mk_tokenSet_330() |
private static long[] |
mk_tokenSet_331() |
private static long[] |
mk_tokenSet_332() |
private static long[] |
mk_tokenSet_333() |
private static long[] |
mk_tokenSet_334() |
private static long[] |
mk_tokenSet_335() |
private static long[] |
mk_tokenSet_336() |
private static long[] |
mk_tokenSet_337() |
private static long[] |
mk_tokenSet_338() |
private static long[] |
mk_tokenSet_339() |
private static long[] |
mk_tokenSet_34() |
private static long[] |
mk_tokenSet_340() |
private static long[] |
mk_tokenSet_341() |
private static long[] |
mk_tokenSet_342() |
private static long[] |
mk_tokenSet_343() |
private static long[] |
mk_tokenSet_344() |
private static long[] |
mk_tokenSet_345() |
private static long[] |
mk_tokenSet_346() |
private static long[] |
mk_tokenSet_347() |
private static long[] |
mk_tokenSet_348() |
private static long[] |
mk_tokenSet_349() |
private static long[] |
mk_tokenSet_35() |
private static long[] |
mk_tokenSet_350() |
private static long[] |
mk_tokenSet_351() |
private static long[] |
mk_tokenSet_352() |
private static long[] |
mk_tokenSet_353() |
private static long[] |
mk_tokenSet_354() |
private static long[] |
mk_tokenSet_355() |
private static long[] |
mk_tokenSet_356() |
private static long[] |
mk_tokenSet_357() |
private static long[] |
mk_tokenSet_358() |
private static long[] |
mk_tokenSet_359() |
private static long[] |
mk_tokenSet_36() |
private static long[] |
mk_tokenSet_360() |
private static long[] |
mk_tokenSet_361() |
private static long[] |
mk_tokenSet_362() |
private static long[] |
mk_tokenSet_363() |
private static long[] |
mk_tokenSet_364() |
private static long[] |
mk_tokenSet_365() |
private static long[] |
mk_tokenSet_366() |
private static long[] |
mk_tokenSet_367() |
private static long[] |
mk_tokenSet_368() |
private static long[] |
mk_tokenSet_369() |
private static long[] |
mk_tokenSet_37() |
private static long[] |
mk_tokenSet_370() |
private static long[] |
mk_tokenSet_371() |
private static long[] |
mk_tokenSet_372() |
private static long[] |
mk_tokenSet_373() |
private static long[] |
mk_tokenSet_374() |
private static long[] |
mk_tokenSet_375() |
private static long[] |
mk_tokenSet_376() |
private static long[] |
mk_tokenSet_377() |
private static long[] |
mk_tokenSet_378() |
private static long[] |
mk_tokenSet_379() |
private static long[] |
mk_tokenSet_38() |
private static long[] |
mk_tokenSet_380() |
private static long[] |
mk_tokenSet_381() |
private static long[] |
mk_tokenSet_382() |
private static long[] |
mk_tokenSet_383() |
private static long[] |
mk_tokenSet_384() |
private static long[] |
mk_tokenSet_385() |
private static long[] |
mk_tokenSet_39() |
private static long[] |
mk_tokenSet_4() |
private static long[] |
mk_tokenSet_40() |
private static long[] |
mk_tokenSet_41() |
private static long[] |
mk_tokenSet_42() |
private static long[] |
mk_tokenSet_43() |
private static long[] |
mk_tokenSet_44() |
private static long[] |
mk_tokenSet_45() |
private static long[] |
mk_tokenSet_46() |
private static long[] |
mk_tokenSet_47() |
private static long[] |
mk_tokenSet_48() |
private static long[] |
mk_tokenSet_49() |
private static long[] |
mk_tokenSet_5() |
private static long[] |
mk_tokenSet_50() |
private static long[] |
mk_tokenSet_51() |
private static long[] |
mk_tokenSet_52() |
private static long[] |
mk_tokenSet_53() |
private static long[] |
mk_tokenSet_54() |
private static long[] |
mk_tokenSet_55() |
private static long[] |
mk_tokenSet_56() |
private static long[] |
mk_tokenSet_57() |
private static long[] |
mk_tokenSet_58() |
private static long[] |
mk_tokenSet_59() |
private static long[] |
mk_tokenSet_6() |
private static long[] |
mk_tokenSet_60() |
private static long[] |
mk_tokenSet_61() |
private static long[] |
mk_tokenSet_62() |
private static long[] |
mk_tokenSet_63() |
private static long[] |
mk_tokenSet_64() |
private static long[] |
mk_tokenSet_65() |
private static long[] |
mk_tokenSet_66() |
private static long[] |
mk_tokenSet_67() |
private static long[] |
mk_tokenSet_68() |
private static long[] |
mk_tokenSet_69() |
private static long[] |
mk_tokenSet_7() |
private static long[] |
mk_tokenSet_70() |
private static long[] |
mk_tokenSet_71() |
private static long[] |
mk_tokenSet_72() |
private static long[] |
mk_tokenSet_73() |
private static long[] |
mk_tokenSet_74() |
private static long[] |
mk_tokenSet_75() |
private static long[] |
mk_tokenSet_76() |
private static long[] |
mk_tokenSet_77() |
private static long[] |
mk_tokenSet_78() |
private static long[] |
mk_tokenSet_79() |
private static long[] |
mk_tokenSet_8() |
private static long[] |
mk_tokenSet_80() |
private static long[] |
mk_tokenSet_81() |
private static long[] |
mk_tokenSet_82() |
private static long[] |
mk_tokenSet_83() |
private static long[] |
mk_tokenSet_84() |
private static long[] |
mk_tokenSet_85() |
private static long[] |
mk_tokenSet_86() |
private static long[] |
mk_tokenSet_87() |
private static long[] |
mk_tokenSet_88() |
private static long[] |
mk_tokenSet_89() |
private static long[] |
mk_tokenSet_9() |
private static long[] |
mk_tokenSet_90() |
private static long[] |
mk_tokenSet_91() |
private static long[] |
mk_tokenSet_92() |
private static long[] |
mk_tokenSet_93() |
private static long[] |
mk_tokenSet_94() |
private static long[] |
mk_tokenSet_95() |
private static long[] |
mk_tokenSet_96() |
private static long[] |
mk_tokenSet_97() |
private static long[] |
mk_tokenSet_98() |
private static long[] |
mk_tokenSet_99() |
void |
msg_stmt()
Matches the Progress
MESSAGE language statement and builds
the resulting AST nodes. |
void |
namespace_clause()
Matches the
NAMESPACE-URI or NAMESPACE-PREFIX
with a following STRING . |
void |
nested_clause()
Matches a
NESTED keyword followed by an optional FOREIGN-KEY-HIDDEN
keyword. |
void |
new_phrase()
Matches the
NEW phrase in an expression, allowing new object
instances to be instantiated. |
void |
next_or_leave_stmt()
Matches the
NEXT and LEAVE language statements. |
void |
next_prompt_stmt()
Matches the
NEXT-PROMPT language statement. |
void |
no_focus_clause()
Matches the
NO-FOCUS keyword and the optional following
FLAT-BUTTON . |
void |
non_reserved_user_defined_type_name()
Matches an
any_non_reserved_symbol() as a class name reference. |
void |
null_clause()
Matches the
NULL() construct and the optional following
integer constant. |
void |
num_copies_clause()
Matches the
NUM-COPIES clause followed by an expr() . |
void |
numeric_literal()
Matches either a
NUM_LITERAL or a DEC_LITERAL . |
void |
object_data_member(java.lang.String cls,
boolean isStatic)
Matches all Progress 4GL
lvalue() references that exist in the
namespace of the given class name. |
void |
oea_annotations()
Undocumented syntax found in working code that appears to be ignored in Progress.
|
void |
of_clause()
Matches the
OF keyword and the required following record
which is used to specify the table to join on. |
void |
on_event_phrase()
Matches the
ON { ENDKEY | ERROR | QUIT | STOP } UNDO
construction used to modify block processing. |
void |
on_server_clause()
Matches the
ON keyword and the optional following
SERVER handle construct. |
void |
on_stmt()
Matches the
ON language statement (which defines a trigger
block) and implements all possible variants. |
void |
oo_block()
This rule is used to be able to mark blocks which are associated with OO members
(methods, getters, setters).
|
void |
open_cursor_stmt()
Matches the
OPEN keyword with a following symbol() . |
void |
open_query_stmt()
Matches a
OPEN QUERY language statement and all possible
options. |
void |
optional_listing_clause()
Matches the
APPEND, PAGE-SIZE and PAGE-WIDTH keywords
followed by an embedded_assign() or an expr() . |
void |
ordinal_clause()
Match the
ORDINAL keyword with a required following
NUM_LITERAL . |
void |
os_create_dir_stmt()
Matches the
OS-CREATE-DIR language statement. |
void |
os_delete_stmt()
Matches the
OS-DELETE language statement. |
void |
os_dir_clause()
Matches the
OS-DIR construct with its following parenthesized
character expr() and options. |
void |
os_misc_stmt()
Matches the
OS-APPEND, OS-COPY and OS-RENAME language
statements. |
void |
other_on_event_actions()
Implements the other event actions and the optional following label
references.
|
void |
other_single_char_tokens()
Matches any valid Progress single char key label that would not be
recognized as a symbol or string.
|
void |
otherwise()
Matches the
OTHERWISE block of a CASE
language statement. |
void |
overlay_clause()
|
void |
overlay_stmt()
Matches the
OVERLAY language statement. |
void |
p2j_open_url_stmt()
Matches the P2J-extension language statement
P2J-OPEN-URL and a mandatory
following character expression. |
void |
page_stmt()
Matches the
PAGE language statement. |
void |
param_list_definition(boolean defineBuffer,
boolean funcDef)
Matches a parenthesized list of comma-separated parameter definitions and uses a rule
reference to
parameter_spec(boolean, boolean) to properly build the AST. |
void |
param_passing_list(boolean isRunStmt)
Matches a parenthesized list of comma-separated parameters used in a call-site and uses a
rule reference to
parameter() to properly build the AST. |
void |
parameter_spec(boolean defineBuffer,
boolean funcDef)
Matches a single statement parameter definition for methods, constructors, destructors,
property getters/setters and user-defined function definitions.
|
void |
parameter()
Matches a single parameter being passed at a call-site.
|
void |
parent_child_field_relation()
Matches a pair of
lvalue() references and roots the pair at a
PARENT_CHILD_RELATION node. |
void |
parent_fields_ordering_clause()
Matches a
PARENT-FIELDS-[BEFORE|AFTER] followed by parenthesized list of
one or more comma separated lvalue() references. |
void |
parent_id_field_clause()
Matches a
PARENT-ID-FIELD followed by an lvalue() reference. |
void |
parent_id_relation(int idx)
Matches a
PARENT-ID-RELATION clause in a def_dataset_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast) . |
void |
pause_clause()
Matches the optional
PAUSE keyword prefix and the required
following numeric expr() . |
void |
pause_stmt()
Matches the
PAUSE language statement. |
void |
persist_clause()
Matches the
PERSISTENT keyword and the optional following
SET construct. |
void |
persistent_trigger_procedure()
Matches the
PERSISTENT keyword and the following subset of
the run_stmt() . |
void |
position_clause_arg_height()
Matches
HEIGHT and a following expr() . |
void |
position_clause_arg_width()
Matches
WIDTH and a following expr() . |
void |
position_clause_arg_x()
Matches
X and a following expr() . |
void |
position_clause_arg_y()
Matches
Y and a following expr() . |
void |
postfix_funcs()
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
lvalue() parameter for each of these is
prefixed in front of the function name. |
void |
pre_scan_class()
Pre-scan (1st pass) at reading a class definition to pre-load the symbol
resolver with the class' internal resources.
|
private boolean |
prefacedByWhitespace(antlr.Token tok)
Check if the given token is prefaced by whitespace in the original
source code (by reading from the hidden token stream).
|
void |
preproc_arguments()
Matches a list of expressions as valid preprocessor/compiler arguments
in the
RUN language statement and builds a single AST of
the entire list, rooted at an artificial ARGUMENTS node. |
void |
preselect_phrase()
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.
|
void |
primary_expr()
Implements the 9th and highest precendence level of Progress 4GL
expressions, the parenthesis precedence operators and any all of the
common expression constructs.
|
void |
printer_clause()
Matches the
PRINTER keyword with its optional following
printer name as matched by filename() . |
void |
proc_handle_clause()
Matches a
PROCEDURE keyword and the following handle() . |
void |
proc_stmt()
Implements the structure of a
PROCEDURE block definition
which is the manner in which Progress implements a form of subroutine. |
void |
procedure()
This rule creates the block structure for a procedure.
|
private void |
processHiddenText(antlr.Token tok,
Aast ast,
boolean honorValue)
Examine any following hidden tokens and if there is any whitespace
then an annotation named 'merge' will be set to
true which
can be used later to properly build the converted command text back as
it was in the original source (where the lexing should be based ONLY
on whitespace). |
void |
prod_expr()
Implements the 6th precedence level of Progress 4GL expressions, the
MULTIPLY , DIVIDE and KW_MOD
operators. |
void |
prompt_color_clause()
Matches the
PROMPT color_phrase construct used in a color
specification. |
void |
publish_stmt()
Matches the
PUBLISH language statement, the required
following character expr() and all options. |
void |
put_cursor_stmt()
Matches the
PUT CURSOR language statement and builds the
associated AST. |
void |
put_field()
Implements proper tree building for the most common field specification
in the
put_stmt() . |
void |
put_key_value_stmt() |
void |
put_memptr_stmt()
Matches the
PUT-BITS, PUT-BYTE, PUT-BYTES, PUT-DOUBLE,
PUT-FLOAT, PUT-INT64, PUT-LONG, PUT-SHORT, PUT-STRING,
PUT-UNSIGNED-LONG, PUT-UNSIGNED-SHORT language statement
with the following expr() expressions. |
void |
put_screen_stmt()
Matches the
PUT SCREEN language statement. |
void |
put_stmt()
Matches the
PUT language statement and builds the
associated AST. |
void |
query_reference()
Matches the
QUERY keyword and the required query name that
is coded as a malformed_symbol() . |
void |
query_tuning_cache_size()
Matches the
CACHE-SIZE keyword and the required following
integer literal. |
void |
query_tuning_debug()
Matches the
DEBUG keyword and the optional following
qualifier keyword (SQL or EXTENDED ). |
void |
query_tuning_phrase()
Implements the query tuning phrase including all possible options.
|
void |
radio_buttons_clause()
Matches the
RADIO-BUTTONS clause as used in a
VIEW-AS RADIO-SET phrase. |
void |
radio_set_phrase()
Matches the
VIEW-AS RADIO-SET phrase which is called from a
view_as_phrase(java.lang.String) . |
void |
raw_stmt()
|
void |
raw_transfer_stmt()
Matches the
RAW-TRANSFER language statement. |
void |
readkey_stmt()
Matches the
READKEY language statement. |
private java.lang.String |
reassembleMalformedSymbol()
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.
|
void |
recid_or_rowid()
Matches the
RECID or ROWID keywords and the following
expression inside parenthesis. |
void |
record_funcs()
This rule implements the special built-in functions that can be used
used in an expression for processing
record(boolean, boolean, boolean) or
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
record (which is not normally allowed in an expression). |
void |
record_phrase(boolean force,
boolean noProp)
Implements the record phrase used in various block definitions.
|
void |
record_spec(java.util.Set<Aast> fields)
Matches the shorthand of specifying a record (and optional exclude list
of fields) instead of an explicit field list, in the
def_frame_stmt() , display_stmt() and column_spec()
rules. |
void |
record(boolean promote,
boolean force,
boolean noProp)
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.
|
void |
ref_point()
This rule implements the reference-point construct used in at-phrase.
|
java.lang.String |
regular_parm(Aast param,
Aast likeRef)
Implements the core logic for the
DEFINE PARAMETER Progress
4GL language statement. |
void |
release_external_stmt()
Matches a
RELEASE EXTERNAL language statement, and the following required
expr() . |
void |
release_object_stmt()
Matches a
RELEASE OBJECT language statement, and the
following required expr() . |
void |
release_stmt()
Matches the
RELEASE language statement. |
private antlr.Token |
relex(java.lang.String input)
Helper to instantiate a new (limited use) lexer and re-lex the input.
|
void |
reportError(antlr.RecognitionException re)
Writes error data to
System.err , including a full stack
trace. |
void |
reposition_spec()
Matches a
FORWARDS or BACKWARDS keyword and the
following required expr() . |
void |
reposition_stmt()
Matches a
REPOSITION language statement, the required
following query name (see query_reference() ) and repositioning
information. |
void |
reserved_functions()
Matches Progress 4GL built-in function names that are reserved
keywords.
|
void |
reserved_or_symbol()
Implements the reserved_or_symbol rule which matches symbols and reserved
or nonreserved keywords that have to be handled as symbols.
|
void |
reserved_variables()
Matches Progress 4GL built-in variable names that are reserved
keywords.
|
private int |
resolveLvalueCoreType(int idx,
boolean allowChange)
Core lookahead processing for the lvalue rule which checks for a match to a variable,
widget, class data member/property or database field.
|
private boolean |
restoreAssignStyleStmt(Aast node)
Some parts of the parser can match a function when it should have matched the same name
as an "lvalue-like" language statement.
|
private boolean |
restoreEqualsOperator(Aast lnode,
Aast opnode)
The 4GL seems to disambiguate assignment statements from usage of the EQUALS operator, by
examining the lvalue.
|
void |
return_core()
Matches the Progress
RETURN keyword and builds the
resulting AST. |
void |
return_stmt()
Matches the Progress
RETURN statement using a rule reference
to return_core() and builds the resulting AST. |
void |
revoke_stmt()
Support SQL
REVOKE directly in 4GL code. |
void |
routine_level_stmt()
Matches the
KW_ROUTINEL keyword with a following on_event_phrase() . |
void |
row_height_clause()
Matches the
ROW-HEIGHT-CHARS and ROW-HEIGHT-PIXELS construct
with its required following integer constant. |
void |
run_proc_clause()
Matches a
RUN-PROCEDURE keyword and the following
character expr() . |
void |
run_stmt()
Matches the Progress
RUN language statement with all of its
options and builds the resulting AST. |
void |
run_stored_proc_stmt()
Matches the
RUN STORED-PROCEDURE language statement, the
following reserved_or_symbol() , the optional assign()
and optional param_passing_list(boolean) . |
void |
run_super_stmt()
Matches the
RUN SUPER statement with an optional following
parameter list (see param_passing_list(boolean) ). |
void |
runtime_space_or_skip()
Matches the
SPACE() or SKIP() constructs and the optional
following expr() . |
void |
save_cache_stmt()
Matches a
SAVE CACHE language statement, and the following
current_or_complete_clause() , value() or filename() . |
void |
save_result_in()
|
private void |
saveAndReplaceType(Aast node,
int newtype)
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'.
|
void |
scroll_stmt()
Matches the
SCROLL language statement. |
void |
section_clause()
Matches the
SECTION clause and a required expr() . |
void |
seek_func()
Matches the
seek() function call. |
void |
seek_stmt()
Matches the
SEEK language statement. |
void |
select_stmt()
Support SQL
SELECT directly in 4GL code. |
void |
selection_list_phrase()
Matches the
VIEW-AS SELECTION-LIST phrase which is called
from a view_as_phrase(java.lang.String) . |
void |
sequence_funcs()
Matches the
current-value , dynamic-current-value ,
dynamic-next-value and next-value() function
calls. |
void |
sequence_ref()
Sequence references are unquoted text that must match a sequence name
defined in an accessible schema.
|
void |
serialize_name()
Matches the
SERIALIZE-NAME clause with the following string. |
void |
set_byte_order_stmt()
Matches the
SET-BYTE-ORDER language statement with the
following lvalue() . |
void |
set_handle()
Matches the
SET handle clause and a following lvalue()
which must be a handle type. |
void |
set_lvalue()
Matches the
SET handle clause and a following lvalue() . |
void |
set_or_update_clause()
Matches the
SET field or UPDATE field construct and the
required following as or like clause. |
void |
set_or_update_or_prompt_for_stmt()
Matches the
SET, UPDATE and PROMPT-FOR language statements
and implements the (nearly identical) logic for all 3. |
void |
set_pointer_value_stmt()
Matches the
SET-POINTER-VALUE language statement with the
following lvalue() . |
void |
set_size_stmt()
Matches the
SET-SIZE language statement with the following
lvalue() . |
void |
setBuiltInCls(boolean builtInCls)
Sets the status of the built-in 4GL parsing flag.
|
void |
setConsumeError(boolean consume)
Sets the status of the consume error flag.
|
void |
setDebug(boolean debug)
Sets the status of the debug mode member.
|
void |
setDotNetCls(boolean dotNetCls)
Sets the status of the .NET parsing flag.
|
void |
setEvaluatingExpression(boolean eval)
Sets the status of the expression evaluation member.
|
private void |
setupHiddenFilter()
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 boolean |
setupTriggerScope()
Common code to add a scope (symbol dictionary and schema scopes) for a
trigger.
|
private void |
setUseDictExps(java.lang.String frame,
Aast framePhrase,
Aast stmt)
Check if the USE-DICT-EXPS frame option is set for this frame.
|
void |
setWebSpeed(boolean webspeed)
Sets the status of the WebSpeed parsing flag.
|
void |
shell_command_stmt()
Matches any operating system specific shell command (
UNIX, DOS, OS2, BTOS, CTOS and VMS ) and the generic shell
command OS-COMMAND constructs including matching all possible
command tokens up to a following DOT . |
void |
simple_color_clause()
Matches the
COLOR keyword and the required following color
phrase. |
java.lang.String |
simple_for_record_spec(boolean promote)
Matches a simple
FOR and a record name for the
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast) . |
void |
simple_message_clause()
Matches the
MESSAGE STRING or NO-MESSAGE clause used in the
PAUSE language statement. |
void |
simple_on_stmt()
Matches a greatly simplified form of the
ON statement which
is only seen in a trigger_phrase() Progress construct. |
void |
simple_title_string()
Matches the
TITLE keyword and the required following string. |
void |
simple_when_clause()
Matches the
WHEN keyword and the required following
expression. |
int |
simple_widget_phrase()
Matches the simplest form of
VIEW-AS clauses for
FILL-IN, TEXT and TOGGLE-BOX . |
void |
single_block(boolean blockRoot,
boolean trigger)
This rule implements the core matching of the top-level language
constructs.
|
void |
size_phrase()
Matches the size phrase construct of the Progress 4GL language.
|
void |
slider_phrase()
Matches the
VIEW-AS SLIDER phrase which is called
from a view_as_phrase(java.lang.String) . |
void |
sort_order_clause()
Matches the
BY keyword, the required following expression
and the optional DESCENDING keyword. |
void |
source_or_target_clause(boolean cp)
Matches the
SOURCE or TARGET and following codepage or field
construct which is matched as a expr() . |
void |
space_or_skip()
Matches the
SPACE() or SKIP() constructs and the optional
following numeric constant. |
private void |
specialDataTypeKeywordAbbreviations(int lookahead)
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.
|
void |
sql_aggregate_funcs()
Matches an embedded SQL aggregate function call.
|
void |
sql_assign_list()
Matches the list of column assignments in an
sql_update_stmt()
which are rooted at a SET keyword. |
void |
sql_assign()
Matches the SQL assignment of an
sql_value() to an lvalue() . |
void |
sql_column_def()
|
void |
sql_column_list()
Matches the list of fields or SQL aggregate functions in a
select_stmt() . |
void |
sql_column_options()
Matches the possible clauses to define column attributes or options.
|
void |
sql_column_spec(boolean root)
Matches a column name as a
symbol() and the following data type
as sql_data_type() . |
void |
sql_correlation_name(java.lang.String rtext)
Matches a correlation name (
symbol() ) in an sql_table_spec()
and creates a new buffer for the given table name. |
void |
sql_data_option()
Matches limited options (for column data type specifiers) as numeric
literals in parenthesis.
|
void |
sql_data_type()
Matches all possible SQL data types.
|
void |
sql_default_value()
Matches the
DEFAULT keyword and the following literal. |
void |
sql_direction_spec()
Match the
ASCEND or DESCEND keywords. |
void |
sql_explicit_join()
Matches all 3 kinds of explicit join (inner joins, left outer joins and
right outer joins).
|
void |
sql_from()
Matches an embedded SQL
FROM clause and the following
sql_table_spec() . |
void |
sql_group_by()
Matches the SQL
GROUP BY specification and its following
list of comma separated expr() . |
void |
sql_having()
Matches the SQL
HAVING keyword and its following
expr() . |
void |
sql_indicator_var()
Matches the indicator variable specification in a
sql_into() . |
void |
sql_individual_column()
Matches a single field or expression (including SQL aggregate functions) in
a
sql_column_list() . |
void |
sql_into()
Matches an embedded SQL
INTO clause and the following list
of variables (uses lvalue() and sql_indicator_var() ). |
void |
sql_join_condition()
Matches an
ON followed by an expr() which is a SQL
join condition. |
void |
sql_name_list(boolean root)
Matches a parenthesized list of column names as
symbol() . |
void |
sql_not_null()
Matches the
NOT NULL keywords and the optional following
UNIQUE . |
void |
sql_on_table()
Matches SQL
ON followed by a record(boolean, boolean, boolean) . |
void |
sql_order_by()
Matches the SQL
ORDER BY specification and its following
list of comma separated expr() and optional
sql_direction_spec() . |
void |
sql_simple_column_list()
Matches the list of fields in a
insert_into_stmt() . |
void |
sql_table_spec()
Matches a
record(boolean, boolean, boolean) and an optional following
sql_correlation_name(java.lang.String) . |
void |
sql_to_from_users()
|
void |
sql_unique_index()
Matches
UNIQUE followed by a parenthesized list of column
names using sql_column_list() . |
void |
sql_update_rights()
Matches SQL
UPDATE rights option with a list of columns
using lvalue() . |
void |
sql_update_stmt()
Matches the SQL
UPDATE statement. |
void |
sql_value_list()
Matches the list of values in a
insert_into_stmt() . |
void |
sql_value()
Matches a single
expr() or KW_NULL . |
void |
starting_clause()
|
void |
statement()
This rule creates an artificial tree node for any non-block language
statement (these are language statements that do not start or end
blocks).
|
void |
status_stmt()
Matches the
STATUS language statement. |
void |
stmt_list()
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.
|
void |
stretch_to_fit_clause()
Support the
STRETCH-TO-FIT with an optional
RETAIN-SHAPE . |
void |
sub_assign_clause()
Matches the
ASSIGN keyword and a list of space delimited
assignment expressions. |
void |
sub_select_stmt()
Matches a sub-select in a
WHERE clause. |
void |
submenu_descriptor()
Matches the
SUB-MENU keyword with following sub-menu name
and options. |
void |
subscribe_stmt()
Matches the
SUBSCRIBE language statement, the required
following character expr() and all options. |
void |
subscript()
Matches the array subscripting operator [ ] in all of its forms.
|
void |
substring_stmt()
Matches the
SUBSTRING( , , , ) = expression language
statement. |
void |
sum_expr()
Implements the 5th precedence level of Progress 4GL expressions, the
PLUS and MINUS operators (for all data types,
even the non-numeric uses for dates or string concatenation). |
void |
super_function()
This rule implements the special built-in
SUPER function,
which can be used in an expression. |
void |
super_stmt()
Matches the
SUPER statement with an optional following
parameter list (see param_passing_list(boolean) ). |
void |
symbol()
Matches all possible user-defined symbol names.
|
void |
system_dialog_color_stmt()
Matches the
SYSTEM-DIALOG COLOR statement and all following
options. |
void |
system_dialog_font_stmt()
Matches the
SYSTEM-DIALOG FONT statement and all following
options. |
void |
system_dialog_get_dir_stmt()
Matches the
SYSTEM-DIALOG GET-DIR statement and all following options. |
void |
system_dialog_get_file_stmt()
Matches the
SYSTEM-DIALOG GET-FILE statement and all
following options. |
void |
system_dialog_printer_setup_stmt()
Matches the
SYSTEM-DIALOG PRINTER-SETUP statement and all
following options. |
void |
system_help_stmt()
Matches the
SYSTEM-HELP statement and all following options. |
java.lang.String |
table_parm()
Implements the
TABLE , DATASET , TABLE-HANDLE and
DATASET-HANDLE logic for parameter definitions (see def_parm_stmt() ). |
void |
temp_table_field_options(java.lang.String symText,
int ftype)
Matches the field options that can be specified when creating a temp-table
using the
DEFINE TEMP-TABLE or DEFINE WORK-TABLE statements. |
void |
temp_table_use_index(java.lang.Object table)
Matches
VALIDATE or USE-INDEX keywords and (in
the second case) the following index name plus optional
AS PRIMARY construct. |
void |
terminal_stmt()
Matches the
TERMINAL language statement. |
void |
text_clause()
Matches the
TEXT keyword and an following field specification. |
void |
then_clause()
Matches the
THEN block of an IF THEN ELSE
language statement. |
void |
this_object_stmt()
Matches the
THIS-OBJECT statement with an optional following
parameter list (see param_passing_list(boolean) ). |
void |
throw_clause()
Matches the
KW_THROW with a following expr() which
will be a child node. |
void |
tic_marks_clause()
Matches the
TIC-MARKS clause as used in a
VIEW-AS SLIDER phrase. |
void |
time_clause()
Matches
TIME clause followed by an expr() . |
void |
title_clause()
Matches the
TITLE clause followed by an expr() . |
void |
title_phrase()
Matches the title-phrase construct of the Progress 4GL language.
|
void |
to_constant()
Matches a specific
TO literal clause used in the
constant_form_item() and format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean) . |
void |
to_event_target()
Matches the
TO widget_phrase construct of the
apply_stmt() . |
void |
to_lob_target()
|
void |
to_or_at_clause()
Matches the
AT or TO keywords and a required following
expression. |
void |
to_recid_or_rowid_clause()
Matches the
TO RECID, TO ROWID or TO ROW keywords and the
following required expression of type RECID, ROWID or integer
(in the case of a TO ROW ). |
void |
to_target()
Matches the
TO keyword and the following record(boolean, boolean, boolean) . |
void |
tooltip_clause()
Matches the
TOOLTIP clause as used in a phrase from a
VIEW-AS construct. |
void |
topic_clause()
Matches
TOPIC clause followed by an expr() . |
void |
trans_distinct_clause()
Matches the
TRANSACTION DISTINCT clause. |
void |
transaction_mode_auto_stmt()
Match the
TRANSACTION-MODE AUTOMATIC statement. |
void |
trigger_phrase()
Matches the
TRIGGERS keyword and the following trigger phrase
construct. |
void |
trigger_procedure_stmt()
Support the
TRIGGER PROCEDURE language statement. |
void |
ui_stuff()
Matches a set of UI oriented keywords and keywords and the required
following expression.
|
void |
un_type()
Implements the 7th precedence level of Progress 4GL expressions, the
unary operators
PLUS and MINUS . |
void |
underline_stmt()
Matches the
UNDERLINE language statement. |
void |
undo_basic()
Implements the the
UNDO action and the optional following
label references. |
void |
undo_core()
|
void |
undo_stmt()
Matches the top level
UNDO statement, but some logic is
delegated to a shared rule undo_core() which is also used by
on_event_phrase() . |
void |
unformatted_clause()
|
void |
union_stmt()
Matches the SQL
UNION statement which can be the same as a
simple select_stmt() , or it can contain a nested set of select
statements joined by the UNION keyword. |
void |
unload_stmt()
Matches the
UNLOAD language statement with a required
following expr() . |
void |
unsubscribe_stmt()
Matches the
UNSUBSCRIBE language statement, the required
following character expr() and all options. |
void |
up_or_down_stmt()
Matches the
UP or DOWN language statements. |
void |
update_logical_clause()
Matches
UPDATE clause followed by an lvalue() . |
void |
use_index_clause()
Matches the
USE-INDEX keyword and the required following
index. |
void |
use_stmt()
Matches the
USE language statement with a required following
expr() . |
void |
user_defined_method()
This rule creates the block structure for a user defined method.
|
void |
user_defined_type_name()
Matches an
any_symbol_at_all() or a STRING and if it
represents an unqualified class name, it will be resolved into the fully
qualified class name that is referenced. |
void |
using_clause()
Matches the
USING keyword and the required following list
of lvalue() (fields) and optional matching frames. |
void |
using_id_clause()
Matches the
USING keyword and the following
RECID or ROWID construct as encoded by
recid_or_rowid() . |
void |
using_stmt()
|
void |
validate_stmt()
Matches the
VALIDATE language statement. |
void |
validate(java.lang.String schemaName)
Matches the
VALIDATE( expression ) construct which specifies
a boolean condition expression and a message string expression to display
when the condition expression evaluates to false. |
void |
value_clause()
Matches the
VALUE clause and a required expr() . |
void |
value()
Matches the
VALUE( expression ) construct which converts
an expression into a symbol-like result (example: a type of name). |
void |
var_type(java.lang.String varName,
boolean nativeTypes)
Matches the variable type language keyword in
as_clause(java.lang.String, boolean) or
directly in parameter() . |
void |
version_6_frame_clause()
Matches the
V6FRAME keyword and the optional following
keywords. |
void |
view_as_alert_box_clause()
Matches the
VIEW-AS ALERT-BOX construct and the optional
following definitions. |
void |
view_as_dialog_clause()
Matches the
VIEW-AS DIALOG-BOX clause. |
void |
view_as_phrase(java.lang.String symName)
Matches the
VIEW-AS phrase which is called from many locations
such as def_var_stmt(boolean[]) . |
void |
view_as_text_clause()
Matches a specific
VIEW-AS TEXT clause used in the
constant_form_item() . |
void |
view_stmt()
Matches the
VIEW language statement. |
void |
wait_for_dotnet_stmt()
Matches the .NET version of the
WAIT-FOR language statement. |
void |
wait_for_stmt()
Matches the
WAIT-FOR language statement. |
void |
when_clause()
Matches the
WHEN block of a CASE
language statement. |
void |
where_clause()
Matches the
WHERE keyword and the required following
expression. |
void |
where_current_of()
Matches the
WHERE CURRENT OF keyword sequence and a following
symbol() . |
void |
while_clause()
Matches the loop termination expression defined by the
WHILE
keyword. |
void |
widget_array()
Aggregates (in a tree building sense) a simple list of all fields under
a specific language statement.
|
void |
widget_list()
Matches a space or comma delimited list of widgets.
|
void |
widget_phrase()
Matches the widget phrase construct of the Progress 4GL language which
consists of the optional
FIELD keyword prefix and the
required following widget reference. |
void |
widget_qualifier()
Matches an optional widget qualifier using the keyword
IN . |
void |
widget()
Matches all Progress 4GL widget names that exist in the variable
namespace (which is the namespace in which Progress stores them).
|
void |
window_name_clause()
Matches
WINDOW-NAME clause followed by an expr() . |
void |
write_referencing_phrase(Aast ref)
Implements the referencing phrase to modify a database event trigger,
matches on the
NEW or OLD keywords and all following
optional or required constructs. |
void |
xml_data_type()
Matches
XML-DATA-TYPE with a following STRING . |
void |
xml_node_name()
Matches
XML-NODE-NAME and a following STRING . |
void |
xml_node_type()
Matches
XML-NODE-TYPE with a following STRING . |
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, recover, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
private static final java.lang.String AST_CLASS
private static java.util.Map tokenLookup
private boolean debug
private int nestLevel
private int constStmts
private SymbolResolver sym
private boolean preferWidgets
private java.lang.String currentClassName
lvalue()
for data member lookups.private boolean currentStaticFlag
lvalue()
for static-only data member lookups.private boolean inLikeClause
private boolean embeddedSql
expr()
process when inside embedded SQL statements.private int sqlNestLevel
private int selectNestLevel
private boolean inUnion
true
if processing an SQL UNION statement.private java.lang.String validateFieldName
private boolean validation
true
if a validate expression is being processed.private boolean bufferScope
false
when the parser is currently in an internal
procedure, function or trigger, otherwise is set true
.private boolean forceTemp
private boolean topLevelEntry
true
if the parser was entered via external_proc.private int preScanPass
private int exprLvl
expr()
rule.private boolean webspeed
true
if parsing a WebSpeed program.private boolean consumeErr
true
to consume errors and automatically restart parsing.private boolean evaluatingExpression
private boolean allowSymbolMatch
lvalue()
to match a SYMBOL
.private boolean allowStringMatch
private antlr.TokenStreamHiddenTokenFilter hidden
private boolean insideClassEvent
private boolean insideClass
private boolean builtInCls
true
if we are parsing a built-in class/interface.private boolean dotNetCls
true
if we are parsing a .NET class/interface.private boolean inStaticCtxt
true
if we are parsing inside a static method.private int errorCount
public static final java.lang.String[] _tokenNames
public static final antlr.collections.impl.BitSet _tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_4
public static final antlr.collections.impl.BitSet _tokenSet_5
public static final antlr.collections.impl.BitSet _tokenSet_6
public static final antlr.collections.impl.BitSet _tokenSet_7
public static final antlr.collections.impl.BitSet _tokenSet_8
public static final antlr.collections.impl.BitSet _tokenSet_9
public static final antlr.collections.impl.BitSet _tokenSet_10
public static final antlr.collections.impl.BitSet _tokenSet_11
public static final antlr.collections.impl.BitSet _tokenSet_12
public static final antlr.collections.impl.BitSet _tokenSet_13
public static final antlr.collections.impl.BitSet _tokenSet_14
public static final antlr.collections.impl.BitSet _tokenSet_15
public static final antlr.collections.impl.BitSet _tokenSet_16
public static final antlr.collections.impl.BitSet _tokenSet_17
public static final antlr.collections.impl.BitSet _tokenSet_18
public static final antlr.collections.impl.BitSet _tokenSet_19
public static final antlr.collections.impl.BitSet _tokenSet_20
public static final antlr.collections.impl.BitSet _tokenSet_21
public static final antlr.collections.impl.BitSet _tokenSet_22
public static final antlr.collections.impl.BitSet _tokenSet_23
public static final antlr.collections.impl.BitSet _tokenSet_24
public static final antlr.collections.impl.BitSet _tokenSet_25
public static final antlr.collections.impl.BitSet _tokenSet_26
public static final antlr.collections.impl.BitSet _tokenSet_27
public static final antlr.collections.impl.BitSet _tokenSet_28
public static final antlr.collections.impl.BitSet _tokenSet_29
public static final antlr.collections.impl.BitSet _tokenSet_30
public static final antlr.collections.impl.BitSet _tokenSet_31
public static final antlr.collections.impl.BitSet _tokenSet_32
public static final antlr.collections.impl.BitSet _tokenSet_33
public static final antlr.collections.impl.BitSet _tokenSet_34
public static final antlr.collections.impl.BitSet _tokenSet_35
public static final antlr.collections.impl.BitSet _tokenSet_36
public static final antlr.collections.impl.BitSet _tokenSet_37
public static final antlr.collections.impl.BitSet _tokenSet_38
public static final antlr.collections.impl.BitSet _tokenSet_39
public static final antlr.collections.impl.BitSet _tokenSet_40
public static final antlr.collections.impl.BitSet _tokenSet_41
public static final antlr.collections.impl.BitSet _tokenSet_42
public static final antlr.collections.impl.BitSet _tokenSet_43
public static final antlr.collections.impl.BitSet _tokenSet_44
public static final antlr.collections.impl.BitSet _tokenSet_45
public static final antlr.collections.impl.BitSet _tokenSet_46
public static final antlr.collections.impl.BitSet _tokenSet_47
public static final antlr.collections.impl.BitSet _tokenSet_48
public static final antlr.collections.impl.BitSet _tokenSet_49
public static final antlr.collections.impl.BitSet _tokenSet_50
public static final antlr.collections.impl.BitSet _tokenSet_51
public static final antlr.collections.impl.BitSet _tokenSet_52
public static final antlr.collections.impl.BitSet _tokenSet_53
public static final antlr.collections.impl.BitSet _tokenSet_54
public static final antlr.collections.impl.BitSet _tokenSet_55
public static final antlr.collections.impl.BitSet _tokenSet_56
public static final antlr.collections.impl.BitSet _tokenSet_57
public static final antlr.collections.impl.BitSet _tokenSet_58
public static final antlr.collections.impl.BitSet _tokenSet_59
public static final antlr.collections.impl.BitSet _tokenSet_60
public static final antlr.collections.impl.BitSet _tokenSet_61
public static final antlr.collections.impl.BitSet _tokenSet_62
public static final antlr.collections.impl.BitSet _tokenSet_63
public static final antlr.collections.impl.BitSet _tokenSet_64
public static final antlr.collections.impl.BitSet _tokenSet_65
public static final antlr.collections.impl.BitSet _tokenSet_66
public static final antlr.collections.impl.BitSet _tokenSet_67
public static final antlr.collections.impl.BitSet _tokenSet_68
public static final antlr.collections.impl.BitSet _tokenSet_69
public static final antlr.collections.impl.BitSet _tokenSet_70
public static final antlr.collections.impl.BitSet _tokenSet_71
public static final antlr.collections.impl.BitSet _tokenSet_72
public static final antlr.collections.impl.BitSet _tokenSet_73
public static final antlr.collections.impl.BitSet _tokenSet_74
public static final antlr.collections.impl.BitSet _tokenSet_75
public static final antlr.collections.impl.BitSet _tokenSet_76
public static final antlr.collections.impl.BitSet _tokenSet_77
public static final antlr.collections.impl.BitSet _tokenSet_78
public static final antlr.collections.impl.BitSet _tokenSet_79
public static final antlr.collections.impl.BitSet _tokenSet_80
public static final antlr.collections.impl.BitSet _tokenSet_81
public static final antlr.collections.impl.BitSet _tokenSet_82
public static final antlr.collections.impl.BitSet _tokenSet_83
public static final antlr.collections.impl.BitSet _tokenSet_84
public static final antlr.collections.impl.BitSet _tokenSet_85
public static final antlr.collections.impl.BitSet _tokenSet_86
public static final antlr.collections.impl.BitSet _tokenSet_87
public static final antlr.collections.impl.BitSet _tokenSet_88
public static final antlr.collections.impl.BitSet _tokenSet_89
public static final antlr.collections.impl.BitSet _tokenSet_90
public static final antlr.collections.impl.BitSet _tokenSet_91
public static final antlr.collections.impl.BitSet _tokenSet_92
public static final antlr.collections.impl.BitSet _tokenSet_93
public static final antlr.collections.impl.BitSet _tokenSet_94
public static final antlr.collections.impl.BitSet _tokenSet_95
public static final antlr.collections.impl.BitSet _tokenSet_96
public static final antlr.collections.impl.BitSet _tokenSet_97
public static final antlr.collections.impl.BitSet _tokenSet_98
public static final antlr.collections.impl.BitSet _tokenSet_99
public static final antlr.collections.impl.BitSet _tokenSet_100
public static final antlr.collections.impl.BitSet _tokenSet_101
public static final antlr.collections.impl.BitSet _tokenSet_102
public static final antlr.collections.impl.BitSet _tokenSet_103
public static final antlr.collections.impl.BitSet _tokenSet_104
public static final antlr.collections.impl.BitSet _tokenSet_105
public static final antlr.collections.impl.BitSet _tokenSet_106
public static final antlr.collections.impl.BitSet _tokenSet_107
public static final antlr.collections.impl.BitSet _tokenSet_108
public static final antlr.collections.impl.BitSet _tokenSet_109
public static final antlr.collections.impl.BitSet _tokenSet_110
public static final antlr.collections.impl.BitSet _tokenSet_111
public static final antlr.collections.impl.BitSet _tokenSet_112
public static final antlr.collections.impl.BitSet _tokenSet_113
public static final antlr.collections.impl.BitSet _tokenSet_114
public static final antlr.collections.impl.BitSet _tokenSet_115
public static final antlr.collections.impl.BitSet _tokenSet_116
public static final antlr.collections.impl.BitSet _tokenSet_117
public static final antlr.collections.impl.BitSet _tokenSet_118
public static final antlr.collections.impl.BitSet _tokenSet_119
public static final antlr.collections.impl.BitSet _tokenSet_120
public static final antlr.collections.impl.BitSet _tokenSet_121
public static final antlr.collections.impl.BitSet _tokenSet_122
public static final antlr.collections.impl.BitSet _tokenSet_123
public static final antlr.collections.impl.BitSet _tokenSet_124
public static final antlr.collections.impl.BitSet _tokenSet_125
public static final antlr.collections.impl.BitSet _tokenSet_126
public static final antlr.collections.impl.BitSet _tokenSet_127
public static final antlr.collections.impl.BitSet _tokenSet_128
public static final antlr.collections.impl.BitSet _tokenSet_129
public static final antlr.collections.impl.BitSet _tokenSet_130
public static final antlr.collections.impl.BitSet _tokenSet_131
public static final antlr.collections.impl.BitSet _tokenSet_132
public static final antlr.collections.impl.BitSet _tokenSet_133
public static final antlr.collections.impl.BitSet _tokenSet_134
public static final antlr.collections.impl.BitSet _tokenSet_135
public static final antlr.collections.impl.BitSet _tokenSet_136
public static final antlr.collections.impl.BitSet _tokenSet_137
public static final antlr.collections.impl.BitSet _tokenSet_138
public static final antlr.collections.impl.BitSet _tokenSet_139
public static final antlr.collections.impl.BitSet _tokenSet_140
public static final antlr.collections.impl.BitSet _tokenSet_141
public static final antlr.collections.impl.BitSet _tokenSet_142
public static final antlr.collections.impl.BitSet _tokenSet_143
public static final antlr.collections.impl.BitSet _tokenSet_144
public static final antlr.collections.impl.BitSet _tokenSet_145
public static final antlr.collections.impl.BitSet _tokenSet_146
public static final antlr.collections.impl.BitSet _tokenSet_147
public static final antlr.collections.impl.BitSet _tokenSet_148
public static final antlr.collections.impl.BitSet _tokenSet_149
public static final antlr.collections.impl.BitSet _tokenSet_150
public static final antlr.collections.impl.BitSet _tokenSet_151
public static final antlr.collections.impl.BitSet _tokenSet_152
public static final antlr.collections.impl.BitSet _tokenSet_153
public static final antlr.collections.impl.BitSet _tokenSet_154
public static final antlr.collections.impl.BitSet _tokenSet_155
public static final antlr.collections.impl.BitSet _tokenSet_156
public static final antlr.collections.impl.BitSet _tokenSet_157
public static final antlr.collections.impl.BitSet _tokenSet_158
public static final antlr.collections.impl.BitSet _tokenSet_159
public static final antlr.collections.impl.BitSet _tokenSet_160
public static final antlr.collections.impl.BitSet _tokenSet_161
public static final antlr.collections.impl.BitSet _tokenSet_162
public static final antlr.collections.impl.BitSet _tokenSet_163
public static final antlr.collections.impl.BitSet _tokenSet_164
public static final antlr.collections.impl.BitSet _tokenSet_165
public static final antlr.collections.impl.BitSet _tokenSet_166
public static final antlr.collections.impl.BitSet _tokenSet_167
public static final antlr.collections.impl.BitSet _tokenSet_168
public static final antlr.collections.impl.BitSet _tokenSet_169
public static final antlr.collections.impl.BitSet _tokenSet_170
public static final antlr.collections.impl.BitSet _tokenSet_171
public static final antlr.collections.impl.BitSet _tokenSet_172
public static final antlr.collections.impl.BitSet _tokenSet_173
public static final antlr.collections.impl.BitSet _tokenSet_174
public static final antlr.collections.impl.BitSet _tokenSet_175
public static final antlr.collections.impl.BitSet _tokenSet_176
public static final antlr.collections.impl.BitSet _tokenSet_177
public static final antlr.collections.impl.BitSet _tokenSet_178
public static final antlr.collections.impl.BitSet _tokenSet_179
public static final antlr.collections.impl.BitSet _tokenSet_180
public static final antlr.collections.impl.BitSet _tokenSet_181
public static final antlr.collections.impl.BitSet _tokenSet_182
public static final antlr.collections.impl.BitSet _tokenSet_183
public static final antlr.collections.impl.BitSet _tokenSet_184
public static final antlr.collections.impl.BitSet _tokenSet_185
public static final antlr.collections.impl.BitSet _tokenSet_186
public static final antlr.collections.impl.BitSet _tokenSet_187
public static final antlr.collections.impl.BitSet _tokenSet_188
public static final antlr.collections.impl.BitSet _tokenSet_189
public static final antlr.collections.impl.BitSet _tokenSet_190
public static final antlr.collections.impl.BitSet _tokenSet_191
public static final antlr.collections.impl.BitSet _tokenSet_192
public static final antlr.collections.impl.BitSet _tokenSet_193
public static final antlr.collections.impl.BitSet _tokenSet_194
public static final antlr.collections.impl.BitSet _tokenSet_195
public static final antlr.collections.impl.BitSet _tokenSet_196
public static final antlr.collections.impl.BitSet _tokenSet_197
public static final antlr.collections.impl.BitSet _tokenSet_198
public static final antlr.collections.impl.BitSet _tokenSet_199
public static final antlr.collections.impl.BitSet _tokenSet_200
public static final antlr.collections.impl.BitSet _tokenSet_201
public static final antlr.collections.impl.BitSet _tokenSet_202
public static final antlr.collections.impl.BitSet _tokenSet_203
public static final antlr.collections.impl.BitSet _tokenSet_204
public static final antlr.collections.impl.BitSet _tokenSet_205
public static final antlr.collections.impl.BitSet _tokenSet_206
public static final antlr.collections.impl.BitSet _tokenSet_207
public static final antlr.collections.impl.BitSet _tokenSet_208
public static final antlr.collections.impl.BitSet _tokenSet_209
public static final antlr.collections.impl.BitSet _tokenSet_210
public static final antlr.collections.impl.BitSet _tokenSet_211
public static final antlr.collections.impl.BitSet _tokenSet_212
public static final antlr.collections.impl.BitSet _tokenSet_213
public static final antlr.collections.impl.BitSet _tokenSet_214
public static final antlr.collections.impl.BitSet _tokenSet_215
public static final antlr.collections.impl.BitSet _tokenSet_216
public static final antlr.collections.impl.BitSet _tokenSet_217
public static final antlr.collections.impl.BitSet _tokenSet_218
public static final antlr.collections.impl.BitSet _tokenSet_219
public static final antlr.collections.impl.BitSet _tokenSet_220
public static final antlr.collections.impl.BitSet _tokenSet_221
public static final antlr.collections.impl.BitSet _tokenSet_222
public static final antlr.collections.impl.BitSet _tokenSet_223
public static final antlr.collections.impl.BitSet _tokenSet_224
public static final antlr.collections.impl.BitSet _tokenSet_225
public static final antlr.collections.impl.BitSet _tokenSet_226
public static final antlr.collections.impl.BitSet _tokenSet_227
public static final antlr.collections.impl.BitSet _tokenSet_228
public static final antlr.collections.impl.BitSet _tokenSet_229
public static final antlr.collections.impl.BitSet _tokenSet_230
public static final antlr.collections.impl.BitSet _tokenSet_231
public static final antlr.collections.impl.BitSet _tokenSet_232
public static final antlr.collections.impl.BitSet _tokenSet_233
public static final antlr.collections.impl.BitSet _tokenSet_234
public static final antlr.collections.impl.BitSet _tokenSet_235
public static final antlr.collections.impl.BitSet _tokenSet_236
public static final antlr.collections.impl.BitSet _tokenSet_237
public static final antlr.collections.impl.BitSet _tokenSet_238
public static final antlr.collections.impl.BitSet _tokenSet_239
public static final antlr.collections.impl.BitSet _tokenSet_240
public static final antlr.collections.impl.BitSet _tokenSet_241
public static final antlr.collections.impl.BitSet _tokenSet_242
public static final antlr.collections.impl.BitSet _tokenSet_243
public static final antlr.collections.impl.BitSet _tokenSet_244
public static final antlr.collections.impl.BitSet _tokenSet_245
public static final antlr.collections.impl.BitSet _tokenSet_246
public static final antlr.collections.impl.BitSet _tokenSet_247
public static final antlr.collections.impl.BitSet _tokenSet_248
public static final antlr.collections.impl.BitSet _tokenSet_249
public static final antlr.collections.impl.BitSet _tokenSet_250
public static final antlr.collections.impl.BitSet _tokenSet_251
public static final antlr.collections.impl.BitSet _tokenSet_252
public static final antlr.collections.impl.BitSet _tokenSet_253
public static final antlr.collections.impl.BitSet _tokenSet_254
public static final antlr.collections.impl.BitSet _tokenSet_255
public static final antlr.collections.impl.BitSet _tokenSet_256
public static final antlr.collections.impl.BitSet _tokenSet_257
public static final antlr.collections.impl.BitSet _tokenSet_258
public static final antlr.collections.impl.BitSet _tokenSet_259
public static final antlr.collections.impl.BitSet _tokenSet_260
public static final antlr.collections.impl.BitSet _tokenSet_261
public static final antlr.collections.impl.BitSet _tokenSet_262
public static final antlr.collections.impl.BitSet _tokenSet_263
public static final antlr.collections.impl.BitSet _tokenSet_264
public static final antlr.collections.impl.BitSet _tokenSet_265
public static final antlr.collections.impl.BitSet _tokenSet_266
public static final antlr.collections.impl.BitSet _tokenSet_267
public static final antlr.collections.impl.BitSet _tokenSet_268
public static final antlr.collections.impl.BitSet _tokenSet_269
public static final antlr.collections.impl.BitSet _tokenSet_270
public static final antlr.collections.impl.BitSet _tokenSet_271
public static final antlr.collections.impl.BitSet _tokenSet_272
public static final antlr.collections.impl.BitSet _tokenSet_273
public static final antlr.collections.impl.BitSet _tokenSet_274
public static final antlr.collections.impl.BitSet _tokenSet_275
public static final antlr.collections.impl.BitSet _tokenSet_276
public static final antlr.collections.impl.BitSet _tokenSet_277
public static final antlr.collections.impl.BitSet _tokenSet_278
public static final antlr.collections.impl.BitSet _tokenSet_279
public static final antlr.collections.impl.BitSet _tokenSet_280
public static final antlr.collections.impl.BitSet _tokenSet_281
public static final antlr.collections.impl.BitSet _tokenSet_282
public static final antlr.collections.impl.BitSet _tokenSet_283
public static final antlr.collections.impl.BitSet _tokenSet_284
public static final antlr.collections.impl.BitSet _tokenSet_285
public static final antlr.collections.impl.BitSet _tokenSet_286
public static final antlr.collections.impl.BitSet _tokenSet_287
public static final antlr.collections.impl.BitSet _tokenSet_288
public static final antlr.collections.impl.BitSet _tokenSet_289
public static final antlr.collections.impl.BitSet _tokenSet_290
public static final antlr.collections.impl.BitSet _tokenSet_291
public static final antlr.collections.impl.BitSet _tokenSet_292
public static final antlr.collections.impl.BitSet _tokenSet_293
public static final antlr.collections.impl.BitSet _tokenSet_294
public static final antlr.collections.impl.BitSet _tokenSet_295
public static final antlr.collections.impl.BitSet _tokenSet_296
public static final antlr.collections.impl.BitSet _tokenSet_297
public static final antlr.collections.impl.BitSet _tokenSet_298
public static final antlr.collections.impl.BitSet _tokenSet_299
public static final antlr.collections.impl.BitSet _tokenSet_300
public static final antlr.collections.impl.BitSet _tokenSet_301
public static final antlr.collections.impl.BitSet _tokenSet_302
public static final antlr.collections.impl.BitSet _tokenSet_303
public static final antlr.collections.impl.BitSet _tokenSet_304
public static final antlr.collections.impl.BitSet _tokenSet_305
public static final antlr.collections.impl.BitSet _tokenSet_306
public static final antlr.collections.impl.BitSet _tokenSet_307
public static final antlr.collections.impl.BitSet _tokenSet_308
public static final antlr.collections.impl.BitSet _tokenSet_309
public static final antlr.collections.impl.BitSet _tokenSet_310
public static final antlr.collections.impl.BitSet _tokenSet_311
public static final antlr.collections.impl.BitSet _tokenSet_312
public static final antlr.collections.impl.BitSet _tokenSet_313
public static final antlr.collections.impl.BitSet _tokenSet_314
public static final antlr.collections.impl.BitSet _tokenSet_315
public static final antlr.collections.impl.BitSet _tokenSet_316
public static final antlr.collections.impl.BitSet _tokenSet_317
public static final antlr.collections.impl.BitSet _tokenSet_318
public static final antlr.collections.impl.BitSet _tokenSet_319
public static final antlr.collections.impl.BitSet _tokenSet_320
public static final antlr.collections.impl.BitSet _tokenSet_321
public static final antlr.collections.impl.BitSet _tokenSet_322
public static final antlr.collections.impl.BitSet _tokenSet_323
public static final antlr.collections.impl.BitSet _tokenSet_324
public static final antlr.collections.impl.BitSet _tokenSet_325
public static final antlr.collections.impl.BitSet _tokenSet_326
public static final antlr.collections.impl.BitSet _tokenSet_327
public static final antlr.collections.impl.BitSet _tokenSet_328
public static final antlr.collections.impl.BitSet _tokenSet_329
public static final antlr.collections.impl.BitSet _tokenSet_330
public static final antlr.collections.impl.BitSet _tokenSet_331
public static final antlr.collections.impl.BitSet _tokenSet_332
public static final antlr.collections.impl.BitSet _tokenSet_333
public static final antlr.collections.impl.BitSet _tokenSet_334
public static final antlr.collections.impl.BitSet _tokenSet_335
public static final antlr.collections.impl.BitSet _tokenSet_336
public static final antlr.collections.impl.BitSet _tokenSet_337
public static final antlr.collections.impl.BitSet _tokenSet_338
public static final antlr.collections.impl.BitSet _tokenSet_339
public static final antlr.collections.impl.BitSet _tokenSet_340
public static final antlr.collections.impl.BitSet _tokenSet_341
public static final antlr.collections.impl.BitSet _tokenSet_342
public static final antlr.collections.impl.BitSet _tokenSet_343
public static final antlr.collections.impl.BitSet _tokenSet_344
public static final antlr.collections.impl.BitSet _tokenSet_345
public static final antlr.collections.impl.BitSet _tokenSet_346
public static final antlr.collections.impl.BitSet _tokenSet_347
public static final antlr.collections.impl.BitSet _tokenSet_348
public static final antlr.collections.impl.BitSet _tokenSet_349
public static final antlr.collections.impl.BitSet _tokenSet_350
public static final antlr.collections.impl.BitSet _tokenSet_351
public static final antlr.collections.impl.BitSet _tokenSet_352
public static final antlr.collections.impl.BitSet _tokenSet_353
public static final antlr.collections.impl.BitSet _tokenSet_354
public static final antlr.collections.impl.BitSet _tokenSet_355
public static final antlr.collections.impl.BitSet _tokenSet_356
public static final antlr.collections.impl.BitSet _tokenSet_357
public static final antlr.collections.impl.BitSet _tokenSet_358
public static final antlr.collections.impl.BitSet _tokenSet_359
public static final antlr.collections.impl.BitSet _tokenSet_360
public static final antlr.collections.impl.BitSet _tokenSet_361
public static final antlr.collections.impl.BitSet _tokenSet_362
public static final antlr.collections.impl.BitSet _tokenSet_363
public static final antlr.collections.impl.BitSet _tokenSet_364
public static final antlr.collections.impl.BitSet _tokenSet_365
public static final antlr.collections.impl.BitSet _tokenSet_366
public static final antlr.collections.impl.BitSet _tokenSet_367
public static final antlr.collections.impl.BitSet _tokenSet_368
public static final antlr.collections.impl.BitSet _tokenSet_369
public static final antlr.collections.impl.BitSet _tokenSet_370
public static final antlr.collections.impl.BitSet _tokenSet_371
public static final antlr.collections.impl.BitSet _tokenSet_372
public static final antlr.collections.impl.BitSet _tokenSet_373
public static final antlr.collections.impl.BitSet _tokenSet_374
public static final antlr.collections.impl.BitSet _tokenSet_375
public static final antlr.collections.impl.BitSet _tokenSet_376
public static final antlr.collections.impl.BitSet _tokenSet_377
public static final antlr.collections.impl.BitSet _tokenSet_378
public static final antlr.collections.impl.BitSet _tokenSet_379
public static final antlr.collections.impl.BitSet _tokenSet_380
public static final antlr.collections.impl.BitSet _tokenSet_381
public static final antlr.collections.impl.BitSet _tokenSet_382
public static final antlr.collections.impl.BitSet _tokenSet_383
public static final antlr.collections.impl.BitSet _tokenSet_384
public static final antlr.collections.impl.BitSet _tokenSet_385
public ProgressParser(antlr.TokenStream lexer, SymbolResolver sr)
lexer
- An instance of a TokenStream
object.sr
- The user-defined (and optionally preloaded) symbol resolver.protected ProgressParser(antlr.TokenBuffer tokenBuf, int k)
public ProgressParser(antlr.TokenBuffer tokenBuf)
protected ProgressParser(antlr.TokenStream lexer, int k)
public ProgressParser(antlr.TokenStream lexer)
public ProgressParser(antlr.ParserSharedInputState state)
public void reportError(antlr.RecognitionException re)
System.err
, including a full stack
trace.reportError
in class antlr.Parser
re
- The error on which to report.public java.lang.RuntimeException genExc(java.lang.String msg, Aast node)
msg
- Error message for the containing RuntimeException
node
- AST node which provides context for the no-viable-alternative location details.public java.lang.RuntimeException genExc(java.lang.String msg, antlr.Token node)
msg
- Error message for the containing RuntimeException
node
- Token node which provides context for the no-viable-alternative location details.public boolean isDebug()
public void setDebug(boolean debug)
debug
- true
to enable debug output.public boolean isConsumeError()
public void setConsumeError(boolean consume)
consume
- true
to enable debug output.public boolean isEvaluatingExpression()
public void setEvaluatingExpression(boolean eval)
eval
- true
if the current code is used to evaluate
an expression.public boolean isWebSpeed()
public void setWebSpeed(boolean webspeed)
webspeed
- true
if the current program is a WebSpeed
application.public boolean isBuiltInCls()
public void setBuiltInCls(boolean builtInCls)
builtInCls
- true
if the current program is a built-in 4GL
class/interface.public boolean isDotNetCls()
public void setDotNetCls(boolean dotNetCls)
dotNetCls
- true
if the current program is a .NET
class/interface.public int getErrorCount()
public static int lookupTokenType(java.lang.String tokenName)
tokenName
- The text representation of the parser token type.public static java.lang.String lookupTokenName(int type)
type
- The integer token type.null
if
no match was found.private java.util.List<Aast> attachAssignSchemaValidation(antlr.ASTPair anchor, Aast fieldRef, SymbolResolver sym)
anchor
- ASTPair to which a KW_VALIDATE sub-tree will be attached as a child.fieldRef
- The AST for a business logic reference to a database field. This AST is expected
to have schemaname
and bufname
annotations.sym
- Symbol resolver which will be used to parse the schema validation expression, if
any, for the given field.null
if nothing
was attached.private java.util.List<Aast> attachAssignSchemaValidation(antlr.ASTPair anchor, Aast schemaRef, java.lang.String schemaName, java.lang.String bufName, SymbolResolver sym)
anchor
- ASTPair to which a KW_VALIDATE sub-tree will be attached as a child.schemaRef
- The AST for a field provided by the schema dictionary, from which the validation
expression and message are retrieved.schemaName
- Fully qualified schema name of the field for which validation is being processed.bufName
- Qualified name of the buffer referencing the table which contains the field for
which validation is being processed.sym
- Symbol resolver which will be used to parse the schema validation expression, if
any, for the given field.null
if nothing
was attached.private void attachAllAssignSchemaValidation(antlr.ASTPair anchor, Aast recordRef, SymbolResolver sym, boolean createFormatPhrase)
anchor
- ASTPair to which zero or more KW_VALIDATE sub-trees will be attached as children.recordRef
- The AST for a business logic reference to a database record. This AST is expected
to have schemaname
and bufname
annotations.sym
- Symbol resolver which will be used to parse the schema validation expressions, if
any, for the fields in the given table.createFormatPhrase
- true
if format phrase node should be created to attach KW_VALIDATE
nodes. false
if format phrase node should not be created, e.g. for
browse columns.private void attachDeleteSchemaValidation(antlr.ASTPair anchor, Aast recordRef, SymbolResolver sym)
anchor
- ASTPair to which a KW_VALIDATE sub-tree will be attached as a child.recordRef
- The AST for a business logic reference to a database record. This AST is expected
to have schemaname
and bufname
annotations.sym
- Symbol resolver which will be used to parse the schema validation expression, if
any, for the given field.private java.util.List<Aast> attachSchemaValidation(antlr.ASTPair anchor, Aast valExp, Aast valMsg, java.lang.String schemaName, java.lang.String bufName, SymbolResolver sym, java.lang.String help)
anchor
- ASTPair to which a KW_VALIDATE sub-tree will be attached as a child.valExp
- Validation expression AST.valMsg
- Validation message AST.schemaName
- Fully qualified schema name of database field for which validation is needed.bufName
- Name of buffer referenced in business logic, which contains field.sym
- Symbol resolver which will be used to parse the schema validation expression, if
any, for the given field or record.help
- The schema-level help text.null
if nothing
was attached.public void matchRange(int t1, int t2) throws antlr.MismatchedTokenException, antlr.TokenStreamException
matchRange
method, the
parser does not! This method was added manually to resolve this
condition.
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.
antlr.MismatchedTokenException
antlr.TokenStreamException
private void honorKeywordIgnoreList(Keyword[] ignored)
ignored
- The list to process.private void setupHiddenFilter()
private boolean isFormVarDefinition() throws antlr.TokenStreamException
AS
or LIKE
keyword.
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!
true
if this is an inline variable definition.antlr.TokenStreamException
private void checkAndFixLabelWithReservedKeywordPrefix(int idx) throws antlr.TokenStreamException, antlr.MismatchedTokenException
single_block
will be engaged. This
should only ever be called just before a single_block
is entered.idx
- The index of the token that would start the label (and it would be a reserved
keyword).antlr.TokenStreamException
antlr.MismatchedTokenException
private boolean isProperLabel(int typ) throws antlr.TokenStreamException
A malformed label will NOT be matched by this rule (see isMalformedLabel(boolean, int, java.util.function.Predicate<antlr.CommonToken>)
).
typ
- The token type of the first lookahead token. This is a performance optimization
only since the same value could have been queried too.true
if the following tokens represent a match as a properly
formed label.antlr.TokenStreamException
private boolean isMalformedLabel(boolean def, int start, java.util.function.Predicate<antlr.CommonToken> follow) throws antlr.TokenStreamException, antlr.MismatchedTokenException
A normal label will NOT be matched by this rule so any testing for normal labels must be
done outside of this rule. See isProperLabel(int)
.
def
- true
if this should test for a label definition (the malformed
symbol must be followed by a colon). When false
, no colon is
expected BUT the resulting text must appear in the scoped label dictionary.start
- The index of the token at which to start checking.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.true
if the following tokens represent a match as a malformed
label.antlr.TokenStreamException
antlr.MismatchedTokenException
private void checkExtraSpace(Aast binOperator) throws antlr.MismatchedTokenException, antlr.TokenStreamException
Known affected keyword operators are: kw_eq
, kw_ne
, kw_lt
,
kw_gt
, kw_gte
, kw_lte
, kw_matches
, kw_begins
,
kw_contains
, kw_or
and kw_and
.
binOperator
- Aast node of the operator to be checked.antlr.MismatchedTokenException
- if no space is encounter after this token.antlr.MismatchedTokenException
- if fails to extract the next token.antlr.TokenStreamException
private boolean isMalformedSymbolFuncCall() throws antlr.TokenStreamException
LPARENS
. 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.
This does not match any tokens, it just reads ahead to check.
true
if and only if the following tokens represent
a match as a malformed function call name.antlr.TokenStreamException
private boolean isSomeSymbol(int ttype)
ttype
- The token type to check;true
if the type is some kind of symbol.private boolean isMalformedSymbol(int start) throws antlr.TokenStreamException
This does not match any tokens, it just reads ahead to check.
start
- Starting token to check.true
if and only if the following tokens represent
a match as a malformed symbol.antlr.TokenStreamException
private java.lang.String reassembleMalformedSymbol() throws antlr.TokenStreamException, antlr.NoViableAltException, antlr.MismatchedTokenException
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 isMalformedSymbolFuncCall()
!
antlr.TokenStreamException
antlr.NoViableAltException
antlr.MismatchedTokenException
private int resolveLvalueCoreType(int idx, boolean allowChange) throws antlr.TokenStreamException, antlr.MismatchedTokenException
This is split off from the lvalue rule itself so that other code can call this for lookahead purposes (no changes allowed).
idx
- The token at which to start looking for an lvalue match. This is a 1-based
index which is how ANTLR works.allowChange
- true
to enable token text modification and matching. This only
occurs with certain validation and field naming quirks.antlr.TokenStreamException
antlr.MismatchedTokenException
private boolean setupTriggerScope()
clearTriggerScope()
.
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.
bufferScope
variable
which will be set to false
by this method and
which must be reset to this returned value when the scope
is popped.private void clearTriggerScope(boolean oldBufScope)
setupTriggerScope()
.
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.
oldBufScope
- The previous state of the bufferScope
flag
which will be restored in this call.private void defineBufferFromSymbol(Aast symbol, java.lang.String recordName, Aast am, Aast st, boolean forceTemp)
symbol
- The node that defines the buffer's name.recordName
- The record that defines the buffer's structure.am
- Access modifiers if not null. Only will be non-null if this is a resource defined
as a member of a class definition.st
- Static specifier if not null. Only will be non-null if this is a resource defined
as a member of a class definition.forceTemp
- if true
, assume 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.private void processHiddenText(antlr.Token tok, Aast ast, boolean honorValue)
true
which
can be used later to properly build the converted command text back as
it was in the original source (where the lexing should be based ONLY
on whitespace). If the AST node is a KW_VALUE
or a
STRING
, merge
will be marked as
false
since no merging should be done in these cases.
Note that the KW_VALUE
support is only enabled based on
the honorValue
.
This is needed because the normal Progress parsing/lexing rules are suspended when processing command text, BUT there is no clean way of sharing state between the parser and lexer due to the lookahead design. In Progress, it is likely that there is a single monolithic parser/lexer which would allow for shared state to change lexing. We have to put this fixup in to merge tokens back together (because many command line constructs have meaning in Progress and thus are lexed as specific tokens when really they are just text. For example, > is often used and may need to be part of a larger construct like 2>&1 on the command line, but it would be lexed as 4 tokens by our lexer. We used this method to detect when we need to merge the resulting AST nodes back together at conversion time.
tok
- The token from the token stream (the lexer) which is needed
in order to examine if there are following hidden tokens.ast
- The AST node created from the given token. This is the node
that will be annotated.honorValue
- If true
, the Progress VALUE() construct is
recognized and no merge is implemented in this case.private boolean mergeUntilWS(int[] end) throws antlr.TokenStreamException, antlr.MismatchedTokenException
DOT
and EOF
. The DOT
is special, in that it is allowed to continue the merging IF it is NOT
followed by whitespace. IF the DOT
is followed by whitespace
then the merging process ends and the DOT
is NOT included
in the merged text.
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.
end
- List of token types which trigger end of merging (in addition
to DOT
and EOF
). May be
null
if there are no additional token types.true
if merging was done, false
if
no changes were made.antlr.TokenStreamException
antlr.MismatchedTokenException
private boolean matchesList(int type, int[] list)
type
matches any in the given list.type
- The token type to test for.list
- The list to check against.true
if the given type is in the list.private boolean followedByWhitespace(antlr.Token tok)
tok
- The token from the token stream (the lexer) which is needed
in order to examine if there are following hidden tokens.true
if the given token is followed by whitespace
in the hidden token stream.private boolean followedByLineEnd(antlr.Token tok)
tok
- The token from the token stream (the lexer) which is needed
in order to examine if there are following hidden tokens.true
if the given token is the last content on
the line.private boolean prefacedByWhitespace(antlr.Token tok)
tok
- The token from the token stream (the lexer) which is needed
in order to examine any prefacing hidden tokens.true
if the given token is prefaced by whitespace
in the hidden token stream.private void convertStringTo(Aast node, int newtype) throws antlr.TokenStreamException, antlr.NoViableAltException
STRING
node into a node of the specified type.node
- The STRING
node to modify.newtype
- The new type of the target node. If passed as -1, the type will be looked up as
a keyword.antlr.TokenStreamException
antlr.NoViableAltException
private void saveAndReplaceType(Aast node, int newtype)
node
- The AST to annotate and modify.newtype
- The new type of the target node.private boolean restoreEqualsOperator(Aast lnode, Aast opnode)
lnode
- The lvalue AST to examine.opnode
- The operator AST to edit.true
if the operator was edited.private boolean isLiteral(Aast node)
node
- The node AST to examine.true
if the node is a literal.private boolean restoreAssignStyleStmt(Aast node)
node
- The AST to restore.true
if the node was edited.private antlr.Token relex(java.lang.String input) throws antlr.TokenStreamException
INITIAL
having children that
are of the STRING
type even when they should be some other
kind of literal. 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!input
- The single or double quoted enclosed string containing a
token to lex. MUST NOT be null
. MUST have
enclosing quote characters as the first AND last characters.null
if the input text is an empty string.antlr.TokenStreamException
private void initializeFunctionDictionary()
SymbolResolver
with Progress 4GL built-in
functions (which take parameters). This is called during construction
to ensure that the functions are available before parsing begins.
Each function is added with the full name (even if the keyword supports
abbreviations) because the 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.
All functions are added with the token type associated with their
respective return value. Some built-in functions may have the special
type of FUNC_POLY
. 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.
Built-in functions that have no parameters are treated as variables.
See initializeVariableDictionary()
.
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:
Such variables/functions are included in both this rule and in
initializeVariableDictionary
.
private void initializeAttributesDictionary()
SymbolResolver
with Progress 4GL attributes and
methods. This is called during construction to ensure that resolution
is available before parsing begins.
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 initializeVariableDictionary()
SymbolResolver
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.
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.
Each variable is added with the full name (even if the keyword supports
abbreviations) because the 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.
All variables are added with the token type associated with their respective return value.
For built-in functions that take parameters, see
initializeFunctionDictionary()
.
This method also enables the matching of all valid system handles:
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
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:
Such variables/functions are included in both this rule and in
initializeFunctionDictionary
. The token type for such
constructs is set to the function version FUNC_
instead of
the variable version VAR_
.
private void initializeProcedureDictionary()
SymbolResolver
with Progress 4GL internal
procedures that are well known. This is called during construction
to ensure that the functions are available before parsing begins.
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 initializeStreamDictionary()
SymbolResolver
with Progress 4GL internal
streams that are well known. This is called during construction
to ensure that the streams are available before parsing begins.
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 specialDataTypeKeywordAbbreviations(int lookahead) throws antlr.TokenStreamException
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:
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
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.
This method exists simply to centralize the processing that is used
in both as_clause(java.lang.String, boolean)
and as_field_clause(java.lang.String, java.lang.Object)
. NOTE that
callers MUST ensure that any necessary pull methods (such as
reserved_or_symbol()
) are included to properly generate the
predication logic that will allow the full set of possibilities to
actually be encountered.
lookahead
- Number of tokens to look ahead.antlr.TokenStreamException
private boolean isUserDefFunctionCall(antlr.Token tok1, antlr.Token tok2)
KW_CLOSE
or KW_COMPILE
with next token
being a LPARENS
: in this case, transform it to SYMBOL
, as it
will be a function or OO method call.tok1
- First token, typically LT(1).tok2
- Second token, typically LT(2).true
if the type of this token was changed.private Aast findFieldNode(Aast possible)
possible
- The given node to test, cannot be null
.null
if no field node
was found.private void setUseDictExps(java.lang.String frame, Aast framePhrase, Aast stmt)
frame
- The frame name.framePhrase
- The FRAME_PHRASE AST.stmt
- The current UI statement.private java.lang.String getFrameName(Aast framePhrase)
framePhrase
- Frame phrase node, or null
.private boolean isRecord(java.lang.String text)
lvalue()
or an
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 (record(boolean, boolean, boolean)
) than where we match
variables and fields (lvalue
). In particular, this
rule must force a match on records before fields, but since the
matching of variables and fields is hidden in lvalue
we must disambiguate here.text
- The name (possibly abbreviated) of the potential record
reference.true
if this is a record reference.private boolean isQualifiedFieldNameQuirk(antlr.Token tok1, antlr.Token tok2, antlr.Token tok3)
tok1
- First token, typically LT(1).tok2
- Second token, typically LT(2).tok3
- Third token, typically LT(3).true
if the name quirk is detected.private boolean isCharType(int type)
true
if the given type is KW_CHAR
,
KW_LONGCHAR
, VAR_CHAR
,
VAR_LONGCHAR
, FIELD_CHAR
or
FIELD_CLOB
.type
- Token type to test.true
if the type represents character data.private boolean isDateType(int type)
true
if the given type is KW_DATE
,
KW_DATETIME
, KW_DATE_TZ
, VAR_DATE
,
VAR_DATETIME
, VAR_DATETIME_TZ
, FIELD_DATE
,
FIELD_DATETIME
or FIELD_DATETIME_TZ
.type
- Token type to test.true
if the type represents date data.private boolean isNumericType(int type)
true
if the given type is KW_INT
,
KW_INT64
, KW_RECID
, VAR_INT
,
VAR_INT64
, VAR_RECID
, FIELD_INT
,
FIELD_INT64
or FIELD_RECID
.type
- Token type to test.true
if the type represents date data.private boolean isHandleType(Aast node)
true
if the given type is a variable, field,
function, method, attribute that refers to a handle or if it is a
system handle.node
- AST node to test.true
if the type represents handle data.private boolean isComHandleType(Aast lvalue)
true
if the given type is a variable, field, function, method,
attribute or system handle that refers to a COM-HANDLE.lvalue
- AST node to test.true
if the type represents COM-HANDLE data.private boolean isObjectType(Aast node)
true
if the given type is VAR_CLASS
,
FIELD_CLASS
, FUNC_CLASS
,
METH_CLASS
, CLASS_NAME
or if this is a built-in
attribute or non-user defined method call COLON
that has a
ATTR_CLASS
or METH_CLASS
in the index
position 1.node
- AST node to test.true
if the type represents an object reference.private boolean isObjectType(int type)
true
if the given type is VAR_CLASS
,
FIELD_CLASS
, FUNC_CLASS
,
METH_CLASS
, CLASS_NAME
or
ATTR_CLASS
.type
- The type to test.true
if the type represents an object reference.private java.lang.String getObjectClassName(Aast node)
node
- AST node which is the object reference.null
if the reference is not
to an object.private void annotateVariable(java.lang.String name, int type, Aast node)
name
- Variable name.type
- Variable type.node
- AST node to be annotated.public static void main(java.lang.String[] args)
Syntax:
java ProgressParser [-v] <Progress_4GL_source_file>Where:
args
- List of command line arguments.public final void pre_scan_class() throws antlr.RecognitionException, antlr.TokenStreamException
At this time, the only things processed here are the following (everything else is ignored):
The above are reparsed on the 2nd pass but some of the configuration is only
processed on the 1st pass. The method_stmt
is an exception
since the method AST nodes need to be annotated.
antlr.RecognitionException
antlr.TokenStreamException
public final boolean external_proc() throws antlr.RecognitionException, antlr.TokenStreamException
block()
.true
if all tokens in the input stream have been
processed and the next token is EOF
, otherwise
some unexpected or invalid combination caused the top-level
processing to end prematurely and without warnings or errors.antlr.RecognitionException
antlr.TokenStreamException
public final void block() throws antlr.RecognitionException, antlr.TokenStreamException
The core top-level processing is actually in single_block(boolean, boolean)
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 THEN or ELSE
clauses in an IF
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
single_block
. This rule implements the looping and the
single_block
implements the matching.
This rule loops until end of input which makes it ideal for processing an
entire external procedure (see 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.
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.
This rule is also used as an entry point for procedure()
,
function()
and inner_block(boolean, com.goldencode.ast.Aast)
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 procedure
and
function
rules respectively.
antlr.RecognitionException
antlr.TokenStreamException
public final void oo_block() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
block()
public final void single_block(boolean blockRoot, boolean trigger) throws antlr.RecognitionException, antlr.TokenStreamException
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 12 top-level constructs and then returns. This makes it ideal
to handle the THEN or ELSE
clauses in an IF
language statement.
There are 12 possible alternatives for a top-level Progress language construct:
procedure()
(definition) - rooted at a
PROCEDURE
node
class_def()
(definition) - rooted at a
CLASS_DEF
node
interface_def()
(definition) - rooted at an
INTERFACE_DEF
node
constructor()
(definition) - rooted at an
CONSTRUCTOR
node
destructor()
(definition) - rooted at an
DESTRUCTOR
node
user_defined_method()
(definition) - rooted at an
METHOD_DEF
node
TRIGGER_BLOCK
node
function()
(forward declaration or definition) - rooted at
a FUNCTION
node
inner_block(boolean, com.goldencode.ast.Aast)
(DO, REPEAT or FOR) - rooted at an
INNER_BLOCK
node
statement()
- rooted at a
STATEMENT
node
statement()
rule -
rooted at an EMBEDDED_SQL
node
assignment()
- rooted at an ASSIGNMENT
node
Trigger support is implemented as the on_stmt()
which is
matched as a language statement in the statement
rule.
So while this rule can return a TRIGGER_BLOCK
, 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 on_stmt
.
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
lvalue
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.
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.
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 dependencies 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:
SYMBOL
can be
matched against more specific requirements
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.
At this time, the rule is structured such that ANTLR properly predicts
the difference between a procedure
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 procedure
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
function
keyword. There is no ambiguity due to this.
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 ProgressLexer.mSYMBOL(boolean)
rule to consume
embedded colons and force the parser to split up the combined token into
its constituent parts. See primary_expr()
which is the rule that
should be matched if the label's colon does not have following whitespace.
What makes this rule (and any looping calling rule like block
)
work is that the END
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 END
and then return.
blockRoot
- If true
, root all child nodes at an artificial
BLOCK
node.trigger
- If true
then the result will be rooted at a node
of type TRIGGER_BLOCK
. Ignored if
blockRoot
is false
.antlr.RecognitionException
antlr.TokenStreamException
public final void procedure() throws antlr.RecognitionException, antlr.TokenStreamException
PROCEDURE
language statement
(see proc_stmt()
). This is followed by a recursive call to
block()
which handles the ability to nest top-level statements
inside a procedure. Finally, the rule ends with an optional
END
language statement. The Progress language states that it
is valid to not have and END
. In this case, the procedure's
end is implicit at the end of the file.
The most important features of this rule are:
nestLevel
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.
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
) to
determine the proper scope in which to create the buffer. At the
end of this method, the current scope is removed.
This rule is a peer alternative to function()
and
class_def()
rules (among others).
Called by single_block(boolean, boolean)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void class_def() throws antlr.RecognitionException, antlr.TokenStreamException
class_stmt()
. This is followed by
a recursive call to block()
which handles the ability to nest
top-level statements inside a class definition. Finally, the rule ends
with an END
language statement.
The most important features of this rule are:
nestLevel
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.
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
) to
determine the proper scope in which to create the buffer. At the
end of this method, the current scope is removed.
This rule is a peer alternative to procedure()
,
interface_def()
, function()
and other top-level blocks.
Called by single_block(boolean, boolean)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void interface_def() throws antlr.RecognitionException, antlr.TokenStreamException
interface_stmt()
.
This is followed by a recursive call to block()
which handles
the ability to nest top-level statements inside an interface. Finally,
the rule ends with an END
language statement.
The most important features of this rule are:
nestLevel
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.
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
) to
determine the proper scope in which to create the buffer. At the
end of this method, the current scope is removed.
This rule is a peer alternative to procedure()
, class_def()
function()
and other top-level blocks.
Called by single_block(boolean, boolean)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void constructor() throws antlr.RecognitionException, antlr.TokenStreamException
constructor_stmt()
.
This is followed by a recursive call to block()
which handles
the ability to nest top-level statements inside a constructor. Finally,
the rule ends with an END
language statement.
The most important features of this rule are:
nestLevel
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.
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
) to
determine the proper scope in which to create the buffer. At the
end of this method, the current scope is removed.
This rule is a peer alternative to procedure()
, class_def()
interface_def()
, destructor()
, function()
and other
top-level blocks.
Called by single_block(boolean, boolean)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void destructor() throws antlr.RecognitionException, antlr.TokenStreamException
destructor_stmt()
.
This is followed by a recursive call to block()
which handles
the ability to nest top-level statements inside a destructor. Finally,
the rule ends with an END
language statement.
The most important features of this rule are:
nestLevel
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.
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
) to
determine the proper scope in which to create the buffer. At the
end of this method, the current scope is removed.
This rule is a peer alternative to procedure()
, class_def()
interface_def()
, constructor()
, function()
and other
top-level blocks.
Called by single_block(boolean, boolean)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void user_defined_method() throws antlr.RecognitionException, antlr.TokenStreamException
method_stmt()
. If this
is a class definition rather than an interface definition, then this is
followed by a recursive call to block()
which handles the ability
to nest top-level statements inside a method. If there is a block then
the rule ends with an END
language statement.
The most important features of this rule are:
nestLevel
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.
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
) to
determine the proper scope in which to create the buffer. At the
end of this method, the current scope is removed.
This rule is a peer alternative to procedure()
, class_def()
interface_def()
, constructor()
, destructor()
,
function()
and other top-level blocks.
Called by single_block(boolean, boolean)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void function() throws antlr.RecognitionException, antlr.TokenStreamException
FUNCTION
language statement.
If this is not a forward declaration (identified by the use of the
FORWARD
keyword), then the FUNCTION
statement
is followed by a recursive call to block()
which handles
the ability to nest top-level statements inside a function. Finally,
the rule ends with an optional END
language statement. The
Progress language states that it is valid to not have and END
.
In this case, the function's end is implicit at the end of the file.
The most important features of this rule are:
nestLevel
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.
block
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:
block
(with its optional
END
statement)
func_stmt()
rule. This return value is a boolean that
is true
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.
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
) to
determine the proper scope in which to create the buffer. At the
end of this method, the current scope is removed.
This rule is a peer alternative to procedure()
.
Called by single_block(boolean, boolean)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void inner_block(boolean eat, Aast malformed) throws antlr.RecognitionException, antlr.TokenStreamException
block_list()
rule is called to start the block and this is
followed by a recursive call to block()
which handles
the ability to nest top-level statements inside a block. Finally,
the rule ends with an optional END
language statement. The
Progress language states that it is valid to omit the END
.
In this case, the block's end is implicit at the end of the file.
The nestLevel
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).
In front of any of these constructs is an optional user-defined label.
The presence of this label is matched by the following COLON
that must precede the Progress 4GL language statement that starts
the block. The symbol()
method is used to force the user-defined
name to a SYMBOL
token type. If matched, this symbol's text
is added into the label namespace and the token type of the symbol is
set to LABEL
.
Schema record scopes are added before calling block_list
based on lookahead. A scope is added in the case of
FOR, REPEAT and DO FOR
statements. In the case of
EDITING and normal DO
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. 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 record(boolean, boolean, boolean)
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.
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
INNER_BLOCK
if this is a DO, FOR or REPEAT
block and as a EDITING_BLOCK
if this is an editing block.
Called by single_block(boolean, boolean)
.
eat
- If true
, this code will consume (and drop) a
following DOT
after the END
.malformed
- If not null
, 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.antlr.RecognitionException
antlr.TokenStreamException
public final void crap_to_ignore() throws antlr.RecognitionException, antlr.TokenStreamException
The rules:
For example:
.t y757565gfhvbm hgj lk hkudu09sd . .?/.,><;:~`\|][}&=+-_)(*^%@!$#. ./. ..FDFDFD. ....... .SDSD....SDSD. .a...... ..dd..ddd ... .,. .>. .<. .;. .:. .~. .`. .\. .|. .]. .[. .}. .=. .+. .-. ._. .). .(. .*. .&. .^. .%. .@. .!. .$. .#. .~". .~{. .~'. .s89s. .hdhdhdgsgdhfdjfj. .w. .l87676.
antlr.RecognitionException
antlr.TokenStreamException
public final void statement() throws antlr.RecognitionException, antlr.TokenStreamException
stmt_list()
.
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 STATEMENT
token type node except in
the case of embedded SQL where the node type of EMBEDDED_SQL
will be at the root.
Any statement that generates a null
return AST (the only
one is empty_stmt()
at this time), will bypass the creation of
the artificial STATEMENT
root node.
Called by single_block(boolean, boolean)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void assignment() throws antlr.RecognitionException, antlr.TokenStreamException
lvalue
and the alternate implicit discard of the
expression's return value). More specifically, these two forms:
lvalue
followed by an EQUALS
token
and an expression (this is the traditional concept of an
assignment - one which stores the expression result in a variable
or field)
lvalue
and no EQUALS
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)
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 DOT
. 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.
When the first form is encountered, the EQUALS
token type is
rewritten as an ASSIGN
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).
This rule is called from the top level single_block(boolean, boolean)
and calls the
lvalue()
and expr()
rules as needed. It also creates an
artificial tree node (of the ASSIGNMENT
token type) to
contain the resulting tree.
Note that ANTLR reports ambiguity between this rule and the assign()
rule. The ambiguity is resolved by the ordering of the top level rule
placing the ASSIGN
language statement (which is unambiguous)
with higher precedence than the assignment
rule. As long as
the assign
rule is only used by the assign_stmt
rule, there is no real ambiguity. For this reason, ambiguity warnings
are suppressed for this rule.
ANTLR detects ambiguity between this rule and expr
because of
the optional lvalue
and EQUALS
which conflict
with lookahead choices for expr
. What makes this OK is the
fact that there is an implicit precedence in choosing EQUALS
as an assignment operator over the equivalence operator. This makes the
ambiguity resolve naturally. For this reason, ambiguity warnings
are suppressed for this rule.
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
EQUALS
token in the 2nd position) to disambiguate between
the optional lvalue
+ EQUALS
AND a standalone
expression. In practice, this works fine for the vast majority of cases,
but it breaks down in the following cases:
lvalue
with > 1 token is standalone on a
line (e.g. i[8].
which is 4 tokens plus the
terminating DOT
) --> note that as long as there
actually IS an assignment on the right side of a complex
(multi-token) lvalue
, there would not be a problem!
lvalue
based expression is used (no assignment)
(e.g. queryHandle:prepare(someThing).
which is 6
tokens plus the terminating DOT
OR even simpler is
queryHandle:query-open.
which is only 3 tokens and
a terminating DOT
)
assign_type_syntax_stmt_list()
which is called indirectly
via the lvalue
rule)
All of these cases are resolved by matching the in the lvalue
rule and instrumenting the following EQUALS
to be bypassed
if a DOT or NO-ERROR
are encountered. This would mean that
there is no following expression to match so in this case, the expression
is bypassed too.
This approach also requires that the preceding lvalue
be
bypassed if a left parenthesis is found in the second token position
(otherwise the lvalue
would match the symbol in a function
call but then it would bomb out at the parenthesis. 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.
Another problem is disambiguation of the case where the lvalue
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.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void oea_annotations() throws antlr.RecognitionException, antlr.TokenStreamException
@VisualDesigner
antlr.RecognitionException
antlr.TokenStreamException
public final void any_symbol_at_all() throws antlr.RecognitionException, antlr.TokenStreamException
reserved_or_symbol()
, a DB_SYMBOL
,
BOOL_TRUE
, BOOL_FALSE
or aFILENAME
and always returns a SYMBOL
node.antlr.RecognitionException
antlr.TokenStreamException
public final void proc_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
PROCEDURE
block definition
which is the manner in which Progress implements a form of subroutine.
The most important feature of this rule is the direct usage of the
malformed_symbol()
rule to force the second token to a
SYMBOL
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 DB_SYMBOL
or a FILENAME
can be matched there. This token is then used
in the exit action to add the defined procedure's name to the procedure
namespace.
Note that it is undocumented but possible to use reserved keywords as
internal procedure names in Progress 4GL. Otherwise only the rule
symbol()
would have been needed.
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 PROCEDURE
is associated
with all procedures in the namespace, but it is not really used for
anything.
antlr.RecognitionException
antlr.TokenStreamException
public final void end_stmt(boolean eat) throws antlr.RecognitionException, antlr.TokenStreamException
END
Progress 4GL language statement. This is the
rule that ends all Progress block definitions.
Note that Progress 4GL allows an optional keyword to be placed between the
KW_END
and the DOT
for some blocks. This works
for CASE
, PROCEDURE
, FUNCTION
and
TRIGGERS
keywords. It does not work for DO
,
REPEAT
or FOR
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.
DO NOT EVER include this directly in the stmt_list()
rule
otherwise all block processing will break!
Bogus ANTLR ambiguity warnings have been disabled.
eat
- Match (and drop) a following DOT
if one exists.antlr.RecognitionException
antlr.TokenStreamException
public final void malformed_symbol() throws antlr.RecognitionException, antlr.TokenStreamException
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.
This special case is converted into a single SYMBOL
token with the concatenated
text of all merged tokens.
Resource types that have this undocumented behavior:
antlr.RecognitionException
antlr.TokenStreamException
public final void external_api_definition() throws antlr.RecognitionException, antlr.TokenStreamException
EXTERNAL
keyword with a required following
STRING
(shared library name). Uses ordinal_clause()
.
Used by proc_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void in_super_clause() throws antlr.RecognitionException, antlr.TokenStreamException
IN SUPER
keywords in a func_stmt()
and is
separated to improve the tree.antlr.RecognitionException
antlr.TokenStreamException
public final void ordinal_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void class_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CLASS
language statement.
The most important feature of this rule is the direct usage of the
any_symbol_at_all()
rule to force the second token to a
SYMBOL
token type. This token is then used in the exit
action to add the class's definition.
antlr.RecognitionException
antlr.TokenStreamException
public final void inherits_clause() throws antlr.RecognitionException, antlr.TokenStreamException
KW_INHERITS
with a following
user_defined_type_name()
. This defines the superclass for a
class_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void implements_clause() throws antlr.RecognitionException, antlr.TokenStreamException
KW_IMPLMTS
with one or more comma-separated following
user_defined_type_name()
. Used by class_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void user_defined_type_name() throws antlr.RecognitionException, antlr.TokenStreamException
any_symbol_at_all()
or a STRING
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 CLASS_NAME
.
The 10.2x syntax which allows a main.class.Name+InnerClassName format is supported here.
antlr.RecognitionException
antlr.TokenStreamException
public final void interface_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
INTERFACE
language statement.
The most important feature of this rule is the direct usage of the
any_symbol_at_all()
rule to force the second token to a
SYMBOL
token type. This token is then used in the exit
action to add the interface's definition.
antlr.RecognitionException
antlr.TokenStreamException
public final void non_reserved_user_defined_type_name() throws antlr.RecognitionException, antlr.TokenStreamException
any_non_reserved_symbol()
as a class name reference. This
is the same idea as 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 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 CLASS_NAME
.antlr.RecognitionException
antlr.TokenStreamException
public final void any_non_reserved_symbol() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void using_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
USING
language statement which has a
KW_USING
node followed by an any_symbol_at_all()
.
After the symbol, because of the way the lexer works, it is possible to
match a DOT
and then a MULTIPLY
. This text is
merged into the symbol if found. Finally, an optional from_assembly()
clause can be matched.
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.
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void from_assembly() throws antlr.RecognitionException, antlr.TokenStreamException
KW_FROM
in a using_stmt()
. There is a
required following KW_ASSEMBLY
or KW_PROPATH
.
Separated in order to build the tree properly.antlr.RecognitionException
antlr.TokenStreamException
public final void constructor_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void access_mode() throws antlr.RecognitionException, antlr.TokenStreamException
KW_PUBLIC
, KW_PROTECTD
or
KW_PRIVATE
.antlr.RecognitionException
antlr.TokenStreamException
public final void param_list_definition(boolean defineBuffer, boolean funcDef) throws antlr.RecognitionException, antlr.TokenStreamException
parameter_spec(boolean, boolean)
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.
Called from constructor_stmt()
, method_stmt()
, func_stmt()
,
getter_setter()
and event_signature()
.
defineBuffer
- true
if the caller supports inline buffer
definitions (versus just passing a buffer parameter which
doesn't create a new buffer).funcDef
- true
if the caller is a FUNCTION definition.antlr.RecognitionException
antlr.TokenStreamException
public final void method_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final int method_return() throws antlr.RecognitionException, antlr.TokenStreamException
method_stmt()
and is only separated to make the AST build
correctly.antlr.RecognitionException
antlr.TokenStreamException
public final void destructor_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final boolean func_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
FUNCTION
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.
The most important feature of this rule is the direct usage of the
symbol()
rule to force the second token to a SYMBOL
token type. This token is then used in the exit action to add the
defined function's name to the function namespace.
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.
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.
This rule calls param_list_definition(boolean, boolean)
to process the function parameters
and add them to the variable dictionary.
Forward declarations are supported by returning false
unless
a forward declaration is detected by the presence of the
FORWARD
keyword. In such cases, the return value will change.
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.
FORWARD
, IN SUPER
or
IN proc_handle
specified. Such declarations do
not have associated blocks.antlr.RecognitionException
antlr.TokenStreamException
public final int func_return() throws antlr.RecognitionException, antlr.TokenStreamException
RETURNS
keyword and the required
function return datatype (which is specified whether the
RETURNS
keyword is there or not. This is used by
func_stmt()
and is only separated to make the AST build
correctly.
Undocumented is the fact that one can interchangeably use the
RETURN
here instead of the documented RETURNS
.
Both are matched but the token type is forced to RETURNS
to simplify tree processing.
antlr.RecognitionException
antlr.TokenStreamException
public final int extent() throws antlr.RecognitionException, antlr.TokenStreamException
EXTENT
keyword and the optional integer constant
that follows it. Used by def_var_stmt(boolean[])
and the subtree is rooted
by the EXTENT
keyword.antlr.RecognitionException
antlr.TokenStreamException
public final void map_to_actual_name() throws antlr.RecognitionException, antlr.TokenStreamException
MAP TO symbol
construct (the TO
keyword is optional) in a func_stmt()
. It is separated to improve
the tree.antlr.RecognitionException
antlr.TokenStreamException
public final void in_super_or_in_handle() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void expr() throws antlr.RecognitionException, antlr.TokenStreamException
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.
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 AS
clause for
DEFINE VARIABLE
), 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 MESSAGE
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 the key 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 "for free" 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. Changes must be
made very carefully!
All of the Progress operators are supported (except for the undocumented bitwise operators) and the precedence order is as follows:
lowest OR | AND | NOT | =, EQ, <>, NE, <, LT, >, GT, ≤, LE, ≥, GE, MATCHES, BEGINS, CONTAINS | binary +, binary - | *, /, MODULO | unary +, unary - | DB_REF_NON_STATIC | COLON (used as an invocation mechanism) highest ( )
Note that CONTAINS is only documented for use within a WHERE
clause, see record_phrase(boolean, boolean)
and where_clause()
.
The key problems that had to be solved for this implementation included:
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 KW_OR
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.
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.
At the bottom of the hierarchy of rules are unary operators, these are implemented as an optional prefix operator and a mandatory right operand.
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 lvalue()
and func_call()
for more details on how this is resolved.
This rule is designed to allow recursion (the highest precedence levels
func_call()
and primary_expr()
reference this rule again,
allowing infinite nesting of sub-expressions, with proper parsing,
evaluation and tree building.
Ambiguity is primary caused by the potential overlap in the rules
referenced from 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 ambiguity!
See that rule for more details on the solution.
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.
ExpressionEvaluator
is dependent upon this entry
point.
Note that there is an ambiguity caused between the OR
keyword
implemented in expr
and by the use of the OR
keyword in a WHEN
clause (additional WHEN conditions can
be added to the same statement using an OR WHEN condition
syntax). Since the following condition is an expression, one must detect
the use of the following WHEN
as the next token after the
OR
to disambiguate. The expr
rule which
implements the logical OR
processing thus uses a semantic
predicate to terminate expression processing (and not match on the
OR
in the case where lookahead 2 is the reserved keyword
WHEN
. Ambiguity warnings are disabled since this trick
resolves the issue.
When this is called from a parser that is invoked with the top level
entry point external_proc()
, this rule will root the resulting
subtree in an artificial token EXPRESSION
. Otherwise, this
method is used directly and no artificial root is created.
The {link #log_and_expr} is called as the only rule reference.
antlr.RecognitionException
antlr.TokenStreamException
public final void symbol() throws antlr.RecognitionException, antlr.TokenStreamException
SYMBOL
token type if there is no overlap with the
unreserved keyword namespace. In other words, since the text
"char" matches both an unreserved keyword and a possible valid
user-defined symbol, the lexer will default the token type to
KW_CHAR
. This is critical since the number of places in the
parser that expect a real SYMBOL
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 know (based on context) that
the next token is a SYMBOL
rather than a keyword.
This rule enables those explicit overrides and it is only used in the following cases:
SYMBOL
token type rather than a keyword. An example is a
DEFINE VARIABLE
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
SYMBOL
if all of the following are true (in all other
cases an exception is thrown):
SYMBOL
.
symbol
rule itself. In this case, we refer to
this as using symbol
for "pull" purposes
only. This trick is critical for making the lvalue()
and
func_call()
rules work!
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 BEGIN_UNRESERVED
and
END_UNRESERVED
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 matchRange
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.
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 SYMBOL
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void reserved_or_symbol() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void define_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE
Progress 4GL language statement and
switches into the correct alternative based on the lookahead tokens.
This rule is called by stmt_list()
and it handles the matching
for the DEFINE
keyword, the optional shared scope keywords
NEW, GLOBAL, SHARED
and the optional keywords for parameter
types INPUT, OUTPUT, INPUT-OUTPUT and RETURN
. It then
calls the appropriate alternative to allow the specific processing to
occur. The alternatives:
def_browse_stmt()
def_button_stmt(boolean[])
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
def_dataset_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
def_datasrc_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
def_event_stmt()
def_frame_stmt()
def_image_stmt()
def_menu_stmt()
def_parm_stmt()
def_prop_stmt()
def_rect_stmt(boolean[])
def_stream_stmt()
def_query_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
def_temp_table_stmt(boolean, boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
def_var_stmt(boolean[])
This design allows all DEFINE
statements to be supported
without ambiguity because it left-factors the common keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String def_browse_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE BROWSE
Progress 4GL language statement.
This is the statement that defines or imports a new user-named browse
widget.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword and the optional shared scope for
browses. This rule supports shared or local buffers and the syntax for
both declaring or defining (NEW
keyword) shared buffers.
HOWEVER, all the matching for these optional keywords is done in the
define_stmt
rule. This refactoring allows all
DEFINE
statements to be supported without ambiguity.
This rule matches the BROWSE
keyword and all subsequent
processing. Calls symbol()
, query_reference()
and
column_spec()
rules.
This rule adds the browse's name to the widget namespace.
Supports the Progress undocumented feature that the query_reference and
the column_spec can be optional (missing). But even if they are missing,
the 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.
antlr.RecognitionException
antlr.TokenStreamException
public final void def_buf_stmt(boolean define_stmt, boolean optionalSym, Aast am, Aast st) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE BUFFER
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.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword and the optional shared scope for
buffers. This rule supports shared or local buffers and the syntax for
both declaring or defining (NEW
keyword) shared buffers.
HOWEVER, all the matching for these optional keywords is done in the
define_stmt
rule. This refactoring allows all
DEFINE
statements to be supported without ambiguity.
This rule matches the BUFFER
keyword and all subsequent
processing. Note that due to syntax compatibility, this rule is also
called from def_parm_stmt()
and parameter()
which allows
this logic to be centralized. The following FOR
construct
is only optional to support the call from the parameter
rule when it is processing a RUN
statement parameter. When
the parameter
rule is processing a FUNCTION
parameter, the FOR
processing will be matched (if the code
is valid Progress 4GL). Anytime the FOR
processing is matched,
this means that this is a new or imported buffer definition and the
buffer will be added to the schema namespace.
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 BUFFER FOR record
).
define_stmt
- If true
, this rule has been called from the
DEFINE BUFFER
statement and the
KW_BUFFER
node should be dropped (it is
unnecessary). If false
, the caller is some form
of parameter processing and the KW_BUFFER
node is
used as the resulting sub-tree root.optionalSym
- If true
, this rule has been called from a function
parameter and the buffer's symbolic name is optional.am
- Access modifiers if not null. Only will be non-null if this is a resource defined
as a member of a class definition.st
- Static specifier if not null. Only will be non-null if this is a resource defined
as a member of a class definition.antlr.RecognitionException
antlr.TokenStreamException
public final void def_dataset_stmt(Aast am, Aast st) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE DATASET
language statement.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword and the optional access modes or sharing
options.
This rule matches the DATASET
keyword and a following
symbol()
. The namespace_clause()
can be matched optionally.
Then there is always a match to for_record_spec(boolean, boolean, boolean)
. At the end is
the use of data_relation(int)
.
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.
Customer source code shows the DATA-RELATION is optional even though the Progress docs state otherwise. This must be an undocumented feature.
am
- Access modifiers if not null. Only will be non-null if this is a resource defined
as a member of a class definition.st
- Static specifier if not null. Only will be non-null if this is a resource defined
as a member of a class definition.antlr.RecognitionException
antlr.TokenStreamException
public final void def_datasrc_stmt(Aast am, Aast st) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE DATA-SOURCE
language statement.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword and the optional access modes or sharing
options.
This rule matches the DATA-SOURCE
keyword and a following
symbol()
. Then there is always a match to for_query_clause()
or a for_record_spec(boolean, boolean, boolean)
.
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.
am
- Access modifiers if not null. Only will be non-null if this is a resource defined
as a member of a class definition.st
- Static specifier if not null. Only will be non-null if this is a resource defined
as a member of a class definition.antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.Object[] def_frame_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE FRAME
Progress 4GL language statement
which is nearly identical to the form_stmt()
.
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 record_spec(java.util.Set<com.goldencode.ast.Aast>)
) and instead the form_item(java.util.Set<com.goldencode.ast.Aast>)
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.
Called by define_stmt()
. Uses record_spec(java.util.Set<com.goldencode.ast.Aast>)
,
form_item(java.util.Set<com.goldencode.ast.Aast>)
and frame_phrase(boolean, boolean)
to properly build the AST.
antlr.RecognitionException
antlr.TokenStreamException
public final int def_menu_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE MENU or DEFINE SUB-MENU
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.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword.
This rule matches the MENU or SUB-MENU
keywords and all
subsequent processing. Calls the following rules:
symbol()
ui_stuff()
simple_title_string()
like_menu_clause()
menu_element_descriptor()
All options can be processed in any order.
An undocumented "feature" (found in customer code) is that Progress will
ignore a DOT
in between MENU-ITEM
clauses. In
other words, it will silently drop that extra character if the period
is followed by the MENU-ITEM
or RULE
keywords.
Presumably, the SUB-MENU
and SKIP
keywords also
have this effect but it hasn't been confirmed yet.
antlr.RecognitionException
antlr.TokenStreamException
public final void def_query_stmt(Aast am, Aast st) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE QUERY
Progress 4GL language statement.
This is the statement that defines or imports a new user-named query.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword and the optional shared scope for
browses. This rule supports shared or local buffers and the syntax for
both declaring or defining (NEW
keyword) shared buffers.
HOWEVER, all the matching for these optional keywords is done in the
define_stmt
rule. This refactoring allows all
DEFINE
statements to be supported without ambiguity.
This rule matches the QUERY
keyword and all subsequent
processing. Calls malformed_symbol()
, for_record_spec(boolean, boolean, boolean)
and
cache_records()
rules.
am
- Access modifiers if not null. Only will be non-null if this is a resource defined
as a member of a class definition.st
- Static specifier if not null. Only will be non-null if this is a resource defined
as a member of a class definition.antlr.RecognitionException
antlr.TokenStreamException
public final void def_stream_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE STREAM
Progress 4GL language statement.
This is the statement that defines or imports new user-named stream.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword and the optional shared scope for
buffers. This rule supports shared or local buffers and the syntax for
both declaring or defining (NEW
keyword) shared buffers.
HOWEVER, all the matching for these optional keywords is done in the
define_stmt
rule. This refactoring allows all
DEFINE
statements to be supported without ambiguity.
This rule matches the STREAM
keyword and the required
stream name. This rule is similar to the lvalue()
but it is separated such that namespace additions can be done without
impacting that rule.
antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String def_temp_table_stmt(boolean tt_new, boolean tt_global, boolean tt_shared, Aast am, Aast st) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE TEMP-TABLE or DEFINE WORK-TABLE
Progress 4GL
language statement (note that WORKFILE
is a synonym for
WORK-TABLE
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).
This rule is called by define_stmt()
which is where the matching
on the DEFINE
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
(NEW
keyword) shared variables. HOWEVER, all the matching
for these optional keywords is done in the define_stmt
rule.
This refactoring allows all DEFINE
statements to be supported
without ambiguity.
This rule matches the TEMP-TABLE, WORK-TABLE or WORKFILE
keywords and then calls other rules to implement the different
alternatives.
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.
Calls the following:
tt_new
- true
if this is a new shared or new global shared temp-table.tt_global
- true
if this is a global shared temp-table.tt_shared
- true
if this is a shared temp-table.am
- Access modifiers if not null. Only will be non-null if this is a resource defined
as a member of a class definition.st
- Static specifier if not null. Only will be non-null if this is a resource defined
as a member of a class definition.antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String def_var_stmt(boolean[] allowColon) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE VARIABLE
Progress 4GL language statement.
This is the statement that defines or imports new user-named variables.
The symbol()
rule is used to force the token type for the variable
name to be a SYMBOL
. Then this name is passed as a parameter
to the as_clause(java.lang.String, boolean)
or like_clause(java.lang.String, java.lang.Object, boolean)
rules, which add this
variable to the variable dictionary associating it with the correct data
type.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
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
(NEW
keyword) shared variables. HOWEVER, all the matching
for these optional keywords is done in the define_stmt
rule.
This refactoring allows all DEFINE
statements to be supported
without ambiguity.
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.
This rule implements all logic needed to define and initialize array
variables (using the EXTENT
, INITIAL [ ,,, ]
and LABEL string, string...
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 DEFINE
keyword.
allowColon
- Set to true
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).antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String def_parm_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE PARAMETER
Progress 4GL language statement.
This is the statement that defines or imports new user-named parameters
for a procedure (internal or external).
This rule is called by define_stmt()
which is where the matching
on the DEFINE
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
(NEW
keyword) shared variables. HOWEVER, all the matching
for these optional keywords is done in the define_stmt
rule.
This refactoring allows all DEFINE
statements to be supported
without ambiguity.
This rule matches the PARAMETER
keyword and then calls
other rules to implement the different alternatives.
Calls regular_parm(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
, table_parm()
and def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.
null
if this is a record or buffer reference
instead.antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String def_prop_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE PROPERTY
Progress 4GL language statement.
This is the statement that defines new user-named properties for the
currently active class definition.
The any_symbol_at_all()
rule is used to force the token type for the
property name to be a SYMBOL
. That means property names can
be reserved keywords. Then this name is passed as a parameter
to the as_clause(java.lang.String, boolean)
rule, which adds this property to the dictionary
for the class definition, associating it with the correct data type.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword and the optional shared scope for
variables, temp-tables and streams. This rule supports an optional
access_mode()
. HOWEVER, all the matching for these optional
keywords is done in the define_stmt
rule. This refactoring
allows all DEFINE
statements to be supported without
ambiguity.
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.
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 DEFINE
keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String def_event_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE EVENT
Progress 4GL language statement.
This is the statement that defines new user-named events for the
currently active class definition.
The any_symbol_at_all()
rule is used to force the token type for the
event name to be a SYMBOL
. Then this name is passed added
to the dictionary for the class definition, associating it with the correct
data type.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword and the optional shared scope for
variables, temp-tables and streams. This rule supports an optional
access_mode()
. HOWEVER, all the matching for these optional
keywords is done in the define_stmt
rule. This refactoring
allows all DEFINE
statements to be supported without
ambiguity.
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.
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 DEFINE
keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String def_button_stmt(boolean[] allowColon) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE BUTTON
Progress 4GL language statement.
This is the statement that defines user-named button widgets.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword.
This rule matches the BUTTON
keyword and all subsequent
processing. Calls the following rules:
symbol()
ui_stuff()
image_stuff()
label()
like_widget_clause()
size_phrase()
no_focus_clause()
tooltip_clause()
trigger_phrase()
All options can be processed in any order.
This supports the undocumented MARGIN-EXTRA
option.
This rule updates the widget namespace with the new button widget however there is no backing variable for this widget.
allowColon
- Set to true
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).antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String def_rect_stmt(boolean[] allowColon) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE RECTANGLE
Progress 4GL language statement.
This is the statement that defines user-named rectangle widgets.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword.
This rule matches the RECTANGLE
keyword and all subsequent
processing. Calls the following rules:
symbol()
edge_clause()
ui_stuff()
like_widget_clause()
size_phrase()
tooltip_clause()
trigger_phrase()
All options can be processed in any order.
This rule updates the widget namespace with the new rectangle widget however there is no backing variable for this widget.
allowColon
- Set to true
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).antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String def_image_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE IMAGE
Progress 4GL language statement.
This is the statement that defines user-named image widgets.
This rule is called by define_stmt()
which is where the matching
on the DEFINE
keyword.
This rule matches the IMAGE
keyword and all subsequent
processing. Calls the following rules:
symbol()
ui_stuff()
stretch_to_fit_clause()
image_phrase()
like_widget_clause()
size_phrase()
tooltip_clause()
All options can be processed in any order. In addition to these rules,
the CONVERT-3D-COLORS
and TRANSPARENT
options
can be specified.
This rule updates the widget namespace with the new image widget however there is no backing variable for this widget.
antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String table_parm() throws antlr.RecognitionException, antlr.TokenStreamException
TABLE
, DATASET
, TABLE-HANDLE
and
DATASET-HANDLE
logic for parameter definitions (see def_parm_stmt()
).
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
symbol()
rule is called and the resulting name is added as a variable of type
VAR_HANDLE
.
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 record(boolean, boolean, boolean)
rule (in the case of a table)
or directly (in the case of a dataset).
null
if this is a record or dataset name reference.antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String regular_parm(Aast param, Aast likeRef) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE PARAMETER
Progress
4GL language statement. This is the statement that defines named parameters
in procedures (external or internal). The symbol()
rule is used to
force the token type for the variable name to be a SYMBOL
.
Then this name is passed as a parameter to the as_clause(java.lang.String, boolean)
or
like_clause(java.lang.String, java.lang.Object, boolean)
rules, which add this variable to the variable
dictionary associating it with the correct data type.
This rule is called by def_parm_stmt()
which is where the matching
on the PARAMETER
keyword is done.
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.
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 PARAMETER
keyword in the
calling rule.
param
- The parameter AST where to save the extent annotation, if set. May be null.likeRef
- An Aast
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.antlr.RecognitionException
antlr.TokenStreamException
public final void query_reference() throws antlr.RecognitionException, antlr.TokenStreamException
QUERY
keyword and the required query name that
is coded as a malformed_symbol()
.
Used by def_browse_stmt()
, reposition_stmt()
and
get_stmt()
rules.
This rule naturally duplicates a small subset of what can be matched
via lvalue()
. This is done to keep usage that is known to be
hard coded to this subset, unambiguous.
This is a separate rule to centralize logic and build the AST properly.
antlr.RecognitionException
antlr.TokenStreamException
public final void column_spec() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE BROWSE
language statement which is started by a DISPLAY
keyword.
This is followed by either a record (and optional exclude list of fields)
or an expression and optional column_format_phrase()
and
at_base_field_clause(boolean)
. This record or expression is documented as
required but customer source has shown this to actually be optional.
Calls record_spec(java.util.Set<com.goldencode.ast.Aast>)
and browse_enable_phrase()
rules.
Note that Progress supports an undocumented use of space_or_skip()
as a column specification.
Called by def_browse_stmt()
.
TODO: do we need to inject schema validation for fields/records specified for browse columns, as we do with regular frames?
antlr.RecognitionException
antlr.TokenStreamException
public final void browse_options_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
WITH
keyword. All of its options
can be specified in any order. Called from column_spec()
.
The following list of rules are called to properly implement the tree building:
ui_stuff()
row_height_clause()
size_phrase()
title_phrase()
tooltip_clause()
misc_frame_opts()
down_clause()
Undocumented options KEEP-TAB-ORDER
, CENTERED
,
KW_NO_COLS
, KW_SCROLLBL
, KW_NO_TAB_S
and
KW_NO_UNDL
are supported here since Progress allows them.
The order of the above list is important in the case of the last
rule reference to 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.
antlr.RecognitionException
antlr.TokenStreamException
public final void for_record_spec(boolean flds, boolean keys, boolean force) throws antlr.RecognitionException, antlr.TokenStreamException
record(boolean, boolean, boolean)
and field_list()
rules.
Called by def_query_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
, def_dataset_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
,
def_datasrc_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
and do_repeat_stmt()
rules.
flds
- true
if the field list option should be allowed to
be matched.keys
- true
to match the keys clause after a record.force
- true
to force promotion even if the record was
already previously promoted.antlr.RecognitionException
antlr.TokenStreamException
public final void cache_records() throws antlr.RecognitionException, antlr.TokenStreamException
CACHE
option for the DEFINE QUERY
language statement.
Called by def_query_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void record(boolean promote, boolean force, boolean noProp) throws antlr.RecognitionException, antlr.TokenStreamException
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
symbol()
rule).
Note that if this rule is used as an alternative to a rule that includes a
leftmost token defined by the symbol
rule, there will be an
ambiguity that is only resolved by lookahead and the proper
ordering of the rules.
It is required that where this rule is referenced as one alternative that conflicts with the definitions of other alternatives, the order of the alternatives must be more specific (in terms of matching criteria) to less specific.
The inclusion of the symbol
rule ensures that all valid
symbols are considered a record and will be matched by this rule.
It is important to note that in the end, it is not really valid to have
a token type of SYMBOL
since this could be anything. What we
really require is a token that is one of the following:
TABLE BUFFER TEMP_TABLE WORK_TABLE
The difference between a SYMBOL
and a TABLE
can
only be determined by context (the fact that the lookahead code has
identified a match with a SYMBOL
token which is a construct
that can occur in a record
call. Thus if a match is
found using lookahead (in the rule that calls this one), then it
must be correct and necessary to convert the SYMBOL
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 TABLE
and never tries to
call the symbol
rule since calling that rule would actually
try to match (and consume from the token stream) a SYMBOL
token type. 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!
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'.
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.
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. 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. Full details of this obscure case are in the Design Document.
promote
- If true
, promote the record's table for future
name resolution. If false
, do not promote the
table.force
- If true
, forces re-promotion of records that have
already been promoted. false
will promote but only
if it hasn't ever been promoted. This flag is only honored if
the promote
parameter is true
.noProp
- true
to force any promoted nodes to have their
no propagate flag set. This disables propagation of these
nodes across the current scope boundary.antlr.RecognitionException
antlr.TokenStreamException
public final void field_list() throws antlr.RecognitionException, antlr.TokenStreamException
FIELDS
or EXCEPT
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 FIELDS
being optionally abbreviated as
FIELD
and the fact that there is a separate FIELD
keyword used for different purposes, the FIELDS
keyword has
been dropped and only a FIELD
keyword will be found.
Used by record_phrase(boolean, boolean)
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void datasrc_keys_clause() throws antlr.RecognitionException, antlr.TokenStreamException
KEYS
clause in a source buffer specification of
the DEFINE DATA-SOURCE
statement. Called directly by
for_record_spec(boolean, boolean, boolean)
.antlr.RecognitionException
antlr.TokenStreamException
public final void lvalue() throws antlr.RecognitionException, antlr.TokenStreamException
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 SYS_HANDLE or STREAM
(this means that
there is one token type for each possible data type such as
VAR_INT
or FIELD_LOGICAL
or
WID_FILL_IN
) and the set of all possible alternatives for
symbol names (a reference to the symbol()
rule) or the special
DB_SYMBOL
. DB_SYMBOL
is the type assigned to
all partially or fully qualified database schema names. It is created by
the ProgressLexer.mSYMBOL(boolean)
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).
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. BUFFER record
). The list of such keywords:
BROWSE BUFFER DATASET DATA-SOURCE DATA-RELATION FRAME MENU SUB-MENU MENU-ITEM QUERY TEMP-TABLE STREAM STREAM-HANDLE TABLE-HANDLE DATASET-HANDLE TABLE
It is important to note that a record(boolean, boolean, boolean)
can be matched as a
BUFFER or TEMP-TABLE.
The operation of this processing is VERY similar if not identical to
some other rules (see frame_reference(boolean)
and
query_reference()
). Keeping these other rules allows more
specific usage to be implemented without calling this rule. This can
reduce ambiguity.
Note that both lvalue
and func_call
refer to a
leftmost token that includes the symbol
rule. This creates
an ambiguity that is only resolved by lookahead and the proper
ordering of the rules (since both are equal alternatives in the
primary_expr
rule).
It is required that where this rule is referenced as one alternative that
conflicts with the definitions of other alternatives (see
primary_expr()
and func_call()
), the order of the
alternatives must be more specific (in terms of matching criteria) to less
specific. Since the func_call
rule contains the very
specific symbol
followed by LPARENS
pattern,
it is more specific than a simple symbol
by itself (which is
one definition of an lvalue
. For this reason,
func_call
must always be placed ahead of lvalue
in alternative lists.
The inclusion of the symbol
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 "pulling" the
recursive descent processing down the expr
rule.
It is important to note that in the end, it is not really valid to have
a token type of SYMBOL
or DB_SYMBOL
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:
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 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
The difference between a SYMBOL
(or DB_SYMBOL
)
and a VAR_INT
can only be determined by context (the fact
that the lookahead code has identified a match with a SYMBOL
or DB_SYMBOL
token which is a construct that can occur in an
lvalue call. Thus if a match is found using lookahead (in the rule
that calls this one), then it must be correct and necessary to
convert the SYMBOL
or DB_SYMBOL
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 symbol
rule since calling that rule would actually
try to match (and consume from the token stream) a SYMBOL
token type. 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!
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'.
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'.
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 DOT
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.
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.
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 SymbolResolver
class.
See SymbolResolver.lookupVariable(java.lang.String)
.
To ensure this method sees tokens matching the list of variables with
reserved names, the 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 symbol
method. This can't be changed
without negative impacts on other code, since symbol
is
used in many locations in the parser. Instead a custom method was
created to generate pull.
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.
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 assign_type_syntax_stmt_list()
which is called from the main body of this rule.
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.
Variables and fields in Progress can be defined as arrays using the
EXTENT
keyword (see def_var_stmt(boolean[])
). The
lvalue
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 subscript()
for details.
The use of the subscript
rule is detected as ambiguous by
ANTLR, but this is bogus. Warnings have been disabled for this
sub-rule.
An immediate following COLON
which is not itself followed
by whitespace, will trigger the matching of Progress methods and
attributes (see attribute_or_method()
or if the referent (to the
left of the COLON
is a VAR_COM_HANDLE
, a
FIELD_COM_HANDLE
or a SYS_HANDLE
with an
oldtype
annotation of KW_COM_SELF
, then the
following processing will match COM (Active-X) methods and properties
via the com_property_or_method()
rule. Progress methods and
attributes will be rooted at the COLON
node and COM methods
and properties are rooted at that same node except the type will be
rewritted to be COM_INVOCATION
.
An immediate following DB_REF_NON_STATIC
token (the
::
"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.
NoteAt this moment only same-type of chaining can be parsed
correctly (ie: only :
(COLON) or only ::
DB_REF_NON_STATIC).
The mixing of both punctuation elements (which is valid in the 4GL) is not supported yet.
Widget references can have an optional qualifier that is matched by the
widget_qualifier()
rule.
antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String simple_for_record_spec(boolean promote) throws antlr.RecognitionException, antlr.TokenStreamException
FOR
and a record name for the
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.
Calls record(boolean, boolean, boolean)
.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
promote
- true
to force promotion of the referenced table.antlr.RecognitionException
antlr.TokenStreamException
public final void label() throws antlr.RecognitionException, antlr.TokenStreamException
LABEL
keyword and the required string literal
or comma separated list of string literals. The subtree is rooted by the
KW_LABEL
keyword. Note that the commas are dropped from the
resulting AST to simplify processing.
Used by def_var_stmt(boolean[])
, def_parm_stmt()
and
def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
. 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.
The list syntax is used to create different labels for each element in an array.
antlr.RecognitionException
antlr.TokenStreamException
public final void namespace_clause() throws antlr.RecognitionException, antlr.TokenStreamException
NAMESPACE-URI
or NAMESPACE-PREFIX
with a following STRING
. Used by def_dataset_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
def_temp_table_stmt(boolean, boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
and def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.antlr.RecognitionException
antlr.TokenStreamException
public final void xml_node_name() throws antlr.RecognitionException, antlr.TokenStreamException
XML-NODE-NAME
and a following STRING
. Used by
def_temp_table_stmt(boolean, boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.antlr.RecognitionException
antlr.TokenStreamException
public final void xml_node_type() throws antlr.RecognitionException, antlr.TokenStreamException
XML-NODE-TYPE
with a following STRING
. Used by
temp_table_field_options(java.lang.String, int)
and def_dataset_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.antlr.RecognitionException
antlr.TokenStreamException
public final void serialize_name() throws antlr.RecognitionException, antlr.TokenStreamException
SERIALIZE-NAME
clause with the following string.
Used from def_temp_table_stmt(boolean, boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.antlr.RecognitionException
antlr.TokenStreamException
public final void data_relation(int idx) throws antlr.RecognitionException, antlr.TokenStreamException
DATA-RELATION
clause in a def_dataset_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.
There is an optional symbol()
which will be manufactured based on
the given index number if the relation name is not there. The naming
scheme is to use Relation
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.idx
- 1-based index number of the data relation in a given dataset
definition.antlr.RecognitionException
antlr.TokenStreamException
public final void parent_id_relation(int idx) throws antlr.RecognitionException, antlr.TokenStreamException
PARENT-ID-RELATION
clause in a def_dataset_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.
There is an optional symbol()
which will be manufactured based on
the given index number if the relation name is not there. The naming
scheme is to use ParentRelation
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.idx
- 1-based index number of the data relation in a given dataset
definition.antlr.RecognitionException
antlr.TokenStreamException
public final void for_query_clause() throws antlr.RecognitionException, antlr.TokenStreamException
FOR
keyword followed by a query_reference()
.
Used by def_datasrc_stmt(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.antlr.RecognitionException
antlr.TokenStreamException
public final void for_data_relation_spec() throws antlr.RecognitionException, antlr.TokenStreamException
FOR
followed by two record(boolean, boolean, boolean)
references
and options including field_mapping_clause()
. Used by
data_relation(int)
.antlr.RecognitionException
antlr.TokenStreamException
public final void nested_clause() throws antlr.RecognitionException, antlr.TokenStreamException
NESTED
keyword followed by an optional FOREIGN-KEY-HIDDEN
keyword. Called by for_data_relation_spec()
.antlr.RecognitionException
antlr.TokenStreamException
public final void field_mapping_clause() throws antlr.RecognitionException, antlr.TokenStreamException
RELATION-FIELDS
keyword followed by a list of
one or more parent_child_field_relation()
references. Called by
for_data_relation_spec()
.antlr.RecognitionException
antlr.TokenStreamException
public final void for_parent_relation_spec() throws antlr.RecognitionException, antlr.TokenStreamException
FOR
followed by two record(boolean, boolean, boolean)
references
and options including field_mapping_clause()
. Used by
parent_id_relation(int)
.antlr.RecognitionException
antlr.TokenStreamException
public final void parent_id_field_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void parent_fields_ordering_clause() throws antlr.RecognitionException, antlr.TokenStreamException
PARENT-FIELDS-[BEFORE|AFTER]
followed by parenthesized list of
one or more comma separated lvalue()
references.
Used by for_parent_relation_spec()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void parent_child_field_relation() throws antlr.RecognitionException, antlr.TokenStreamException
lvalue()
references and roots the pair at a
PARENT_CHILD_RELATION
node. Called by
field_mapping_clause()
.antlr.RecognitionException
antlr.TokenStreamException
public final void ui_stuff() throws antlr.RecognitionException, antlr.TokenStreamException
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
This method has an override for the normal KW_COL expr
that can be matched.
There is a hard coded option in this method to match either KW_COLUMNS
or
KW_COL
interchangeably (with a following expression) since the 4GL allows
this too. This is an undocumented "feature" of the 4GL.
Used by def_var_stmt(boolean[])
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void simple_title_string() throws antlr.RecognitionException, antlr.TokenStreamException
TITLE
keyword and the required following string.
This is the simplified version of title_phrase()
.
Used by view_as_alert_box_clause()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void like_menu_clause() throws antlr.RecognitionException, antlr.TokenStreamException
LIKE
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 def_menu_stmt()
. This rule is only separate
to properly build the AST.antlr.RecognitionException
antlr.TokenStreamException
public final void menu_element_descriptor() throws antlr.RecognitionException, antlr.TokenStreamException
RULE or SKIP
keywords or the other possible
constructs menu_item_phrase()
and submenu_descriptor()
that
can be used as a menu element. Called from def_menu_stmt()
.
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
SUB-MENU
keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final void submenu_descriptor() throws antlr.RecognitionException, antlr.TokenStreamException
SUB-MENU
keyword with following sub-menu name
and options. This is used in a menu_element_descriptor()
.
At this time, the symbol
is a placeholder for proper
menu namespace processing.
This is very similar to the 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.
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
SUB-MENU
keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final void menu_item_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
MENU-ITEM
definition in the Progress 4GL
DEFINE MENU or DEFINE SUB-MENU
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.
This rule is called by menu_element_descriptor()
.
This rule matches the MENU-ITEM
keyword and all
subsequent processing. Calls the following rules:
All options can be processed in any order.
The ui_stuff
rule generates bogus ambiguity warnings with
the exit branch of the loop. Ambiguity warnings have been disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void trigger_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
TRIGGERS
keyword and the following trigger phrase
construct. This is used in the def_var_stmt(boolean[])
,
def_button_stmt(boolean[])
and menu_item_phrase()
rules.
Calls the simple_on_stmt()
rule to implement the actual event
matching and trigger block. Uses end_stmt(boolean)
to delimit the
block. This rule does NOT eat the trailing DOT
since it is
called inline from other language statements.
Though it is not documented, it is possible to use either a
DOT or COLON
after the TRIGGERS
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. buttons_clause()
or field_list()
),
the TRIGGER
keyword does NOT work in Progress, thus we
provide no support for it here.
Although the 4GL documentation shows that at least one simple_on_stmt()
is required
to be present, customer code has shown that it is optional. This undocumented feature is
supported.
Bogus ANTLR ambiguity warnings have been suppressed.
antlr.RecognitionException
antlr.TokenStreamException
public final void image_stuff() throws antlr.RecognitionException, antlr.TokenStreamException
image_phrase()
. This is the list of keywords matched:
IMAGE IMAGE-DOWN IMAGE-INSENSITIVE IMAGE-UP
Used by def_button_stmt(boolean[])
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void like_widget_clause() throws antlr.RecognitionException, antlr.TokenStreamException
LIKE
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 def_button_stmt(boolean[])
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.antlr.RecognitionException
antlr.TokenStreamException
public final void size_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
frame_phrase(boolean, boolean)
rule et al.antlr.RecognitionException
antlr.TokenStreamException
public final void no_focus_clause() throws antlr.RecognitionException, antlr.TokenStreamException
NO-FOCUS
keyword and the optional following
FLAT-BUTTON
. Used by def_button_stmt(boolean[])
and the subtree
is rooted by the keyword (which is the reason for using a separate rule
for something so simple).antlr.RecognitionException
antlr.TokenStreamException
public final void tooltip_clause() throws antlr.RecognitionException, antlr.TokenStreamException
TOOLTIP
clause as used in a phrase from a
VIEW-AS
construct. See view_as_phrase(java.lang.String)
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void edge_clause() throws antlr.RecognitionException, antlr.TokenStreamException
EDGE-CHARS or EDGE-PIXELS
construct of the
Progress 4GL language. This rule is called from the def_rect_stmt(boolean[])
rule.antlr.RecognitionException
antlr.TokenStreamException
public final void stretch_to_fit_clause() throws antlr.RecognitionException, antlr.TokenStreamException
STRETCH-TO-FIT
with an optional
RETAIN-SHAPE
. This is separated to properly build the tree
rooted at the KW_ST_2_FIT
node. Called from
def_image_stmt()
antlr.RecognitionException
antlr.TokenStreamException
public final void image_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
def_button_stmt(boolean[])
or a def_image_stmt()
. The first token must be the
KW_FILE
followed by a filename()
. Also uses the
following:
Also allows a match to the KW_FIL_NAME
token instead of the
KW_FILE
. This is an undocumented feature found in real 4GL
code. We normalize the parent to KW_FILE in this case to simplify downstream
use.
antlr.RecognitionException
antlr.TokenStreamException
public final void record_spec(java.util.Set<Aast> fields) throws antlr.RecognitionException, antlr.TokenStreamException
def_frame_stmt()
, display_stmt()
and column_spec()
rules. Uses except_list()
.
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.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
If a non-null fields
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.
TBD: we always promote the associated table here, though it is unclear
whether this is necessary in the form_stmt()
case.
fields
- Set into which manufactured field references should be stored. May be
null
.antlr.RecognitionException
antlr.TokenStreamException
public final void form_item(java.util.Set<Aast> fields) throws antlr.RecognitionException, antlr.TokenStreamException
space_or_skip()
, widget()
and expr()
. Called by
def_frame_stmt()
and form_stmt()
. The resulting tree will be
rooted at a FORM_ITEM
token.
This is ambiguity between the widget()
rule and the expression/
variable definition mode where the rule uses a 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.
New variables can be defined using the the format phrase with an embedded
AS or LIKE
clause! The AS or LIKE
clause can
be arbitrarily deep in the format phrase so we enable a special mode of
the expr()
processing that allows lvalue()
to match with
a SYMBOL
. This overcomes the limitations of fixed lookahead
cause (where the AS or LIKE
keywords cannot be found in the
2nd token).
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 FIELD_
token type.
The use of the format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
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.
fields
- Set into which a field reference should be stored, if the form item
represents a database field.antlr.RecognitionException
antlr.TokenStreamException
public final void frame_phrase(boolean blockHdr, boolean editing) throws antlr.RecognitionException, antlr.TokenStreamException
WITH
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 WITH
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 WITH
keyword and parse everything into a single frame phrase. This should be
logically equivalent.
The following list of rules are called to properly implement the tree
building (which will be rooted at a FRAME_PHRASE
token):
accum_clause()
at_phrase()
button_reference()
color_spec()
context_help_file()
frame_reference(boolean)
size_phrase()
lvalue()
(only for stream and browse references, protected with a semantic predicate)
title_phrase()
version_6_frame_clause()
view_as_dialog_clause()
in_window_clause()
misc_frame_opts()
columns_clause()
down_clause()
The order of the above list is important in the case of the last two
rule references columns_clause()
and down_clause()
. These
prefix a NUM_LITERAL
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.
Called from do_repeat_stmt()
, for_stmt()
and
def_frame_stmt()
among other locations.
blockHdr
- true
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).editing
- true
if this frame phrase can be followed by an
editing block.antlr.RecognitionException
antlr.TokenStreamException
public final void form_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
FORM
Progress 4GL language statement which is
nearly identical to the def_frame_stmt()
.
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 record_spec(java.util.Set<com.goldencode.ast.Aast>)
) and instead the form_item(java.util.Set<com.goldencode.ast.Aast>)
is checked. By carefully ordering these options and using a semantic
predicate, the ambiguity is resolved. For this reason, ambiguity warnings
have been disabled.
Called by stmt_list()
. Uses record_spec(java.util.Set<com.goldencode.ast.Aast>)
,
form_item(java.util.Set<com.goldencode.ast.Aast>)
and frame_phrase(boolean, boolean)
to properly build the AST.
Progress is so ridiculously ambiguous about keywords that there is a
reserved FORMAT
keyword that can be abbreviated down to
4 characters. Yes, the reserved FORM
keyword could actually
be the FORMAT
keyword and must be disambiguated by context.
Our keyword processing will always generate a match to FORMAT
and we override it to be a FORM
, once we match here.
antlr.RecognitionException
antlr.TokenStreamException
public final void except_list() throws antlr.RecognitionException, antlr.TokenStreamException
Used by record_spec(java.util.Set<com.goldencode.ast.Aast>)
and browse_all_list()
.
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.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void space_or_skip() throws antlr.RecognitionException, antlr.TokenStreamException
SPACE() or SKIP()
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.
Used by form_item(java.util.Set<com.goldencode.ast.Aast>)
, set_or_update_or_prompt_for_stmt()
,
display_stmt()
, enable_stmt()
, export_stmt()
,
column_spec()
and content_array()
(used in a
MESSAGE
statement).
The subtree is rooted by the keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final void widget() throws antlr.RecognitionException, antlr.TokenStreamException
This rule is simply a convenience method to use the prefer widgets
flag to bias the rule reference to lvalue()
to first
pick a widget over a variable. When done, the prefer widgets flag
state is set back to the default of false
.
antlr.RecognitionException
antlr.TokenStreamException
public final void aggregate_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
DISPLAY
language statement.
Called by display_stmt()
. Uses label()
and
by_clause()
.
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). 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.
When the accum_function()
was added, ANTLR started showing bogus
ambiguity warnings. These have been disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void format_phrase(java.lang.String symName, Aast fld, boolean frameDef, boolean enableWidget) throws antlr.RecognitionException, antlr.TokenStreamException
The following list of rules are called to properly implement the tree
building (which will be rooted at a FORMAT_PHRASE
token):
at_phrase()
as_clause(java.lang.String, boolean)
like_clause(java.lang.String, java.lang.Object, boolean)
colon_constant()
to_constant()
column_label()
format_string(boolean)
help_string()
label()
validate(java.lang.String)
ui_stuff()
view_as_phrase(java.lang.String)
simple_when_clause()
at_base_field_clause(boolean)
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.
Called from form_item(java.util.Set<com.goldencode.ast.Aast>)
.
The WHEN
clause (accessed via simple_when_clause
)
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 -> when phrase -> 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).
The '@' base_field clause (accessed via at_base_field_clause
)
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.
The undocumented option PASSWORD-FIELD
is matched here. It was
found in customer source code.
When called from frame definition statements, this will match the undocumented option
AS BUTTON
which is the equivalent of an inline DEFINE BUTTON
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.
symName
- If not null
then a variable definition will be
processed and the format phrase is expected to contain an
AS
or LIKE
clause.fld
- If not null
then the given field reference will
define a temporary scope promotion for the field's table such
that validation expressions will resolve unambiguously.frameDef
- true
if the caller is a statement that would create or add to a
frame definition.enableWidget
- true
if this format phrase is associated with a field clause which
represents a widget being enabled in a frame; else false
.antlr.RecognitionException
antlr.TokenStreamException
public final void numeric_literal() throws antlr.RecognitionException, antlr.TokenStreamException
NUM_LITERAL
or a DEC_LITERAL
.antlr.RecognitionException
antlr.TokenStreamException
public final void runtime_space_or_skip() throws antlr.RecognitionException, antlr.TokenStreamException
SPACE() or SKIP()
constructs and the optional
following expr()
. Note that although ANTLR reports ambiguity
in the optional clause, there is no actual ambiguity so warnings have
been disabled.
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.
Used by put_stmt()
.
The subtree is rooted by the keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final void null_clause() throws antlr.RecognitionException, antlr.TokenStreamException
NULL()
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.
Used by put_stmt()
.
The subtree is rooted by the keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final void set_or_update_or_prompt_for_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SET, UPDATE and PROMPT-FOR
language statements
and implements the (nearly identical) logic for all 3.
This rule is called by stmt_list()
.
Calls the following rules:
lvalue()
(this handles the field processing AND stream references)
space_or_skip()
text_clause()
at_phrase()
to_constant()
colon_constant()
(undocumented but found in customer source)
constant_form_item()
record_spec(java.util.Set<com.goldencode.ast.Aast>)
go_on_clause()
frame_phrase(boolean, boolean)
inner_block(boolean, com.goldencode.ast.Aast)
All options can be processed in any order.
The list of fields, records or other values to set or update is
particularly tricky because it has very real ambiguity in allowing an
lvalue
in the leftmost token of 2 peer alternatives. While
normally, a semantic predicate could be used to resolve this ambiguity,
the lvalue
rule itself defeats this since it supports
array subscripting. This form of lvalue
means that the
EQUALS
token (that disambiguates the assignment form from the
field_clause
) can appear at an arbitrary point in the token
stream (not just in the k == 2 position). For example, myVar[ i + 7 ] =
puts the EQUALS
in the k == 7 position. By splitting off
the subsequent processing and left factoring the lvalue
,
this problem is resolved.
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.
The use of inner_block
is to implement the editing clause,
which is a form that inner_block
supports. This also
matches DO, REPEAT and FOR
keywords in addition to
EDITING
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
inner_block
uses end_stmt(boolean)
to delimit the
block. Based on how we call inner_block
, the subsequent
invocation of end_stmt
does NOT eat the trailing
DOT
since it is called inline in this language statement.
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.
The use of the constant_form_item
is required for the
PROMPT-FOR
statement and it may not be valid for the
SET or UPDATE
statements based on the Progress documentation.
Valid Progress code will not have a problem with this.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void text_clause() throws antlr.RecognitionException, antlr.TokenStreamException
TEXT
keyword and an following field specification.
Calls the field_clause(boolean)
rule.
Used by enable_stmt()
.
This is a separate rule to centralize logic and build the AST properly.
antlr.RecognitionException
antlr.TokenStreamException
public final void literal() throws antlr.RecognitionException, antlr.TokenStreamException
NUM_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)
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.
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.
There is no literal representation for RAW data type.
Certain upstream usage of expressions (see form_item(java.util.Set<com.goldencode.ast.Aast>)
) 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.
antlr.RecognitionException
antlr.TokenStreamException
public final void literal_format_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
).
The following list of rules are called to properly implement the tree
building (which will be rooted at a FORMAT_PHRASE
token):
Called from set_or_update_or_prompt_for_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void go_on_clause() throws antlr.RecognitionException, antlr.TokenStreamException
GO-ON()
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 RPARENS
. 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.
For certain event definitions such a CTRL-@, this code will initially
match on 2 or more tokens (in this case a SYMBOL (CTRL-) and an AT (@)).
These get converted to EVENT tokens and processHiddenText()
is used to save enough data regarding the whitespace to allow post-parse
fixups to properly merge these back into a single EVENT node.
Used by set_or_update_or_prompt_for_stmt()
and choose_stmt()
.
Please note that the method processHiddenText
is used to
detect and annotate if a merge of AST nodes must occur due to missing
whitespace between tokens. This is required since in this place the
Progress lexer operates using whitespace only, but this mode cannot be
easily forced in the current approach since sharing state between the
parser and lexer is exceptionally difficult (not feasible).
The subtree is rooted by the keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final void chained_object_members() throws antlr.RecognitionException, antlr.TokenStreamException
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 COLON
operator without any following white space.
Under these conditions, one of the downstream_chained_reference(java.lang.String, boolean)
(for OO 4GL refs),
com_property_or_method()
(COM-HANDLE refs) or attribute_or_method()
(anything
else) will be called.
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 COLON
without any following white
space.
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
downstream_chained_reference(java.lang.String, boolean)
provides the matching logic for both of those cases,
but the chaining itself is done here. The operator used for chaining is a COLON
but this will be converted to an OBJECT_INVOCATION
before return.
If the given node is a COM-HANDLE type, if it is then the rule com_property_or_method()
provides the matching logic but the downstream chaining itself is done here. The operator used
for chaining is a COLON
but this will be converted to a
COM_INVOCATION
before return.
Supports the DB_REF_NON_STATIC
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 ::
operator. This includes chaining support and mix/match chaining.
This is only called by the 7th level un_type()
rule.
See the top level expression parsing rule expr()
for more details.
antlr.RecognitionException
antlr.TokenStreamException
public final void embedded_assign() throws antlr.RecognitionException, antlr.TokenStreamException
EQUALS
token (the equals sign) and a following
expr()
. The token type of the EQUALS
is changed to
ASSIGN
and the construct is rooted on that token.
Used by entry_stmt()
and compile_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void insert_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
INSERT
language statement. Uses the
record_spec(java.util.Set<com.goldencode.ast.Aast>)
, using_id_clause()
and
frame_phrase(boolean, boolean)
rules.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void using_id_clause() throws antlr.RecognitionException, antlr.TokenStreamException
USING
keyword and the following
RECID or ROWID
construct as encoded by
recid_or_rowid()
. Called by create_stmt()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void raw_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
RAW
language statement with the following
lvalue()
and 1 or 2 optional integer expr()
for position
and length.
Called by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void set_size_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SET-SIZE
language statement with the following
lvalue()
.
Called by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void set_byte_order_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SET-BYTE-ORDER
language statement with the
following lvalue()
.
Called by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void set_pointer_value_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SET-POINTER-VALUE
language statement with the
following lvalue()
.
Called by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void put_memptr_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
PUT-BITS, PUT-BYTE, PUT-BYTES, PUT-DOUBLE,
PUT-FLOAT, PUT-INT64, PUT-LONG, PUT-SHORT, PUT-STRING,
PUT-UNSIGNED-LONG, PUT-UNSIGNED-SHORT
language statement
with the following expr()
expressions.
Most of these statements are specific to the MEMPTR
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.
Called by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void next_prompt_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
NEXT-PROMPT
language statement. Uses the lvalue()
and
frame_phrase(boolean, boolean)
rules. Undocumented support has been added for optional
INPUT
and FRAME framename
qualifiers before the lvalue. This
was working syntax that was found in customer source code.
The 4GL has an undocumented feature that allows a format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
to be specified
after the lvalue. This is implemented here.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void frame_reference(boolean define) throws antlr.RecognitionException, antlr.TokenStreamException
FRAME frame
reference seen in many Progress
language statements such as clear_stmt()
and the common
frame_phrase(boolean, boolean)
.
If the single parameter is true, the frame is added to the frame namespace.
In any case, the following symbol()
is rewritten to a
WID_FRAME
token.
This rule is a simplified version of what can also be accessed directly
from lvalue()
but this keeps certain references much less
ambiguous.
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
FRAME
keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final void at_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
frame_phrase(boolean, boolean)
and form_item(java.util.Set<com.goldencode.ast.Aast>)
rules.
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.
Ambiguity warnings were generated in the 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.
antlr.RecognitionException
antlr.TokenStreamException
public final void colon_constant() throws antlr.RecognitionException, antlr.TokenStreamException
COLON literal
clause used in the
format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void to_constant() throws antlr.RecognitionException, antlr.TokenStreamException
TO literal
clause used in the
constant_form_item()
and format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void as_button_quirk(java.lang.String symName) throws antlr.RecognitionException, antlr.TokenStreamException
AS BUTTON
clause and adds a button widget as if an inline
DEFINE BUTTON
had been implemented. This is an undocumented quirk of the
format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
. The root node will be of type AS_BUTTON
.symName
- The name of the new button. Must not be null
.antlr.RecognitionException
antlr.TokenStreamException
public final void as_clause(java.lang.String varName, boolean nativeTypes) throws antlr.RecognitionException, antlr.TokenStreamException
AS
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 def_var_stmt(boolean[])
and parameter()
, both of which
support the same syntax. It is also called from def_parm_stmt()
which does allow for an optional HANDLE TO
construct when being
called for a DEFINE PARAMETER
.
The data type matching is implemented in var_type(java.lang.String, boolean)
.
varName
- Text which is the variable name that should be added to the
current scope of the variable dictionary. If null
,
no name will be added and this clause is essentially ignored.nativeTypes
- true
to support extra type keywords for native
shared library interfaces.antlr.RecognitionException
antlr.TokenStreamException
public final void like_clause(java.lang.String symName, java.lang.Object table, boolean tablename) throws antlr.RecognitionException, antlr.TokenStreamException
LIKE
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.
If this is processing for a temp-table, then instead of LIKE
the
LIKE-SEQUENTIAL
keyword can be matched instead.
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.
A 2nd parameter is null
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.
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.
Locations from which this rule is referenced:
def_temp_table_stmt(boolean, boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
(for temp-tables and
work-tables)
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 lvalue()
rule
which handles field level lookups. For table names the record(boolean, boolean, boolean)
rule is used.
In temp-table and work-table adds, there is optional matching that is
additionally enabled by semantic predicate. This matching is done in
the temp_table_use_index(java.lang.Object)
rule.
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.
Bogus ANTLR ambiguity warnings have been disabled.
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 null
, no name will be added and this
clause is essentially ignored.table
- A reference to a table previously added to the dictionary. Must
be null
if this is a modification of the variable
namespace.tablename
- If true, the name is to be interpreted as a tablename, otherwise
the name is an lvalue (variable or field name).antlr.RecognitionException
antlr.TokenStreamException
public final void column_label() throws antlr.RecognitionException, antlr.TokenStreamException
COLUMN-LABEL
keyword and the required following
string. Used by def_var_stmt(boolean[])
and the subtree is rooted by the
keyword (which is the reason for using a separate rule for something so
simple).antlr.RecognitionException
antlr.TokenStreamException
public final void format_string(boolean dynExpr) throws antlr.RecognitionException, antlr.TokenStreamException
FORMAT
keyword and the required following
string. Used by def_var_stmt(boolean[])
and format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
rules.
The subtree is rooted by the keyword (which is the reason for using a
separate rule for something so simple).
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 expr()
instead of STRING
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 FORMAT
keyword.
To make this better, the exit action converts any non-quoted format to
a STRING
node with the proper quoting.
It might be useful to merge this with ui_stuff()
since both rules
have identical structure and they are almost always
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.
dynExpr
- flag indicating the format string can be any dynamic expression.antlr.RecognitionException
antlr.TokenStreamException
public final void help_string() throws antlr.RecognitionException, antlr.TokenStreamException
HELP
keyword and the required following
string. Used by format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
and the subtree is rooted by the
keyword (which is the reason for using a separate rule for something so
simple).antlr.RecognitionException
antlr.TokenStreamException
public final void validate(java.lang.String schemaName) throws antlr.RecognitionException, antlr.TokenStreamException
VALIDATE( expression )
construct which specifies
a boolean condition expression and a message string expression to display
when the condition expression evaluates to false.
Used by format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
.
Separating this allows the AST to be built cleanly and also centralizes the logic for reuse.
schemaName
- The schema name of the field being validated (may be null).antlr.RecognitionException
antlr.TokenStreamException
public final void view_as_phrase(java.lang.String symName) throws antlr.RecognitionException, antlr.TokenStreamException
VIEW-AS
phrase which is called from many locations
such as def_var_stmt(boolean[])
. Uses the following:
combo_box_phrase()
simple_widget_phrase()
editor_phrase()
radio_set_phrase()
selection_list_phrase()
slider_phrase()
All options can be specified in any order.
This rule updates the widget namespace with a name and type of the
referenced symbol. For variables (when called from
def_var_stmt
), 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.
antlr.RecognitionException
antlr.TokenStreamException
public final void simple_when_clause() throws antlr.RecognitionException, antlr.TokenStreamException
WHEN
keyword and the required following
expression. This is a simpler form of the when_clause()
which
requires a THEN
following construct.
Used by display_stmt()
, assign_stmt()
and
field_clause(boolean)
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String at_base_field_clause(boolean matchSym) throws antlr.RecognitionException, antlr.TokenStreamException
@
sign and the required following variable or
field name (see lvalue()
).
Used by display_stmt()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
matchSym
- true
if this clause should allow matches to
a SYMBOL
node in place of the lvalue.SYMBOL
was matched, otherwise
null
.antlr.RecognitionException
antlr.TokenStreamException
public final void by_clause() throws antlr.RecognitionException, antlr.TokenStreamException
BY
keyword and the required following expression.
Used by aggregate_phrase()
and loop_incr()
rules.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void constant_form_item() throws antlr.RecognitionException, antlr.TokenStreamException
form_item(java.util.Set<com.goldencode.ast.Aast>)
.
Calls view_as_text_clause()
, ui_stuff()
, at_phrase()
and to_constant()
.
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 ui_stuff
. This code should match on the
keywords first, so these ambiguity warnings have been disabled.
Though undocumented, one can specify a format_string(boolean)
as an
option.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void view_as_text_clause() throws antlr.RecognitionException, antlr.TokenStreamException
VIEW-AS TEXT
clause used in the
constant_form_item()
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void accum_clause() throws antlr.RecognitionException, antlr.TokenStreamException
ACCUM
keyword and the optional following maximum
length. This rule conflicts with the use of a NUM_LITERAL
construct when k=1 in the calling rule frame_phrase(boolean, boolean)
. 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. Note that this rule checks the k=2
lookahead before matching the NUM_LITERAL
. This may be OK
but it may also bypass the match in a case where something unexpected
follows the NUM_LITERAL
. Since this cannot be proven for all
cases, watch this code!
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void button_reference() throws antlr.RecognitionException, antlr.TokenStreamException
CANCEL-BUTTON or DEFAULT-BUTTON
keywords and the
required following button name. No button namespace processing is done
to confirm that the following symbol is indeed a button.
Used by frame_phrase(boolean, boolean)
.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void color_spec() throws antlr.RecognitionException, antlr.TokenStreamException
color_phrase()
rule downstream for the bulk of this rule's implementation.
This rule is called from title_phrase()
and frame_phrase(boolean, boolean)
.
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 color_phrase
or the expression that follows in
the 2nd token position for ui_stuff
. This code should match
on the keywords first, so these ambiguity warnings have been disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void context_help_file() throws antlr.RecognitionException, antlr.TokenStreamException
CONTEXT-HELP-FILE
keyword and the required
following filename()
.
Used by frame_phrase(boolean, boolean)
.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void title_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
color_spec()
is used for the bulk of the function but it does
have options that cannot normally be constructed in a title phrase. In
addition, the ui_stuff()
rule is used to add the optional
FONT expression
construct that occurs just before the
title string expression.
This rule is called from frame_phrase(boolean, boolean)
and browse_options_phrase()
rules.
ANTLR detects ambiguity in the use of ui_stuff
and color_spec
.
The code has been protected with semantic predicates and ambiguity warnings have been
disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void view_as_dialog_clause() throws antlr.RecognitionException, antlr.TokenStreamException
VIEW-AS DIALOG-BOX
clause.
Used by frame_phrase(boolean, boolean)
.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void in_window_clause() throws antlr.RecognitionException, antlr.TokenStreamException
IN WINDOW
clause seen in many Progress language
statements such as status_stmt()
and pause_stmt()
.
Following the keywords is a window reference which is coded here as a
reference to the 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.
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
IN
keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final void misc_frame_opts() throws antlr.RecognitionException, antlr.TokenStreamException
RETAIN, SCROLL and WIDTH
keywords and the required
following numeric or decimal literal. Note that it is undocumented that
Progress allows WIDTH-CHARS
to be used as a synonym for
WIDTH
in this case. Also undocumented is the fact that the
WIDTH-PIXELS
keyword can be used here.
Used by frame_phrase(boolean, boolean)
.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void columns_clause() throws antlr.RecognitionException, antlr.TokenStreamException
COLUMNS
keyword and the required preceding
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 frame_phrase(boolean, boolean)
for this reason.
It turns out that in Progress will accept the COLUMN
keyword
in place of the COLUMNS
keyword, even though they are
supposed to be different keywords (and COLUMN
has no
abbreviations).
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void down_clause_or_loop_incr() throws antlr.RecognitionException, antlr.TokenStreamException
loop_incr()
(which always starts with an
lvalue()
) and a down_clause()
(which optionally starts with
an expr()
). The matching in this rule is in-lined from the original
rules in order to left-factor the common leftmost expression construct.antlr.RecognitionException
antlr.TokenStreamException
public final void down_clause() throws antlr.RecognitionException, antlr.TokenStreamException
DOWN
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 frame_phrase(boolean, boolean)
for this reason.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void version_6_frame_clause() throws antlr.RecognitionException, antlr.TokenStreamException
V6FRAME
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 frame_phrase(boolean, boolean)
. 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. Note that this rule checks the k=2
lookahead before matching the USE-REVERSE or USE-UNDERLINE
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!
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void filename() throws antlr.RecognitionException, antlr.TokenStreamException
Token types that end the merging process:
DOT EOF LPARENS RPARENS
The lexer has a FILENAME
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 mergeUntilWS
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 FILENAME
.
The matching portion of this rule is defined as a single token that
matches the union of the FILENAME
token type and the set of
all tokens that are not a DOT
.
antlr.RecognitionException
antlr.TokenStreamException
public final void color_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
COLOR
language statement and the required
following color specification. This rule uses an inlined version of the
color_spec()
with modifications to allow an empty color phrase.
The display_color_clause()
and prompt_color_clause()
rules
provide the bulk of the implementation.
Actual customer code shows that a format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
can be placed
after the lvalue()
used to describe each field. In addition, at
the end of the statement an optional frame_phrase(boolean, boolean)
is matched.
Although it is documented that at least 1 field (lvalue) is required,
customer code has shown this to be optional.
Bogus ANTLR ambiguity warnings have been disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void prompt_color_clause() throws antlr.RecognitionException, antlr.TokenStreamException
PROMPT color_phrase
construct used in a color
specification. This supports an undocumented Progress feature, where
PROMPT-FOR
is accepted as a synonym to PROMPT
.
Used by color_spec()
.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void display_color_clause() throws antlr.RecognitionException, antlr.TokenStreamException
DISPLAY color_phrase
construct used in a color
specification (actually the DISPLAY
keyword is optional).
Used by color_spec()
.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void color_field_list(java.util.Set<Aast> fields) throws antlr.RecognitionException, antlr.TokenStreamException
color_stmt()
. Calls lvalue()
and
format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
and roots everything at a node of type
CONTENT_ARRAY
.fields
- Set into which all database field references should be stored.antlr.RecognitionException
antlr.TokenStreamException
public final void color_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
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.
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.
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.
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.
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.
Customer source has shown that reserved keywords such as
UNDERLINE
can be found in a color phrase (this is
undocumented by Progress and is currently supported on a case by case
basis.
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.
This rule is called from color_spec()
rule.
antlr.RecognitionException
antlr.TokenStreamException
public final void value() throws antlr.RecognitionException, antlr.TokenStreamException
VALUE( expression )
construct which converts
an expression into a symbol-like result (example: a type of name). This is
used in many locations such as color_phrase()
and run_stmt()
.
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.
Separating this allows the AST to be built cleanly and also centralizes the logic for reuse.
antlr.RecognitionException
antlr.TokenStreamException
public final void column_format_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE BROWSE
. All of its options can be
specified in any order. This is generally a subset of the normal
format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
, however there is one case that can be matched
here (KW_WIDTH
) that cannot be matched in a format phrase.
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 FORMAT_PHRASE
node.
The following list of rules are called to properly implement the tree building:
label()
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)
ui_stuff()
column_label()
at_base_field_clause(boolean)
view_as_phrase(java.lang.String)
We have disabled ambiguity warnings because there is no real issue with
the ui_stuff
.
The '@' base_field clause (accessed via at_base_field_clause
)
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.
Called from column_spec()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void browse_enable_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
column_spec()
are enabled for input (always is preceded by the
ENABLE
keyword).
Calls browse_all_list()
, lvalue()
, help_string()
and validate(java.lang.String)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void browse_all_list() throws antlr.RecognitionException, antlr.TokenStreamException
browse_enable_phrase()
rule. Uses except_list()
.
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.
Separated from the main rule to properly build the AST without complexity. This is the only reason such a simple rule is implemented separately.
antlr.RecognitionException
antlr.TokenStreamException
public final void column_ref() throws antlr.RecognitionException, antlr.TokenStreamException
browse_enable_phrase()
. Returns a node of type
COLUMN_REF
and uses lvalue()
, help_string()
and validate(java.lang.String)
rule references.antlr.RecognitionException
antlr.TokenStreamException
public final void row_height_clause() throws antlr.RecognitionException, antlr.TokenStreamException
ROW-HEIGHT-CHARS and ROW-HEIGHT-PIXELS
construct
with its required following integer constant. Used in the
browse_options_phrase()
.
Separating this allows the AST to be built cleanly and also centralizes the logic for reuse.
antlr.RecognitionException
antlr.TokenStreamException
public final void initializer(int vtype) throws antlr.RecognitionException, antlr.TokenStreamException
INITIAL
keyword and the required single literal
or a left/right bracket bounded (and comma separated) list of literals.
Used by def_var_stmt(boolean[])
and the subtree is rooted by the
INITIAL
keyword. Note that the commas are dropped from the
resulting AST to simplify processing.
A special case exists for the TODAY
keyword. Normally,
an initializer would only accept a literal()
but for variables
of type DATE
, the TODAY
'function' can also
be used. To accomodate this requirement, the initializer_constant(int)
rule is called.
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.
vtype
- A token type that describes type of the variable being initialized. This is
the type of the child of the KW_AS
or KW_LIKE
node.antlr.RecognitionException
antlr.TokenStreamException
public final void decimals_clause() throws antlr.RecognitionException, antlr.TokenStreamException
DECIMALS
keyword and the required following
integer literal. Used by def_var_stmt(boolean[])
and the subtree is rooted by
the keyword (which is the reason for using a separate rule for something so
simple).antlr.RecognitionException
antlr.TokenStreamException
public final void case_sensitive() throws antlr.RecognitionException, antlr.TokenStreamException
CASE-SENSITIVE
keyword with the optional
preceeding NOT
keyword. Separated to enhance the tree build.
Called by regular_parm(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
, temp_table_field_options(java.lang.String, int)
and
def_var_stmt(boolean[])
.
antlr.RecognitionException
antlr.TokenStreamException
public final void block_list() throws antlr.RecognitionException, antlr.TokenStreamException
DO
, REPEAT
and
FOR
.
As all 3 of these language statements can end with a COLON
or a DOT
, this rule implements this match in common code.
The core of this rule specifies multiple alternatives that match the
Progress language statements DO, REPEAT
(do_repeat_stmt()
) and FOR
(for_stmt()
).
This rule also matches the EDITING
keyword and allows this
rule to be used as the editing phrase. This works because the calling
rule (inner_block
) 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.
These required keywords should provide the differentiation needed to
eliminate the ambiguity that is generated by having the optional
symbol
reference as the first token, however it turns out
that the generated ANTLR code is not smart enough to handle this.
Instead the block()
top-level rule has a semantic predicate that
reimplements the dependencies implemented by this rule's logic.
antlr.RecognitionException
antlr.TokenStreamException
public final void do_repeat_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DO
and REPEAT
Progress 4GL language
statements. This is possible because other than the primary (leftmost)
keyword being different (DO
versus REPEAT
), 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.
All possible common clauses between this rule and for_stmt()
have been factored into common_block_options()
.
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.
Called by block_list()
.
Bogus ANTLR ambiguity warnings have been disabled.
Uses the following rules:
for_record_spec(boolean, boolean, boolean)
preselect_phrase()
common_block_options()
antlr.RecognitionException
antlr.TokenStreamException
public final void for_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
FOR
Progress 4GL language statement.
All possible common clauses between this rule and do_repeat_stmt()
have been factored into common_block_options()
.
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 preselect_phrase()
rule that is
used by the do_repeat_stmt
is inlined in here. The
inline grammar differs in that there is no preselect
keyword.
Called by block_list()
.
Uses each_first_last_spec(boolean, boolean)
to implement a common record phrase
list.
antlr.RecognitionException
antlr.TokenStreamException
public final void stmt_list() throws antlr.RecognitionException, antlr.TokenStreamException
Although ANTLR properly handles the ambiguity of statements that start
with common keywords like CREATE
(assuming they are ordered
more specific to less specific), it still can detect ambiguity. For this
reason, ambiguity warnings have been disabled. 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.
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.
This rule seems to be where the statement-ending DOT
should
be matched. However, there are locations such as if_stmt()
and
case_stmt()
that don't easily fit into this plan. So the end of
statement delimiter is coded in each statement separately.
Do NOT put an END
statement into this list. The nested
nature of the grammar's block structure is only possible because the
END
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 single_block(boolean, boolean)
.
Called by statement()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void accumulate_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
ACCUMULATE
language statement. Calls the expr()
and
aggregate_phrase()
. An undocumented feature of the 4GL is also supported. This
allows an optional format_string(boolean)
rule to follow the aggregate phrase.
If the accumulator type is COUNT
or TOTAL
, a
VAR_INT
of name "count" or VAR_DEC
of name
"total" will be created respectively. This is an undocumented feature
of the 4GL where the data can be read and even assigned directly as an
lvalue! Note that only COUNT
and TOTAL
have
this behavior. All other accumulator types (including all the
SUB-
variants) do NOT exhibit this behavior.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void apply_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
APPLY
language statement. Calls the
expr()
and to_event_target()
rules.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void assign_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
ASSIGN
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).
It is undocumented, but the assign statement can be empty (just the assign keyword followed by a dot).
The syntax is differentiated from a top level assignment()
statement
by:
ASSIGN
keyword as the first token
DOT
A rule reference called assign()
is used to implement the
assignment logic. Note that this is nearly identical to the
assignment
rule except for the non-mandatory lvalue and
assignment operator and the lack of the terminating DOT
.
Due to these differences, the assignment
rule could not be
reused here.
Uses a separate rule for core logic allows ANTLR's natural tree building to
generate a proper result (the entire subtree created by assign
is added as a child of the ASSIGN
keyword).
Uses record_spec(java.util.Set<com.goldencode.ast.Aast>)
, assign()
and simple_when_clause()
.
This rule has inherent ambguity 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.
ANTLR reports bogus ambiguity in the use of the browse reference but warnings have been disabled since this is not ambiguous.
antlr.RecognitionException
antlr.TokenStreamException
public final void block_level_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
KW_BLK_LVL
keyword with a following on_event_phrase()
.antlr.RecognitionException
antlr.TokenStreamException
public final void buffer_compare_or_copy_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
BUFFER-COMPARE and BUFFER-COPY
language statements
and all following constructs.
record(boolean, boolean, boolean)
buffer_modification_list()
to_target()
save_result_in()
(compare only)
explicit_compares()
(compare only)
sub_assign_clause()
(copy only)
Used by stmt_list()
.
Bogus ANTLR ambiguity warnings are disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void call_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CALL
language statement, the required
filename()
of the invoked HLC (host language call) function and
and optional list of expr()
(arguments). Used by stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void case_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CASE
language statement. This rule uses
rule references when_clause()
, otherwise()
and
end_stmt(boolean)
to properly build the AST.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void catch_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
KW_CATCH
block which is part of the structured
error handling added in 10.2x. This uses the symbol()
,
as_clause(java.lang.String, boolean)
, block()
and end_stmt(boolean)
sub-rules to
match and build the tree. The tree will be rooted at the
KW_CATCH
node. Variable and schema scopes are pushed and
popped in this statement.antlr.RecognitionException
antlr.TokenStreamException
public final void choose_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CHOOSE
language statement, the required following
choose_row_or_field_list()
and all possible options (which can be
specified in any order).
Calls:
choose_keys_clause()
go_on_clause()
pause_clause()
simple_color_clause()
frame_phrase(boolean, boolean)
Bogus ANTLR ambiguity warnings have been disabled.
Used by choose_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void clear_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CLEAR
language statement.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void close_query_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CLOSE QUERY
language statement and the required
following query name (see malformed_symbol()
).
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void close_stored_proc_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CLOSE STORED-PROCEDURE
language statement, the
following reserved_or_symbol()
, the optional assign()
and optional where_clause()
. The result will be rooted at a
CLOSE_STORED_PROCEDURE
node. Called from stmt_list()
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void compile_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
COMPILE
language statement.
Calls external_name_spec()
and compile_options_clause()
rules.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void connect_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CONNECT
language statement, the following
database_name(boolean)
and arbitrary connect options.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void copy_lob_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
COPY-LOB
language statement.
Calls from_lob_source()
, to_lob_target()
and codepage_convert_phrase()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_alias_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE ALIAS
language statement, and the following
database names (see database_name(boolean)
).
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_browse_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void create_buffer_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE BUFFER
language statement, the required
following handle()
, the required FOR TABLE
construct (see for_table_clause()
) and the optional
in_widget_pool_clause()
and buffer_name_clause()
rules.
An undocumented feature was found where the NO-ERROR
keyword
can be added at the end of this statement.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_call_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE CALL
language statement, the required
following handle()
and the optional in_widget_pool_clause()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_client_principal_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE CLIENT-PRINCIPAL
language statement and the
required following handle()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_database_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE DATABASE
language statement, the required
following expressions and the optional REPLACE or NO-ERROR
keywords.
Uses expr()
and from_database_clause()
rules.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_dataset_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE DATASET
language statement, the required
following handle()
and the optional in_widget_pool_clause()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_datasource_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE DATA-SOURCE
language statement, the required
following handle()
and the optional in_widget_pool_clause()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_query_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE QUERY
language statement, the required
following handle()
and the optional in_widget_pool_clause()
.
An undocumented feature was found where the NO-ERROR
keyword
can be added at the end of this statement.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_sax_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE SAX-READER
, CREATE SAX-WRITER
and CREATE SAX-ATTRIBUTES
language statements and the required
following handle()
. Also uses in_widget_pool_clause()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_server_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE SERVER
language statement, the following
handle()
and the optional attribute_assign_clause()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_soap_header_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE SOAP-HEADER
language statement, and the
following options.
Uses:
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_soap_header_entryref_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE SOAP-HEADER
language statement, and the
following options.
Uses:
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_socket_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE SERVER-SOCKET or CREATE SOCKET
language
statements and the required following handle()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_temp_table_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE TEMP-TABLE
language statement, the required
following handle variable/field and the optional
in_widget_pool_clause()
. The lvalue()
rule and a validating
semantic predicate are used to match the handle.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_widget_pool_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE WIDGET-POOL
language statement, and the
following optional expr()
and/or KW_PERSIST
. It is
undocumented, but working 4GL code shows that it is possible to match the
KW_PERSIST
for an unnamed pool (where there is no preceding
expr
).
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_xml_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE X-DOCUMENT or CREATE X-NODEREF
language
statements and the required following handle()
. Working code has
been found that allows a KW_NO_ERROR
to optionally be present
(in both statements) and this undocumented feature is supported here.
Also uses in_widget_pool_clause()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void create_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE
language statement and implements all
following options. Calls the record(boolean, boolean, boolean)
and using_id_clause()
rules. Called by the stmt_list()
rule.antlr.RecognitionException
antlr.TokenStreamException
public final void create_widget_or_object_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE widget_type
or CREATE automation-object
language
statement, and the following options. The types of widgets supported are:
Uses:
Used by stmt_list()
. Allows the undocumented usage of
KW_NO_ERROR
at the end, which was found in working 4GL code.
antlr.RecognitionException
antlr.TokenStreamException
public final void dde_advise_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DDE ADVISE
language statement. There is always
a following expr()
and item_clause()
. There is an optional
use of time_clause()
. Used by stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void dde_execute_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DDE EXECUTE
language statement. There is always
a following expr()
and command_clause()
. There is an
optional use of time_clause()
. Used by stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void dde_get_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DDE GET
language statement. There is always
a following expr()
, source_or_target_clause(boolean)
and
item_clause()
. There is an optional use of time_clause()
.
Used by stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void dde_initiate_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DDE INITIATE
language statement. There is always
a following expr()
, frame_handle_clause()
,
application_clause()
and topic_clause()
. Used by
stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void dde_request_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DDE REQUEST
language statement. There is always
a following expr()
, source_or_target_clause(boolean)
and
item_clause()
. There is an optional use of time_clause()
.
Used by stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void dde_send_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DDE SEND
language statement. There is always
a following expr()
, source_or_target_clause(boolean)
and
item_clause()
. There is an optional use of time_clause()
.
Used by stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void dde_terminate_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DDE TERMINATE
language statement. There is always
a following expr()
. Used by stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void delete_alias_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DELETE ALIAS
language statement, and the following
database_name(boolean)
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void delete_object_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DELETE OBJECT
language statement, and the
following required 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.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void delete_procedure_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DELETE PROCEDURE
language statement, and the
following required expr()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void delete_widget_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DELETE WIDGET
language statement, and the
following required handle()
(or list thereof).
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void delete_widget_pool_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DELETE WIDGET-POOL
language statement, and the
following optional expr()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void delete_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DELETE
language statement and implements all
following options. Calls the record(boolean, boolean, boolean)
and validate(java.lang.String)
rules.
Called by the stmt_list()
rule.antlr.RecognitionException
antlr.TokenStreamException
public final void disable_triggers_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DISABLE TRIGGERS
statement, the qualifier for
DUMP or LOAD
and the associated record(boolean, boolean, boolean)
. Used by
stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void disable_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DISABLE
language statement. Calls the
all_clause()
, field_clause(boolean)
and frame_phrase(boolean, boolean)
.
The UNLESS-HIDDEN
unreserved keyword naturally conflicts with
the possible following lvalue. This is not really ambiguous so warnings
have been disabled.
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).
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void disconnect_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DISCONNECT
language statement, and the following
database_name(boolean)
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void display_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DISPLAY
language statement and builds the associated AST.
The following list of rules are called to properly implement the tree building:
lvalue()
(for stream references)
space_or_skip()
expr()
format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
aggregate_phrase()
simple_when_clause()
at_base_field_clause(boolean)
frame_phrase(boolean, boolean)
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 UNLESS-HIDDEN
and aggregate phrase. These have been reviewed and the ambiguity warnings suppressed.
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 record_spec(java.util.Set<com.goldencode.ast.Aast>)
) 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 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.
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.
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void empty_temp_table_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
EMPTY TEMP-TABLE
language statement and the
required following temp-table name as a record(boolean, boolean, boolean)
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void enable_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
ENABLE
language statement. Calls the
all_clause()
, field_clause(boolean)
and frame_phrase(boolean, boolean)
.
The UNLESS-HIDDEN
unreserved keyword naturally conflicts with
the possible following lvalue. This is not really ambiguous so warnings
have been disabled.
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).
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void export_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
EXPORT
language statement.
Calls:
lvalue()
(for stream references)
delimiter_clause()
record_spec(java.util.Set<com.goldencode.ast.Aast>)
space_or_skip()
(undocumented but silently ignored in
Progress)
export_field()
Used by stmt_list()
.
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.
Bogus ANTLR ambiguity warnings have been disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void finally_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
KW_FINALLY
block which is part of the structured
error handling added in 10.2x. This uses the block()
and
end_stmt(boolean)
sub-rules to match and build the tree. The tree will be
rooted at the KW_FINALLY
node. Variable and schema scopes are
pushed and popped in this statement.antlr.RecognitionException
antlr.TokenStreamException
public final void find_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
FIND
language statement and implements all
forms with most of the core processing delegated to the
record_phrase(boolean, boolean)
rule.
Note that one option CURRENT
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.
There is inherent ambiguity here with the use of unreserved Progress
keywords PREV, LEFT and OUTER-JOIN
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void get_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
GET
language statement, the required keywords and
query name (see query_reference()
). It supports all possible
options, in any order.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void get_key_value_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void hide_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
HIDE
language statement. Calls the
lvalue()
for stream references, widget_phrase()
and
in_window_clause()
rules.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void if_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
IF THEN ELSE
language statement. This rule uses
rule references then_clause()
and else_clause()
to properly
build the AST.
This language statement has inherent ambiguity with the built-in function
that uses the same IF THEN ELSE
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 statement()
portion
of the top-level single_block(boolean, boolean)
rule. Since this is matched before
expressions (which are in the assignment()
rule which has lower
precedence than statement
) the logic works properly and all
ambiguity is resolved.
Note that there is another inherent ambiguity in this construction. It is
the classic problem with the optional ELSE
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.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void import_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
IMPORT
language statement.
Calls:
lvalue()
(for stream references)
unformatted_clause()
delimiter_clause()
record_spec(java.util.Set<com.goldencode.ast.Aast>)
import_field()
(undocumented feature: this can be zero or more instead of
one or more as the 4GL docs indicate)
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void io_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
INPUT, INPUT-OUTPUT or OUTPUT
keywords. It matches
these keywords and then switches into the correct alternative based on the
lookahead tokens.
This rule is called by stmt_list()
and it handles the matching
unambiguously by left factoring the common keywords for multiple language
statements. The alternatives:
io_from_to_stmt()
io_through_stmt()
io_from_to_stmt()
Certain alternatives can be followed by a reference to
io_common_options(boolean, boolean)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void load_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
LOAD
language statement with a required following
expr()
. All options are supported and the following rules can
be called:
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void msg_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
MESSAGE
language statement and builds
the resulting AST nodes. The string parameter is expressed as a call
to the expr()
rule.
The following list of rules are called to properly implement the tree building:
simple_color_clause()
content_array()
view_as_alert_box_clause()
set_or_update_clause()
in_window_clause()
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).
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void next_or_leave_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
NEXT and LEAVE
language statements. Calls the
label_reference()
to resolve the optional label.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void on_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
ON
language statement (which defines a trigger
block) and implements all possible variants.
Used by stmt_list()
and trigger_phrase()
.
The use of the event
rule in the leftmost token position
is naturally ambiguous with the use of the comma_event_list
since this also has an event
in the leftmost position.
In this case, ANTLR does not detect any ambiguity since the first
alternative (event
) must be followed by a match with the
very specific key_function
rule, so the k = 2 is enough to
disambiguate this situation.
Uses:
db_event()
record(boolean, boolean, boolean)
lvalue()
write_referencing_phrase(com.goldencode.ast.Aast)
assign_trigger_old_var_def(com.goldencode.ast.Aast)
event()
comma_event_list()
key_function()
comma_widget_list()
comma_events_of_widgets_clause()
persistent_trigger_procedure()
single_block(boolean, boolean)
(this is the actual implementation for
the Progress trigger block)
This is the location in which we add and remove scopes to the symbol dictionary for trigger blocks.
Bogus ambiguity warnings by ANTLR have been disabled. One of the warnings
started when the record_funcs()
rule was added to
primary_expr()
, as it creates apparent ambiguity with the
referencing_phrase
. The ambiguity is not real.
antlr.RecognitionException
antlr.TokenStreamException
public final void open_query_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
OPEN QUERY
language statement and all possible
options. Uses:
malformed_symbol()
for_or_preselect_clause()
max_rows_clause()
collate_clause()
by_clause()
query_tuning_phrase()
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void os_misc_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
OS-APPEND, OS-COPY and OS-RENAME
language
statements. Calls external_name_spec()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void os_create_dir_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void os_delete_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
OS-DELETE
language statement. Calls value()
and filename()
rules.
The use of the filename
rule in a loop is in conflict with
the non-reserved RECURSIVE
keyword. For this reason, the
loop has be made non-greedy and the bogus ambiguity warnings have been
disabled.
Supports an undocumented NO-ERROR
keyword at the end.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void page_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
PAGE
language statement. Optionally calls the
lvalue()
rule for stream references.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void pause_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
PAUSE
language statement. Calls the
in_window_clause()
and simple_message_clause()
rules.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void publish_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
PUBLISH
language statement, the required
following character expr()
and all options. Uses the
from_handle_clause()
and param_passing_list(boolean)
rules.
Called from stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void put_screen_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
PUT SCREEN
language statement. Calls the
simple_color_clause()
, ui_stuff()
and expr()
.
The ui_stuff
rule uses unreserved keywords that naturally
conflict with the possible following expression. This is not really
ambiguous so warnings have been disabled.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void put_cursor_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
PUT CURSOR
language statement and builds the
associated AST. Calls ui_stuff()
for the ROW and COL options.
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void put_key_value_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void put_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
PUT
language statement and builds the
associated AST.
The following list of rules are called to properly implement the tree building:
lvalue()
(for stream references)
space_or_skip()
null_clause()
put_field()
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void raw_transfer_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void readkey_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
READKEY
language statement. Optionally calls the
lvalue()
(for stream references) and pause_clause()
rules.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void release_external_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
RELEASE EXTERNAL
language statement, and the following required
expr()
. This also supports the use of NO-ERROR (undocumented 4GL feature).
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void release_object_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
RELEASE OBJECT
language statement, and the
following required expr()
. The Progress documentation states that
it should be a COM-HANDLE
, but does not state whether this is
allowed to be any expression that evaluates to a COM-HANDLE
.
Customer source code shows that any expression will work.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void release_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
RELEASE
language statement. Calls the
record(boolean, boolean, boolean)
.
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
SymbolResolver.deleteSchemaScope(boolean)
as well as notify the
inner_block(boolean, com.goldencode.ast.Aast)
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.
Called by the stmt_list()
rule.
antlr.RecognitionException
antlr.TokenStreamException
public final void reposition_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
REPOSITION
language statement, the required
following query name (see query_reference()
) and repositioning
information. Uses to_recid_or_rowid_clause()
and
reposition_spec()
rules.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void return_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
RETURN
statement using a rule reference
to 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 DOT
to be visible as a standalone language
statement when called from this rule. The return_core
rule
can also be called as a component of another language statement rather than
a statement that requires such a separator.antlr.RecognitionException
antlr.TokenStreamException
public final void routine_level_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
KW_ROUTINEL
keyword with a following on_event_phrase()
.antlr.RecognitionException
antlr.TokenStreamException
public final void run_stored_proc_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
RUN STORED-PROCEDURE
language statement, the
following reserved_or_symbol()
, the optional assign()
and optional param_passing_list(boolean)
. The result will be rooted at a
RUN_STORED_PROCEDURE
node. Called from stmt_list()
.
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 proc-text
and
proc-text-buffer
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 closeallprocs
procedure that is
the equivalent to calling close_stored_proc_stmt()
on all currently
open stored procedures.
antlr.RecognitionException
antlr.TokenStreamException
public final void run_super_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
RUN SUPER
statement with an optional following
parameter list (see param_passing_list(boolean)
). The resulting tree will be
rooted at a RUN_SUPER
node. Called from stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void run_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
RUN
language statement with all of its
options and builds the resulting AST. This rule relies heavily upon
lexer support in the ProgressLexer.mSYMBOL(boolean)
rule and upon the
filename()
rule for handling the required 2nd token (the external
procedure name, internal procedure name or library reference). The
value()
rule is also called in the case of the user providing
an expression to specify the name.
Although the Progress documentation does not say so, it is possible to
specify the target to run as a string without using the VALUE
construct. This is supported.
It is possible for the parser to identify something as a
FILENAME
when it really is a INT_PROC
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.
Most of the optional constructs are matched in the following rule
references: persist_clause()
, on_server_clause()
,
in_procedure_clause()
, trans_distinct_clause()
,
set_handle()
or asynch_clause()
. Doing this allows the AST
to be built cleanly.
Note that the manner in which the PERSISTENT, ON SERVER and IN
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 ASYNCHRONOUS
clause,
TRANSACTION DISTINCT
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.
As an undocumented feature, Progress allows any number of
NO-ERROR
keywords to be placed at the end of the statement,
with more than 1 being equivalent to having just 1 keyword.
In a VALUE()
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 PROPATH
) is done to
ensure that the filename is valid. Internal procedures specified via
a name (i.e. not using VALUE()
) are detected and the
subsequent token type is set to INT_PROC
.
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 reserved_or_symbol()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void save_cache_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SAVE CACHE
language statement, and the following
current_or_complete_clause()
, value()
or filename()
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void scroll_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SCROLL
language statement. Calls the
frame_phrase(boolean, boolean)
.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void seek_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SEEK
language statement.
Calls lvalue()
(for stream references) and expr()
rules.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void shell_command_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
UNIX, DOS, OS2, BTOS, CTOS and VMS
) and the generic shell
command OS-COMMAND
constructs including matching all possible
command tokens up to a following DOT
.
This rule is unusual because it accepts an arbitrary list of any possible
or arbitrary token except the DOT
. Any of these constructs
can be a value()
rule which allows Progress expressions to be
evaluated and the results used as part of the command token list.
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.
Limitations of this rule include:
DOT
is used as the termination character for the
command token list so one can only pass a '.' inside a valid
Progress string.
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.
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void status_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void subscribe_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SUBSCRIBE
language statement, the required
following character expr()
and all options. Uses the
proc_handle_clause()
, in_procedure_clause()
and
run_proc_clause()
rules.
Called from stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void super_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SUPER
statement with an optional following
parameter list (see param_passing_list(boolean)
). The resulting tree will be
rooted at a KW_SUPER
node. Called from stmt_list()
.
This must be the first statement used in a constructor()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void system_dialog_color_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SYSTEM-DIALOG COLOR
statement and all following
options. Uses expr()
, update_logical_clause()
and
in_window_handle_clause()
. Called by stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void system_dialog_font_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SYSTEM-DIALOG FONT
statement and all following
options. Uses expr()
, update_logical_clause()
,
min_max_size_clause()
and in_window_handle_clause()
.
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void system_dialog_get_dir_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SYSTEM-DIALOG GET-DIR
statement and all following options. Uses
lvalue()
, initial_dir_clause()
and title_clause()
.
This can also match an update_logical_clause()
and/or in_window_handle_clause()
which are both undocumented features which were found in customer applications.
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void system_dialog_get_file_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SYSTEM-DIALOG GET-FILE
statement and all
following options. Uses:
lvalue()
update_logical_clause()
,
filters_clause()
title_clause()
default_extension_clause()
initial_dir_clause()
in_window_handle_clause()
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void system_dialog_printer_setup_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SYSTEM-DIALOG PRINTER-SETUP
statement and all
following options. Uses expr()
, update_logical_clause()
,
num_copies_clause()
and in_window_handle_clause()
.
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void system_help_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SYSTEM-HELP
statement and all following options.antlr.RecognitionException
antlr.TokenStreamException
public final void terminal_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
TERMINAL
language statement. Calls the
expr()
rule.
The TERMINAL
keyword to the right side of the equals sign
is ambiguous with the TERMINAL
function/variable that can
be reached by the following expression. This isn't really a problem so
ambiguity warnings are disabled.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void this_object_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
THIS-OBJECT
statement with an optional following
parameter list (see param_passing_list(boolean)
). The resulting tree will be
rooted at a KW_THIS_OBJ
node. Called from stmt_list()
.
This must be the first statement used in a constructor()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void trigger_procedure_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
TRIGGER PROCEDURE
language statement. All forms
(CREATE
, DELETE
, FIND
, WRITE
and
ASSIGN
, and the replication as well) are supported. Uses the
following rules to parse:
record(boolean, boolean, boolean)
write_referencing_phrase(com.goldencode.ast.Aast)
lvalue()
assign_trigger_old_var_def(com.goldencode.ast.Aast)
Called by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void transaction_mode_auto_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
TRANSACTION-MODE AUTOMATIC
statement. Used by
stmt_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void underline_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
UNDERLINE
language statement. Calls the
lvalue()
(for an optional stream reference), lvalue_list(java.util.Set<com.goldencode.ast.Aast>)
for the list of widgets and frame_phrase(boolean, boolean)
rules.
As an undocumented feature of Progress, the list of widgets can be missing! In this case, the language statement is essentially a NOP.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void undo_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
UNDO
statement, but some logic is
delegated to a shared rule undo_core()
which is also used by
on_event_phrase()
. Since the throw_clause()
is not
common with the on_event_phrase
, that sub-rule is separately
referenced.antlr.RecognitionException
antlr.TokenStreamException
public final void unload_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void unsubscribe_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
UNSUBSCRIBE
language statement, the required
following character expr()
and all options. Uses the
proc_handle_clause()
and in_procedure_clause()
rules.
Called from stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void up_or_down_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
UP
or DOWN
language statements.
Optionally calls the lvalue()
(for stream references) and may
have expr()
and frame_phrase(boolean, boolean)
"options".
Options can be specified in any order.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void use_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void validate_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
VALIDATE
language statement. Calls the
record(boolean, boolean, boolean)
rule.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void view_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
VIEW
language statement. Optionally calls the
lvalue()
(for stream references), widget_phrase()
and
in_window_clause()
rules.
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.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void wait_for_dotnet_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
WAIT-FOR
language statement.
It calls expr()
and set_lvalue()
. This is ambiguous with
the wait_for_stmt()
but that ambiguity must be resolved in the
caller using semantic predicates.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void wait_for_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
WAIT-FOR
language statement. Calls the
events_of_widgets_clause()
, pause_clause()
and
focus_clause()
rules.
Options can be specified in any order.
ANTLR reports bogus ambiguity, the code doesn't really have a problem so warnings have been disabled.
Note that there is a real ambiguous situation since the FOCUS
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 OF
keyword. In the case where the
FOCUS
option immediately follows a widget list, the
FOCUS
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.
Another real ambiguous situation (resolved by ordering of alternatives)
is that the PAUSE, FOCUS or EXCLUSIVE-WEB-USER
will be
matched before the event list. Otherwise, such constructs can not be
matched at all. This means that a PAUSE
event (if there is
such a thing) can't be matched.
Used by stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void embedded_sql() throws antlr.RecognitionException, antlr.TokenStreamException
SELECT
statement used directly in 4GL code in order to obtain a count of records
from a given table.antlr.RecognitionException
antlr.TokenStreamException
public final void empty_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
NOP
. Strangely, an optional
NO-LOCK
, SHARE-LOCK
or
EXCLUSIVE-LOCK
keyword can be present. If a locking keyword
is present, then NO-ERROR
can also be optionally specified
(after the locking keyword).antlr.RecognitionException
antlr.TokenStreamException
public final void p2j_open_url_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
P2J-OPEN-URL
and a mandatory
following character expression.antlr.RecognitionException
antlr.TokenStreamException
public final void preselect_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
PRESELECT
keyword and use rule references to implement
a more natural tree structure. See each_first_last_spec(boolean, boolean)
,
by_clause()
and collate_clause()
for more details.
Used by do_repeat_stmt()
and similar code is inlined in the
for_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final Aast common_block_options() throws antlr.RecognitionException, antlr.TokenStreamException
FOR, DO or REPEAT
Progress 4GL
language statement can implement.
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.
Bogus ANTLR ambiguity warnings have been disabled.
Called by for_stmt()
and do_repeat_stmt()
.
Uses:
query_tuning_phrase()
while_clause()
on_event_phrase()
loop_incr()
collate_clause()
sort_order_clause()
frame_phrase(boolean, boolean)
down_clause_or_loop_incr()
null
there is nothing to do.antlr.RecognitionException
antlr.TokenStreamException
public final void each_first_last_spec(boolean force, boolean noProp) throws antlr.RecognitionException, antlr.TokenStreamException
preselect_phrase()
,
for_or_preselect_clause()
and in the for_stmt()
for
specifying one or more record_phrase(boolean, boolean)
specifications and
optionally prefixing the phrase with the EACH, FIRST or LAST
keywords.force
- true
to force promotion even if the record was
already previously promoted.noProp
- true
to force any promoted nodes to have their
no propagate flag set. This disables propagation of these
nodes across the current scope boundary.antlr.RecognitionException
antlr.TokenStreamException
public final void while_clause() throws antlr.RecognitionException, antlr.TokenStreamException
WHILE
keyword. The keyword is always followed by an expression.
Used by do_repeat_stmt()
and for_stmt()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void on_event_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
ON { ENDKEY | ERROR | QUIT | STOP } UNDO
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.
The core logic is shared with the UNDO
statement and
implemented in a shared rule undo_core()
. The exception to this
is the KW_THROW
option which is different (and thus is matched
separately.
Used from do_repeat_stmt()
and for_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void query_tuning_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
Used by do_repeat_stmt()
and for_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void collate_clause() throws antlr.RecognitionException, antlr.TokenStreamException
COLLATE
keyword and the required following
2 or 3 character expressions. The tree is rooted on the
COLLATE
keyword and all parenthesis and commas are
dropped from the tree. The resulting tree will have 2 or 3 children,
each an expression.
Used by preselect_phrase()
and the subtree is rooted by the
keyword (which is the reason for using a separate rule for something so
simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void sort_order_clause() throws antlr.RecognitionException, antlr.TokenStreamException
BY
keyword, the required following expression
and the optional DESCENDING
keyword.
Used by open_query_stmt()
and common_block_options()
rules.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void loop_incr() throws antlr.RecognitionException, antlr.TokenStreamException
TO
keyword and optionally the BY
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 TO
keyword will be an assign()
(which is rooted by an
ASSIGN
token that has an lvalue and expression as children.
The next child of the TO
is the loop terminating expression
followed by the optional by_clause()
.
Used by do_repeat_stmt()
and for_stmt()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
Bogus ANTLR ambiguity warnings have been disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void assign() throws antlr.RecognitionException, antlr.TokenStreamException
ASSIGN
language statement.
The syntax is differentiated from a top level assignment()
statement by:
DOT
This is referenced from assign_stmt()
, loop_incr()
and
sub_assign_clause()
rules. It is used to implement the core
assignment logic.
A special mode exists that allows for an lvalue
prefixed
with a frame or browse reference.
Creates both operands as children of the artifically created
ASSIGN
token type (which the EQUALS
token is
replaced by).
antlr.RecognitionException
antlr.TokenStreamException
public final void then_clause() throws antlr.RecognitionException, antlr.TokenStreamException
THEN
block of an IF THEN ELSE
language statement. This rule makes a single, recursive call to the
core rule single_block(boolean, boolean)
. This allows a single statement, inner
block (DO, REPEAT or FOR
) or assignment to be included
after the THEN
. 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)!
It is possible to have an empty then block if the next statement is
END
or if the end of file is reached. Progress tolerates
this syntax silently.
Used by if_stmt()
and when_clause()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void else_clause() throws antlr.RecognitionException, antlr.TokenStreamException
ELSE
block of an IF THEN ELSE
language statement. This rule makes a single, recursive call to the
core rule single_block(boolean, boolean)
. This allows a single statement, inner
block (DO, REPEAT or FOR
) or assignment to be included
after the ELSE
. 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)!
It is legal for this block (which follows the ELSE
keyword)
to be missing. For this reason, the call to single_block
was made optional. As usual, bogus ANTLR ambiguity warnings are disabled.
Used by if_stmt()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void when_clause() throws antlr.RecognitionException, antlr.TokenStreamException
WHEN
block of a CASE
language statement. After matching the list of possible expressions using
the simple_when_clause()
rule reference, this rule makes a single
call to the then_clause()
.
Used by case_stmt()
.
Note that there is an ambiguity caused between the OR
keyword
implemented in expr()
and by the use of the OR
keyword in a WHEN
clause (additional WHEN conditions can
be added to the same statement using an OR WHEN condition
syntax). Since the following condition is an expression, one must detect
the use of the following WHEN
as the next token after the
OR
to disambiguate. The expr
rule which
implements the logical OR
processing thus uses a semantic
predicate to terminate expression processing (and not match on the
OR
in the case where lookahead 2 is the reserved keyword
WHEN
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void otherwise() throws antlr.RecognitionException, antlr.TokenStreamException
OTHERWISE
block of a CASE
language statement. This rule makes a single, recursive call to the
core rule single_block(boolean, boolean)
. This allows a single statement, inner
block (DO, REPEAT or FOR
) or assignment to be included
after the THEN
. 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)!
Used by case_stmt()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void record_phrase(boolean force, boolean noProp) throws antlr.RecognitionException, antlr.TokenStreamException
record(boolean, boolean, boolean)
) and optional include or exclude
list of fields is provided (field_list()
). Uses the
literal()
rule to match the optional constant that follows the
field list. The join_clause()
, of_clause()
,
where_clause()
, using_clause()
and 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.
The join clause is only here for use by each_first_last_spec(boolean, boolean)
and
not by find_stmt()
. Likewise the NO-WAIT and NO-ERROR
keywords are only here for FIND
. Otherwise this single
rule properly handles both cases.
Note that the use of unreserved keywords for OUTER-JOIN
and
LEFT
can cause ambiguity when k == 2 between the join_clause
and the of_clause (which includes the 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.
force
- true
to force promotion even if the record was
already previously promoted.noProp
- true
to force any promoted nodes to have their
no propagate flag set. This disables propagation of these
nodes across the current scope boundary.antlr.RecognitionException
antlr.TokenStreamException
public final void alter_table_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
ALTER TABLE
directly in 4GL code. Called from
embedded_sql()
and uses the following rules:
antlr.RecognitionException
antlr.TokenStreamException
public final void close_cursor_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void create_index_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE INDEX
statement with a following
symbol()
, record(boolean, boolean, boolean)
and one or more lvalue()
.
Called from embedded_sql()
.antlr.RecognitionException
antlr.TokenStreamException
public final void create_table_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE TABLE
directly in 4GL code. Called from
embedded_sql()
and uses the following rules:
antlr.RecognitionException
antlr.TokenStreamException
public final void create_view_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CREATE VIEW
directly in 4GL code. Called from
embedded_sql()
and uses the following rules:
antlr.RecognitionException
antlr.TokenStreamException
public final void declare_cursor_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DECLARE CURSOR
directly in 4GL code. Called from
embedded_sql()
and uses the following rules:
antlr.RecognitionException
antlr.TokenStreamException
public final void delete_from_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DELETE FROM
directly in 4GL code. Called from
embedded_sql()
and uses the following rules:
antlr.RecognitionException
antlr.TokenStreamException
public final void drop_index_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void drop_table_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DROP TABLE
directly in 4GL code. Called from
embedded_sql()
and uses record(boolean, boolean, boolean)
.antlr.RecognitionException
antlr.TokenStreamException
public final void drop_view_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void fetch_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void grant_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
GRANT
directly in 4GL code. Called from
embedded_sql()
. Uses sql_update_rights()
,
sql_on_table()
and sql_to_from_users()
.antlr.RecognitionException
antlr.TokenStreamException
public final void insert_into_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
INSERT INTO
directly in 4GL code. Called from
embedded_sql()
. Uses record(boolean, boolean, boolean)
, select_stmt()
,
sql_simple_column_list()
and sql_value_list()
.antlr.RecognitionException
antlr.TokenStreamException
public final void open_cursor_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void revoke_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
REVOKE
directly in 4GL code. Called from
embedded_sql()
. Uses sql_update_rights()
,
sql_on_table()
and sql_to_from_users()
.antlr.RecognitionException
antlr.TokenStreamException
public final void union_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
UNION
statement which can be the same as a
simple select_stmt()
, or it can contain a nested set of select
statements joined by the UNION
keyword. There is no limit
to the number of select statements joined in a union. Note that if a
union is active, then any sql_order_by()
clause will attach to
the top-level union statement node rather than to any of the select
statements. Called by embedded_sql()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_update_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
UPDATE
statement. Uses record(boolean, boolean, boolean)
,
sql_assign_list()
, where_clause()
and
where_current_of()
. Called by embedded_sql()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_column_def() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_column_spec(boolean root) throws antlr.RecognitionException, antlr.TokenStreamException
symbol()
and the following data type
as sql_data_type()
. Called by sql_column_def()
and
create_table_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_unique_index() throws antlr.RecognitionException, antlr.TokenStreamException
UNIQUE
followed by a parenthesized list of column
names using sql_column_list()
. This is a unique index definition.
Called by create_table_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_name_list(boolean root) throws antlr.RecognitionException, antlr.TokenStreamException
symbol()
. Called
by sql_unique_index()
and create_view_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void select_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void where_clause() throws antlr.RecognitionException, antlr.TokenStreamException
WHERE
keyword and the required following
expression. Note that the expression processing that is exposed via the
expr()
rule has been modified to support the CONTAINS
operator. This operator is specific in usage to the where clause and
follows a form of:
field CONTAINS expression
This support is implemented in compare_expr()
which means that
the CONTAINS
operator has the same precedence as operators
BEGINS, MATCHES
and other comparisons. For more details on
how CONTAINS
works, please see page 960 in the Progress 4GL
language reference. Note that placing the operator support inside the
general purpose expression processing was required to resolve
ambiguity! This makes sense since CONTAINS
is an
operator and thus its operands are naturally conflicting with other
operators. The ambiguity would be a problem in certain cases (invoving
the LBRACKET
array syntax in lvalue()
if we attempted
to separate the CONTAINS
processing into this location.
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 WHERE
must be ignored). This
feature causes ambiguity warnings which have been disabled.
Used by record_phrase(boolean, boolean)
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void where_current_of() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_into() throws antlr.RecognitionException, antlr.TokenStreamException
INTO
clause and the following list
of variables (uses lvalue()
and sql_indicator_var()
).antlr.RecognitionException
antlr.TokenStreamException
public final void sql_update_rights() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_on_table() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_to_from_users() throws antlr.RecognitionException, antlr.TokenStreamException
TO
or FROM
rights option with a list
of users as symbol()
or the keyword PUBLIC
. Used by
grant_stmt()
and revoke_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_simple_column_list() throws antlr.RecognitionException, antlr.TokenStreamException
insert_into_stmt()
. Uses
lvalue()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_value_list() throws antlr.RecognitionException, antlr.TokenStreamException
insert_into_stmt()
. Uses
expr()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_column_list() throws antlr.RecognitionException, antlr.TokenStreamException
select_stmt()
. Uses sql_individual_column()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_from() throws antlr.RecognitionException, antlr.TokenStreamException
FROM
clause and the following
sql_table_spec()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_group_by() throws antlr.RecognitionException, antlr.TokenStreamException
GROUP BY
specification and its following
list of comma separated expr()
. Called by select_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_having() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_order_by() throws antlr.RecognitionException, antlr.TokenStreamException
ORDER BY
specification and its following
list of comma separated expr()
and optional
sql_direction_spec()
. Called by select_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_assign_list() throws antlr.RecognitionException, antlr.TokenStreamException
sql_update_stmt()
which are rooted at a SET
keyword.antlr.RecognitionException
antlr.TokenStreamException
public final void sub_select_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
WHERE
clause.antlr.RecognitionException
antlr.TokenStreamException
public final void in_operator_sub_select_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
WHERE
clause that is based on the
IN
operator.antlr.RecognitionException
antlr.TokenStreamException
public final void in_operator_parms() throws antlr.RecognitionException, antlr.TokenStreamException
IN
operator.antlr.RecognitionException
antlr.TokenStreamException
public final void sum_expr() throws antlr.RecognitionException, antlr.TokenStreamException
PLUS
and MINUS
operators (for all data types,
even the non-numeric uses for dates or string concatenation).
This is only called by the 4th level compare_expr()
rule. This
method subsequently calls the prod_expr()
rule.
There is a bogus ambiguity warning generated by this rule (which occurs
because of the addition of the special IF THEN ELSE
function
(see if_func()
) in the primary_expr()
rule. No real ambiguity
seems to exist and no errors can be found, so warnings have been disabled.
See the top level expression parsing rule expr()
for more details.
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_assign() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_value() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_column_options() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_data_type() throws antlr.RecognitionException, antlr.TokenStreamException
CHARACTER DECIMAL DATE DOUBLE FLOAT INTEGER LOGICAL NUMERIC REAL SMALLINT
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_default_value() throws antlr.RecognitionException, antlr.TokenStreamException
DEFAULT
keyword and the following literal. Used
by sql_column_options()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_not_null() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_data_option() throws antlr.RecognitionException, antlr.TokenStreamException
sql_data_type()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_individual_column() throws antlr.RecognitionException, antlr.TokenStreamException
sql_column_list()
. Uses expr()
, format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
and
any_non_reserved_symbol()
. The symbol processing is needed to
match on qualified field names that reference aliased table names
(a "SQL correlation name").antlr.RecognitionException
antlr.TokenStreamException
public final void sql_aggregate_funcs() throws antlr.RecognitionException, antlr.TokenStreamException
AVG COUNT MAX MIN SUM
antlr.RecognitionException
antlr.TokenStreamException
public final void sql_table_spec() throws antlr.RecognitionException, antlr.TokenStreamException
record(boolean, boolean, boolean)
and an optional following
sql_correlation_name(java.lang.String)
. Used from sql_from()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_explicit_join() throws antlr.RecognitionException, antlr.TokenStreamException
sql_table_spec()
and
sql_join_condition()
. Used by sql_from()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_join_condition() throws antlr.RecognitionException, antlr.TokenStreamException
ON
followed by an expr()
which is a SQL
join condition. Separated to build the tree properly.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_correlation_name(java.lang.String rtext) throws antlr.RecognitionException, antlr.TokenStreamException
symbol()
) in an sql_table_spec()
and creates a new buffer for the given table name.rtext
- The table which is getting an alias.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_indicator_var() throws antlr.RecognitionException, antlr.TokenStreamException
sql_into()
.
Uses lvalue()
.antlr.RecognitionException
antlr.TokenStreamException
public final void sql_direction_spec() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void recid_or_rowid() throws antlr.RecognitionException, antlr.TokenStreamException
RECID or ROWID
keywords and the following
expression inside parenthesis. Calls expr()
and is called by
create_stmt()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void assign_type_syntax_stmt_list() throws antlr.RecognitionException, antlr.TokenStreamException
CURRENT-LANGUAGE FRAME-VALUE PROMSGS PROPATH
These statements are referenced:
current_value_stmt()
dynamic_current_value_stmt()
dynamic_new_stmt()
entry_stmt()
extent_stmt()
fix_codepage_stmt()
length_stmt()
overlay_stmt()
put_memptr_stmt()
raw_stmt()
set_byte_order_stmt()
set_pointer_value_stmt()
set_size_stmt()
substring_stmt()
This rule is consolidated to allow these constructs to be accessed from
lvalue()
which allows then to be in an assign_stmt()
which
actually calls this rule via assign()
. Top level use of these as
a language statement is handled via the assignment()
rule which
also handles the matching for the EQUALS
and following
expr()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void current_value_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
CURRENT-VALUE
language statement. Calls
sequence_ref()
and database_name(boolean)
rules.
Used by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void dynamic_current_value_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DYNAMIC-CURRENT-VALUE
language statement. Calls
sequence_ref()
and database_name(boolean)
rules.
Used by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void dynamic_new_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
DYNAMIC-NEW
statement which looks like an
assignment, allowing new object instances to be instantiated using a
runtime (dynamic) choice of the class. Uses func_call_parameters(boolean)
and is called from assign_type_syntax_stmt_list()
which means
that the leftmost lvalue EQUALS
is factored out.antlr.RecognitionException
antlr.TokenStreamException
public final void entry_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
ENTRY
language statement. Calls expr()
,
and lvalue()
rules.
Used by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void extent_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void fix_codepage_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
FIX-CODEPAGE
language statement. Calls the
lvalue()
rule.
Used by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void length_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
LENGTH
language statement. Calls lvalue()
.
It turns out is NOT an Oracle-only statement, contrary to the documentation.
Used by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void overlay_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
OVERLAY
language statement. Calls expr()
,
and lvalue()
rules.
Used by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void substring_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
SUBSTRING( , , , ) = expression
language
statement. This rule uses a rule reference to process expressions
for what appear to be comma-separated parameters (see expr()
).
Some tokens are suppressed and the EQUALS
token is processed
in the calling rule. The resulting AST should be easy to process.
This language statement has inherent ambiguity with the built-in function
that uses the same SUBSTRING
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 lvalue()
portion of the top-level 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.
Used by assign_type_syntax_stmt_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void external_name_spec() throws antlr.RecognitionException, antlr.TokenStreamException
filename()
, a
STRING
or a value()
can be matched.
Called by compile_stmt()
, into_directory_clause()
,
save_cache_stmt()
and io_through_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void compile_options_clause() throws antlr.RecognitionException, antlr.TokenStreamException
Calls:
embedded_assign()
into_directory_clause()
external_name_spec()
optional_listing_clause()
expr()
languages_clause()
Used by compile_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void into_directory_clause() throws antlr.RecognitionException, antlr.TokenStreamException
INTO
keyword followed by a directory name.
Calls external_name_spec()
.
Used by compile_options_clause()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void optional_listing_clause() throws antlr.RecognitionException, antlr.TokenStreamException
APPEND, PAGE-SIZE and PAGE-WIDTH
keywords
followed by an embedded_assign()
or an expr()
.
Used by compile_options_clause()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void languages_clause() throws antlr.RecognitionException, antlr.TokenStreamException
LANGUAGES
keyword and a parenthesized,
comma-separated list of language_list()
entries. This can be
followed by an embedded_assign()
option.
Used by compile_options_clause()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void language_list() throws antlr.RecognitionException, antlr.TokenStreamException
LANGUAGES
. Each
language is matched by a expr()
.
Used by languages_clause()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void widget_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
FIELD
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 widget()
rule which really delegates
its work to lvalue()
.
The INPUT
keyword can be optionally inserted between the
TO
and the widget. This is undocumented and has no discernable
semantic meaning so it is dropped from the tree. If the INPUT
keyword does exist, then it can be followed by an optional
frame_reference(boolean)
which can't normally exist in front of the
widget.
Called from hide_stmt()
, view_stmt()
, widget_list()
comma_widget_list()
and focus_clause()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void simple_message_clause() throws antlr.RecognitionException, antlr.TokenStreamException
MESSAGE STRING or NO-MESSAGE
clause used in the
PAUSE
language statement. Called by pause_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void all_clause() throws antlr.RecognitionException, antlr.TokenStreamException
ALL
keyword and an optional list of fields
that should not be included. Calls the widget_array()
rule.
Used by disable_stmt()
and enable_stmt()
.
This is a separate rule to centralize logic and build the AST properly.
antlr.RecognitionException
antlr.TokenStreamException
public final void field_clause(boolean enableWidget) throws antlr.RecognitionException, antlr.TokenStreamException
WHEN
condition.
Calls the widget()
and format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
rules.
Used by disable_stmt()
, enable_stmt()
and
text_clause()
.
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.
This is a separate rule to centralize logic.
enableWidget
- true
if this field clause represents a widget being enabled in a frame;
else false
.antlr.RecognitionException
antlr.TokenStreamException
public final void simple_color_clause() throws antlr.RecognitionException, antlr.TokenStreamException
COLOR
keyword and the required following color
phrase. Uses color_phrase()
. This is the simplified version of
color_spec()
.
Used by put_screen_stmt()
and choose_stmt()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void pause_clause() throws antlr.RecognitionException, antlr.TokenStreamException
PAUSE
keyword prefix and the required
following numeric expr()
.
Used by readkey_stmt()
and wait_for_stmt()
rules.
This is a separate rule to centralize logic and build the AST properly.
antlr.RecognitionException
antlr.TokenStreamException
public final void delimiter_clause() throws antlr.RecognitionException, antlr.TokenStreamException
DELIMITER
keyword and the following single
quoted character (a STRING
).
Used by export_stmt()
and import_stmt()
rules.
antlr.RecognitionException
antlr.TokenStreamException
public final void export_field() throws antlr.RecognitionException, antlr.TokenStreamException
export_stmt()
. Roots an expr()
at a node of type
EXPORT_FIELD
.
Progress has an undocumented feature where format and aggregate phrases
can be attached to any expression but although a format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
and aggregate_phrase()
are matched, they are dropped from the
resulting tree since in Progress they are silently ignored.
antlr.RecognitionException
antlr.TokenStreamException
public final void unformatted_clause() throws antlr.RecognitionException, antlr.TokenStreamException
UNFORMATTED
keyword and the following record(boolean, boolean, boolean)
or
lvalue()
. The record case is an undocumented feature of the 4GL.
Another undocumented feature (found in customer source code) is that a CARET can be inserted
before the lvalue
. 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.
Used by import_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void import_field() throws antlr.RecognitionException, antlr.TokenStreamException
import_stmt()
. Roots an lvalue()
at a node of type
IMPORT_FIELD
.antlr.RecognitionException
antlr.TokenStreamException
public final void buffer_or_field_spec() throws antlr.RecognitionException, antlr.TokenStreamException
BUFFER or FIELD
keyword and
the required following buffer (record(boolean, boolean, boolean)
) or field lvalue()
.
These two alternatives are disambiguated by semantic predicate.
Bogus ANTLR ambiguity warnings have been disabled.
Used by raw_transfer_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void from_lob_source() throws antlr.RecognitionException, antlr.TokenStreamException
FROM
specification of copy_lob_stmt()
using
lob_spec(boolean)
, starting_clause()
and for_clause()
. The
result is always rooted at a KW_FROM
, even though that keyword
is optional in the 4GL (a token will be manufactured if needed).antlr.RecognitionException
antlr.TokenStreamException
public final void to_lob_target() throws antlr.RecognitionException, antlr.TokenStreamException
TO
specification of copy_lob_stmt()
using
lob_spec(boolean)
. The result is always rooted at a KW_TO
.antlr.RecognitionException
antlr.TokenStreamException
public final void codepage_convert_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
NO-CONVERT
or a CONVERT
followed by
two source_or_target_clause(boolean)
references. Called by
io_options(boolean, boolean)
and copy_lob_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void lob_spec(boolean to) throws antlr.RecognitionException, antlr.TokenStreamException
expr()
(optionally prepended with the KW_OBJECT
) or a KW_FILE
followed by
an expr()
. If to
is true
then overlay_clause()
or
KW_APPEND
can be optionally matched at the end. Used by from_lob_source()
and to_lob_target()
.antlr.RecognitionException
antlr.TokenStreamException
public final void starting_clause() throws antlr.RecognitionException, antlr.TokenStreamException
STARTING
keyword followed by AT
(which is dropped from the tree) and an expr()
. Used by
from_lob_source()
.antlr.RecognitionException
antlr.TokenStreamException
public final void for_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void overlay_clause() throws antlr.RecognitionException, antlr.TokenStreamException
OVERLAY
keyword followed by AT
(which is dropped from the tree) and an expr()
. KW_TRIM
is optionally matched at the end. Used by lob_spec(boolean)
.antlr.RecognitionException
antlr.TokenStreamException
public final void sequence_ref() throws antlr.RecognitionException, antlr.TokenStreamException
symbol()
and
converts that token into a properly formatted STRING
.antlr.RecognitionException
antlr.TokenStreamException
public final void database_name(boolean physical) throws antlr.RecognitionException, antlr.TokenStreamException
VALUE( expr )
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 connect_stmt()
, create_alias_stmt()
and delete_alias_stmt()
rules.physical
- If true, the name could be a physical filename, otherwise it is
a logical database name.antlr.RecognitionException
antlr.TokenStreamException
public final void sequence_funcs() throws antlr.RecognitionException, antlr.TokenStreamException
current-value
, dynamic-current-value
,
dynamic-next-value
and next-value()
function
calls. The root node returned will be a FUNC_INT
or a
FUNC_INT64
and there will be 1 or 2 children which are
STRING
nodes.
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'.
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 SymbolResolver
class.
See SymbolResolver.lookupFunction(java.lang.String)
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void lvalue_list(java.util.Set<Aast> fields) throws antlr.RecognitionException, antlr.TokenStreamException
lvalue()
and roots everything at a node of type
CONTENT_ARRAY
. An undocumented feature of Progress is that each lvalue can
optionally be followed by a format phrase (using the format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
rule).fields
- Set into which all database field references should be stored.antlr.RecognitionException
antlr.TokenStreamException
public final void simple_on_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
ON
statement which
is only seen in a trigger_phrase()
Progress construct. See
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.
This is the location in which we add and remove scopes to the symbol dictionary for trigger blocks.
Bogus ANTLR ambiguity warnings have been suppressed.
antlr.RecognitionException
antlr.TokenStreamException
public final void comma_event_list() throws antlr.RecognitionException, antlr.TokenStreamException
event()
.
Used by ON.
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). 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.
antlr.RecognitionException
antlr.TokenStreamException
public final void persistent_trigger_procedure() throws antlr.RecognitionException, antlr.TokenStreamException
PERSISTENT
keyword and the following subset of
the run_stmt()
. This matches more constructs than a normal
persistent trigger could specify but this should not matter in valid
Progress code.
Used by on_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void write_referencing_phrase(Aast ref) throws antlr.RecognitionException, antlr.TokenStreamException
NEW or OLD
keywords and all following
optional or required constructs.
The 4GL documentation incorrectly specifies that for WRITE
triggers, there will be both a NEW
and OLD
keyword, but it turns out that the NEW
keyword is optional,
so the OLD
keyword can appear by itself.
This is separated to make the AST build more natural. Note that this AST could be improved further.
ref
- The record or field being referenced.antlr.RecognitionException
antlr.TokenStreamException
public final void assign_trigger_new_var_def() throws antlr.RecognitionException, antlr.TokenStreamException
trigger_procedure_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void assign_trigger_old_var_def(Aast likeRef) throws antlr.RecognitionException, antlr.TokenStreamException
Matches only OLD
branch followed by an optional VALUE
keyword
(dropped) and then the variable definition which is handled by regular_parm(com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.
If the likeRef
parameter is non-null AND this is a keyword OLD
where there is no explicit AS
or LIKE
, then this code will
implement an implicit LIKE
clause. This is an undocumented feature that
was found in customer code.
Called by trigger_procedure_stmt()
, on_stmt()
.
likeRef
- The variable or field definition to use for an implicit LIKE clause. This may be
null
.antlr.RecognitionException
antlr.TokenStreamException
public final void db_event() throws antlr.RecognitionException, antlr.TokenStreamException
DB_EVENT
with a child that is the matched token. Matches
CREATE, DELETE, FIND, WRITE and ASSIGN
keywords.
Used by on_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void event() throws antlr.RecognitionException, antlr.TokenStreamException
EVENT
with a child that is the matched
token. Calls symbol()
and other_single_char_tokens()
.
Used by event_list()
and comma_event_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void key_function() throws antlr.RecognitionException, antlr.TokenStreamException
KEY_FUNCTION
. Used by on_stmt()
.
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
Page 785 of the Progress Language Reference lists these as the only
valid key functions that can be assigned actions. 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 ON
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:
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)
antlr.RecognitionException
antlr.TokenStreamException
public final void comma_widget_list() throws antlr.RecognitionException, antlr.TokenStreamException
widget_phrase()
.
Used by ON.
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). 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.
antlr.RecognitionException
antlr.TokenStreamException
public final void comma_events_of_widgets_clause() throws antlr.RecognitionException, antlr.TokenStreamException
OR
keyword, the required comma separated event
list, OF
keyword and then a widget list. Calls
comma_event_list()
and comma_widget_list()
rules.
Used by on_stmt()
.
This is a separate rule to centralize logic and build the AST properly.
antlr.RecognitionException
antlr.TokenStreamException
public final void end_stmt_with_no_beginning() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void to_event_target() throws antlr.RecognitionException, antlr.TokenStreamException
TO widget_phrase
construct of the
apply_stmt()
. Separated to improve the tree build.antlr.RecognitionException
antlr.TokenStreamException
public final void focus_clause() throws antlr.RecognitionException, antlr.TokenStreamException
FOCUS
keyword and the required following
widget. Calls widget_phrase()
.
Used by wait_for_stmt()
.
This is a separate rule to centralize logic and build the AST properly.
antlr.RecognitionException
antlr.TokenStreamException
public final void events_of_widgets_clause() throws antlr.RecognitionException, antlr.TokenStreamException
OR
keyword prefix and the required
event list, OF
keyword and then a widget list. Calls
event_list()
and widget_list()
rules.
Used by wait_for_stmt()
.
This is a separate rule to centralize logic and build the AST properly.
Bogus ANTLR ambiguity warnings have been disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void set_lvalue() throws antlr.RecognitionException, antlr.TokenStreamException
SET handle
clause and a following lvalue()
.
Used by wait_for_dotnet_stmt()
. The subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void event_list() throws antlr.RecognitionException, antlr.TokenStreamException
event()
.
Used by wait_for_stmt()
.
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). 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.
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 OF
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 comma_event_list()
. A semantic predicate was
added to close the loop manually when the OF
keyword is
encountered.
antlr.RecognitionException
antlr.TokenStreamException
public final void widget_list() throws antlr.RecognitionException, antlr.TokenStreamException
widget_phrase()
.
Used by wait_for_stmt()
and this form has WAIT-FOR
specific logic so it may not be suitable for other use.
Bogus ANTLR ambiguity warnings have been suppressed.
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). 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.
This construct is dangerous because the loop must be manually closed.
The core issue is that a widget phrase can match a the FOCUS
system handle BUT WAIT-FOR
also uses the KW_FOCUS
for its own purposes. This means that the second and following widget
phrases must not match a FOCUS
system handle but instead must
manually close the loop and allow the calling code to match with a
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
comma_widget_list()
. A semantic predicate was added to close the
loop manually when a KW_FOCUS
is encountered.
antlr.RecognitionException
antlr.TokenStreamException
public final void other_single_char_tokens() throws antlr.RecognitionException, antlr.TokenStreamException
DOT, COLON and COMMA
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.
Matches:
EQUALS GT LT LPARENS RPARENS LBRACKET RBRACKET PLUS MINUS MULTIPLY AT CARET UNKNOWN_VAL NUM_LITERAL UNKNOWN_TOKEN
Called by event()
. USE THIS SPARINGLY, IT IS NASTY!
antlr.RecognitionException
antlr.TokenStreamException
public final void widget_array() throws antlr.RecognitionException, antlr.TokenStreamException
widget()
and roots everything
at a node of type CONTENT_ARRAY
.antlr.RecognitionException
antlr.TokenStreamException
public final void dir_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void base_key_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void section_clause() throws antlr.RecognitionException, antlr.TokenStreamException
SECTION
clause and a required expr()
.
Used by get_key_value_stmt()
and put_key_value_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void key_clause() throws antlr.RecognitionException, antlr.TokenStreamException
KEY
clause and a required expr()
or
DEFAULT
keyword. Used by get_key_value_stmt()
and put_key_value_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void value_clause() throws antlr.RecognitionException, antlr.TokenStreamException
VALUE
clause and a required expr()
.
Used by get_key_value_stmt()
and put_key_value_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void color_or_font_clause() throws antlr.RecognitionException, antlr.TokenStreamException
COLOR or FONT
clause. Used by
put_key_value_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void io_from_to_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
INPUT FROM and OUTPUT TO
language statements.
References the following:
Although it is undocumented, it is valid to use a string in place of a
file or device name (without using the VALUE
construct).
The only documented use for this is in OUTPUT TO
with the
"CLIPBOARD" but it turns out that it can be more generally
used.
This rule is called by io_stmt()
which is what matches the
INPUT and OUTPUT
keywords. This refactoring allows all I/O
statements to be supported without ambiguity.
antlr.RecognitionException
antlr.TokenStreamException
public final void io_through_stmt() throws antlr.RecognitionException, antlr.TokenStreamException
INPUT THROUGH/THRU, INPUT-OUTPUT THROUGH/THRU
and OUTPUT THROUGH/THRU
language statements.
References the following:
Although it is undocumented, it is valid to use a string in place of a
file or device name (without using the VALUE
construct).
This rule is called by io_stmt()
which is what matches the
INPUT, INPUT-OUTPUT and OUTPUT
keywords. This refactoring
allows all I/O statements to be supported without ambiguity.
antlr.RecognitionException
antlr.TokenStreamException
public final void io_common_options(boolean output, boolean thru) throws antlr.RecognitionException, antlr.TokenStreamException
IO_OPTIONS
node.
This rule is called by io_stmt()
.
output
- If true
, then this is an OUTPUT
statement. Otherwise
this is either an INPUT
or INPUT-OUTPUT
statement.thru
- If true
, then this is an INPUT THROUGH
,
INPUT-OUTPUT THROUGH
or OUTPUT THROUGH
statement.
Progress allows an undocumented NO-ERROR
keyword in this
case.antlr.RecognitionException
antlr.TokenStreamException
public final void os_dir_clause() throws antlr.RecognitionException, antlr.TokenStreamException
OS-DIR
construct with its following parenthesized
character expr()
and options.
This rule is called by io_from_to_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void printer_clause() throws antlr.RecognitionException, antlr.TokenStreamException
PRINTER
keyword with its optional following
printer name as matched by filename()
.
This rule is called by io_from_to_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void command_token_list(boolean io_options) throws antlr.RecognitionException, antlr.TokenStreamException
shell_command_stmt()
).
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). 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.
All children of the root node are one of the following types:
STRING COMMAND_TEXT KW_VALUE
The COMMAND_TEXT
node is set as the type of any matched
token which is not of the other two types. Since any token except
DOT
can be included here, these tokens MUST be rewritten
otherwise downstream processing of the resulting tree would be quite
difficult.
This rule only exists to create the proper AST, otherwise it would be much simpler to inline since the match is trivial.
io_options
- true
to avoid matching keywords that can be used
as options in one of the I/O through statements.antlr.RecognitionException
antlr.TokenStreamException
public final void io_options(boolean output, boolean thru) throws antlr.RecognitionException, antlr.TokenStreamException
value()
(this is a qualifier for MAP, undocumented feature of the 4GL)
filename()
source_or_target_clause(boolean)
literal()
value()
The use of literal and value
is made optional contrary to
the Progress documentation since customer code was found where this was
a valid construct.
Called by io_common_options(boolean, boolean)
.
output
- If true
, then this is an OUTPUT
statement. Otherwise this is either an INPUT
or
and INPUT-OUTPUT
statement.thru
- If true
, then this is an INPUT THROUGH
,
INPUT-OUTPUT THROUGH
or OUTPUT THROUGH
statement.
Progress allows an undocumented NO-ERROR
keyword in this
case.antlr.RecognitionException
antlr.TokenStreamException
public final void source_or_target_clause(boolean cp) throws antlr.RecognitionException, antlr.TokenStreamException
SOURCE or TARGET
and following codepage or field
construct which is matched as a expr()
.
This rule is called by codepage_convert_phrase()
, when it is
matching codepages and by dde_get_stmt()
or
dde_request_stmt()
or dde_send_stmt()
when matching as a
source or target field.
cp
- true
to allow the CODEPAGE
keyword
to be inserted between the SOURCE
or
TARGET
and the following expression.antlr.RecognitionException
antlr.TokenStreamException
public final void menu_reference() throws antlr.RecognitionException, antlr.TokenStreamException
MENU or SUB-MENU menu
reference seen in the
widget_qualifier()
. Other menu or sub-menu references (see
widget_phrase()
) are resolved by common/master processing in the
lvalue()
rule.
This is very similar to the submenu_descriptor()
rule but it is
much simpler. The two rules can't be used as alternatives because they
are ambiguous.
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
MENU or SUB-MENU
keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final void combo_box_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
VIEW-AS COMBO-BOX
phrase which is called from a
view_as_phrase(java.lang.String)
. Uses the following:
list_items_clause()
inner_lines_clause()
size_phrase()
tooltip_clause()
max_chars_clause()
auto_completion_clause()
All options can be specified in any order.
ANTLR detects ambiguity but there is no real problem. Warnings are disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final int simple_widget_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
VIEW-AS
clauses for
FILL-IN, TEXT and TOGGLE-BOX
. See view_as_phrase(java.lang.String)
.
Calls size_phrase()
and tooltip_clause()
rules.
ANTLR detects ambiguity but there is no real problem. Warnings are disabled.
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.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void editor_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
VIEW-AS EDITOR
phrase which is called from a view_as_phrase(java.lang.String)
.
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.
Uses the following:
size_phrase()
inner_chars_and_lines_clause()
buffer_chars_or_lines_clause()
max_chars_clause()
tooltip_clause()
ANTLR detects ambiguity but there is no real problem. Warnings are disabled.
All options can be specified in any order.
antlr.RecognitionException
antlr.TokenStreamException
public final void radio_set_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
VIEW-AS RADIO-SET
phrase which is called from a
view_as_phrase(java.lang.String)
. Uses the following:
ANTLR detects ambiguity but there is no real problem. Warnings are disabled.
All options can be specified in any order.
antlr.RecognitionException
antlr.TokenStreamException
public final void selection_list_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
VIEW-AS SELECTION-LIST
phrase which is called
from a view_as_phrase(java.lang.String)
. Uses the following:
ANTLR detects ambiguity but there is no real problem. Warnings are disabled.
All options can be specified in any order.
antlr.RecognitionException
antlr.TokenStreamException
public final void slider_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
VIEW-AS SLIDER
phrase which is called
from a view_as_phrase(java.lang.String)
. Uses the following:
ANTLR detects ambiguity but there is no real problem. Warnings are disabled.
All options can be specified in any order.
antlr.RecognitionException
antlr.TokenStreamException
public final void list_items_clause() throws antlr.RecognitionException, antlr.TokenStreamException
LIST_ITEMS
and LIST_ITEM_PAIRS
clauses as used in a
phrase from a VIEW-AS COMBO-BOX
or VIEW-AS SELECTION-LIST
construct.
See combo_box_phrase()
or selection_list_phrase()
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void inner_lines_clause() throws antlr.RecognitionException, antlr.TokenStreamException
INNER-LINES
clause as used in a phrase from a
VIEW-AS COMBO-BOX
construct. See combo_box_phrase()
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void max_chars_clause() throws antlr.RecognitionException, antlr.TokenStreamException
MAX-CHARS
clause as used in a phrase from a
VIEW-AS COMBO-BOX
construct. See combo_box_phrase()
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void auto_completion_clause() throws antlr.RecognitionException, antlr.TokenStreamException
AUTO-COMPLETION
clause as used in a phrase from a
VIEW-AS COMBO-BOX
construct. See combo_box_phrase()
.
ANTLR detects ambiguity but there is no real problem. Warnings are disabled.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void buffer_chars_or_lines_clause() throws antlr.RecognitionException, antlr.TokenStreamException
BUFFER-CHARS chars and BUFFER-LINES lines
clause
as used in a VIEW-AS EDITOR
phrase. See
view_as_phrase(java.lang.String)
and editor_phrase()
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void inner_chars_and_lines_clause() throws antlr.RecognitionException, antlr.TokenStreamException
INNER-CHARS chars INNER-LINES lines
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void radio_buttons_clause() throws antlr.RecognitionException, antlr.TokenStreamException
RADIO-BUTTONS
clause as used in a
VIEW-AS RADIO-SET
phrase. See view_as_phrase(java.lang.String)
and radio_set_phrase()
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void max_and_min_value_clause() throws antlr.RecognitionException, antlr.TokenStreamException
MAX-VALUE num
or MIN-VALUE num
clauses as used in a VIEW-AS SLIDER
phrase. See
view_as_phrase(java.lang.String)
and slider_phrase()
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void tic_marks_clause() throws antlr.RecognitionException, antlr.TokenStreamException
TIC-MARKS
clause as used in a
VIEW-AS SLIDER
phrase. See view_as_phrase(java.lang.String)
and slider_phrase()
.
ANTLR detects ambiguity but there is no real problem. Warnings are disabled.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void inner_chars_and_lines_core() throws antlr.RecognitionException, antlr.TokenStreamException
INNER-CHARS chars or INNER-LINES lines
clause as
used in a VIEW-AS EDITOR
phrase. See view_as_phrase(java.lang.String)
and editor_phrase()
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void label_reference() throws antlr.RecognitionException, antlr.TokenStreamException
inner_block(boolean, com.goldencode.ast.Aast)
.
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 malformed_symbol()
rule is used.
Since the malformed_symbol
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.
It is important to note that in the end, it is not really valid to have
a token type of SYMBOL
since this could be anything. What we
really require is a token that is a LABEL
. The result of
this rule is always rewritten to have the LABEL
type.
antlr.RecognitionException
antlr.TokenStreamException
public final void getter_setter() throws antlr.RecognitionException, antlr.TokenStreamException
GET
or SET
block of the
def_prop_stmt()
. Uses access_mode()
, param_list_definition(boolean, boolean)
,
block()
and end_stmt(boolean)
.antlr.RecognitionException
antlr.TokenStreamException
public final void event_signature() throws antlr.RecognitionException, antlr.TokenStreamException
def_event_stmt()
. Matches an optional
KW_SIGNATUR
, then a KW_VOID
followed by a
param_list_definition(boolean, boolean)
. The result is rooted at an EVENT_SIGNATURE
node. Separated from the main rule in order to build the tree properly.antlr.RecognitionException
antlr.TokenStreamException
public final void dotnet_delegate() throws antlr.RecognitionException, antlr.TokenStreamException
def_event_stmt()
.
Matches an optional KW_DELEGATE
, then an optional
KW_CLASS
followed by an user_defined_type_name()
. The
result is rooted at an DOTNET_DELEGATE
node. Separated from the
main rule in order to build the tree properly.antlr.RecognitionException
antlr.TokenStreamException
public final void initializer_constant(int vtype) throws antlr.RecognitionException, antlr.TokenStreamException
literal()
or an lvalue()
when the
TODAY
or NOW
keywords are encountered. Handles a
special case for initializer(int)
but instead of resolving to a
FUNC_DATE
or FUNC_DATETIME
we override the type
to DATE_LITERAL
, DATETIME_LITERAL
or DATETIME_TZ_LITERAL
which is consistent with the usage of this as a constant.
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 STRING
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.
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 LIKE or FORMAT
) will
determine how such strings will be converted to
BOOL_TRUE or BOOL_FALSE
. 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 STRING
is left
behind and will be handled by our 'boolean manhandling' processing later.
vtype
- A token type that describes type of the variable being initialized. This is
the type of the child of the KW_AS
or KW_LIKE
node.antlr.RecognitionException
antlr.TokenStreamException
public final void var_type(java.lang.String varName, boolean nativeTypes) throws antlr.RecognitionException, antlr.TokenStreamException
as_clause(java.lang.String, boolean)
or
directly in parameter()
.
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.
The inclusion of the 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 "pulling" the
recursive descent processing down into this rule.
It is important to note that in the end, it is not really valid to have
a token type of SYMBOL
, random keyword match or anything
other than one of the valid special abbreviations for a data type.
What we really require is a token that is one of the following:
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
The difference between a SYMBOL
and a KW_CHAR
can only be determined by context (the fact that the lookahead code has
identified a match with a SYMBOL
token which is a construct
that can occur in an this rule). Thus if a match is found using
lookahead (in the rule that calls this one), then it must be
correct and necessary to convert the SYMBOL
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 reserved_or_symbol
rule since calling that rule
would actually try to match (and consume from the token stream) a
SYMBOL
or other keyword token type. 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!
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 reserved_or_symbol
is needed because some possible reserved keyword matches could occur
that would match one of these special abbreviations and thus the
symbol
rule would not be sufficient to pull all possible
valid keyword matches into this rule.
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.
The logic of the special abbreviation processing is centralized in the specialDataTypeKeywordAbbreviations() method.
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.
varName
- Text which is the variable name that should be added to the
current scope of the variable dictionary. If null
,
no name will be added and this clause is essentially ignored.nativeTypes
- true
to support extra type keywords for native
shared library interfaces.antlr.RecognitionException
antlr.TokenStreamException
public final void temp_table_use_index(java.lang.Object table) throws antlr.RecognitionException, antlr.TokenStreamException
VALIDATE
or USE-INDEX
keywords and (in
the second case) the following index name plus optional
AS PRIMARY
construct. Used by the like_clause(java.lang.String, java.lang.Object, boolean)
on
behalf of the def_temp_table_stmt(boolean, boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
rule.
Bogus ANTLR ambiguity warnings have been disabled.
Separated to properly build the AST.
table
- The temp-table object that is being modified.antlr.RecognitionException
antlr.TokenStreamException
public final void image_size_clause() throws antlr.RecognitionException, antlr.TokenStreamException
IMAGE-SIZE, IMAGE-SIZE-CHARS and IMAGE-SIZE-PIXELS
keywords and the required following width and height. Used by
image_phrase()
and the subtree is rooted by the keyword (which is
the reason for using a separate rule for something so simple).antlr.RecognitionException
antlr.TokenStreamException
public final void from_clause() throws antlr.RecognitionException, antlr.TokenStreamException
FROM
keyword and the required following
coordinates (x y or col row). Used by the image_phrase()
rule and
the subtree is rooted by the keyword (which is the reason for using a
separate rule for something so simple).antlr.RecognitionException
antlr.TokenStreamException
public final void location_spec() throws antlr.RecognitionException, antlr.TokenStreamException
AT phrase
(at_phrase()
).
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void undo_basic() throws antlr.RecognitionException, antlr.TokenStreamException
UNDO
action and the optional following
label references. This is done to improve the tree build. This is only
called by on_event_phrase()
.
Of particular interest is that this rule implements references to labels
(see label_reference()
) and to a common form of return
keyword processing (see return_core()
which is also accessed from
the RETURN
statement rule return_stmt()
).
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void undo_core() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void throw_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void other_on_event_actions() throws antlr.RecognitionException, antlr.TokenStreamException
Of particular interest is that this rule implements references to labels
(see label_reference()
) and to a common form of return
keyword processing (see return_core()
which is also accessed from
the RETURN
statement rule return_stmt()
).
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void return_core() throws antlr.RecognitionException, antlr.TokenStreamException
RETURN
keyword and builds the
resulting AST. This is used in multiple locations including the
return_stmt()
and the on_event_phrase()
.antlr.RecognitionException
antlr.TokenStreamException
public final void query_tuning_cache_size() throws antlr.RecognitionException, antlr.TokenStreamException
CACHE-SIZE
keyword and the required following
integer literal.
Used by query_tuning_phrase()
and the subtree is rooted by the
keyword (which is the reason for using a separate rule for something so
simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void query_tuning_debug() throws antlr.RecognitionException, antlr.TokenStreamException
DEBUG
keyword and the optional following
qualifier keyword (SQL or EXTENDED
).
Used by query_tuning_phrase()
and the subtree is rooted by the
keyword (which is the reason for using a separate rule for something so
simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void extended_diag_option() throws antlr.RecognitionException, antlr.TokenStreamException
EXTENDED
keyword and the optional following
qualifier keywords CURSOR, DATA-BIND, PERFORMANCE or VERBOSE
.
Used by query_tuning_debug()
and the subtree is rooted by the
keyword KW_EXTENDED
(which is the reason for using a separate
rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void join_clause() throws antlr.RecognitionException, antlr.TokenStreamException
OUTER-JOIN
keyword and the optional prefix keyword
LEFT
which are used to specify an outer join or left outer
join. The LEFT
token (if it exists) is made a child of
OUTER-JOIN
.
Used by record_phrase(boolean, boolean)
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void of_clause() throws antlr.RecognitionException, antlr.TokenStreamException
OF
keyword and the required following record
which is used to specify the table to join on.
Used by record_phrase(boolean, boolean)
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void use_index_clause() throws antlr.RecognitionException, antlr.TokenStreamException
USE-INDEX
keyword and the required following
index. The index is matched as a valid user-defined symbol using the
symbol()
rule, however the result's token type is rewritten to be
INDEX
.
Used by record_phrase(boolean, boolean)
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void using_clause() throws antlr.RecognitionException, antlr.TokenStreamException
USING
keyword and the required following list
of lvalue()
(fields) and optional matching frames.
Each field can be optionally prefaced with the INPUT
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.
Used by record_phrase(boolean, boolean)
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void connect_options() throws antlr.RecognitionException, antlr.TokenStreamException
NO-ERROR or DOT
. In the
connect_stmt()
, database connect options are provided which can
conform to any arbitrary syntax. The options end with either of the
above tokens.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void current_or_complete_clause() throws antlr.RecognitionException, antlr.TokenStreamException
CURRENT or COMPLETE
keywords and the following
database_name(boolean)
or value()
rule references.
Used by save_cache_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void for_or_preselect_clause() throws antlr.RecognitionException, antlr.TokenStreamException
FOR or PRESELECT
keyword and the following required
each_first_last_spec(boolean, boolean)
of the open_query_stmt()
.
This is only separated to simplify the AST build.
antlr.RecognitionException
antlr.TokenStreamException
public final void max_rows_clause() throws antlr.RecognitionException, antlr.TokenStreamException
MAX-ROWS
keyword and the following numeric expression of the
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.
This is only separated to simplify the AST build.
antlr.RecognitionException
antlr.TokenStreamException
public final void to_recid_or_rowid_clause() throws antlr.RecognitionException, antlr.TokenStreamException
TO RECID, TO ROWID or TO ROW
keywords and the
following required expression of type RECID, ROWID
or integer
(in the case of a TO ROW
). Calls expr()
.
Used in the reposition_stmt()
.
This is only separated to simplify the AST build.
antlr.RecognitionException
antlr.TokenStreamException
public final void reposition_spec() throws antlr.RecognitionException, antlr.TokenStreamException
FORWARDS or BACKWARDS
keyword and the
following required expr()
. Used in the reposition_stmt()
.
This is only separated to simplify the AST build.
antlr.RecognitionException
antlr.TokenStreamException
public final void from_database_clause() throws antlr.RecognitionException, antlr.TokenStreamException
FROM
keyword and the following expr()
of the create_database_stmt()
.
This is only separated to simplify the AST build.
antlr.RecognitionException
antlr.TokenStreamException
public final void handle() throws antlr.RecognitionException, antlr.TokenStreamException
lvalue()
except a
validating semantic predicate is used to throw an exception if the
data type of the variable or field is not HANDLE
.
It is an open question as to whether this rule should also have references
to FUNC_HANDLE
or METH_HANDLE
. 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
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.
To test for ATTR_HANDLE
, ATTR_COM_HANDLE
,
METH_HANDLE
and METH_COM_HANDLE
, a simple
check for a COLON
operator is done. This test should probably
be made more thorough.
Used in create_query_stmt()
and in other locations.
antlr.RecognitionException
antlr.TokenStreamException
public final void in_widget_pool_clause() throws antlr.RecognitionException, antlr.TokenStreamException
IN WIDGET-POOL
keywords and the required following
pool name as a character expression (see expr()
).
Used by create_query_stmt()
, create_temp_table_stmt()
,
create_buffer_stmt()
, create_widget_or_object_stmt()
and
create_browse_stmt()
.
This is a separate rule to centralize logic and build the AST properly.
antlr.RecognitionException
antlr.TokenStreamException
public final void for_table_clause() throws antlr.RecognitionException, antlr.TokenStreamException
FOR TABLE
construct and the following expr()
of the create_buffer_stmt()
.
This is only separated to simplify the AST build.
antlr.RecognitionException
antlr.TokenStreamException
public final void buffer_name_clause() throws antlr.RecognitionException, antlr.TokenStreamException
BUFFER-NAME
keyword and the following expr()
of the create_buffer_stmt()
.
This is only separated to simplify the AST build.
antlr.RecognitionException
antlr.TokenStreamException
public final void buffer_modification_list() throws antlr.RecognitionException, antlr.TokenStreamException
EXCEPT or USING
keywords and the required list
of following lvalue()
.
Used by buffer_compare_or_copy_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void to_target() throws antlr.RecognitionException, antlr.TokenStreamException
TO
keyword and the following record(boolean, boolean, boolean)
.
Used by buffer_compare_or_copy_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void save_result_in() throws antlr.RecognitionException, antlr.TokenStreamException
SAVE
keyword (and optional RESULT IN
)
and the following lvalue()
.
Bogus ANTLR ambiguity warnings have been disabled.
Used by buffer_compare_or_copy_stmt()
(only for the compare form).
antlr.RecognitionException
antlr.TokenStreamException
public final void explicit_compares() throws antlr.RecognitionException, antlr.TokenStreamException
COMPARES
keyword (and optional
EXPLICIT
prefix), an optional NO-ERROR
and
the compares_when_block()
.
Used by buffer_compare_or_copy_stmt()
(only for the compare form).
antlr.RecognitionException
antlr.TokenStreamException
public final void sub_assign_clause() throws antlr.RecognitionException, antlr.TokenStreamException
ASSIGN
keyword and a list of space delimited
assignment expressions. This is similar to but more simplified version
of assign_stmt()
.
Used by buffer_compare_or_copy_stmt()
only in the copy form.
Bogus ANTLR ambiguity warnings are disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void compares_when_block() throws antlr.RecognitionException, antlr.TokenStreamException
COLON
token followed by one or more
when_clause()
constructs and terminated by an END
keyword.
Used by explicit_compares()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void com_connect_option() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void attribute_assign_clause() throws antlr.RecognitionException, antlr.TokenStreamException
ASSIGN
keyword and a list of space delimited
ATTRIBUTE
assignment expressions. This is similar to but
a more simplified version of assign_stmt()
. Please note that
this is a special form for use in the create_widget_or_object_stmt()
AND
that the use of the 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 TRIGGERS
keyword (since the leftmost
token of the called rule can include ANY reserved or other symbol.
Also used in the create_browse_stmt()
and create_server_stmt()
.
Bogus ANTLR ambiguity warnings are disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void attribute_assign() throws antlr.RecognitionException, antlr.TokenStreamException
attribute_or_method()
, an EQUALS
token (the
equals sign) and a following expr()
. The token type of the
EQUALS
is changed to ASSIGN
and the entire
construct is rooted on that token. The token type of the first child
of the ASSIGN
node must be an attribute, though this is not
enforced.
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.
Used by attribute_assign_clause()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void attribute_or_method() throws antlr.RecognitionException, antlr.TokenStreamException
lvalue()
. The result of this rule
is either an ATTR_*
node or a METH_*
node
with method parameters (usually an expr()
) as immediate children.
All method references are resolved to a value between the range of
BEGIN_METH
and END_METH
types and all attribute
references are resolved to a value between the range of
BEGIN_ATTR
and END_ATTR
types. A namespace of
the method and attribute names and associated types is used to resolve
these values. This namespace is partial at this time and thus it only
represents a small portion of all possible methods and attributes.
List of possible resulting token types:
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
This rule uses a 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 LPARENS
or
LBRACKET
(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.
Please note that this use of reserved keywords is required since attributes and methods can use reserved names.
Some parameters are keywords (e.g. NO-LOCK
) rather than
valid expressions. For this reason, the reserved_or_symbol()
rule
is the last-ditch alternative for a parameter.
WARNING: starting in Progress v10.x attributes and methods can be chained
using the COLON
operator. This means that this rule will
recursively call itself to implement such support.
antlr.RecognitionException
antlr.TokenStreamException
public final void com_handle() throws antlr.RecognitionException, antlr.TokenStreamException
lvalue()
except a
validating semantic predicate is used to throw an exception if the
data type of the variable or field is not a COM-HANDLE
.
It is an open question as to whether this rule should also have references
to FUNC_COM_HANDLE
. 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.
Used in create_widget_or_object_stmt()
and release_object_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void item_clause() throws antlr.RecognitionException, antlr.TokenStreamException
ITEM
clause followed by an expr()
. Used by
dde_advise_stmt()
, dde_get_stmt()
, dde_request_stmt()
and dde_send_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void time_clause() throws antlr.RecognitionException, antlr.TokenStreamException
TIME
clause followed by an expr()
. Used by
dde_advise_stmt()
, dde_execute_stmt()
, dde_get_stmt()
,
dde_request_stmt()
and dde_send_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void command_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void frame_handle_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void application_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void topic_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void update_logical_clause() throws antlr.RecognitionException, antlr.TokenStreamException
UPDATE
clause followed by an lvalue()
.
Used by system_dialog_color_stmt()
,
system_dialog_font_stmt()
, system_dialog_get_file_stmt()
and
system_dialog_printer_setup_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void in_window_handle_clause() throws antlr.RecognitionException, antlr.TokenStreamException
IN WINDOW
clause followed by a handle()
.
Used by system_dialog_color_stmt()
,
system_dialog_font_stmt()
, system_dialog_get_file_stmt()
and
system_dialog_printer_setup_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void min_max_size_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void initial_dir_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void title_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void default_extension_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void filters_clause() throws antlr.RecognitionException, antlr.TokenStreamException
FILTERS
clause followed by a list of pairs of
character expressions matched by filter_spec()
. Optionally uses
initial_filter_num()
. Used by system_dialog_get_file_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void num_copies_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void filter_spec() throws antlr.RecognitionException, antlr.TokenStreamException
expr()
and roots both of them at a node of type
FILTER_SPEC
. Used by filters_clause()
.antlr.RecognitionException
antlr.TokenStreamException
public final void initial_filter_num() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void window_name_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void help_command_clause() throws antlr.RecognitionException, antlr.TokenStreamException
system_help_stmt()
. Uses
expr()
, position_clause_arg_x()
, position_clause_arg_y()
,
position_clause_arg_width()
and position_clause_arg_height()
.antlr.RecognitionException
antlr.TokenStreamException
public final void position_clause_arg_x() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void position_clause_arg_y() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void position_clause_arg_width() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void position_clause_arg_height() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final java.lang.String before_table_clause() throws antlr.RecognitionException, antlr.TokenStreamException
BEFORE-TABLE
clause with the following symbol()
. Used
from def_temp_table_stmt(boolean, boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.antlr.RecognitionException
antlr.TokenStreamException
public final void add_temp_table_field(java.lang.Object table) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE TEMP-TABLE or DEFINE WORK-TABLE
statements. Called
by def_temp_table_stmt(boolean, boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
rules.
Calls symbol()
, as_field_clause(java.lang.String, java.lang.Object)
, like_clause(java.lang.String, java.lang.Object, boolean)
and temp_table_field_options(java.lang.String, int)
. As an undocumented feature, the
temp_table_field_options
can be matched before the
AS
or LIKE
clause. This was found in working
4GL code and is supported.
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.
An artificial root node is created to contain all tokens under a single
root with type DEFINE_FIELD
. 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). 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.
Bogus ANTLR ambiguity warnings have been disabled.
table
- The table object to associate this field with in the schema
namespace.antlr.RecognitionException
antlr.TokenStreamException
public final void index_clause(java.lang.Object table) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE TEMP-TABLE
language
statement. Calls symbol()
, is_clause()
and
index_field_clause(java.lang.Object)
.
Bogus ANTLR ambiguity warnings have been disabled.
Used by def_temp_table_stmt(boolean, boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
.
table
- The temp-table object that is being modified.antlr.RecognitionException
antlr.TokenStreamException
public final void temp_table_field_options(java.lang.String symText, int ftype) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE TEMP-TABLE or DEFINE WORK-TABLE
statements.
Called by add_temp_table_field(java.lang.Object)
.
All options can be specified in any order.
Calls:
extent()
initializer(int)
label()
ui_stuff()
format_string(boolean)
help_string()
column_label()
decimals_clause()
view_as_phrase(java.lang.String)
case_sensitive()
Bogus ANTLR ambiguity warnings have been disabled.
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.ftype
- A token type that describes type of the field being created. This is the type
of the child of the KW_AS
or KW_LIKE
node.antlr.RecognitionException
antlr.TokenStreamException
public final void as_field_clause(java.lang.String symName, java.lang.Object table) throws antlr.RecognitionException, antlr.TokenStreamException
AS
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.
This is called from add_temp_table_field(java.lang.Object)
.
The inclusion of the 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 "pulling" the
recursive descent processing down into this rule.
It is important to note that in the end, it is not really valid to have
a token type of SYMBOL
, random keyword match or anything
other than one of the valid special abbreviations for a field type.
What we really require is a token that is one of the following:
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
The difference between a SYMBOL
and a KW_CHAR
can only be determined by context (the fact that the lookahead code has
identified a match with a SYMBOL
token which is a construct
that can occur in an this rule). Thus if a match is found using
lookahead (in the rule that calls this one), then it must be
correct and necessary to convert the SYMBOL
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 reserved_or_symbol
rule since calling that rule
would actually try to match (and consume from the token stream) a
SYMBOL
or other keyword token type. 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!
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 reserved_or_symbol
is needed because some possible reserved keyword matches could occur
that would match one of these special abbreviations and thus the
symbol
rule would not be sufficient to pull all possible
valid keyword matches into this rule.
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.
The logic of the special abbreviation processing is centralized in the specialDataTypeKeywordAbbreviations() method.
symName
- The name of the field to add.table
- The table in which the field should be added.antlr.RecognitionException
antlr.TokenStreamException
public final void column_codepage() throws antlr.RecognitionException, antlr.TokenStreamException
COLUMN-CODEPAGE
option with a following
expr()
. Used by temp_table_field_options(java.lang.String, int)
.antlr.RecognitionException
antlr.TokenStreamException
public final void xml_data_type() throws antlr.RecognitionException, antlr.TokenStreamException
XML-DATA-TYPE
with a following STRING
. Used by
temp_table_field_options(java.lang.String, int)
.antlr.RecognitionException
antlr.TokenStreamException
public final void is_clause() throws antlr.RecognitionException, antlr.TokenStreamException
IS
keyword of a DEFINE TEMP-TABLE
language statement and handles the optional index qualifiers. Note that
Progress also allows the AS
keyword to be substituted for
IS
although this is undocumented! This rule supports
both forms but the token type is always set to KW_IS
to
simplify tree processing.
Bogus ANTLR ambiguity warnings have been disabled.
Used by index_clause(java.lang.Object)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void index_field_clause(java.lang.Object table) throws antlr.RecognitionException, antlr.TokenStreamException
DEFINE TEMP-TABLE
language statement. Calls
symbol()
and optionally sql_direction_spec()
and roots everything under an
artificial token INDEX_FIELD
.
We must NOT call 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 lvalue
. The 4GL restrictions:
Used by index_clause(java.lang.Object)
.
table
- The temp-table object that is being modified.antlr.RecognitionException
antlr.TokenStreamException
public final void database() throws antlr.RecognitionException, antlr.TokenStreamException
The matching portion of this rule is defined as a single token that
matches the union of the DATABASE
token type and the set of
all possible alternatives for symbol names (a reference to the
symbol()
rule).
Note that if this rule is used as an alternative to a rule that includes a
leftmost token defined by the symbol
rule, there will be an
ambiguity that is only resolved by lookahead and the proper
ordering of the rules.
It is required that where this rule is referenced as one alternative that conflicts with the definitions of other alternatives, the order of the alternatives must be more specific (in terms of matching criteria) to less specific.
The inclusion of the symbol
rule ensures that all valid
symbols are considered a database and will be matched by this rule.
It is important to note that in the end, it is not really valid to have
a token type of SYMBOL
since this could be anything. What we
really require is a token that is type DATABASE
.
The difference between a SYMBOL
and a DATABASE
can only be determined by context (the fact that the lookahead code has
identified a match with a SYMBOL
token which is a construct
that can occur in a database
call. Thus if a match is
found using lookahead (in the rule that calls this one), then it
must be correct and necessary to convert the SYMBOL
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 DATABASE
and never tries
to call the symbol
rule since calling that rule would actually
try to match (and consume from the token stream) a SYMBOL
token type. 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!
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void choose_row_or_field_list() throws antlr.RecognitionException, antlr.TokenStreamException
ROW or FIELD
keyword and the required following
choose_field_spec()
.
Bogus ANTLR ambiguity warnings have been disabled.
Used by choose_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void choose_keys_clause() throws antlr.RecognitionException, antlr.TokenStreamException
KEYS
keyword and the required following
lvalue()
of CHARACTER
data type.
Used by choose_stmt()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void choose_field_spec() throws antlr.RecognitionException, antlr.TokenStreamException
lvalue()
and an optional following
choose_help_clause()
.
Used by choose_row_or_field_list()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void choose_help_clause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void put_field() throws antlr.RecognitionException, antlr.TokenStreamException
put_stmt()
. Uses expr()
, format_string(boolean)
and
to_or_at_clause()
. Roots everything at a node of type
PUT_FIELD
.antlr.RecognitionException
antlr.TokenStreamException
public final void to_or_at_clause() throws antlr.RecognitionException, antlr.TokenStreamException
AT or TO
keywords and a required following
expression. This is a variant of some constructs in the
format_phrase(java.lang.String, com.goldencode.ast.Aast, boolean, boolean)
however this rule is not compatible with those
rules. This calls expr()
and is used by put_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void from_handle_clause() throws antlr.RecognitionException, antlr.TokenStreamException
FROM
keyword and the following handle()
.
Used in the publish_stmt()
.
This is only separated to simplify the AST build.
antlr.RecognitionException
antlr.TokenStreamException
public final void param_passing_list(boolean isRunStmt) throws antlr.RecognitionException, antlr.TokenStreamException
parameter()
to properly build the AST. The parameters are optional
as some customer code has been found that has an empty set of parenthesis.
Called from run_stmt()
, function()
, super_function()
,
super_stmt()
, run_super_stmt()
, new_phrase()
,
run_stored_proc_stmt()
this_object_stmt()
and publish_stmt()
.
This rule is used from many places, but when called from the RUN statement it will consume an unlimited number of unmatched ending parenthesis characters. This is an undocumented "feature" of Progress that will compile and work.
isRunStmt
- true
if the caller is the RUN statement.antlr.RecognitionException
antlr.TokenStreamException
public final void proc_handle_clause() throws antlr.RecognitionException, antlr.TokenStreamException
PROCEDURE
keyword and the following handle()
.
Used in the subscribe_stmt()
.
This is only separated to simplify the AST build.
antlr.RecognitionException
antlr.TokenStreamException
public final void in_procedure_clause() throws antlr.RecognitionException, antlr.TokenStreamException
IN
keyword and the required following expression
that resolves to the procedure handle construct in which the internal
procedure is to be run.
Used by run_stmt()
, dynamic_function_func()
, event_proc_clause()
,
subscribe_stmt()
and unsubscribe_stmt()
, the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void run_proc_clause() throws antlr.RecognitionException, antlr.TokenStreamException
RUN-PROCEDURE
keyword and the following
character expr()
. Used in the subscribe_stmt()
.
This is only separated to simplify the AST build.
antlr.RecognitionException
antlr.TokenStreamException
public final void content_array() throws antlr.RecognitionException, antlr.TokenStreamException
expr()
or space_or_skip()
input for
the msg_stmt()
. The input can be made in any order and with any
number of items. Everything will be rooted at a CONTENT_ARRAY
node.antlr.RecognitionException
antlr.TokenStreamException
public final void view_as_alert_box_clause() throws antlr.RecognitionException, antlr.TokenStreamException
VIEW-AS ALERT-BOX
construct and the optional
following definitions. Calls buttons_clause()
and
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.
Used by msg_stmt()
.
Bogus ANTLR ambiguity warnings have been disabled.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void set_or_update_clause() throws antlr.RecognitionException, antlr.TokenStreamException
SET field or UPDATE field
construct and the
required following as or like clause. Note that by using the
as_clause(java.lang.String, boolean)
and like_clause(java.lang.String, java.lang.Object, boolean)
rules, the variable
namespace is naturally updated which should be correct. Also uses
lvalue()
and format_string(boolean)
rules. The options can
be specified in any order.
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
AS or LIKE
construct after an lvalue
. However,
this implementation is written to pass null
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.
Used by msg_stmt()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void buttons_clause() throws antlr.RecognitionException, antlr.TokenStreamException
BUTTONS
keyword and the required following
button set. Note that the BUTTON
keyword is a valid
abbreviation for BUTTONS
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 BUTTONS
either way.
Used by view_as_alert_box_clause()
.
The subtree is rooted by the keyword (which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void persist_clause() throws antlr.RecognitionException, antlr.TokenStreamException
PERSISTENT
keyword and the optional following
SET
construct.
Note that there is no procedure handle processing implemented at this time. The matching is done as a symbol only, no namespace is maintained.
Used by run_stmt()
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void set_handle() throws antlr.RecognitionException, antlr.TokenStreamException
SET handle
clause and a following lvalue()
which must be a handle type.
Used by persist_clause()
, run_stmt()
and
asynch_clause()
. The subtree is rooted by the keyword (which is
the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void on_server_clause() throws antlr.RecognitionException, antlr.TokenStreamException
ON
keyword and the optional following
SERVER handle
construct.
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.
Used by run_stmt()
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
Ambiguity warnings are disabled because although ANTLR detects that the
optional SERVER
keyword could conflict with the following
symbol, in fact Progress (and our implementation) both give preference
to the keyword.
antlr.RecognitionException
antlr.TokenStreamException
public final void asynch_clause() throws antlr.RecognitionException, antlr.TokenStreamException
ASYNCHRONOUS
clause and following options.
Calls set_handle()
and event_proc_clause()
.
Used by run_stmt()
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void preproc_arguments() throws antlr.RecognitionException, antlr.TokenStreamException
RUN
language statement and builds a single AST of
the entire list, rooted at an artificial ARGUMENTS
node.
As an undocumented 4GL feature, value()
can be referenced instead of
an expression.
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). 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.
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.
Another undocumented feature that is supported is that any text except
a DOT
or KW_NO_ERROR
is matched even through
only a value() construct or valid expression are documented as valid.
See broken_preproc_args()
.
Called by run_stmt()
. This rule only exists to create the proper
AST, otherwise it would be much simpler to inline since the match is
trivial.
antlr.RecognitionException
antlr.TokenStreamException
public final void broken_preproc_args() throws antlr.RecognitionException, antlr.TokenStreamException
DOT
or KW_NO_ERROR
.
Progress seems to match any text as a preprocessor argument, even though
only a value() construct or valid expression are documented.antlr.RecognitionException
antlr.TokenStreamException
public final void trans_distinct_clause() throws antlr.RecognitionException, antlr.TokenStreamException
TRANSACTION DISTINCT
clause. Although official documentation states
that both keywords are needed to define the clause, practice showed the DISTINCT keyword is
optional.
Used by run_stmt()
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
antlr.RecognitionException
antlr.TokenStreamException
public final void event_proc_clause() throws antlr.RecognitionException, antlr.TokenStreamException
EVENT-PROCEDURE
clause and its required
expression and optional in_procedure_clause()
.
Used by asynch_clause()
and the subtree is rooted by the keyword
(which is the reason for using a separate rule for something so simple).
Bogus ANTLR ambiguity warnings have been disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void parameter() throws antlr.RecognitionException, antlr.TokenStreamException
INPUT
,
INPUT-OUTPUT
and OUTPUT
keywords are optional. The core parameter is
matched using the expr()
rule.
The INPUT
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.
To actually use the INPUT
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.
The subtree returned from this rule will be rooted at an artificial node of type
PARAMETER
.
Called from param_passing_list(boolean)
.
antlr.RecognitionException
antlr.TokenStreamException
public final void parameter_spec(boolean defineBuffer, boolean funcDef) throws antlr.RecognitionException, antlr.TokenStreamException
Optionally matches INPUT, INPUT-OUTPUT and OUTPUT
keywords or a
BUFFER
definition as well as a range of possible table parameter types.
The table_parm()
, def_buf_stmt(boolean, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
and as_clause(java.lang.String, boolean)
rules are used.
This rule will define new variables in the variable dictionary. For normal variables it
calls the as_clause(java.lang.String, boolean)
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
String
argument to the as_clause
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.
Instead of an AS clause, this will also match the undocumented like_clause(java.lang.String, java.lang.Object, boolean)
.
For buffers and other table parameters, these are each handled by separate rules.
Note that it seems that the 2nd alternative (a symbol followed by the
AS
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 AS
which
disambiguates these alternatives. This may be due to the use of a rule
reference rather than an inline keyword implementation. 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.
The INPUT
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.
The subtree returned from this rule will be rooted at an artificial node
of type PARAMETER
.
Called from param_list_definition(boolean, boolean)
.
defineBuffer
- true
if the caller supports inline buffer
definitions (versus just passing a buffer parameter which
doesn't create a new buffer).funcDef
- true
if the caller is a FUNCTION definition.antlr.RecognitionException
antlr.TokenStreamException
public final void assign_proc_handle() throws antlr.RecognitionException, antlr.TokenStreamException
integer-field = PROC-HANDLE
clause of the
run_stored_proc_stmt()
rule. This matches an lvalue()
followed by an EQUALS
and then another lvalue
.
The result is rooted at an ASSIGN
node. This is separated
to allow the tree to be built properly. Also called from the
close_stored_proc_stmt()
.antlr.RecognitionException
antlr.TokenStreamException
public final void log_and_expr() throws antlr.RecognitionException, antlr.TokenStreamException
KW_AND
(the logical AND) operator.
This is only called by the top level expr()
rule. This method
calls the log_not_expr()
rule.
There is a bogus ambiguity warning generated by this rule (which occurs
because of the addition of the special IF THEN ELSE
function
(see if_func()
) in the primary_expr()
rule. No real ambiguity
seems to exist and no errors can be found, so warnings have been disabled.
See the top level expression parsing rule expr()
for more details.
antlr.RecognitionException
antlr.TokenStreamException
public final void log_not_expr() throws antlr.RecognitionException, antlr.TokenStreamException
KW_NOT
(the logical NOT) operator.
This is only called by the 2nd level log_and_expr()
rule.
This method calls the compare_expr()
rule.
See the top level expression parsing rule expr()
for more details.
antlr.RecognitionException
antlr.TokenStreamException
public final void compare_expr() throws antlr.RecognitionException, antlr.TokenStreamException
This is only called by the 3nd level log_not_expr()
rule. This
method subsequently calls the sum_expr()
rule.
Provides the following operators:
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
When in an embedded SQL statement, the following additional operators are supported:
KW_BETWEEN NOT_BETWEEN KW_LIKE NOT_LIKE KW_IN NOT_IN IS_NULL IS_NOT_NULL
If this is called from within a WHERE
clause that is in
an SQL select_stmt()
, then all forms of sub-select are supported
in this rule. Uses sub_select_stmt()
and
in_operator_sub_select_stmt()
to provide this support.
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.
The other two alternative approaches each cause problems:
The approach taken allows for the lexer to always set the token
type to the unreserved keyword (e.g. the text EQ
is set to
the KW_EQ
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 EQUALS
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 lvalue()
for more
details.
See the top level expression parsing rule expr()
for more details.
Note that ANTLR reports ambiguity between this rule and the assign()
rule. The ambiguity is resolved by the ordering of the top level rule
placing the ASSIGN
language statement (which is unambiguous)
with higher precedence than the assignment
rule. As long as
the assign
rule is only used by the assign_stmt
rule, there is no real ambiguity. For this reason, ambiguity warnings
are suppressed for this rule.
antlr.RecognitionException
antlr.TokenStreamException
public final void and_expr() throws antlr.RecognitionException, antlr.TokenStreamException
BETWEEN
operator.antlr.RecognitionException
antlr.TokenStreamException
public final void escape_char() throws antlr.RecognitionException, antlr.TokenStreamException
ESCAPE
keyword and a following string literal
for the LIKE
operator.antlr.RecognitionException
antlr.TokenStreamException
public final void prod_expr() throws antlr.RecognitionException, antlr.TokenStreamException
MULTIPLY
, DIVIDE
and KW_MOD
operators.
This is only called by the 5th level sum_expr()
rule. This
method subsequently calls the un_type()
rule.
See the top level expression parsing rule expr()
for more details.
Note that ANTLR reports ambiguity between this rule and the assign()
rule. The ambiguity is resolved by the ordering of the top level rule
placing the ASSIGN
language statement (which is unambiguous)
with higher precedence than the assignment
rule. As long as
the assign
rule is only used by the assign_stmt
rule, there is no real ambiguity. For this reason, ambiguity warnings
are suppressed for this rule.
antlr.RecognitionException
antlr.TokenStreamException
public final void un_type() throws antlr.RecognitionException, antlr.TokenStreamException
PLUS
and MINUS
. This rule is
different in structure from the previous levels, as the operator is
leftmost and optional. There is always a right operand.
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.
This is only called by the 6th level prod_expr()
rule. This
method subsequently calls the primary_expr()
rule.
See the top level expression parsing rule expr()
for more details.
antlr.RecognitionException
antlr.TokenStreamException
public final void primary_expr() throws antlr.RecognitionException, antlr.TokenStreamException
literal()
new_phrase()
sql_aggregate_funcs()
seek_func()
cast_func()
sequence_funcs()
dynamic_function_func()
frame_funcs()
record_funcs()
func_call()
method_call(java.lang.String, boolean)
class_event(java.lang.String, boolean)
user_defined_type_name()
accum_function()
can_find_function()
lvalue()
postfix_funcs()
if_func()
super_function()
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.
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 expr
expression entry point.
Due to the nature of the func_call
and lvalue
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:
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
func_call
first, the lack of a match on the
subsequent parenthesis causes processing to drop through to
lvalue
, resolving the ambiguity generated by the
need to have a common reference to the symbol
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.
VAR_INT
,
VAR_LOGICAL
and all other variable data types).
method_call
is similar to func_call
and is
disambiguated from lvalue
and func_call
with a
semantic predicate that does a method name lookup.
Similar to the problems with lvalue
and func_call
record_funcs
are also ambiguous since there is a
record(boolean, boolean, boolean)
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.
This is only called by the 8th level chained_object_members()
rule.
See the top level expression parsing rule expr()
for more details.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void downstream_chained_reference(java.lang.String cls, boolean isStatic) throws antlr.RecognitionException, antlr.TokenStreamException
method_call(java.lang.String, boolean)
, class_event(java.lang.String, boolean)
or an
object_data_member(java.lang.String, boolean)
in a 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 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 primary_expr()
(where they
are not allowed to match with reserved keywords, even in Progress, and doing
so would hose the parser bigtime).cls
- Class name containing the members for which to search.isStatic
- true
if this is a static reference.antlr.RecognitionException
antlr.TokenStreamException
public final void com_property_or_method() throws antlr.RecognitionException, antlr.TokenStreamException
COM_METHOD
or COM_PROPERTY
node.
Any parameters will be direct children using the 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 oldtype
annotation.
The 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 LPARENS
is seen, then the result will be
a COM_METHOD
, 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.
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 oldtype
annotation of
a COM_PROPERTY
or COM_METHOD
. The following
are supported:
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
antlr.RecognitionException
antlr.TokenStreamException
public final void widget_qualifier() throws antlr.RecognitionException, antlr.TokenStreamException
IN
.
Calls the frame_reference(boolean)
, lvalue()
(for browse) and
menu_reference()
rules. Roots the tree at the IN
.
Used by lvalue
and the recursive call to lvalue
is protected by a semantic predicate keyed off of KW_BROWSE
.
Uses a flag to allow a match for the IN prochandle
using
expr()
for matching when called from rules which can ambiguously
match both this clause and a following expression.
antlr.RecognitionException
antlr.TokenStreamException
public final void method_call(java.lang.String cls, boolean isStatic) throws antlr.RecognitionException, antlr.TokenStreamException
The matching portion of this rule comes in 2 parts:
METH_INT
) and the set of all possible
alternatives for symbol names (a reference to the
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
downstream_chained_reference(java.lang.String, boolean)
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.
func_call_parameters(boolean)
.
It is required that where this rule is referenced as one alternative that
conflicts with the definitions of other alternatives (see
primary_expr()
and lvalue()
), the order of the
alternatives must be more specific (in terms of matching criteria) to less
specific. Since the method_call
rule contains the very
specific symbol
followed by LPARENS
pattern,
it is more specific than a simple symbol
by itself (which is
the definition of an lvalue
. For this reason,
func_call
must always be placed ahead of lvalue
in alternative lists.
The inclusion of the any_symbol_at_all
rule ensures that all
valid symbols that are followed by an LPARENS
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 "pulling" the recursive descent
processing down the expr
rule.
It is important to note that in the end, it is not really valid to have
a token type of SYMBOL
since this could be anything. What we
really require is a leftmost token that is one of the valid function
tokens:
METH_CHAR METH_CLASS METH_COM_HANDLE METH_DATE METH_DATETIME METH_DATETIME_TZ METH_DEC METH_INT METH_INT64 METH_HANDLE METH_LOGICAL METH_LONGCHAR METH_MEMPTR METH_RAW METH_RECID METH_ROWID METH_POLY METH_VOID
There is ambiguity between this rule and the 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.
All methods have a token type associated with their respective return
value. Some built-in method may have the special type of
METH_POLY
. This special type indicates that the method can
return multiple different return types. METH_VOID
is a
special type which returns no value.
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'.
cls
- Fully qualified name of the class being referenced or
null
if this is within the current class
definition.isStatic
- true
if this is a static reference.antlr.RecognitionException
antlr.TokenStreamException
public final void class_event(java.lang.String cls, boolean isStatic) throws antlr.RecognitionException, antlr.TokenStreamException
The matching portion of this rule comes in 3 parts:
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
downstream_chained_reference(java.lang.String, boolean)
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.
COLON
followed by one of the
keywords KW_PUBLISH
, KW_SUBSCRIB
or
KW_UNSUBSCR
.
KW_PUBLISH
case is followed by
func_call_parameters(boolean)
.
KW_SUBSCRIB
and KW_UNSUBSCR
cases have
common matching logic. They are always followed by an
LPARENS
. Inside the parenthesis can be an
optional expr()
plus COLON
and then an
any_symbol_at_all
unquoted method name reference.
The other alternative inside the parenthesis is an expr
followed by an optional COMMA
plus expr
.
At the end is always an RPARENS
.
It is required that where this rule is referenced as one alternative that
conflicts with the definitions of other alternatives (see
primary_expr()
and lvalue()
), the order of the
alternatives must be more specific (in terms of matching criteria) to less
specific. For this reason, this rule must always be placed ahead of
lvalue
in alternative lists.
The inclusion of the any_symbol_at_all
rule ensures that all
valid symbols that are followed by an LPARENS
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 "pulling" the recursive descent
processing down the expr
rule.
It is important to note that in the end, it is not really valid to have
a token type of SYMBOL
since this could be anything. What we
really require is a leftmost token that is CLASS_EVENT
.
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'.
cls
- Fully qualified name of the class being referenced or
null
if this is within the current class
definition.isStatic
- true
if this is a static reference.antlr.RecognitionException
antlr.TokenStreamException
public final void object_data_member(java.lang.String cls, boolean isStatic) throws antlr.RecognitionException, antlr.TokenStreamException
lvalue()
references that exist in the
namespace of the given class name.
This rule is simply a convenience method to use the current class name
instance variable to bias the lvalue
to lookup data members
within the given namespace. When done, the flag is set back to its prior
state.
cls
- Class name containing the members for which to search.isStatic
- true
if this is a static reference.antlr.RecognitionException
antlr.TokenStreamException
public final void new_phrase() throws antlr.RecognitionException, antlr.TokenStreamException
NEW
phrase in an expression, allowing new object
instances to be instantiated. Uses user_defined_type_name()
and
param_passing_list(boolean)
and is called from primary_expr()
.antlr.RecognitionException
antlr.TokenStreamException
public final void seek_func() throws antlr.RecognitionException, antlr.TokenStreamException
seek()
function call. The root node returned
will be a FUNC_INT
and there will be one child which may
be KW_INPUT
, KW_OUTPUT
or an expression that
represents a stream.
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'.
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 SymbolResolver
class.
See SymbolResolver.lookupFunction(java.lang.String)
.
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.
The SEEK
function can reference the unnamed input or unnamed
output streams using only the keywords INPUT
and
OUTPUT
. This is honored.
antlr.RecognitionException
antlr.TokenStreamException
public final void cast_func() throws antlr.RecognitionException, antlr.TokenStreamException
cast()
function call. The root node returned
will be a FUNC_CLASS
and there will be an expr()
child
and a second child of user_defined_type_name()
.
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'.
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 SymbolResolver
class.
See SymbolResolver.lookupFunction(java.lang.String)
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void dynamic_function_func() throws antlr.RecognitionException, antlr.TokenStreamException
dynamic-function()
function call. The root node
returned will be a FUNC_POLY
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
in_procedure_clause()
and then any number of comma-separated
parameter expressions.
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'.
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 SymbolResolver
class.
See SymbolResolver.lookupFunction(java.lang.String)
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void frame_funcs() throws antlr.RecognitionException, antlr.TokenStreamException
Function Type ------------ ------------- FRAME-COL FUNC_DEC FRAME-DOWN FUNC_INT FRAME-LINE FUNC_INT FRAME-ROW FUNC_DEC
The root node returned will be a FUNC_INT
or
FUNC_DEC
and there will be one child node which is a frame
reference (see lvalue()
) OR it is a SYMBOL
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 lvalue
.
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'.
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 SymbolResolver
class.
See SymbolResolver.lookupFunction(java.lang.String)
.
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.
antlr.RecognitionException
antlr.TokenStreamException
public final void record_funcs() throws antlr.RecognitionException, antlr.TokenStreamException
record(boolean, boolean, boolean)
or
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
record
(which is not normally allowed in an expression). The
INPUT
form can have an optional prefixed
frame_reference(boolean)
.
The following are matched:
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 ROWID( record ) N ROW-STATE( record ) N
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 primary_expr()
,
which makes it a peer of the generic func_call()
rule.
Ambiguity warnings were generated in the parameter()
and
on_stmt()
rules when this rule was added to 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.
Parenthesis can be optionally used in some of these functions as noted in the above table.
antlr.RecognitionException
antlr.TokenStreamException
public final void func_call() throws antlr.RecognitionException, antlr.TokenStreamException
The matching portion of this rule comes in 2 parts:
FUNC_INT
) and the set of all possible
alternatives for symbol names (a reference to the symbol()
for function names). Both lvalue
and
func_call
refer to a leftmost token that includes the
symbol text. This creates an ambiguity that is only resolved by
lookahead and the proper ordering of the rules (since both
are equal alternatives in the primary_expr
rule).
func_call_parameters(boolean)
.
It is required that where this rule is referenced as one alternative that
conflicts with the definitions of other alternatives (see
primary_expr()
and lvalue()
), the order of the
alternatives must be more specific (in terms of matching criteria) to less
specific. Since the func_call
rule contains the very
specific symbol
followed by LPARENS
pattern,
it is more specific than a simple symbol
by itself (which is
the definition of an lvalue
. For this reason,
func_call
must always be placed ahead of lvalue
in alternative lists.
The inclusion of the malformed_symbol
rule ensures that all
symbols that are followed by an LPARENS
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 "pulling" the recursive descent
processing down the expr
rule.
It is important to note that in the end, it is not really valid to have
a token type of SYMBOL
since this could be anything. What we
really require is a leftmost token that is one of the valid function
tokens:
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_POLYThe difference between a
SYMBOL
and a FUNC_INT
can only be determined by context (the fact that the lookahead code has
identified a match with a SYMBOL
token followed by an
LPARENS
token which is a construct that can only occur
in a function call. Thus if a match is found using lookahead (in
the rule that calls this one), then it must be correct and
necessary to convert the SYMBOL
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 symbol
rule since
calling that rule would actually try to match (and consume from the
token stream) a SYMBOL
token type. 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!
All functions have a token type associated with their respective return
value. Some built-in functions may have the special type of
FUNC_POLY
. 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.
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'.
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 SymbolResolver
class.
See SymbolResolver.lookupFunction(java.lang.String)
.
To ensure this method sees tokens matching the list of functions with
reserved names, the 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 symbol
method. This can't be changed
without negative impacts on other code, since symbol
is
used in many locations in the parser. Instead a custom method was
created to generate pull.
antlr.RecognitionException
antlr.TokenStreamException
public final void accum_function() throws antlr.RecognitionException, antlr.TokenStreamException
ACCUM
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
accumulate_stmt()
precedence and thus matching on it first (in the
top-level statement()
rule rather than in assignment()
which is how this current rule gets matched.
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 aggregate_phrase()
or an expr()
. Since this
does not match the standard (generic) function call syntax, this function
was implemented as a standalone alternative in primary_expr()
,
which makes it a peer of the generic func_call()
rule.
Ambiguity warnings were generated in the aggregate_phrase
when this rule was added to the 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.
antlr.RecognitionException
antlr.TokenStreamException
public final void can_find_function() throws antlr.RecognitionException, antlr.TokenStreamException
CAN-FIND
function,
which can be used in an expression.
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 find_stmt()
excluding
the FIND
keyword itself! Since this does not match the
standard (generic) function call syntax, this function was implemented
as a standalone alternative in primary_expr()
, which makes it a
peer of the generic func_call()
rule.
antlr.RecognitionException
antlr.TokenStreamException
public final void super_function() throws antlr.RecognitionException, antlr.TokenStreamException
SUPER
function,
which can be used in an expression.
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 parameter()
rule. Since this does not match the standard (generic) function call
syntax, this function was implemented as a standalone alternative in
primary_expr()
, which makes it a peer of the generic
func_call()
rule.
ANTLR's bogus ambiguity warnings have been disabled.
antlr.RecognitionException
antlr.TokenStreamException
public final void postfix_funcs() throws antlr.RecognitionException, antlr.TokenStreamException
lvalue()
parameter for each of these is
prefixed in front of the function name. Note that the lvalue
is not matched here, but rather in primary_expr()
.
The following are matched:
lvalue ENTERED lvalue NOT ENTERED
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 lvalue
alternative in
in the calling rule.
antlr.RecognitionException
antlr.TokenStreamException
public final void if_func() throws antlr.RecognitionException, antlr.TokenStreamException
IF THEN ELSE
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
if_stmt()
precedence and thus matching on it first (in the
top-level statement()
rule rather than in assignment()
which is how this current rule gets matched.
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 ELSE
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 primary_expr()
,
which makes it a peer of the generic func_call()
rule.
Ambiguity warnings were generated in the log_and_expr()
and in
sum_expr()
when this rule was added to the 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.
antlr.RecognitionException
antlr.TokenStreamException
public final void reserved_functions() throws antlr.RecognitionException, antlr.TokenStreamException
reserved_variables()
.
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 func_call()
.
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:
Such keywords are included in both this rule and in
reserved_variables
.
antlr.RecognitionException
antlr.TokenStreamException
public final void func_call_parameters(boolean builtin) throws antlr.RecognitionException, antlr.TokenStreamException
func_call_parm(boolean)
parameters.
This matches a set of 2 or more tokens where the first is always
LPARENS
and the last is always RPARENS
. In between is an
optional expression, optionally followed by any number of
[COMMA
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.
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.
There is an undocumented feature of the 4GL where INPUT
,
OUTPUT
and INPUT-OUTPUT
are all ignored if
present in a function call parameter. This can be seen in the
func_call_parm(boolean)
.
builtin
- true
if this is a built-in function.antlr.RecognitionException
antlr.TokenStreamException
public final void func_call_parm(boolean builtin) throws antlr.RecognitionException, antlr.TokenStreamException
expr()
BUT it can be optionally prefaced with any of the keywords
INPUT, INPUT-OUTPUT or OUTPUT
. These are ignored but seem
to be tolerated since it looks the same as RUN
statement
or PUBLISH
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 INPUT
keyword
will be treated as the built-in INPUT
function instead of
being ignored.
To actually use the INPUT
built-in function as a parameter,
(in a call to a user-defined function) 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.
builtin
- true
if this is a parameter to a builtin function.antlr.RecognitionException
antlr.TokenStreamException
public final void com_parameter() throws antlr.RecognitionException, antlr.TokenStreamException
expr()
and which may
have optional modifiers for overriding data types (see
com_as_clause()
) or for specifying passing parameters by pointer
(BY-POINTER
or BY-VARIANT-POINTER
).
The tree will always be rooted by COM_PARAMETER
. 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.
KW_IN_OUT
and KW_OUTPUT
are matched as
optionally prefacing this construct.
Called by com_property_or_method()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void com_as_clause() throws antlr.RecognitionException, antlr.TokenStreamException
KW_AS
and this will root the
sub-tree.
The following types are known to be possible (and the normal ones in
as_clause(java.lang.String, boolean)
are known to be impossible to use here):
CURRENCY FLOAT ERROR-CODE IUNKNOWN SHORT UNSIGNED-BYTE
Called by com_parameter()
.
antlr.RecognitionException
antlr.TokenStreamException
public final void reserved_variables() throws antlr.RecognitionException, antlr.TokenStreamException
reserved_functions()
.
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.
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 lvalue()
.
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:
Such keywords are included in both this rule and in
reserved_functions
.
antlr.RecognitionException
antlr.TokenStreamException
public final void subscript() throws antlr.RecognitionException, antlr.TokenStreamException
In Progress it is possible to reference a range of array elements in
some cases (e.g. the DISPLAY
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 FOR
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.
The resulting tree is rooted under the left bracket token and the right bracket is discarded.
When called during the processing of like_clause(java.lang.String, java.lang.Object, boolean)
, the expression
being matched is always converted into the equivalent of a
NUM_LITERAL
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:
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]. -> normally invalid since 0 is out of bounds! def var scalar4 like array[17]. -> normally invalid since 17 is out of bounds! def var scalar5 like array[trash]. -> normally invalid since trash is not a var! def var scalar6 like array[trash + junk]. -> normally invalid since trash and junk are not vars! def var scalar7 like array[1 + 2].
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.
In Progress, all of the above are treated as a like array[1]
though this is undocumented and non-intuitive. Either way, we do the
same thing.
This rule is only called by the lvalue()
rule.
antlr.RecognitionException
antlr.TokenStreamException
public final void likeSubscript() throws antlr.RecognitionException, antlr.TokenStreamException
RBRACKET
, discard these
and build an EXPRESSION -> NUM_LITERAL
subtree with the
value of 1. This is needed to support bizarre behavior of subscripts in
a like_clause(java.lang.String, java.lang.Object, boolean)
. It is called from subscript()
.antlr.RecognitionException
antlr.TokenStreamException
public final void ref_point() throws antlr.RecognitionException, antlr.TokenStreamException
at_phrase()
rule only.
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 frame_phrase(boolean, boolean)
. 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. Note that this rule checks the k=2
lookahead before matching the PLUS or MINUS
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!
antlr.RecognitionException
antlr.TokenStreamException
protected void buildTokenTypeASTClassMap()
private static final long[] mk_tokenSet_0()
private static final long[] mk_tokenSet_1()
private static final long[] mk_tokenSet_2()
private static final long[] mk_tokenSet_3()
private static final long[] mk_tokenSet_4()
private static final long[] mk_tokenSet_5()
private static final long[] mk_tokenSet_6()
private static final long[] mk_tokenSet_7()
private static final long[] mk_tokenSet_8()
private static final long[] mk_tokenSet_9()
private static final long[] mk_tokenSet_10()
private static final long[] mk_tokenSet_11()
private static final long[] mk_tokenSet_12()
private static final long[] mk_tokenSet_13()
private static final long[] mk_tokenSet_14()
private static final long[] mk_tokenSet_15()
private static final long[] mk_tokenSet_16()
private static final long[] mk_tokenSet_17()
private static final long[] mk_tokenSet_18()
private static final long[] mk_tokenSet_19()
private static final long[] mk_tokenSet_20()
private static final long[] mk_tokenSet_21()
private static final long[] mk_tokenSet_22()
private static final long[] mk_tokenSet_23()
private static final long[] mk_tokenSet_24()
private static final long[] mk_tokenSet_25()
private static final long[] mk_tokenSet_26()
private static final long[] mk_tokenSet_27()
private static final long[] mk_tokenSet_28()
private static final long[] mk_tokenSet_29()
private static final long[] mk_tokenSet_30()
private static final long[] mk_tokenSet_31()
private static final long[] mk_tokenSet_32()
private static final long[] mk_tokenSet_33()
private static final long[] mk_tokenSet_34()
private static final long[] mk_tokenSet_35()
private static final long[] mk_tokenSet_36()
private static final long[] mk_tokenSet_37()
private static final long[] mk_tokenSet_38()
private static final long[] mk_tokenSet_39()
private static final long[] mk_tokenSet_40()
private static final long[] mk_tokenSet_41()
private static final long[] mk_tokenSet_42()
private static final long[] mk_tokenSet_43()
private static final long[] mk_tokenSet_44()
private static final long[] mk_tokenSet_45()
private static final long[] mk_tokenSet_46()
private static final long[] mk_tokenSet_47()
private static final long[] mk_tokenSet_48()
private static final long[] mk_tokenSet_49()
private static final long[] mk_tokenSet_50()
private static final long[] mk_tokenSet_51()
private static final long[] mk_tokenSet_52()
private static final long[] mk_tokenSet_53()
private static final long[] mk_tokenSet_54()
private static final long[] mk_tokenSet_55()
private static final long[] mk_tokenSet_56()
private static final long[] mk_tokenSet_57()
private static final long[] mk_tokenSet_58()
private static final long[] mk_tokenSet_59()
private static final long[] mk_tokenSet_60()
private static final long[] mk_tokenSet_61()
private static final long[] mk_tokenSet_62()
private static final long[] mk_tokenSet_63()
private static final long[] mk_tokenSet_64()
private static final long[] mk_tokenSet_65()
private static final long[] mk_tokenSet_66()
private static final long[] mk_tokenSet_67()
private static final long[] mk_tokenSet_68()
private static final long[] mk_tokenSet_69()
private static final long[] mk_tokenSet_70()
private static final long[] mk_tokenSet_71()
private static final long[] mk_tokenSet_72()
private static final long[] mk_tokenSet_73()
private static final long[] mk_tokenSet_74()
private static final long[] mk_tokenSet_75()
private static final long[] mk_tokenSet_76()
private static final long[] mk_tokenSet_77()
private static final long[] mk_tokenSet_78()
private static final long[] mk_tokenSet_79()
private static final long[] mk_tokenSet_80()
private static final long[] mk_tokenSet_81()
private static final long[] mk_tokenSet_82()
private static final long[] mk_tokenSet_83()
private static final long[] mk_tokenSet_84()
private static final long[] mk_tokenSet_85()
private static final long[] mk_tokenSet_86()
private static final long[] mk_tokenSet_87()
private static final long[] mk_tokenSet_88()
private static final long[] mk_tokenSet_89()
private static final long[] mk_tokenSet_90()
private static final long[] mk_tokenSet_91()
private static final long[] mk_tokenSet_92()
private static final long[] mk_tokenSet_93()
private static final long[] mk_tokenSet_94()
private static final long[] mk_tokenSet_95()
private static final long[] mk_tokenSet_96()
private static final long[] mk_tokenSet_97()
private static final long[] mk_tokenSet_98()
private static final long[] mk_tokenSet_99()
private static final long[] mk_tokenSet_100()
private static final long[] mk_tokenSet_101()
private static final long[] mk_tokenSet_102()
private static final long[] mk_tokenSet_103()
private static final long[] mk_tokenSet_104()
private static final long[] mk_tokenSet_105()
private static final long[] mk_tokenSet_106()
private static final long[] mk_tokenSet_107()
private static final long[] mk_tokenSet_108()
private static final long[] mk_tokenSet_109()
private static final long[] mk_tokenSet_110()
private static final long[] mk_tokenSet_111()
private static final long[] mk_tokenSet_112()
private static final long[] mk_tokenSet_113()
private static final long[] mk_tokenSet_114()
private static final long[] mk_tokenSet_115()
private static final long[] mk_tokenSet_116()
private static final long[] mk_tokenSet_117()
private static final long[] mk_tokenSet_118()
private static final long[] mk_tokenSet_119()
private static final long[] mk_tokenSet_120()
private static final long[] mk_tokenSet_121()
private static final long[] mk_tokenSet_122()
private static final long[] mk_tokenSet_123()
private static final long[] mk_tokenSet_124()
private static final long[] mk_tokenSet_125()
private static final long[] mk_tokenSet_126()
private static final long[] mk_tokenSet_127()
private static final long[] mk_tokenSet_128()
private static final long[] mk_tokenSet_129()
private static final long[] mk_tokenSet_130()
private static final long[] mk_tokenSet_131()
private static final long[] mk_tokenSet_132()
private static final long[] mk_tokenSet_133()
private static final long[] mk_tokenSet_134()
private static final long[] mk_tokenSet_135()
private static final long[] mk_tokenSet_136()
private static final long[] mk_tokenSet_137()
private static final long[] mk_tokenSet_138()
private static final long[] mk_tokenSet_139()
private static final long[] mk_tokenSet_140()
private static final long[] mk_tokenSet_141()
private static final long[] mk_tokenSet_142()
private static final long[] mk_tokenSet_143()
private static final long[] mk_tokenSet_144()
private static final long[] mk_tokenSet_145()
private static final long[] mk_tokenSet_146()
private static final long[] mk_tokenSet_147()
private static final long[] mk_tokenSet_148()
private static final long[] mk_tokenSet_149()
private static final long[] mk_tokenSet_150()
private static final long[] mk_tokenSet_151()
private static final long[] mk_tokenSet_152()
private static final long[] mk_tokenSet_153()
private static final long[] mk_tokenSet_154()
private static final long[] mk_tokenSet_155()
private static final long[] mk_tokenSet_156()
private static final long[] mk_tokenSet_157()
private static final long[] mk_tokenSet_158()
private static final long[] mk_tokenSet_159()
private static final long[] mk_tokenSet_160()
private static final long[] mk_tokenSet_161()
private static final long[] mk_tokenSet_162()
private static final long[] mk_tokenSet_163()
private static final long[] mk_tokenSet_164()
private static final long[] mk_tokenSet_165()
private static final long[] mk_tokenSet_166()
private static final long[] mk_tokenSet_167()
private static final long[] mk_tokenSet_168()
private static final long[] mk_tokenSet_169()
private static final long[] mk_tokenSet_170()
private static final long[] mk_tokenSet_171()
private static final long[] mk_tokenSet_172()
private static final long[] mk_tokenSet_173()
private static final long[] mk_tokenSet_174()
private static final long[] mk_tokenSet_175()
private static final long[] mk_tokenSet_176()
private static final long[] mk_tokenSet_177()
private static final long[] mk_tokenSet_178()
private static final long[] mk_tokenSet_179()
private static final long[] mk_tokenSet_180()
private static final long[] mk_tokenSet_181()
private static final long[] mk_tokenSet_182()
private static final long[] mk_tokenSet_183()
private static final long[] mk_tokenSet_184()
private static final long[] mk_tokenSet_185()
private static final long[] mk_tokenSet_186()
private static final long[] mk_tokenSet_187()
private static final long[] mk_tokenSet_188()
private static final long[] mk_tokenSet_189()
private static final long[] mk_tokenSet_190()
private static final long[] mk_tokenSet_191()
private static final long[] mk_tokenSet_192()
private static final long[] mk_tokenSet_193()
private static final long[] mk_tokenSet_194()
private static final long[] mk_tokenSet_195()
private static final long[] mk_tokenSet_196()
private static final long[] mk_tokenSet_197()
private static final long[] mk_tokenSet_198()
private static final long[] mk_tokenSet_199()
private static final long[] mk_tokenSet_200()
private static final long[] mk_tokenSet_201()
private static final long[] mk_tokenSet_202()
private static final long[] mk_tokenSet_203()
private static final long[] mk_tokenSet_204()
private static final long[] mk_tokenSet_205()
private static final long[] mk_tokenSet_206()
private static final long[] mk_tokenSet_207()
private static final long[] mk_tokenSet_208()
private static final long[] mk_tokenSet_209()
private static final long[] mk_tokenSet_210()
private static final long[] mk_tokenSet_211()
private static final long[] mk_tokenSet_212()
private static final long[] mk_tokenSet_213()
private static final long[] mk_tokenSet_214()
private static final long[] mk_tokenSet_215()
private static final long[] mk_tokenSet_216()
private static final long[] mk_tokenSet_217()
private static final long[] mk_tokenSet_218()
private static final long[] mk_tokenSet_219()
private static final long[] mk_tokenSet_220()
private static final long[] mk_tokenSet_221()
private static final long[] mk_tokenSet_222()
private static final long[] mk_tokenSet_223()
private static final long[] mk_tokenSet_224()
private static final long[] mk_tokenSet_225()
private static final long[] mk_tokenSet_226()
private static final long[] mk_tokenSet_227()
private static final long[] mk_tokenSet_228()
private static final long[] mk_tokenSet_229()
private static final long[] mk_tokenSet_230()
private static final long[] mk_tokenSet_231()
private static final long[] mk_tokenSet_232()
private static final long[] mk_tokenSet_233()
private static final long[] mk_tokenSet_234()
private static final long[] mk_tokenSet_235()
private static final long[] mk_tokenSet_236()
private static final long[] mk_tokenSet_237()
private static final long[] mk_tokenSet_238()
private static final long[] mk_tokenSet_239()
private static final long[] mk_tokenSet_240()
private static final long[] mk_tokenSet_241()
private static final long[] mk_tokenSet_242()
private static final long[] mk_tokenSet_243()
private static final long[] mk_tokenSet_244()
private static final long[] mk_tokenSet_245()
private static final long[] mk_tokenSet_246()
private static final long[] mk_tokenSet_247()
private static final long[] mk_tokenSet_248()
private static final long[] mk_tokenSet_249()
private static final long[] mk_tokenSet_250()
private static final long[] mk_tokenSet_251()
private static final long[] mk_tokenSet_252()
private static final long[] mk_tokenSet_253()
private static final long[] mk_tokenSet_254()
private static final long[] mk_tokenSet_255()
private static final long[] mk_tokenSet_256()
private static final long[] mk_tokenSet_257()
private static final long[] mk_tokenSet_258()
private static final long[] mk_tokenSet_259()
private static final long[] mk_tokenSet_260()
private static final long[] mk_tokenSet_261()
private static final long[] mk_tokenSet_262()
private static final long[] mk_tokenSet_263()
private static final long[] mk_tokenSet_264()
private static final long[] mk_tokenSet_265()
private static final long[] mk_tokenSet_266()
private static final long[] mk_tokenSet_267()
private static final long[] mk_tokenSet_268()
private static final long[] mk_tokenSet_269()
private static final long[] mk_tokenSet_270()
private static final long[] mk_tokenSet_271()
private static final long[] mk_tokenSet_272()
private static final long[] mk_tokenSet_273()
private static final long[] mk_tokenSet_274()
private static final long[] mk_tokenSet_275()
private static final long[] mk_tokenSet_276()
private static final long[] mk_tokenSet_277()
private static final long[] mk_tokenSet_278()
private static final long[] mk_tokenSet_279()
private static final long[] mk_tokenSet_280()
private static final long[] mk_tokenSet_281()
private static final long[] mk_tokenSet_282()
private static final long[] mk_tokenSet_283()
private static final long[] mk_tokenSet_284()
private static final long[] mk_tokenSet_285()
private static final long[] mk_tokenSet_286()
private static final long[] mk_tokenSet_287()
private static final long[] mk_tokenSet_288()
private static final long[] mk_tokenSet_289()
private static final long[] mk_tokenSet_290()
private static final long[] mk_tokenSet_291()
private static final long[] mk_tokenSet_292()
private static final long[] mk_tokenSet_293()
private static final long[] mk_tokenSet_294()
private static final long[] mk_tokenSet_295()
private static final long[] mk_tokenSet_296()
private static final long[] mk_tokenSet_297()
private static final long[] mk_tokenSet_298()
private static final long[] mk_tokenSet_299()
private static final long[] mk_tokenSet_300()
private static final long[] mk_tokenSet_301()
private static final long[] mk_tokenSet_302()
private static final long[] mk_tokenSet_303()
private static final long[] mk_tokenSet_304()
private static final long[] mk_tokenSet_305()
private static final long[] mk_tokenSet_306()
private static final long[] mk_tokenSet_307()
private static final long[] mk_tokenSet_308()
private static final long[] mk_tokenSet_309()
private static final long[] mk_tokenSet_310()
private static final long[] mk_tokenSet_311()
private static final long[] mk_tokenSet_312()
private static final long[] mk_tokenSet_313()
private static final long[] mk_tokenSet_314()
private static final long[] mk_tokenSet_315()
private static final long[] mk_tokenSet_316()
private static final long[] mk_tokenSet_317()
private static final long[] mk_tokenSet_318()
private static final long[] mk_tokenSet_319()
private static final long[] mk_tokenSet_320()
private static final long[] mk_tokenSet_321()
private static final long[] mk_tokenSet_322()
private static final long[] mk_tokenSet_323()
private static final long[] mk_tokenSet_324()
private static final long[] mk_tokenSet_325()
private static final long[] mk_tokenSet_326()
private static final long[] mk_tokenSet_327()
private static final long[] mk_tokenSet_328()
private static final long[] mk_tokenSet_329()
private static final long[] mk_tokenSet_330()
private static final long[] mk_tokenSet_331()
private static final long[] mk_tokenSet_332()
private static final long[] mk_tokenSet_333()
private static final long[] mk_tokenSet_334()
private static final long[] mk_tokenSet_335()
private static final long[] mk_tokenSet_336()
private static final long[] mk_tokenSet_337()
private static final long[] mk_tokenSet_338()
private static final long[] mk_tokenSet_339()
private static final long[] mk_tokenSet_340()
private static final long[] mk_tokenSet_341()
private static final long[] mk_tokenSet_342()
private static final long[] mk_tokenSet_343()
private static final long[] mk_tokenSet_344()
private static final long[] mk_tokenSet_345()
private static final long[] mk_tokenSet_346()
private static final long[] mk_tokenSet_347()
private static final long[] mk_tokenSet_348()
private static final long[] mk_tokenSet_349()
private static final long[] mk_tokenSet_350()
private static final long[] mk_tokenSet_351()
private static final long[] mk_tokenSet_352()
private static final long[] mk_tokenSet_353()
private static final long[] mk_tokenSet_354()
private static final long[] mk_tokenSet_355()
private static final long[] mk_tokenSet_356()
private static final long[] mk_tokenSet_357()
private static final long[] mk_tokenSet_358()
private static final long[] mk_tokenSet_359()
private static final long[] mk_tokenSet_360()
private static final long[] mk_tokenSet_361()
private static final long[] mk_tokenSet_362()
private static final long[] mk_tokenSet_363()
private static final long[] mk_tokenSet_364()
private static final long[] mk_tokenSet_365()
private static final long[] mk_tokenSet_366()
private static final long[] mk_tokenSet_367()
private static final long[] mk_tokenSet_368()
private static final long[] mk_tokenSet_369()
private static final long[] mk_tokenSet_370()
private static final long[] mk_tokenSet_371()
private static final long[] mk_tokenSet_372()
private static final long[] mk_tokenSet_373()
private static final long[] mk_tokenSet_374()
private static final long[] mk_tokenSet_375()
private static final long[] mk_tokenSet_376()
private static final long[] mk_tokenSet_377()
private static final long[] mk_tokenSet_378()
private static final long[] mk_tokenSet_379()
private static final long[] mk_tokenSet_380()
private static final long[] mk_tokenSet_381()
private static final long[] mk_tokenSet_382()
private static final long[] mk_tokenSet_383()
private static final long[] mk_tokenSet_384()
private static final long[] mk_tokenSet_385()