public class SymbolResolver extends java.lang.Object implements ProgressParserTokenTypes
Provides support for the following namespaces:
All namespaces (except language keywords) provide a mapping between a symbol and an integer token type as defined by the Lexer and Parser. It is this token type that is returned from most lookup operations.
This class is aware of the parser token types and where necessary it
converts other values into the proper types for use in the parser.
At this time this feature is only needed for schema name lookups as
all other types are already normalized properly in the respective
dictionary. See lookupField(java.lang.String)
.
Only the variable, widget and label namespaces utilize multiple scoping levels at this time. All other namespaces are flat.
Modifier and Type | Class and Description |
---|---|
private static interface |
SymbolResolver.SchemaHelper<V>
Functional interface for use with lambdas.
|
private static class |
SymbolResolver.SearchResult
Store the data resulting from a given file system search.
|
private static class |
SymbolResolver.UsingSpec
Store the data in a USING statement.
|
private static class |
SymbolResolver.UsingType
Describes the type of the USING specification.
|
private static class |
SymbolResolver.WorkArea
Container with context-local data.
|
Modifier and Type | Field and Description |
---|---|
private static java.util.Set<java.lang.Integer> |
ACCESS_MODES
Possible access modes for object data members.
|
private boolean |
allow
Flag to globally enable/disable table promotion.
|
static java.lang.String |
ASSEMBLY_PATH
Relative location for project-specific .NET definitions.
|
private java.util.Map<java.lang.Integer,java.lang.Integer> |
attributes
Maps keyword token types to the correct attribute and method type.
|
private java.util.Map<java.lang.Integer,java.lang.String> |
attrTypes
Provides access to ATTR_CLASS or METH_CLASS class names.
|
private boolean |
caseSens
The legacy system's filesystem case-sensitivity.
|
static java.lang.String |
CLASS_EXT
Class or interface definition file extension.
|
static java.lang.String |
CLASS_MAP_FILE
Class or interface definition file extension.
|
static java.lang.String |
CLASS_SPLAT
Class or interface definition file search specification.
|
private java.util.Stack<ClassDefinition> |
currentCls
Current class or interface definition that is being created.
|
static java.lang.String |
DOTNET_PATH
Relative location for the .NET base definitions.
|
static java.lang.String |
dotnetPath
Relative location for the .NET base definitions.
|
private ScopedSymbolDictionary |
drelDict
Stores data-relation names.
|
private ScopedSymbolDictionary |
dsetDict
Stores dataset names.
|
private ScopedSymbolDictionary |
dsrcDict
Stores data-source names.
|
private java.util.Map<java.lang.String,SymbolResolver.UsingSpec> |
explPkgDict
Stores explicit package names.
|
private ScopedSymbolDictionary<java.util.Set<Aast>> |
fieldWidgetDict
Stores sets of database field widget ASTs, organized by their frame names
|
private ScopedSymbolDictionary |
frameDict
Stores frame names.
|
private ScopedSymbolDictionary |
funcDict
Stores function names and return types.
|
private AstGenerator |
generator
Used for recursive class or interface loading.
|
private boolean |
ignoreOORefs
Flag indicating OO refs should be ignored as we are in pre-scan mode.
|
private KeywordDictionary |
kwDict
Stores keywords and handles abbreviation support.
|
private ScopedSymbolDictionary |
labelDict
Stores label names.
|
private static ContextLocal<SymbolResolver.WorkArea> |
local
Context-local data.
|
private static java.util.Set<java.lang.Integer> |
MENU_CHILDREN_TYPES
Available menu children types.
|
private ScopedSymbolDictionary |
menuDict
Stores menu and sub-menu names.
|
private ScopedSymbolDictionary |
menuItemDict
Stores menu-item names.
|
private ClassDefinition |
MOCK_CLASS_DEF
Mock class to be able to parse OO references in pre-scan mode, without affecting the lookup,
as not all classes might be loaded.
|
static java.lang.String |
OO4GL_PATH
Relative location for the 4GL object-oriented base definitions.
|
static java.lang.String |
oo4glPath
Relative location for the 4GL object-oriented base definitions.
|
private ScopedSymbolDictionary |
procDict
Stores procedure names.
|
private java.lang.String[] |
propath
Current PROPATH.
|
private ScopedSymbolDictionary |
qryDict
Stores query names.
|
static java.lang.String |
ROOT_CLASS_NAME
Default parent of all classes if no explicit parent is specified.
|
static java.lang.String |
ROOT_OBJ_NAME
Default parent of all classes if no explicit parent is specified.
|
private SchemaDictionary |
schemaDict
Stores database object names (databases, tables and fields).
|
private java.util.Set<SymbolResolver.UsingSpec> |
searchPkgDict
Stores package search specifications.
|
private boolean |
silent
Flag indicating whether silent mode is required.
|
static java.lang.String |
SKELETON_PATH
Relative location for the non-project class/interface 4GL code.
|
static java.lang.String |
skeletonPath
Relative location for the non-project class/interface 4GL code.
|
private ScopedSymbolDictionary |
streamDict
Stores stream names.
|
private static java.util.Set<java.lang.Integer> |
SUBMENU_CHILDREN_TYPES
Available sub-menu children types.
|
private int |
tempIdx
AST-specific variable definition index workaround.
|
private ScopedSymbolDictionary<java.lang.Boolean> |
useDictExps
Stores the state of USE-DICT-EXPS flag for each frame.
|
private java.util.Map<java.lang.String,java.util.Set<java.util.Map.Entry>> |
varDefCache
Cache of local variables used to duplicate function signatures.
|
private ScopedSymbolDictionary |
varDict
Stores variables, both local (scoped) and global.
|
private ScopedSymbolDictionary |
widgetDict
Stores widget names.
|
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
Constructor and Description |
---|
SymbolResolver()
Default constructor that creates an instance with schema lookups
disabled.
|
SymbolResolver(boolean schema)
Constructs an instance with control over disabling schema lookups.
|
SymbolResolver(boolean schema,
boolean caseSens,
java.lang.String[] propath,
boolean silent)
Constructs an instance with control over disabling schema lookups.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttributeOrMethod(int ktype,
int rtype)
Adds an attribute or method keyword token type and the associated token
type of the data type (for attributes) or return type (for methods) to
the dictionary of attributes/methods.
|
void |
addAttributeOrMethod(int ktype,
int rtype,
java.lang.String cls)
Adds an attribute or method keyword token type and the associated token
type of the data type (for attributes) or return type (for methods) to
the dictionary of attributes/methods.
|
void |
addBuiltinFunction(java.lang.String name,
int tokenType,
boolean returnsUnknown)
Adds a built-in Progress function and its return type to the dictionary
of functions.
|
void |
addBuiltinFunction(java.lang.String name,
int tokenType,
boolean returnsUnknown,
java.lang.String qname)
Adds a built-in Progress function and its return type to the dictionary
of functions.
|
void |
addClass(Aast symbol,
Aast inherits,
Aast imple)
Adds a class name and a token type to the dictionary of classes.
|
void |
addClass(java.lang.String name,
ClassDefinition parent,
java.util.Set<java.lang.String> ifaces,
boolean builtin,
boolean dotnet)
Adds a class name and a token type to the dictionary of classes.
|
void |
addDataMember(java.lang.String name,
Aast access,
Aast stic,
java.lang.String qname)
Add the named variable as a data member of the currently active class
definition.
|
void |
addDataMember(java.lang.String name,
int type,
Aast access,
Aast stic,
java.lang.String qname)
Add the named variable as a data member of the currently active class
definition.
|
void |
addDataMember(java.lang.String name,
int access,
boolean isStatic,
java.lang.String qname)
Add the named variable as a data member of the currently active class
definition.
|
void |
addDataMember(java.lang.String name,
int type,
int access,
boolean isStatic,
java.lang.String qname)
Add the named variable as a data member of the currently active class
definition.
|
void |
addDataRelation(java.lang.String name,
int tokenType)
Adds a data-relation and a token type to the dictionary of
data-relations.
|
void |
addDataSet(java.lang.String name,
int tokenType,
Aast am,
Aast st)
Adds a dataset and a token type to the dictionary of datasets.
|
void |
addDataSource(java.lang.String name,
int tokenType,
Aast am,
Aast st)
Adds a data-source and a token type to the dictionary of data-sources.
|
java.lang.Object |
addField(java.lang.Object table,
java.lang.String field,
int ftype,
Aast node)
Allows the addition of a new field of any Progress data type to a
specific table in the schema namespace.
|
Aast |
addFieldLike(java.lang.Object table,
java.lang.String field,
Aast ast)
Allows the addition of a new field of any Progress data type to a
specific table in the schema namespace based on reference to an already
existing variable or field.
|
Aast[] |
addFieldsFrom(java.lang.Object table,
java.lang.String tablename)
Allows the addition of a list of fields (as defined in an existing
table) to a specific table in the schema namespace.
|
Aast[] |
addFieldsFrom(java.lang.Object table,
java.lang.String tablename,
boolean skipGlobal)
Allows the addition of a list of fields (as defined in an existing
table) to a specific table in the schema namespace.
|
void |
addFrame(java.lang.String name,
int tokenType)
Adds a frame and a token type to the dictionary of frames.
|
void |
addFrameField(java.lang.String frame,
Aast field)
Map a field reference ASTs to the name of the frame in which it resides as a widget.
|
void |
addFrameFields(java.lang.String frame,
java.util.Collection<Aast> fields)
Map a collection of field reference ASTs to the name of the frame in which they reside as
widgets.
|
void |
addFunction(java.lang.String name,
int tokenType,
java.lang.String qname)
Adds a user-defined function and its return type to the dictionary
of functions.
|
void |
addGlobalVariable(java.lang.String name,
int tokenType)
Adds a variable name and associated token type to the global scope
of the variable dictionary.
|
void |
addGlobalVariable(java.lang.String name,
int tokenType,
java.lang.String cls)
Adds a variable name and associated token type to the global scope
of the variable dictionary.
|
void |
addIndex(java.lang.Object table,
java.lang.String name,
Aast ast)
Adds an index as defined in the source code into the temp-table that
is passed in.
|
void |
addIndexFrom(java.lang.Object table,
Aast node,
java.lang.String name,
boolean primary)
Adds an index from the original source table into the temp-table that
is passed in.
|
void |
addInterface(Aast symbol)
Adds a class name and a token type to the dictionary of classes.
|
void |
addInterface(java.lang.String name,
boolean builtin,
boolean dotnet)
Adds a class name and a token type to the dictionary of classes.
|
void |
addKeyword(Keyword word)
Adds a
Keyword to the keyword dictionary. |
void |
addLabel(java.lang.String name,
int tokenType)
Adds a label and a token type to the dictionary of labels.
|
void |
addLocalVariable(java.lang.String name,
int tokenType,
java.lang.String cls)
Adds a variable name and associated token type to the current scope
of the variable dictionary.
|
void |
addLocalVariableLike(java.lang.String name,
Aast ast)
Adds a variable name and associated token type/options to the current
scope of the variable dictionary based on a referenced variable or
schema field in a
LIKE clause. |
void |
addMenu(java.lang.String name,
int tokenType)
Adds a menu or sub-menu and a token type to the dictionary of menus.
|
void |
addMenuItem(java.lang.String name,
int tokenType)
Adds a menu-item and a token type to the dictionary of menu-items.
|
void |
addMenuLike(java.lang.String name,
java.lang.String oldname,
Aast ast)
Adds a menu name and associated token type/options to the menu dictionary
based on a referenced variable in a
LIKE clause. |
void |
addObjectMethod(java.lang.String name,
int mtype,
int access,
boolean isStatic,
Aast node,
java.lang.String qname)
Add the named method to the currently active class definition.
|
void |
addPackage(java.lang.String name,
Aast fromClause)
Adds a package search specification ("package.*") or a fully qualified
class name ("package.class") to the list of known packages.
|
void |
addProcedure(java.lang.String name,
int tokenType)
Adds a procedure and a token type to the dictionary of procedures.
|
void |
addQuery(java.lang.String name,
int tokenType,
Aast am,
Aast st)
Adds a query and a token type to the dictionary of queries.
|
void |
addSchemaScope(boolean mark)
Adds a record scope to the schema namespace to the top of the stack
of scopes.
|
void |
addScope()
Increases the scoping level of the variable and widget dictionaries by
1 level.
|
void |
addStream(java.lang.String name,
int tokenType)
Adds a stream and a token type to the dictionary of streams.
|
java.lang.Object |
addTable(java.lang.String tablename,
int type,
boolean global,
Aast node,
Aast am,
Aast st)
Allows the addition of a new table of any type (table, buffer,
temp-table or work-table) to the schema namespace.
|
void |
addVariable(boolean global,
Variable var)
Adds a variable name and associated token type to the appropriate scope
of the variable dictionary, based on the content of the passed in
Variable wrapper object. |
void |
addWidget(boolean global,
Variable wid)
Adds a widget name and associated token type to the appropriate scope
of the widget dictionary, based on the content of the passed in
Variable wrapper object. |
void |
addWidget(java.lang.String name,
int tokenType)
Adds a widget and a token type to the dictionary of widgets.
|
private void |
addWrappedWorker(ScopedSymbolDictionary ssd,
boolean global,
java.lang.String name,
TokenDataWrapper wrapped)
Centralizes the process of setting an file-unique temporary index for
each new wrapped object and then adding that object to the passed-in
dictionary.
|
void |
allowPromotion(boolean allow)
Globally enable or disable schema table name promotion.
|
void |
annotateClassRef(java.lang.String qname,
Aast node)
Annotate the given node which is a reference to the named class.
|
void |
annotateField(Aast field,
java.lang.Object table,
boolean setType,
boolean promote)
Stores common data (schemaname, bufname, recordtype) as well as
all non-standard options as annotations to the AST passed as
a parameter.
|
void |
annotateFunction(java.lang.String name,
Aast ast,
boolean original)
Stores all non-standard options as annotations to the AST passed as
a parameter if this is the original definition, otherwise it stores
a subset of values, most important of which is the cross-reference
index to allow the original definition to be easily identified and
accessed from a reference.
|
void |
annotateObjectMethod(java.lang.String cname,
java.lang.String mname,
boolean isStatic,
Aast node)
Annotate the given method invocation reference with details for the specified method
in this class.
|
void |
annotateVariableOptions(java.lang.String name,
Aast ast,
boolean original)
Stores all non-standard options as annotations to the AST passed as
a parameter if this is the original definition, otherwise it stores
a subset of values, most important of which is the cross-reference
index to allow the original definition to be easily identified and
accessed from a reference.
|
private int |
calcAccessMode(java.lang.String cname)
Calculates the access mode for method and data member searches of
class definitions, based on the presence and contents of the given
class name and the current context.
|
boolean |
canLoadClass(java.lang.String name)
Attempt to load the class or interface name given.
|
void |
classDefinitionComplete()
Notify the symbol resolver that the current class or interface
definition is complete.
|
void |
cleanupObjectResources()
Cleanup any object resources which should not remain in memory.
|
private java.lang.String |
convertSeparator(java.lang.String name)
Convert any "." characters (in a Progress qualified class or interface
name) to the current system's file name separator string.
|
static void |
createClassMappings(java.util.Map<java.lang.String,java.lang.String> map,
java.lang.String[] list,
java.lang.String path,
boolean caseSens)
Store each element of the list as a key in the map and create a filename
as the mapped value (using the path + the key).
|
Aast |
createField(java.lang.String name)
Creates a new field AST node based on a qualified or unqualified
field name (must be unambiguous) and sets the token type, text and
all annotations as needed.
|
private int |
decodeAccessMode(Aast am)
Return the access mode as encoded by the AST type.
|
private boolean |
decodeStatic(Aast st)
Return the static mode as encoded by the AST type.
|
void |
deleteLabel()
Deletes the current label from the dictionary of labels.
|
void |
deleteSchemaScope(boolean propagate)
Deletes the current record scope in the schema namespace (the top of
the stack of scopes).
|
void |
deleteScope()
Decreases the scoping level of the variable and widget dictionaries by
1 level.
|
void |
dump()
Prints a report to
stderr with the listing of each
dictionary. |
void |
dumpSchema()
Prints a report to
schema.dmp with the listing of all
current contents of the Schema Dictionary. |
private boolean |
exists(java.io.File file,
boolean caseSens)
Implements a check for the file's existence while honoring the
case-sensitive file-system flag.
|
java.util.Iterator<Aast> |
fields(java.lang.String table)
Get an iterator on all of the field ASTs defined for a given table.
|
void |
finalizeTableDefine(java.lang.Object table)
Notifies the schema dictionary that the end of a temp-table definition
has been reached.
|
private boolean |
findFile(java.lang.String name,
SymbolResolver.UsingType type,
SymbolResolver.SearchResult result)
Search the PROPATH for a specific class or interface.
|
static java.lang.String[] |
getClassFileList(java.lang.String path,
boolean caseSens)
List the 4GL class/interface files in a given path.
|
private static java.util.ArrayList<java.io.File> |
getClassFiles(java.lang.String path)
List the 4GL class/interface files in a given path.
|
ClassDefinition |
getCurrentClassDef()
Obtain the currently active class or interface definition.
|
java.lang.String |
getCurrentClassName()
Obtain the name of the currently active class definition.
|
ClassDefinition |
getCurrentParentDef()
Obtain the parent of the currently active class definition.
|
java.lang.String |
getCurrentParentName()
Obtain the name of the parent of the currently active class definition.
|
private int |
getExtentSubscript(Aast ast)
Given an AST which represents a field or variable which possibly has
an extent, check for a subscript and return it.
|
java.util.Set<Aast> |
getFrameFields(java.lang.String frame)
Get the set of field reference ASTs associated with a particular frame.
|
java.lang.String[] |
getPropath()
Gets the
PROPATH . |
private static void |
initPossibleClasses(java.lang.String[] propath,
boolean caseSens)
Initialize the maps of all possible class and interface definitions that
exist in the project.
|
static void |
initSkeletonPath()
Override the default skeleton path if it is configured.
|
boolean |
isBuiltInClass(java.lang.String name)
Check if the given class is built-in.
|
boolean |
isDotNetClass(java.lang.String name)
Check if the given class is a .NET class.
|
boolean |
isField(java.lang.String name)
Searches the schema dictionary for a field matching the passed
key and returns a boolean reporting if it is a valid field or not.
|
boolean |
isStaticDataMember(java.lang.String cname,
java.lang.String name)
Reports if the given data member is a static member of the given class.
|
boolean |
isStaticMethod(java.lang.String cname,
java.lang.String name)
Reports if the given method is a static member of the given class.
|
boolean |
isTable(java.lang.String name)
Searches the schema dictionary for a table matching the passed
key and returns a boolean reporting if it is a valid table or not.
|
boolean |
isUseDictExps(java.lang.String frame)
Check if the USE-DICT-EXPS option is active for the given frame.
|
private int |
keywordToFieldType(int ktype)
Map the keyword type to the corresponding field type.
|
static java.lang.String[] |
listFakeoutFiles()
Obtain the list of all "fakeout" class and interface definitions that
exist in the project.
|
void |
loadAliases(java.util.List list)
Adds a list of aliases (each to an associated database name) to the
schema dictionary.
|
java.lang.String |
loadClass(java.lang.String name)
Load (using recursion if needed) the hierarchy of class definitions (or
a single interface definition) referenced by the given name.
|
void |
loadSchemaDatabases(java.lang.String[] dblist)
Loads a list of databases into the schema dictionary.
|
void |
loadVariableSymbols(Variable[] varlist)
Helper to load variable, widget and frame dictionaries based on a list
of
Variable objects. |
private static SymbolResolver.WorkArea |
locate()
Get the context-local
SymbolResolver.WorkArea instance. |
int |
lookupAttributeOrMethod(int ktype)
Searches the attribute and method dictionary for a token type matching
the passed keyword.
|
java.lang.String |
lookupAttributeOrMethodClass(int ktype)
Searches the attribute and method dictionary for the fully qualified
class name that is the actual type of an
ATTR_CLASS or
METH_CLASS matching the given keyword. |
java.lang.String |
lookupBufferName(java.lang.String name,
boolean field)
Returns the shortest unique non-abbreviated buffer name for a field
or table reference.
|
ClassDefinition |
lookupClass(java.lang.String name)
Searches the class dictionary for a definition matching the passed key.
|
int |
lookupDatabase(java.lang.String name)
Searches the schema dictionary for a database matching the passed
key.
|
java.lang.String |
lookupDatabaseName(java.lang.String name)
Returns the logical database name being used for a given table
reference.
|
int |
lookupDataMember(java.lang.String cname,
java.lang.String name)
Searches the named class' hierarchy for the named data member.
|
int |
lookupDataMember(java.lang.String cname,
java.lang.String name,
boolean isStatic)
Searches the named class' hierarchy for the named data member.
|
java.lang.String |
lookupDataMemberClass(java.lang.String cname,
java.lang.String name,
boolean isStatic)
Searches the named class' hierarchy for the named data member and
returns the fully qualified class name if that member represents an
object instance.
|
int |
lookupDataRelation(java.lang.String name)
Searches the data-relation dictionary for a symbol matching the passed
key.
|
int |
lookupDataSet(java.lang.String name)
Searches the dataset dictionary for a symbol matching the passed
key.
|
int |
lookupDataSource(java.lang.String name)
Searches the data-source dictionary for a symbol matching the passed
key.
|
int |
lookupField(java.lang.String name)
Searches the schema dictionary for a field matching the passed
key.
|
Aast |
lookupFieldAst(java.lang.String name)
Look up and return the AST which represents a database field in a schema, given the field's
name.
|
FieldInfo |
lookupFieldInfo(NameNode table,
java.lang.String name)
Look up and return the field info instance which describes a database field in a schema,
given the field's name and an optional table name-node.
|
int |
lookupFieldRecordType(java.lang.String name)
Searches the schema dictionary for a field matching the passed
name and then will return the token type of the backing construct
(table, temp-table or work-table) to which this record belongs.
|
int |
lookupFrame(java.lang.String name)
Searches the frame dictionary for a symbol matching the passed
key.
|
java.lang.String |
lookupFullFieldName(java.lang.String name)
Returns the fully qualified name for a field matching the passed
key.
|
java.lang.String |
lookupFullTableName(java.lang.String name)
Returns the fully qualified name for a table matching the passed
key.
|
int |
lookupFunction(java.lang.String actual)
Searches the function dictionary for a symbol matching the passed
key or matching a keyword's full text if the symbol matches a language
keyword.
|
Function |
lookupFunctionDef(java.lang.String actual)
Searches the function dictionary for a symbol matching the passed
key or matching a keyword's full text if the symbol matches a language
keyword.
|
Keyword |
lookupKeyword(java.lang.String key)
Searches for a
Keyword in the keyword dictionary, based
on a specific key. |
int |
lookupLabel(java.lang.String name)
Searches the label dictionary for a symbol matching the passed
key.
|
int |
lookupMenu(java.lang.String name)
Searches the menu dictionary for a symbol matching the passed
key.
|
int |
lookupMenuItem(java.lang.String name)
Searches the menu-item dictionary for a symbol matching the passed
key.
|
int |
lookupObjectMethod(java.lang.String cname,
java.lang.String method)
Searches the named class' hierarchy for the named method.
|
int |
lookupObjectMethod(java.lang.String cname,
java.lang.String method,
boolean isStatic)
Searches the named class' hierarchy for the named method.
|
java.lang.String |
lookupObjectMethodClass(java.lang.String cname,
java.lang.String method,
boolean isStatic)
Searches the named class' hierarchy for the named method and returns
the fully qualified class name if that method returns an object
instance.
|
int |
lookupProcedure(java.lang.String name)
Searches the procedure dictionary for a symbol matching the passed
key.
|
int |
lookupQuery(java.lang.String name)
Searches the query dictionary for a symbol matching the passed
key.
|
int |
lookupStream(java.lang.String name)
Searches the stream dictionary for a symbol matching the passed
key.
|
int |
lookupTable(java.lang.String name)
Searches the schema dictionary for a table matching the passed
key.
|
Aast |
lookupTableAst(java.lang.String name)
Look up and return the AST which represents a database table in a schema, given the table's
name.
|
int |
lookupTableRecordType(java.lang.String name)
Searches the schema dictionary for a record matching the passed
name and then will return the token type of the backing construct
(table, temp-table or work-table) to which this record belongs.
|
int |
lookupVariable(java.lang.String actual)
Searches the variable dictionary for a symbol matching the passed
key or matching a keyword's full text if the symbol matches a language
keyword.
|
int |
lookupWidget(java.lang.String name)
Searches the widget dictionary for a symbol matching the passed
key.
|
private int |
lookupWorker(ScopedSymbolDictionary dict,
java.lang.String actual)
Multi-level lookup routine for processing searches on variable and
function dictionaries based on
the
ScopedSymbolDictionary class. |
private int |
lookupWorkerExact(ScopedSymbolDictionary dict,
java.lang.String name)
Primary worker routine for processing searches on dictionaries based on
the
ScopedSymbolDictionary class. |
TokenDataWrapper |
lookupWrapped(ScopedSymbolDictionary ssd,
java.lang.String actual)
Searches a dictionary containing
TokenDataWrapper objects for a
symbol matching the passed key or matching a keyword's full text if the
symbol matches a language keyword. |
TokenDataWrapper |
lookupWrapped(java.lang.String actual,
ScopedSymbolDictionary<?>... ssds)
Searches a dictionaries containing
TokenDataWrapper objects for a
symbol matching the passed key or matching a keyword's full text if the
symbol matches a language keyword. |
int |
lookupWrappedType(TokenDataWrapper wrapped)
Returns the token type from the passed wrapped object or -1 for an
is invalid
TokenDataWrapper object. |
boolean |
markPreferred(boolean preferred)
Set the
SchemaDictionary.markPreferred flag, so all info for the tables which are
weak references will be collected in the preferred nodes for the current scope. |
void |
markUseDictExps(java.lang.String frame)
Set the USE-DICT-EXPS for this frame, if not already set.
|
void |
persistSchemaData(java.lang.String srcFile,
java.lang.String schemaFile)
Persist schema dictionary information which is specific to the source
file currently being parsed.
|
private boolean |
pkgExists(java.lang.String pkg)
Test if the given package exists in the PROPATH, or in the 4GL system
packages or in the .NET system namespaces.
|
private <V> V |
processHierarchy(SymbolResolver.SchemaHelper<V> worker,
java.util.function.Predicate<V> cont)
Process a request for the schema dictionary.
|
void |
processLikeField(Aast field,
boolean hasValidate,
java.lang.String sourceSchemaName)
Post-process the given field, in terms of honoring the VALIDATE clause, if present.
|
void |
promoteTable(java.lang.Object table,
boolean force,
boolean noProp)
Promotes a table (and all its fields) into the current top scope of
the schema dictionary's stack of scopes.
|
void |
promoteTableName(java.lang.String table,
boolean force,
boolean noProp)
Promotes a table (and all its fields) into the current top scope of
the schema dictionary's stack of scopes.
|
void |
removeBuiltinFunction(Keyword word)
Removes any function associated with this
Keyword from the builtin
function dictionary. |
void |
removeGlobalVariable(Keyword word)
Removes any global variable associated with this
Keyword from the variable
dictionary. |
void |
removeKeyword(Keyword word)
Removes a
Keyword from the keyword dictionary. |
void |
removeLocalVariables(java.lang.String name)
Remove any previously cached variable dictionary definitions without restoring them
to the current scope.
|
SymbolResolver.SearchResult |
resolveClassName(java.lang.String name)
Converts any unqualified class or interface names into the fully
qualified name (which has a package included).
|
boolean |
restoreLocalVariables(java.lang.String name)
Restore any previously cached variable dictionary definitions into the current scope.
|
void |
saveLocalVariables(java.lang.String name)
Save off the variable dictionary definitions for the current scope into a cache.
|
private static void |
scan(java.io.File dir,
java.util.ArrayList<java.io.File> results)
Core implementation of the listing algorithm which uses the
File class to make a complete list of the directory
contents, then this list is used to build a filtered list of just
those files that match the user-defined regular expression. |
void |
setFieldOptions(java.lang.String name,
Aast ast)
Inspect the field definition and write any options into the field
object.
|
void |
setIgnoreOORefs(boolean state)
Set the
ignoreOORefs flag. |
void |
setPropath(java.lang.String[] propath)
Sets the
PROPATH . |
void |
setSchemaDictionary(SchemaDictionary schemaDict)
Enables schema dictionary lookups when they are disabled at construction
and provides external control or sourcing over the schema dictionary.
|
void |
setTableOption(java.lang.Object table,
int token,
Aast node)
Sets specific conditions on a temp-table definition based on
encountering certain tokens in the source code.
|
void |
setVariableOptions(java.lang.String name,
Aast ast)
Inspect the variable definition and write any non-default options into
the variable object.
|
java.lang.String |
tryLoadClass(java.lang.String name)
Attempt to load the class or interface name given.
|
private static final java.util.Set<java.lang.Integer> ACCESS_MODES
private static final java.util.Set<java.lang.Integer> MENU_CHILDREN_TYPES
private static final java.util.Set<java.lang.Integer> SUBMENU_CHILDREN_TYPES
public static final java.lang.String CLASS_EXT
public static final java.lang.String CLASS_SPLAT
public static final java.lang.String CLASS_MAP_FILE
public static final java.lang.String ROOT_OBJ_NAME
public static final java.lang.String ROOT_CLASS_NAME
public static final java.lang.String SKELETON_PATH
public static final java.lang.String OO4GL_PATH
public static final java.lang.String DOTNET_PATH
public static final java.lang.String ASSEMBLY_PATH
public static java.lang.String skeletonPath
public static java.lang.String oo4glPath
public static java.lang.String dotnetPath
private static final ContextLocal<SymbolResolver.WorkArea> local
private final ClassDefinition MOCK_CLASS_DEF
private KeywordDictionary kwDict
private ScopedSymbolDictionary varDict
private java.util.Map<java.lang.String,java.util.Set<java.util.Map.Entry>> varDefCache
private ScopedSymbolDictionary funcDict
private ScopedSymbolDictionary procDict
private java.util.Map<java.lang.String,SymbolResolver.UsingSpec> explPkgDict
private java.util.Set<SymbolResolver.UsingSpec> searchPkgDict
private ScopedSymbolDictionary labelDict
private SchemaDictionary schemaDict
private ScopedSymbolDictionary widgetDict
private ScopedSymbolDictionary frameDict
private ScopedSymbolDictionary<java.util.Set<Aast>> fieldWidgetDict
private ScopedSymbolDictionary<java.lang.Boolean> useDictExps
private ScopedSymbolDictionary menuDict
private ScopedSymbolDictionary menuItemDict
private ScopedSymbolDictionary streamDict
private ScopedSymbolDictionary qryDict
private ScopedSymbolDictionary dsetDict
private ScopedSymbolDictionary dsrcDict
private ScopedSymbolDictionary drelDict
private java.util.Map<java.lang.Integer,java.lang.Integer> attributes
private java.util.Map<java.lang.Integer,java.lang.String> attrTypes
private java.util.Stack<ClassDefinition> currentCls
private int tempIdx
private java.lang.String[] propath
private boolean caseSens
private AstGenerator generator
private boolean silent
private boolean allow
private boolean ignoreOORefs
public SymbolResolver()
public SymbolResolver(boolean schema)
schema
- true
enables schema dictionary support.public SymbolResolver(boolean schema, boolean caseSens, java.lang.String[] propath, boolean silent)
schema
- true
enables schema dictionary support.caseSens
- true
if the legacy system had a case-sensitive file-system.propath
- The current PROPATH
to honor or null
for the default
of ".".silent
- Flag indicating if Sytsem.out
output should be suppressed.public static void initSkeletonPath()
public static java.lang.String[] listFakeoutFiles()
.cls
files represent the
Progress built-ins and all .NET classes/interfaces that can be accessed.
These files will be listed in the directories represented by the
OO4GL_PATH
, DOTNET_PATH
and the ASSEMBLY_PATH
.
.cls
files, in the same case in which
they exist in the filesystem.public static java.lang.String[] getClassFileList(java.lang.String path, boolean caseSens)
path
- The directory to search.caseSens
- true
if the legacy system had a case-sensitive
file-system.public static void createClassMappings(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String[] list, java.lang.String path, boolean caseSens)
map
- The map to modify.list
- The elements to add.path
- The root path in which all elements reside.caseSens
- true
if the legacy system had a case-sensitive
file-system.private static SymbolResolver.WorkArea locate()
SymbolResolver.WorkArea
instance.public void setSchemaDictionary(SchemaDictionary schemaDict)
schemaDict
- The schema dictionary to use.public void setIgnoreOORefs(boolean state)
ignoreOORefs
flag.state
- The state of ignore OO refs mode.public java.lang.String[] getPropath()
PROPATH
.PROPATH
to honor.public void setPropath(java.lang.String[] propath)
PROPATH
.propath
- The current PROPATH
to honor or null
for the default of ".".public void addKeyword(Keyword word)
Keyword
to the keyword dictionary.word
- Keyword
to add.public void removeKeyword(Keyword word)
Keyword
from the keyword dictionary.word
- Keyword
to remove.public Keyword lookupKeyword(java.lang.String key)
Keyword
in the keyword dictionary, based
on a specific key.key
- Text string to match.Keyword
that was found or null if no match
was found.public void addScope()
public void deleteScope()
public void persistSchemaData(java.lang.String srcFile, java.lang.String schemaFile) throws AstException
srcFile
- Name of the 4GL source code file containing the schema
definitions being persisted.schemaFile
- Name of schema persistence file.AstException
- if any error occurs writing persistence file.public void addVariable(boolean global, Variable var)
Variable
wrapper object.global
- Add to global scope if true
.var
- Variable to add.public void addWidget(boolean global, Variable wid)
Variable
wrapper object.global
- Add to global scope if true
.wid
- Widget as represented in a Variable
object.public void loadVariableSymbols(Variable[] varlist)
Variable
objects. This processing will load all 3
dictionaries from the same list, however it must be noted that adding
a variable does NOT result in a matching widget of the same name in
the widget dictionary (even though this is essentially what happens
when the parser adds new variables to the variable dictionary). To
acheive this same effect, one must add multiple Variable
objects to the list as needed.
A field can be added to this lookup by using a field token type instead of a variable token type. This will allow an ambiguous field reference to be made unambiguous since variable lookups are processed before any schema dictionary lookups.
varlist
- List of variables, widgets, frames or fields to add to the
appropriate dictionary.public void addGlobalVariable(java.lang.String name, int tokenType)
name
- Variable name to add.tokenType
- Lexer and Parser token type associated with the name.public void addGlobalVariable(java.lang.String name, int tokenType, java.lang.String cls)
name
- Variable name to add.tokenType
- Lexer and Parser token type associated with the name.cls
- Fully qualified class name of the object instance represented
or null
if this variable does not represent an
object instance.public void removeGlobalVariable(Keyword word)
Keyword
from the variable
dictionary. This is only safe to call BEFORE real parsing begins.word
- Keyword
to remove (if it exists).public void addLocalVariable(java.lang.String name, int tokenType, java.lang.String cls)
name
- Variable name to add.tokenType
- Lexer and Parser token type associated with the name.cls
- Fully qualified class name of the object instance represented
or null
if this variable does not represent an
object instance.public void addMenuLike(java.lang.String name, java.lang.String oldname, Aast ast)
LIKE
clause.name
- Menu name to add.ast
- DEFINE_MENU or DEFINE_SUB_MENU AST node.public void addLocalVariableLike(java.lang.String name, Aast ast)
LIKE
clause. This is the same as the
top-most scope. Names in this scope can hide duplicate names added to
scopes that are lower on the stack of scopes.name
- Variable name to add.ast
- AST node containing the like clause.public void saveLocalVariables(java.lang.String name)
name
- The name by which the saved definitions can be restored.public boolean restoreLocalVariables(java.lang.String name)
Any cached definitions will be removed from the cache.
name
- The name by which the saved definitions can be located.true
if there were variable definitions restored.public void removeLocalVariables(java.lang.String name)
name
- The name by which the saved definitions can be located.public void setVariableOptions(java.lang.String name, Aast ast)
name
- The variable name which must have its options set.ast
- The tree to inspect which defines a Progress variable.public void annotateVariableOptions(java.lang.String name, Aast ast, boolean original)
name
- The variable name which must have its options annotated.ast
- The AST to annotate.original
- true
if this is to annotate the AST of the
original definition, false
if the AST is only
a reference.public Aast createField(java.lang.String name)
annotateField(com.goldencode.ast.Aast, java.lang.Object, boolean, boolean)
method for the core of the lookup and
annotation logic.
No table promotion will occur based on this field name, even if it is a qualified name.
name
- The field name from which to obtain options and type.public void annotateField(Aast field, java.lang.Object table, boolean setType, boolean promote)
If the field cannot be found due to ambiguity (more than 1 match), the method will return with no resulting changes.
If no such field exists, some default annotations will be set to "unknown".
field
- The AST to annotate.table
- If the field's table is known, this is the name-node for that table.
Passing this will narrow the lookup just to that table. Pass null
to do a normal schema namespace lookup (with all the ambiguity and other
problems that could occur).setType
- If true
, the AST node will have its type set
based on the field found in the schema dictionary.promote
- true
to force the promotion (in the schema
dictionary) of the table if the field's name is qualified.public int lookupVariable(java.lang.String actual)
actual
- Actual text string to match which may be a language keyword
abbreviation.public TokenDataWrapper lookupWrapped(ScopedSymbolDictionary ssd, java.lang.String actual)
TokenDataWrapper
objects for a
symbol matching the passed key or matching a keyword's full text if the
symbol matches a language keyword. This lookup starts at the top-most
scoping level and descends through each scope level on the stack until
a match is found. The wrapped object of the first match found is
returned.ssd
- The dictionary to search.actual
- Actual text string to match which may be a language keyword
abbreviation.null
if no
match was found.public TokenDataWrapper lookupWrapped(java.lang.String actual, ScopedSymbolDictionary<?>... ssds)
TokenDataWrapper
objects for a
symbol matching the passed key or matching a keyword's full text if the
symbol matches a language keyword. This lookup starts at the top-most
scoping level and descends through each scope level on the stack until
a match is found. The wrapped object of the first match found is
returned.actual
- Actual text string to match which may be a language keyword
abbreviation.ssds
- An array of dictionaries to search.null
if no
match was found.public void addFunction(java.lang.String name, int tokenType, java.lang.String qname)
Function
object
is the value. Since the dictionary is flat, all function names must be
unique.
Due to the Progress forward definition capability, this function only adds to the dictionary the first time this method is called for a given name.
name
- Function name.tokenType
- The token type of the function's return value as defined by
the Lexer and Parser.qname
- Fully qualified class name for functions that return an
object instance, otherwise null
.public void addBuiltinFunction(java.lang.String name, int tokenType, boolean returnsUnknown, java.lang.String qname)
Function
object
is the value. Since the dictionary is flat, all function names must be
unique.name
- Function name.tokenType
- The token type of the function's return value as defined by
the Lexer and Parser.returnsUnknown
- Specifies if this built-in function can possibly return
the unknown value.qname
- Fully qualified class name for functions that return an
object instance, otherwise null
.public void addBuiltinFunction(java.lang.String name, int tokenType, boolean returnsUnknown)
Function
object
is the value. Since the dictionary is flat, all function names must be
unique.name
- Function name.tokenType
- The token type of the function's return value as defined by
the Lexer and Parser.returnsUnknown
- Specifies if this built-in function can possibly return
the unknown value.public int lookupFunction(java.lang.String actual)
actual
- Actual text string to match which may be a language keyword
abbreviation.public Function lookupFunctionDef(java.lang.String actual)
actual
- Actual text string to match which may be a language keyword
abbreviation.null
if no match was
found.public void removeBuiltinFunction(Keyword word)
Keyword
from the builtin
function dictionary. This is only safe to call BEFORE real parsing begins.word
- Keyword
to remove (if it exists).public void annotateFunction(java.lang.String name, Aast ast, boolean original)
name
- The function name which must have its options annotated.ast
- The AST to annotate.original
- true
if this is to annotate the AST of the
original definition, false
if the AST is only
a reference.public void addProcedure(java.lang.String name, int tokenType)
name
- Procedure name.tokenType
- The procedure's token type as defined by the Lexer and Parser.public int lookupProcedure(java.lang.String name)
name
- Text string to match.public void addClass(Aast symbol, Aast inherits, Aast imple)
symbol
- Node defining the fully qualified (including package) class
name.inherits
- Node defining the fully qualified name of the superclass or
null
for none.imple
- Node which has the list of interfaces that are implemented
or null
if none exist.public void addClass(java.lang.String name, ClassDefinition parent, java.util.Set<java.lang.String> ifaces, boolean builtin, boolean dotnet)
name
- The fully qualified (including package) class name.parent
- The superclass or null
for none.ifaces
- The list of interfaces that are implemented or
null
if none exist.builtin
- true
if this definition is built-in to Progress.dotnet
- true
if this definition is a .NET class.public void addInterface(Aast symbol)
symbol
- Node defining the fully qualified (including package) class
name.public void addInterface(java.lang.String name, boolean builtin, boolean dotnet)
name
- The fully qualified (including package) class name.builtin
- true
if this definition is built-in to Progress.dotnet
- true
if this definition is a .NET class.public ClassDefinition getCurrentClassDef()
null
if there is no active definition.public java.lang.String getCurrentClassName()
null
if there is no active
class definition.public ClassDefinition getCurrentParentDef()
null
if there is
no explicit parent.public java.lang.String getCurrentParentName()
public void classDefinitionComplete()
public java.lang.String tryLoadClass(java.lang.String name)
name
- A potential class or interface name.null
if the
class or interface cannot be loaded.public boolean canLoadClass(java.lang.String name)
name
- A potential class or interface name.true
if the class or interface can be loaded.public java.lang.String loadClass(java.lang.String name)
CLASS
or INTERFACE
language
statements). The name can be unqualified (requiring a call to
resolveClassName(java.lang.String)
to determine the fully qualified name) or it
can be fully qualified. The name cannot (just like in Progress) be
partially qualified. Once resolved, if the class or interface definition
is already loaded, then this will return immediately. Otherwise the
class or interface file will be found via the PROPATH
and
that file's AST will be loaded. If the AST does not exist, then the
file will first be parsed. During parsing, the CLASS
or
INTERFACE
language statements will call addClass(com.goldencode.ast.Aast, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
or addInterface(com.goldencode.ast.Aast)
respectively. This will instantiate the proper
ClassDefinition
objects and the contained definitions for
methods, member variables and properties will be added by the rules
that match those language features. Once parsing is complete, the
definition will be fully formed and loaded. Any references to other
classes or interfaces in that file will cause recursive parsing/loading
using this method, until the entire object hierarchy is loaded. At that
point, this chain of methods will return. This recursive loading can
also be duplicated by tree walking for an AST that already exists. This
processing is the same as that done by parsing but it just avoids the
overhead of the full parsing. However, it is triggered by the same
language features as noted above. This method uses parsing and/or tree
walking as needed and both these techniques may be intermixed in the
same recursive chain of class/interface loading.name
- Unqualified or fully qualified class or interface name to
load.public ClassDefinition lookupClass(java.lang.String name)
name
- Fully qualified class/interface name to match.null
if no match was found.public void annotateObjectMethod(java.lang.String cname, java.lang.String mname, boolean isStatic, Aast node)
null
.cname
- Class name, may be null
.mname
- Method name, must NOT be null
.isStatic
- true
if the method is static.node
- The AST to be annotated.public void annotateClassRef(java.lang.String qname, Aast node)
qname
- Fully qualified class name being referenced.node
- The node to annotate.public SymbolResolver.SearchResult resolveClassName(java.lang.String name)
Otherwise, the following name resolution actions are attempted:
PROPATH
for the project's 4GL cls files
OO4GL_PATH
for built-in 4GL cls files
ASSEMBLY_PATH
for the project's .NET cls
files
DOTNET_PATH
for built-in .NET cls files
If an unqualified name is not matched to the above criteria, the name is assumed to be the complete type name and is returned unchanged. This means that no search has been successful.
If the filesystem search has been successful, the returned search
result will have a non-null filename
member. In addition,
the builtin
and dotnet
members will have been
set and can be relied upon.
name
- Unqualified or fully qualified class or interface name.filename
member is null
then only
the name
member has been set, though it may not
be valid. If the filename
member is NOT
null
, then all members of the object are already
set and can be relied upon.public void addPackage(java.lang.String name, Aast fromClause)
name
- Package search specification or explicit fully qualified
class name.fromClause
- The nodes parsed as the FROM (ASSEMBLY | PROPATH)
clause or null
if it wasn't present.public void addObjectMethod(java.lang.String name, int mtype, int access, boolean isStatic, Aast node, java.lang.String qname)
name
- Method name.mtype
- Return type for the method.access
- Access mode (KW_PUBLIC
, KW_PROTECTD
or KW_PRIVATE
).isStatic
- true
if the variable/property is static.node
- The AST to be annotated.qname
- Fully qualified class name for mtype
methods of
METH_CLASS
type. null
if this
method does not return an object instance.public void addDataMember(java.lang.String name, Aast access, Aast stic, java.lang.String qname)
name
- Method name.access
- Node of type KW_PUBLIC
, KW_PROTECTD
or KW_PRIVATE
.stic
- Node of type KW_STATIC
if the variable/property is
static.qname
- Fully qualified class name for mtype
methods of
METH_CLASS
type. null
if this
method does not return an object instance.public void addDataMember(java.lang.String name, int type, Aast access, Aast stic, java.lang.String qname)
name
- Method name.type
- Token type of the member.access
- Node of type KW_PUBLIC
, KW_PROTECTD
or KW_PRIVATE
.stic
- Node of type KW_STATIC
if the variable/property is
static.qname
- Fully qualified class name for mtype
methods of
METH_CLASS
type. null
if this
method does not return an object instance.public void addDataMember(java.lang.String name, int access, boolean isStatic, java.lang.String qname)
name
- Method name.access
- Access mode (KW_PUBLIC
, KW_PROTECTD
or KW_PRIVATE
).isStatic
- true
if the variable/property is static.qname
- Fully qualified class name for mtype
methods of
METH_CLASS
type. null
if this
method does not return an object instance.public void addDataMember(java.lang.String name, int type, int access, boolean isStatic, java.lang.String qname)
name
- Method name.type
- Token type for the member.access
- Access mode (KW_PUBLIC
, KW_PROTECTD
or KW_PRIVATE
).isStatic
- true
if the variable/property is static.qname
- Fully qualified class name for mtype
methods of
METH_CLASS
type. null
if this
method does not return an object instance.public boolean isBuiltInClass(java.lang.String name)
name
- The qualified class name.public boolean isDotNetClass(java.lang.String name)
name
- The qualified class name.public boolean isStaticDataMember(java.lang.String cname, java.lang.String name)
cname
- Class name to search within or null
if this is
a member within the local class definition.name
- Member name to lookup.true
if the member is static. false
otherwise
including the case where the member does not exist at all.public int lookupDataMember(java.lang.String cname, java.lang.String name)
cname
- Class name to search within or null
if this is
a member within the local class definition.name
- Member name to lookup.public int lookupDataMember(java.lang.String cname, java.lang.String name, boolean isStatic)
cname
- Class name to search within or null
if this is
a member within the local class definition.name
- Member name to lookup.isStatic
- If true
, only static methods will be looked up.
Otherwise any method can be returned.public java.lang.String lookupDataMemberClass(java.lang.String cname, java.lang.String name, boolean isStatic)
cname
- Class name to search within or null
if this is
a member within the local class definition.name
- Member name to lookup.isStatic
- true
if this is a static reference.null
if no
such variable exists.public boolean isStaticMethod(java.lang.String cname, java.lang.String name)
cname
- Class name to search within or null
if this is
a member within the local class definition.name
- Member name to lookup.true
if the member is static. false
otherwise
including the case where the member does not exist at all.public int lookupObjectMethod(java.lang.String cname, java.lang.String method)
cname
- Class name to search within or null
if this is
a method call within the local class definition.method
- Method name to lookup.public int lookupObjectMethod(java.lang.String cname, java.lang.String method, boolean isStatic)
cname
- Class name to search within or null
if this is
a method call within the local class definition.method
- Method name to lookup.isStatic
- If true
, only static methods will be looked up.
Otherwise any method can be returned.public java.lang.String lookupObjectMethodClass(java.lang.String cname, java.lang.String method, boolean isStatic)
cname
- Class name to search within or null
if this is
a method call within the local class definition.method
- Method name to lookup.isStatic
- true
if this is a static reference.null
if no
such method exists.public void addAttributeOrMethod(int ktype, int rtype)
This is a flat dictionary (there is no scoping). The keyword's token type is used as the key and the result token type is the value.
This form of the method is NOT suitable for adding attributes or
methods with ATTR_CLASS
or METH_CLASS
result
types. This is due to the fact that there is no mechanism to
associate a class name with the resulting attribute or method.
ktype
- Keyword token type to be used as the key in the dictionary.rtype
- The token type representing the attribute data type or the
method return type as defined by the Lexer and Parser.public void addAttributeOrMethod(int ktype, int rtype, java.lang.String cls)
This is a flat dictionary (there is no scoping). The keyword's token type is used as the key and the result token type is the value.
ktype
- Keyword token type to be used as the key in the dictionary.rtype
- The token type representing the attribute data type or the
method return type as defined by the Lexer and Parser.cls
- Fully qualified name of the class (user defined type) that
is returned from this method. Must be null
if
the resultType is not ATTR_CLASS
or
METH_CLASS
.public int lookupAttributeOrMethod(int ktype)
ktype
- Token type of the keyword to lookup.public java.lang.String lookupAttributeOrMethodClass(int ktype)
ATTR_CLASS
or
METH_CLASS
matching the given keyword.ktype
- Token type of the keyword to lookup.ATTR_CLASS
or METH_CLASS
.
null
if the given keyword is not a valid class
attribute or method.public void addLabel(java.lang.String name, int tokenType)
name
- Label name.tokenType
- The label's token type as defined by the Lexer and Parser.public int lookupLabel(java.lang.String name)
name
- Text string to match.public void deleteLabel()
public void addWidget(java.lang.String name, int tokenType)
Note that this is artificially separated from the variable namespace for implementation simplicity, but in Progress there is only one namespace that handles both variables and widgets.
name
- Widget name.tokenType
- The procedure's token type as defined by the Lexer and Parser.public int lookupWidget(java.lang.String name)
Note that this is artificially separated from the variable namespace for implementation simplicity, but in Progress there is only one namespace that handles both variables and widgets.
name
- Text string to match.public void addFrame(java.lang.String name, int tokenType)
name
- Frame name.tokenType
- The token type as defined by the Lexer and Parser.public java.util.Set<Aast> getFrameFields(java.lang.String frame)
frame
- Name of the frame for which field references should be retrieved.public void addFrameFields(java.lang.String frame, java.util.Collection<Aast> fields)
frame
- Name of the frame contaning the field widgets.fields
- Collection of field ASTs to be stored.public void addFrameField(java.lang.String frame, Aast field)
frame
- Name of the frame contaning the field widgets.field
- Field AST to be stored.public boolean isUseDictExps(java.lang.String frame)
frame
- The frame name.true
if USE-DICT-EXPS is active.public void markUseDictExps(java.lang.String frame)
frame
- The frame name.public int lookupFrame(java.lang.String name)
name
- Text string to match.public void addMenu(java.lang.String name, int tokenType)
name
- Menu or sub-menu name.tokenType
- The token type as defined by the Lexer and Parser.public int lookupMenu(java.lang.String name)
This supports both menus and sub-menus.
name
- Text string to match.public void addMenuItem(java.lang.String name, int tokenType)
name
- Menu-item name.tokenType
- The token type as defined by the Lexer and Parser.public int lookupMenuItem(java.lang.String name)
name
- Text string to match.public void addStream(java.lang.String name, int tokenType)
name
- Stream name.tokenType
- The token type as defined by the Lexer and Parser.public int lookupStream(java.lang.String name)
name
- Text string to match.public void addQuery(java.lang.String name, int tokenType, Aast am, Aast st)
name
- Query name.tokenType
- The token type as defined by the Lexer and Parser.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.public int lookupQuery(java.lang.String name)
name
- Text string to match.public void addDataSet(java.lang.String name, int tokenType, Aast am, Aast st)
name
- Dataset name.tokenType
- The token type as defined by the Lexer and Parser.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.public int lookupDataSet(java.lang.String name)
name
- Text string to match.public void addDataSource(java.lang.String name, int tokenType, Aast am, Aast st)
name
- Data-source name.tokenType
- The token type as defined by the Lexer and Parser.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.public int lookupDataSource(java.lang.String name)
name
- Text string to match.public void addDataRelation(java.lang.String name, int tokenType)
name
- Data-relation name.tokenType
- The token type as defined by the Lexer and Parser.public int lookupDataRelation(java.lang.String name)
name
- Text string to match.public void loadSchemaDatabases(java.lang.String[] dblist)
dblist
- List of database names to load.public void loadAliases(java.util.List list)
list
- A list of string arrays, each representing an alias and
associated database to add to the schema dictionary.public java.lang.String lookupBufferName(java.lang.String name, boolean field)
name
- Text string to match, exactly as found in the original source
code (abbreviated, qualified or inqualified).field
- true
if this is a field reference,
false
if this is a table reference.null
if no match was found.public java.lang.String lookupDatabaseName(java.lang.String name)
lookupFullTableName(java.lang.String)
since the same schema can be referenced
as multiple database instances.name
- Text string to match, exactly as found in the original source
code (abbreviated, qualified or inqualified).null
if no match was
found.public java.lang.String lookupFullFieldName(java.lang.String name)
Schema field names can come in 3 forms:
All 3 forms are accepted as input. All searches are done on a case-insensitive basis. In addition, the Progress 4GL schema supports optional abbreviation of field name portion. These abbreviations are valid as long as they represent a unique match. The smallest unique match to a table name is the smallest possible abbreviation. As such, no ambiguity is allowed in the name passed as an argument. There must be only one match that is ever found in the schema namespace.
name
- Text string to match, in either of the 3 possible forms.null
if no match was found.public int lookupField(java.lang.String name)
Schema field names can come in 3 forms:
All 3 forms are accepted as input. All searches are done on a case-insensitive basis. In addition, the Progress 4GL schema supports optional abbreviation of tablenames and fieldnames. These abbreviations are valid as long as they represent a unique match. The smallest unique match to a table or field name is the smallest possible abbreviation. As such, no ambiguity is allowed in the name passed as an argument. There must be only one match that is ever found in the schema namespace.
name
- Text string to match, in any of the supported 3 forms.public boolean isField(java.lang.String name)
Schema field names can come in 3 forms:
All 3 forms are accepted as input. All searches are done on a case-insensitive basis. In addition, the Progress 4GL schema supports optional abbreviation of tablenames and fieldnames. These abbreviations are valid as long as they represent a unique match. The smallest unique match to a table or field name is the smallest possible abbreviation. As such, no ambiguity is allowed in the name passed as an argument. There must be only one match that is ever found in the schema namespace.
This method is safe to use inside a semantic predicate since it will not throw an exception if the name is not found or if there is ambiguity detected!
name
- Text string to match, in any of the supported 3 forms.public java.lang.String lookupFullTableName(java.lang.String name)
Schema table names can come in 2 forms:
Both forms of input are accepted. All searches are done on a case-insensitive basis. In addition, the Progress 4GL schema supports optional abbreviation of tablenames portion. These abbreviations are valid as long as they represent a unique match. The smallest unique match to a table name is the smallest possible abbreviation. As such, no ambiguity is allowed in the name passed as an argument. There must be only one match that is ever found in the schema namespace.
In addition to the predefined table names from the schema, the user may define or create buffers, temp-tables and work-tables that all are interchangeable with table names. This represents a dynamic table namespace which must appear as a single unified space.
name
- Text string to match, in either of the 2 possible forms.null
if no match was found.public int lookupTable(java.lang.String name)
Schema table names can come in 2 forms:
Both forms of input are accepted. All searches are done on a case-insensitive basis. In addition, the Progress 4GL schema supports optional abbreviation of tablenames portion. These abbreviations are valid as long as they represent a unique match. The smallest unique match to a table name is the smallest possible abbreviation. As such, no ambiguity is allowed in the name passed as an argument. There must be only one match that is ever found in the schema namespace.
In addition to the predefined table names from the schema, the user may define or create buffers, temp-tables and work-tables that all are interchangeable with table names. This represents a dynamic table namespace which must appear as a single unified space.
name
- Text string to match, in either of the 2 possible forms.public boolean isTable(java.lang.String name)
Schema table names can come in 2 forms:
Both forms are accepted as input. All searches are done on a case-insensitive basis. In addition, the Progress 4GL schema supports optional abbreviation of tablenames and fieldnames. These abbreviations are valid as long as they represent a unique match. The smallest unique match to a table or field name is the smallest possible abbreviation. As such, no ambiguity is allowed in the name passed as an argument. There must be only one match that is ever found in the schema namespace.
In addition to the predefined table names from the schema, the user may define or create buffers, temp-tables and work-tables that all are interchangeable with table names. This represents a dynamic table namespace which must appear as a single unified space.
This method is safe to use inside a semantic predicate since it will not throw an exception if the name is not found or if there is ambiguity detected!
name
- Text string to match, in either of the supported 2 forms.public int lookupFieldRecordType(java.lang.String name)
Schema field names can come in 3 forms:
All 3 forms are accepted as input. All searches are done on a case-insensitive basis. In addition, the Progress 4GL schema supports optional abbreviation of tablenames and fieldnames. These abbreviations are valid as long as they represent a unique match. The smallest unique match to a table or field name is the smallest possible abbreviation. As such, no ambiguity is allowed in the name passed as an argument. There must be only one match that is ever found in the schema namespace.
name
- Text string to match, in any of the supported 3 forms.public int lookupTableRecordType(java.lang.String name)
lookupTable(java.lang.String)
. However, if the
name references a buffer, then this method will return the type of
the backing construct to which the buffer refers. Note that a token
type of -1 is invalid in the Lexer and Parser, so this value is used
to denote a search that found no match, or one that failed due to an
ambiguous table name or due to some other problem with schema
dictionary.
Schema table names can come in 2 forms:
Both forms are accepted as input. All searches are done on a case-insensitive basis. In addition, the Progress 4GL schema supports optional abbreviation of tablenames and fieldnames. These abbreviations are valid as long as they represent a unique match. The smallest unique match to a table or field name is the smallest possible abbreviation. As such, no ambiguity is allowed in the name passed as an argument. There must be only one match that is ever found in the schema namespace.
In addition to the predefined table names from the schema, the user may define or create buffers, temp-tables and work-tables that all are interchangeable with table names. This represents a dynamic table namespace which must appear as a single unified space.
name
- Text string to match, in either of the supported 2 forms.public int lookupDatabase(java.lang.String name)
Schema database names are always unqualified (by '.' characters) and cannot be abbreviated. All searches are done on a case-insensitive basis. No ambiguity is allowed in the name passed as an argument. There must be only one match that is ever found in the schema namespace.
In addition to the predefined table names from the schema, the user may define or create database name aliases that are interchangeable with database names. This allows a procedure written to use a specific database name to use (at runtime) a database of a different name that has an identical or at least compatible schema. This represents a dynamic namespace which must appear as a single unified space.
At this time, this method does not support the lookup of aliases since the dictionary does not provide such support.
This method is safe to use inside a semantic predicate since it will not throw an exception if the name is not found or if there is ambiguity detected!
name
- Text string to match.public FieldInfo lookupFieldInfo(NameNode table, java.lang.String name)
table
- Name node asssociated with the field reference. If not null
, only the
private namespace of the given table
is searched (for an exact match)
of fieldName
. If null
, a lenient search (i.e., abbreviations
permitted) is performed across all scopes in the schema dictionary.name
- Field's name. May be qualified or not, but must be unambiguous in the current
parsing context.null
if name
cannot be
resolved to a field.public Aast lookupFieldAst(java.lang.String name)
name
- Field's name. May be qualified or not, but must be unambiguous in the current
parsing context.null
if name
cannot be resolved
to a field.public Aast lookupTableAst(java.lang.String name)
name
- Table's name. May be qualified or not, but must be unambiguous in the current
parsing context.null
if name
cannot be resolved
to a table.public java.util.Iterator<Aast> fields(java.lang.String table)
table
- Target table AST.null
.public void cleanupObjectResources()
public java.lang.Object addTable(java.lang.String tablename, int type, boolean global, Aast node, Aast am, Aast st)
The database to which these are added is null
and is
picked up by context in the schema dictionary or the table is
simply not associated with a specific database (true for temp-tables
and work-tables at least).
Any of these token types are accepted as the 2nd parameter:
In order to hide the schema dictionary interfaces from the caller,
the NameNode
object that can be used to reference
the table (for the further addition of fields), is returned as a
type Object
. Field additions will require this instance
reference to be passed as a parameter. See addField(java.lang.Object, java.lang.String, int, com.goldencode.ast.Aast)
.
tablename
- The name of the table to add.type
- The integer token type representing the type of table.global
- Specifies if the table should be added to the global scope
or to the current procedure/function scope.node
- The node that triggered the table creation.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.null
on error.public java.lang.Object addField(java.lang.Object table, java.lang.String field, int ftype, Aast node)
Any of the valid field token types are accepted as the 3rd parameter
(e.g. ProgressParserTokenTypes.FIELD_INT
).
In order to hide the schema dictionary interfaces from the caller,
the NameNode
object that can be used to reference
the table is required. This is an Object
returned from a
previous call to addTable(java.lang.String, int, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
. This rule casts that to the
proper type before calling the dictionary.
table
- The table reference in which to add the field.field
- The name of the field to add.ftype
- The parser token type representing the field's data type.node
- Node in source file from which this new field creation was
triggered.Object
representing the added field or
null
on failure.public Aast addFieldLike(java.lang.Object table, java.lang.String field, Aast ast)
Depending on the token type stored in the 3rd parameter, 2 possible outcomes can occur:
In order to hide the schema dictionary interfaces from the caller,
the NameNode
object that can be used to reference
the table is required. This is an Object
returned from a
previous call to addTable(java.lang.String, int, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
. This rule casts that to the
proper type before calling the dictionary.
table
- The table reference in which to add the field.field
- The name of the field to add.ast
- The AST node being used as a reference variable or field.Aast
instance representing the added field or
null
on failure.public void setFieldOptions(java.lang.String name, Aast ast)
name
- The name of the field which must have its options set.ast
- The tree to inspect which defines a Progress field.public Aast[] addFieldsFrom(java.lang.Object table, java.lang.String tablename)
In order to hide the schema dictionary interfaces from the caller,
the NameNode
object that can be used to reference
the table is required. This is an Object
returned from a
previous call to addTable(java.lang.String, int, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
. This rule casts that to the
proper type before calling the dictionary.
table
- The table reference in which to add fields.tablename
- The name of the table whose fields should be added.public Aast[] addFieldsFrom(java.lang.Object table, java.lang.String tablename, boolean skipGlobal)
In order to hide the schema dictionary interfaces from the caller,
the NameNode
object that can be used to reference
the table is required. This is an Object
returned from a
previous call to addTable(java.lang.String, int, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
. This rule casts that to the
proper type before calling the dictionary.
table
- The table reference in which to add fields.tablename
- The name of the table whose fields should be added.skipGlobal
- if (@code true}, do not look in the global schema scope to find
tablename
.public void addIndexFrom(java.lang.Object table, Aast node, java.lang.String name, boolean primary)
In order to hide the schema dictionary interfaces from the caller,
the NameNode
object that can be used to reference
the table is required. This is an Object
returned from a
previous call to addTable(java.lang.String, int, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
. This rule casts that to the
proper type before calling the dictionary.
table
- The table reference in which to add fields.node
- Node in source file from which this new field creation was
triggered.name
- The name of the index to add.primary
- Whether or not the PRIMARY
keyword was present.public void addIndex(java.lang.Object table, java.lang.String name, Aast ast)
In order to hide the schema dictionary interfaces from the caller,
the NameNode
object that can be used to reference
the table is required. This is an Object
returned from a
previous call to addTable(java.lang.String, int, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
. This rule casts that to the
proper type before calling the dictionary.
table
- The table reference in which to add fields.name
- The name of the index to add.ast
- The AST storing the nodes that define the index.public void setTableOption(java.lang.Object table, int token, Aast node)
NO-UNDO, VALIDATE, RCODE-INFORMATION
.
In order to hide the schema dictionary interfaces from the caller,
the NameNode
object that can be used to reference
the table is required. This is an Object
returned from a
previous call to addTable(java.lang.String, int, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
. This rule casts that to the
proper type before calling the dictionary.
table
- The table reference which is completed.token
- The type of the option that was encountered in the source
code.node
- The node that triggered the table creation.public void finalizeTableDefine(java.lang.Object table)
In order to hide the schema dictionary interfaces from the caller,
the NameNode
object that can be used to reference
the table is required. This is an Object
returned from a
previous call to addTable(java.lang.String, int, boolean, com.goldencode.ast.Aast, com.goldencode.ast.Aast, com.goldencode.ast.Aast)
. This rule casts that to the
proper type before calling the dictionary.
table
- The table reference which is completed.public void addSchemaScope(boolean mark)
promoteTable(java.lang.Object, boolean, boolean)
)
within this scope are given precedence in making their field names
unambiguous when compared to fields of the same name in tables that
are in scopes that are lower on the stack.mark
- true
to mark the associated scope as one which
is an internal procedure, user-defined function or trigger.
false
for any other case including external
procedures and inner blocks (DO, REPEAT or FOR
).public void deleteSchemaScope(boolean propagate)
promoteTable(java.lang.Object, boolean, boolean)
) into this scope are naturally popped off the
stack by this action if propagate
is false
.
Otherwise the namespace updates made in this scope will be copied to
the namespaces of the enclosing scope.propagate
- true
to force namespace propagation to the
enclosing scope.public void allowPromotion(boolean allow)
allow
- true
to enable, false
to disable.public void promoteTableName(java.lang.String table, boolean force, boolean noProp)
Scopes are created using addSchemaScope(boolean)
and are deleted using
deleteSchemaScope(boolean)
.
table
- The name of the table (optionally qualified) to promote.force
- Override the default promotion behavior and force a refresh
of the promoted table even if it was already promoted
previously.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.public void promoteTable(java.lang.Object table, boolean force, boolean noProp)
Scopes are created using addSchemaScope(boolean)
and are deleted using
deleteSchemaScope(boolean)
.
table
- The Object
reference representing a table
that had been previously added to the schema dictionary.force
- Override the default promotion behavior and force a refresh
of the promoted table even if it was already promoted
previously.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.public void processLikeField(Aast field, boolean hasValidate, java.lang.String sourceSchemaName)
field
- The field which needs to be processed. This is a field defined using a
LIKE table.sourceField
clause, with or without the VALIDATE clause.hasValidate
- When true
, it indicates the VALIDATE clause was present and the
VALEXP node will need to be processed.sourceSchemaName
- The schema name of the source fieldpublic void dump()
stderr
with the listing of each
dictionary. One record per dictionary entry will be printed and
there will be a section for each namespace type.public void dumpSchema() throws java.io.IOException, java.io.FileNotFoundException
schema.dmp
with the listing of all
current contents of the Schema Dictionary.java.io.IOException
java.io.FileNotFoundException
public int lookupWrappedType(TokenDataWrapper wrapped)
TokenDataWrapper
object.wrapped
- The object from which to obtain the token type.public boolean markPreferred(boolean preferred)
SchemaDictionary.markPreferred
flag, so all info for the tables which are
weak references will be collected in the preferred nodes for the current scope.preferred
- The new value of the flag.SchemaDictionary.markPreferred
field.private static void initPossibleClasses(java.lang.String[] propath, boolean caseSens)
.cls
files which can
be found via the PROPATH
as well as all Progress built-ins
and all .NET classes/interfaces that can be accessed.
These files will be listed from the directories represented by the
propath
, OO4GL_PATH
, DOTNET_PATH
and the
ASSEMBLY_PATH
.
If file-system case-sensitivity is false
then all map keys
will be lowercased.
propath
- The propath to scan for initialization. The propath can change
with each instantiation of this class. If it changes then
the propath class mappings must be reinitialized. This may be
null
in which case the map will be empty.caseSens
- true
if the legacy system had a case-sensitive
file-system.private static java.util.ArrayList<java.io.File> getClassFiles(java.lang.String path)
path
- The directory to search.private static void scan(java.io.File dir, java.util.ArrayList<java.io.File> results)
File
class to make a complete list of the directory
contents, then this list is used to build a filtered list of just
those files that match the user-defined regular expression. Note
that if recursion was previously requested (on construction) by the
caller, this method will recursively call itself for every directory
it encounters in the list. Only files will be returned in the results
list and all results are added to the results list that is passed as
a parameter.dir
- The directory in which to list all files.results
- The list to which all matching files must be appended.private int lookupWorker(ScopedSymbolDictionary dict, java.lang.String actual)
ScopedSymbolDictionary
class. All
searches resolve to a symbol that exactly matches the passed key or to
a built-in function or variable that is represented by a language
keyword. The token type of the match is returned. Note that a token
type of -1 is invalid in the Lexer and Parser, so this value is used to
denote a search that found no match. Abbreviation processing is
handled for built-ins ONLY and is naturally done by usage of the
keyword dictionary in the first phase of the lookup process. The
second lookup phase uses any returned keyword to modify the search or
if no keyword is found, then a standard exact search is executed.
The algorithm checks for a keyword match. If not, a simple actual text lookup is done based on the exact text found in the source. If there is a keyword match, then if the keyword is reserved, the keyword's full text is used in the name lookup. The result would match the preloaded built-in name. If the keyword match is with an unreserved keyword, then the exact text from the source is used for a first lookup. If this does not succeed, then a second lookup using the full keyword text is used. This approach allows unreserved keywords to be used as user- defined names that hide built-in names if they exist. However the built-in names are still found if there is no user-defined name.
This usage of the full keyword text for lookup of built-ins is required since only the full text definition exists in the variable dictionary, rather than the full set of abbreviations. Instead the abbreviation matching is handled by the keyword dictionary and this method is aware of the difference.
dict
- ScopedSymbolDictionary
instance to search.actual
- Text string to match.lookupVariable(java.lang.String)
,
lookupFunction(java.lang.String)
private int lookupWorkerExact(ScopedSymbolDictionary dict, java.lang.String name)
ScopedSymbolDictionary
class. All
searches are for a symbol exactly matching the passed key. The token
type of the match is returned. Note that a token type of -1 is invalid
in the Lexer and Parser, so this value is used to denote a search that
found no match. No abbreviation processing will be provided!dict
- ScopedSymbolDictionary
instance to search.name
- Exact text string to match.private void addWrappedWorker(ScopedSymbolDictionary ssd, boolean global, java.lang.String name, TokenDataWrapper wrapped)
ssd
- Symbol dictionary.global
- Add to global scope if true
.name
- Variable name to add.wrapped
- Wrappered token object to add.private int getExtentSubscript(Aast ast)
FIELD/VAR | +--LBRACKET | +--EXPRESSION | +--NUM_LITERALwhere the
FIELD/VAR
node is the ast
parameter
passed to this method.
Currently, only the NUM_LITERAL
token type is supported
for the subscript value. Any other type of expression will raise an
exception.
ast
- Field or variable AST.NUM_LITERAL
node depicted above, or 0 if there is no subscript.java.lang.UnsupportedOperationException
- if a token type other than a simple NUM_LITERAL
is provided for the subscript expression.java.lang.IllegalArgumentException
- if the NUM_LITERAL
token cannot be parsed into an
integral value.private java.lang.String convertSeparator(java.lang.String name)
name
- Qualified class or interface name.private boolean findFile(java.lang.String name, SymbolResolver.UsingType type, SymbolResolver.SearchResult result)
name
- Qualified class or interface name.type
- The type of the using clause that is being checked. This
changes the search order and may drop some paths from the
search when possible.result
- Object in which to store the search results (the file system
name, the built-in flag and the .NET flag) when the search
is successful. If nothing is found, this object is unchanged.true
if the class file was found.private boolean pkgExists(java.lang.String pkg)
pkg
- Package name to search for.true
if the package exists in the PROPATH.private boolean exists(java.io.File file, boolean caseSens)
exists()
method call is
made on the file object. Otherwise a case-insensitive search is
undertaken.file
- The file to check.caseSens
- true
if the legacy system had a case-sensitive
file-system.true
if the file object exists.private int keywordToFieldType(int ktype)
ktype
- Keyword type.private <V> V processHierarchy(SymbolResolver.SchemaHelper<V> worker, java.util.function.Predicate<V> cont) throws SchemaException
worker
- The core processing to be executed on the given schema dictionary.cont
- A condition which if it returns true
, then the next schema
dictionary should be tried. On false
, the current result is
returned.SchemaException
private int decodeAccessMode(Aast am)
am
- The access mode node.private boolean decodeStatic(Aast st)
st
- The static mode node.true
if the type of the node KW_STATIC.private int calcAccessMode(java.lang.String cname)
KW_PUBLIC
. If this request is made within the context
of a class definition, then the access mode will be
KW_PRIVATE
if cname
is null
or
if cname
is the same as the current class definition
name. The access mode will be KW_PROTECTD
if the
cname
is not null
and it is the equivalent
of one of the parent class names in the current class definition's
inheritance chain.cname
- Fully qualified class name being searched or null
if the current class definition is to be searched.KW_PUBLIC
,
KW_PROTECTD
or KW_PRIVATE
.