5.26. PLVtkn: Token Table Interface
The PLVtkn (PL/Vision ToKeN) package provides an interface to the PLV_token table; the package examines this table to determine whether an identifier is a keyword. See Chapter 10 for details.
5.26.1. Package constants
c_any CONSTANT CHAR(1) := '%'; c_syntax CONSTANT CHAR(1) := 'X'; c_builtin CONSTANT CHAR(1) := 'B'; c_symbol CONSTANT CHAR(1) := 'S'; c_exception CONSTANT CHAR(1) := 'E'; c_datatype CONSTANT CHAR(1) := 'D'; c_datadict CONSTANT CHAR(2) := 'DD'; c_sql CONSTANT CHAR(3) := 'SQL';
Each of these constants specify a different type of token or reserved word in the PL/SQL language (except for c_any, of course). They match the values found in the PLV_token_type table. They are used by various programs in the PLVtkn package.
c_plsql CONSTANT CHAR(1) := '%'; /* = c_builtin */ c_od2k CONSTANT CHAR(4) := 'OD2K'; c_of CONSTANT CHAR(2) := 'OF'; c_or CONSTANT CHAR(2) := 'OR'; c_og CONSTANT CHAR(2) := 'OG';
These constants identify different categories or sets of reserved words for the PL/SQL language. The identifier SHOW_ALERT is, for example, a builtin in Oracle Forms, but has no significance in the stored PL/SQL code. Currently PL/Vision is aware of stored PL/SQL and Oracle Forms reserved words only.
5.26.2. The keyword record TYPE
TYPE kw_rectype IS RECORD (token PLV_token%token, token_type PLV_token%token_type, is_keyword BOOLEAN);A PL/SQL record TYPE defining a record holding information about a token.
5.26.3. Determining type ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access